pax_global_header00006660000000000000000000000064134511243520014512gustar00rootroot0000000000000052 comment=f07dafdd10c361f2a5867d125c9f8f79b629edd1 sqlitebrowser-3.11.2/000077500000000000000000000000001345112435200145035ustar00rootroot00000000000000sqlitebrowser-3.11.2/.github/000077500000000000000000000000001345112435200160435ustar00rootroot00000000000000sqlitebrowser-3.11.2/.github/ISSUE_TEMPLATE.md000066400000000000000000000016771345112435200205630ustar00rootroot00000000000000### Details for the issue ### Useful extra information #### I'm opening this issue because: - [ ] DB4S is crashing - [ ] DB4S has a bug - [ ] DB4S needs a feature - [ ] DB4S has another problem #### I'm using DB4S on: - [ ] Windows: ( _version:_ ___ ) - [ ] Linux: ( _distro:_ ___ ) - [ ] Mac OS: ( _version:_ ___ ) - [ ] Other: ___ #### I'm using DB4S version: - [ ] 3.11.0-alpha* - [ ] 3.10.1 - [ ] Other: ___ #### I have also: - [ ] Tried out the latest nightly version: https://github.com/sqlitebrowser/sqlitebrowser#nightly-builds - [ ] Searched for an existing similar issue: https://github.com/sqlitebrowser/sqlitebrowser/issues?utf8=%E2%9C%93&q=is%3Aissue%20 sqlitebrowser-3.11.2/.github/ISSUE_TEMPLATE/000077500000000000000000000000001345112435200202265ustar00rootroot00000000000000sqlitebrowser-3.11.2/.github/ISSUE_TEMPLATE/Bug_report.md000066400000000000000000000017731345112435200226700ustar00rootroot00000000000000--- name: Bug Report about: Create a report to help us improve --- Details for the issue -------------------- #### What did you do? #### What did you expect to see? #### What did you see instead? Useful extra information ------------------------- The info below often helps, please fill it out if you're able to. :) #### What operating system are you using? - [ ] Windows: ( _version:_ ___ ) - [ ] Linux: ( _distro:_ ___ ) - [ ] Mac OS: ( _version:_ ___ ) - [ ] Other: ___ #### What is your DB4S version? - [ ] 3.11.0-alpha* - [ ] 3.10.1 - [ ] Other: ___ #### Did you also - [ ] Try out the latest nightly version: https://github.com/sqlitebrowser/sqlitebrowser#nightly-builds - [ ] Search for an existing similar issue: https://github.com/sqlitebrowser/sqlitebrowser/issues?utf8=%E2%9C%93&q=is%3Aissue%20 sqlitebrowser-3.11.2/.github/ISSUE_TEMPLATE/Feature_request.md000066400000000000000000000010461345112435200237140ustar00rootroot00000000000000--- name: Feature Request about: Suggest an idea or request a new feature --- Describe the new feature -------------------------- Additional info --------------- Please answer these questions before submitting your feature request. #### Is your feature request related to an issue? Please include the issue number. #### Does this feature exist in another product or project? Please provide a link. #### Do you have a screenshot? Please add screenshots to help explain your idea. sqlitebrowser-3.11.2/.github/ISSUE_TEMPLATE/Question.md000066400000000000000000000005031345112435200223550ustar00rootroot00000000000000--- name: Question about: Ask a question related to this project or SQLite in general --- What is your question ----------------------- sqlitebrowser-3.11.2/.gitignore000066400000000000000000000011211345112435200164660ustar00rootroot00000000000000Makefile sqlitebrowser.pro.user .qmake.stash CMakeLists.txt.user CMakeFiles *.cmake *.cxx_parameters # ignore any build folders build*/ # folder with temporary test data testdata/ src/.ui/ src/sqlitebrowser src/Makefile* src/debug src/release src/gen_version.h # ignore compiled translation files src/translations/*.qm # ignore compiled macOS app src/*.app/ # no one needs the txt file src/grammar/sqlite3TokenTypes.txt libs/*/Makefile* libs/*/*/Makefile* libs/*/debug/ libs/*/*/debug/ libs/*/release/ libs/*/*/release/ libs/*/*.a libs/*/*/*.a # Ignore .DS_Store files on OSX .DS_Store sqlitebrowser-3.11.2/.travis.yml000066400000000000000000000031501345112435200166130ustar00rootroot00000000000000language: cpp sudo: required dist: trusty branches: only: - master matrix: fast_finish: true include: - compiler: gcc addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-5 env: COMPILER=g++-5 CXX=g++-5 - compiler: clang addons: apt: sources: - ubuntu-toolchain-r-test - llvm-toolchain-precise-3.8 packages: - clang-3.8 env: COMPILER=clang++-3.8 before_install: - sudo add-apt-repository ppa:likemartinma/devel -y - sudo add-apt-repository --yes ppa:beineri/opt-qt571-trusty - sudo apt-get update -qq - sudo apt-get --force-yes install qt57base qt57translations qt57tools - sudo apt-get --force-yes install libsqlite3-dev libsqlcipher-dev libantlr-dev - QT_ENV_SCRIPT=$(find /opt -name 'qt*-env.sh') - source $QT_ENV_SCRIPT install: - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi - if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.8" CC="clang-3.8"; fi script: - mkdir build - mkdir build_cipher - cd build - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_TESTING=ON .. - make - ctest -V - cd ../build_cipher - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_TESTING=ON -Dsqlcipher=1 .. - make - ctest -V notifications: email: recipients: - mkleusberg@gmail.com - innermous@gmail.com - justin@postgresql.org - mgrojo@gmail.com on_success: never on_failure: always slack: secure: ax5bu7ySF+wlG0pCmQqyzvaurzQt2yLnp/u4KajyFCgWZKOwcvElndjhvW8bIRNgWrGP8TVPkosHhwGucFQNjJq5hHJIbuPzfBTIbITCVbKJNRqeqL0QXlKLwMTejX9AUYwzzJ3xTTj8rZn/UMocsiCy7uPuK1v/5BhZfEr3BBU= sqlitebrowser-3.11.2/BUILDING.md000066400000000000000000000227421345112435200162310ustar00rootroot00000000000000## BUILD INSTRUCTIONS AND REQUIREMENTS DB Browser for SQLite requires Qt as well as SQLite. For more information on Qt please consult http://www.qt.io and for SQLite please see https://sqlite.org/. Please note that all versions after 3.9.1 will require: * Qt 5.5 or later, however we advise you to use 5.7 or later * A C++ compiler with support for C++11 or later Without these or with older versions you won't be able to compile DB Browser for Sqlite anymore. This applies to all platforms. However, most likely you won't have to worry about these as most systems meet these requirements today. If you have any chance, please use Qt 5.7 or any later version. Even though Qt 5.5 and 5.6 are supported by us, there might be glitches and minor problems when using them. ### Generic Linux and FreeBSD The only requirements for building this code are the presence of Qt5 and sqlite3. Qt can be included as a static or shared library, depending on the current Qt configuration on the building machine. Provided you have Qt and cmake installed and configured, simply run: $ cmake . There is one potential problem... several Linux distributions provide a QScintilla package compiled for (only) Qt4. If it's present it can confuse CMake, which will use it during compiling. The resulting program just crashes instead of running. If you experience that kind of crash, try using this cmake command instead when compiling: $ cmake -DFORCE_INTERNAL_QSCINTILLA=ON That tells cmake to compile QScintilla itself, using the source code version we bundle. After the cmake line, run this: $ make in the main directory. This will generate the sqlitebrowser (or `sqlitebrowser.exe`, or `sqlitebrowser.app`) application in the src subdirectory. On some distributions you can then install this in the correct places by running: $ sudo make install The same process works for building the code in any platform supported by Qt (including other Unix systems with X11.) ### Ubuntu Linux ```bash $ sudo apt install build-essential git-core cmake libsqlite3-dev qt5-default qttools5-dev-tools \ libsqlcipher-dev $ git clone https://github.com/sqlitebrowser/sqlitebrowser $ cd sqlitebrowser $ mkdir build $ cd build $ cmake -Dsqlcipher=1 -Wno-dev .. $ make $ sudo make install ``` This should complete without errors, giving you a binary file called 'sqlitebrowser'. Done. :) ### CentOS / Fedora Linux **Note** - On CentOS or an older version of Fedora, you may need to use `yum` instead of `dnf`. **Note 2** - On CentOS 7.x, you need to replace the `qwt-qt5-devel` package name with `qt5-qtbase-devel` in the `dnf install` line below. ``` $ sudo dnf install ant-antlr antlr-C++ cmake gcc-c++ git qt-devel qt5-linguist qwt-qt5-devel \ sqlite-devel $ git clone https://github.com/sqlitebrowser/sqlitebrowser $ cd sqlitebrowser $ cmake -Wno-dev . $ make $ sudo make install ``` This should complete without errors, and `sqlitebrowser` should now be launch-able from the command line. ### MacOS X The application can be compiled to a single executable binary file, similar to other command line utilities. Or it can be compiled to a .app bundle, suitable for placing in /Applications. ### Building a single executable binary This is incredibly easy using [Homebrew](http://brew.sh). Just run this command: $ brew install sqlitebrowser And you're done. A "sqlitebrowser" command should now be available in your PATH, and can also be launched through Spotlight. ### Building an .app bundle Building an .app bundle version takes a bit more effort, but isn't too hard. It requires SQLite and Qt 5.x to be installed first. These are the [Homebrew](http://brew.sh) steps, though other package managers should work: $ brew install sqlite --with-functions --with-json1 --without-readline $ brew install qt $ brew link sqlite3 --force Then it's just a matter of getting the source: $ git clone https://github.com/sqlitebrowser/sqlitebrowser.git **Note** - Don't clone the repo to a directory with a quote character (') in its name (eg ~/tmp/foo'), as compiling will error out. And compiling it: $ cd sqlitebrowser $ qmake $ make $ brew unlink sqlite3 $ mv src/DB\ Browser\ for\ SQLite.app /Applications/ An icon for "DB Browser for SQLite" should now be in your main OSX Applications list, ready to launch. **Note 2** - There have been occasional [reports of compilation problems on OSX 10.9](https://github.com/sqlitebrowser/sqlitebrowser/issues/38), with the 'make' step complaining about no targets. This seems to be solvable by running: $ qmake -spec macx-g++ or: $ qmake -spec macx-llvm (before the 'make' step) ### Compiling on Windows with MSVC Complete setup, build, and packaging instructions with MSVC 2013 x64 are online here:     https://github.com/sqlitebrowser/sqlitebrowser/wiki/Setting-up-a-Win64-development-environment-for-DB4S ### Cross compiling for Windows These are instructions to cross compile within a Linux system a Windows binary and installer. Requirements: * mxe cross compile environment → http://mxe.cc * cmake * sqlitebrowser sources Get the following mxe packages: $ make gcc sqlite qt nsis After successful compilation go into your mxedir/usr/bin and add 3 symlinks: $ ln -s i686-pc-mingw32-windres windres $ ln -s i686-pc-mingw32-makensis makensis $ ln -s /usr/bin/lrelease Now cd into your sqlitebrowser source directory and create a build directory for the windows binary and create the correct makefiles: $ mkdir build-win $ cd build-win $ cmake -DCMAKE_TOOLCHAIN_FILE=/path to mxe/usr/i686-pc-mingw32/share/cmake/mxe-conf.cmake .. Before compiling we have to add the mxe/usr/bin directory to the PATH (so windres and makensis can be found): $ export PATH=/path to mxe/usr/bin:$PATH Now compile: $ make If you additionaly want an NSIS installer: $ make package done. ## Build with SQLCipher support When built with SQLCipher support, DB Browser for SQLite will allow you to open and edit databases encrypted using SQLCipher as well as standard SQLite3 databases. Before compiling make sure you have the necessary SQLCipher development files installed. On Linux this can usually be accomplished by just installing the correct package (e.g. 'libsqlcipher-dev' on Debian-based distributions). On MacOS X the easiest way is to install it via Homebrew ('brew install sqlcipher'). On Windows unfortunately it's a bit more difficult: You'll have to download and compile the code as described on the [SQLCipher website](https://www.zetetic.net/sqlcipher/) before you can proceed. If SQLCipher is installed, simply follow the standard instructions for your platform but enable the 'sqlcipher' build option by replacing any calls to cmake and qmake like this: ``` If it says... Change it to... cmake cmake -Dsqlcipher=1 cmake .. cmake -Dsqlcipher=1 .. qmake qmake CONFIG+=sqlcipher ``` ## Building and running the Unit Tests DB Browser for SQLite has unit tests in the "src/tests" subdirectory. ### Build the unit tests The unit tests are enabled using the cmake variable `ENABLE_TESTING`; it can be passed when running `cmake` to configure sqlitebrowser, for example like this: ```bash $ mkdir build $ cd build $ cmake -DENABLE_TESTING=ON .. $ make ``` ### Run the unit tests Tests can be then run using `make test` or invoking `ctest` directly, for example like this: ``` $ ctest -V UpdateCTestConfiguration from :SRCDIR/build/DartConfiguration.tcl UpdateCTestConfiguration from :SRCDIR/build/DartConfiguration.tcl Test project SRCDIR/build Constructing a list of tests Done constructing a list of tests Checking test dependency graph... Checking test dependency graph end test 1 Start 1: test-sqlobjects 1: Test command: SRCDIR/build/src/tests/test-sqlobjects 1: Test timeout computed to be: 9.99988e+06 1: ********* Start testing of TestTable ********* 1: Config: Using QTest library 4.8.6, Qt 4.8.6 1: PASS : TestTable::initTestCase() 1: PASS : TestTable::sqlOutput() 1: PASS : TestTable::autoincrement() 1: PASS : TestTable::notnull() 1: PASS : TestTable::withoutRowid() 1: PASS : TestTable::foreignKeys() 1: PASS : TestTable::parseSQL() 1: PASS : TestTable::parseSQLdefaultexpr() 1: PASS : TestTable::parseSQLMultiPk() 1: PASS : TestTable::parseSQLForeignKey() 1: PASS : TestTable::parseSQLSingleQuotes() 1: PASS : TestTable::parseSQLKeywordInIdentifier() 1: PASS : TestTable::parseSQLWithoutRowid() 1: PASS : TestTable::parseNonASCIIChars() 1: PASS : TestTable::parseSQLEscapedQuotes() 1: PASS : TestTable::parseSQLForeignKeys() 1: PASS : TestTable::parseSQLCheckConstraint() 1: PASS : TestTable::createTableWithIn() 1: PASS : TestTable::createTableWithNotLikeConstraint() 1: PASS : TestTable::cleanupTestCase() 1: Totals: 20 passed, 0 failed, 0 skipped 1: ********* Finished testing of TestTable ********* 1/2 Test #1: test-sqlobjects .................. Passed 0.02 sec test 2 Start 2: test-import 2: Test command: SRCDIR/build/src/tests/test-import 2: Test timeout computed to be: 9.99988e+06 2: ********* Start testing of TestImport ********* 2: Config: Using QTest library 4.8.6, Qt 4.8.6 2: PASS : TestImport::initTestCase() 2: PASS : TestImport::csvImport() 2: PASS : TestImport::cleanupTestCase() 2: Totals: 3 passed, 0 failed, 0 skipped 2: ********* Finished testing of TestImport ********* 2/2 Test #2: test-import ...................... Passed 0.01 sec 100% tests passed, 0 tests failed out of 2 Total Test time (real) = 0.04 sec ``` Everything should PASS, with no failures, and nothing skipped. sqlitebrowser-3.11.2/CMakeLists.txt000066400000000000000000000336661345112435200172610ustar00rootroot00000000000000project(sqlitebrowser) cmake_minimum_required(VERSION 2.8.12.2) # BUILD_VERSION is the current date in YYYYMMDD format. It is only # used by the nightly version to add the date of the build. string(TIMESTAMP BUILD_VERSION "%Y%m%d") # Choose between building a stable version or nightly (the default), depending # on whether '-DBUILD_STABLE_VERSION=1' is passed on the command line or not. option(BUILD_STABLE_VERSION "Don't build the stable version by default" OFF) if(NOT BUILD_STABLE_VERSION) add_definitions(-DBUILD_VERSION=${BUILD_VERSION}) endif() set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") OPTION(ENABLE_TESTING "Enable the unit tests" OFF) OPTION(FORCE_INTERNAL_ANTLR "Don't use the distribution's Antlr library even if there is one" OFF) OPTION(FORCE_INTERNAL_QSCINTILLA "Don't use the distribution's QScintilla library even if there is one" OFF) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif() add_definitions(-std=c++11) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED True) # Fix behavior of CMAKE_CXX_STANDARD when targeting macOS. if (POLICY CMP0025) cmake_policy(SET CMP0025 NEW) endif () if(WIN32 AND MSVC) if(CMAKE_CL_64) # Paths for 64-bit windows builds set(OPENSSL_PATH "C:/dev/OpenSSL-Win64") set(QT5_PATH "C:/dev/Qt/5.11.3/msvc2017_64") # Choose between SQLCipher or SQLite, depending whether # -Dsqlcipher=1 is passed on the command line if(sqlcipher) set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win64") else() set(SQLITE3_PATH "C:/dev/SQLite-Win64") endif() else() # Paths for 32-bit windows builds set(OPENSSL_PATH "C:/dev/OpenSSL-Win32") set(QT5_PATH "C:/dev/Qt/5.7/msvc2015") # Choose between SQLCipher or SQLite, depending whether # -Dsqlcipher=1 is passed on the command line if(sqlcipher) set(SQLITE3_PATH "C:/git_repos/SQLCipher-Win32") else() set(SQLITE3_PATH "C:/dev/SQLite-Win32") endif() endif() set(CMAKE_PREFIX_PATH "${QT5_PATH};${SQLITE3_PATH}") endif() if(NOT FORCE_INTERNAL_ANTLR) find_package(Antlr2 QUIET) endif() if(NOT FORCE_INTERNAL_QSCINTILLA) find_package(QScintilla QUIET) endif() set(QHEXEDIT_DIR libs/qhexedit) set(QCUSTOMPLOT_DIR libs/qcustomplot-source) if(NOT ANTLR2_FOUND) set(ANTLR_DIR libs/antlr-2.7.7) add_subdirectory(${ANTLR_DIR}) endif() if(NOT QSCINTILLA_FOUND) set(QSCINTILLA_DIR libs/qscintilla/Qt4Qt5) add_subdirectory(${QSCINTILLA_DIR}) endif() add_subdirectory(${QHEXEDIT_DIR}) add_subdirectory(${QCUSTOMPLOT_DIR}) find_package(Qt5 REQUIRED COMPONENTS Concurrent Gui LinguistTools Network PrintSupport Test Widgets Xml) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) if(ENABLE_TESTING) enable_testing() endif() set(SQLB_HDR src/version.h src/sqlitetypes.h src/csvparser.h src/sqlite.h src/grammar/sqlite3TokenTypes.hpp src/grammar/Sqlite3Lexer.hpp src/grammar/Sqlite3Parser.hpp src/Data.h ) set(SQLB_MOC_HDR src/sqlitedb.h src/AboutDialog.h src/EditIndexDialog.h src/EditDialog.h src/EditTableDialog.h src/AddRecordDialog.h src/ExportDataDialog.h src/ExtendedTableWidget.h src/FilterTableHeader.h src/ImportCsvDialog.h src/MainWindow.h src/Settings.h src/PreferencesDialog.h src/SqlExecutionArea.h src/VacuumDialog.h src/sqlitetablemodel.h src/RowLoader.h src/RowCache.h src/sqltextedit.h src/docktextedit.h src/DbStructureModel.h src/Application.h src/CipherDialog.h src/ExportSqlDialog.h src/SqlUiLexer.h src/FileDialog.h src/ColumnDisplayFormatDialog.h src/FilterLineEdit.h src/RemoteDatabase.h src/ForeignKeyEditorDelegate.h src/PlotDock.h src/RemoteDock.h src/RemoteModel.h src/RemotePushDialog.h src/FindReplaceDialog.h src/ExtendedScintilla.h src/FileExtensionManager.h src/CipherSettings.h src/DotenvFormat.h ) set(SQLB_SRC src/AboutDialog.cpp src/EditIndexDialog.cpp src/EditDialog.cpp src/EditTableDialog.cpp src/AddRecordDialog.cpp src/ExportDataDialog.cpp src/ExtendedTableWidget.cpp src/FilterTableHeader.cpp src/ImportCsvDialog.cpp src/MainWindow.cpp src/Settings.cpp src/PreferencesDialog.cpp src/SqlExecutionArea.cpp src/VacuumDialog.cpp src/sqlitedb.cpp src/sqlitetablemodel.cpp src/RowLoader.cpp src/sqlitetypes.cpp src/sqltextedit.cpp src/docktextedit.cpp src/csvparser.cpp src/DbStructureModel.cpp src/grammar/Sqlite3Lexer.cpp src/grammar/Sqlite3Parser.cpp src/main.cpp src/Application.cpp src/CipherDialog.cpp src/ExportSqlDialog.cpp src/SqlUiLexer.cpp src/FileDialog.cpp src/ColumnDisplayFormatDialog.cpp src/FilterLineEdit.cpp src/RemoteDatabase.cpp src/ForeignKeyEditorDelegate.cpp src/PlotDock.cpp src/RemoteDock.cpp src/RemoteModel.cpp src/RemotePushDialog.cpp src/FindReplaceDialog.cpp src/ExtendedScintilla.cpp src/FileExtensionManager.cpp src/Data.cpp src/CipherSettings.cpp src/DotenvFormat.cpp ) set(SQLB_FORMS src/AboutDialog.ui src/EditIndexDialog.ui src/EditDialog.ui src/EditTableDialog.ui src/AddRecordDialog.ui src/ExportDataDialog.ui src/ImportCsvDialog.ui src/MainWindow.ui src/PreferencesDialog.ui src/SqlExecutionArea.ui src/VacuumDialog.ui src/CipherDialog.ui src/ExportSqlDialog.ui src/ColumnDisplayFormatDialog.ui src/PlotDock.ui src/RemoteDock.ui src/RemotePushDialog.ui src/FindReplaceDialog.ui src/FileExtensionManager.ui ) set(SQLB_RESOURCES src/icons/icons.qrc src/translations/flags/flags.qrc src/translations/translations.qrc src/certs/CaCerts.qrc ) set(SQLB_MISC src/grammar/sqlite3.g ) # Translation files set(SQLB_TSS "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ar_SA.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_cs.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_zh.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_zh_TW.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_de.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_es_ES.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_fr.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ru.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_pl.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_pt_BR.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_en_GB.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_ko_KR.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_tr.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_uk_UA.ts" "${CMAKE_SOURCE_DIR}/src/translations/sqlb_it.ts" ) # Windows image format plugin files set(WIN_IMG_PLUGINS "${QT5_PATH}/plugins/imageformats/qgif.dll" "${QT5_PATH}/plugins/imageformats/qicns.dll" "${QT5_PATH}/plugins/imageformats/qico.dll" "${QT5_PATH}/plugins/imageformats/qjpeg.dll" "${QT5_PATH}/plugins/imageformats/qsvg.dll" "${QT5_PATH}/plugins/imageformats/qtga.dll" "${QT5_PATH}/plugins/imageformats/qtiff.dll" "${QT5_PATH}/plugins/imageformats/qwbmp.dll" "${QT5_PATH}/plugins/imageformats/qwebp.dll" ) set(WIN_IMG_PLUGINS_DEBUG "${QT5_PATH}/plugins/imageformats/qgifd.dll" "${QT5_PATH}/plugins/imageformats/qicnsd.dll" "${QT5_PATH}/plugins/imageformats/qicod.dll" "${QT5_PATH}/plugins/imageformats/qjpegd.dll" "${QT5_PATH}/plugins/imageformats/qsvgd.dll" "${QT5_PATH}/plugins/imageformats/qtgad.dll" "${QT5_PATH}/plugins/imageformats/qtiffd.dll" "${QT5_PATH}/plugins/imageformats/qwbmpd.dll" "${QT5_PATH}/plugins/imageformats/qwebpd.dll" ) # License files set(LICENSE_FILES LICENSE LICENSE-PLUGINS ) qt5_wrap_ui(SQLB_FORM_HDR ${SQLB_FORMS}) if(SQLB_TSS) # add translations foreach(SQLB_TS ${SQLB_TSS}) SET_SOURCE_FILES_PROPERTIES("${SQLB_TS}" PROPERTIES OUTPUT_LOCATION "${CMAKE_SOURCE_DIR}/src/translations") endforeach(SQLB_TS ${SQLB_TSS}) qt5_add_translation(SQLB_QMS ${SQLB_TSS}) endif(SQLB_TSS) qt5_add_resources(SQLB_RESOURCES_RCC ${SQLB_RESOURCES}) #icon and correct libs/subsystem for windows if(WIN32) #enable version check for windows add_definitions(-DCHECKNEWVERSION) IF( MINGW ) # resource compilation for MinGW ADD_CUSTOM_COMMAND(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" COMMAND windres "-I${CMAKE_CURRENT_SOURCE_DIR}" "-i${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc" -o "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o" VERBATIM) set(SQLB_SRC ${SQLB_SRC} "${CMAKE_CURRENT_BINARY_DIR}/sqlbicon.o") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-subsystem,windows") set(WIN32_STATIC_LINK -Wl,-Bstatic -lssl -lcrypto -lws2_32) set(ADDITIONAL_LIBS lzma) ELSE( MINGW ) set(SQLB_SRC ${SQLB_SRC} "${CMAKE_CURRENT_SOURCE_DIR}/src/winapp.rc") ENDIF( MINGW ) else() set(LPTHREAD pthread) endif(WIN32) #enable version check for MacOS if(APPLE) add_definitions(-DCHECKNEWVERSION) endif(APPLE) # SQLCipher option if(sqlcipher) add_definitions(-DENABLE_SQLCIPHER) set(LIBSQLITE_NAME sqlcipher) else(sqlcipher) set(LIBSQLITE_NAME sqlite3) endif(sqlcipher) # add extra library path for MacOS and FreeBSD set(EXTRAPATH APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") if(EXTRAPATH) find_library(LIBSQLITE ${LIBSQLITE_NAME} HINTS /usr/local/lib /usr/local/opt/sqlite/lib) set(ADDITIONAL_INCLUDE_PATHS /usr/local/include /usr/local/opt/sqlite/include) else(EXTRAPATH) find_library(LIBSQLITE ${LIBSQLITE_NAME}) endif(EXTRAPATH) if(WIN32 AND MSVC) find_path(SQLITE3_INCLUDE_DIR sqlite3.h) if(sqlcipher) find_file(SQLITE3_DLL sqlcipher.dll) else(sqlcipher) find_file(SQLITE3_DLL sqlite3.dll) endif(sqlcipher) include_directories(${SQLITE3_INCLUDE_DIR}) endif() include_directories( "${CMAKE_CURRENT_BINARY_DIR}" ${QHEXEDIT_DIR} ${QCUSTOMPLOT_DIR} ${ADDITIONAL_INCLUDE_PATHS} src) if(ANTLR2_FOUND) include_directories(${ANTLR2_INCLUDE_DIRS}) else() include_directories(${ANTLR_DIR}) endif() if(QSCINTILLA_FOUND) include_directories(${QSCINTILLA_INCLUDE_DIR}) else() include_directories(${QSCINTILLA_DIR}) endif() add_executable(${PROJECT_NAME} ${SQLB_HDR} ${SQLB_SRC} ${SQLB_FORM_HDR} ${SQLB_MOC} ${SQLB_RESOURCES_RCC} ${SQLB_MISC}) add_dependencies(${PROJECT_NAME} qhexedit qcustomplot) if(NOT ANTLR2_FOUND) add_dependencies(${PROJECT_NAME} antlr) endif() if(NOT QSCINTILLA_FOUND) add_dependencies(${PROJECT_NAME} qscintilla2) endif() link_directories( "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}" ) if(NOT ANTLR2_FOUND) link_directories("${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}") endif() if(NOT QSCINTILLA_FOUND) link_directories("${CMAKE_CURRENT_BINARY_DIR}/${QSCINTILLA_DIR}") endif() set(QT_LIBS Qt5::Gui Qt5::Test Qt5::PrintSupport Qt5::Widgets Qt5::Network Qt5::Concurrent Qt5::Xml) target_link_libraries(${PROJECT_NAME} qhexedit qcustomplot ${LPTHREAD} ${QT_LIBS} ${WIN32_STATIC_LINK} ${LIBSQLITE} ${ADDITIONAL_LIBS}) if(ANTLR2_FOUND) target_link_libraries(${PROJECT_NAME} ${ANTLR2_LIBRARIES}) else() target_link_libraries(${PROJECT_NAME} antlr) endif() if(QSCINTILLA_FOUND) target_link_libraries(${PROJECT_NAME} ${QSCINTILLA_LIBRARIES}) else() target_link_libraries(${PROJECT_NAME} qscintilla2) endif() if(WIN32 AND MSVC) set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "DB Browser for SQLite") set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE") set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") if(CMAKE_CL_64) set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.02 /ENTRY:mainCRTStartup") set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.02") else() set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS,5.01 /ENTRY:mainCRTStartup") set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS,5.01") endif() endif() if(NOT WIN32) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) endif() if(ENABLE_TESTING) add_subdirectory(src/tests) endif() if(UNIX AND NOT APPLE) install(FILES src/icons/${PROJECT_NAME}.png DESTINATION share/icons/hicolor/256x256/apps/) install(FILES distri/${PROJECT_NAME}.desktop DESTINATION share/applications/) install(FILES distri/${PROJECT_NAME}.desktop.appdata.xml DESTINATION share/appdata/) endif(UNIX AND NOT APPLE) if(WIN32 AND MSVC) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "/" LIBRARY DESTINATION lib) set(QT5_BIN_PATH ${QT5_PATH}/bin) # The Qt5 Debug configuration library files have a 'd' postfix install(FILES ${QT5_BIN_PATH}/Qt5Cored.dll ${QT5_BIN_PATH}/Qt5Guid.dll ${QT5_BIN_PATH}/Qt5Networkd.dll ${QT5_BIN_PATH}/Qt5PrintSupportd.dll ${QT5_BIN_PATH}/Qt5Widgetsd.dll ${QT5_BIN_PATH}/Qt5Concurrentd.dll DESTINATION "/" CONFIGURATIONS Debug) # The Qt5 Release configuration files don't have a postfix install(FILES ${QT5_BIN_PATH}/Qt5Core.dll ${QT5_BIN_PATH}/Qt5Gui.dll ${QT5_BIN_PATH}/Qt5Network.dll ${QT5_BIN_PATH}/Qt5PrintSupport.dll ${QT5_BIN_PATH}/Qt5Widgets.dll ${QT5_BIN_PATH}/Qt5Concurrent.dll DESTINATION "/" CONFIGURATIONS Release) # The files below are common to all configurations install(FILES ${SQLITE3_DLL} ${OPENSSL_PATH}/libeay32.dll ${OPENSSL_PATH}/ssleay32.dll DESTINATION "/") install(FILES ${QT5_PATH}/plugins/platforms/qwindows.dll DESTINATION platforms) # The XML dll install(FILES "${QT5_PATH}/bin/Qt5Xmld.dll" DESTINATION "/" CONFIGURATIONS Debug) install(FILES "${QT5_PATH}/bin/Qt5Xml.dll" DESTINATION "/" CONFIGURATIONS Release) # The image format plugins install(FILES ${WIN_IMG_PLUGINS_DEBUG} DESTINATION imageformats CONFIGURATIONS Debug) install(FILES ${WIN_IMG_PLUGINS} DESTINATION imageformats CONFIGURATIONS Release) # The license files install(FILES ${LICENSE_FILES} DESTINATION licenses) # The batch file launcher install(FILES distri/winlaunch.bat DESTINATION "/") endif() sqlitebrowser-3.11.2/LICENSE000066400000000000000000001460161345112435200155200ustar00rootroot00000000000000DB Browser for SQLite is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses. ----------------------------------------------------------------------- GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ----------------------------------------------------------------------- Mozilla Public License Version 2.0 ================================== 1. Definitions -------------- 1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. 1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution. 1.3. "Contribution" means Covered Software of a particular Contributor. 1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. 1.5. "Incompatible With Secondary Licenses" means (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. 1.6. "Executable Form" means any form of the work other than Source Code Form. 1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. 1.8. "License" means this document. 1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. 1.10. "Modifications" means any of the following: (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or (b) any new file in Source Code Form that contains any Covered Software. 1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. 1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. 1.13. "Source Code Form" means the form of the work preferred for making modifications. 1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. License Grants and Conditions -------------------------------- 2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. 2.2. Effective Date The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. 2.3. Limitations on Grant Scope The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: (a) for any code that a Contributor has removed from Covered Software; or (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or (c) under Patent Claims infringed by Covered Software in the absence of its Contributions. This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). 2.4. Subsequent Licenses No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). 2.5. Representation Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. 2.6. Fair Use This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. 2.7. Conditions Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. 3. Responsibilities ------------------- 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form. 3.2. Distribution of Executable Form If You distribute Covered Software in Executable Form then: (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License. 3.3. Distribution of a Larger Work You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). 3.4. Notices You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. 3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. 4. Inability to Comply Due to Statute or Regulation --------------------------------------------------- If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Termination -------------- 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. ************************************************************************ * * * 6. Disclaimer of Warranty * * ------------------------- * * * * Covered Software is provided under this License on an "as is" * * basis, without warranty of any kind, either expressed, implied, or * * statutory, including, without limitation, warranties that the * * Covered Software is free of defects, merchantable, fit for a * * particular purpose or non-infringing. The entire risk as to the * * quality and performance of the Covered Software is with You. * * Should any Covered Software prove defective in any respect, You * * (not any Contributor) assume the cost of any necessary servicing, * * repair, or correction. This disclaimer of warranty constitutes an * * essential part of this License. No use of any Covered Software is * * authorized under this License except under this disclaimer. * * * ************************************************************************ ************************************************************************ * * * 7. Limitation of Liability * * -------------------------- * * * * Under no circumstances and under no legal theory, whether tort * * (including negligence), contract, or otherwise, shall any * * Contributor, or anyone who distributes Covered Software as * * permitted above, be liable to You for any direct, indirect, * * special, incidental, or consequential damages of any character * * including, without limitation, damages for lost profits, loss of * * goodwill, work stoppage, computer failure or malfunction, or any * * and all other commercial damages or losses, even if such party * * shall have been informed of the possibility of such damages. This * * limitation of liability shall not apply to liability for death or * * personal injury resulting from such party's negligence to the * * extent applicable law prohibits such limitation. Some * * jurisdictions do not allow the exclusion or limitation of * * incidental or consequential damages, so this exclusion and * * limitation may not apply to You. * * * ************************************************************************ 8. Litigation ------------- Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims. 9. Miscellaneous ---------------- This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. 10. Versions of the License --------------------------- 10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. 10.2. Effect of New Versions You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. 10.3. Modified Versions If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. Exhibit A - Source Code Form License Notice ------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. Exhibit B - "Incompatible With Secondary Licenses" Notice --------------------------------------------------------- This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. sqlitebrowser-3.11.2/LICENSE-PLUGINS000066400000000000000000000057151345112435200166370ustar00rootroot00000000000000DB Browser for SQLite includes support for TIFF and WebP images. The support for these comes from the LibTIFF and WebP projects, which have their own (Open Source) licenses, different to ours. LibTIFF - http://www.simplesystems.org/libtiff/ Copyright (c) 1988-1997 Sam Leffler Copyright (c) 1991-1997 Silicon Graphics, Inc. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics. THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. WebP - https://developers.google.com/speed/webp/ Copyright (c) 2010, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. sqlitebrowser-3.11.2/README.md000066400000000000000000000255121345112435200157670ustar00rootroot00000000000000# DB Browser for SQLite [![Wiki][wiki-img]][wiki] [![Build Status][travis-img]][travis] [![Join the chat at https://gitter.im/sqlitebrowser/sqlitebrowser][gitter-img]][gitter] [![Join the chat at https://join.slack.com/t/db4s/shared_invite/enQtMzc3MzY5OTU4NDgzLWRlYjk0ZmE5ZDEzYWVmNDQxYTYxNmJjNWVkMjI3ZmVjZTY2NDBjODY3YzNhNTNmZDVlNWI2ZGFjNTk5MjJkYmU][slack-img]][slack] [![Download][download-img]][download] [![Qt][qt-img]][qt] [![Coverity][coverity-img]][coverity] [![Patreon][patreon-img]][patreon] ![DB Browser for SQLite Screenshot](https://github.com/sqlitebrowser/sqlitebrowser/raw/master/images/sqlitebrowser.png "DB Browser for SQLite Screenshot") ## What it is _DB Browser for SQLite_ (DB4S) is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite. It is for users and developers wanting to create databases, search, and edit data. It uses a familiar spreadsheet-like interface, and you don't need to learn complicated SQL commands. Controls and wizards are available for users to: * Create and compact database files * Create, define, modify and delete tables * Create, define and delete indexes * Browse, edit, add and delete records * Search records * Import and export records as text * Import and export tables from/to CSV files * Import and export databases from/to SQL dump files * Issue SQL queries and inspect the results * Examine a log of all SQL commands issued by the application * Plot simple graphs based on table or query data ## What it is not This program is not a visual shell for the sqlite command line tool. It does not require familiarity with SQL commands. It is a tool to be used both by developers and by end users, and it must remain as simple to use as possible in order to achieve its goals. ## Wiki For documentation, for users as well as for developers, check out our Wiki at https://github.com/sqlitebrowser/sqlitebrowser/wiki. ## Nightly builds Nightly builds for Windows and OSX can be downloaded here: * https://nightlies.sqlitebrowser.org/latest ## Windows Windows releases can be downloaded here: * https://github.com/sqlitebrowser/sqlitebrowser/releases **Note** - If for some reason the standard Windows release doesn't work for you (eg it gives an error), try a nightly build. They often fix bugs reported after the last release. :D ## MacOS X / macOS DB Browser for SQLite works well on MacOS X / macOS. * OSX 10.8 (Mountain Lion) - 10.13 (High Sierra) are tested and known to work OSX releases can be downloaded here: * https://github.com/sqlitebrowser/sqlitebrowser/releases Latest OSX binary can be installed via [Homebrew Cask](https://caskroom.github.io/ "Homebrew Cask"): ``` brew cask install db-browser-for-sqlite ``` ## Linux DB Browser for SQLite works well on Linux. ### Arch Linux Arch Linux provides a package through pacman. ### Fedora For Fedora (i386 and x86_64) you can install by issuing: $ sudo dnf install sqlitebrowser ### Debian Note that Debian focuses more on stability rather than newest features. Therefore packages will typically contain some older (but well tested) version, compared to the latest release. Update the cache using: sudo apt-get update Install the package using: sudo apt-get install sqlitebrowser ### Ubuntu and Derivatives #### Stable release For Ubuntu and derivaties, [@deepsidhu1313](https://github.com/deepsidhu1313) provides a PPA with our latest release here: * https://launchpad.net/~linuxgndu/+archive/ubuntu/sqlitebrowser To add this ppa just type in these commands in terminal: sudo add-apt-repository -y ppa:linuxgndu/sqlitebrowser Then update the cache using: sudo apt-get update Install the package using: sudo apt-get install sqlitebrowser Ubuntu 14.04.X, 15.04.X, 15.10.X and 16.04.X are supported for now (until Launchpad decides to discontinue building for any series). Ubuntu Precise (12.04) and Utopic (14.10) are not supported: * Precise doesn't have a new enough Qt package in its repository by default, which is a dependency * Launchpad doesn't support Utopic any more, as that has reached its End of Life #### Nightly builds Nightly builds are available here: * https://launchpad.net/~linuxgndu/+archive/ubuntu/sqlitebrowser-testing To add this ppa just type in these commands in terminal: sudo add-apt-repository -y ppa:linuxgndu/sqlitebrowser-testing Then update the cache using: sudo apt-get update Install the package using: sudo apt-get install sqlitebrowser ### Other Linux On others you'll need to compile it yourself using the (simple) instructions in [BUILDING.md](BUILDING.md). ## FreeBSD DB Browser for SQLite works well on FreeBSD, and there is a port for it (thanks to [lbartoletti](https://github.com/lbartoletti) :smile:). It can be installed using either this: # make -C /usr/ports/databases/sqlitebrowser install or this: # pkg install sqlitebrowser ### Compiling Instructions for compiling on (at least) Windows, OSX, Linux, and FreeBSD are in [BUILDING](BUILDING.md). ## Twitter Follow us on Twitter: https://twitter.com/sqlitebrowser ## Website * https://sqlitebrowser.org ## Old project page * https://sourceforge.net/projects/sqlitebrowser ## Releases * [Version 3.10.1 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.10.1) - 2017-09-20 * [Version 3.10.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.10.0) - 2017-08-20 * [Version 3.9.1 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.9.1) - 2016-10-03 * [Version 3.9.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.9.0) - 2016-08-24 * [Version 3.8.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.8.0) - 2015-12-25 * [Version 3.7.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.7.0) - 2015-06-14 * [Version 3.6.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.6.0) - 2015-04-27 * [Version 3.5.1 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.5.1) - 2015-02-08 * [Version 3.5.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.5.0) - 2015-01-31 * [Version 3.4.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.4.0) - 2014-10-29 * [Version 3.3.1 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.3.1) - 2014-08-31 - Project renamed from "SQLite Database Browser" * [Version 3.3.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.3.0) - 2014-08-24 * [Version 3.2.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/sqlb-3.2.0) - 2014-07-06 * [Version 3.1.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/sqlb-3.1.0) - 2014-05-17 * [Version 3.0.3 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/sqlb-3.0.3) - 2014-04-28 * [Version 3.0.2 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/sqlb-3.0.2) - 2014-02-12 * [Version 3.0.1 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/sqlb-3.0.1) - 2013-12-02 * [Version 3.0 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/sqlb-3.0) - 2013-09-15 * [Version 3.0rc1 released](https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/rc1) - 2013-09-09 - Project now on GitHub * Version 2.0b1 released - 2009-12-10 - Based on Qt4.6 * Version 1.2 released - 2005-04-05 * Version 1.1 released - 2004-07-20 * Version 1.01 released - 2003-10-02 * Version 1.0 released to public domain - 2003-08-19 ## History This program was developed originally by Mauricio Piacentini ([@piacentini](https://github.com/piacentini)) from Tabuleiro Producoes, as the Arca Database Browser. The original version was used as a free companion tool to the Arca Database Xtra, a commercial product that embeds SQLite databases with some additional extensions to handle compressed and binary data. The original code was trimmed and adjusted to be compatible with standard SQLite 2.x databases. The resulting program was renamed SQLite Database Browser, and released into the Public Domain by Mauricio. Icons were contributed by [Raquel Ravanini](http://www.raquelravanini.com), also from Tabuleiro. Jens Miltner ([@jmiltner](https://github.com/jmiltner)) contributed the code to support SQLite 3.x databases for the 1.2 release. Pete Morgan ([@daffodil](https://github.com/daffodil)) created an initial project on GitHub with the code in 2012, where several contributors fixed and improved pieces over the years. René Peinthor ([@rp-](https://github.com/rp-)) and Martin Kleusberg ([@MKleusberg](https://github.com/MKleusberg)) then became involved, and have been the main driving force from that point. Justin Clift ([@justinclift](https://github.com/justinclift)) helps out with testing on OSX, and started the new github.com/sqlitebrowser organisation on GitHub. [John T. Haller](http://johnhaller.com), of [PortableApps.com](http://portableapps.com) fame, created the new logo. He based it on the Tango icon set (public domain). In August 2014, the project was renamed to "Database Browser for SQLite" at the request of [Richard Hipp](http://www.hwaci.com/drh) (creator of [SQLite](http://sqlite.org)), as the previous name was creating unintended support issues. In September 2014, the project was renamed to "DB Browser for SQLite", to avoid confusion with an existing application called "Database Browser". ## Contributors You can see the list by going to the [__Contributors__ tab](https://github.com/sqlitebrowser/sqlitebrowser/graphs/contributors). ## License DB Browser for SQLite is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses. [travis-img]: https://travis-ci.org/sqlitebrowser/sqlitebrowser.svg?branch=master [travis]: https://travis-ci.org/sqlitebrowser/sqlitebrowser [gitter-img]: https://badges.gitter.im/sqlitebrowser/sqlitebrowser.svg [gitter]: https://gitter.im/sqlitebrowser/sqlitebrowser [slack-img]: https://img.shields.io/badge/chat-on%20slack-orange.svg [slack]: https://join.slack.com/t/db4s/shared_invite/enQtMzc3MzY5OTU4NDgzLWRlYjk0ZmE5ZDEzYWVmNDQxYTYxNmJjNWVkMjI3ZmVjZTY2NDBjODY3YzNhNTNmZDVlNWI2ZGFjNTk5MjJkYmU [download-img]: https://img.shields.io/github/downloads/sqlitebrowser/sqlitebrowser/total.svg [download]: https://github.com/sqlitebrowser/sqlitebrowser/releases [qt-img]: https://img.shields.io/badge/Qt-qmake-green.svg [qt]: https://www.qt.io [coverity-img]: https://img.shields.io/coverity/scan/11712.svg [coverity]: https://scan.coverity.com/projects/sqlitebrowser-sqlitebrowser [patreon-img]: https://img.shields.io/badge/donate-Patreon-coral.svg [patreon]: https://www.patreon.com/bePatron?u=11578749 [wiki-img]: https://img.shields.io/badge/docs-Wiki-blue.svg [wiki]: https://github.com/sqlitebrowser/sqlitebrowser/wiki sqlitebrowser-3.11.2/cmake/000077500000000000000000000000001345112435200155635ustar00rootroot00000000000000sqlitebrowser-3.11.2/cmake/FindAntlr2.cmake000066400000000000000000000041361345112435200205340ustar00rootroot00000000000000# - try to find Antlr v2 # Once done this will define: # # ANTLR2_FOUND - system has antlr2 # ANTLR2_INCLUDE_DIRS - the include directories for antlr2 # ANTLR2_LIBRARIES - Link these to use antl2 # ANTLR2_EXECUTABLE - The 'antlr' or 'runantlr' executable # Copyright (C) 2015, Pino Toscano, # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. find_library(ANTLR2_LIBRARY antlr) set(ANTLR2_LIBRARIES "${ANTLR2_LIBRARY}") find_path(ANTLR2_INCLUDE_DIR antlr/AST.hpp) set(ANTLR2_INCLUDE_DIRS "${ANTLR2_INCLUDE_DIR}") include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Antlr2 DEFAULT_MSG ANTLR2_LIBRARIES ANTLR2_INCLUDE_DIRS) find_program(ANTLR2_EXECUTABLE NAMES runantlr runantlr2 antlr) mark_as_advanced( ANTLR2_INCLUDE_DIRS ANTLR2_LIBRARIES ANTLR2_EXECUTABLE ) sqlitebrowser-3.11.2/cmake/FindQScintilla.cmake000066400000000000000000000116001345112435200214270ustar00rootroot00000000000000# QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor control # available at http://www.riverbankcomputing.com/software/qscintilla/ # # The module defines the following variables: # QSCINTILLA_FOUND - the system has QScintilla # QSCINTILLA_INCLUDE_DIR - where to find qsciscintilla.h # QSCINTILLA_INCLUDE_DIRS - qscintilla includes # QSCINTILLA_LIBRARY - where to find the QScintilla library # QSCINTILLA_LIBRARIES - aditional libraries # QSCINTILLA_MAJOR_VERSION - major version # QSCINTILLA_MINOR_VERSION - minor version # QSCINTILLA_PATCH_VERSION - patch version # QSCINTILLA_VERSION_STRING - version (ex. 2.6.2) # QSCINTILLA_ROOT_DIR - root dir (ex. /usr/local) #============================================================================= # Copyright 2010-2013, Julien Schueller # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # The views and conclusions contained in the software and documentation are those # of the authors and should not be interpreted as representing official policies, # either expressed or implied, of the FreeBSD Project. #============================================================================= find_path ( QSCINTILLA_INCLUDE_DIR NAMES qsciscintilla.h HINTS ${QT_INCLUDE_DIR} PATH_SUFFIXES Qsci ) set ( QSCINTILLA_INCLUDE_DIRS ${QSCINTILLA_INCLUDE_DIR} ) # version set ( _VERSION_FILE ${QSCINTILLA_INCLUDE_DIR}/Qsci/qsciglobal.h ) if ( EXISTS ${_VERSION_FILE} ) file ( STRINGS ${_VERSION_FILE} _VERSION_LINE REGEX "define[ ]+QSCINTILLA_VERSION_STR" ) if ( _VERSION_LINE ) string ( REGEX REPLACE ".*define[ ]+QSCINTILLA_VERSION_STR[ ]+\"(.*)\".*" "\\1" QSCINTILLA_VERSION_STRING "${_VERSION_LINE}" ) string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" QSCINTILLA_MAJOR_VERSION "${QSCINTILLA_VERSION_STRING}" ) string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" QSCINTILLA_MINOR_VERSION "${QSCINTILLA_VERSION_STRING}" ) string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" QSCINTILLA_PATCH_VERSION "${QSCINTILLA_VERSION_STRING}" ) endif () endif () # check version set ( _QSCINTILLA_VERSION_MATCH TRUE ) if ( QScintilla_FIND_VERSION AND QSCINTILLA_VERSION_STRING ) if ( QScintilla_FIND_VERSION_EXACT ) if ( NOT QScintilla_FIND_VERSION VERSION_EQUAL QSCINTILLA_VERSION_STRING ) set ( _QSCINTILLA_VERSION_MATCH FALSE ) endif () else () if ( QSCINTILLA_VERSION_STRING VERSION_LESS QScintilla_FIND_VERSION ) set ( _QSCINTILLA_VERSION_MATCH FALSE ) endif () endif () endif () find_library ( QSCINTILLA_LIBRARY NAMES qscintilla qscintilla2 libqscintilla2 HINTS ${QT_LIBRARY_DIR} ) set ( QSCINTILLA_LIBRARIES ${QSCINTILLA_LIBRARY} ) # try to guess root dir from include dir if ( QSCINTILLA_INCLUDE_DIR ) string ( REGEX REPLACE "(.*)/include.*" "\\1" QSCINTILLA_ROOT_DIR ${QSCINTILLA_INCLUDE_DIR} ) # try to guess root dir from library dir elseif ( QSCINTILLA_LIBRARY ) string ( REGEX REPLACE "(.*)/lib[/|32|64].*" "\\1" QSCINTILLA_ROOT_DIR ${QSCINTILLA_LIBRARY} ) endif () # handle the QUIETLY and REQUIRED arguments include ( FindPackageHandleStandardArgs ) if ( CMAKE_VERSION VERSION_LESS 2.8.3 ) find_package_handle_standard_args( QScintilla DEFAULT_MSG QSCINTILLA_LIBRARY QSCINTILLA_INCLUDE_DIR _QSCINTILLA_VERSION_MATCH ) else () find_package_handle_standard_args( QScintilla REQUIRED_VARS QSCINTILLA_LIBRARY QSCINTILLA_INCLUDE_DIR _QSCINTILLA_VERSION_MATCH VERSION_VAR QSCINTILLA_VERSION_STRING ) endif () mark_as_advanced ( QSCINTILLA_LIBRARY QSCINTILLA_LIBRARIES QSCINTILLA_INCLUDE_DIR QSCINTILLA_INCLUDE_DIRS QSCINTILLA_MAJOR_VERSION QSCINTILLA_MINOR_VERSION QSCINTILLA_PATCH_VERSION QSCINTILLA_VERSION_STRING QSCINTILLA_ROOT_DIR ) sqlitebrowser-3.11.2/currentrelease000066400000000000000000000001141345112435200174450ustar00rootroot000000000000003.10.1 https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.10.1 sqlitebrowser-3.11.2/distri/000077500000000000000000000000001345112435200160015ustar00rootroot00000000000000sqlitebrowser-3.11.2/distri/sqlitebrowser.desktop000066400000000000000000000007771345112435200223140ustar00rootroot00000000000000[Desktop Entry] Name=DB Browser for SQLite Comment=DB Browser for SQLite is a light GUI editor for SQLite databases Comment[de]=DB Browser for SQLite ist ein GUI-Editor für SQLite-Datenbanken Comment[fr]=Un éditeur graphique léger pour les bases de données SQLite Exec=sqlitebrowser %f Icon=sqlitebrowser Terminal=false X-MultipleArgs=false Type=Application Categories=Development;Utility;Database; MimeType=application/sqlitebrowser;application/x-sqlitebrowser;application/x-sqlite2;application/x-sqlite3; sqlitebrowser-3.11.2/distri/sqlitebrowser.desktop.appdata.xml000066400000000000000000000045471345112435200245230ustar00rootroot00000000000000 sqlitebrowser.desktop CC0-1.0 MPL-2.0 and GPL-3.0+ DB Browser for SQLite DB Browser for SQLite is a light GUI editor for SQLite databases

DB Browser for SQLite is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite.

It is for users and developers wanting to create databases, search, and edit data. It uses a familiar spreadsheet-like interface, and you don't need to learn complicated SQL commands.

Controls and wizards are available for users to:

  • Create and compact database files
  • Create, define, modify and delete tables
  • Create, define and delete indexes
  • Browse, edit, add and delete records
  • Search records
  • Import and export records as text
  • Import and export tables from/to CSV files
  • Import and export databases from/to SQL dump files
  • Issue SQL queries and inspect the results
  • Examine a log of all SQL commands issued by the application
https://raw.githubusercontent.com/sqlitebrowser/db4s-screenshots/master/v3.3/gnome3_2-execute.png DB Browser for SQLite, executing query https://raw.githubusercontent.com/sqlitebrowser/db4s-screenshots/master/v3.3/gnome3_1-plot.png DB Browser for SQLite, browsing data with plot https://raw.githubusercontent.com/sqlitebrowser/db4s-screenshots/master/v3.3/kde413_2-blob.png DB Browser for SQLite, browsing a blob field https://raw.githubusercontent.com/sqlitebrowser/db4s-screenshots/master/v3.3/kde413_1-create_table.png DB Browser for SQLite, creating a table https://sqlitebrowser.org/ https://github.com/sqlitebrowser/sqlitebrowser/issues
sqlitebrowser-3.11.2/images/000077500000000000000000000000001345112435200157505ustar00rootroot00000000000000sqlitebrowser-3.11.2/images/sqlitebrowser.png000066400000000000000000003435021345112435200213720ustar00rootroot00000000000000PNG  IHDRWtiCCPICC Profile1K@*ڡHEuhSڂJUP[i$E.:~]AA HSq޻?%D;nmvY*f@y{¬V7I2f ޡȫ7]#i)bC/#_H~"NAO͈%CVe)iwV qfyɼe5HS!֢?ӕ2 :A/;X͆z%Q&ρYާ=p btU@IDATx]Umc٥ދbƨXcD[{oآ[4X"*Xҗ{vDqwΜ6gG#x<G`x<G#xO:x<G##>^GG#x<G'~ x<G#xT##x<G#j<G#x<눀O@ox<G#H4+ͳG#x~ze3fL[/ /7cuxUG#x<k/-)Y&>q^<G#l~ O>ހ cl2߅G#x<1zK[0IFg}@G# h$d$uHw⼾ G#x<?!Z$!N2޵SH7ڤz-uMp>"G#x<?[*Qvhƚ`otIu3&w{ 7<G#l$4+Mss4YcK7z=$kM5EG#x~49vhMStC&-L7%)n3u9G#x<0MNp#cl]c:1-nbBX2rMB2?dG#x<;ɒd2U+Iu $ɒd2Nh]=''O:ċOOA5z0Df<~jES%W'=G#liq&JV]=vm]>m#ꨝgi^m֮N2>e뭬;IRGDD|OT2TҮL|EmծKrv<:YK'-TpBDW@pۤmꉧ:|xzQ~EDuͦ){#x<zB 1W_U/:ZK&ڬU$SMKk'ߢoIu19(mK'r&ߥzMG#x~DT年D|jW5T@+%VXR.u4YmjՋjh'Zu<+'wy%j/y"x<G#1 ɬ *bW&ZƤvv%Om-DJ[$nMJtvaƚzB96nWONmE7{pTMmwv<ꨣږUUUĒ'U֪uBIMM|䛵ۧܓ/ɗxԍW(g";'ZOvIOv|V|_cںGE1^cm'N˚fXdzϵ.՟[xhO<d];Y˯tiRg?KOmK?ϭ'u/f.yŢ%phj7aPs*G|I:˯jٲ-}Ѯ(ͶbBT5ۢ%g[y7ٲ&:YkiN%OҥZlK_'J?Ϗs}׿]6OsNvD2Ov,PZ/wu%}Z'ն׼r=Fyn[tsj{a;en'mRИESq(%sym:kqyQ[ɣg8ؖOc_XX A?Im2ӯKr[coõ!xi/sCoQ\\\'[nS4}/'}(qy5~vۥ]D9ȯh٩˟KSEccsOXkM9ҥ\2Gڝ a-=,_uV?5_]ꃵV߮ 8ep];gJZ{ExE}ȧ^զS1ۍ|胶,%-Se"=,YuV|ڱo(C]s˟PO6Gz;!5pۤN$suԚ]K4KMB[᪪m45V-+YGgٹ|{P->BtTtj!RW&ZsSӆҗ}>i#SnܔȞۗboYM|Cie6q yfaM6OtI|B>'׶m'5%kGAAAǗA|ڵ[C_Ж_ 씈M;. aaU^^^GOnQL^}k+iCOII k&t^ulu )_[];F]{@Q,j-ArOzu| ۆ86 7 ۢeǚŐc~'^ŒpMKN h V!MXن`faެ_͙uS+|ܴزo;@ݗf& u])c?]w{4e)״uYYDnє\sS0Q,mꐩ~6>~U*Ӄ(ڎǗ(-GQ:ꫯrʸ.\ӧOO]\mf/ɓ'xmpK/XHK>xwmLKCPSW)nDSW#rّ~.b}"9L}QY:eaP2xݑV`~GoWc[t_ǰ΁A,V 69 ?`軦v Nڣo(u B\ ރwm}uZ̶oVm3mU5}֍|v M]>ݍw h}vL[Z3I_6夵¾4~hCv5jQ|9!G1f{7vs.FEYSG[?UƯqw!s1j@6J翋c:jkS3رc%jCsIekMK㗍:C&_mf;ʓdSW~',V\x?Dڱ/1&^{5xѺdNpnAOaaL}-Q塹$Bzc{th,lk4oC$\K럴σ .m͠ #@C_ ѬY0jDѶdjC hʥ#ڭ郠JGtfa[2Eʅk7i.e* /46$LxGMHgdd<Ҽ)Zn {_pᢦNϸoҤI / 6Ohѿ6kɣc!; ҧ=QdK=$I/I ꐯj6 O+唱V-qXFq|U>>cvBqKQlfx ] j Z'Ϲc<SOݩT᫞us8yb5r l_zZt0ƨqkn[1W V7 SRE%݉佉xzVs0U#o1Ddr~tS20άX+ S䳬/%`'<&}.߄vX. tP&ZFT!⠮Uptۊ6 uVGEY;DeEdX±aը:|N:f>Xhʥؤ)/_isUcm'S"ه>P2\;tM|wƣySxBz9>zذ>:Jo}kwNjX2נ]bE٨5V^r6z_8q-3f7lu&/̼P,Xu^xG[u ÓO蛴|4v}50hĕ\Cڸȋ1>鋖bg4i`hÙ5kV6m߾}@4&Q{uZLt1cF}cOmF'xה7mx (dхˋ}PWvea_. miCved#0Va0y'A۫7x#~iWjEeW?{q9|Ohcc[&em Wxv} C66)~G8s'lb Ͽp< Nq|ĊmY3Vy>ᤓN\g'f}۟zn9ǚb]UYb&%|^qÒ6sSR8?`̘WŴn.7ΚV%`Mk4kSO5nSqPE}˿l)S⳦.zԩY1/:`Զ)zfv1|~7=plxalUpqckvt5>Z`ȵ+ZS/xQyf?? /n1؆f|m1PipkM[ckq} a֓`x-%_}f,җ ;e,oґ̭T\ZlSSA~`tԦm rCijѣ233;ӼįXy(u7|`Я|bEߜtV~ ;m 桋Nh%=O! }]WBBLzpr ;sdϺ{;uט La;եp4NqI1cOa om4u} HQeYֳm5|f D;+=9}u/k(rةG+Ԕ>zu=EGوo뱮 AK{ .>Qm\}8 8nV} `[qk3&L9 #ơqσ~)dZ2ׇ51RE= BM9ugd]:/OvڗfE+aY)8hGZlSOXˎ-|4&4 yMZ1gMEHGj&у>;qm;v2pո1epG&ʒ.1m*V#njv^Uҙ VƦ~xgbr/Tt`ߝn#ڣVry?[D՛ط~]LwEEmris*ǪۡvKmKʐ:@gb肏䇳N=*ӃZRi?Lr0nAӷ$;<񿙵dy)ES0t$s3Xd\UUn8#w> 9xyxqc/wLE?܀3?m7GA-~(Z63g~g c;Ľ뻪-^7zݎ?ܰZ,ƣcū wظל('A>jL|S0P7\gvz(Y7~>@+` ypypy#p6~(w~^oXY]s;BZS"~ee(?ؙv?ޞo~'p.?j;lęaX\|R>Oc2G_.n%18}P5dJRoJ8ވ;~F|7_uvs5z~t\di/ͦx&<0*uzёh`.?L:V3c8O m]/w^ N 1bXq&݌q QlYƉ'O\f+zkc[G&+/]w?2k쿨[Iύ#U___87=QsW <2/ )5XӸE8qQ{#'p3_j7kRXHӏhOPL!ٰ?Quh.Ơ}wY/<˿z\z!ku)=VhSIaup1)ah.ڻ}RƤ n X6~ V2&"(Z5/'ɱvw5$D> 늊",[4%;'{>~W$g6oCjf2s{A }ݓCE@}-Nm`TTi+ũ{o^~mw>]0i%6w{,K GtӲc(|y}ݘ2l3UxQv*w;ا3|q 6g_'|:#ҷ0+~fR.3L1MQtdl1u0lԏarl2jD0 GYw}à>] >-%sf񱮙3g-ُ?*YMgo*[,zᇑ[\'SEE9ixE?`:W˫ۣw Kh `,^Vo0m^ 9w_(? C:f^,!نI+un l@6 ukxA[&[n1x1|fG~wR5u}cn[>f. \13UK:8s1l- s W w=8(r .>,G\qX/ÒW~9_ ؆MI< rSp˷/Vi|-E]Ng do|#zz˝P쇴x\vO:_H5}E1O| @Eh#Z~h<ហ_҇ O~W8!o\-"Պl\,sAsy.wk<&KTY:1>8šbСCL3֏ȧ ijj1SEKtOqqaӇ6:}q4}p^~#ǡ(gߴc)&ʈdB색*CiO?RZiC9a,<)M W}3޴*,m]# otuFf'%hЎ(Voכ?95:&@G}J+Vڕc4ҰŦ>/ }W kL}5̮U]-˛oy[:{LО c.XeZ_-ۃ`N1R@*L5̒<[~;P#aQjTuLÛſcu /DYYL=p=b~O_^2lm2Ҧb\)}kn)ae}s{ۘ:{!?y / 77 ε '}qUG]:R:mN:,CRUMv8Ua¼ &=Ei~;ueHkl3XɌ?})`x[&W& ֦};g[Wl_smqq#vDvE561\p~̙T?~8dԵM-[XZ?zQ+ 0\G'RN?Bۃ/Bz~)㫬]綗**loЈXhY[\sm]0}gwe^~V/9e{>*ƹ"f{+1ߝ;Flwm+g}ndưNI@pr!v+l~ </#RVߔcoS0uu㠮#'A;G_1 氱뿩“Uخ=PN]QNڪU)Fh/}n\zJmh'ӡLr%:\<ڤŗ f`[?D;_w5  u(kj1KG 臱q136̃<)lj|[c&Ц8$T?n걸+a,0І_ԡhUKG|:pWlQL'^@{ ;++Wba!b=p•gSgY<ޙ].N4 (6YYf_fڇ#'b "b&kdv6+_9xq(yK, O[92?,?s:pH-ǧ܇[} g 1~Cza?}o`mW2k9cϢ%y6WYW3^oNox^$3V]Y{)oYbj<7yGt n,6=s1ZL5v7x͞KؗRc̜a?Nm;}k,(X|EH&R{+5 ѯ_@hw .lLe)Tv7u9Ox~ !S6KByxe`_B>KӺ8dw;npFm]Ui82 WbB|NQyvgܾ~GLK/Xwq>H/[vJ0-23QCGd ,= mo'Oœѥԟ#:ݍjm1t7"u?~W8ΝaܓӭEU"|pl9x}iV[Jebo<˯|-+Ƣyy?{)] +Q;_G@b O$TaM5Lѹ&o=3l>YCjl2r(5ѻB8WWƀ-ѝc+7+{}{q\~Ճ8vCX /X.H=>dz5֠˛3G)z_Ͽq.bI v;'^=ەܯ6{n+{U+GA=Ѧk`e#L8olw 6w0hݽ656JvV-޵|tVm-_h6;ZbX^/+ǪlC>@j4Ls_Ân%j9x xp*0W־p/K垳v,8Y"ƻRn{G/{ ]byovǺ^iORaa} k[vڵX:fc%4d0ڥUcʋwGG/+|-p!'?[|aw_/tvN*]&3 E$hY"[spNQ oo<)WeK}P웇a l곐0 zzڃnyX[X愆+ iɨ-|-}WIuYZ5sF[AY@QZ4sOVNI<lc-H)vN(3y&swW%(7eK4Miiu?_3l[X8TїcYCqspK>gcMmt 3~}xGq…9:ק`۾eѵJW5}P3e_}qtGkӖh<ǼsxvpDF yji:+5'Բ66onj'twє`tDGW_򡯽ړlp`0id?TbO8 |o"?8ib$ /1!?Ѡ?ڨӦcԥΰ/&ױcP~xhB2aLK:!Pr 4"9ґ-kOtϘt?3\|u:|g;H삵~ֱ j"w%A)н/[:|[K$0)]j׃p(KVMqlm?\:~LWacNA~]Φ=T> ްm[`iݱtF=i{~L28W1z ;g|+ٻ䌎4=k=WTNգo }IݶM*- RzGl2-\{Q>h ڧasmlGPe~69胱j#CQ?gcX4}!Cb]&Z;y^s0#lhǒA=o/@vкb=3l8}1K:-5Y`jeK+CH2-3;X3~E5e}`LHmkߦs[R^m3t=kIc!KGG3h5oXKwXLtoW/|~PsIXGB=OL<}MVմ@gW6ի`C^*|La%-'ĮWދl "6oLg#"|sN87om?\4c{5 f#wU;n9Xpd{+rڡ-Iy@db‚/oY,۞Z1~ƃnPEFjV7NKkjvf?)c*[{A紊`Mо)]=g*-y+X[{mc=wcUfd#ÞW9#7zbNZa,lcKg24?Z/gJq>Xhσ{:lSdO%8K:ڛQ<]w5Π?aLalH7u+vY(A qPNjʃmEvM%/QM=W6kThð0QIu*m}Z.c5k)N<w.i|b"b$Q "W&N&YĖ G6k|,mi[ȵhCHwx9 _xDž_+Xџ:oE:sSV' bG5mXksib$E9eSxO}=rX? oD,/ 01bDM3̖T}@~N⭛ 2xrME|q ~w>,Eq?bα?[DJߪ=l2{uu;}-_EŝKB2/HB{~%^lܣ ̰gO8-Ϣp XaJ۳%%d}D^F-dOz;0RҬmyY2˹峭i6_F5ރڰ/KX7 O_ɶnv=z`k1= s /1۵{{ơ9MpslߜspF3Vs˖E{k+Uo$Uq e4Ǡ31r5ΚxO1CA`uu1>{Ln 53gbE^U֌ -W>ҽ}W}4[gןqmtv֧[Uu_Iy]]?vf».>UP+~ixl^8X>uW}u?zk[~'{Z"]7: g{ְ#6韱kf+|dx]c%.^nʬݗS]?/d?E.HsxXԟjaD[a.|+P߽1rNXۚOE}Ov0<VHsỺIǭE8W-},nҮl Lz'-MNm«S;-ڭ]VKvH5Ѵ&Ԓ5_|_Z h0EFIkͤh˶&>mkTM]G68#d#?HXi#:,9nb[}5_G;BK{P_m_6f,MZmǦ>蓅mGlvy`yn׮]Iі6Oj.](wVExkw…5ԕqSIsJ9ćs5D%hIkWG9pƻ:b.Xt, ۰7DT_By(7/Cxg}˓j.fw?:Ϳ},]mtwχ8ʾV0k }xpgW]4tkc{roݳksߘ{@c95σ,:'i?ڢ"i>ʺtj7Y&Ő5kɍg- uX+ڭ4-;Hg-Ly:S/g[:JvRz?^xD ƽfŚE $x6W_m.^JeK c>)y0." bbrC<Ҵ~hCۊ~U#'{A;јq1)^_sG9u8gag27N~sh}:kr~/K/‘5cͣOA=!M[2b%?c';أ:~jަ3:fΗػjIğky^$OMpsj.~?CTGd^yޕ&=GhҦؓ<ѬYT^XXIuՅEu"Z/:kǶx.&Тm?l Eœ Of_&ޑ&HǭEj݃|Emԝj&*u2K9*pc|s/G#x<?Ϙ4fa܍Du2mnM> ]ڮZuMPT9\]-8KZ|MVT?eGIq3fLtG#!k0٥\hцEy0+W2y<:޺&uj ,g[duT ?z2:x 3<3x&uxcG#C@F&ٔюhMlԋ_$:lmj"hCy<(_mXm;Q}#x<E nf(\r8(Z/ң\|*tI?^-dqykTu&s у(O,dGIuNq#߃G#i!LQ3A_|,X2Ɏ5mTzWR[(_r׆:N@eɒj,Ax<uAO #"۔LsdQڲIK%OdVL`@'Z:n]Z5kM=)Swl}x<G#ha|2%ZoQZf|֬+KLM>xYKFZouIDC>O>Y0.((f?Ӄd;??pJ'O^cI;= ҳgOL-ZvaF֭ (/z0Λ7 ,A$ f*ԁs9G5%K`b欉V};nmL]~PAvkFґ\5%n}sx%t5Ɠܭi_njR|o>}_*Hּ]ɓ'5sY>y">-ol-򗣰i ٙz)*1y+(rF *DV7$J۶mbŊ۰t\y waedd!++©O>B0 ۾$C9k_-[w.ˍTo>e&]6Ҹ}Xk@]^fzfqy!'9O:nMɒ䮯&+ ÏڰC~Ԗ[ɒ%՝:u |1f޽{PdznݺdXϘ1#@l2~p~Zq>y쁱bױpژ`~-/b ;lYDh&?k$n|Sx gvs Z4Ylyu)`)eI)>=x)v;ri]x'GwrssG?ڇtj(={~{دޥ -f?Hu`Znz₧>ũ;Dze334tK4ex'? KKJ֯i,=E>O_9^YBr|:$IÂŶґ[ThS<5ءU%ghHr&:to>a*0,M~뤱iPZw漉q|kp@2xO){b?p+&#N޳_$k&]+5eAF,ͯ8 r4TΕ4Mɠn2(jZҘ:4}e˂dz+$@:@A5Mya-ԓŇ`K:쀼ϞqLțõGwWze%?I;܍Cz,){.\1m'werfu3}uv>j0>{tӋNG^]y$J'^y0#1~ʵd,N<  ?O=t%FXR,xqc0Y4ߦh書"xcۈz(-8mSipܿ0z𛦍iw}#zk&L+AFZ+TȬT|w%pU˾o Z/f$VVmfiYj?-ˬ~jfh(B ,|2rwΜ9sf> \NdC4cnZ7 Zzի>ғEH:;~ :V6'7G"m26~:"G Z)Nyw1]uf~|l݀wݵ=?)Ϗ̻qGFN'y+ )f47U8}vOਫ਼)~=2;Au7OCnޅm\&[:dnǶHe'-ǒ(-:}!2E`gL2=A#_BzdѯN >[\V2,`鈫wN&YRMJ6#ƞBU"fadk%h^؇(ٗh{{[w~§|Ԍq7?+W4$ 98i+!B-1zxgo?lɻFz 4(Wo`Oqpr'~taQfw+ں(˜wp{xq(FikF,Ma xqE W\Sw///Uzu2O\篆E^[mף˙g'/t&HN܉Yð ~k!b oƦ$JŸ >G竩D̈؏?q}l\/Ց/pz2w^$y0?2~&ê(EFR,$\NFi5CS0,fɍ AnTFngMa3jIck<2ݤ8itt62al(^zc<)ܞU<dމ3Ώ㥗AÔ8tWjBQOʔMJuln3F`֜x[C-P!0``\9Ć:T)I<}J:C?Kk6;""*(`Oy6P ݙq/!!A+ن:Öiw* )˴J\CRUl%z I`OcD*[Tj}x )pnqUz?֮^oIW[g?464x6iYǷoe>KcO8Q Ŀqń?g^| > sGaXx`h1јvSuf2;75Md|7Ǜ @?YzPP+\bU_ܖƌ]8| Q;݃v8x ,K&GZYS%ON$Gل+/l/n.J< (ru7wZ ?[bֶ%]rΕTʯQϯN&SǏoc`|K-.PqT-D]g^b9(,WIdyt4ýMY@iGC'Cdu3j}πrYSRHhЎ,CmP@Dq6? l#MWxotYmII)C_AfVפ_az DOu(oQgۂo,5V,Ң`:TEnG<}~C|:?&ENm4x Qy@`K**Fu )y֠:;Š}W4Pjx*gXfԨA z /ZMkXc4i`I*?ALJhܲǚACع7o M<0)|xxEׇ5c wNQTgN+8UMXv(JDVJ~g%LrSN!D&ˏ%m3B$a='] 3exO' Q'pxɡSQmkF8G\1vuz3ƍA= ,zY)/$l r=. ރC)f(T|YOvC܏HzD۹$6L{a ֿ5u!(bV$e%E"?d>ӗsѿX45QrsF'2@:4 wh^#pu[h֤9]|GKJO9OEV3᜛ @!O+)ZOutm_w35 I wc-|~G4,[jaGq`GH%RⓌ&)jΖ*de$Eb+o ߯r8tx9}<@'0xtZSSE2]ug.;_X[Pdwںz"J bURMd %"4=~HM[!v;a<Л &B Vcǹyz6Zw )6pt(/mhGrdwg:Ik"R~YvkBFCj;uP*TG%Er$%#ZKքf#0p!> o /4C=/vʳr}廉NP4 %SʔgKp5j/%- ,8+ЊkVw?nġWN5A5im%Yр}oĎ Xzm"GMG4iW)0sy+O߃Xwӆ{v;TVRoEī!X3w/& 0 4MYzΗҭQ;|U2"0miSճ//9[ۺ v${*5ElWirpt4rɪ2S\Rofsòd~0ѷ$teт Z♍Vli)EZnUrފٌq_O@M|˷%NE&Mhj}8C hĢFy.t =Cg❐ɤ.@??[$1o[8fDLv 8eKtM򓼧zHJ?&!jdNotenlY`HFƍPQ/T SǺ0/ዟ"CJSw76|k:E=+X4>@>5,,i~x}@ὖnȱ0]gmJy3ovx hF]Q:`(2k]~vu: ɽе廊7^\;^ I{_y8k-m?Mq/~?)Dw ˯22&M(Ɔ=`-Ό˻h2]0A_L1Z$OW>{CXjJy܉ʇ:= E4~Uvm@Kg:uJ[?\bPx+E<>?+(l峰 rCi/?\X*mi9nJ[+N¯c>8|[ו;p+b$M22mKO6}8Nxvz6L\/oaLk86??[hh'ׅk]L~l]l~ޠiP3۰ަ!=r%|R.2m ꤝ5%nh8S} $."L%Bl)XKZjAmԆ_ڑT[3hW>D@ S8w^@\\;ƤSQ]R}imVl_vMGi GOG)|6Z#u~=Twhmeg{:=NֹȠ%v͈ق,HNtʝNg i{@fY YqquT2'/>'o׵Դ=AUY9%ЖCj*JOVnK'_IǦ`C,X4glm+ j\8̴ *음!3,Hi낓2TWƻ!?{0m#eR>jd)9A9{@jR}ЉRLk;n%mfy ް]S^:cYYA[ъl8тV(h+w#G7Xd%Kya.Rg_pL m]$Nu]:z ^8KJd_ݹZmQX6Ʊ2ԮȽK+Duo䓋 aM)@ 퇇WVzϧbRm*eTs H]E|(wϊUR_gVY+ϊ"ߕdQ4K]K|X?g񷨯\" cK,vw\Ns4 Np덑Ì~h٭Ʒ+N^:u]ƶvKER"XAկjR$iiT*M|$VKGԐՑVh>8j${t.{) 'OgЀ>VՒXVcyWM[<3՞Xf=Hqd -M:A'߹><ZKhHYW .)9s.Q /Ym#UE(ՊbjV(ƊT+qJ\;KŏgN^UCWYQg?&&f6e̱uիW ?@@ D 00p> b(ʆwE8ʳa%=M]0+a3;Ny7kfQwnqI2>2p@@ e+=ڮ*(<0ي/_jPT<D@@ Coɓ|ģ@@ TR͍Jy{{KwVA`ҤIb^D@@ # j@@ (cR]ƀ r@F`ܸqbGfQ{@"P%k׮U@@ xT sG:7n )) |**wر:Bg`~^^` r<8::f͚A5"WUB`xˇ!-m<ʡdi`4oPka. ej As'b2Ѻk M}Ul1P89x]l*&.ZGO4k}yA0ȟձ<20SX R='_/B_ryeXleJSo4q4\l$'o;O Rmbˆ* JARIw %!VFq- Jg_gf&ɐf2zt:#iՉaVf*ن9/'F ߪٝؔGxokNҩrd7{S+п8٪ ?Ę9˵쉹߽&v9qV/,]Rh=揁ȺR P xxˑ#s[?ϩa*N -5]ipjO!̨e.lz=l-+p |ٽ%^?K7FX|92WTPlpl=uBތ JI1+RFeuȁ7@IDAT2s5w8jgԴWa3$8>rvGn \M ^KWf? zPۈ?:a%W]_3*\\K=`Iy *6~\RU%$Gw )UWfji<WyBPx^{_P?I,Ųh`#jڅ`؂qvJ<ƙxqq'fU"P!YsSxU<AϦ.ҽR;?;cz93(<*} Ir蕯O`3c<ճC' |=A[5.Y](ܥ"#i/f҅OX]P[ј?e$&c`Jp)sFJ=B&8X73dQZ9\Į:J]Z:*e8l 3#fߊ =;| *+|FA#hyttx% 7ݤ+/Af"|x(&| jA$6ml[Nnn$$ w^)AE˔]uyXY 7G*q Yw$6h+u!tJ\SpIz]â~/dYaTqGe+ٚ_Et2Wt#f~)' aa䮴'0TBz r)J Id ^0u t)}ѱn^wlݮOa2 >_DFblZEX{IbG, =$q<fv~B||MދWo@$@84 7 2ygbGT,vjD6>h.ޥǧY6c}8oEC\2 _vy*g+J<0)`{1<WJH[sqZˠ:7fѧF.E wKXj|Iݲі)By-=VZ :٤^Erj6= ldfU]CmD$y8"e=CCKjh(v IMHpo4ZTl9qh!Џ<ԼG{X:Btr2.⎴'Z[oi!?ZXٞP`Eۓ߾\;xhZu}\cp;(`K[RcT<jODi楒9 v9^9)OӬw)~|z> ON NJwQzS>>9Go)4)+5)N^axbUp-՛-bIO,T9G laI%|_5)=ukgN?JF}q4nu;qIb-OƜµhՕbKFʇ85s_ijuhTA7g>7p 3HNc߻6`)xq0$ZGޚ]Wld49GOIc;YSxRz1wox ܽ{)D}yjzdyz2?gggо*GDmFˡٴ7TMӢjrxQ*Ge]zO!%Τaᘻ.W&)EŗZPnr9nb2񗲣Qq9;؍Yz okSajH}hdݤ@?H)2Fvy/ ̎4U/5 2*275CK ϑsTi)&NE<]ɕF0#mGH3d%pnA |ɚ4iu:T Yc‹Xzʐ#!Tƌ-]ŝ'{Šx4g84FAhD#7Cͽk#`gmcuFa'nHn-0r\ Arhū+( w]79 Cz4:W@oa{7{L}588ܒ֠3a@[N))5MHZ\BKш %G#2+te?R~}0_ƏF?6!Ù:OkQkzNHoRp&I2^4WќK, 2[!\ypKDDMg?m,~C6pՒTQ,ǿ|iVm5} VUotR,wG3 ۃdT*ߋ34 6e&[pJntZ8fK NO˓bcy<֮]ۜ$"lc݁/Ʋ**T!Z+<,#MDߥDal.vփ0tB'kGi}{lG2-RbRNFH g1;.3.%;k}2n& .:^ JLԖ-YISݺ:L k[N"jID+~gؿ )I3M.\M6xL$=FFX? )ol1'V}5bOcܤ.eYR"-aOdp'5Q;F^r|6sc^<'ɰ=Û1"+ck]1ls߲ zƚ\i+Nö?ٹydaYC _qu{D=#I< yN=XFKDx|XRWL;RY_?%/cw0^j?cq!dWїOsFy Q!ꤤPߝ wn 5<oE_(4f/UDE--=.K=wfF\q2V(<Nndm_}Pz^qk>ʖmf|} &($HT˖jâ!g 埦dh LK+RS\oޢHeP~1ZjEGF4"=*R;-ѾDa.y;7p6$=Oƿ肈SrlCRn" F~qd-jNִsȆhNc&IK^[>سmX#?Tvri)y,XGo]N lMhS~uh!9 ̦KoLtk&"FWד XqvFZH߆h-.\_Ms_CÆδb‰9va𻹓-ioRNCח`#8ν܃;ˑgWM”EDo!_io= ܉)=BrN\voN5Ѽ1aM̓h뼁@by< =pi54W,ڻьk3qWб YqQqi o %N`w|wRCV~(ռѠpPV7(6EcZU~mb$Xzהqz#xTV9q$ /MְFdڠ^xAW:0FQ|Ql7_ +*q5 굤~rb~F)b{7m/7g1d_*4TQ?,-sn)7323<")Хya<9>eE]y`TX'a˶s?4h.:(u[* 3֟[`o(mHf§ȾI.= t͠tgOGb匷+3NA` |3:piE$mZR1ƥbV`V>+rpG}탗 U2 J.ѱcB7+I|d4|пUBga4 ]BVDt)(:>)<>m ڻ `Ћ,gZ _9Vo)Q30c+iыb1gK]}YwFh?أ?ê>pB "?"Vo3|BNlHp*۔ЎPEh.2n΍DԦ_7< FKͽ7(S.Y}]k9u SBϏ6\E%s}LJZܳf+ 2]Z"?~[\Ckl:j+tҢª٤ &cX\9,Ж6M-DؐpO>tQ}I[H®:;gЦP퀘UGm 셉Sb0*[Fp"ZJ9twf@ 2CB`mKXޏ@,p\aahjK<֐^ʀcNT0t +}?,sB<'pm-rGZR߯CBB!6#ݽ#X?l6) o|misxUX&xe* S[EʂaAXr2G!zWbòe/b+y:kg*N`Q͋N1+q8v:XQ*R8Xf Mfƞjɑ4HI'̖hr)))/#Vw249g ">GOEtDAtʌ&v,[5W:+,\J鿊HוE/ d|˴S dU IHhoh Ͼ!fY[$Ѣ[^t^}UiWJg.)U 9@ /O8X@rn;iCҫ{ ne׋6F|jJ+tܕkW[/\$Yz}=e%$_3WPKK#i3 ڵۤKET^ǵ1 3't*h7ӱV꯾ F23f뙗/_ա.Pt=i|َtʳĥ8l좃*:~V.<+wy'0/+~U p,\X1⥜2q4)V"W!GB^ZDj EP""+Y-xɴ%EA!eyTT{h4:E63Jƒ_QuӣZT~YpR-QVhڨsVFj >E#@Z*u@/5нJ@l$,D.ՉN̥/E8:Qx![C)KOg'uLCr^mމB?%Ni\ikNfpjhԀNuDQ 嬴KKIQBT_^Go~?-kei6 (Bͅ)Z:fT6T/ RpP&VlD_uZ]GOf|-ߔ[ѫx|tJӖV>dp 4 b&jVADyFʳeUivt]6ՠڅ9qx/q_JsS|f^DZ=|šWqUz>}AGWi<(@RmJUKEc A@(T̙38t7n O◷8dURweAoTW h ޺u ^f͚EA* YG%$v%%%a֭U8 [N·{P+| Bű0˲e*0"gCo߷hҤI5i*u1R]r0^zU9J$J!@r!PIU^Q@@ @C@(ՕID@@ 6R(@@ @C@(ՕID@@ 6RͧN @!Pt*T>#r@@ Pt*T+ +@@ @@(偪)@@ PJujnQY@@ @@(偪)@@ PJujnQY@@ @@(偪)@@ PJujnQY@@ @@(偪)@@ PJujnQY@@ @@(偪)@@ PJujnQY@@ @@(偪)@@ PJujnQY@@ @@(偪)@@ PR8111$D J1T@@ PtСL;zxEJ(yyyꁂ+2drrr@@ PPtP*T[ZZ/A@RUL"͛7qe\~,_q:uz#+L*q䇒V*`UB.)TBPV.zVP.*˒Xԭ[۷GZ++AL]gJ_jZWhe^V5WV`z*}A)JI'4S[xkQ0-Z6ŮSw@M)'aɷ,.h . Wv)m[Z*gYS*aHw]6eppYO]R!j64ҁ<@C?s!7/\䣶-k}B JThcg%[0W <`Mlg[ zJ9?kwl8#Q"@䌌 [JgNEH~Qצ%˫Ů bܳ7aGCCJ& ۭamKIŪ҂WNΕx{Pk*Asrs 䧄Ȫ]!.mΟe_J拹sbΜ9E~1$cbaIҾi੮ нeM\A<@%%2@QM%|n\\>#~#|ZAˏX"PTK@yD.Ǐzxb{cx P}6Ȥ\6vĢ d}"ckI+.)ղ/նcPݹTwBY¦ 48'xL5]pOO( G?NxJ>aČY: 1X}fd6^Aj )$ƭP+(y* RYQw(oTW TzM5hbAeicYEիM 4رctϥdr`g1ظ,j/]my"|oN`?:nCia~_I5jV^򠼻xoN ěo>ŽcfdnG s_qx,ž8Θ<5/}i[W$|/8?cou)"rK[5 ?;CXp%**fȧrr( ~0ːrJ h58\jQa+{d#z??_L] L+ MUhOGu137Ro⌙AVї:̹@Z0]Y^L~幂9/}J+PJWajè.TG{4QɃ%cOajZ {DDD?3XJcd"{4sâUAEJ>_5\hۇd 5cLau `^ቺ1)/I)ft}wZĆ|R IW"ԎV [ԯ ^M#hr\ҹAqH?P) jSYl.n*v}.It;Rtss3px|)eT2|Lɡ0b|+V}8/ߝ0e,hqǏ"öxkxjt8i推t:%BT/XYҚ{VvZ)w-j& J3WE Sufw )|.$h _N($eP%h_ D x3WnǦOk](6%\C7{uNފኰ I0Y FԮD nnN_[c8͉ɠz+MT8Sy%9|: N3Gi&RzmP)WnLH9Km>O)]萦)1a V`&FHl6JhB>Gat싈8yN:&+67# #aoh vD D{y0 qT' fPD Y#3'KdM3lVs˭^WwIm8eٍ%6w+8uE3K:1=(;ZQ.<0yCץ/r:hEʬllR աyGd\,V( aM# h+Ww$VPj[1 ֈz*0N ]3HխLFy1 ʓЀzqx ɧpM͟?ж  99VKc6fWc<ٱ0jX n rssiˈ[S <_x{+~@jwŠԏD:J";}A"I@:ĦMD'fIͣ1s8}ƪo:d]aiG[O\Y ?+UYDmRph|\ݘ׻6`)xq0iNy՜G?Ƿ_SVPڤopFP&93]%![J;Tb40tC†{߶UP?ZTڶ "iv]z ewlJvR4c(hWlaݙd}#yJnY}[ϙm?0Q+cw'.G0)OY%:'~Ty[$E++~(2*(Frg 3~իfhLF]Cu]KءQ E:d{!k[)Ւi$Z& 暦uy JtVڡ6!tϕ4RM I{*jR5 %]ϞN| }qg!2.Qmw݋AEr;hԨR߁ܹ.E ھ]5\Vj/j~O9AR&#_-wk4C~]HNcOI'SMQ+[ro bCEDW:]6sRD'˷?\\Z1 E."=XSCNW _|Y*c#Ob~N:vT2 A4"S]{5x.y6/tG sH゚^xc<Ԋ;xMJ¿޺#{P|]-(]Bjĝ,ha~S{jAH Tkע^'0twi$2qu'5)Y O{ן4hb奢J[tڥ ]j2NE8_w^~SSetA8Mc#El_'j㋚6]r*NjUEȈUqޚ!]4;H֕AA 9]~HT:p4@( ˾vtAn@㶃g Lɇ%N"q\hIٜZ񿟮gkX- ~EE9/_+~(8v  :s2 O|0- O-~+YԼqcڛow.@?aN񟢟$۠ѳ~I4>z&NpY\0~9uSZO.%tb:YIgڊ55{u FBC䠩I!ԿI\^H}eUuhҔ`_~9n@ /]Y~6뎣F&iT+9(pCgqM(%Ss=qG8_U3' '4_gʺq_圄od/z)D109`߿ [r <DL^g8r8'v_ÄB*iמa];k=/qSO܅zMu ? ȁ!{EJd5H#߿g)B,;(pXx Q\`X8שg#<qvSiEFj8ؖAƆ]n "xJ3w\t]t/EOx/^Cھi5ԡnERگY: 8wA:+aGM ,[W_%^Uf~pǰA4Sm(ӝn3!5&ydlOxp]-y+y: ˟ MFb\ixH3IXGCֽ(Boa?fڻ?bh rOs8 x/}x$kxU15@IOaa6M{ !x"oVH[Z덈zI֏c w]淈U4g7MhzUtcO_f1!6RMdc4QnVF6]| 3cߦ{}Jv]Z9$] bn h%iٷr<}Γܱ ۅS'' d,--ň#^hFbtry[ޗ ϝ'-9^lˋ5EIyZĉ`D9N䯝*5)Ż$ 2¸6ړ jhG†0--~`b1t Ap;U%yf;@A gNvQǣtqҞDeOK'ucTF/oF?ץ˥g2y 1VF8}ʍ"R >@IDAT[#ug|?]O2?G%r !NΟn79 O4c@4l;|h "|A **J2Muh1cOma_h:82+{㏸)+kb3U2<=uqdžiB C(Y1], ݼLFqkl=]SV8ՕgltMNJbn1Gr Zxb/ ?=Qԩ=^(͂qERDg-mrsowf ͝D'16Vae0e&$H,LmJf"Eq[&nŸ)-ȓОmR#)WeʣYjqcgo+u4n*o1yEEYqoS]mSɹV9GMl5VM Ɯ(0^ "\|_GZLG>8yÒAݜ\ָ/NbKs=^<=z-~=ܣTazjo‘$"m*9))jK6T\z%N;wC8UU.>)nE7|3?_~֭ż2Ξ=#GHcYC$4jm`G.5j.k ([Ԝ2?)r|?z) ;y$v܉9߿?~XM%Zu>Q:.(x 0&ܘO1&`L 6[3`L 0&بvcrט`L 0&Z-ÙkaL 0&pclTrkL 0&`-C̵0&`L 16X5&`L 0!FupZ`L 0&ܘn\`L 0&@`e8s-L 0&`nLj7V.w 0&`Le ի &`L 0#Жl6aTkb`L 0&rڒ ƖfW\`L 0&`MbL 0&h9lTk 0&`LM Qn1&`L 6[5`L 0&بvSr`L 0&Z-ǚkbL 0&pSlTb[L 0&`-G@rUgM~{v{`L )>hꯣ;Fu3 **R8`L'PQQqw{c.]B.]H{xx@P@Ҿ}{gb[k׮ʕ+rrrxtlT7dL 0&KpΞ= J%7x#:ucGq[@vvv˕'0υc`2aP(//Gmm>}%%%iKjdinL@<":X n `I@x4Nĝ9sA,kipulT[éL 0&`L&6aT<`L 0&PmkFuv9zz4yX)z*v 5}ߑ˫@# %MՍ?go vwe9峴Sb6Aq%'oORܶ-~GnK`L= Qzm^yzSސ&=[r 1r34Ek O1(`׶eHD.0=J/O>o9wd㼺Y2`L 4DžPb݋qRM-ڱ\\OƬ4Ex~@,%AへFYiLh\%ҧgCnBQD_xb]v5r.D|ܵ(2Rhc,#6 Ȝ8G2ki^6s#bǮ:ơXSK=], qZ=ƭ*lAXMKC v,&(/sit֔`u\6>t.r*?0u&LMF8JDjskq`AjЃ3R0<8],سҔH+,ǛO p;;ucXr2(brL&횏s"j#@,z0digӗ1'mDp,Vf槣 @x"?q"L:.$eDt,--Gn>v^lL!vK0?0c枎3N!>GcP~Gˏ#eJ}zXa/l{b+E v:.Aݵkȟ{ ßDzN XRr?P?39MaL +iv z`L`bxܜDJНps Íj/bœC 1dKy~P_K ?rY6"(3OѤ1'g }B2.+nF~Ry\=V`?x##c) +ƘocA?-L|88&T f L<t_k @A) iWaHgo][Ps;BC-.Vm"HyNMF ɸ&C}UGLl=6[L p]=Q-O|;ӀGk=IEZ4QWc_vM[ C; -|{ʩAј<:=DGW#tNe<20(&iih#XC}pE3lTӶҀc'㝔lZW-Bwԭ8W8 A BFն*"y!Kփ4 &/S`*|sOA QJ+7V}5ϐuӇL]60&d<AwWGKTVi"tf*HҍO|u<|?fn QȨ8gƢ/d*:jQnhzDL %^^^|.4%p}X3u%<Ҟ.샅!W4ou:⋿&ǖSMu@{rM_ZOիZz?IF Q#y=qהW{wxOuY>g6b,ғ] K!cPxcҟ O6gFēo)NMjn*>gNN l< jVMewРk9"N)iB*(g5DOK9{}kMh}>"Оw;*M AG ~Kty,Zنdi.# tY2Ϟ= Io:u.;.~p`L 0% kὖnͯ pfǴYfL 0&`nN=.`ś&'tpU>\G&оY9K `}d 0&&?F:ᄏ#p>\J&@'?\ظq#9p/uP5 Bc.`m@0b|lV[ŇF)-秳>ϸ1518/`O@ܿڏ}?uhn6| >Z_5ׁq d}؜;۸o3&&\6Xc&<ՍjA-~5>\Cr+X2 ^3&@k`5Q7ߵR ea]h;a} >Z4W`eUm<ś&Ǻp-5>XE[@['S#`L 0&llT7s4U~0.hۮ(]:g}.DKpsk`&?й=mFQ}0j`ޢ\?Q>l>zX͇ fsBpB, 0&بveie3e6Fꃺ+@{O/tg /]{Rz.ĝ=XZ(p,Jc}4 gL 0M%BL?T ]:A0: |E^{@EXhjqw0>bO}BLZsњmhc`Mݗי~7Ё\xu•+>VK(ʥwFS#wO :v!<'Ƣ|ef<1.Ua'x4n6Xo[!XdL 08'z̾SGQ5myOY}o \Pl~9 rcݤ2+0h9fu!2>rzUE}4J gfL \بv4zLDo߾^10 1#-u W_WuP_8vEfBda}BQmg5agQp lT;@Tkޕ5j:2RN~p:V^݊vˢ,@guS  >g9Y-A`L 0SFiKF?bh{^?zbD)Co!3$ NG8]EL7}X7HItxe.D.ևyV-h aNL 0럀ǵk׬yeM^ox}9N--jibm-n4-1]y۷@|СC f8'|x衇 )Bt*._&!l—_~)ed}gn|YÇo\AC K.LU|S(#!ZY' իWq%`РAm&)--ň#^CX[O#or~Zrؖ'ok?q"E_8m6⎻GU?CG^`}j*b}؅31& ֖jK\2Ha}uu>,&6aTGb}8ZG)ug .Z5L # `-M ۡaL 0&\@[ڄ8[Ȱ[aQH 0&Nj /8)u]Nb`L 0&Ejܽ{qwOX&`L 0!FT1aHaN࣏6bɮ6>ևkZִM%%%m.6񢢋f0&`L )6lHi(Yr1L 0&`!Fusʊ9%meL 0&hبn3&`L 8B`L 0&26۲L 0&`!FC0&`L 0LjԾyY+.zWYbhZbde@Պmઙ`L 0ׯ;"oVNұU ښc""BM5(ؑPxxh0)H]OY n.vlJܘPLMΫ u.LuDN]2uFqٮ%PNL̔(ܛ1zI~*7 ѓ2-!s$/Dn*ݐmnHbMU†>I?XQś8<oEa^D{jQs+`͑Ӹt.Vȝs' i+c|*[xJ'K!qC$"mq$NTbIF#ɲ`LQ$eh207T>H5Y:R'=r̚*ֈEJFbA̧iִxb $ d$MMuJ.Of is)GEPً&C>$C!ETЈPHLo!ʆt*~y>]FPR*[݊SRf_o.̤.Š4YqC1$r6 7Τ.$V:eVkƱRD`+)17B6ggL 0%Fkne,|5h9Fn @y4..فй({UH Eܦ"] X>U#ftWrV&DBjAq1w MsIڳtCB7v'[-~ڵnB<1{nAhb6*NƢTǰ0y$T Fq&rJQWp^k$H1S|nO6#~(z5 KƲW] d%١{w-I-rI]B) 7^|ah;Oo[6y:_N)]1ӦНVzL 0&ڄQ-L_'F# LJ$vGi3^xG< u k;{p(|dƨ !zdE|왭{K51,"%}/R!ݻe)zA4T$?BeQvH0Dmv{zk=f`^?rLnm5 yq,jhe+XOfS.Aj_L-(dr-҉:T?N7`F5lb`V ZvA,-`VhR*&ƅA؜ >-^R%nruV< aw-Sp N7G똒;W/Gk2c3hK[IASYBU5nX @/?Q(3GV XҰݞʙ_?'_ -M}}O EHxJp \K(IO;ԅңB?OЌ?T0Qlm{equZFf r߾Ɲ(]#]%JJ@aV]P^dHhGD<[/?˕1&;' ًq+8WGN~Lm+W޸E/JS'8@]w NڊbyѡuP`Xd8##aY<dGWCzR$Ā؝J[%w){$[-7)X/`i^VI@U#`Oj'H#vp%g90iC^[cdf/oܫ^X8V35kfqX(-ENMJ7ұw g=VzDž`LQ4F鉁5pͭOydh,_ 腻6Xӭ3Ge G 0,fB޺ 4.JEnE!ci,^NӒ@ccy" rA8Sɱ1='e+]rbL5 EԘ1iX +02|sfc؃1v"'ˠ1Chi M/_fD/NǻOj Wƚǩ b0BzhRc'a H^@I SPG ]{l<6t&6n]s Ehx`)!lA0Q)!M"$GR`Y6Yw3z3 n 6fC 6QZM8v}uc)KR׍לda|j1&'[ے0pМ1s4Q;ޜfK{aڧBTtOKnt1juTU錾A`=8Zyۦk-o/lj.MMe^b[c ڷoˁ4~W¡CбcG ndL9@QFF8(;z":c$jɫ\GfyHJEu 5MI*iJ3.VF0~viȣFzSiEא_k,XY* PN˖?h#O,6i]YVFuOPo=D|&uh_zzk5A^/߳&_UYU =Z1Śݰӱ$3Wyœs'~{lH~-gtEA< B?mL"Lg O8O|+'' rxwE=4;׈#^#h^ȫ6]C^9-ybmi&E򚢤b-D0]|r6_S$w! JSO=l,?f L'Rr;g|6M/QLd50\G&@['F &8@ pufZ-0&Z@S-x(L 0&`-G-`m¨h8s&lΒƲP&`L p fR] لw\g`L 0&hkبnk2&`L 8G`L 0&6ۚƹL 0&`'FÑ@&`L 0FjԸyY+tq`L 0&jبv58=5Os4b;4K1 RWaǦd̍ zKvaN#r䔩屵*&r#"LSHYZuaW^5%H8y%;иl8]sע~wmxJTaP]B$`nFj'*TUY 4qLc=-`Vop&ң6"0i˦`M|4b ]K){Q7iK'b W"o'ceZ~C59I؛_U8!ß0zL }4ϣHwp7!px,.ߊ½5;9Z6,2V#q%\:s5ё;yS16~%"OV"ToV-$ҮaH=H[XQn,&p!lT;C"%_ѽ{wx`G#~hVSda9fM~GZΠ) n2xb $ d$MMuJ.Of is)GEPً&yWF QA#Bo# 3y6+ҩAkt/ƖCHH8VCI%>خZl߉>%%m~vl_L"OØeH7C"gpLPAlS[ d%١{w-I-rI]B) 7^|ah;Oo[6y:_N)]1ӦНV:*׷7`LQ -*z!<| #z9P7_e ӣ崙H/i8EIz 2Q{߰l2ШVu>OS3ub̯?iJd/ܽuyK~PX^=cVD27X꫶c@lQ :U_GDOE/T`׎T, C1HkVc% #T@ڦ]'z8Ov6E ltW`%H)&:7WPtnt⨭Oxjִmq`L 0#`_\Gex73h8s^Jrĸ=WGE2L/uZ_J x@x2UPPtSH1%wtg_ЏפefЖ0|=h«j^~!mD%.\%G߅Nts\^ɜۢ:el(#LJ7 r,=sA>wظkDI yC(3֊ӽQj ^dHhGD<[/?˕1ǽy`鞽L^ix^|nd59~1gu-quFu9H'.]&m}yz| ;Y880&[`O* ,1D>!h#G#6/OErvfa0jG z+'~%w mWs7&drt"Z5gH^jQSkzE:{,v Xz=2hu|`gcaPo"\k%q@x }Ĩ/FAe͕EE#o !xe5\,/DҔ|ď}yXr/?CFh-U?5sّdwߡ2=T.^B{i7O!MWQope*SGSã|Zzσ-o(ԧ[o)mg()@$a0%YH(@EHyuoFi(:\܊C07)KҼy"de5c0v᫼bJFyRHcVq<{-'2E|؋U WTdJZ뫜kReT,deZJL!Dz1HvCUE$<b0+JhHN+]*qj5TH^OMBc4WYIS,yݚ b_D I/ #t͙di Ij^!n)FƵdcS,oWBx >Űnth*W {Vr,&SWwMLcy`L ].«Wʕ+Vboi4.E~4xs -n f"+4- Nފ=106'PR3!sRbٺdBM1&"f4TkDL $6Cg4"Q'B!O/qa^Y֗ FcUb̊MD'i'aYhm N|bRmXCͷJ_^k.PlpCq2/-|X߇޲vr͆a L i!!?Y} Qw3z3 ^ݘo 1Fi 7Cfh ֍,I{K1^7~^s(/1}#3- 'C]D)_.fX׆eX/n+[bpM[w3`L Ziڈ D3BeY GQڄЩG/m>6G3&_| IUSGC+ <ċ3NyAYE9igewشw! >tڵU(heH6''>ʕA9R-5~^C6Gry[ޗ" \9Mlˋ5EIyZĉ`8m֓I{슃K, 
vPEeV]2LDj"6Sn>y φL(C&ra03$6v˛:^0j_Ҵ|ȘmZQH}~6'(du|?:ƚƔ7X곕N#1e]o@#_PnL9/`L58s^j[&jgo0AZAfc{釃8Q~'-GxHY,!aL 0&{`z|2jj 3q8@$Bȵz Y."-%s<`L 0&@ `\H/BMOO{F;}jThU#X+gLQL%8cP3ř`L 0&ZkpuL 0&`LQZ^&`L 0!Fۨ;`L 0&Zبn-\/`L 0&`mTaL 0&h-lTy 0&`LmQ60&`L 6[<`L 0&6بvUrG`L 0&ZխEeL 0&plT*#L 0&`E"2&`L 6aT_zb`L 0&rڒ &vA,`L 0&Z@[lkbL 0&pSlTb[L 0&`-Gc51&`L )źuA5x`і+`esߙkضm<<<\1܊6Iڵk0aB컣:FH}b^'pC !3gΠtz:vݻ#007xMH}݇74a#p|7¥F:HaIuؚnW' Ç[n]w݅={z޾SN_8 8ᆵ!svxY E@V,i ّFle#޹JJJЫW/5S9@IDATʹtq#! V ׅ)pӘF_TFӘ`LK+ q<x<cgOuC&8[7t#F sz*&P@uuuQnGxG@cgOuC&uZ,AG5g4!H,>?1܌P]C#'b_g!ㄹ[Ӆ|6QO6UН,Q L 773dj4ÅEd\d\<<`G]ZT}.Tt}z}-ƻ_5 &} P`c?~JmͳRkm;bEv1N[π%aI&3&(Sn5%T?KE|țPV_d%Q7{6^[[>g=j(Wo>87_~%|2YBri^KGe ?7xWBm |W:i:PJFuP@W?X}5FB~X/T6!x͟(&R:ɜ (aPicmZ8L9jx7M2$>73r MiW{"J8kʻ O0"| -x1k96_.]-ȱm]wWpM]YaVNaaP oX7f>{s5z/ OS/ڽ6W_,!Sk{yMGj)}o굷?r[Dk~WQu[J 0`yҖ) ͷac6 54i"~ޔ21-QX}~Xy90 d1?Be‚1,iLt)6:=JI)wԙ,{[jz_;hjv߃3LO> s_.g3у-^O~ JH eoϘ34OdGc.rycH-&m;_GXf`|\˗\hR]UP.9U ~}+FYOӒi#^5Ujwy>OrUո@Ygž,R2ƙYwt{YF́ &>OMxeJq`%3Hٴjmzekt7̔e0u0ŲAM3jz j|UZԦE8Yix芺LCwE+)raP?&onA->WּBgaT.6ui_8pO]s,0Co,K=Ut ޸`a1PW'o(.Q)#:w[lHS6SBݒAg`6aTqB9VȻ[_Gƣ#|pD& NG8]zGNJBܮ A;ak|m="xrX[Zt[E9/h`ic|$.s~)ƍWjUIHH /mRyGle\y2TxoA~A Bg^x\F~E Ӵuy"0/㋵E%-"myM^RX~;6{,*O@FMʱdW>!C" d/`ܷ#ܼN4KDAٮT  &KYѭ-IA vEڙ*\CPU|j 0j&>NIO۰|.+++dffғ&NBAnǏޫ(WY|VYT̈́}`L@@+nY%$eA- 8<;]N JASIǢ8ݝɨjm@nZ4\Z@m۶$Q?#:wf߷ٯ]ils-h.`"\&@-#кukiFt޽5_1Eҥ p*&4x@XTWhfv6nG5K@P-[!&soN<䥺ߧONcL`Q]ED6Uq5%&k`Lrf`L 0&@<`L 0&|0&`L 0*`Q]E 0&`L s 0&`L T*L 0&`LE5L 0&`Lꅨ xnpt&`L T@}`BTŽ 0&`LO;8'&`L 0:JEumX`L 0&#朘`L 0&(uaZL 0&`ǚsbL 0&XTцj1&`L <8,kΉ 0&`L`Q]G`L 0&~p9'&`L 0:JEumX`L 0&#朘`L 0&(uaZL 0&`ǚsbL 0&XTцj1&`L <8,kΉ 0&`L`Q]G`L 0&~p9'&`L 0:Jވ6!W 0&`@}_BT[YY֭[lR1&`LK˃BPg#`L 0&&F#5^j[[[IL߼y-:2&`c=!RЛ _W_b`L 0&0 Ν;^ew l᯿}O- up[XEG}B (*C5'sX+;GYېXWEf]_ Fȱ$l >ɻǶ.u4eڲ`@Vf񕏆 Jd96lx;;;鸸Ȉo6jOO'INSηD&5Ϧä15n! n,Pt4C?þLdD.c@t/?7eL iNTW^sE۶m|wŊ+puB!`gLl1Zg, gL> qy^ww"q=f uVWF6ŽIj)L(Hcg۽-( zm/yކ xrpo-tİܱ3@Ɏ`u@5 b-CسgOIP!&Lyqモ ‰<(=) 0&py#ܦ?wӺ l\(ўokTKC;JݠcݹӰLW||! UMVi`L>Zܽ{wF ƆMyl 0K1(#Y۴ 91yX}O.o-L)_ ō|Lla rnNOʸÇKSgee@(bi޼9 Agl33&P.B.ݜk`t\ܼM7i lዳ@a&q+VQ7X4)+IhD¹VYUɞ2&PwГeT_iibp0/㋵E}._"6۠SGtuAv0( L0}gLh`FCʗחY@> c~O'TȌ򶲢\uIݾ N"fE#N&U,GgL ZBTߦO]^ W^XWˇ`x 5lU~zw>z~Yϋz-[4_1Oꅨ.ϺSNf6hFՙx Q]SGL 0&`5C^jTé2&`L h 3 0&`L T@`L 0&@ "@`L 0&XT9`L 0&HEurt&`L 0&&`L 0&PE*L 0&233+WZB۶mѢE:[Ϛꚠi2J/u%(nRRRvޝu%ڒEu%`qP&PSg]j[|Am-aU'& AU=ZRfk cMg!@EG& P\xZ-;&}.]_J@WԛXTJR$]tzAsI HyDZs^;Gĸ>q4&P  RԜZS{afg:FX]Nġ-Ѳv^j|7b4F|j$fy/6CX6uhI[<_%]+P>.e_:Gg|(55YƵS71_jcpsEԋzK|hРn / 9/E!v ۗgb<ïŃ+rXk.:2q z.]6q/D5`>haVN̚W'm}_AXL{2c‘͘<T%] \X_# 3Tr587JMnZC[(Ѩ5ro/na]|1/Q&{ 5f B&_Xhĺ"Wٶ(->% o߾}_K+ѸGe!t~t;}ĮыRfCW[ݫ{Q;si?%g@ٜ6Cr 4 jdeBT,*@D'(>c[2>@gm/Fͺ\);LK'@ZcfbŬK™Aœg\N맣mwQ'Tm.:/?X yxnx۷ߩq(|$KBr.^8emlusF [- M!ۺu+T*:vrK"Q;D-Dh%Dz{|ޜK;KJ71NW>ѰaOȖr䛜w(/զhIqh9O/ :sRĘM:VOJ/t4c"N݄,]laqH'V/:e'#NPbڸbf4ٌɢsi6e1 &6 u^93+iLWO|4F| pY"/ca {WOqz{Ӳpe%ܖmOX~T1l3 ş$]uŐ: Izc- (Q\ؾeNWҤ)R!E"^Olxrg]@:v9![tl_?IUS}.A=d98KҲvEES>>嗿4;o@g15b.xV!=qN]~kiO`r'O[q.4 V?q.\#XmF)ݦjJd|Le^<(ԏ|Cr=|<P裏*_NnduQ:WǑ%{iXKÐx,< q&7A*g&"lA|aL\gǟ{WT~mQO6 TeQ]3Xsq$|qme:+.Iؑ#y|(p4, I=[o]ۢmg%~>d5xaɹDŽ:[7 Q&EYc! ֒~ $'ks]fځidII[sv8%{_ {83!5 #y~;y_B^NߦSM::uH_i}+쨨4F^-z%)~d'~#gL:ĥX% [u9N*h\nX"XFe '/ IǬ#tLQ4<ô: 0oᇷ)lCZ,B橃?xju?k/JK[-ѝb1qpA&XhoiP5)؈BklfJh-~L <8-[IşDלJRZ6uxeV8q]6ܧt+y=,|tl.UjmO@zuқ)To.2[}@YFtV>N?4V]A?o L*,}ڒP^ߘinWaƪi/&ދv 1b~ hZOsw!%%Ӵ}n;: _mW!-K v[*VDZwFz!l Y?߆Ā=REѣum/DȬ34:y_:o,zP9_IiQst=|O#zp^TTz_%O}2.M ;#4LAVd㟯>lJ>|+ItBfEoft!|PۦQC]Yz de,W'I:/x.^ŒeE댈_F4]܈ꜦY.*F4Zh^~e3FZ?9&I`?cuHJϢIUrZL_u5q zӗiIWaL w+:Ҏi1>T ?/GʰI,+՜ْ| GaH )i.g4qѥ/χBɜhY%Iz}$n_)QOe\'¾N1qcNz0Laza\~_ q`8L=\&ˀҞ;NpђX&{9ھ^`<bM2NH%L~:YNT.ǜ7wAy n-x@]Bw A T9IlϟUeٮe=.iq}I{ p+?6KgbT)pA Ցox ba,Ew͌98B7_w[,qd]vωC\\O>Cof|掅2t\D>+',֮ዛHg/'lfӿ(TF99nAAA={6aff3vL 0/kio-1 zB[bE[m?, ߆ ֽ?zahwKXYJϹ0'BQcLmmc E~bml167"rõիW1E1E_Mְ퇆,hgLhSDaĸ-=Oܱ2q YNqn[ V 71(Fa ˻)%k<6PUrҾn7?lD'%; KLeId.~rlypKKSCacwyq=q?]K rz˖-4i4FdXOļ%g 2H2>c!GjSYEv,vhw>':aڅp'%`DrKw%߽-mc' !l UmT2!u XǴp!oxKXPIzWI+#5~(T~ }&MNX܈FàٲWzE|2|wY.qעKo}v w aėL>3?yrL <\6vz7n*NIaIVg* H=A8eѲT۞DDD7߼KPLjTm焘4OxE\םXT{j7Q®-hfqZc cɂZaU~^K ;˩o CX P=+Ǻb),&r,2ɛnDSukax lym)ڔ`u.}VV7n,o`HWZD}EٙNE8$}P}ɥ:kK,Cp#K ^6+YB^c Ry؏ <Zn}-1~Ea-_R-+t,Mg!@κa+ =J/HU%@$#&C駟䄦MZ˗/ET,M%@ Ou !UV5 T 6mH<ҋʅՒnmLD<= Qov`Qm:+j@}k`-K/HA8L( 8::JbSIwBPQov`ZLFԧκFֲDTYdV: :ڰ\Gw֏V{qi`L cL 0&`L XTWGeL 0&`j>`L 0&@ "@`L 0&XT9`L 0&HEurt&`L 0&&`L 0&PE,3&`L 0|0&`L 0*`Q]E 0&`L s 0&`L T*L 0&`LE5L 0&`LXTW GgL 0&`,`L 0&`U$9:`L 0&`Q`L 0&"Uљ`L 0&M **nOaL 0&0 , ]ggg9#`L 0M ..~0R{a {3&`L 0S 6cL 0&`F6`L 0&XTJ1&`L 0#XTL 0&`LT,M%U'iVkj&9ȫlL=jg`L I=Rzah[F`9߈G 49P p3[o|2kO+t Onaxy c"q;,b!YwÆ(INNZs~GEGeGde5u li$ps 80i2~ĴCmC6{P&,m\wŔڮ?#mۛv|[sl[b⚆ q uVx 0&xRmb(9ێv@9 _/r,'K[SoAa]oJqau%l f7)݈&)KaOnW>sƱ2 60bϐ7%Ŕ};HCAMj,cna.ԠU8 F؆P4^hZ GˇT>N)U,IfM(945lclX{h LVhL[-q 0&5XT R!2tvǛcO?:䟞UwEJrK@W}kҁ&4S POɑ=vChNےB7,6 M[ UjJA=Ta={bOP{9 /|=PxU"$VZDCO|/IUḤT"d\6wo-2CoW6P*z*ꐖ.x쉠CR{HbREA31 ~l[K8ܝCP:C% 0y6v-lHR7Bcz!\Cfhfzmho ¾ ȕ85,BϠ2`L 0ET<8Ja3?"hwC?8 6Y;٣C=9@8= K qnQC4HEHBycxh[vi#ǧcXtyG]otPDYr ֳ ]W@,?vB{@|p'|p rY YmCYs2<+TXlX:avx$Cf! /Q8ZN 0Ép"[mii(KF!c6({8 F~ bfmؖl 91wMK{>|',I~|Pӛ.RϽiu ţK%+pvcBr VBI褽=Lm7[t%5h%F/Wᎁ/2&`jSykȺ| aq8#飏qWz)$x/v,@hTꛀ_ oiHڳ #״ŠDz^aE;?ni8UZ+|8 O[_걱Xd^-HW̄3h'z7S$˴p9qHo2$)NɞvJu ']0/vP- ᯓxi~)_0 -6cF޵WLJw")-zNAy!k|Mr4Tw,{aH gAqkM E Qz;W q;^ Ȫ+ F:~8| 0&v|W{Ry0^2s\K:B59*ObB8(;o`Rk!Xqߥ[ëY |g~~NbGcnC"d &Ingp KPNA xqgZ׃Ҡ8(z]2Z"5 ]fM h[bN`@VG*+$$|.?OMoy­${`LF 4sT\SrzZ~Q/p_kcKC167"rõիWf#GZlMYu!h,-:'+M"HDlM[؛dYO7s<9Yhldf@E z܃άFNf!q$Pv.Q"v6,c1&xлwJԲeeWZnn- [#orX9Xy~&/)X ? ,iC>$gPz`iߢXđRzM!XpF,o Yhߢl4UXrU+=L;[^ Ĝ۬oneL 0&pO,TE)Y&y퐕]286xh=]9h?FEUԑ3_r'fL 0&PCꈴ!:l5PD%W ^d`L 0Fآ#[Gsѧl7aT}F?o749P p/Tm{;'C|oO+t Onax}_9EJvX0 KC.fFu7l4J<`]Uw}8~6w•$`L 0&j[MdjD3 * }j:EMG.oMUStq)ʼn?ձn$MwG\ 4t#SƯ>.=f0G|85QFF&r,&ըFRcIӂo0 7غ/FnؐpmǴ 0&`5OEO df64r yɲG'ӳh^qh@IQ~ Ȑ oM:MgoB=1Ih> ?isl7t1-I/tɒ6 R  GN覒ozf QѴ/:GS*ow RjD[C:$oBwYy9jBd|R=Kg Q>^ ^X*=^7`L 0& DNF|=UA-(VM3)5Y߬OBioY$#8IPMaaFN5vþ™5;|M|Av<~눤GpDJќONDFL]qH 4f'vT6 ix bf.H:ʼȢ]W@D$ř^ǤRzjl64κI(M()O{@Dn7 3Khp(.$ (m)$,Nǚ*g'*@\̍`L 0&PJ9NǜѬ$LV8 !ӕў4Qt$dL s}q~;ڃ$bɂlOgf9GӔl.9|7% 7 /F|D"[5ںV$% h9 t_kԺB̵wFJG\B`?5 M?Ȳ*c7Fudn͛h]G3划 fte=&`L <|l6 4q ^CTdފ(q==X!Goj ;iia: lW6揸=K+ޢb w "RzE" _$N=1ݕ[3M]37CCp5\]|ٜ$;3 gY'R2ޗf#,[hiܕ%[VJZ@?@]`L 0&jյ P8`\bRl[žL 0&A,k.']u,5|W=AN 0&`5@@;f`L 0&@<' W4s"9<2\5͍ףW_.1`L %?p/: }0{46ǫ X9V&Bciɣh#5Qkh5D@qM3O( MlSpP\(&2K+/]YT VmJ|\_s=7^tsyʭfO'鼿c_ W& {мMXp =c0v/RÚW\Ê8֯lv7hc!2CHvE+>(P;W T O}N+}zҤ,n8E\s VȋAvl77; n Gܤc7عWф'iXs֎ⴁ|$dѴ$v9z=GJ; nRģl/^AT9MsYڄ^FtV쯩Zq:QCX +Xj4Ǐ2GHliQme8ҕQّaU& QvpxZi/Z%9&MnIQtsڑI>NSH3~$;./ֶEĴ14$6VAW8]|Z ZSNjJO:, \ kay뮃t70eÈ;S2cR y | xRN]̾L 0:O6qqY-_hgsˆZSxwAn5+:ٰanN/bC =>A SuǴسXedOEO XH3T_ o;RZI<ば߀硕H*O<K5P\xee5\R o~2v^A?`5B1d~ |ƠؖXƹ1`=啃]!Xs`.VXÃjB"+d'hPc8Yܰ&r!:aw;IpҰP:?LnExmW[%d,je(ts;KbbM2MО:\rԠ[;yZiQd=V濨Nb\:;Q  dvJhx0VImq2kUfmwfN#b++4y{K+8d~s^u@D<xouSL!\pCBǧc{t&Y~4So1j^;웒#nO9MάVt(-ȥA(~2f IUuGKF)a7hb#' ¹> aRŒi%e+9-[%̣o ҹ 7$--/9 mYԶQTjY5!sVDNP*Uw8]b|fWR'蘋41T'5[}~G0 {0>tf+EAq!x-Kzz``͗B`L%Զm >+0ӽ!a`Y\D"n_jAhQX 2Ѐ4_ៃV}C Ԣ;^Zr~\ICW{lVݰ)]wX:y 4>\x{?&wLE>ZO:/X6bk z·j$2B包Jƒ?d{k=G5wf)OG';g9T@#q_ţM:) l+5R.~KZ.Ă1Vh:7['E_K(APr^(FKT=es|?%T m 7 rF ڂƓOoTaywjV*y?h,/VI6Hȝ>Dz͢8߼WcbzC`)tdh==a~[pD25;|;Ӥ~ s>(M3A R^[}ѩ\D?4VDJ7򿫓G 6\wo=XGSkK]P{D; UC ,-JߐK<;:m%lOwT5mL:/Aa V /F|D"[5-mlI7 .bK܏4ji -cJUA`L`Qmb%' l88 {i8x{mk;Ol)c'@!U߶U'-nƫ WӺ"'aUx |\sHT3P8YJO!Ŗ͉n~x8>L4#W'1tVIq X |$ -H%aƙA CE2`L({(EݙYk )}^$8K@Q qK)Zn qZڢ X<^?ul 4>r:!q kG|lPXu$.p[+sK~ }0A!`}Mc;r[̦N?YR /^^ )V# xBYS⇘Juc&SQjf.V {LY]п`.AMc=-DP{9O߾zz^Vb0NE 6@)`^ D$aQF*㲏׏޷UUe (FM4Kr1kX:631>>>FɴQ_DS3_)#|BrCsl.Q^k8߳>Xrx(xe ^D- \T'-2_D*s3A6NS@cx!L~Kn݂0:z"i= 1w5ԡ"՝ɘM\Cn!,?},\6-F}PL.z8֮?U=!d1 m.:TYMK(?^o/.3h$-GTMAV#*d5Q!8`,^eğ .=M*9urݔ]91g99IH6wWw<< ֓ۅp=7tοn^C_;L'ޜg;A$L5jCQ7K8E)(Jǿo,Cbz-=j ]H±}]? 1_Uc=#<{ތ}᭸gƅZ> 7}`1F%铘 HhW{( 4vaacc\ɘ;;`1w qX8reХK^';'"##{9`-KoRpFu*A^*?KtK&Ǹfc:?\<\Q+ڸ\6GZRd9QlmTuui*&ҷs;ǺTehw%)vd#֙f3s(%/%4\S9x fҹp {]ӿ%ˮ1U֘%bDDz) P5V)saVlH~Df6YWV-Yzo҆-yTxSۤj!Ag٦'i:  ݻwGU|M?6aV6*VgqXXŠȰe2&Gj݃D<[NnMs95Y׬'g5VYZ]c'HK@ 9|O>oG+Q=oKk}^7L8zq9W7uvѡ放-++Ф7 C9o]ᜳH'qx,L# n\:P-2j{V?OYKSk̰j1I Z9Oh@)mUAwZ]/0g܋O-5Q<_ߎ?ByKy蒼J[=vG9k/l1ZX݊2t6 FE٣3CZ ( }E`߱X)|8(%,խ`w 훲1EjSHM"&u$q^oq]JJqIZޙ??!p3~Ei%gw!b4R[15&aI&z$&ڰvf\o&f)6SX_N ƶV3ƚ律ي[C1u^(_XAG2kK> mfr+>v+V]=h]/n'``kOװ}PVȴ=\09Ť }ʚT"OԶD7#ûyG2&oA e|h%Mjuv>HK-ɇKxVPXGvݨ\]9h)JEg:ay%gвde ۷sn=dEOg9TU%rrV\ +hڴԐo هi򧴢s),39 `RLϋs9r5MMrwWWg⭑󪧮Cj =ˌU mmֱ 1.ra -G¡Xn3`6.EIA݌> vvxyEoPr 'eߡ.zͺbTd#RZ/S\YJyWU)*i3@~Gr=J[ Q g!k=mm53ۣ l*va ]0 QtN7~Œ|ڔ Զ5;"e{?# W#5 nc.ƢG"aWvvV,mkH KOp)° C)@pyy,GXt7:9 '!4='b`Ȥ͓.R=O)q&}< ЧX=_('xq@ʔřGt bbXtoݐ*NK#tų˱/PF#-{%MAkn`mx[^}+R\I{9!_6TC>k,yw zD0SdN~=ug6, 뇿E[dxkC}iCXKح<-Ohpfėp;xjQpL,oV=aGJ}Qs^pMFFbRij/{.{޴舶6{aݱkSЗٞIo|JOPzٟʬLʺJ1 |foo7$cضF^VXDIĎNv24I-'Ӝޟ9.?s3Z2V"zX4G%D~<o?CMG}?ƌFvaꐇo:޷>^+ 7#/׹>)D+_߇W"ͷ!2V|Ls(;x&%n(.hȉn-!$l`ʙ[bu u`{R+ :Ԭْ|F3F)`@~AaWܣЏDr(h" M׀n|[ܲ'nd-yfQzq)2Crt?Fio6ܯ<RΏ~B"JlzmtXg:$ӣ+ulC.9Dk߆<$7C 7tj 4}(n3٨'"qbq() Y7Z`$%3,3N쭝hDln~غp1mehx2 ;&QXl}VQL9%4e:xkxm FMK-Hl3e+]k:$2X;(Ix$}gAwdz؜bһXB;f]5nQamc^`)-KI:ڑBbǐ[ GTv,H_1iь2-gˋB!?Ť>tSd |ymVn Wγg[2&~u|_-i{ɡ2 xr1~]> ]{Cx8SCLRwbퟎ"vL5mC)!CM3.C~ /SfaUcp(+3%+ >[qLuaZ7=UP#}7ƵQp]|w`7?:n4q_J?_е^j$~4l刡>jH u&Oz۰* E OOKU#̿leL7i yA%zɦhK*c Wwtv(rh\m6,x\?3>5rpL6e<۠{#n/Mרѵ=Ifct`@ƶ( 6d\#^O gp9뱚}F`JP2:÷68cY޴XWfW2w!{}W\Npį}trc6ؽr(>a4(4`vJOJ&v&U%h`8(4wk~LN@>K7mEsLIь3pծjXr nя5եYi]&IYL5b{+o\zS0)*3w䢱sEMxҾNJ*%C@jO~tр#z6]E4B@DZwz .JDǴ/m}8+2# '7p,Qw@',$%!*(N4.<}:s]OV)s"53)PJ6XHNp6 3D7֝}GsC; L$[xg;gOVg!,)p (ϑ#5~geFuox@|3a y[S~pt<cفQcל={[؇vZu&;gIFFe#(}ڲ͡F8DY5k *҆`ϿA>/O!jc#g+0TɑGފ]h8SSx22{Ɨ|IMvD˟㘽}chf-kO4 n޾ijvBTEYA&?AC07Wmf3H;moy! ,p 9_)9PMҷ I*ዏ+~5E,׏VqJLk፯> du?s%tna_TADЏQܚxu_zM48v~~uz9󥯶ciR.U"(ʍ(ʛbfpj] 9;M01rȽ p==/I&]U)豃l%G_g`Ϲ)c"tuƩV 1(%)3_\ŕO:O7cM?j@f2X$.~?HɑJ&k\(!o‡􁤉uiCq(_6Ԛy4Ma2Ú咔8ƒN32v{ .w80mImB?b#; bȜV8nߔo2 8$D#Ð8'`gq*}Bvfk鬶.8Ծ!,{*PGʞ-{JӜpB7>~K' 0#uϕ|Vzsq(XK1G5ߣe1\m EЮ;Sd,l5ZlwZ;agcH*8>[N}u˱&@@IDAT<@O +< Z"M?uچ_QZA)[L#O aKP_=sAlؠmfPvl/[R`HDI_c`ϣjt {k?.#0ҷqETp 럧kڃۉ(1h5w̧13CFb䧵@ ͑+E/;|E_ѱ<\RU Qknz ՝%nN@qv u_yϭ, -Nhž1ŴZ?KIvT4?TbT+ c*v܄:l_ZJ閉 hЍ|'MKHNFk導Fwg1W=jY f;֯> *Rs4hp +QE?6oKhܓFG(CD%(U`| Oݏc+=e}WQ,Io*%Un҅Kj6v;OC sՆi x}_۴3gMZaTݤ41]cc|*NiHk@zRyש\CMuVCgzMo*:UJ-yf=/ɓnEVLoDރ<w3^%*ž#pTUDĩ6?WTRSmb/!`&%~Q[rY- @ǚ kWdt,bNKKɦa>o}8N uB Yۚc6Vː P;CEN/A@A@G )BHXA&&   @S]=>u@IA6,S5koӼUE)ΧfW,ovA%mߝ.;@)-x>by:drKv>ǒvג*?@IfO$:٦KydE>]?G/L|ٴE @@ǰrvZؖ?]W\A;׍C/}Ur KvoJ l݆ -rvG1gʇHb"X|>: iG%Dq')OxKXT+gk-JBhXIk-XԥsQ3 j<8tޤ##´m΅wDDb,m͔}SL@j)+}[0~9`>bDRWֽVlPp9ک"_PJ= .hUY[q`I[;D56Gi]) =qGhmmAg_J۫oń cC^b҆|㵿ay*sj[}"C]<#7 YZ!&n }l|U%Zhq?G@.~ .B~?d+-I0a &70GSZMk#57a\Q.]7iߥ }_Z2/<;1>3݋cc`_u<~1 3 F={VyA^<ԇXd Ak1}ha:E3ot98S ɯQfmOW]=YdžGЊ.}b=ǿіVGp̎ }xwLHZ?Zd_잹 NC%I[,%7>ڇ'6&bfUv< wv,CMU&n AFZcwOʼ)!!͐E~?rHW@ڦзmƸ6N4iVɗigvj)/ )\v9ɹv5us1݃/¾˴٭L8HԐeb|mrl?׆ո^=t:cbܭ֡!]a-$ e?hk  NڟҶPu3_t}r;?ow? NSy%ɘD|}j^{\,FE6B(LƯ=/C, Rmf4x8v R}Yyۥh{ X5&-;hVf"nsW`k"sZ$<-`唝(|h36Dxla-KwfigKTs=S[AAMtڄj77ETwa.D:Zޗv`ڗV~Yd,3xNWV]ظew^&jc89Bo .C_s n'?ܭ9vv-o>v]\O;Vhu$D`Io*#z6CMځ}7n,@^iBK ̚2C Z&k1üE+0PF`JF,56a kXؽ}m؅^ۗ!~ˋ'aYXqػ[^vJ<&v+rO{NS ?Aã p<[??==?3>;|p~H@tuê2;1x~ѳ9"r:(*g0 ꀜˍm%9ɒScup1o »X5@WB[<'bΛ3;6%4Z73_FE0 "`IZQo'aHgw f,£e3v#x5|Eq%@#RsS6ҖU=d|,=Day0mh";E(mٓt.†EC΢ e vO=qf{4SUҽhC8|pqۆgCx6p{ŒF~Rhoh'&iD}B4"57li〄 _#؝aw)R3Pzx5R֫?Obt'A ,0lj(CMLwGhS&9 'i/xyVZcqVҋec1 ܧ4 ЧX=_4!jpqm!MtG&Ʊޚ1r(q[i|읖/79Jwxu.q6L#hQJQp'h5cp<6v=;r  0Fn7p1L_rz=,ֆahbkqsS=ԎhS#ЦFzėp;xjQpج"okxug$?G/zLgdd$&.^>_];Ҷhچ;ď(wv:N4}/ mB)mf=E3^2+Skr731X0-TYa]O"vD(8j'B"7M/`=_4F* p!w^yߏ1hU}:!$3e7xhb?|\J{>zWl n*Աt pT6DƊP?Ϥ ٻB– *< |㗈CIip:xˑi02N쭝hDln~غpshx2 hE-BKٝl2 qƖ#Vyo1snܟ+,1aLIc,HVͤr͐t&nnB s8RO#'QQ*V8A*:mĢdz/ͮ5d"a~1ƤM7#xyQ(Bbǐ+ GTvz(ybRpZl/mxB 5~OK/\;Ϟof,KׯnE4=4RPuTMۭ'Vb86@%u'(bga]ӭ4,zhC5eCHܯ`!E`jL4,jZ<e`deg+*WsTWEyRDuRxi$bA*m9kV2!n(b8ήg tÇ߁gc,Ͷ0OI?__jX%F3#&4:#:'mX;=mu./[`<Ӎi%e8yMv.-'~/zVLBMу{Oc$+v%oCMeײF_yf/:tڃAO>L96*GW=pr7N!Ӄ&SLw7pPޝVzau~ֶ&7A}HB,5eØ%g l@:9ޏUy<}Twq۷ޥtKlm5ZLpLItf}^)G;p+RzF|aKyzA^( ;9[ R*)&wʣv8귄nA75ipg[ҥ^J?kK;Ց7qĎ:l%zɦPk<Cg#)8N:K=N9;L=ʂjOOÜ!ޙDL] qú$9 7^ c#M'm B]iڀ׃ ?QTv QseWNƄAOmhc܀Mm\vq MH|{ .nhɸ5m}(בM^Vl~6!Ϡ(ظal裦fC i

^ĩO>Gʔ$8^*MΡ!Z-qá23=)ך,'f1wp9XyӇp+8_?IQ #5nyR"HU`qM}J4uqNºiQU܍3#ޣ=|[fdv9^GՅߢK;Yp<5% cep{q]أj/wrN8FҪ['DٛF4ѶԾz*dLk!ǨB\䒢yǟHG Q]?ٌךbQ3=LMġ5EFgW$Kb끖vcz#QpzV8T$ݴYfwL=FWFF5q^ZUek9׍nj6cV1७BpzX13KCY>S.T<fÅmhQ<ǖQ5Pޱמ0ʟ==/$v v5v":kC)8,]{_5H]i*MsA9G2o ⡫O9m^܎ ޤich}{b ;_fZ3S@;xL޼i4 NWo=>類IqnWԯiӹ GVKN̅p=7pz9M I|mG!p Nf{ ־Ky"'a.aV?@UZRl=C7V$J<oKƞsASh"peFdL}E|GbJ\zrtɎ9_i%:t)sWhN^璽0lcĩM}rtB!m#T׍ e pnel9]n`ĕ8Ӧ#.|4W4 { BY%\yAPڧ9֜T^#!_6_$?Q,#|h2``|;i{?E~f(:Vv}'cх_vzh5OC0j@М3i"{emcML)-x9^!?oQPêS*;kQ!8EsO:oC(L O0?<'&Y –ARl}+Tj|%e jMGjIJS^sS)xpKߪ;FDžo0Pp 럧kڃۉ(1h%߱+38_n}}J6ĸ{[.w 3rCѝC~N|;]#peGK0:֚SMxu=d5WkbX/|/wvˏӷ BP̌uZ~לj5g SaqYlTm8s=SVmMs9]czg;6-ZTEHA@ہ˗9r l~M#է]h?58W7*/c\mtg\镌v TM+c2H129ҾhF?U1WNq@y''s+J&\A@;TM&hq9՝W3VnP ~uٞ,?%W\pIřLmk+}TA9Ѫfziu mc:^ATw,^  :)Ra;L*^Zqƹ|3\NT،s^Nu`wv`@*sWan*8'eLsXՍB  mtDqEʆj,q:&^rVюwnũ$W\aǃrE6O^9lav39 I9㼔LJǜ A@An!"=2;}(]] VUtVf2ߊS1W̉TS:N+;W88'yq=;zXcLϙLy*RypA@A@&dl2t;rG[](g*K+bVU)L.tBP*t*\;1)m8֩N3gRN6dzӫ8s)zRW"$  w cIɘ?SqUez\d*/Fa.T.v$eR;ʕr*;tz8O]laE0+ұ=˔as&]Š[-*:+pA@A@ʯQeq?Qq?1gzeJnƕ^na 3gzؙHde%\+OW+8r;V?>1\sX9ºvZ9ъNJd1w qNädaC)A@A@o,'Sqq·JWW:.ʆ*8H3JL_E^J&+;uƌn^) NzTcTZg(J/\A@IT،L؞})g|+%g\T:F91IU::GR8U+S^ʋ* $Nq%W@ tʗL+n2:8ۨ0s&Gn_A@A@Mؿaҹ\򻘳NaWv*o+a9[cFUZeƕTN ;rG[]:N21f2q:>*=tY;T:Q ~:3-aC)A@A@Hg91u',2SgJr=Wz:98?&G /ڕ8trX*nc&㓠ұ:Qf4qZ1\TX镜mUXq9,$ ;Lfe\Y,;YaV锭SyIŭ1_g2e8SN5rBL6*8ۛhgg^HUIq&Uη:YٲQ?%W(̙tU"A@A@{O,2%WasZtq%c{q%3z”vFS]jèdJ|0*le*fa>1L*TY+,gZqWq֩0s&GnZ*.  w RuP2s,RNWac)]gfs sbR+dҦz:%W\T%^WZϜ v<*N8s&1)>dl_%SvJ\?q.Yª\'WfbXkc[}NA@A—r wWagctwf{cnV6z]NI+׃uXHWrW휆]v'j@4ze9sea3je:鎵s9S:5a*_2gRqǰJ&\A@708dfa%c/JdW?;%SVÜIUL٩tʮV_WT!NrDv^qeIWrF"NwqfNQy;rWYWvA@A@簊\ɫ)=\g,W?,G{K\L8,MTU+ΥQNq 3LV- @C (Kr줷J0bm6=8q,>Q:|JTP;4fk>nlVıs7j#>s'nbltwj] H@$ d -ԡzѰhѦOج[#៵;[{d6ysr9@r3O{>03fOhY}5~b܇>|kMg_X޶nk%  H@"3Xql1o16u/>ytևlϢ}<(Oc\low~lE"sɞ!{#}R۝b?_uU H@$ACfmb#Kݑe&q|lԒˍS=~JCRxV{?R̆y8b0l|  L[OmGˊڬ4=fm>豬䳰ߒ>$  H@7$3>OjZ|5Ѣ3m=gzjj\OMk?mʥ4O=N?\ ^c4h7ZgO. H@$S}||VjX=l=T璫m.?k; كڬ/qƏ=y+VGșѲlª%J@$ ?I;t'N3:cb~SO}!q{g չf>-5I` =#q_\lԺ$  H@w'0g1E;'Ɵ1uK>vΊ5ExPOcy\a}V/@0>{&=iG=I~l%xG$  H@~a8:QLd}SO nԃ~گ}Nw_38-L={dO \|Gg!~hmSm-K$  @/>-~DQ3ñgϧK}bw>G:g y0g%[Ǐ~MxD9XN==SsZg_겢gMg$  H@3Pߢ^ԉl8 }onZlǏ͢%xN}wx}zh'Ʀ3g鳆Z2_:]z=c}Ԣūח$  H@_M`5Mmƹc4=Lր{3tr_ج?ӏ4y7\tƹ*wXC[g ' Ѩ%Y{kٛ% H@~cV>ڴyhӲ;7p̾q9d/\'?cm?MuNZ|[u R$=O״ֻg>sh%  H@w#0ʎCr;ctj͞%BDއ|YR3m +<عosVh?:Xö?\k}+! H@9pw{cuhݛ<ڌ#:l(O:jW>9uMkmۧs{uMrX$  Ѡk{j:O=۽gQ{n#<@Rl,~j:^է&%) H@ռ2O˛F_ZϞֽڧ/-{o~S~n;R.NG>q[yu֞}dtZ H@$ {z9|,Du]i{=W:Z[z635s$  H@,ɪ5IDATx6߆j:Ӗ<6:ЉcY_{ZǏCuz dKf{q+> w?{Z%  H@O"0}j353O<-\V:ZnهxUs=[4}P5] dKXs݋tZ&?kCöu+OѴ$  H=}j[Rm{N?ԟ=P簗 [Mb⩧=خ;i%  H@O%PW׹=v]r{N^rs樂bNWzдTWzg<'OmzO>]V+ H@^Mw+G׵GK]V5:_j_Mun}[ۭ#(7gݽgVM$  :ݫǮt4}yշ9Cv@xv;VclE̞_H@$ ?@`5޺3/}g5=6-C5g=[b[o`rgj짏V$  GQ;\}|}/sz+ 7^Guڕ}t$  H@x69gϚY{{kϯsہ屳֣\ڭ+m=:$  HdڳҺQW9ˇj(> Ύ=;vU$  H@wG=Rh忝ScCu.tr[Hi$  H5ș}jng׃ߜ?:Ts'i!3{x$  H@W z Й=gjr松Peb_0`Ҿ|U$ oO@{Ms; nrw~$  H@ӃawC5ĀWʯ{h%  H@Wką>?bov* H@:'0HPݗسխ!!$  2$ӆ>?~/ j$  H@~zr^(7$$  Hu?7T8s(?C H@~:m(~ˡQ$  H@ ' H@$  image/svg+xml Jakub Steiner http://jimmac.musichall.cz battery apm acpi power management sqlitebrowser-3.11.2/installer/000077500000000000000000000000001345112435200165005ustar00rootroot00000000000000sqlitebrowser-3.11.2/installer/macos/000077500000000000000000000000001345112435200176025ustar00rootroot00000000000000sqlitebrowser-3.11.2/installer/macos/.db4s_secure000066400000000000000000000001741345112435200220070ustar00rootroot00000000000000DEV_ID="Developer ID Application: Your name (AABBCCDDEE)" KEYCHAIN_PASSWORD="yourpassword" UPLOAD_SERVER="user@example.org" sqlitebrowser-3.11.2/installer/macos/build_sqlitebrowser_nightly.sh000077500000000000000000000240611345112435200257660ustar00rootroot00000000000000#!/bin/bash # Builds and uploads DB Browser for SQLite nightlies, # after updating the Homebrew dependencies QTVER="5.12.0" BRANCH="v3.11.x" BREW="/usr/local/bin/brew" BUILD_TYPE="release" DATE=`date "+%Y%m%d"` LOG="$HOME/db4s_nightlies/nightly.log-$DATE" LRELEASE="$HOME/Qt/${QTVER}/clang_64/bin/lrelease" LUPDATE="$HOME/Qt/${QTVER}/clang_64/bin/lupdate" MACDEPLOYQT="$HOME/Qt/${QTVER}/clang_64/bin/macdeployqt" PATH="$PATH:/usr/local/bin:/usr/sbin" QMAKE="$HOME/Qt/${QTVER}/clang_64/bin/qmake" # Add the sensitive values we don't want to store in this script file source ~/.db4s_secure # Update the branch to build, if specified on the command line with "-b [branch name]" if [ "$1" = "-b" ]; then if [ ! -z "$2" ]; then BRANCH="$2" echo "New branch = ${BRANCH}" >>$LOG 2>&1 else # Warn on missing branch name override echo "Missing branch name after the '-b'" exit 1 fi fi # Determine if a Release or Debug build is to be built if [ "$3" = "-t" ]; then if [ ! -z "$4" ]; then BUILD_TYPE="$4" echo "Build type = ${BUILD_TYPE}" >>$LOG 2>&1 else # Warn on missing build type override echo "Missing build type after the '-t'" exit 2 fi fi # Verify the build type is valid if [ "${BUILD_TYPE}" != "debug" -a "${BUILD_TYPE}" != "release" ]; then echo "Unknown build type" exit 3 fi # Ensure Homebrew is owned by my user echo Ensure Homebrew is owned by my user >>$LOG 2>&1 sudo chown -Rh jc:staff /usr/local >>$LOG 2>&1 # Ensure the temporary SQLCipher v3.4.2 tap is in place echo Ensure the temporary SQLCipher v3.4.2 tap is in place >>$LOG 2>&1 brew tap justinclift/sqlcipher3 >>$LOG 2>&1 # Update Homebrew echo Update Homebrew >>$LOG 2>&1 $BREW update >>$LOG 2>&1 ### Build standard version # Remove any existing Homebrew installed packages echo Remove any existing Homebrew installed packages >>$LOG 2>&1 $BREW remove `$BREW list` --force >>$LOG 2>&1 # Install SQLite3 echo Install SQLite3 >>$LOG 2>&1 $BREW install sqlite --with-functions --with-json1 --with-fts --with-fts5 >>$LOG 2>&1 $BREW link sqlite3 --force >>$LOG 2>&1 # Update the sqlitebrowser source echo Update the sqlitebrowser source >>$LOG 2>&1 cd $HOME/git_repos/sqlitebrowser >>$LOG 2>&1 git reset --hard HEAD >>$LOG 2>&1 git clean -dffx >>$LOG 2>&1 git pull >>$LOG 2>&1 git checkout $BRANCH >>$LOG 2>&1 git reset --hard HEAD >>$LOG 2>&1 git clean -dffx >>$LOG 2>&1 git pull >>$LOG 2>&1 # Update the translation files echo Updating the translations >>$LOG 2>&1 $LUPDATE src/src.pro >>$LOG 2>&1 $LRELEASE src/src.pro >>$LOG 2>&1 # Build and package standard sqlitebrowser nightly echo Build and package standard sqlitebrowser nightly >>$LOG 2>&1 if [ "${BUILD_TYPE}" = "debug" ]; then $QMAKE sqlitebrowser.pro -r -spec macx-clang CONFIG+=debug CONFIG+=x86_64 >>$LOG 2>&1 else $QMAKE sqlitebrowser.pro -r -spec macx-clang CONFIG+=x86_64 >>$LOG 2>&1 fi make -j3 >>$LOG 2>&1 make -j3 >>$LOG 2>&1 # Seems to need a 2nd time now, due to language files needing initialisation or something # Include the depencencies in the .app bundle $MACDEPLOYQT src/DB\ Browser\ for\ SQLite.app -verbose=2 >>$LOG 2>&1 # Add the math extensions to the .dmg echo Add the math extensions to the .dmg >>$LOG 2>&1 mkdir src/DB\ Browser\ for\ SQLite.app/Contents/Extensions >>$LOG 2>&1 gcc -I/usr/local/opt/sqlite/include -L/usr/local/opt/sqlite/lib -fno-common -dynamiclib src/extensions/extension-functions.c -o src/DB\ Browser\ for\ SQLite.app/Contents/Extensions/math.dylib >>$LOG 2>&1 # Copy the license files to the .dmg echo Copying the license files to the .dmg >>$LOG 2>&1 cp LICENSE LICENSE-PLUGINS src/DB\ Browser\ for\ SQLite.app/Contents/Resources/ >>$LOG 2>&1 # Copy the translation files to the .dmg mkdir -p src/DB\ Browser\ for\ SQLite.app/Contents/translations >>$LOG 2>&1 for i in ar zh_CN zh_TW cs en fr de it ko pl pt ru es uk; do cp -v $HOME/Qt/${QTVER}/clang_64/translations/qt_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtbase_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtmultimedia_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtquick1_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtscript_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtxmlpatterns_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 done # Unlock the local security keychain, so signing can be done security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${HOME}/Library/Keychains/login.keychain" # Sign the .app codesign --sign "${DEV_ID}" --verbose --deep --keychain "/Library/Keychains/System.keychain" src/DB\ Browser\ for\ SQLite.app >>$LOG 2>&1 # Make a .dmg file from the .app mv src/DB\ Browser\ for\ SQLite.app $HOME/appdmg/ >>$LOG 2>&1 cd $HOME/appdmg >>$LOG 2>&1 $BREW install npm >>$LOG 2>&1 npm -g update >>$LOG 2>&1 npm -g upgrade >>$LOG 2>&1 npm -g uninstall appdmg >>$LOG 2>&1 npm -g install appdmg >>$LOG 2>&1 appdmg --quiet nightly.json DB\ Browser\ for\ SQLite_${DATE}.dmg >>$LOG 2>&1 mv DB\ Browser\ for\ SQLite_${DATE}.dmg $HOME/db4s_nightlies/ >>$LOG 2>&1 $BREW unlink sqlite3 >>$LOG 2>&1 rm -rf $HOME/appdmg/DB\ Browser\ for\ SQLite.app >>$LOG 2>&1 ### Build SQLCipher version # Remove any existing Homebrew installed packages echo Remove any existing Homebrew installed packages >>$LOG 2>&1 $BREW remove `$BREW list` --force >>$LOG 2>&1 # Install sqlcipher echo Install sqlcipher >>$LOG 2>&1 $BREW install sqlcipher3 --with-fts >>$LOG 2>&1 # Clean the sqlitebrowser source echo Clean the sqlitebrowser source >>$LOG 2>&1 cd $HOME/git_repos/sqlitebrowser >>$LOG 2>&1 git reset --hard HEAD >>$LOG 2>&1 git clean -dffx >>$LOG 2>&1 git checkout $BRANCH >>$LOG 2>&1 git reset --hard HEAD >>$LOG 2>&1 git clean -dffx >>$LOG 2>&1 # Update the translation files echo Updating the translations >>$LOG 2>&1 $LUPDATE src/src.pro >>$LOG 2>&1 $LRELEASE src/src.pro >>$LOG 2>&1 # Build and package sqlitebrowser with SQLCipher support echo Build and package sqlitebrowser with SQLCipher support >>$LOG 2>&1 if [ "${BUILD_TYPE}" = "debug" ]; then $QMAKE sqlitebrowser.pro -r -spec macx-clang CONFIG+=debug CONFIG+=x86_64 CONFIG+=sqlcipher >>$LOG 2>&1 else $QMAKE sqlitebrowser.pro -r -spec macx-clang CONFIG+=x86_64 CONFIG+=sqlcipher >>$LOG 2>&1 fi make -j3 >>$LOG 2>&1 make -j3 >>$LOG 2>&1 # Seems to need a 2nd time now, due to language files needing initialisation or something # Include the depencencies in the .app bundle $MACDEPLOYQT src/DB\ Browser\ for\ SQLite.app -verbose=2 >>$LOG 2>&1 # Add the math extensions to the .dmg echo Add the math extensions to the .dmg >>$LOG 2>&1 mkdir src/DB\ Browser\ for\ SQLite.app/Contents/Extensions >>$LOG 2>&1 gcc -I/usr/local/opt/sqlite/include -L/usr/local/opt/sqlite/lib -fno-common -dynamiclib src/extensions/extension-functions.c -o src/DB\ Browser\ for\ SQLite.app/Contents/Extensions/math.dylib >>$LOG 2>&1 # Copy the license files to the .dmg echo Copying the license files to the .dmg >>$LOG 2>&1 cp LICENSE LICENSE-PLUGINS src/DB\ Browser\ for\ SQLite.app/Contents/Resources/ >>$LOG 2>&1 # Copy the translation files to the .dmg mkdir -p src/DB\ Browser\ for\ SQLite.app/Contents/translations >>$LOG 2>&1 for i in ar zh_CN zh_TW cs en fr de it ko pl pt ru es uk; do cp -v $HOME/Qt/${QTVER}/clang_64/translations/qt_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtbase_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtmultimedia_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtquick1_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtscript_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 cp -v $HOME/Qt/${QTVER}/clang_64/translations/qtxmlpatterns_${i}.qm src/DB\ Browser\ for\ SQLite.app/Contents/translations/ >>$LOG 2>&1 done # Unlock the local security keychain, so signing can be done security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${HOME}/Library/Keychains/login.keychain" # Sign the .app codesign --sign "${DEV_ID}" --verbose --deep --keychain "/Library/Keychains/System.keychain" src/DB\ Browser\ for\ SQLite.app >>$LOG 2>&1 # Make a .dmg file from the .app mv src/DB\ Browser\ for\ SQLite.app $HOME/appdmg/ >>$LOG 2>&1 cd $HOME/appdmg >>$LOG 2>&1 $BREW install npm >>$LOG 2>&1 npm -g update >>$LOG 2>&1 npm -g upgrade >>$LOG 2>&1 npm -g uninstall appdmg >>$LOG 2>&1 npm -g install appdmg >>$LOG 2>&1 appdmg --quiet nightly.json DB\ Browser\ for\ SQLite-sqlcipher_${DATE}.dmg >>$LOG 2>&1 mv DB\ Browser\ for\ SQLite-sqlcipher_${DATE}.dmg $HOME/db4s_nightlies/ >>$LOG 2>&1 rm -rf $HOME/appdmg/DB\ Browser\ for\ SQLite.app >>$LOG 2>&1 # If building a non-master branch, remove it now that we're finished if [ "${BRANCH}" != "master" ]; then echo "Removing non-master branch, now we're finihed" >>$LOG 2>&1 cd $HOME/git_repos/sqlitebrowser >>$LOG 2>&1 git reset --hard HEAD >>$LOG 2>&1 git clean -dffx >>$LOG 2>&1 git checkout master >>$LOG 2>&1 git branch -D "${BRANCH}" >>$LOG 2>&1 fi # Upload nightly builds and the build log thus far echo Upload nightly builds >>$LOG 2>&1 rsync -aP $HOME/db4s_nightlies/DB\ Browser\ for\ SQLite*${DATE}.dmg $HOME/db4s_nightlies/nightly.log-${DATE} ${UPLOAD_SERVER}:/nightlies/osx/ >>$LOG 2>&1 # Add the new builds to the "latest" directory ssh ${UPLOAD_SERVER} "cd /nightlies/latest; rm -f *dmg" >>$LOG 2>&1 ssh ${UPLOAD_SERVER} "cd /nightlies/latest; cp /nightlies/osx/DB\ Browser\ for\ SQLite_${DATE}.dmg /nightlies/latest/DB.Browser.for.SQLite.dmg" >>$LOG 2>&1 ssh ${UPLOAD_SERVER} "cd /nightlies/latest; cp /nightlies/osx/DB\ Browser\ for\ SQLite-sqlcipher_${DATE}.dmg /nightlies/latest/DB.Browser.for.SQLite-sqlcipher.dmg" >>$LOG 2>&1 echo Done! >>$LOG 2>&1 sqlitebrowser-3.11.2/installer/windows/000077500000000000000000000000001345112435200201725ustar00rootroot00000000000000sqlitebrowser-3.11.2/installer/windows/background.bmp000066400000000000000000022617521345112435200230300ustar00rootroot00000000000000BMc |8 `c   BGRs|||xxxqqqkkkfff```]]]___aaaeeeiiilllooosssvvvyyy}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLIIIHHHIIILLLOOORRRVVV^^^jjjvvv}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<===CCCKKK]]]vvv}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444555<<>>===<<<;;;999888777666444333333222000///222>>>YYY}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++...:::XXX}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''111TTT}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$555kkk}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######)))VVV}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" &&&WWW}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! ***zzz}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! JJJ}}}}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! 999www|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! 444vvvwww|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! GGGsssyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! pppsssyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! 999ooosssyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! !!!ooosssyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! ooosssyyy||||||wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! ooosssyyy||||||wwwsssooolllkkkiiihhheeeeeecccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! ooosssyyy|||}}}yyytttpppkkkgggccc___\\\[[[XXXWWWVVVUUUTTTQQQPPPOOONNNLLLJJJHHHGGGEEEDDDCCCBBB@@@???>>>===<<<:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! ooosssyyy||||||wwwsssoooiiieeeaaa]]]\\\\\\\\\\\\[[[[[[[[[ZZZXXXXXXWWWWWWUUUTTTQQQOOOLLLIIIFFFCCCBBB@@@>>>;;;:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! ooosssyyy|||}}}vvvooohhhccc```___\\\[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZXXXVVVTTTPPPLLLGGGBBB===:::777444333333111000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! ooosssyyy|||}}}tttkkkddd```]]][[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ZZZWWWTTTNNNGGGBBB<<<666222///------,,,+++***)))((('''&&&%%%$$$######"""!!! ooosssyyy|||}}}rrrgggaaa___\\\[[[[[[[[[[[[[[[\\\\\\]]]___```aaaaaacccdddeeegggggghhhiiikkklllllllllkkkiiihhhggggggeeedddcccaaaaaa```___]]]\\\\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]]]][[[ZZZVVVMMMCCC:::222---***))))))((('''&&&%%%$$$######"""!!! ooosssyyy|||zzzmmmddd___[[[[[[[[[\\\]]]```ccceeehhhlllooosssvvvzzzzzzwwwssspppllliiieeeccc```]]]\\\[[[\\\\\\\\\\\\\\\\\\\\\]]]\\\ZZZTTTIII???555---)))&&&&&&%%%$$$######"""!!! ooosssyyy|||zzzlllaaa]]][[[[[[]]]```ccciiiooottt||||||tttoooiiiddd```]]]\\\[[[\\\\\\\\\\\\\\\]]]\\\XXXQQQCCC333)))%%%$$$######"""!!! ooosssyyy|||rrreee___[[[\\\___eeemmmtttzzz|||tttmmmeee```\\\\\\\\\\\\\\\\\\\\\]]]XXXMMM;;;---%%%"""!!! ooosssyyy||||||kkk```\\\[[[___dddmmmvvvwwwmmmddd___\\\\\\\\\\\\\\\]]]\\\UUUEEE333%%% ooosssyyy|||zzzkkk```[[[\\\aaakkktttvvvlllaaa\\\\\\\\\\\\\\\]]]ZZZJJJ333###ooossswww|||}}}kkk```[[[[[[___hhhtttvvvhhh___\\\\\\\\\\\\]]]ZZZHHH---ooossswwwrrrccc\\\[[[\\\dddppp}}}pppddd]]]\\\\\\\\\]]]VVV;;;###ooosssiii___[[[[[[]]]eeewww}}}|||zzzyyyvvvtttvvvvvvwwwwwwyyyyyyzzz||||||}}}wwwggg]]]\\\\\\\\\\\\HHH&&&ooozzzlll\\\[[[\\\\\\dddvvv|||wwwrrrpppmmmlllkkkhhhgggeeecccaaa___]]][[[ZZZZZZXXXWWWVVVUUUTTTRRRQQQQQQPPPPPPRRRUUUXXX]]]aaaeeekkkpppvvv|||wwwddd\\\\\\\\\]]]NNN)))ooopppaaa[[[\\\\\\]]]mmm|||wwwsssooommmllliiihhhgggeeecccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRPPPOOONNNMMMJJJIIIHHHFFFEEEDDDBBBBBBBBBBBBBBBBBBEEEMMMVVV___iiivvvooo___\\\\\\]]]OOO%%%lllaaa\\\\\\\\\```vvv}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBB@@@???>>>===;;;:::888888999;;;>>>FFFOOOXXXhhhzzzwww```\\\\\\]]]GGGeee\\\\\\[[[```zzz}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888666555444333111111333777CCCTTTgggzzz|||```[[[\\\[[[333VVVQQQQQQTTTrrr}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333111000...------///333@@@QQQeee|||tttTTTQQQRRRDDDvvvEEEBBBBBBUUU}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,***))))))+++333GGGccc}}}VVVBBBCCC@@@###kkk555444555___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))(((&&&%%%(((222LLLoooaaa555444444###lll))))))***___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%######)))>>>cccaaa+++))))))!!! HHH}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$###""" %%%:::eeeJJJ&&&###sss}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" $$$AAAddd%%%DDD<<<$$$iii}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" """)))hhh}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" PPPmmmhhh}}}}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" )))yyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" !!!ssswww|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" ,,,tttsssyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" dddoootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" ///oootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" """}}}oootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy||||||wwwsssooommmkkkiiihhhgggeeecccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||}}}wwwssspppooolllkkkhhhgggdddccc```___]]][[[ZZZXXXWWWUUUTTTRRRPPPOOONNNMMMJJJIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||}}}wwwpppiiiddd___\\\[[[ZZZXXXXXXWWWVVVUUUTTTQQQPPPOOOMMMJJJHHHGGGEEECCCBBB@@@???>>>===;;;:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||yyyrrrlllhhhdddcccaaaaaa```___\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[[[[[[[ZZZWWWVVVTTTQQQOOOLLLIIIFFFBBB???<<<:::777666555444333333111000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||tttlllgggaaa```]]]\\\[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZWWWRRRMMMGGGBBB<<<888555333111000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||zzzrrrhhhaaa___\\\[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\\\\\\\\\]]]]]]]]]]]]___]]]]]]]]]\\\\\\\\\\\\[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]\\\[[[XXXUUUOOOHHHAAA888222...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||ssshhhaaa]]][[[[[[[[[[[[\\\]]]]]]___```ccceeeiiillloooppprrrsssssstttvvvwwwyyyzzz|||||||||zzzyyywwwvvvtttssssssrrrpppooolllhhheeeaaa```___]]]]]]\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]\\\XXXQQQGGG>>>444---***)))((('''&&&%%%$$$######""" {{{oootttyyy||||||oooddd___\\\[[[[[[\\\___aaaggglllppptttyyy||||||wwwtttppplllgggaaa___]]]\\\\\\\\\\\\\\\\\\\\\\\\]]][[[WWWOOODDD999---(((%%%%%%$$$######""" {{{oootttyyy|||rrreee___[[[[[[]]]aaaeeelllrrryyywwwrrrkkkeee```___\\\\\\\\\\\\\\\\\\]]]]]][[[RRRCCC333((($$$######""" {{{oootttyyy|||wwwiii```\\\[[[]]]ccckkkttt}}}|||sssiiiaaa]]]\\\\\\\\\\\\\\\\\\]]]XXXMMM;;;,,,$$$!!! {{{oootttyyy|||tttggg]]][[[]]]aaaiiisss}}}|||rrrhhhaaa]]]\\\\\\\\\\\\]]]\\\UUUDDD///###{{{oootttyyy|||ttteee]]][[[\\\cccooo|||zzzmmmaaa\\\\\\\\\\\\\\\]]]WWWDDD,,, {{{oootttwwwzzzggg]]][[[\\\```iiiwwwvvvhhh___\\\\\\\\\\\\]]]VVV<<<$$${{{ooosss}}}oooaaa\\\[[[\\\dddssspppccc\\\\\\\\\\\\\\\LLL---{{{ooowwwkkk]]][[[\\\\\\dddttt|||wwwtttsssrrrooommmkkkhhhgggdddccc```___]]]]]]\\\[[[[[[[[[[[[[[[[[[[[[\\\]]]aaaeeeiiimmmsssyyysssccc\\\\\\\\\]]]UUU222{{{ooozzzppp]]][[[\\\\\\```rrr|||wwwsssooommmkkkiiihhhgggdddcccaaa```___\\\[[[ZZZXXXVVVUUUTTTRRRPPPOOOMMMLLLJJJIIIGGGFFFFFFFFFFFFFFFFFFHHHMMMPPPVVV```iiitttooo___\\\\\\]]]XXX444{{{ooohhh\\\\\\\\\\\\ggg}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBB@@@???>>><<<;;;:::;;;===@@@GGGPPPZZZeeerrr|||ddd\\\\\\]]]WWW---{{{iii___\\\\\\\\\kkk}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<:::999888666555333333333555;;;HHHXXXlll}}}hhh\\\\\\]]]PPP###yyy___XXXXXXXXXhhh}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333222111000......111777EEEVVVkkk}}}dddXXXXXXZZZ777rrrNNNJJJJJJTTT}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,******---333FFF```|||zzzQQQJJJLLLBBBfff===<<<<<<___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))(((&&&)))111EEEgggWWW<<<===:::"""\\\//////222hhh}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%###'''777WWWzzz]]]000//////###ddd$$$$$$&&&___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$###"""###///RRR|||TTT$$$$$$$$$'''}}}>>>}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######!!! !!!///ZZZ}}}444333"""ttt}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" !!!111gggMMMQQQ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" ***222VVV}}}}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" www}}}}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" $$$tttwww|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" >>>xxxsssyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" yyyooosssyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" :::oootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" $$$oootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy||||||wwwssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||}}}yyysssooolllkkkiiihhheeedddcccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||zzzvvvrrrmmmiiiddd___[[[[[[ZZZWWWVVVUUUTTTRRRPPPOOONNNMMMJJJHHHGGGEEEDDDCCCBBB@@@???>>>===<<<:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy||||||wwwsssmmmiiieeeaaa___]]]\\\\\\\\\\\\\\\[[[[[[[[[ZZZZZZXXXXXXWWWUUURRRPPPNNNJJJHHHEEEBBBAAA???<<<:::999888666555444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||}}}vvvooohhhccc```___\\\[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZXXXVVVTTTOOOIIIDDD???:::777555333222111000///...---,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||wwwoooeee```]]][[[[[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[[[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[ZZZVVVPPPJJJEEE>>>888333///------,,,+++***)))((('''&&&%%%$$$######""" {{{oootttyyy|||wwwlllccc```\\\[[[[[[[[[[[[[[[\\\\\\]]]___```aaadddeeeggghhhiiiiiikkklllmmmoooppppppoooooommmlllkkkiiihhhggggggeeedddaaa```___]]]\\\\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]\\\[[[WWWPPPFFF<<<333...+++))))))((('''&&&%%%$$$######""" {{{oootttyyy|||ssshhhaaa]]][[[[[[[[[]]]___cccgggiiilllpppssswwwzzzzzzvvvssspppllliiieeeaaa___]]]\\\[[[\\\\\\\\\\\\\\\\\\\\\]]][[[VVVNNNCCC888///)))&&&&&&%%%$$$######""" {{{oootttyyy|||sssggg___\\\[[[\\\___aaagggmmmsssyyyyyyssslllgggaaa___]]]\\\\\\\\\\\\\\\\\\]]]]]]ZZZUUUFFF666***%%%$$$######""" {{{oootttyyy|||yyykkkaaa\\\[[[]]]aaaiiirrryyywwwppphhhaaa]]]\\\\\\\\\\\\\\\\\\]]]ZZZPPP>>>...%%%"""!!! {{{oootttyyy|||ttteee]]][[[\\\```hhhrrrzzzzzzpppggg```]]]\\\\\\\\\\\\]]]\\\WWWHHH666&&& {{{oootttyyy|||ssseee]]][[[]]]dddoooyyyyyymmmccc]]]\\\\\\\\\\\\]]][[[NNN555$$${{{oootttwww}}}vvveee]]][[[\\\aaalllzzzyyykkk```\\\\\\\\\\\\]]][[[LLL///{{{ooosssyyylll```[[[[[[___hhhtttssseee]]]\\\\\\\\\]]]WWW>>>###{{{ooottt|||ddd\\\[[[[[[___kkk|||zzzhhh]]]\\\\\\\\\\\\III'''{{{ooo|||eee\\\\\\\\\\\\hhh|||yyyeee\\\\\\\\\]]]OOO))){{{ooommm___\\\\\\\\\```sssppp___\\\\\\]]]OOO%%%{{{lll```\\\\\\\\\ccc|||yyyaaa\\\\\\]]]FFF{{{ddd\\\\\\[[[ccc|||```[[[\\\[[[111uuuTTTPPPPPPUUUwwwsssRRRPPPQQQBBBjjjBBBAAA@@@ZZZTTT@@@AAA>>>!!!]]]333333444eee\\\333333333"""```''''''***dddZZZ(((''''''&&&vvvJJJAAA,,,###tttlllYYYBBB333zzz,,,888}}}www000qqqrrr---mmmggg(((QQQ```LLL|||FFFQQQiii)))XXXQQQ%%%```&&&+++PPPvvvrrrJJJ(((%%%OOO888___}}}ZZZ444NNN;;;%%%EEEkkk}}}gggBBB###<<<>>>%%%999RRRooolllOOO666###???\\\'''(((===VVVrrr}}}oooTTT:::%%%&&&\\\DDD###000>>>OOOaaatttsss___MMM===..."""DDD~~~HHH(((%%%111???JJJUUU```lllwww||||||vvvkkk___TTTIII>>>///###(((IIIppp>>>""" '''...666???FFFIIIMMMPPPTTTWWW[[[___cccgggkkkllliiieeeaaa]]]ZZZWWWRRRPPPMMMIIIEEE>>>555---&&& """===rrreee@@@++++++===fffwwwRRR888$$$%%%444PPPyyy}}}gggSSSCCC555*** !!!***333???PPPfff|||vvviiiaaaZZZRRRKKKCCC<<<666///)))%%%###&&&***000555===CCCIIIPPPWWW___gggxxxsqlitebrowser-3.11.2/installer/windows/banner.bmp000066400000000000000000003375221345112435200221530ustar00rootroot00000000000000BMR|: Ⱦ  BGRsyyyoooggg^^^\\\___```aaahhhzzzyyyoookkkeeebbb^^^YYYUUUQQQNNNIIIFFFCCC???<<<999===SSSpppyyyoookkkeeebbb^^^YYYUUUQQQNNNIIIFFFCCC@@@<<<999555333000---000:::bbbyyyoookkkeeebbb^^^YYYUUUQQQNNNIIIFFFCCC@@@<<<999555333000---***(((%%%###PPPyyyoookkkeeebbb^^^YYYUUUQQQNNNIIIFFFCCC@@@<<<999555333000---***(((%%%###!!!###{{{yyyoookkkeeebbb^^^YYYUUUQQQNNNIIIFFFCCC@@@<<<999555333000---***(((%%%###!!!yyy}}}xxxooojjjeeeaaa^^^YYYUUUQQQMMMIIIFFFCCC@@@<<<999555333000---***(((%%%###!!!444xxx}}}uuupppjjjccc^^^XXXUUUPPPMMMIIIEEEBBB>>>;;;888555333000---***(((%%%###!!!---xxx}}}ppphhhbbb\\\[[[[[[ZZZXXXVVVSSSNNNIIIAAA999444111///---***(((%%%###!!!---xxx}}}yyyiii___\\\^^^aaadddfffgggiiiiiigggeeedddcccaaa``````___\\\VVVNNN???333,,,((($$$###!!!---xxx|||uuunnnmmmpppwww~~~}}}wwwrrrkkkdddZZZQQQDDD444###---xxx|||hhhkkk{{{uuuaaaXXXSSS444---wwwzzz^^^kkk|||}}}}}}}}}}}}|||fff^^^EEE ---uuuaaafffyyynnniiiddd___ZZZVVVRRRNNNKKKGGGGGGHHHJJJNNNUUU^^^ffftttzzzdddJJJ---\\\VVVzzzoookkkeeebbb]]]XXXTTTPPPNNNIIIEEEBBB???<<<888555333333555AAA^^^yyyRRR???888MMMzzzoookkkeeebbb]]]XXXTTTPPPNNNJJJEEECCC@@@<<<999555333000---***$$$$$$GGGyyy444999<<<222zzzoookkkeeebbb]]]XXXTTTPPPNNNJJJEEECCC@@@<<<999555333000---***(((%%% !!!;;;___pppzzzoookkkeeebbb]]]XXXTTTPPPNNNJJJEEECCC@@@<<<999555333000---***(((%%%### |||zzzoookkkeeebbb]]]XXXTTTPPPNNNJJJEEECCC@@@<<<999555333000---***(((%%%### bbbyyy}}}wwwmmmiiieeeaaa]]]XXXTTTPPPMMMIIIEEECCC@@@<<<999555333000---***(((%%%### ///xxx|||{{{rrrggg^^^YYYUUURRRNNNIIIEEEAAA>>>;;;888555333000---***(((%%%### ...xxx|||tttiiibbb______^^^^^^^^^]]]^^^]]]ZZZWWWSSSMMMCCC;;;666222---***'''%%%### ...xxx|||zzznnniiiiiijjjnnnssswwwzzz{{{|||}}}||||||zzzyyywwwtttpppmmmiiiddd]]]WWWOOOFFF<<<...###""" ...xxx|||zzzfffjjjwww~~~pppbbbYYYWWWJJJ---...xxxfffcccyyypppbbb___III%%%...xxxxxxbbbjjj~~~wwwrrrnnnjjjeeecccaaa___]]]]]]```cccfffkkksss~~~yyyfffTTT+++---mmm\\\xxxyyyooojjjeeeaaa\\\XXXTTTPPPMMMIIIEEEBBB???<<<<<<:::;;;DDD]]]{{{kkkYYY222JJJUUUzzzoookkkeeebbb]]]XXXTTTPPPNNNJJJEEECCC???<<<999666333///***&&&///VVV}}}FFF???--->>>zzzoookkkeeebbb]]]XXXTTTPPPNNNJJJEEECCC@@@<<<999555333000---***'''!!!$$$DDDccc&&&<<>>;;;666333///---***(((%%%### ...xxx|||sssjjjdddbbbdddfffhhhjjjlllllljjjiiiiiifffbbb```]]]XXXTTTOOOIII@@@555***%%%$$$### ...xxx|||ttteeejjjrrr{{{wwwmmmbbbZZZXXXUUUEEE***!!! ...xxx~~~rrrbbblll~~~yyyiii```^^^JJJ***...xxxffflll{{{xxxiiiZZZ???...uuu```fffzzz^^^FFF,,,___ZZZwwwWWW;;;888QQQ666:::111'''fff[[[888nnn'''&&&!!!PPPuuuggg===MMMlll---ZZZqqqGGG!!!$$$|||///"""EEE]]]ttt|||kkkSSS777 BBBhhh@@@ )))111:::>>>AAADDDHHHFFFCCC@@@===777...%%%,,,MMMyyyxxxWWW<<<111'''###***333DDDcccsqlitebrowser-3.11.2/installer/windows/build.cmd000066400000000000000000000020501345112435200217530ustar00rootroot00000000000000@echo off :: Output file name set MSI=DB.Browser.for.SQLite-%1 :: Set the ARCH based on the first parameter if "%1"=="" ( echo ERROR: You must select a build type, either "win64" or "win32" goto :eof ) else if "%1"=="win32" ( set ARCH=x86 ) else if "%1"=="win64" ( set ARCH=x64 ) else ( echo ERROR: Unknown build type="%1" goto :eof ) :: Suppress some ICE checks :: - 61 (major upgrade) :: - 03 & 82 (merge module) :: - 38 & 43 & 57 (non-advertised shortcuts) set ICE=-sice:ICE03 -sice:ICE82 -sice:ICE61 -sice:ICE38 -sice:ICE43 -sice:ICE57 :: Suppress 'light.exe' warning :: - 1104 (vcredist merge module installer version) set LIGHT=-sw1104 :: Compile & Link "%WIX%\bin\candle.exe" -nologo -pedantic -arch %ARCH% product.wxs translations.wxs ui.wxs "%WIX%\bin\light.exe" -sval -nologo -pedantic %LIGHT% %ICE% -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc strings.wxl product.wixobj translations.wixobj ui.wixobj -out %MSI%.msi :: Cleanup del product.wixobj del translations.wixobj del ui.wixobj del %MSI%.wixpdb sqlitebrowser-3.11.2/installer/windows/license.rtf000066400000000000000000001550511345112435200223400ustar00rootroot00000000000000{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}} {\colortbl ;\red0\green0\blue255;} {\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs20 DB Browser for SQLite is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later.\par You can modify or redistribute it under the conditions of these licenses.\par \pard\sa200\sl276\slmult1\qc ----------------------------------------------------------------------------------------------------\par \b\fs22 GNU GENERAL PUBLIC LICENSE\par \b0\fs20 Version 3, 29 June 2007\par \pard\sa200\sl276\slmult1\par Copyright (C) 2007 Free Software Foundation, Inc. <{\field{\*\fldinst{HYPERLINK "http://fsf.org/"}}{\fldrslt{\ul\cf1 http://fsf.org/}}}\f0\fs20 >\par Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.\par \par \pard\sa200\sl276\slmult1\qc\b Preamble\b0\par \pard\fi142\sa200\sl276\slmult1\qj The GNU General Public License is a free, copyleft license for software and other kinds of works.\par The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.\par When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.\par To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.\par For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\par Developers that use the GNU GPL protect your rights with two steps:\par \pard\sa200\sl276\slmult1\qj (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.\par \pard\fi142\sa200\sl276\slmult1\qj For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.\par Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.\par Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.\par The precise terms and conditions for copying, distribution and modification follow.\par \pard\sa200\sl276\slmult1\par \pard\sa200\sl276\slmult1\qc\b TERMS AND CONDITIONS\b0\par \pard\sa200\sl276\slmult1 0. Definitions.\par \pard\fi142\sa200\sl276\slmult1 "This License" refers to version 3 of the GNU General Public License.\par \pard\fi142\sa200\sl276\slmult1\qj "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.\par "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.\par To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.\par A "covered work" means either the unmodified Program or a work based on the Program.\par To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.\par To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.\par An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.\par \pard\sa200\sl276\slmult1 1. Source Code.\par \pard\fi142\sa200\sl276\slmult1\qj The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.\par A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.\par The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.\par The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.\par The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.\par \pard\fi142\sa200\sl276\slmult1 The Corresponding Source for a work in source code form is that same work.\par \pard\sa200\sl276\slmult1 2. Basic Permissions.\par \pard\fi142\sa200\sl276\slmult1\qj All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.\par You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.\par Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.\par \pard\sa200\sl276\slmult1 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\par \pard\fi142\sa200\sl276\slmult1\qj No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.\par When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.\par \pard\sa200\sl276\slmult1 4. Conveying Verbatim Copies.\par \pard\fi142\sa200\sl276\slmult1\qj You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.\par You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.\par \pard\sa200\sl276\slmult1 5. Conveying Modified Source Versions.\par \pard\fi142\sa200\sl276\slmult1\qj You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:\par \pard\li284\sa200\sl276\slmult1\qj a) The work must carry prominent notices stating that you modified it, and giving a relevant date.\par b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".\par c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.\par d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.\par \pard\fi142\sa200\sl276\slmult1\qj A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.\par \pard\sa200\sl276\slmult1 6. Conveying Non-Source Forms.\par \pard\fi142\sa200\sl276\slmult1\qj You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:\par \pard\li284\sa200\sl276\slmult1\qj a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.\par b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.\par c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.\par d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.\par e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.\par \pard\fi142\sa200\sl276\slmult1\qj A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.\par A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.\par "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.\par If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).\par The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.\par Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.\par \pard\sa200\sl276\slmult1 7. Additional Terms.\par \pard\fi142\sa200\sl276\slmult1\qj "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.\par When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.\par Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:\par \pard\li284\sa200\sl276\slmult1\qj a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or\par b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or\par c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or\par d) Limiting the use for publicity purposes of names of licensors or authors of the material; or\par e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or\par f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.\par \pard\fi142\sa200\sl276\slmult1\qj All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.\par If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.\par Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.\par \pard\sa200\sl276\slmult1 8. Termination.\par \pard\fi142\sa200\sl276\slmult1\qj You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).\par However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.\par Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.\par Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.\par \pard\sa200\sl276\slmult1 9. Acceptance Not Required for Having Copies.\par \pard\fi142\sa200\sl276\slmult1\qj You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.\par \pard\sa200\sl276\slmult1 10. Automatic Licensing of Downstream Recipients.\par \pard\fi142\sa200\sl276\slmult1\qj Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.\par An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.\par You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.\par \pard\sa200\sl276\slmult1 11. Patents.\par \pard\fi142\sa200\sl276\slmult1\qj A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".\par A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.\par Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.\par In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.\par If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.\par If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.\par A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.\par Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.\par \pard\sa200\sl276\slmult1 12. No Surrender of Others' Freedom.\par \pard\fi142\sa200\sl276\slmult1\qj If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.\par \pard\sa200\sl276\slmult1 13. Use with the GNU Affero General Public License.\par \pard\fi142\sa200\sl276\slmult1\qj Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.\par \pard\sa200\sl276\slmult1 14. Revised Versions of this License.\par \pard\fi142\sa200\sl276\slmult1\qj The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.\par Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.\par If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.\par Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.\par \pard\sa200\sl276\slmult1 15. Disclaimer of Warranty.\par \pard\fi142\sa200\sl276\slmult1\qj THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par \pard\sa200\sl276\slmult1 16. Limitation of Liability.\par \pard\fi142\sa200\sl276\slmult1\qj IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\par \pard\sa200\sl276\slmult1 17. Interpretation of Sections 15 and 16.\par \pard\fi142\sa200\sl276\slmult1\qj If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.\par \pard\sa200\sl276\slmult1\qc\b END OF TERMS AND CONDITIONS\b0\par \pard\sa200\sl276\slmult1\par \pard\sa200\sl276\slmult1\qc\b How to Apply These Terms to Your New Programs\par \pard\fi142\sa200\sl276\slmult1\qj\b0 If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.\par To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.\par \pard\sa200\sl276\slmult1 \par \pard\li284\sa200\sl276\slmult1\qj Copyright (C) \par 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 3 of the License, or (at your option) any later version.\par This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\par You should have received a copy of the GNU General Public License along with this program. If not, see <{\field{\*\fldinst{HYPERLINK "http://www.gnu.org/licenses/"}}{\fldrslt{\ul\cf1 http://www.gnu.org/licenses/}}}\f0\fs20 >.\par \pard\sa200\sl276\slmult1 Also add information on how to contact you by electronic and paper mail.\par \pard\fi142\sa200\sl276\slmult1\qj If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:\par \pard\li284\sa200\sl276\slmult1\qj Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.\par \pard\sa200\sl276\slmult1\qj The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box".\par \pard\fi142\sa200\sl276\slmult1\qj You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <{\field{\*\fldinst{HYPERLINK "http://www.gnu.org/licenses/"}}{\fldrslt{\ul\cf1 http://www.gnu.org/licenses/}}}\f0\fs20 >.\par The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <{\field{\*\fldinst{HYPERLINK "http://www.gnu.org/philosophy/why-not-lgpl.html"}}{\fldrslt{\ul\cf1 http://www.gnu.org/philosophy/why-not-lgpl.html}}}\f0\fs20 >.\par \pard\sa200\sl276\slmult1\par \pard\sa200\sl276\slmult1\qc ----------------------------------------------------------------------------------------------------\par \pard\sa200\sl276\slmult1\par \pard\sa200\sl276\slmult1\qc\b\fs22 Mozilla Public License Version 2.0\par \pard\sa200\sl276\slmult1\b0\fs20\par \fs22 1. Definitions\fs20\par 1.1. "Contributor"\par \pard\fi-10\li426\sa200\sl276\slmult1\qj means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.\par \pard\sa200\sl276\slmult1 1.2. "Contributor Version"\par \pard\li426\sa200\sl276\slmult1\qj means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution.\par \pard\sa200\sl276\slmult1 1.3. "Contribution"\par \pard\li426\sa200\sl276\slmult1\qj means Covered Software of a particular Contributor.\par \pard\sa200\sl276\slmult1 1.4. "Covered Software"\par \pard\li426\sa200\sl276\slmult1\qj means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.\par \pard\sa200\sl276\slmult1 1.5. "Incompatible With Secondary Licenses"\par \pard\li426\sa200\sl276\slmult1\qj means\par (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or\par (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.\par \pard\sa200\sl276\slmult1 1.6. "Executable Form"\par \pard\li426\sa200\sl276\slmult1\qj means any form of the work other than Source Code Form.\par \pard\sa200\sl276\slmult1 1.7. "Larger Work"\par \pard\li426\sa200\sl276\slmult1\qj means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.\par \pard\sa200\sl276\slmult1 1.8. "License"\par \pard\li426\sa200\sl276\slmult1\qj means this document.\par \pard\sa200\sl276\slmult1 1.9. "Licensable"\par \pard\li426\sa200\sl276\slmult1\qj means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.\par \pard\sa200\sl276\slmult1 1.10. "Modifications"\par \pard\li426\sa200\sl276\slmult1\qj means any of the following:\par (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or\par (b) any new file in Source Code Form that contains any Covered Software.\par \pard\sa200\sl276\slmult1 1.11. "Patent Claims" of a Contributor\par \pard\li426\sa200\sl276\slmult1\qj means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.\par \pard\sa200\sl276\slmult1 1.12. "Secondary License"\par \pard\li426\sa200\sl276\slmult1\qj means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.\par \pard\sa200\sl276\slmult1 1.13. "Source Code Form"\par \pard\li426\sa200\sl276\slmult1\qj means the form of the work preferred for making modifications.\par \pard\sa200\sl276\slmult1 1.14. "You" (or "Your")\par \pard\li426\sa200\sl276\slmult1\qj means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.\par \pard\sa200\sl276\slmult1\fs22 2. License Grants and Conditions\fs20\par 2.1. Grants\par Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:\par \pard\li426\sa200\sl276\slmult1\qj (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and\par (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.\par \pard\sa200\sl276\slmult1 2.2. Effective Date\par \pard\sa200\sl276\slmult1\qj The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.\par \pard\sa200\sl276\slmult1 2.3. Limitations on Grant Scope\par \pard\sa200\sl276\slmult1\qj The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:\par \pard\li426\sa200\sl276\slmult1 (a) for any code that a Contributor has removed from Covered Software; or\par (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or\par (c) under Patent Claims infringed by Covered Software in the absence of its Contributions.\par \pard\sa200\sl276\slmult1\qj This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).\par \pard\sa200\sl276\slmult1 2.4. Subsequent Licenses\par \pard\sa200\sl276\slmult1\qj No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).\par \pard\sa200\sl276\slmult1 2.5. Representation\par \pard\sa200\sl276\slmult1\qj Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.\par \pard\sa200\sl276\slmult1 2.6. Fair Use\par \pard\sa200\sl276\slmult1\qj This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.\par \pard\sa200\sl276\slmult1 2.7. Conditions\par Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.\par \fs22 3. Responsibilities\par \fs20 3.1. Distribution of Source Form\par \pard\sa200\sl276\slmult1\qj All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form.\par \pard\sa200\sl276\slmult1 3.2. Distribution of Executable Form\par If You distribute Covered Software in Executable Form then:\par \pard\li426\sa200\sl276\slmult1\qj (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and\par (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License.\par \pard\sa200\sl276\slmult1 3.3. Distribution of a Larger Work\par \pard\sa200\sl276\slmult1\qj You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).\par \pard\sa200\sl276\slmult1 3.4. Notices\par \pard\sa200\sl276\slmult1\qj You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.\par \pard\sa200\sl276\slmult1 3.5. Application of Additional Terms\par \pard\sa200\sl276\slmult1\qj You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.\par \pard\sa200\sl276\slmult1\fs22 4. Inability to Comply Due to Statute or Regulation\par \pard\sa200\sl276\slmult1\qj\fs20 If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.\par \pard\sa200\sl276\slmult1\fs22 5. Termination\fs20\par \pard\sa200\sl276\slmult1\qj 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.\par 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.\par 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.\par \pard\sa200\sl276\slmult1\fs22 6. Disclaimer of Warranty\fs20\par \pard\sa200\sl276\slmult1\qj Covered Software is provided under this License on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.\par \pard\sa200\sl276\slmult1\fs22 7. Limitation of Liability\fs20\par \pard\sa200\sl276\slmult1\qj Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.\par \pard\sa200\sl276\slmult1\fs22 8. Litigation\fs20\par \pard\sa200\sl276\slmult1\qj Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims.\par \pard\sa200\sl276\slmult1\fs22 9. Miscellaneous\fs20\par \pard\sa200\sl276\slmult1\qj This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.\par \pard\sa200\sl276\slmult1\fs22 10. Versions of the License\par \fs20 10.1. New Versions\par \pard\sa200\sl276\slmult1\qj Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.\par \pard\sa200\sl276\slmult1 10.2. Effect of New Versions\par \pard\sa200\sl276\slmult1\qj You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.\par \pard\sa200\sl276\slmult1 10.3. Modified Versions\par \pard\sa200\sl276\slmult1\qj If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).\par \pard\sa200\sl276\slmult1 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\par \pard\sa200\sl276\slmult1\qj If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.\par \pard\sa200\sl276\slmult1\fs22 Exhibit A - Source Code Form License Notice\par \pard\li284\sa200\sl276\slmult1\qj\fs20 This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at {\field{\*\fldinst{HYPERLINK "http://mozilla.org/MPL/2.0/"}}{\fldrslt{\ul\cf1 http://mozilla.org/MPL/2.0/}}}\f0\fs20 .\par \pard\sa200\sl276\slmult1\qj If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.\par \pard\sa200\sl276\slmult1 You may add additional accurate notices of copyright ownership.\par \fs22 Exhibit B - "Incompatible With Secondary Licenses" Notice\par \pard\li284\sa200\sl276\slmult1\qj\fs20 This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.\par } sqlitebrowser-3.11.2/installer/windows/nightly_build_scripts/000077500000000000000000000000001345112435200245765ustar00rootroot00000000000000sqlitebrowser-3.11.2/installer/windows/nightly_build_scripts/win32build.bat000077500000000000000000000104001345112435200272460ustar00rootroot00000000000000:: Destination path - specify where to move package after build SET DEST_PATH=C:\\builds MKDIR "%DEST_PATH%" SET ZIP_EXE="C:\Program Files\7-Zip\7z.exe" SET SQLITE_DIR=C:\\dev\\SQLite-Win32 SET SQLCIPHER_DIR=C:\\git_repos\\SQLCipher-Win32 SET SQLCIPHER_TAG=v4.0.1 :: You need to change the date format in Windows settings to YYYY-MM-DD :: before this will work properly. ;) set RUN_DATE=%DATE% :: If no branch given on the command line, use master IF "%1"=="" (SET BRANCH="v3.11.x") ELSE (SET BRANCH="%1") CD /d "C:\" if exist "%SQLITE_DIR%" rd /q /s "%SQLITE_DIR%" if exist "C:\\builds\\release-sqlite-win32" rd /q /s "C:\\builds\\release-sqlite-win32" if exist "C:\\builds\\release-sqlcipher-win32" rd /q /s "C:\\builds\\release-sqlcipher-win32" :: Unpack SQLite CD C:\dev %ZIP_EXE% e sqlite*zip "-o%SQLITE_DIR%" :: Update repositories ::git clone -b v3.4.2 https://github.com/sqlcipher/sqlcipher.git SQLCipher-Win32 CD C:\\git_repos\\SQLCipher-Win32 git clean -dffx git checkout -f HEAD git checkout master git pull git checkout "%SQLCIPHER_TAG%" git clean -dffx git pull git clean -dffx ::git clone -b %BRANCH% https://github.com/sqlitebrowser/sqlitebrowser.git "%DB4S_DIR%Win32" CD C:\\git_repos\\sqlitebrowser git clean -dffx git checkout -f HEAD git checkout master git pull git checkout %BRANCH% git clean -dffx git pull git clean -dffx :: WIN32 SQLITE BUILD PROCEDURE :: Set path variables CALL "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\vcvars32.bat" 8.1 :: Build SQLite x86 CD %SQLITE_DIR% cl sqlite3.c -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_JSON1 -DSQLITE_API=__declspec(dllexport) -link -dll -out:sqlite3.dll :: Build Math extension x86 COPY C:\git_repos\sqlitebrowser\src\extensions\extension-functions.c COPY C:\git_repos\sqlitebrowser\src\extensions\extension-functions.def cl /MD extension-functions.c -link -dll -def:extension-functions.def -out:math.dll :: Run CMake for SQLite x86 CD C:\\builds MKDIR "release-sqlite-win32" CD "release-sqlite-win32" cmake -G "Visual Studio 14 2015" -Wno-dev C:\\git_repos\\sqlitebrowser :: Build package devenv /Build Release sqlitebrowser.sln /project "ALL_BUILD" :: WIN32 SQLCIPHER BUILD PROCEDURE :: Build SQLCipher x86 CD %SQLCIPHER_DIR% nmake /f Makefile.msc sqlcipher.dll USE_AMALGAMATION=1 NO_TCL=1 SQLITE3DLL=sqlcipher.dll SQLITE3LIB=sqlcipher.lib SQLITE3EXE=sqlcipher.exe LTLINKOPTS="C:\dev\OpenSSL-Win32\lib\libeay32.lib" OPT_FEATURE_FLAGS="-DSQLITE_TEMP_STORE=2 -DSQLITE_HAS_CODEC=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_JSON1=1 -DSQLCIPHER_CRYPTO_OPENSSL=1 -IC:\dev\OpenSSL-Win32\include" :: Run CMake for SQLCipher x86 CD C:\\builds MKDIR "release-sqlcipher-win32" CD "release-sqlcipher-win32" cmake -G "Visual Studio 14 2015" -Wno-dev -Dsqlcipher=1 C:\\git_repos\\sqlitebrowser :: Build package devenv /Build Release sqlitebrowser.sln /project "ALL_BUILD" :: Rename SQLCipher CD "Release" MOVE "DB Browser for SQLite.exe" "DB Browser for SQLCipher.exe" :: Build MSI CD C:\\git_repos\\sqlitebrowser\\installer\\windows CALL build.cmd win32 :: Move package to DEST_PATH MOVE /Y *.msi "%DEST_PATH%\DB.Browser.for.SQLite-%RUN_DATE%-win32.msi" :: Create ZIP CD %DEST_PATH% msiexec /a "DB.Browser.for.SQLite-%RUN_DATE%-win32.msi" /q TARGETDIR=%CD%\zip MOVE %CD%\zip\System\* "%CD%\zip\DB Browser for SQLite" %ZIP_EXE% a "DB.Browser.for.SQLite-%RUN_DATE%-win32.zip" "%CD%\zip\DB Browser for SQLite" RMDIR /S /Q %CD%\zip :: Upload the packages to the nightlies server pscp -q -p -i C:\dev\puttygen_private.ppk "%DEST_PATH%\DB*%RUN_DATE%*win32.*" nightlies@nightlies.sqlitebrowser.org:/nightlies/win32 :: Copy the new binaries to /latest directory on the nightlies server plink -i C:\dev\puttygen_private.ppk nightlies@nightlies.sqlitebrowser.org "cd /nightlies/latest; rm -f *-win32.*" plink -i C:\dev\puttygen_private.ppk nightlies@nightlies.sqlitebrowser.org "cp /nightlies/win32/DB*SQLite-%RUN_DATE%-win32.msi /nightlies/latest/DB.Browser.for.SQLite-win32.msi" plink -i C:\dev\puttygen_private.ppk nightlies@nightlies.sqlitebrowser.org "cp /nightlies/win32/DB*SQLite-%RUN_DATE%-win32.zip /nightlies/latest/DB.Browser.for.SQLite-win32.zip" sqlitebrowser-3.11.2/installer/windows/nightly_build_scripts/win64build.bat000077500000000000000000000104331345112435200272610ustar00rootroot00000000000000:: Destination path - specify where to move package after build SET DEST_PATH=C:\\builds MKDIR "%DEST_PATH%" SET ZIP_EXE="C:\Program Files\7-Zip\7z.exe" SET SQLITE_DIR=C:\\dev\\SQLite-Win64 SET SQLCIPHER_DIR=C:\\git_repos\\SQLCipher-Win64 SET SQLCIPHER_TAG=v4.0.1 :: You need to change the date format in Windows settings to YYYY-MM-DD :: before this will work properly. ;) set RUN_DATE=%DATE% :: If no branch given on the command line, use master IF "%1"=="" (SET BRANCH="v3.11.x") ELSE (SET BRANCH="%1") CD /d "C:\" if exist "%SQLITE_DIR%" rd /q /s "%SQLITE_DIR%" if exist "C:\\builds\\release-sqlite-win64" rd /q /s "C:\\builds\\release-sqlite-win64" if exist "C:\\builds\\release-sqlcipher-win64" rd /q /s "C:\\builds\\release-sqlcipher-win64" :: Unpack SQLite CD C:\dev %ZIP_EXE% e sqlite*zip "-o%SQLITE_DIR%" :: Update repositories ::git clone -b v3.4.2 https://github.com/sqlcipher/sqlcipher.git SQLCipher-Win64 CD C:\\git_repos\\SQLCipher-Win64 git clean -dffx git checkout -f HEAD git checkout master git pull git checkout "%SQLCIPHER_TAG%" git clean -dffx git pull git clean -dffx ::git clone -b %BRANCH% https://github.com/sqlitebrowser/sqlitebrowser.git "%DB4S_DIR%Win64" CD C:\\git_repos\\sqlitebrowser git clean -dffx git checkout -f HEAD git checkout master git pull git checkout %BRANCH% git clean -dffx git pull git clean -dffx :: WIN64 SQLITE BUILD PROCEDURE :: Set path variables CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" :: Build SQLite x64 CD %SQLITE_DIR% cl sqlite3.c -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_JSON1 -DSQLITE_API=__declspec(dllexport) -link -dll -out:sqlite3.dll :: Build Math extension x64 COPY C:\git_repos\sqlitebrowser\src\extensions\extension-functions.c COPY C:\git_repos\sqlitebrowser\src\extensions\extension-functions.def cl /MD extension-functions.c -link -dll -def:extension-functions.def -out:math.dll :: Run CMake for SQLite x64 CD C:\\builds MKDIR "release-sqlite-win64" CD "release-sqlite-win64" cmake -G "Visual Studio 15 2017 Win64" -Wno-dev C:\\git_repos\\sqlitebrowser :: Build package devenv /Build Release sqlitebrowser.sln /project "ALL_BUILD" :: WIN64 SQLCIPHER BUILD PROCEDURE :: Build SQLCipher x64 CD %SQLCIPHER_DIR% nmake /f Makefile.msc sqlcipher.dll USE_AMALGAMATION=1 NO_TCL=1 SQLITE3DLL=sqlcipher.dll SQLITE3LIB=sqlcipher.lib SQLITE3EXE=sqlcipher.exe LTLINKOPTS="C:\dev\OpenSSL-Win64\lib\libeay32.lib" OPT_FEATURE_FLAGS="-DSQLITE_TEMP_STORE=2 -DSQLITE_HAS_CODEC=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_JSON1=1 -DSQLCIPHER_CRYPTO_OPENSSL=1 -IC:\dev\OpenSSL-Win64\include" :: Run CMake for SQLCipher x64 CD C:\\builds MKDIR "release-sqlcipher-win64" CD "release-sqlcipher-win64" cmake -G "Visual Studio 15 2017 Win64" -Wno-dev -Dsqlcipher=1 C:\\git_repos\\sqlitebrowser :: Build package devenv /Build Release sqlitebrowser.sln /project "ALL_BUILD" :: Rename SQLCipher CD "Release" MOVE "DB Browser for SQLite.exe" "DB Browser for SQLCipher.exe" :: Build MSI CD C:\\git_repos\\sqlitebrowser\\installer\\windows CALL build.cmd win64 :: Move package to DEST_PATH MOVE /Y *.msi "%DEST_PATH%\DB.Browser.for.SQLite-%RUN_DATE%-win64.msi" :: Create ZIP CD %DEST_PATH% msiexec /a "DB.Browser.for.SQLite-%RUN_DATE%-win64.msi" /q TARGETDIR=%CD%\zip MOVE %CD%\zip\System64\* "%CD%\zip\DB Browser for SQLite" %ZIP_EXE% a "DB.Browser.for.SQLite-%RUN_DATE%-win64.zip" "%CD%\zip\DB Browser for SQLite" RMDIR /S /Q %CD%\zip :: Upload the packages to the nightlies server pscp -q -p -i C:\dev\puttygen_private.ppk "%DEST_PATH%\DB*%RUN_DATE%*win64.*" nightlies@nightlies.sqlitebrowser.org:/nightlies/win64 :: Copy the new binaries to /latest directory on the nightlies server plink -i C:\dev\puttygen_private.ppk nightlies@nightlies.sqlitebrowser.org "cd /nightlies/latest; rm -f *-win64.*" plink -i C:\dev\puttygen_private.ppk nightlies@nightlies.sqlitebrowser.org "cp /nightlies/win64/DB*SQLite-%RUN_DATE%-win64.msi /nightlies/latest/DB.Browser.for.SQLite-win64.msi" plink -i C:\dev\puttygen_private.ppk nightlies@nightlies.sqlitebrowser.org "cp /nightlies/win64/DB*SQLite-%RUN_DATE%-win64.zip /nightlies/latest/DB.Browser.for.SQLite-win64.zip" sqlitebrowser-3.11.2/installer/windows/product.wxs000066400000000000000000000435471345112435200224320ustar00rootroot00000000000000 SHORTCUT_SQLITE_DESKTOP SHORTCUT_SQLCIPHER_DESKTOP SHORTCUT_SQLITE_PROGRAMMENU SHORTCUT_SQLCIPHER_PROGRAMMENU LicenseAccepted = "1" NOT Installed NSIS_INSTALLDIR NSIS_INSTALLDIR sqlitebrowser-3.11.2/installer/windows/resources/000077500000000000000000000000001345112435200222045ustar00rootroot00000000000000sqlitebrowser-3.11.2/installer/windows/resources/background.xcf000066400000000000000000001170761345112435200250410ustar00rootroot00000000000000gimp xcf file8BB 6 gimp-commentgimp-image-grid(style solid) (fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000)) (bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000)) (xspacing 10.000000) (yspacing 10.000000) (spacing-unit inches) (xoffset 0.000000) (yoffset 0.000000) (offset-unit inches)  icon.png     Rj#%BoE'tspePC><:8631/-)&$# moP<95/)#U\Q83.$UQ5+# dy<4.%! '.6?FIMPTW[_cgkla;*%1?JU`lw|C."#0>Oat #'(=Vr ",%9Ro $%Ek!8_%+Pv')X*L-#*-m.T 8}0-831i /#t2i4J3at;''*d3grH334e3ipXBA@Z3ileTPPUw3ikd\\[c2ikl`\\c|1ikom_\\`s/iko|e\\h|-ikot|d\[[_k|+ikosyl`[[_ht(ikotw}ve][\alz$ikoty|se][]doy"ikoty|ĸte][\`hrzikoty|Ƹyka\[]airyikoty|Ƶsg_\[\_agmsyikoty|sha][[]_cgilpswzikoty|wlc`\[[\]_`adeghiiklmoppikoty|¸woe`][[\[ikoty|}vohc`_\[[\ikoty|¼|wsmiea_]\ikoty|ľzvrmid_[ikoty|̪}ysolkihedca`_][ikoty|̨|wspmlkhgeda`_][kikoty|̪}yspmlkhgeda`_][oploty|̪}yspmlkhgeda`_][†sosy|ʪ}yspmlkhgeda`_][tsy|ȫ}yspmlkhgeda`_][tw|ƫ}yspmlkhgeda`_][tw}ª}yspmlkhgeda`_][ŀ(V}}yspmlkhgeda`_][1Q¾}yspmlkhgeda`_][Q"t}yspmlkhgeda`_][z6>¾}yspmlkhgeda`_][g:$$&_}yspmlkhgeda`_][erD//2h͍¼}yspmlkhgeda`_][irT=<<_ύ}yspmlkhgeda`_][ilaNJJTҐľ}yspmlkhgeda`_][i_XXhԍ¼}yspmlkhgeda`_][iki_\\k ؎ƾ}yspmlkhgeda`_][ikoh\\g ڊ}yspmlkhgeda`_][ikozp][\\`rߊ|wsomkihgdca`_\[ikowk][\\dt튆|wtsromkhgdc`_ikos}oa\[\dsikotwzg][\`iw'ikoty|te][\co|#'tspePC><:8631/-)&$# moP<95/)#U\Q83.$UQ5+# dy<4.%! '.6?FIMPTW[_cgkla;*%1?JU`lw|C."#0>Oat #'(=Vr ",%9Ro $%Ek!8_%+Pv')X*L-#*-m.T 8}0-831i /#t2i4J3at;''*d3grH334e3ipXBA@Z3ileTPPUw3ikd\\[c2ikl`\\c|1ikom_\\`s/iko|e\\h|-ikot|d\[[_k|+ikosyl`[[_ht(ikotw}ve][\alz$ikoty|se][]doy"ikoty|ĸte][\`hrzikoty|Ƹyka\[]airyikoty|Ƶsg_\[\_agmsyikoty|sha][[]_cgilpswzikoty|wlc`\[[\]_`adeghiiklmoppikoty|¸woe`][[\[ikoty|}vohc`_\[[\ikoty|¼|wsmiea_]\ikoty|ľzvrmid_[ikoty|̪}ysolkihedca`_][ikoty|̨|wspmlkhgeda`_][kikoty|̪}yspmlkhgeda`_][oploty|̪}yspmlkhgeda`_][†sosy|ʪ}yspmlkhgeda`_][tsy|ȫ}yspmlkhgeda`_][tw|ƫ}yspmlkhgeda`_][tw}ª}yspmlkhgeda`_][ŀ(V}}yspmlkhgeda`_][1Q¾}yspmlkhgeda`_][Q"t}yspmlkhgeda`_][z6>¾}yspmlkhgeda`_][g:$$&_}yspmlkhgeda`_][erD//2h͍¼}yspmlkhgeda`_][irT=<<_ύ}yspmlkhgeda`_][ilaNJJTҐľ}yspmlkhgeda`_][i_XXhԍ¼}yspmlkhgeda`_][iki_\\k ؎ƾ}yspmlkhgeda`_][ikoh\\g ڊ}yspmlkhgeda`_][ikozp][\\`rߊ|wsomkihgdca`_\[ikowk][\\dt튆|wtsromkhgdc`_ikos}oa\[\dsikotwzg][\`iw'ikoty|te][\co|#'tspePC><:8631/-)&$# moP<95/)#U\Q83.$UQ5+# dy<4.%! '.6?FIMPTW[_cgkla;*%1?JU`lw|C."#0>Oat #'(=Vr ",%9Ro $%Ek!8_%+Pv')X*L-#*-m.T 8}0-831i /#t2i4J3at;''*d3grH334e3ipXBA@Z3ileTPPUw3ikd\\[c2ikl`\\c|1ikom_\\`s/iko|e\\h|-ikot|d\[[_k|+ikosyl`[[_ht(ikotw}ve][\alz$ikoty|se][]doy"ikoty|ĸte][\`hrzikoty|Ƹyka\[]airyikoty|Ƶsg_\[\_agmsyikoty|sha][[]_cgilpswzikoty|wlc`\[[\]_`adeghiiklmoppikoty|¸woe`][[\[ikoty|}vohc`_\[[\ikoty|¼|wsmiea_]\ikoty|ľzvrmid_[ikoty|̪}ysolkihedca`_][ikoty|̨|wspmlkhgeda`_][kikoty|̪}yspmlkhgeda`_][oploty|̪}yspmlkhgeda`_][†sosy|ʪ}yspmlkhgeda`_][tsy|ȫ}yspmlkhgeda`_][tw|ƫ}yspmlkhgeda`_][tw}ª}yspmlkhgeda`_][ŀ(V}}yspmlkhgeda`_][1Q¾}yspmlkhgeda`_][Q"t}yspmlkhgeda`_][z6>¾}yspmlkhgeda`_][g:$$&_}yspmlkhgeda`_][erD//2h͍¼}yspmlkhgeda`_][irT=<<_ύ}yspmlkhgeda`_][ilaNJJTҐľ}yspmlkhgeda`_][i_XXhԍ¼}yspmlkhgeda`_][iki_\\k ؎ƾ}yspmlkhgeda`_][ikoh\\g ڊ}yspmlkhgeda`_][ikozp][\\`rߊ|wsomkihgdca`_\[ikowk][\\dt튆|wtsromkhgdc`_ikos}oa\[\dsikotwzg][\`iw'ikoty|te][\co|#( #;Xp" *Tu 6dP7r V# <'c) "|, t. H0235 5i6!7m7 888888888888888888888888888d7I6D6C6M7q78888888888888$%(*,-/012201>LQMDa' $''%0?4N" -/)T $$=5iea]ZWRPMIE>5-&  ?0|vk_TI>/#-& s_M=."1􎍅}oT:% lO6# }gB# $}Z4'rJ(*Q% ,|F.g(0w01z,2l4A3Z(''3\33"3T@A>!3sRPQB2|`[\[10ya\\]F/p_\\]O%-ye\\]O)+zh]\\I'(se]\\]W>#&yk`\\][L/"ymc]\\][N5$zpg`]\\]\WH6& 􍋊wpha]\\]ZP>.%"! 򋊈yslga_]\\]ZUF6*%$##" zvspliea_]\[\\][VNC8/)&&%$##" omlkihggeda`_]\\[\\]\[WPF<3.+))('&%$##" [\[ZVPJE>83/--,+*)('&%$##" \[ZXVTOID?:753210/.-,+*)('&%$##" \[ZXWURPNJHEBA?<:986543320/.-,+*)('&%$##" [ZWVUTRPONMJHGEDCB@?>=<:987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" " ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" 2ƂZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" #ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" \ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" AZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" eZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" !1(}XZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##! !/Z}4ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$#"#/R|T$$ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%#'7Wz]0//"ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)(&)1EgW<=:"ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,**-3F`|zQJLBZXWUTRQONMLIHGFDCBA@>=<;987643210..17EVk}dXXZ7ZXWUTRQONMLIHGFDCBA@>=<:9865335;HXl}h\\]P#ZXWUTRQONMLIHGFDCB@?><;:;=@GPZer |d\\]W-ZXVUTRPOMLJIGFFHMPV`it o_\\]X4]\[[\]aeimsysc\\]U2pc\\L-&vh_\\]V<$#zma\\]WD, $%(*,-/012201>LQMDa' $''%0?4N" -/)T $$=5iea]ZWRPMIE>5-&  ?0|vk_TI>/#-& s_M=."1􎍅}oT:% lO6# }gB# $}Z4'rJ(*Q% ,|F.g(0w01z,2l4A3Z(''3\33"3T@A>!3sRPQB2|`[\[10ya\\]F/p_\\]O%-ye\\]O)+zh]\\I'(se]\\]W>#&yk`\\][L/"ymc]\\][N5$zpg`]\\]\WH6& 􍋊wpha]\\]ZP>.%"! 򋊈yslga_]\\]ZUF6*%$##" zvspliea_]\[\\][VNC8/)&&%$##" omlkihggeda`_]\\[\\]\[WPF<3.+))('&%$##" [\[ZVPJE>83/--,+*)('&%$##" \[ZXVTOID?:753210/.-,+*)('&%$##" \[ZXWURPNJHEBA?<:986543320/.-,+*)('&%$##" [ZWVUTRPONMJHGEDCB@?>=<:987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" " ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" 2ƂZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" #ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" \ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" AZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" eZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" !1(}XZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##! !/Z}4ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$#"#/R|T$$ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%#'7Wz]0//"ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)(&)1EgW<=:"ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,**-3F`|zQJLBZXWUTRQONMLIHGFDCBA@>=<;987643210..17EVk}dXXZ7ZXWUTRQONMLIHGFDCBA@>=<:9865335;HXl}h\\]P#ZXWUTRQONMLIHGFDCB@?><;:;=@GPZer |d\\]W-ZXVUTRPOMLJIGFFHMPV`it o_\\]X4]\[[\]aeimsysc\\]U2pc\\L-&vh_\\]V<$#zma\\]WD, $%(*,-/012201>LQMDa' $''%0?4N" -/)T $$=5iea]ZWRPMIE>5-&  ?0|vk_TI>/#-& s_M=."1􎍅}oT:% lO6# }gB# $}Z4'rJ(*Q% ,|F.g(0w01z,2l4A3Z(''3\33"3T@A>!3sRPQB2|`[\[10ya\\]F/p_\\]O%-ye\\]O)+zh]\\I'(se]\\]W>#&yk`\\][L/"ymc]\\][N5$zpg`]\\]\WH6& 􍋊wpha]\\]ZP>.%"! 򋊈yslga_]\\]ZUF6*%$##" zvspliea_]\[\\][VNC8/)&&%$##" omlkihggeda`_]\\[\\]\[WPF<3.+))('&%$##" [\[ZVPJE>83/--,+*)('&%$##" \[ZXVTOID?:753210/.-,+*)('&%$##" \[ZXWURPNJHEBA?<:986543320/.-,+*)('&%$##" [ZWVUTRPONMJHGEDCB@?>=<:987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" " ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" 2ƂZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" #ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" \ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" AZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" eZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" !1(}XZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##! !/Z}4ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$#"#/R|T$$ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%#'7Wz]0//"ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)(&)1EgW<=:"ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,**-3F`|zQJLBZXWUTRQONMLIHGFDCBA@>=<;987643210..17EVk}dXXZ7ZXWUTRQONMLIHGFDCBA@>=<:9865335;HXl}h\\]P#ZXWUTRQONMLIHGFDCB@?><;:;=@GPZer |d\\]W-ZXVUTRPOMLJIGFFHMPV`it o_\\]X4]\[[\]aeimsysc\\]U2pc\\L-&vh_\\]V<$#zma\\]WD, ǽ{dJ-) ˴kB#ǙyX) ׫yB֛j/#NJN'́7 )`,v  .o 0I 23$5+6!6 7Z8888Y8n9p9p9p9p9p9p9p9p9p9p9p9p9p9p9p9p9p9p9p9p9p8f8I8$8 7i 6M 6O 7u 88-8P8j9q9p9p9p9p9p9p9p9p9pikoty|Ƽtg][]ais}ikoty|ƺwi`\[]ckt}ikoty|ȸre_[[]aelryikoty|ʼ|od_\[[\_aglpty|ikoty|ξsha][[\]]_`ceiloprsstvwyz||ikoty|ȼzrha_\[ [\]_ikoty|Ƽtlga`]\[[\ikoty|¼yrlhdcaa`_\\ikoty|}wpid_\ikoty|̯}wspolkhgdc`_][ikoty|̨|wsomkihgeca`_][ikoty|̨}yspmlkhgeda`_][loty|̪}yspmlkhgeda`_][tzooty|ʪ}yspmlkhgeda`_][rsy|Ȫ}yspmlkhgeda`_][6Ҁsw|ƫ}yspmlkhgeda`_][ż|y|ī}yspmlkhgeda`_][Mh}«}yspmlkhgeda`_][V)h}yspmlkhgeda`_][%$i}yspmlkhgeda`_][F#s¾}yspmlkhgeda`_][v; H̐}yspmlkhgeda`_][l>))*_͎¾}yspmlkhgeda`_][ivM545_ϐ}yspmlkhgeda`_][io[EBBUюľ}yspmlkhgeda`_][ikgVQQTrԒ¼}yspmlkhgeda`_][ike\\[`zՊ}yspmlkhgeda`_][ikla\\`v ي}yspmlkhgeda`_][ikopa[\\]m ݊|wsomlihgeca`_][ikozl\[\\dv덋|wrpmlkhgeca_][ikosi_[[]ew񈆅}|zyvtihkoswrc\[\dp}&hgiosw|}k`[[_ht%hgiosy|zk`[\akt!hgiosy|Ⱦ|k`\[_dmvhgiosy|ʾre_[\_emtzhgiosy|̼zla][[]`ciot| hgiosy|Ⱥzmd_[[\]`cehlosvzhgiosy|ȸ}rga_\[[\]_`aacdegghikllhgiosy|Ⱦ}tkd`][[ \[hgiosy|ƾ}vohc`_\[[\hgiosy|¾|wsoiea]\hgiosy|}ytpkgc_\hgiosy|Ϋ|wsolkiheeca`_][hgiosy|Ϊ|wtpmlkhgeda`_]\hgkosy|Ϋ}wtpmlkhgeda`_]\hekosy|Ϋ}wtpmlkhgeda`_]\htkosy|ʭ}wtpmlkhgeda`_]\mlosy|ȭ}wtpmlkhgeda`_]\mhpsw|ƭ}wtpmlkhgeda`_]\rptw|ĭ}wtpmlkhgeda`_]\vy|}wtpmlkhgeda`_]\z}¾}wtpmlkhgeda`_]\}}wtpmlkhgeda`_]\ȅ|¾}wtpmlkhgeda`_]\ ʎ}wtpmlkhgeda`_]\ ˕¾}wtpmlkhgeda`_]\ Φ}wtpmlkhgeda`_]\б¾}wtpmlkhgeda`_]\}wtpmlkhgeda`_]\ľ}wtpmlkhgeda`_]\¼}wtpmlkhgeda`_]\¼|wtpmlkhgeda`_]\%矡|wtpmlkhgeda`_]\ikoty|Ƽtg][]ais}ikoty|ƺwi`\[]ckt}ikoty|ȸre_[[]aelryikoty|ʼ|od_\[[\_aglpty|ikoty|ξsha][[\]]_`ceiloprsstvwyz||ikoty|ȼzrha_\[ [\]_ikoty|Ƽtlga`]\[[\ikoty|¼yrlhdcaa`_\\ikoty|}wpid_\ikoty|̯}wspolkhgdc`_][ikoty|̨|wsomkihgeca`_][ikoty|̨}yspmlkhgeda`_][loty|̪}yspmlkhgeda`_][tzooty|ʪ}yspmlkhgeda`_][rsy|Ȫ}yspmlkhgeda`_][6Ҁsw|ƫ}yspmlkhgeda`_][ż|y|ī}yspmlkhgeda`_][Mh}«}yspmlkhgeda`_][V)h}yspmlkhgeda`_][%$i}yspmlkhgeda`_][F#s¾}yspmlkhgeda`_][v; H̐}yspmlkhgeda`_][l>))*_͎¾}yspmlkhgeda`_][ivM545_ϐ}yspmlkhgeda`_][io[EBBUюľ}yspmlkhgeda`_][ikgVQQTrԒ¼}yspmlkhgeda`_][ike\\[`zՊ}yspmlkhgeda`_][ikla\\`v ي}yspmlkhgeda`_][ikopa[\\]m ݊|wsomlihgeca`_][ikozl\[\\dv덋|wrpmlkhgeca_][ikosi_[[]ew񈆅}|zyvtihkoswrc\[\dp}&hgiosw|}k`[[_ht%hgiosy|zk`[\akt!hgiosy|Ⱦ|k`\[_dmvhgiosy|ʾre_[\_emtzhgiosy|̼zla][[]`ciot| hgiosy|Ⱥzmd_[[\]`cehlosvzhgiosy|ȸ}rga_\[[\]_`aacdegghikllhgiosy|Ⱦ}tkd`][[ \[hgiosy|ƾ}vohc`_\[[\hgiosy|¾|wsoiea]\hgiosy|}ytpkgc_\hgiosy|Ϋ|wsolkiheeca`_][hgiosy|Ϊ|wtpmlkhgeda`_]\hgkosy|Ϋ}wtpmlkhgeda`_]\hekosy|Ϋ}wtpmlkhgeda`_]\htkosy|ʭ}wtpmlkhgeda`_]\mlosy|ȭ}wtpmlkhgeda`_]\mhpsw|ƭ}wtpmlkhgeda`_]\rptw|ĭ}wtpmlkhgeda`_]\vy|}wtpmlkhgeda`_]\z}¾}wtpmlkhgeda`_]\}}wtpmlkhgeda`_]\ȅ|¾}wtpmlkhgeda`_]\ ʎ}wtpmlkhgeda`_]\ ˕¾}wtpmlkhgeda`_]\ Φ}wtpmlkhgeda`_]\б¾}wtpmlkhgeda`_]\}wtpmlkhgeda`_]\ľ}wtpmlkhgeda`_]\¼}wtpmlkhgeda`_]\¼|wtpmlkhgeda`_]\%矡|wtpmlkhgeda`_]\ikoty|Ƽtg][]ais}ikoty|ƺwi`\[]ckt}ikoty|ȸre_[[]aelryikoty|ʼ|od_\[[\_aglpty|ikoty|ξsha][[\]]_`ceiloprsstvwyz||ikoty|ȼzrha_\[ [\]_ikoty|Ƽtlga`]\[[\ikoty|¼yrlhdcaa`_\\ikoty|}wpid_\ikoty|̯}wspolkhgdc`_][ikoty|̨|wsomkihgeca`_][ikoty|̨}yspmlkhgeda`_][loty|̪}yspmlkhgeda`_][tzooty|ʪ}yspmlkhgeda`_][rsy|Ȫ}yspmlkhgeda`_][6Ҁsw|ƫ}yspmlkhgeda`_][ż|y|ī}yspmlkhgeda`_][Mh}«}yspmlkhgeda`_][V)h}yspmlkhgeda`_][%$i}yspmlkhgeda`_][F#s¾}yspmlkhgeda`_][v; H̐}yspmlkhgeda`_][l>))*_͎¾}yspmlkhgeda`_][ivM545_ϐ}yspmlkhgeda`_][io[EBBUюľ}yspmlkhgeda`_][ikgVQQTrԒ¼}yspmlkhgeda`_][ike\\[`zՊ}yspmlkhgeda`_][ikla\\`v ي}yspmlkhgeda`_][ikopa[\\]m ݊|wsomlihgeca`_][ikozl\[\\dv덋|wrpmlkhgeca_][ikosi_[[]ew񈆅}|zyvtihkoswrc\[\dp}&hgiosw|}k`[[_ht%hgiosy|zk`[\akt!hgiosy|Ⱦ|k`\[_dmvhgiosy|ʾre_[\_emtzhgiosy|̼zla][[]`ciot| hgiosy|Ⱥzmd_[[\]`cehlosvzhgiosy|ȸ}rga_\[[\]_`aacdegghikllhgiosy|Ⱦ}tkd`][[ \[hgiosy|ƾ}vohc`_\[[\hgiosy|¾|wsoiea]\hgiosy|}ytpkgc_\hgiosy|Ϋ|wsolkiheeca`_][hgiosy|Ϊ|wtpmlkhgeda`_]\hgkosy|Ϋ}wtpmlkhgeda`_]\hekosy|Ϋ}wtpmlkhgeda`_]\htkosy|ʭ}wtpmlkhgeda`_]\mlosy|ȭ}wtpmlkhgeda`_]\mhpsw|ƭ}wtpmlkhgeda`_]\rptw|ĭ}wtpmlkhgeda`_]\vy|}wtpmlkhgeda`_]\z}¾}wtpmlkhgeda`_]\}}wtpmlkhgeda`_]\ȅ|¾}wtpmlkhgeda`_]\ ʎ}wtpmlkhgeda`_]\ ˕¾}wtpmlkhgeda`_]\ Φ}wtpmlkhgeda`_]\б¾}wtpmlkhgeda`_]\}wtpmlkhgeda`_]\ľ}wtpmlkhgeda`_]\¼}wtpmlkhgeda`_]\¼|wtpmlkhgeda`_]\%矡|wtpmlkhgeda`_]\88888888888888m7A7565k656G7v78888888888888888888888888 8u7(7u6543 e2 00 D. E+-y(?%1c!6i/Pq! /Pq ' 0EZo|rha]\\]\UD/#|sia]\\]XM;,$! 􋊈wrke`_\\][RC3($##" |wtplga_]\\][WOD9-(%%$##" |zywvtssrpolhea`_]]\[\\]\XQG>4-*)('&%$##" ]\[ \]\[XUOHA82.-,+*)('&%$##" \[ZWRMGB<85310/.-,+*)('&%$##" \[ZWVTQOLIFB?<:76543310/.-,+*)('&%$##" [ZXXWVUTQPOMJHGECB@?>=;:987643320/.-,+*)('&%$##" ZXWUTRPONMJIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" #UAZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" OZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" 8ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" [ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##"  ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" "/ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" $Ad%$"ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$#" %:eJZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%##)>ca+)) ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)(&%(2Loa544#ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,*))+3Gc}VBC@#ZXWUTRQONMLIHGFDCBA@>=<;987643310.--/3@Qe|tTQRDZXWUTRQONMLIHGFDCBA@>=<;9865431137CTgz|`[\[3ZXWUTRQONMLIHGFDCB@?>=;:889;>FOXhz w`\\]GZXWUTRPONMJIHFEDBBEMV_iv o_\\]O%ZXWVUTRQQPPRUX]aekpv|wd\\]N)vwyz||}wg]\\H&!pd]\\]V;#%vh_\\]ZH-!vla\\]ZJ3#wmd_\\]\UE3% |tme`\\]XM;-%"!  |toid`]\[\\]\XQC3)%$##"! zwspliec`]\[\\]\ZTI?5-)&&%$##"! lkihggedcaa`_]\\[\\][ZVMC:2-*))('&%$##"! \ZWTNGB<62/--,+*)('&%$##"! \[ZXVTPLGB=:743310/.-,+*)('&%$##"! \[ZXXWWUTQOLIFCB@>;:987643320/.-,+*)('&%$##"! [XWVUTQPONLJHGEDCB@?>=<:987643320/.-,+*)('&%$##"! ZXWUTRQONMLIHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"  ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"!  ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##$# ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%%ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*))'(ZXWVTRQPNMLJHGFECBA@>=<;987643320/.--+,ZXWVTRQPNMLJHGFECBA@>=<;987643321/0ZXWVTRQPNMLIHGFECBA@>=<;987655 ZXWVTRQPNMLJHGFECBA@>=<=&|rha]\\]\UD/#|sia]\\]XM;,$! 􋊈wrke`_\\][RC3($##" |wtplga_]\\][WOD9-(%%$##" |zywvtssrpolhea`_]]\[\\]\XQG>4-*)('&%$##" ]\[ \]\[XUOHA82.-,+*)('&%$##" \[ZWRMGB<85310/.-,+*)('&%$##" \[ZWVTQOLIFB?<:76543310/.-,+*)('&%$##" [ZXXWVUTQPOMJHGECB@?>=;:987643320/.-,+*)('&%$##" ZXWUTRPONMJIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" #UAZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" OZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" 8ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" [ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##"  ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" "/ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" $Ad%$"ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$#" %:eJZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%##)>ca+)) ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)(&%(2Loa544#ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,*))+3Gc}VBC@#ZXWUTRQONMLIHGFDCBA@>=<;987643310.--/3@Qe|tTQRDZXWUTRQONMLIHGFDCBA@>=<;9865431137CTgz|`[\[3ZXWUTRQONMLIHGFDCB@?>=;:889;>FOXhz w`\\]GZXWUTRPONMJIHFEDBBEMV_iv o_\\]O%ZXWVUTRQQPPRUX]aekpv|wd\\]N)vwyz||}wg]\\H&!pd]\\]V;#%vh_\\]ZH-!vla\\]ZJ3#wmd_\\]\UE3% |tme`\\]XM;-%"!  |toid`]\[\\]\XQC3)%$##"! zwspliec`]\[\\]\ZTI?5-)&&%$##"! lkihggedcaa`_]\\[\\][ZVMC:2-*))('&%$##"! \ZWTNGB<62/--,+*)('&%$##"! \[ZXVTPLGB=:743310/.-,+*)('&%$##"! \[ZXXWWUTQOLIFCB@>;:987643320/.-,+*)('&%$##"! [XWVUTQPONLJHGEDCB@?>=<:987643320/.-,+*)('&%$##"! ZXWUTRQONMLIHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"  ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"!  ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##$# ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%%ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*))'(ZXWVTRQPNMLJHGFECBA@>=<;987643320/.--+,ZXWVTRQPNMLJHGFECBA@>=<;987643321/0ZXWVTRQPNMLIHGFECBA@>=<;987655 ZXWVTRQPNMLJHGFECBA@>=<=&|rha]\\]\UD/#|sia]\\]XM;,$! 􋊈wrke`_\\][RC3($##" |wtplga_]\\][WOD9-(%%$##" |zywvtssrpolhea`_]]\[\\]\XQG>4-*)('&%$##" ]\[ \]\[XUOHA82.-,+*)('&%$##" \[ZWRMGB<85310/.-,+*)('&%$##" \[ZWVTQOLIFB?<:76543310/.-,+*)('&%$##" [ZXXWVUTQPOMJHGECB@?>=;:987643320/.-,+*)('&%$##" ZXWUTRPONMJIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" #UAZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" OZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" 8ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" [ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##"  ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" "/ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$##" $Ad%$"ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%$#" %:eJZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)('&%##)>ca+)) ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,+*)(&%(2Loa544#ZXWUTRQONMLIHGFDCBA@>=<;987643320/.-,*))+3Gc}VBC@#ZXWUTRQONMLIHGFDCBA@>=<;987643310.--/3@Qe|tTQRDZXWUTRQONMLIHGFDCBA@>=<;9865431137CTgz|`[\[3ZXWUTRQONMLIHGFDCB@?>=;:889;>FOXhz w`\\]GZXWUTRPONMJIHFEDBBEMV_iv o_\\]O%ZXWVUTRQQPPRUX]aekpv|wd\\]N)vwyz||}wg]\\H&!pd]\\]V;#%vh_\\]ZH-!vla\\]ZJ3#wmd_\\]\UE3% |tme`\\]XM;-%"!  |toid`]\[\\]\XQC3)%$##"! zwspliec`]\[\\]\ZTI?5-)&&%$##"! lkihggedcaa`_]\\[\\][ZVMC:2-*))('&%$##"! \ZWTNGB<62/--,+*)('&%$##"! \[ZXVTPLGB=:743310/.-,+*)('&%$##"! \[ZXXWWUTQOLIFCB@>;:987643320/.-,+*)('&%$##"! [XWVUTQPONLJHGEDCB@?>=<:987643320/.-,+*)('&%$##"! ZXWUTRQONMLIHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"  ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"!  ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##"! ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%$##$# ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*)('&%%ZXWVTRQPNMLJHGFECBA@>=<;987643320/.-,+*))'(ZXWVTRQPNMLJHGFECBA@>=<;987643320/.--+,ZXWVTRQPNMLJHGFECBA@>=<;987643321/0ZXWVTRQPNMLIHGFECBA@>=<;987655 ZXWVTRQPNMLJHGFECBA@>=<=&9p9p9p9p9p9p9p9p9p9p9p8l8S8087j6:6l47H788K8l9~9999999999999999999999s8U8(87)6H5T3C2%0S .` +X (ȅ9 %ƊF!Ȗc2ɗe3έkJ* ƴhH( !|gR>)'@@8 Background      8&28 *:JZjz *:JZjz  @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @    {N='sqlitebrowser-3.11.2/installer/windows/resources/banner.xcf000066400000000000000000000170631345112435200241620ustar00rootroot00000000000000gimp xcf file:BB6 gimp-commentgimp-image-grid(style solid) (fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000)) (bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000)) (xspacing 10.000000) (yspacing 10.000000) (spacing-unit inches) (xoffset 0.000000) (yoffset 0.000000) (offset-unit inches) 00 icon.png     R00f00vAG*5D52-)"!# $&!. '8!)1:>ADHFC@=7.%#"E]t툇|kS7-Z򌎐qG!!Pu썑g=18n^'"fQ-Q$6&jVZ#wW(km`f z^Fiqfl{匍xiZ?iq~rbl~ߌyi`^J*iq|ʮtejr{wmbZXUE*! iq|Ƭsjdbdfhjlljiifb`]XTOI@5*%$# iq||pe][YWURMHD>;63/-*(%# iq|Ӟvlhda]XTPMIEC?<9530-*(%# sp}Ҡzokfb]XTPNJEC@<9530-*(%# }ˠzokeb]XTPNJEC@<9530-*(%# a-Pġzokeb]XTPNJEC@<9530-*(%#!MM>Ƚzokeb]XTPNJEC@<9530-*'!$Dc&a@U¶zokeb]XTPNJEC?<963/*&/V}F-me\xźyojea\XTPMIEB?<<:;D]{kYiqxbj~wrnjeca_]]`cfks~yfT+iqfcypb_I%iq|zfjw~pbYWJ-iq|ɰzniijnswz{|}||zywtpmid]WOF<.#" iq|ʸtib__^^]^]ZWSMC;62-*'%# iq|Ե{rg^YURNIEA>;8530-*(%# iq}ӝwmiea]XTPMIEC@<9530-*(%# u|Πzokeb]XTPNJEC@<9530-*(%# !pǡzokeb]XTPNJEC@<9530-*(%# 2zokeb]XTPNJEC@<9530-*(% !; S+MŹzokeb]XTPNJEC@<9530-*$$Gy4% kRVͿzokeb]XTPNIEB?<85335A^yR-kmafynid_ZVRNKGGHJNU^ftzdJioz^k|}}܀|f^E fp|hk{މuaXS4fp|çunmpw~ԋ}wrkdZQD4#fp}çyi_\^adfgiigedca``_\VN?3,($#!fp}phb\[[ZXVSNIA941/-*(%#!gp}զupjc^XUPMIEB>;8530-*(%#!hp}ӡxojea^YUQMIFC@<9530-*(%#!q{̡yokeb^YUQNIFC@<9530-*(%#!lp|šyokeb^YUQNIFC@<9530-*(%#!tȾyokeb^YUQNIFC@<9530-*(%# بöyokeb^YUQNIFC@<9530-*(%#̽yokeb^YUQNIFC?<9530-*(! ɺxojea]YUQMIFC@<9630'AG*5D52-)"!# $&!. '8!)1:>ADHFC@=7.%#"E]t툇|kS7-Z򌎐qG!!Pu썑g=18n^'"fQ-Q$6&jVZ#wW(km`f z^Fiqfl{匍xiZ?iq~rbl~ߌyi`^J*iq|ʮtejr{wmbZXUE*! iq|Ƭsjdbdfhjlljiifb`]XTOI@5*%$# iq||pe][YWURMHD>;63/-*(%# iq|Ӟvlhda]XTPMIEC?<9530-*(%# sp}Ҡzokfb]XTPNJEC@<9530-*(%# }ˠzokeb]XTPNJEC@<9530-*(%# a-Pġzokeb]XTPNJEC@<9530-*(%#!MM>Ƚzokeb]XTPNJEC@<9530-*'!$Dc&a@U¶zokeb]XTPNJEC?<963/*&/V}F-me\xźyojea\XTPMIEB?<<:;D]{kYiqxbj~wrnjeca_]]`cfks~yfT+iqfcypb_I%iq|zfjw~pbYWJ-iq|ɰzniijnswz{|}||zywtpmid]WOF<.#" iq|ʸtib__^^]^]ZWSMC;62-*'%# iq|Ե{rg^YURNIEA>;8530-*(%# iq}ӝwmiea]XTPMIEC@<9530-*(%# u|Πzokeb]XTPNJEC@<9530-*(%# !pǡzokeb]XTPNJEC@<9530-*(%# 2zokeb]XTPNJEC@<9530-*(% !; S+MŹzokeb]XTPNJEC@<9530-*$$Gy4% kRVͿzokeb]XTPNIEB?<85335A^yR-kmafynid_ZVRNKGGHJNU^ftzdJioz^k|}}܀|f^E fp|hk{މuaXS4fp|çunmpw~ԋ}wrkdZQD4#fp}çyi_\^adfgiigedca``_\VN?3,($#!fp}phb\[[ZXVSNIA941/-*(%#!gp}զupjc^XUPMIEB>;8530-*(%#!hp}ӡxojea^YUQMIFC@<9530-*(%#!q{̡yokeb^YUQNIFC@<9530-*(%#!lp|šyokeb^YUQNIFC@<9530-*(%#!tȾyokeb^YUQNIFC@<9530-*(%# بöyokeb^YUQNIFC@<9530-*(%#̽yokeb^YUQNIFC?<9530-*(! ɺxojea]YUQMIFC@<9630'AG*5D52-)"!# $&!. '8!)1:>ADHFC@=7.%#"E]t툇|kS7-Z򌎐qG!!Pu썑g=18n^'"fQ-Q$6&jVZ#wW(km`f z^Fiqfl{匍xiZ?iq~rbl~ߌyi`^J*iq|ʮtejr{wmbZXUE*! iq|Ƭsjdbdfhjlljiifb`]XTOI@5*%$# iq||pe][YWURMHD>;63/-*(%# iq|Ӟvlhda]XTPMIEC?<9530-*(%# sp}Ҡzokfb]XTPNJEC@<9530-*(%# }ˠzokeb]XTPNJEC@<9530-*(%# a-Pġzokeb]XTPNJEC@<9530-*(%#!MM>Ƚzokeb]XTPNJEC@<9530-*'!$Dc&a@U¶zokeb]XTPNJEC?<963/*&/V}F-me\xźyojea\XTPMIEB?<<:;D]{kYiqxbj~wrnjeca_]]`cfks~yfT+iqfcypb_I%iq|zfjw~pbYWJ-iq|ɰzniijnswz{|}||zywtpmid]WOF<.#" iq|ʸtib__^^]^]ZWSMC;62-*'%# iq|Ե{rg^YURNIEA>;8530-*(%# iq}ӝwmiea]XTPMIEC@<9530-*(%# u|Πzokeb]XTPNJEC@<9530-*(%# !pǡzokeb]XTPNJEC@<9530-*(%# 2zokeb]XTPNJEC@<9530-*(% !; S+MŹzokeb]XTPNJEC@<9530-*$$Gy4% kRVͿzokeb]XTPNIEB?<85335A^yR-kmafynid_ZVRNKGGHJNU^ftzdJioz^k|}}܀|f^E fp|hk{މuaXS4fp|çunmpw~ԋ}wrkdZQD4#fp}çyi_\^adfgiigedca``_\VN?3,($#!fp}phb\[[ZXVSNIA941/-*(%#!gp}զupjc^XUPMIEB>;8530-*(%#!hp}ӡxojea^YUQMIFC@<9530-*(%#!q{̡yokeb^YUQNIFC@<9530-*(%#!lp|šyokeb^YUQNIFC@<9530-*(%#!tȾyokeb^YUQNIFC@<9530-*(%# بöyokeb^YUQNIFC@<9530-*(%#̽yokeb^YUQNIFC?<9530-*(! ɺxojea]YUQMIFC@<9630' 5]ӴmH#  ?t⿑]) ` !a \$%X& (3( 8(8(8(8(8(8(8(7("(({(&(8(8(8(8(8(8(8(8(1( ((J (,(3(2(2(2(2(2(2(2(((s%|T"6f> /aׯO #DjӶzY2 : Background     c:': 2 2 2{=sqlitebrowser-3.11.2/installer/windows/resources/icon.png000066400000000000000000000222401345112435200236420ustar00rootroot00000000000000PNG  IHDR>asRGBgAMA a pHYsod$5IDATx^ UՕ/15Dy "%!S(AFD%C""&XL(Cd JXF-B!D!D3dsrnG7M7Sv=w~Ӆ~%IߴiS;Sۍ7x 70tcɣGeN? 5z'|˃~m0`N8?c٩{}}>}N<賿4hГ6O\p/ /#Fկ~>l֭u. *l-[_paI&.7 viw 21@أGw<vK.IΝt)9#tرfqmv]]]ϭOݻwgϞ/H|~"fegqI'cԨQz,XP~~nlٲ.nƍ;Y4^^My?>#n8ꨣRKE:oQ֭k""ɿJ)~u^z&>͙3hѢ hy-wOɯʓt-^ۡC]i7B;{JEt?H 7+Ei"Y.>&-ʯMNSSի׫ eĠHiyTD>QM9KD^|_L/%_W+2꫓'&^{m2a„DuD|_N.p%\>O;wg'Jʼn?zՐD1_@}M;h}zr Qx_Lrk„ C=0`Iv =<(K9-[%j4p?D?Ɋxs杼2o=rg,e n<СCײ͊LƏq( fs(}Y,L2ȑ#GFGXb<'@p7n\һwocE)`ǎuhB?(V:̥e 2ޫW/6&WDi]L3:̥e |B:bHO8q=yPpT,AfuKV91^ƍUL'h$@ duiI*cFDnnLHA!d)K 'Ts"k'NgklSf)˞ק1j8x; `. ͉ЌBe|S!l4lɏ~dŻί0P°_OV'v<> <]|,~@pLxdҥ!2p A uBTq@l 7؝|G(@dz!xVX~Aј(+)vhcy(#;c/ pf]رF TӧO7{x/~ =Pr&˖- d> 046p" {Ps;WBȑ#q= i68${֮]dժU +W )2R%y+{mI̾RChø$8Kf;]^!˓Gy$K^x Hw}w " m*`筎1x'&F5vu018c7,+ { =U,?+[.K/Ap}B`8bO~`F/c=|O"|axtD FL@iIm>R@rÇwv H" K]ЀzaÆdƍɦM+{g}ƄXhQ2c+ߘx{1<' @(iv. ~F;sY@hvi~^SNbR xa-!Y<}O ~8y~%oF~olٲ%CȲf͚'Idɒ]Q~! Xo.lNWYx9霶F8} x" %B %f+XVFoP__r)a ;ux~'ki{ S?\LB"իÌHA 1(2I;M1*%G*Ag"9qeRT)̼Nƣ>Dt@[x:s'u ANO}ѐ^h4A_tA Ad<! 3kL7M9$\`'4x0{n`xN>`СMI&ӟiS2<<Tq5JT uh^_evSGG% -,zAF X`'M.G> @9+V c~`j h1 @Do=i|" '~~U}EK\z>6k7 )@W z5C#G)!Kd: &ey?QvXS@e|NDg ڸ_v-yM> 0$A|hMIH<v M #ac IUPX__:`>Y2{ x?|}a Qtҵked(M[GJbȘq$ qH?/ W:: ƇWve ¯%A"@wa`X`رx. lpw+{?%'@>?نfLlw[ cP4B"xe o0 ;j j<<&@߹9Ats}7aAFX"$1`LO d >s^ c`|Yޞ4f(~u B! yCh Hc'_}6fˁna+lj&j_= `JA&0@8aߡ ?@0{?B>D'a+܂-H 16C )zm `T`D%Ť`K10" }"!L>8b:hɩg ~>K{,4:{ vBgq+Ca?Q0j5,caHB hL4HƅDx/6}0-+ t< c_a,$B^@'XxcB6{7- =oq;'dD4"a5o«pyi@zg0b@r\ 2X;,O`7+@i,P#,dg!ތ Itlbmӂ)(DY;#X!0m TT!+ 28`쁍[tݲ@<, 1c+ԉ&%ʙzE 7&d!<MoR4GNmNx6ñ)}Jn=*{fL+x^y@ 8೜˚>µBoN A8Bw:-n8pg<l`5pľH| D0;YyYs>f|&}01L ~ot1~c}0,N;&JXcɺ1iOF=џq4N^g*"U=Ёf'i > > ) ˽›<bHBbM 'N2h6IO")*cC{ڪT.l 8k7 ,'mu >:gmS; TJ8Z Mm w75ZÁNk@C:JZg5`z,8PQ`Y" 'd~>QRD%HAƝGZ x @0罴~< x4äcpF'Qi M >E#~ެq|Mm۶"%.P!o6GtO{?= P;$}0=lb'jƈR(4 65kIP|2f̘uuuPCVJ@Ó(C_N |Zv)L?VڵkW窳>Zo `[}}}#)oa཮]]E+2tc$_\pOm+G_q` + c(T^@y"h<;vsdBӀ &@Vs?ʴgЅZ1&C L.]":y YQZ ślqH??BObR Ng@'tC"fVDNF{F0Q8eaP$id @M@jpL@ޣ-t@w3 cೌ*&N{cQCYf ` D|㩟sdX(20(F30F]2 `A`m_.(X`}D8v#@':Q%H>8:;c0 80n1Bw y`fbPG1rabx,6iKI&@L@#!OGE$Y8S2x|6#,@ql, Xbd Bd b0@jE 'BA܇kNh%e܌?g 3`JI'4`@ E!Y2ǮE 0Iډ@}yאуH%Ռ0Oh'a< h *ǛE)!C ;~ lAlZc @D'0sy~QБ4D'}PBD8Jx#@l^RT)Ffwu.bO=hC-֔(w,34 > nb":xOj#a>'@E"XeBr4@+!@>0'@`䲊 Cr2&`G-bHxx7 @{vs4W~߲P_Z@: 21Ͻ|?i+'@]ɘ7:@: 8 :Q ޟh$IWpM2 c~RF]",d: 8 ~ ~Qo hKFBU:u*])`@98gy?@yXHuRz-Z5}tP~^ Yi?YeߜU`d0\u͜9 #2{d-G@Ëi MR^ P,p,^(63gNAiܹsOMx @HLi L8ޟa1I{I&d¼yڋ#D{YH This Setup Wizard will install [ProductName] on your computer. If you have a previous version already installed, this installation process will update it. [ProductName] Setup {\WixUI_Font_Title}Shortcuts Select the shortcuts for the application. [ProductName] uses the latest version of SQLite, so you can enjoy all of its new features and bug fixes, but it does not have encryption support. It is also built with SQLCipher as a separate application. SQLCipher is an open source extension to SQLite providing transparent 256-bit AES encryption of database files, but uses a slightly older version of SQLite. Both applications (with and without SQLCipher) are installed and can run concurrently. This page allows you to choose the shortcuts for each application and where to place them. DB Browser (SQLite) DB Browser (SQLCipher) Desktop Program Menu sqlitebrowser-3.11.2/installer/windows/translations.wxs000066400000000000000000000312271345112435200234630ustar00rootroot00000000000000 sqlitebrowser-3.11.2/installer/windows/ui.wxs000066400000000000000000000054541345112435200213620ustar00rootroot00000000000000

1 1 1 sqlitebrowser-3.11.2/installer/windows/variables.wxi000066400000000000000000000100361345112435200226730ustar00rootroot00000000000000 sqlitebrowser-3.11.2/libs/000077500000000000000000000000001345112435200154345ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/DB4S_PATCH_01000066400000000000000000000007531345112435200172770ustar00rootroot00000000000000diff --git a/libs/qscintilla/lexers/LexSQL.cpp b/libs/qscintilla/lexers/LexSQL.cpp index 1d00918..086955a 100644 --- a/libs/qscintilla/lexers/LexSQL.cpp +++ b/libs/qscintilla/lexers/LexSQL.cpp @@ -546,7 +546,7 @@ void SCI_METHOD LexerSQL::Lex(Sci_PositionU startPos, Sci_Position length, int i } break; case SCE_SQL_STRING: - if (sc.ch == '\\') { + if (options.sqlBackslashEscapes && sc.ch == '\\') { // Escape sequence sc.Forward(); } else if (sc.ch == '\"') { sqlitebrowser-3.11.2/libs/DB4S_PATCH_02000066400000000000000000000011121345112435200172660ustar00rootroot00000000000000diff --git a/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp b/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp index d40b742..4c9fe75 100644 --- a/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp +++ b/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp @@ -386,7 +386,12 @@ void QsciScintilla::callTip() ct = ct_entries.join("\n"); } - QByteArray ct_ba = ct.toLatin1(); + QByteArray ct_ba; + if (isUtf8()) + ct_ba = ct.toUtf8(); + else + ct_ba = ct.toLatin1(); + const char *cts = ct_ba.data(); SendScintilla(SCI_CALLTIPSHOW, adjustedCallTipPosition(shift), cts); sqlitebrowser-3.11.2/libs/DB4S_PATCH_03000066400000000000000000000047641345112435200173070ustar00rootroot00000000000000diff --git a/libs/qscintilla/Qt4Qt5/Qsci/qsciscintilla.h b/libs/qscintilla/Qt4Qt5/Qsci/qsciscintilla.h index 3b5f185..49ca5cc 100644 --- a/libs/qscintilla/Qt4Qt5/Qsci/qsciscintilla.h +++ b/libs/qscintilla/Qt4Qt5/Qsci/qsciscintilla.h @@ -2009,6 +2009,34 @@ public slots: //! \sa zoomIn(), zoomOut() virtual void zoomTo(int size); + //! For performance, Scintilla does not measure the display width + //! of the document to determine the properties of the horizontal + //! scroll bar. Instead, an assumed width is used. This sets the + //! document width in pixels assumed by Scintilla to \a + //! pixelWidth. The default value is 2000. + //! + //! \sa getScrollWidth(), setScrollWidthTracking() + virtual void setScrollWidth(int pixelWidth); + + //! Gets the document width in pixels assumed by Scintilla. + //! + //! \sa setScrollWidth(), setScrollWidthTracking() + virtual int getScrollWidth() const; + + //! If scroll width tracking is enabled then the scroll width is + //! adjusted to ensure that all of the lines currently displayed + //! can be completely scrolled. This mode never adjusts the scroll + //! width to be narrower. + //! Sets the scroll width tracking to \a enabled. + //! + //! \sa setScrollWidth(), getScrollWidthTracking() + virtual void setScrollWidthTracking(bool enabled); + + //! Gets the current scroll width tracking mode. + //! + //! \sa getScrollWidth(), setScrollWidthTracking() + virtual bool getScrollWidthTracking() const; + signals: //! This signal is emitted whenever the cursor position changes. \a line //! contains the line number and \a index contains the character index diff --git a/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp b/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp index 4c9fe75..31dc579 100644 --- a/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp +++ b/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp @@ -4481,3 +4481,26 @@ static QColor asQColor(long sci_colour) ((int)(sci_colour >> 8)) & 0x00ff, ((int)(sci_colour >> 16)) & 0x00ff); } + +void QsciScintilla::setScrollWidth(int pixelWidth) +{ + SendScintilla(SCI_SETSCROLLWIDTH, pixelWidth); +} + +int QsciScintilla::getScrollWidth() const +{ + return SendScintilla(SCI_GETSCROLLWIDTH); +} + +void QsciScintilla::setScrollWidthTracking(bool enabled) +{ + SendScintilla(SCI_SETSCROLLWIDTHTRACKING, enabled); +} + +bool QsciScintilla::getScrollWidthTracking() const +{ + return SendScintilla(SCI_GETSCROLLWIDTHTRACKING); +} + + + sqlitebrowser-3.11.2/libs/DB4S_PATCH_04000066400000000000000000000017531345112435200173030ustar00rootroot00000000000000diff --git a/libs/qscintilla/lexers/LexJSON.cpp b/libs/qscintilla/lexers/LexJSON.cpp index 9c044e5..6c06061 100644 --- a/libs/qscintilla/lexers/LexJSON.cpp +++ b/libs/qscintilla/lexers/LexJSON.cpp @@ -457,7 +457,9 @@ void SCI_METHOD LexerJSON::Fold(Sci_PositionU startPos, LexAccessor styler(pAccess); Sci_PositionU currLine = styler.GetLine(startPos); Sci_PositionU endPos = startPos + length; - int currLevel = styler.LevelAt(currLine) & SC_FOLDLEVELNUMBERMASK; + int currLevel = SC_FOLDLEVELBASE; + if (currLine > 0) + currLevel = styler.LevelAt(currLine - 1) >> 16; int nextLevel = currLevel; int visibleChars = 0; for (Sci_PositionU i = startPos; i < endPos; i++) { @@ -472,7 +474,7 @@ void SCI_METHOD LexerJSON::Fold(Sci_PositionU startPos, } } if (atEOL || i == (endPos-1)) { - int level = currLevel; + int level = currLevel | nextLevel << 16; if (!visibleChars && options.foldCompact) { level |= SC_FOLDLEVELWHITEFLAG; } else if (nextLevel > currLevel) { sqlitebrowser-3.11.2/libs/antlr-2.7.7/000077500000000000000000000000001345112435200172255ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/antlr-2.7.7/AUTHORS000066400000000000000000000000611345112435200202720ustar00rootroot00000000000000Author: Peter Wells sqlitebrowser-3.11.2/libs/antlr-2.7.7/CMakeLists.txt000066400000000000000000000043671345112435200217770ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.12.2) set(ANTLR_SRC src/ANTLRUtil.cpp src/ASTFactory.cpp src/ASTNULLType.cpp src/ASTRefCount.cpp src/BaseAST.cpp src/BitSet.cpp src/CharBuffer.cpp src/CharScanner.cpp src/CommonAST.cpp src/CommonASTWithHiddenTokens.cpp src/CommonHiddenStreamToken.cpp src/CommonToken.cpp src/InputBuffer.cpp src/LLkParser.cpp src/MismatchedCharException.cpp src/MismatchedTokenException.cpp src/NoViableAltException.cpp src/NoViableAltForCharException.cpp src/Parser.cpp src/RecognitionException.cpp src/String.cpp src/Token.cpp src/TokenBuffer.cpp src/TokenRefCount.cpp src/TokenStreamBasicFilter.cpp src/TokenStreamHiddenTokenFilter.cpp src/TokenStreamRewriteEngine.cpp src/TokenStreamSelector.cpp src/TreeParser.cpp ) set(ANTLR_HDR antlr/ANTLRException.hpp antlr/ANTLRUtil.hpp antlr/AST.hpp antlr/ASTArray.hpp antlr/ASTFactory.hpp antlr/ASTNULLType.hpp antlr/ASTPair.hpp antlr/ASTRefCount.hpp antlr/BaseAST.hpp antlr/BitSet.hpp antlr/CharBuffer.hpp antlr/CharInputBuffer.hpp antlr/CharScanner.hpp antlr/CharStreamException.hpp antlr/CharStreamIOException.hpp antlr/CircularQueue.hpp antlr/CommonAST.hpp antlr/CommonASTWithHiddenTokens.hpp antlr/CommonHiddenStreamToken.hpp antlr/CommonToken.hpp antlr/IOException.hpp antlr/InputBuffer.hpp antlr/LLkParser.hpp antlr/LexerSharedInputState.hpp antlr/MismatchedCharException.hpp antlr/MismatchedTokenException.hpp antlr/NoViableAltException.hpp antlr/NoViableAltForCharException.hpp antlr/Parser.hpp antlr/ParserSharedInputState.hpp antlr/RecognitionException.hpp antlr/RefCount.hpp antlr/SemanticException.hpp antlr/String.hpp antlr/Token.hpp antlr/TokenBuffer.hpp antlr/TokenRefCount.hpp antlr/TokenStream.hpp antlr/TokenStreamBasicFilter.hpp antlr/TokenStreamException.hpp antlr/TokenStreamHiddenTokenFilter.hpp antlr/TokenStreamIOException.hpp antlr/TokenStreamRecognitionException.hpp antlr/TokenStreamRetryException.hpp antlr/TokenStreamRewriteEngine.hpp antlr/TokenStreamSelector.hpp antlr/TokenWithIndex.hpp antlr/TreeParser.hpp antlr/TreeParserSharedInputState.hpp antlr/config.hpp ) include_directories(.) add_library(antlr ${ANTLR_SRC} ${ANTLR_HDR}) sqlitebrowser-3.11.2/libs/antlr-2.7.7/LICENSE.txt000066400000000000000000000022531345112435200210520ustar00rootroot00000000000000 SOFTWARE RIGHTS ANTLR 1989-2006 Developed by Terence Parr Partially supported by University of San Francisco & jGuru.com We reserve no legal rights to the ANTLR--it is fully in the public domain. An individual or company may do whatever they wish with source code distributed with ANTLR or the code generated by ANTLR, including the incorporation of ANTLR, or its output, into commerical software. We encourage users to develop software with ANTLR. However, we do ask that credit is given to us for developing ANTLR. By "credit", we mean that if you use ANTLR or incorporate any source code into one of your programs (commercial product, research project, or otherwise) that you acknowledge this fact somewhere in the documentation, research report, etc... If you like ANTLR and have developed a nice tool with the output, please mention that you developed it using ANTLR. In addition, we ask that the headers remain intact in our source code. As long as these guidelines are kept, we expect to continue enhancing this system and expect to make other tools available as they are completed. The primary ANTLR guy: Terence Parr parrt@cs.usfca.edu parrt@antlr.org sqlitebrowser-3.11.2/libs/antlr-2.7.7/README000066400000000000000000000143451345112435200201140ustar00rootroot00000000000000ANTLR C++ Support Libraries Additional Notes 1.1 Using Microsoft Visual C++ Currently this is still (or again) somewhat experimental. MSVC is not the development platform and I don't have access to the compiler currently. YMMV Make sure you compile the library *and* your project with the same settings. (multithreaded/debug/etc.) Visual C++ 6 only is supported for static builds. Some hacking and STLPort is needed to build a DLL (only for experts). Visual C++ 7.0 and 7.1 should support both static and DLL builds (DLL builds might be broken). In general the main problem is getting the right template instantiations into the DLL. For 7.0 you might have to tweak the list in lib/cpp/src/dll.cpp. I'm told 7.1 does not need this. For a static build (works probably best) 1. Create a win32 static library project. 2. Enable RTTI. (Run Time Type Information) 3. Add the source files from /antlr/lib/cpp/src to the project (except dll.cpp) put /antlr/lib/cpp in the search path for include files. For the DLL build (MSVC 7.0 tested) * Project settings ("create new project" dialogs) - Win32 project - Application Settings - Application type - DLL - Additional options - Export symbols * Project properties (change defaults to) - Configuration Properties - C/C++ - General - Additional Include Directories - drive:\antlr-2.7.2\lib\cpp - Preprocessor - Preprocessor Definitions - WIN32;_DEBUG;_WINDOWS;_USRDLL;ANTLR_EXPORTS - Code Generation - Runtime Library - Multi-threaded Debug DLL (/MDd) - Enable Function-Level Linking: - Yes - Language - Enable Run-Time Type Info - Yes - Precompiled Headers - Create/Use Precompiled Headers NOTE: Do not use the antlr generated and support library in a multithreaded way. It was not designed for a multithreaded environment. 1.3 Building with GCJ NOTE: outdated the new Makefiles do not support this anymore. It is also possible to build a native binary of ANTLR. This is somewhat experimental and can be enabled by giving the --enable-gcj option to configure. You need a recent GCC to do this and even then the constructed binary crashes on some platforms. 2. Tested Compilers for this release Don't get worried if your favourite compiler is not mentioned here. Any somewhat recent ISO compliant C++ compiler should have little trouble with the runtime library. *NOTE* this section was not updated for the new configure script/Makefiles some of the things listed here to pass different flags to configure may not work anymore. Check INSTALL.txt or handedit generated scripts after configure. 2.1 Solaris 2.1.1 Sun Workshop 6.0 Identifies itself as: CC: Sun WorkShop 6 2000/08/30 C++ 5.1 Patch 109490-01 Compiles out of the box configure using: CXX=CC CC=cc AR=CC ARFLAGS="-xar -o" ./configure Use CC to make the archive to ensure bundling of template instances. Check manpage for details. 2.1.2 GCC Tested 3.0.4, 3.2.1, 3.2.3, 3.3.2, 3.4.0. All tested gcc are using a recent GNU binutils for linker and assembler. You will probably run into trouble if you use the solaris linker/assembler. 2.2 Windows 2.2.1 Visual C++ Visual C++ 6.0 reported to work well with static build. DLL build not supported (reported to work when using STLPort in previous ANTLR versions). I heart that in some cases there could be problems with precompiled headers and the use of normal '/' in the #include directives (with service pack 5). Visual C++ 7.0 reported to work, might need some tweaks for DLL builds due to some shuffling around in the code. Visual C++ 7.1 reported to work, might need some tweaks, see above. My current guess is that DLL builds are all over the line broken. A workaround is to make a DLL from the complete generated parser including the static ANTLR support library. 2.2.2 Cygwin/MinGW Not expecting any big problems maybe some tweaks needed in configure. 3. Old notes for a number of compilers 3.1 SGI Irix 6.5.10 MIPSPro compiler You can't compile ANTLR with the MIPSPro compiler on anything < 6.5.10 because SGI just fixed a big bug dealing with namespaces in that release. Note: To get it to compile do basically the following: CC=cc CXX=CC CXXFLAGS=-LANG:std ./configure --prefix=/usr/local/antlr Note probably dates back to 2.7.0-2.7.1 era. 3.2 Sun CC 5 It may be you'll have to change one or two static_cast()'s to a C-style cast. (think that's a compiler bug) Configure using: CXX=CC CC=cc RANLIB="CC -xar" ./configure The custom ranlib is needed to get the template instances into the archive. Check manpages. Maybe the Sun CC 6 instructions above will work as well. 3.3 GCC on some platforms (Alpha Tru64) The -pipe option not supported it seems. Configure using: CFLAGS="-W -Wall" ./configure Or remove the -pipe's from the generated scripts/Config.make. 4. IT DOESN'T WORK!? 4.1 Compile problems The ANTLR code uses some relatively new features of C++ which not all compilers support yet (such as namespaces, and new style standard headers). At the moment, you may be able to work around the problem with a few nasty tricks: Try creating some header files like 'iostream' just containing: #include and compile with an option to define away the word 'std', such as CC .... -Dstd= .... Also in the antlr subdirectory there's a file config.hpp. Tweak this one to enable/disable the different bells and whistles used in the rest of the code. Don't forget to submit those changes back to us (along with compiler info) so we can incorporate them in our next release! 4.2 Reporting problems When reporting problems please try to be as specific as possible e.g. mention ANTLR release, and try to provide a clear and minimal example of what goes wrong and what you expected. Bug reports can be done to Terence or the current subsystem maintainers as mentioned in the doc directory. Another option is to use the mailing list linked from http://www.antlr.org. Before reporting a problem you might want to try with a development snapshot, there is a link to these in the File Sharing section of http://www.antlr.org. sqlitebrowser-3.11.2/libs/antlr-2.7.7/TODO000066400000000000000000000066471345112435200177320ustar00rootroot00000000000000* ANTLR should issue a warning if you have protected rules and filter == true or filter=IGNORE in a lexer? This can be tackled by tracking rule references in a more general approach. * Have a look at the doc's. * Add allocators to the objects * Look more at exception handling * TreeParser.cpp around line 76 the MismatchedTokenException here does not use ttype to improve it's errormessage. Would require changing a bit in MismatchedTokenException.cpp * On Thu, Sep 21, 2000 at 12:33:48AM -0700, John Lambert wrote: > 1) The literal EOF is not defined and causes the define of EOF_CHAR in > CharScanner.hpp to fail. ANTLR with STL Port. Changing the EOF define to char_traits::eof() breaks things for gcc-2.95.2. Fix this in next release portably. http://www.egroups.com/message/antlr-interest/2520 * Fix heterogeneous AST stuff. It boils down to adding a method to AST types that knows how to duplicate the sucker. -> done clone() added. Knowing one factory is not enough. -> done in C++ have a superfactory. Also look at having to set the astfactory by hand (this is not 100% necessary). Double check generated code. http://groups.yahoo.com/group/antlr-interest/message/2496 * Look at messageLog stuff Ross Bencina proposed. Looks good at first glance. http://www.egroups.com/message/antlr-interest/2555 * Add RW_STL & CC 4.2 patch from Ulrich Teichert: See my mailbox.. and these comments from Ross Bencina: http://www.egroups.com/message/antlr-interest/2494 * in action.g (java and C++) ##.initialize / ##->initialize is not recognized as an assigment to the root node. In the case ## is followed by ./-> initialize transInfo.assignToRoot should be set to true. Report by Matthew Ford (12 march 2001) * Add TokenLabelType option for generated lexers. Hmmm can already set token factory. Then again.. you may run into a cast fest.. * Fix some #line counting oddities (Mike Barnett) > nonterm > { > ## = #([TOK,"TOK"], > ... Other stuff ... > ); > f(); > } generates wrong #line info need to fix action.g a bit better. * This one triggers a bug in antlr's codegen. #perform_action = #( create_tau_ast(#p1->getLine(),#p1->getColumn()), #p1 ); #p1 are replaced by p1 in stead of p1_AST. It's really time to rewrite this mess. Workaround: RefModest_AST tau = create_tau_ast(#p1->getLine(),#p1->getColumn()); #perform_action = #( tau, #p1 ); * Unicode and related. - The patch from Jean-Daniel Fekete is an approach. But has some issues. + It is probably necessary to discern an 'internal' string/char type and 'external' ones. The external ones are for the lexer input. The 'internal ones' are for standard antlr error messages etc. Translators from external to internal should be provided. Hmm on second thought.. probably not really an issue. + What should the lexer read? - Unicode units from a 'unicode reader' in a sense this unicode reader is a lexer itself. Just reading iconv/iconv_open manpages.. Maybe we can hide this with iconv in the InputBuffer mechanisms? - Interpret unicode ourselves. Ugh don't want to think of that right now. we probably redo something that has been done. Only problem is that we need something that's portable (C++ case) + What changes are necessary in the rest of the code to support a wide character set? Think most should be handled in/below the lexer level. sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr.pro000066400000000000000000000050101345112435200210630ustar00rootroot00000000000000TEMPLATE = lib CONFIG += staticlib CONFIG += debug_and_release INCLUDEPATH += ./ HEADERS += \ antlr/config.hpp \ antlr/TreeParserSharedInputState.hpp \ antlr/TreeParser.hpp \ antlr/TokenWithIndex.hpp \ antlr/TokenStreamSelector.hpp \ antlr/TokenStreamRewriteEngine.hpp \ antlr/TokenStreamRetryException.hpp \ antlr/TokenStreamRecognitionException.hpp \ antlr/TokenStreamIOException.hpp \ antlr/TokenStreamHiddenTokenFilter.hpp \ antlr/TokenStreamException.hpp \ antlr/TokenStreamBasicFilter.hpp \ antlr/TokenStream.hpp \ antlr/TokenRefCount.hpp \ antlr/TokenBuffer.hpp \ antlr/Token.hpp \ antlr/String.hpp \ antlr/SemanticException.hpp \ antlr/RefCount.hpp \ antlr/RecognitionException.hpp \ antlr/ParserSharedInputState.hpp \ antlr/Parser.hpp \ antlr/NoViableAltForCharException.hpp \ antlr/NoViableAltException.hpp \ antlr/MismatchedTokenException.hpp \ antlr/MismatchedCharException.hpp \ antlr/LexerSharedInputState.hpp \ antlr/LLkParser.hpp \ antlr/InputBuffer.hpp \ antlr/IOException.hpp \ antlr/CommonToken.hpp \ antlr/CommonHiddenStreamToken.hpp \ antlr/CommonASTWithHiddenTokens.hpp \ antlr/CommonAST.hpp \ antlr/CircularQueue.hpp \ antlr/CharStreamIOException.hpp \ antlr/CharStreamException.hpp \ antlr/CharScanner.hpp \ antlr/CharInputBuffer.hpp \ antlr/CharBuffer.hpp \ antlr/BitSet.hpp \ antlr/BaseAST.hpp \ antlr/ASTRefCount.hpp \ antlr/ASTPair.hpp \ antlr/ASTNULLType.hpp \ antlr/ASTFactory.hpp \ antlr/ASTArray.hpp \ antlr/AST.hpp \ antlr/ANTLRUtil.hpp \ antlr/ANTLRException.hpp SOURCES += \ src/TreeParser.cpp \ src/TokenStreamSelector.cpp \ src/TokenStreamRewriteEngine.cpp \ src/TokenStreamHiddenTokenFilter.cpp \ src/TokenStreamBasicFilter.cpp \ src/TokenRefCount.cpp \ src/TokenBuffer.cpp \ src/Token.cpp \ src/String.cpp \ src/RecognitionException.cpp \ src/Parser.cpp \ src/NoViableAltForCharException.cpp \ src/NoViableAltException.cpp \ src/MismatchedTokenException.cpp \ src/MismatchedCharException.cpp \ src/LLkParser.cpp \ src/InputBuffer.cpp \ src/CommonToken.cpp \ src/CommonHiddenStreamToken.cpp \ src/CommonASTWithHiddenTokens.cpp \ src/CommonAST.cpp \ src/CharScanner.cpp \ src/CharBuffer.cpp \ src/BitSet.cpp \ src/BaseAST.cpp \ src/ASTRefCount.cpp \ src/ASTNULLType.cpp \ src/ASTFactory.cpp \ src/ANTLRUtil.cpp sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/000077500000000000000000000000001345112435200203455ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/ANTLRException.hpp000066400000000000000000000027231345112435200236210ustar00rootroot00000000000000#ifndef INC_ANTLRException_hpp__ #define INC_ANTLRException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ANTLRException.hpp#2 $ */ #include #ifdef __MINGW32__ #include #endif #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API ANTLRException { public: /// Create ANTLR base exception without error message ANTLRException() : text("") { } /// Create ANTLR base exception with error message ANTLRException(const ANTLR_USE_NAMESPACE(std)string& s) : text(s) { } virtual ~ANTLRException() throw() { } /** Return complete error message with line/column number info (if present) * @note for your own exceptions override this one. Call getMessage from * here to get the 'clean' error message stored in the text attribute. */ virtual ANTLR_USE_NAMESPACE(std)string toString() const { return text; } /** Return error message without additional info (if present) * @note when making your own exceptions classes override toString * and call in toString getMessage which relays the text attribute * from here. */ virtual ANTLR_USE_NAMESPACE(std)string getMessage() const { return text; } private: ANTLR_USE_NAMESPACE(std)string text; }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_ANTLRException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/ANTLRUtil.hpp000066400000000000000000000032071345112435200225760ustar00rootroot00000000000000#ifndef INC_ANTLRUtil_hpp__ #define INC_ANTLRUtil_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id:$ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** Eat whitespace from the input stream * @param is the stream to read from */ ANTLR_USE_NAMESPACE(std)istream& eatwhite( ANTLR_USE_NAMESPACE(std)istream& is ); /** Read a string enclosed by '"' from a stream. Also handles escaping of \". * Skips leading whitespace. * @param in the istream to read from. * @returns the string read from file exclusive the '"' * @throws ios_base::failure if string is badly formatted */ ANTLR_USE_NAMESPACE(std)string read_string( ANTLR_USE_NAMESPACE(std)istream& in ); /* Read a ([A-Z][0-9][a-z]_)* kindoff thing. Skips leading whitespace. * @param in the istream to read from. */ ANTLR_USE_NAMESPACE(std)string read_identifier( ANTLR_USE_NAMESPACE(std)istream& in ); /** Read a attribute="value" thing. Leading whitespace is skipped. * Between attribute and '=' no whitespace is allowed. After the '=' it is * permitted. * @param in the istream to read from. * @param attribute string the attribute name is put in * @param value string the value of the attribute is put in * @throws ios_base::failure if something is fishy. E.g. malformed quoting * or missing '=' */ void read_AttributeNValue( ANTLR_USE_NAMESPACE(std)istream& in, ANTLR_USE_NAMESPACE(std)string& attribute, ANTLR_USE_NAMESPACE(std)string& value ); #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/AST.hpp000066400000000000000000000123021345112435200215030ustar00rootroot00000000000000#ifndef INC_AST_hpp__ #define INC_AST_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/AST.hpp#2 $ */ #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif struct ASTRef; class ANTLR_API AST { public: AST() : ref(0) {} AST(const AST&) : ref(0) {} virtual ~AST() {} /// Return the type name for this AST node. (for XML output) virtual const char* typeName( void ) const = 0; /// Clone this AST node. virtual RefAST clone( void ) const = 0; /// Is node t equal to this in terms of token type and text? virtual bool equals(RefAST t) const = 0; /** Is t an exact structural and equals() match of this tree. The * 'this' reference is considered the start of a sibling list. */ virtual bool equalsList(RefAST t) const = 0; /** Is 't' a subtree of this list? The siblings of the root are NOT ignored. */ virtual bool equalsListPartial(RefAST t) const = 0; /** Is tree rooted at 'this' equal to 't'? The siblings of 'this' are * ignored. */ virtual bool equalsTree(RefAST t) const = 0; /** Is 't' a subtree of the tree rooted at 'this'? The siblings of * 'this' are ignored. */ virtual bool equalsTreePartial(RefAST t) const = 0; /** Walk the tree looking for all exact subtree matches. Return * a vector of RefAST that lets the caller walk the list * of subtree roots found herein. */ virtual ANTLR_USE_NAMESPACE(std)vector findAll(RefAST t) = 0; /** Walk the tree looking for all subtrees. Return * a vector of RefAST that lets the caller walk the list * of subtree roots found herein. */ virtual ANTLR_USE_NAMESPACE(std)vector findAllPartial(RefAST t) = 0; /// Add a node to the end of the child list for this node virtual void addChild(RefAST c) = 0; /// Get the number of children. Returns 0 if the node is a leaf virtual size_t getNumberOfChildren() const = 0; /// Get the first child of this node; null if no children virtual RefAST getFirstChild() const = 0; /// Get the next sibling in line after this one virtual RefAST getNextSibling() const = 0; /// Get the token text for this node virtual ANTLR_USE_NAMESPACE(std)string getText() const = 0; /// Get the token type for this node virtual int getType() const = 0; /** Various initialization routines. Used by several factories to initialize * an AST element. */ virtual void initialize(int t, const ANTLR_USE_NAMESPACE(std)string& txt) = 0; virtual void initialize(RefAST t) = 0; virtual void initialize(RefToken t) = 0; #ifdef ANTLR_SUPPORT_XML /** initialize this node from the contents of a stream. * @param in the stream to read the AST attributes from. */ virtual void initialize( ANTLR_USE_NAMESPACE(std)istream& in ) = 0; #endif /// Set the first child of a node. virtual void setFirstChild(RefAST c) = 0; /// Set the next sibling after this one. virtual void setNextSibling(RefAST n) = 0; /// Set the token text for this node virtual void setText(const ANTLR_USE_NAMESPACE(std)string& txt) = 0; /// Set the token type for this node virtual void setType(int type) = 0; /// Return this AST node as a string virtual ANTLR_USE_NAMESPACE(std)string toString() const = 0; /// Print out a child-sibling tree in LISP notation virtual ANTLR_USE_NAMESPACE(std)string toStringList() const = 0; virtual ANTLR_USE_NAMESPACE(std)string toStringTree() const = 0; #ifdef ANTLR_SUPPORT_XML /** get attributes of this node to 'out'. Override to customize XML * output. * @param out the stream to write the AST attributes to. * @returns if a explicit closetag should be written */ virtual bool attributesToStream( ANTLR_USE_NAMESPACE(std)ostream& out ) const = 0; /** Print a symbol over ostream. Overload this one to customize the XML * output for AST derived AST-types * @param output stream */ virtual void toStream( ANTLR_USE_NAMESPACE(std)ostream &out ) const = 0; /** Dump AST contents in XML format to output stream. * Works in conjunction with to_stream method. Overload that one is * derived classes to customize behaviour. * @param output stream to write to string to put the stuff in. * @param ast RefAST object to write. */ friend ANTLR_USE_NAMESPACE(std)ostream& operator<<( ANTLR_USE_NAMESPACE(std)ostream& output, const RefAST& ast ); #endif private: friend struct ASTRef; ASTRef* ref; AST(RefAST other); AST& operator=(const AST& other); AST& operator=(RefAST other); }; #ifdef ANTLR_SUPPORT_XML inline ANTLR_USE_NAMESPACE(std)ostream& operator<<( ANTLR_USE_NAMESPACE(std)ostream& output, const RefAST& ast ) { ast->toStream(output); return output; } #endif extern ANTLR_API RefAST nullAST; extern ANTLR_API AST* const nullASTptr; #ifdef NEEDS_OPERATOR_LESS_THAN // RK: apparently needed by MSVC and a SUN CC, up to and including // 2.7.2 this was undefined ? inline bool operator<( RefAST l, RefAST r ) { return nullAST == l ? ( nullAST == r ? false : true ) : l->getType() < r->getType(); } #endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_AST_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/ASTArray.hpp000066400000000000000000000016041345112435200225050ustar00rootroot00000000000000#ifndef INC_ASTArray_hpp__ #define INC_ASTArray_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ASTArray.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** ASTArray is a class that allows ANTLR to * generate code that can create and initialize an array * in one expression, like: * (new ASTArray(3))->add(x)->add(y)->add(z) */ class ANTLR_API ASTArray { public: int size; // = 0; ANTLR_USE_NAMESPACE(std)vector array; ASTArray(int capacity) : size(0) , array(capacity) { } ASTArray* add(RefAST node) { array[size++] = node; return this; } }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_ASTArray_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/ASTFactory.hpp000066400000000000000000000131741345112435200230430ustar00rootroot00000000000000#ifndef INC_ASTFactory_hpp__ #define INC_ASTFactory_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ASTFactory.hpp#2 $ */ #include #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif // Using these extra types to appease MSVC typedef RefAST (*factory_type_)(); typedef ANTLR_USE_NAMESPACE(std)pair< const char*, factory_type_ > factory_descriptor_; typedef ANTLR_USE_NAMESPACE(std)vector< factory_descriptor_* > factory_descriptor_list_; /** AST Super Factory shared by TreeParser and Parser. * This super factory maintains a map of all AST node types to their respective * AST factories. One instance should be shared among a parser/treeparser * chain. * * @todo check all this code for possible use of references in * stead of RefAST's. */ class ANTLR_API ASTFactory { public: typedef factory_type_ factory_type; typedef factory_descriptor_ factory_descriptor; typedef factory_descriptor_list_ factory_descriptor_list; protected: /* The mapping of AST node type to factory.. */ factory_descriptor default_factory_descriptor; factory_descriptor_list nodeFactories; public: /// Make new factory. Per default (Ref)CommonAST instances are generated. ASTFactory(); /** Initialize factory with a non default node type. * factory_node_name should be the name of the AST node type the factory * generates. (should exist during the existance of this ASTFactory * instance) */ ASTFactory( const char* factory_node_name, factory_type factory ); /// Destroy factory virtual ~ASTFactory(); /// Register a node factory for the node type type with name ast_name void registerFactory( int type, const char* ast_name, factory_type factory ); /// Set the maximum node (AST) type this factory may encounter void setMaxNodeType( int type ); /// Add a child to the current AST void addASTChild(ASTPair& currentAST, RefAST child); /// Create new empty AST node. The right default type shou virtual RefAST create(); /// Create AST node of the right type for 'type' RefAST create(int type); /// Create AST node of the right type for 'type' and initialize with txt RefAST create(int type, const ANTLR_USE_NAMESPACE(std)string& txt); /// Create duplicate of tr RefAST create(RefAST tr); /// Create new AST node and initialize contents from a token. RefAST create(RefToken tok); /// Create new AST node and initialize contents from a stream. RefAST create(const ANTLR_USE_NAMESPACE(std)string& txt, ANTLR_USE_NAMESPACE(std)istream& infile ); /** Deep copy a single node. This function the new clone() methods in the * AST interface. Returns a new RefAST(nullASTptr) if t is null. */ RefAST dup(RefAST t); /// Duplicate tree including siblings of root. RefAST dupList(RefAST t); /** Duplicate a tree, assuming this is a root node of a tree-- * duplicate that node and what's below; ignore siblings of root node. */ RefAST dupTree(RefAST t); /** Make a tree from a list of nodes. The first element in the * array is the root. If the root is null, then the tree is * a simple list not a tree. Handles null children nodes correctly. * For example, make(a, b, null, c) yields tree (a b c). make(null,a,b) * yields tree (nil a b). */ RefAST make(ANTLR_USE_NAMESPACE(std)vector& nodes); /** Make a tree from a list of nodes, where the nodes are contained * in an ASTArray object. The ASTArray is deleted after use. * @todo FIXME! I have a feeling we can get rid of this ugly ASTArray thing */ RefAST make(ASTArray* nodes); /// Make an AST the root of current AST void makeASTRoot(ASTPair& currentAST, RefAST root); /** Set a new default AST type. * factory_node_name should be the name of the AST node type the factory * generates. (should exist during the existance of this ASTFactory * instance). * Only change factory between parser runs. You might get unexpected results * otherwise. */ void setASTNodeFactory( const char* factory_node_name, factory_type factory ); #ifdef ANTLR_SUPPORT_XML /** Load a XML AST from stream. Make sure you have all the factories * registered before use. * @note this 'XML' stuff is quite rough still. YMMV. */ RefAST LoadAST( ANTLR_USE_NAMESPACE(std)istream& infile ); #endif protected: void loadChildren( ANTLR_USE_NAMESPACE(std)istream& infile, RefAST current ); void loadSiblings( ANTLR_USE_NAMESPACE(std)istream& infile, RefAST current ); bool checkCloseTag( ANTLR_USE_NAMESPACE(std)istream& infile ); #ifdef ANTLR_VECTOR_HAS_AT /// construct a node of 'type' inline RefAST getNodeOfType( unsigned int type ) { return RefAST(nodeFactories.at(type)->second()); } /// get the name of the node 'type' const char* getASTNodeType( unsigned int type ) { return nodeFactories.at(type)->first; } /// get the factory used for node 'type' factory_type getASTNodeFactory( unsigned int type ) { return nodeFactories.at(type)->second; } #else inline RefAST getNodeOfType( unsigned int type ) { return RefAST(nodeFactories[type]->second()); } /// get the name of the node 'type' const char* getASTNodeType( unsigned int type ) { return nodeFactories[type]->first; } factory_type getASTNodeFactory( unsigned int type ) { return nodeFactories[type]->second; } #endif private: // no copying and such.. ASTFactory( const ASTFactory& ); ASTFactory& operator=( const ASTFactory& ); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_ASTFactory_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/ASTNULLType.hpp000066400000000000000000000034341345112435200230460ustar00rootroot00000000000000#ifndef INC_ASTNULLType_hpp__ #define INC_ASTNULLType_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ASTNULLType.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** There is only one instance of this class **/ class ANTLR_API ASTNULLType : public AST { public: const char* typeName( void ) const; RefAST clone( void ) const; void addChild(RefAST c); size_t getNumberOfChildren() const; void setFirstChild(RefAST c); void setNextSibling(RefAST n); bool equals(RefAST t) const; bool equalsList(RefAST t) const; bool equalsListPartial(RefAST t) const; bool equalsTree(RefAST t) const; bool equalsTreePartial(RefAST t) const; ANTLR_USE_NAMESPACE(std)vector findAll(RefAST tree); ANTLR_USE_NAMESPACE(std)vector findAllPartial(RefAST subtree); RefAST getFirstChild() const; RefAST getNextSibling() const; ANTLR_USE_NAMESPACE(std)string getText() const; int getType() const; void initialize(int t, const ANTLR_USE_NAMESPACE(std)string& txt); void initialize(RefAST t); void initialize(RefToken t); void initialize(ANTLR_USE_NAMESPACE(std)istream& infile); void setText(const ANTLR_USE_NAMESPACE(std)string& text); void setType(int ttype); ANTLR_USE_NAMESPACE(std)string toString() const; ANTLR_USE_NAMESPACE(std)string toStringList() const; ANTLR_USE_NAMESPACE(std)string toStringTree() const; bool attributesToStream( ANTLR_USE_NAMESPACE(std)ostream &out ) const; void toStream( ANTLR_USE_NAMESPACE(std)ostream &out ) const; }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_ASTNULLType_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/ASTPair.hpp000066400000000000000000000030751345112435200223260ustar00rootroot00000000000000#ifndef INC_ASTPair_hpp__ #define INC_ASTPair_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ASTPair.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** ASTPair: utility class used for manipulating a pair of ASTs * representing the current AST root and current AST sibling. * This exists to compensate for the lack of pointers or 'var' * arguments in Java. * * OK, so we can do those things in C++, but it seems easier * to stick with the Java way for now. */ class ANTLR_API ASTPair { public: RefAST root; // current root of tree RefAST child; // current child to which siblings are added /** Make sure that child is the last sibling */ void advanceChildToEnd() { if (child) { while (child->getNextSibling()) { child = child->getNextSibling(); } } } // /** Copy an ASTPair. Don't call it clone() because we want type-safety */ // ASTPair copy() { // ASTPair tmp = new ASTPair(); // tmp.root = root; // tmp.child = child; // return tmp; // } ANTLR_USE_NAMESPACE(std)string toString() const { ANTLR_USE_NAMESPACE(std)string r = !root ? ANTLR_USE_NAMESPACE(std)string("null") : root->getText(); ANTLR_USE_NAMESPACE(std)string c = !child ? ANTLR_USE_NAMESPACE(std)string("null") : child->getText(); return "["+r+","+c+"]"; } }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_ASTPair_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/ASTRefCount.hpp000066400000000000000000000033141345112435200231540ustar00rootroot00000000000000#ifndef INC_ASTRefCount_hpp__ # define INC_ASTRefCount_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ASTRefCount.hpp#2 $ */ # include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class AST; struct ANTLR_API ASTRef { AST* const ptr; unsigned int count; ASTRef(AST* p); ~ASTRef(); ASTRef* increment() { ++count; return this; } bool decrement() { return (--count==0); } static ASTRef* getRef(const AST* p); private: ASTRef( const ASTRef& ); ASTRef& operator=( const ASTRef& ); }; template class ANTLR_API ASTRefCount { private: ASTRef* ref; public: ASTRefCount(const AST* p=0) : ref(p ? ASTRef::getRef(p) : 0) { } ASTRefCount(const ASTRefCount& other) : ref(other.ref ? other.ref->increment() : 0) { } ~ASTRefCount() { if (ref && ref->decrement()) delete ref; } ASTRefCount& operator=(AST* other) { ASTRef* tmp = ASTRef::getRef(other); if (ref && ref->decrement()) delete ref; ref=tmp; return *this; } ASTRefCount& operator=(const ASTRefCount& other) { if( other.ref != ref ) { ASTRef* tmp = other.ref ? other.ref->increment() : 0; if (ref && ref->decrement()) delete ref; ref=tmp; } return *this; } operator T* () const { return ref ? static_cast(ref->ptr) : 0; } T* operator->() const { return ref ? static_cast(ref->ptr) : 0; } T* get() const { return ref ? static_cast(ref->ptr) : 0; } }; typedef ASTRefCount RefAST; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_ASTRefCount_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/BaseAST.hpp000066400000000000000000000110271345112435200223010ustar00rootroot00000000000000#ifndef INC_BaseAST_hpp__ #define INC_BaseAST_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/BaseAST.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API BaseAST; typedef ASTRefCount RefBaseAST; class ANTLR_API BaseAST : public AST { public: BaseAST() : AST() { } BaseAST(const BaseAST& other) : AST(other) { } virtual ~BaseAST() { } /// Return the class name virtual const char* typeName( void ) const = 0; /// Clone this AST node. virtual RefAST clone( void ) const = 0; /// Is node t equal to this in terms of token type and text? virtual bool equals(RefAST t) const; /** Is t an exact structural and equals() match of this tree. The * 'this' reference is considered the start of a sibling list. */ virtual bool equalsList(RefAST t) const; /** Is 't' a subtree of this list? The siblings of the root are NOT ignored. */ virtual bool equalsListPartial(RefAST t) const; /** Is tree rooted at 'this' equal to 't'? The siblings of 'this' are * ignored. */ virtual bool equalsTree(RefAST t) const; /** Is 't' a subtree of the tree rooted at 'this'? The siblings of * 'this' are ignored. */ virtual bool equalsTreePartial(RefAST t) const; /** Walk the tree looking for all exact subtree matches. Return * an ASTEnumerator that lets the caller walk the list * of subtree roots found herein. */ virtual ANTLR_USE_NAMESPACE(std)vector findAll(RefAST t); /** Walk the tree looking for all subtrees. Return * an ASTEnumerator that lets the caller walk the list * of subtree roots found herein. */ virtual ANTLR_USE_NAMESPACE(std)vector findAllPartial(RefAST t); /// Add a node to the end of the child list for this node virtual void addChild(RefAST c) { if( !c ) return; RefBaseAST tmp = down; if (tmp) { while (tmp->right) tmp = tmp->right; tmp->right = c; } else down = c; } /** Get the number of child nodes of this node (shallow e.g. not of the * whole tree it spans). */ virtual size_t getNumberOfChildren() const; /// Get the first child of this node; null if no children virtual RefAST getFirstChild() const { return RefAST(down); } /// Get the next sibling in line after this one virtual RefAST getNextSibling() const { return RefAST(right); } /// Get the token text for this node virtual ANTLR_USE_NAMESPACE(std)string getText() const { return ""; } /// Get the token type for this node virtual int getType() const { return 0; } /// Remove all children virtual void removeChildren() { down = static_cast(static_cast(nullAST)); } /// Set the first child of a node. virtual void setFirstChild(RefAST c) { down = static_cast(static_cast(c)); } /// Set the next sibling after this one. virtual void setNextSibling(RefAST n) { right = static_cast(static_cast(n)); } /// Set the token text for this node virtual void setText(const ANTLR_USE_NAMESPACE(std)string& /*txt*/) { } /// Set the token type for this node virtual void setType(int /*type*/) { } #ifdef ANTLR_SUPPORT_XML /** print attributes of this node to 'out'. Override to customize XML * output. * @param out the stream to write the AST attributes to. */ virtual bool attributesToStream( ANTLR_USE_NAMESPACE(std)ostream& out ) const; /** Write this subtree to a stream. Overload this one to customize the XML * output for AST derived AST-types * @param output stream */ virtual void toStream( ANTLR_USE_NAMESPACE(std)ostream &out ) const; #endif /// Return string representation for the AST virtual ANTLR_USE_NAMESPACE(std)string toString() const { return getText(); } /// Print out a child sibling tree in LISP notation virtual ANTLR_USE_NAMESPACE(std)string toStringList() const; virtual ANTLR_USE_NAMESPACE(std)string toStringTree() const; protected: RefBaseAST down; RefBaseAST right; private: void doWorkForFindAll(ANTLR_USE_NAMESPACE(std)vector& v, RefAST target, bool partialMatch); }; /** Is node t equal to this in terms of token type and text? */ inline bool BaseAST::equals(RefAST t) const { if (!t) return false; return ((getType() == t->getType()) && (getText() == t->getText())); } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_BaseAST_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/BitSet.hpp000066400000000000000000000034761345112435200222620ustar00rootroot00000000000000#ifndef INC_BitSet_hpp__ #define INC_BitSet_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/BitSet.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** A BitSet to replace java.util.BitSet. * Primary differences are that most set operators return new sets * as opposed to oring and anding "in place". Further, a number of * operations were added. I cannot contain a BitSet because there * is no way to access the internal bits (which I need for speed) * and, because it is final, I cannot subclass to add functionality. * Consider defining set degree. Without access to the bits, I must * call a method n times to test the ith bit...ack! * * Also seems like or() from util is wrong when size of incoming set is bigger * than this.length. * * This is a C++ version of the Java class described above, with only * a handful of the methods implemented, because we don't need the * others at runtime. It's really just a wrapper around vector, * which should probably be changed to a wrapper around bitset, once * bitset is more widely available. * * @author Terence Parr, MageLang Institute * @author
Pete Wells */ class ANTLR_API BitSet { private: ANTLR_USE_NAMESPACE(std)vector storage; public: BitSet( unsigned int nbits=64 ); BitSet( const unsigned long* bits_, unsigned int nlongs); ~BitSet(); void add( unsigned int el ); bool member( unsigned int el ) const; ANTLR_USE_NAMESPACE(std)vector toArray() const; }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_BitSet_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CharBuffer.hpp000066400000000000000000000026721345112435200230740ustar00rootroot00000000000000#ifndef INC_CharBuffer_hpp__ #define INC_CharBuffer_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CharBuffer.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /**A Stream of characters fed to the lexer from a InputStream that can * be rewound via mark()/rewind() methods. *

* A dynamic array is used to buffer up all the input characters. Normally, * "k" characters are stored in the buffer. More characters may be stored * during guess mode (testing syntactic predicate), or when LT(i>k) is * referenced. * Consumption of characters is deferred. In other words, reading the next * character is not done by consume(), but deferred until needed by LA or LT. *

* * @see antlr.CharQueue */ class ANTLR_API CharBuffer : public InputBuffer { public: /// Create a character buffer CharBuffer( ANTLR_USE_NAMESPACE(std)istream& input ); /// Get the next character from the stream int getChar(); protected: // character source ANTLR_USE_NAMESPACE(std)istream& input; private: // NOTE: Unimplemented CharBuffer(const CharBuffer& other); CharBuffer& operator=(const CharBuffer& other); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CharBuffer_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CharInputBuffer.hpp000066400000000000000000000033441345112435200241110ustar00rootroot00000000000000#ifndef INC_CharInputBuffer_hpp__ # define INC_CharInputBuffer_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id:$ */ # include # include # ifdef HAS_NOT_CCTYPE_H # include # else # include # endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** CharInputBuffer.hpp provides an InputBuffer for plain character arrays (buffers). */ class CharInputBuffer : public InputBuffer { public: /** Construct a CharInputBuffer.hpp object with a char* buffer of 'size' * if 'owner' is true, then the buffer will be delete[]-ed on destruction. * @note it is assumed the buffer was allocated with new[]! */ CharInputBuffer( unsigned char* buf, size_t size, bool owner = false ) : buffer(buf) , ptr(buf) , end(buf + size) , delete_buffer(owner) { } /** Destructor * @note If you're using malloced data, then you probably need to change * this destructor. Or better use this class as template for your own. */ ~CharInputBuffer( void ) { if( delete_buffer && buffer ) delete [] buffer; } /** Reset the CharInputBuffer to initial state * Called from LexerInputState::reset. * @see LexerInputState */ virtual inline void reset( void ) { InputBuffer::reset(); ptr = buffer; } virtual int getChar( void ) { return (ptr < end) ? *ptr++ : EOF; } protected: unsigned char* buffer; ///< the buffer with data unsigned char* ptr; ///< position ptr into the buffer unsigned char* end; ///< end sentry for buffer bool delete_buffer; ///< flag signifying if we have to delete the buffer }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CharScanner.hpp000066400000000000000000000327431345112435200232560ustar00rootroot00000000000000#ifndef INC_CharScanner_hpp__ #define INC_CharScanner_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CharScanner.hpp#2 $ */ #include #include #ifdef HAS_NOT_CCTYPE_H #include #else #include #endif #if ( _MSC_VER == 1200 ) // VC6 seems to need this // note that this is not a standard C++ include file. # include #endif #include #include #include #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API CharScanner; ANTLR_C_USING(tolower) #ifdef ANTLR_REALLY_NO_STRCASECMP // Apparently, neither strcasecmp nor stricmp is standard, and Codewarrior // on the mac has neither... inline int strcasecmp(const char *s1, const char *s2) { while (true) { char c1 = tolower(*s1++), c2 = tolower(*s2++); if (c1 < c2) return -1; if (c1 > c2) return 1; if (c1 == 0) return 0; } } #else #ifdef NO_STRCASECMP ANTLR_C_USING(stricmp) #else #include ANTLR_C_USING(strcasecmp) #endif #endif /** Functor for the literals map */ class ANTLR_API CharScannerLiteralsLess : public ANTLR_USE_NAMESPACE(std)binary_function { private: const CharScanner* scanner; public: #ifdef NO_TEMPLATE_PARTS CharScannerLiteralsLess() {} // not really used, definition to appease MSVC #endif CharScannerLiteralsLess(const CharScanner* theScanner) : scanner(theScanner) { } bool operator() (const ANTLR_USE_NAMESPACE(std)string& x,const ANTLR_USE_NAMESPACE(std)string& y) const; // defaults are good enough.. // CharScannerLiteralsLess(const CharScannerLiteralsLess&); // CharScannerLiteralsLess& operator=(const CharScannerLiteralsLess&); }; /** Superclass of generated lexers */ class ANTLR_API CharScanner : public TokenStream { protected: typedef RefToken (*factory_type)(); public: CharScanner(InputBuffer& cb, bool case_sensitive ); CharScanner(InputBuffer* cb, bool case_sensitive ); CharScanner(const LexerSharedInputState& state, bool case_sensitive ); virtual ~CharScanner() { } virtual int LA(unsigned int i); virtual void append(char c) { if (saveConsumedInput) { size_t l = text.length(); if ((l%256) == 0) text.reserve(l+256); text.replace(l,0,&c,1); } } virtual void append(const ANTLR_USE_NAMESPACE(std)string& s) { if( saveConsumedInput ) text += s; } virtual void commit() { inputState->getInput().commit(); } /** called by the generated lexer to do error recovery, override to * customize the behaviour. */ virtual void recover(const RecognitionException& ex, const BitSet& tokenSet) { (void)ex; consume(); consumeUntil(tokenSet); } virtual void consume() { if (inputState->guessing == 0) { int c = LA(1); if (caseSensitive) { append(c); } else { // use input.LA(), not LA(), to get original case // CharScanner.LA() would toLower it. append(inputState->getInput().LA(1)); } // RK: in a sense I don't like this automatic handling. if (c == '\t') tab(); else inputState->column++; } inputState->getInput().consume(); } /** Consume chars until one matches the given char */ virtual void consumeUntil(int c) { for(;;) { int la_1 = LA(1); if( la_1 == EOF_CHAR || la_1 == c ) break; consume(); } } /** Consume chars until one matches the given set */ virtual void consumeUntil(const BitSet& set) { for(;;) { int la_1 = LA(1); if( la_1 == EOF_CHAR || set.member(la_1) ) break; consume(); } } /// Mark the current position and return a id for it virtual unsigned int mark() { return inputState->getInput().mark(); } /// Rewind the scanner to a previously marked position virtual void rewind(unsigned int pos) { inputState->getInput().rewind(pos); } /// See if input contains character 'c' throw MismatchedCharException if not virtual void match(int c) { int la_1 = LA(1); if ( la_1 != c ) throw MismatchedCharException(la_1, c, false, this); consume(); } /** See if input contains element from bitset b * throw MismatchedCharException if not */ virtual void match(const BitSet& b) { int la_1 = LA(1); if ( !b.member(la_1) ) throw MismatchedCharException( la_1, b, false, this ); consume(); } /** See if input contains string 's' throw MismatchedCharException if not * @note the string cannot match EOF */ virtual void match( const char* s ) { while( *s != '\0' ) { // the & 0xFF is here to prevent sign extension lateron int la_1 = LA(1), c = (*s++ & 0xFF); if ( la_1 != c ) throw MismatchedCharException(la_1, c, false, this); consume(); } } /** See if input contains string 's' throw MismatchedCharException if not * @note the string cannot match EOF */ virtual void match(const ANTLR_USE_NAMESPACE(std)string& s) { size_t len = s.length(); for (size_t i = 0; i < len; i++) { // the & 0xFF is here to prevent sign extension lateron int la_1 = LA(1), c = (s[i] & 0xFF); if ( la_1 != c ) throw MismatchedCharException(la_1, c, false, this); consume(); } } /** See if input does not contain character 'c' * throw MismatchedCharException if not */ virtual void matchNot(int c) { int la_1 = LA(1); if ( la_1 == c ) throw MismatchedCharException(la_1, c, true, this); consume(); } /** See if input contains character in range c1-c2 * throw MismatchedCharException if not */ virtual void matchRange(int c1, int c2) { int la_1 = LA(1); if ( la_1 < c1 || la_1 > c2 ) throw MismatchedCharException(la_1, c1, c2, false, this); consume(); } virtual bool getCaseSensitive() const { return caseSensitive; } virtual void setCaseSensitive(bool t) { caseSensitive = t; } virtual bool getCaseSensitiveLiterals() const=0; /// Get the line the scanner currently is in (starts at 1) virtual int getLine() const { return inputState->line; } /// set the line number virtual void setLine(int l) { inputState->line = l; } /// Get the column the scanner currently is in (starts at 1) virtual int getColumn() const { return inputState->column; } /// set the column number virtual void setColumn(int c) { inputState->column = c; } /// get the filename for the file currently used virtual const ANTLR_USE_NAMESPACE(std)string& getFilename() const { return inputState->filename; } /// Set the filename the scanner is using (used in error messages) virtual void setFilename(const ANTLR_USE_NAMESPACE(std)string& f) { inputState->filename = f; } virtual bool getCommitToPath() const { return commitToPath; } virtual void setCommitToPath(bool commit) { commitToPath = commit; } /** return a copy of the current text buffer */ virtual const ANTLR_USE_NAMESPACE(std)string& getText() const { return text; } virtual void setText(const ANTLR_USE_NAMESPACE(std)string& s) { text = s; } virtual void resetText() { text = ""; inputState->tokenStartColumn = inputState->column; inputState->tokenStartLine = inputState->line; } virtual RefToken getTokenObject() const { return _returnToken; } /** Used to keep track of line breaks, needs to be called from * within generated lexers when a \n \r is encountered. */ virtual void newline() { ++inputState->line; inputState->column = 1; } /** Advance the current column number by an appropriate amount according * to the tabsize. This method needs to be explicitly called from the * lexer rules encountering tabs. */ virtual void tab() { int c = getColumn(); int nc = ( ((c-1)/tabsize) + 1) * tabsize + 1; // calculate tab stop setColumn( nc ); } /// set the tabsize. Returns the old tabsize int setTabsize( int size ) { int oldsize = tabsize; tabsize = size; return oldsize; } /// Return the tabsize used by the scanner int getTabSize() const { return tabsize; } /** Report exception errors caught in nextToken() */ virtual void reportError(const RecognitionException& e); /** Parser error-reporting function can be overridden in subclass */ virtual void reportError(const ANTLR_USE_NAMESPACE(std)string& s); /** Parser warning-reporting function can be overridden in subclass */ virtual void reportWarning(const ANTLR_USE_NAMESPACE(std)string& s); virtual InputBuffer& getInputBuffer() { return inputState->getInput(); } virtual LexerSharedInputState getInputState() { return inputState; } /** set the input state for the lexer. * @note state is a reference counted object, hence no reference */ virtual void setInputState(LexerSharedInputState state) { inputState = state; } /// Set the factory for created tokens virtual void setTokenObjectFactory(factory_type factory) { tokenFactory = factory; } /** Test the token text against the literals table * Override this method to perform a different literals test */ virtual int testLiteralsTable(int ttype) const { ANTLR_USE_NAMESPACE(std)map::const_iterator i = literals.find(text); if (i != literals.end()) ttype = (*i).second; return ttype; } /** Test the text passed in against the literals table * Override this method to perform a different literals test * This is used primarily when you want to test a portion of * a token */ virtual int testLiteralsTable(const ANTLR_USE_NAMESPACE(std)string& txt,int ttype) const { ANTLR_USE_NAMESPACE(std)map::const_iterator i = literals.find(txt); if (i != literals.end()) ttype = (*i).second; return ttype; } /// Override this method to get more specific case handling virtual int toLower(int c) const { // test on EOF_CHAR for buggy (?) STLPort tolower (or HPUX tolower?) // also VC++ 6.0 does this. (see fix 422 (is reverted by this fix) // this one is more structural. Maybe make this configurable. return (c == EOF_CHAR ? EOF_CHAR : tolower(c)); } /** This method is called by YourLexer::nextToken() when the lexer has * hit EOF condition. EOF is NOT a character. * This method is not called if EOF is reached during * syntactic predicate evaluation or during evaluation * of normal lexical rules, which presumably would be * an IOException. This traps the "normal" EOF condition. * * uponEOF() is called after the complete evaluation of * the previous token and only if your parser asks * for another token beyond that last non-EOF token. * * You might want to throw token or char stream exceptions * like: "Heh, premature eof" or a retry stream exception * ("I found the end of this file, go back to referencing file"). */ virtual void uponEOF() { } /// Methods used to change tracing behavior virtual void traceIndent(); virtual void traceIn(const char* rname); virtual void traceOut(const char* rname); #ifndef NO_STATIC_CONSTS static const int EOF_CHAR = EOF; #else enum { EOF_CHAR = EOF }; #endif protected: ANTLR_USE_NAMESPACE(std)string text; ///< Text of current token /// flag indicating wether consume saves characters bool saveConsumedInput; factory_type tokenFactory; ///< Factory for tokens bool caseSensitive; ///< Is this lexer case sensitive ANTLR_USE_NAMESPACE(std)map literals; // set by subclass RefToken _returnToken; ///< used to return tokens w/o using return val /// Input state, gives access to input stream, shared among different lexers LexerSharedInputState inputState; /** Used during filter mode to indicate that path is desired. * A subsequent scan error will report an error as usual * if acceptPath=true; */ bool commitToPath; int tabsize; ///< tab size the scanner uses. /// Create a new RefToken of type t virtual RefToken makeToken(int t) { RefToken tok = tokenFactory(); tok->setType(t); tok->setColumn(inputState->tokenStartColumn); tok->setLine(inputState->tokenStartLine); return tok; } /** Tracer class, used when -traceLexer is passed to antlr */ class Tracer { private: CharScanner* parser; const char* text; Tracer(const Tracer& other); // undefined Tracer& operator=(const Tracer& other); // undefined public: Tracer( CharScanner* p,const char* t ) : parser(p), text(t) { parser->traceIn(text); } ~Tracer() { parser->traceOut(text); } }; int traceDepth; private: CharScanner( const CharScanner& other ); // undefined CharScanner& operator=( const CharScanner& other ); // undefined #ifndef NO_STATIC_CONSTS static const int NO_CHAR = 0; #else enum { NO_CHAR = 0 }; #endif }; inline int CharScanner::LA(unsigned int i) { int c = inputState->getInput().LA(i); if ( caseSensitive ) return c; else return toLower(c); // VC 6 tolower bug caught in toLower. } inline bool CharScannerLiteralsLess::operator() (const ANTLR_USE_NAMESPACE(std)string& x,const ANTLR_USE_NAMESPACE(std)string& y) const { if (scanner->getCaseSensitiveLiterals()) return ANTLR_USE_NAMESPACE(std)less()(x,y); else { #ifdef NO_STRCASECMP return (stricmp(x.c_str(),y.c_str())<0); #else return (strcasecmp(x.c_str(),y.c_str())<0); #endif } } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CharScanner_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CharStreamException.hpp000066400000000000000000000013251345112435200247670ustar00rootroot00000000000000#ifndef INC_CharStreamException_hpp__ #define INC_CharStreamException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CharStreamException.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API CharStreamException : public ANTLRException { public: CharStreamException(const ANTLR_USE_NAMESPACE(std)string& s) : ANTLRException(s) {} ~CharStreamException() throw() {} }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CharStreamException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CharStreamIOException.hpp000066400000000000000000000014451345112435200252220ustar00rootroot00000000000000#ifndef INC_CharStreamIOException_hpp__ #define INC_CharStreamIOException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CharStreamIOException.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API CharStreamIOException : public CharStreamException { public: ANTLR_USE_NAMESPACE(std)exception io; CharStreamIOException(ANTLR_USE_NAMESPACE(std)exception& e) : CharStreamException(e.what()), io(e) {} ~CharStreamIOException() throw() {} }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CharStreamIOException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CircularQueue.hpp000066400000000000000000000041471345112435200236350ustar00rootroot00000000000000#ifndef INC_CircularQueue_hpp__ #define INC_CircularQueue_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CircularQueue.hpp#2 $ */ #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif // Resize every 5000 items #define OFFSET_MAX_RESIZE 5000 template class ANTLR_API CircularQueue { public: CircularQueue() : storage() , m_offset(0) { } ~CircularQueue() { } /// Clear the queue inline void clear( void ) { m_offset = 0; storage.clear(); } /// @todo this should use at or should have a check inline T elementAt( size_t idx ) const { return storage[idx+m_offset]; } void removeFirst() { if (m_offset >= OFFSET_MAX_RESIZE) { storage.erase( storage.begin(), storage.begin() + m_offset + 1 ); m_offset = 0; } else ++m_offset; } inline void removeItems( size_t nb ) { // it would be nice if we would not get called with nb > entries // (or to be precise when entries() == 0) // This case is possible when lexer/parser::recover() calls // consume+consumeUntil when the queue is empty. // In recover the consume says to prepare to read another // character/token. Then in the subsequent consumeUntil the // LA() call will trigger // syncConsume which calls this method *before* the same queue // has been sufficiently filled. if( nb > entries() ) nb = entries(); if (m_offset >= OFFSET_MAX_RESIZE) { storage.erase( storage.begin(), storage.begin() + m_offset + nb ); m_offset = 0; } else m_offset += nb; } inline void append(const T& t) { storage.push_back(t); } inline size_t entries() const { return storage.size() - m_offset; } private: ANTLR_USE_NAMESPACE(std)vector storage; size_t m_offset; CircularQueue(const CircularQueue&); const CircularQueue& operator=(const CircularQueue&); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CircularQueue_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CommonAST.hpp000066400000000000000000000035561345112435200226670ustar00rootroot00000000000000#ifndef INC_CommonAST_hpp__ #define INC_CommonAST_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CommonAST.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API CommonAST : public BaseAST { public: CommonAST() : BaseAST() , ttype( Token::INVALID_TYPE ) , text() { } CommonAST( RefToken t ) : BaseAST() , ttype( t->getType() ) , text( t->getText() ) { } CommonAST( const CommonAST& other ) : BaseAST(other) , ttype(other.ttype) , text(other.text) { } virtual ~CommonAST() { } virtual const char* typeName( void ) const { return CommonAST::TYPE_NAME; } /// Clone this AST node. virtual RefAST clone( void ) const { CommonAST *ast = new CommonAST( *this ); return RefAST(ast); } virtual ANTLR_USE_NAMESPACE(std)string getText() const { return text; } virtual int getType() const { return ttype; } virtual void initialize( int t, const ANTLR_USE_NAMESPACE(std)string& txt ) { setType(t); setText(txt); } virtual void initialize( RefAST t ) { setType(t->getType()); setText(t->getText()); } virtual void initialize( RefToken t ) { setType(t->getType()); setText(t->getText()); } #ifdef ANTLR_SUPPORT_XML virtual void initialize( ANTLR_USE_NAMESPACE(std)istream& in ); #endif virtual void setText( const ANTLR_USE_NAMESPACE(std)string& txt ) { text = txt; } virtual void setType( int type ) { ttype = type; } static RefAST factory(); static const char* const TYPE_NAME; protected: int ttype; ANTLR_USE_NAMESPACE(std)string text; }; typedef ASTRefCount RefCommonAST; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CommonAST_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CommonASTWithHiddenTokens.hpp000066400000000000000000000030151345112435200260110ustar00rootroot00000000000000#ifndef INC_CommonASTWithHiddenTokens_hpp__ #define INC_CommonASTWithHiddenTokens_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CommonASTWithHiddenTokens.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** A CommonAST whose initialization copies hidden token * information from the Token used to create a node. */ class ANTLR_API CommonASTWithHiddenTokens : public CommonAST { public: CommonASTWithHiddenTokens(); virtual ~CommonASTWithHiddenTokens(); virtual const char* typeName( void ) const { return CommonASTWithHiddenTokens::TYPE_NAME; } /// Clone this AST node. virtual RefAST clone( void ) const; // Borland C++ builder seems to need the decl's of the first two... virtual void initialize(int t,const ANTLR_USE_NAMESPACE(std)string& txt); virtual void initialize(RefAST t); virtual void initialize(RefToken t); virtual RefToken getHiddenAfter() const { return hiddenAfter; } virtual RefToken getHiddenBefore() const { return hiddenBefore; } static RefAST factory(); static const char* const TYPE_NAME; protected: RefToken hiddenBefore,hiddenAfter; // references to hidden tokens }; typedef ASTRefCount RefCommonASTWithHiddenTokens; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CommonASTWithHiddenTokens_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CommonHiddenStreamToken.hpp000066400000000000000000000017561345112435200256100ustar00rootroot00000000000000#ifndef INC_CommonHiddenStreamToken_hpp__ #define INC_CommonHiddenStreamToken_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CommonHiddenStreamToken.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API CommonHiddenStreamToken : public CommonToken { protected: RefToken hiddenBefore; RefToken hiddenAfter; public: CommonHiddenStreamToken(); CommonHiddenStreamToken(int t, const ANTLR_USE_NAMESPACE(std)string& txt); CommonHiddenStreamToken(const ANTLR_USE_NAMESPACE(std)string& s); RefToken getHiddenAfter(); RefToken getHiddenBefore(); static RefToken factory(); void setHiddenAfter(RefToken t); void setHiddenBefore(RefToken t); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CommonHiddenStreamToken_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/CommonToken.hpp000066400000000000000000000032431345112435200233110ustar00rootroot00000000000000#ifndef INC_CommonToken_hpp__ #define INC_CommonToken_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CommonToken.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API CommonToken : public Token { public: CommonToken(); CommonToken(int t, const ANTLR_USE_NAMESPACE(std)string& txt); CommonToken(const ANTLR_USE_NAMESPACE(std)string& s); /// return contents of token virtual ANTLR_USE_NAMESPACE(std)string getText() const { return text; } /// set contents of token virtual void setText(const ANTLR_USE_NAMESPACE(std)string& s) { text = s; } /** get the line the token is at (starting at 1) * @see CharScanner::newline() * @see CharScanner::tab() */ virtual int getLine() const { return line; } /** gt the column the token is at (starting at 1) * @see CharScanner::newline() * @see CharScanner::tab() */ virtual int getColumn() const { return col; } /// set line for token virtual void setLine(int l) { line = l; } /// set column for token virtual void setColumn(int c) { col = c; } virtual ANTLR_USE_NAMESPACE(std)string toString() const; static RefToken factory(); protected: // most tokens will want line and text information int line; int col; ANTLR_USE_NAMESPACE(std)string text; private: CommonToken(const CommonToken&); const CommonToken& operator=(const CommonToken&); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CommonToken_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/IOException.hpp000066400000000000000000000016621345112435200232510ustar00rootroot00000000000000#ifndef INC_IOException_hpp__ #define INC_IOException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id:$ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** Generic IOException used inside support code. (thrown by XML I/O routs) * basically this is something I'm using since a lot of compilers don't * support ios_base::failure. */ class ANTLR_API IOException : public ANTLRException { public: ANTLR_USE_NAMESPACE(std)exception io; IOException( ANTLR_USE_NAMESPACE(std)exception& e ) : ANTLRException(e.what()) { } IOException( const ANTLR_USE_NAMESPACE(std)string& mesg ) : ANTLRException(mesg) { } virtual ~IOException() throw() { } }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_IOException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/InputBuffer.hpp000066400000000000000000000066651345112435200233240ustar00rootroot00000000000000#ifndef INC_InputBuffer_hpp__ #define INC_InputBuffer_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/InputBuffer.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** A Stream of characters fed to the lexer from a InputStream that can * be rewound via mark()/rewind() methods. *

* A dynamic array is used to buffer up all the input characters. Normally, * "k" characters are stored in the buffer. More characters may be stored during * guess mode (testing syntactic predicate), or when LT(i>k) is referenced. * Consumption of characters is deferred. In other words, reading the next * character is not done by conume(), but deferred until needed by LA or LT. *

* * @see antlr.CharQueue */ class ANTLR_API InputBuffer { public: /** Create a character buffer */ InputBuffer() : nMarkers(0) , markerOffset(0) , numToConsume(0) { } virtual ~InputBuffer() { } /// Reset the input buffer to empty state virtual inline void reset( void ) { nMarkers = 0; markerOffset = 0; numToConsume = 0; queue.clear(); } /** This method updates the state of the input buffer so that * the text matched since the most recent mark() is no longer * held by the buffer. So, you either do a mark/rewind for * failed predicate or mark/commit to keep on parsing without * rewinding the input. */ inline void commit( void ) { nMarkers--; } /** Mark another character for deferred consumption */ virtual inline void consume() { numToConsume++; } /** Ensure that the character buffer is sufficiently full */ virtual void fill(unsigned int amount); /** Override this in subclasses to get the next character */ virtual int getChar()=0; /** Get a lookahead character */ virtual inline int LA(unsigned int i) { fill(i); return queue.elementAt(markerOffset + i - 1); } /** Return an integer marker that can be used to rewind the buffer to * its current state. */ virtual unsigned int mark(); /// Are there any marks active in the InputBuffer virtual inline bool isMarked() const { return (nMarkers != 0); } /** Rewind the character buffer to a marker. * @param mark Marker returned previously from mark() */ virtual void rewind(unsigned int mark); /** Get the number of non-consumed characters */ virtual unsigned int entries() const; ANTLR_USE_NAMESPACE(std)string getLAChars() const; ANTLR_USE_NAMESPACE(std)string getMarkedChars() const; protected: // char source // leave to subclasses // Number of active markers unsigned int nMarkers; // = 0; // Additional offset used when markers are active unsigned int markerOffset; // = 0; // Number of calls to consume() since last LA() or LT() call unsigned int numToConsume; // = 0; // Circular queue CircularQueue queue; /** Sync up deferred consumption */ void syncConsume(); private: InputBuffer(const InputBuffer& other); InputBuffer& operator=(const InputBuffer& other); }; /** Sync up deferred consumption */ inline void InputBuffer::syncConsume() { if (numToConsume > 0) { if (nMarkers > 0) markerOffset += numToConsume; else queue.removeItems( numToConsume ); numToConsume = 0; } } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_InputBuffer_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/LLkParser.hpp000066400000000000000000000030761345112435200227230ustar00rootroot00000000000000#ifndef INC_LLkParser_hpp__ #define INC_LLkParser_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/LLkParser.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /**An LL(k) parser. * * @see antlr.Token * @see antlr.TokenBuffer * @see antlr.LL1Parser */ class ANTLR_API LLkParser : public Parser { public: LLkParser(const ParserSharedInputState& lexer, int k_); LLkParser(TokenBuffer& tokenBuf, int k_); LLkParser(TokenStream& lexer, int k_); /** Consume another token from the input stream. Can only write sequentially! * If you need 3 tokens ahead, you must consume() 3 times. *

* Note that it is possible to overwrite tokens that have not been matched. * For example, calling consume() 3 times when k=2, means that the first token * consumed will be overwritten with the 3rd. */ virtual inline void consume() { inputState->getInput().consume(); } virtual inline int LA(unsigned int i) { return inputState->getInput().LA(i); } virtual inline RefToken LT(unsigned int i) { return inputState->getInput().LT(i); } protected: /// the lookahead this LL(k) parser is using. int k; private: void trace(const char* ee, const char* rname); public: virtual void traceIn(const char* rname); virtual void traceOut(const char* rname); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_LLkParser_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/LexerSharedInputState.hpp000066400000000000000000000066271345112435200253200ustar00rootroot00000000000000#ifndef INC_LexerSharedInputState_hpp__ #define INC_LexerSharedInputState_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/LexerSharedInputState.hpp#2 $ */ #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** This object contains the data associated with an * input stream of characters. Multiple lexers * share a single LexerSharedInputState to lex * the same input stream. */ class ANTLR_API LexerInputState { public: /** Construct a new LexerInputState * @param inbuf the InputBuffer to read from. The object is deleted together * with the LexerInputState object. */ LexerInputState(InputBuffer* inbuf) : column(1) , line(1) , tokenStartColumn(1) , tokenStartLine(1) , guessing(0) , filename("") , input(inbuf) , inputResponsible(true) { } /** Construct a new LexerInputState * @param inbuf the InputBuffer to read from. */ LexerInputState(InputBuffer& inbuf) : column(1) , line(1) , tokenStartColumn(1) , tokenStartLine(1) , guessing(0) , filename("") , input(&inbuf) , inputResponsible(false) { } /** Construct a new LexerInputState * @param in an istream to read from. * @see antlr.CharBuffer */ LexerInputState(ANTLR_USE_NAMESPACE(std)istream& in) : column(1) , line(1) , tokenStartColumn(1) , tokenStartLine(1) , guessing(0) , filename("") , input(new CharBuffer(in)) , inputResponsible(true) { } /** Reset the LexerInputState with a specified stream and filename. * This method is a hack, dunno what I was thinking when I added it. * This should actually be done in a subclass. * @deprecated */ virtual void initialize( ANTLR_USE_NAMESPACE(std)istream& in, const char* file = "" ) { column = 1; line = 1; tokenStartColumn = 1; tokenStartLine = 1; guessing = 0; filename = file; if( input && inputResponsible ) delete input; input = new CharBuffer(in); inputResponsible = true; } /** Reset the LexerInputState to initial state. * The underlying InputBuffer is also reset. */ virtual void reset( void ) { column = 1; line = 1; tokenStartColumn = 1; tokenStartLine = 1; guessing = 0; input->reset(); } /** Set the file position of the SharedLexerInputState. * @param line_ line number to be set * @param column_ column number to be set */ void setPosition( int line_, int column_ ) { line = line_; column = column_; } virtual ~LexerInputState() { if (inputResponsible) delete input; } int column; int line; int tokenStartColumn; int tokenStartLine; int guessing; /** What file (if known) caused the problem? */ ANTLR_USE_NAMESPACE(std)string filename; InputBuffer& getInput(); private: /// Input buffer we use InputBuffer* input; /// Who is responsible for cleaning up the InputBuffer? bool inputResponsible; // we don't want these: LexerInputState(const LexerInputState&); LexerInputState& operator=(const LexerInputState&); }; inline InputBuffer& LexerInputState::getInput() { return *input; } /// A reference counted LexerInputState object typedef RefCount LexerSharedInputState; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_LexerSharedInputState_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/MismatchedCharException.hpp000066400000000000000000000037001345112435200256110ustar00rootroot00000000000000#ifndef INC_MismatchedCharException_hpp__ #define INC_MismatchedCharException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/MismatchedCharException.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class CharScanner; class ANTLR_API MismatchedCharException : public RecognitionException { public: // Types of chars #ifndef NO_STATIC_CONSTS static const int CHAR = 1; static const int NOT_CHAR = 2; static const int RANGE = 3; static const int NOT_RANGE = 4; static const int SET = 5; static const int NOT_SET = 6; #else enum { CHAR = 1, NOT_CHAR = 2, RANGE = 3, NOT_RANGE = 4, SET = 5, NOT_SET = 6 }; #endif public: // One of the above int mismatchType; // what was found on the input stream int foundChar; // For CHAR/NOT_CHAR and RANGE/NOT_RANGE int expecting; // For RANGE/NOT_RANGE (expecting is lower bound of range) int upper; // For SET/NOT_SET BitSet set; protected: // who knows...they may want to ask scanner questions CharScanner* scanner; public: MismatchedCharException(); // Expected range / not range MismatchedCharException( int c, int lower, int upper_, bool matchNot, CharScanner* scanner_ ); // Expected token / not token MismatchedCharException( int c, int expecting_, bool matchNot, CharScanner* scanner_ ); // Expected BitSet / not BitSet MismatchedCharException( int c, BitSet set_, bool matchNot, CharScanner* scanner_ ); ~MismatchedCharException() throw() {} /** * Returns a clean error message (no line number/column information) */ ANTLR_USE_NAMESPACE(std)string getMessage() const; }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_MismatchedCharException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/MismatchedTokenException.hpp000066400000000000000000000061301345112435200260140ustar00rootroot00000000000000#ifndef INC_MismatchedTokenException_hpp__ #define INC_MismatchedTokenException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/MismatchedTokenException.hpp#2 $ */ #include #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API MismatchedTokenException : public RecognitionException { public: MismatchedTokenException(); /// Expected range / not range MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefAST node_, int lower, int upper_, bool matchNot ); // Expected token / not token MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefAST node_, int expecting_, bool matchNot ); // Expected BitSet / not BitSet MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefAST node_, BitSet set_, bool matchNot ); // Expected range / not range MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefToken token_, int lower, int upper_, bool matchNot, const ANTLR_USE_NAMESPACE(std)string& fileName_ ); // Expected token / not token MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefToken token_, int expecting_, bool matchNot, const ANTLR_USE_NAMESPACE(std)string& fileName_ ); // Expected BitSet / not BitSet MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefToken token_, BitSet set_, bool matchNot, const ANTLR_USE_NAMESPACE(std)string& fileName_ ); ~MismatchedTokenException() throw() {} /** * Returns a clean error message (no line number/column information) */ ANTLR_USE_NAMESPACE(std)string getMessage() const; public: /// The token that was encountered const RefToken token; /// The offending AST node if tree walking const RefAST node; /// taken from node or token object ANTLR_USE_NAMESPACE(std)string tokenText; /// Types of tokens #ifndef NO_STATIC_CONSTS static const int TOKEN = 1; static const int NOT_TOKEN = 2; static const int RANGE = 3; static const int NOT_RANGE = 4; static const int SET = 5; static const int NOT_SET = 6; #else enum { TOKEN = 1, NOT_TOKEN = 2, RANGE = 3, NOT_RANGE = 4, SET = 5, NOT_SET = 6 }; #endif public: /// One of the above int mismatchType; /// For TOKEN/NOT_TOKEN and RANGE/NOT_RANGE int expecting; /// For RANGE/NOT_RANGE (expecting is lower bound of range) int upper; /// For SET/NOT_SET BitSet set; private: /// Token names array for formatting const char* const* tokenNames; /// Max number of tokens in tokenNames const int numTokens; /// Return token name for tokenType ANTLR_USE_NAMESPACE(std)string tokenName(int tokenType) const; }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_MismatchedTokenException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/NoViableAltException.hpp000066400000000000000000000020151345112435200250730ustar00rootroot00000000000000#ifndef INC_NoViableAltException_hpp__ #define INC_NoViableAltException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/NoViableAltException.hpp#2 $ */ #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API NoViableAltException : public RecognitionException { public: const RefToken token; const RefAST node; // handles parsing and treeparsing NoViableAltException(RefAST t); NoViableAltException(RefToken t,const ANTLR_USE_NAMESPACE(std)string& fileName_); ~NoViableAltException() throw() {} /** * Returns a clean error message (no line number/column information) */ ANTLR_USE_NAMESPACE(std)string getMessage() const; }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_NoViableAltException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/NoViableAltForCharException.hpp000066400000000000000000000020721345112435200263430ustar00rootroot00000000000000#ifndef INC_NoViableAltForCharException_hpp__ # define INC_NoViableAltForCharException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/NoViableAltForCharException.hpp#2 $ */ # include # include # include # ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { # endif class ANTLR_API NoViableAltForCharException : public RecognitionException { public: NoViableAltForCharException(int c, CharScanner* scanner); NoViableAltForCharException(int c, const ANTLR_USE_NAMESPACE(std)string& fileName_, int line_, int column_); virtual ~NoViableAltForCharException() throw() { } /// Returns a clean error message (no line number/column information) ANTLR_USE_NAMESPACE(std)string getMessage() const; protected: int foundChar; }; # ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } # endif #endif //INC_NoViableAltForCharException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/Parser.hpp000066400000000000000000000212741345112435200223200ustar00rootroot00000000000000#ifndef INC_Parser_hpp__ #define INC_Parser_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/Parser.hpp#2 $ */ #include #include #include #include #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif extern bool DEBUG_PARSER; /** A generic ANTLR parser (LL(k) for k>=1) containing a bunch of * utility routines useful at any lookahead depth. We distinguish between * the LL(1) and LL(k) parsers because of efficiency. This may not be * necessary in the near future. * * Each parser object contains the state of the parse including a lookahead * cache (the form of which is determined by the subclass), whether or * not the parser is in guess mode, where tokens come from, etc... * *

* During guess mode, the current lookahead token(s) and token type(s) * cache must be saved because the token stream may not have been informed * to save the token (via mark) before the try block. * Guessing is started by: *

    *
  1. saving the lookahead cache. *
  2. marking the current position in the TokenBuffer. *
  3. increasing the guessing level. *
* * After guessing, the parser state is restored by: *
    *
  1. restoring the lookahead cache. *
  2. rewinding the TokenBuffer. *
  3. decreasing the guessing level. *
* * @see antlr.Token * @see antlr.TokenBuffer * @see antlr.TokenStream * @see antlr.LL1Parser * @see antlr.LLkParser * * @todo add constructors with ASTFactory. */ class ANTLR_API Parser { protected: Parser(TokenBuffer& input) : inputState(new ParserInputState(input)), astFactory(0), traceDepth(0) { } Parser(TokenBuffer* input) : inputState(new ParserInputState(input)), astFactory(0), traceDepth(0) { } Parser(const ParserSharedInputState& state) : inputState(state), astFactory(0), traceDepth(0) { } public: virtual ~Parser() { } /** Return the token type of the ith token of lookahead where i=1 * is the current token being examined by the parser (i.e., it * has not been matched yet). */ virtual int LA(unsigned int i)=0; /// Return the i-th token of lookahead virtual RefToken LT(unsigned int i)=0; /** DEPRECATED! Specify the factory to be used during tree building. (Compulsory) * Setting the factory is nowadays compulsory. * @see setASTFactory */ virtual void setASTNodeFactory( ASTFactory *factory ) { astFactory = factory; } /** Specify the factory to be used during tree building. (Compulsory) * Setting the factory is nowadays compulsory. */ virtual void setASTFactory( ASTFactory *factory ) { astFactory = factory; } /** Return a pointer to the ASTFactory used. * So you might use it in subsequent treewalkers or to reload AST's * from disk. */ virtual ASTFactory* getASTFactory() { return astFactory; } /** Get the root AST node of the generated AST. When using a custom AST type * or heterogenous AST's, you'll have to convert it to the right type * yourself. */ virtual RefAST getAST() = 0; /// Return the filename of the input file. virtual inline ANTLR_USE_NAMESPACE(std)string getFilename() const { return inputState->filename; } /// Set the filename of the input file (used for error reporting). virtual void setFilename(const ANTLR_USE_NAMESPACE(std)string& f) { inputState->filename = f; } virtual void setInputState(ParserSharedInputState state) { inputState = state; } virtual inline ParserSharedInputState getInputState() const { return inputState; } /// Get another token object from the token stream virtual void consume()=0; /// Consume tokens until one matches the given token virtual void consumeUntil(int tokenType) { while (LA(1) != Token::EOF_TYPE && LA(1) != tokenType) consume(); } /// Consume tokens until one matches the given token set virtual void consumeUntil(const BitSet& set) { while (LA(1) != Token::EOF_TYPE && !set.member(LA(1))) consume(); } /** Make sure current lookahead symbol matches token type t. * Throw an exception upon mismatch, which is catch by either the * error handler or by the syntactic predicate. */ virtual void match(int t) { if ( DEBUG_PARSER ) { traceIndent(); ANTLR_USE_NAMESPACE(std)cout << "enter match(" << t << ") with LA(1)=" << LA(1) << ANTLR_USE_NAMESPACE(std)endl; } if ( LA(1) != t ) { if ( DEBUG_PARSER ) { traceIndent(); ANTLR_USE_NAMESPACE(std)cout << "token mismatch: " << LA(1) << "!=" << t << ANTLR_USE_NAMESPACE(std)endl; } throw MismatchedTokenException(getTokenNames(), getNumTokens(), LT(1), t, false, getFilename()); } else { // mark token as consumed -- fetch next token deferred until LA/LT consume(); } } virtual void matchNot(int t) { if ( LA(1)==t ) { // Throws inverted-sense exception throw MismatchedTokenException(getTokenNames(), getNumTokens(), LT(1), t, true, getFilename()); } else { // mark token as consumed -- fetch next token deferred until LA/LT consume(); } } /** Make sure current lookahead symbol matches the given set * Throw an exception upon mismatch, which is catch by either the * error handler or by the syntactic predicate. */ virtual void match(const BitSet& b) { if ( DEBUG_PARSER ) { traceIndent(); ANTLR_USE_NAMESPACE(std)cout << "enter match(" << "bitset" /*b.toString()*/ << ") with LA(1)=" << LA(1) << ANTLR_USE_NAMESPACE(std)endl; } if ( !b.member(LA(1)) ) { if ( DEBUG_PARSER ) { traceIndent(); ANTLR_USE_NAMESPACE(std)cout << "token mismatch: " << LA(1) << " not member of " << "bitset" /*b.toString()*/ << ANTLR_USE_NAMESPACE(std)endl; } throw MismatchedTokenException(getTokenNames(), getNumTokens(), LT(1), b, false, getFilename()); } else { // mark token as consumed -- fetch next token deferred until LA/LT consume(); } } /** Mark a spot in the input and return the position. * Forwarded to TokenBuffer. */ virtual inline unsigned int mark() { return inputState->getInput().mark(); } /// rewind to a previously marked position virtual inline void rewind(unsigned int pos) { inputState->getInput().rewind(pos); } /** called by the generated parser to do error recovery, override to * customize the behaviour. */ virtual void recover(const RecognitionException& ex, const BitSet& tokenSet) { (void)ex; consume(); consumeUntil(tokenSet); } /// Parser error-reporting function can be overridden in subclass virtual void reportError(const RecognitionException& ex); /// Parser error-reporting function can be overridden in subclass virtual void reportError(const ANTLR_USE_NAMESPACE(std)string& s); /// Parser warning-reporting function can be overridden in subclass virtual void reportWarning(const ANTLR_USE_NAMESPACE(std)string& s); /// get the token name for the token number 'num' virtual const char* getTokenName(int num) const = 0; /// get a vector with all token names virtual const char* const* getTokenNames() const = 0; /** Get the number of tokens defined. * This one should be overridden in subclasses. */ virtual int getNumTokens(void) const = 0; /** Set or change the input token buffer */ // void setTokenBuffer(TokenBuffer* t); virtual void traceIndent(); virtual void traceIn(const char* rname); virtual void traceOut(const char* rname); protected: // void setTokenNames(const char** tokenNames_); ParserSharedInputState inputState; // /// AST return value for a rule is squirreled away here // RefAST returnAST; /// AST support code; parser and treeparser delegate to this object ASTFactory *astFactory; // used to keep track of the indentation for the trace int traceDepth; /** Utility class which allows tracing to work even when exceptions are * thrown. */ class Tracer { /*{{{*/ private: Parser* parser; const char* text; public: Tracer(Parser* p,const char * t) : parser(p), text(t) { parser->traceIn(text); } ~Tracer() { #ifdef ANTLR_CXX_SUPPORTS_UNCAUGHT_EXCEPTION // Only give trace if there's no uncaught exception.. if(!ANTLR_USE_NAMESPACE(std)uncaught_exception()) #endif parser->traceOut(text); } private: Tracer(const Tracer&); // undefined const Tracer& operator=(const Tracer&); // undefined /*}}}*/ }; private: Parser(const Parser&); // undefined const Parser& operator=(const Parser&); // undefined }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_Parser_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/ParserSharedInputState.hpp000066400000000000000000000040701345112435200254630ustar00rootroot00000000000000#ifndef INC_ParserSharedInputState_hpp__ #define INC_ParserSharedInputState_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ParserSharedInputState.hpp#2 $ */ #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** This object contains the data associated with an * input stream of tokens. Multiple parsers * share a single ParserSharedInputState to parse * the same stream of tokens. */ class ANTLR_API ParserInputState { public: /** Construct a new ParserInputState * @param in the TokenBuffer to read from. The object is deleted together * with the ParserInputState object. */ ParserInputState( TokenBuffer* in ) : guessing(0) , filename() , input(in) , inputResponsible(true) { } /** Construct a new ParserInputState * @param in the TokenBuffer to read from. */ ParserInputState( TokenBuffer& in ) : guessing(0) , filename("") , input(&in) , inputResponsible(false) { } virtual ~ParserInputState() { if (inputResponsible) delete input; } TokenBuffer& getInput( void ) { return *input; } /// Reset the ParserInputState and the underlying TokenBuffer void reset( void ) { input->reset(); guessing = 0; } public: /** Are we guessing (guessing>0)? */ int guessing; /** What file (if known) caused the problem? * @todo wrap this one.. */ ANTLR_USE_NAMESPACE(std)string filename; private: /** Where to get token objects */ TokenBuffer* input; /// Do we need to free the TokenBuffer or is it owned by another.. bool inputResponsible; // we don't want these: ParserInputState(const ParserInputState&); ParserInputState& operator=(const ParserInputState&); }; /// A reference counted ParserInputState typedef RefCount ParserSharedInputState; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_ParserSharedInputState_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/RecognitionException.hpp000066400000000000000000000033701345112435200252200ustar00rootroot00000000000000#ifndef INC_RecognitionException_hpp__ # define INC_RecognitionException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/RecognitionException.hpp#2 $ */ # include # include # ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { # endif class ANTLR_API RecognitionException : public ANTLRException { public: RecognitionException(); RecognitionException(const ANTLR_USE_NAMESPACE(std)string& s); RecognitionException(const ANTLR_USE_NAMESPACE(std)string& s, const ANTLR_USE_NAMESPACE(std)string& fileName, int line, int column ); virtual ~RecognitionException() throw() { } /// Return file where mishap occurred. virtual ANTLR_USE_NAMESPACE(std)string getFilename() const throw() { return fileName; } /** * @return the line number that this exception happened on. */ virtual int getLine() const throw() { return line; } /** * @return the column number that this exception happened on. */ virtual int getColumn() const throw() { return column; } /// Return complete error message with line/column number info (if present) virtual ANTLR_USE_NAMESPACE(std)string toString() const; /// See what file/line/column info is present and return it as a string virtual ANTLR_USE_NAMESPACE(std)string getFileLineColumnString() const; protected: ANTLR_USE_NAMESPACE(std)string fileName; // not used by treeparsers int line; // not used by treeparsers int column; // not used by treeparsers }; # ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } # endif #endif //INC_RecognitionException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/RefCount.hpp000066400000000000000000000026401345112435200226050ustar00rootroot00000000000000#ifndef INC_RefCount_hpp__ #define INC_RefCount_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/RefCount.hpp#2 $ */ #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif template class ANTLR_API RefCount { private: struct Ref { T* const ptr; unsigned int count; Ref(T* p) : ptr(p), count(1) {} ~Ref() {delete ptr;} Ref* increment() {++count;return this;} bool decrement() {return (--count==0);} private: Ref(const Ref&); Ref& operator=(const Ref&); }* ref; public: explicit RefCount(T* p = 0) : ref(p ? new Ref(p) : 0) { } RefCount(const RefCount& other) : ref(other.ref ? other.ref->increment() : 0) { } ~RefCount() { if (ref && ref->decrement()) delete ref; } RefCount& operator=(const RefCount& other) { Ref* tmp = other.ref ? other.ref->increment() : 0; if (ref && ref->decrement()) delete ref; ref = tmp; return *this; } operator T* () const { return ref ? ref->ptr : 0; } T* operator->() const { return ref ? ref->ptr : 0; } T* get() const { return ref ? ref->ptr : 0; } template operator RefCount() { return RefCount(ref); } }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_RefCount_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/SemanticException.hpp000066400000000000000000000016521345112435200245040ustar00rootroot00000000000000#ifndef INC_SemanticException_hpp__ #define INC_SemanticException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/SemanticException.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API SemanticException : public RecognitionException { public: SemanticException(const ANTLR_USE_NAMESPACE(std)string& s) : RecognitionException(s) { } SemanticException(const ANTLR_USE_NAMESPACE(std)string& s, const ANTLR_USE_NAMESPACE(std)string& fileName_, int line_,int column_) : RecognitionException(s,fileName_,line_,column_) { } ~SemanticException() throw() { } }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_SemanticException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/String.hpp000066400000000000000000000013471345112435200223310ustar00rootroot00000000000000#ifndef INC_String_hpp__ #define INC_String_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/String.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif ANTLR_API ANTLR_USE_NAMESPACE(std)string operator+( const ANTLR_USE_NAMESPACE(std)string& lhs, const int rhs ); ANTLR_API ANTLR_USE_NAMESPACE(std)string operator+( const ANTLR_USE_NAMESPACE(std)string& lhs, size_t rhs ); ANTLR_API ANTLR_USE_NAMESPACE(std)string charName( int ch ); #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_String_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/Token.hpp000066400000000000000000000043101345112435200221340ustar00rootroot00000000000000#ifndef INC_Token_hpp__ #define INC_Token_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/Token.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif struct TokenRef; /** A token is minimally a token type. Subclasses can add the text matched * for the token and line info. */ class ANTLR_API Token { public: // constants #ifndef NO_STATIC_CONSTS static const int MIN_USER_TYPE = 4; static const int NULL_TREE_LOOKAHEAD = 3; static const int INVALID_TYPE = 0; static const int EOF_TYPE = 1; static const int SKIP = -1; #else enum { MIN_USER_TYPE = 4, NULL_TREE_LOOKAHEAD = 3, INVALID_TYPE = 0, EOF_TYPE = 1, SKIP = -1 }; #endif Token() : ref(0) , type(INVALID_TYPE) { } Token(int t) : ref(0) , type(t) { } Token(int t, const ANTLR_USE_NAMESPACE(std)string& txt) : ref(0) , type(t) { setText(txt); } virtual ~Token() { } virtual int getColumn() const; virtual int getLine() const; virtual ANTLR_USE_NAMESPACE(std)string getText() const; virtual const ANTLR_USE_NAMESPACE(std)string& getFilename() const; virtual int getType() const; virtual void setColumn(int c); virtual void setLine(int l); virtual void setText(const ANTLR_USE_NAMESPACE(std)string& t); virtual void setType(int t); virtual void setFilename( const std::string& file ); virtual ANTLR_USE_NAMESPACE(std)string toString() const; private: friend struct TokenRef; TokenRef* ref; int type; ///< the type of the token Token(RefToken other); Token& operator=(const Token& other); Token& operator=(RefToken other); Token(const Token&); }; extern ANTLR_API RefToken nullToken; #ifdef NEEDS_OPERATOR_LESS_THAN // RK: Added after 2.7.2 previously it was undefined. // AL: what to return if l and/or r point to nullToken??? inline bool operator<( RefToken l, RefToken r ) { return nullToken == l ? ( nullToken == r ? false : true ) : l->getType() < r->getType(); } #endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_Token_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenBuffer.hpp000066400000000000000000000055171345112435200233000ustar00rootroot00000000000000#ifndef INC_TokenBuffer_hpp__ #define INC_TokenBuffer_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenBuffer.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /**A Stream of Token objects fed to the parser from a TokenStream that can * be rewound via mark()/rewind() methods. *

* A dynamic array is used to buffer up all the input tokens. Normally, * "k" tokens are stored in the buffer. More tokens may be stored during * guess mode (testing syntactic predicate), or when LT(i>k) is referenced. * Consumption of tokens is deferred. In other words, reading the next * token is not done by conume(), but deferred until needed by LA or LT. *

* * @todo: see if we can integrate this one with InputBuffer into one template * or so. * * @see antlr.Token * @see antlr.TokenStream * @see antlr.TokenQueue */ class ANTLR_API TokenBuffer { public: /** Create a token buffer */ TokenBuffer(TokenStream& input_); virtual ~TokenBuffer(); /// Reset the input buffer to empty state inline void reset( void ) { nMarkers = 0; markerOffset = 0; numToConsume = 0; queue.clear(); } /** Get a lookahead token value */ int LA( unsigned int i ); /** Get a lookahead token */ RefToken LT( unsigned int i ); /** Return an integer marker that can be used to rewind the buffer to * its current state. */ unsigned int mark(); /**Rewind the token buffer to a marker. * @param mark Marker returned previously from mark() */ void rewind(unsigned int mark); /** Mark another token for deferred consumption */ inline void consume() { numToConsume++; } /// Return the number of entries in the TokenBuffer virtual unsigned int entries() const; private: /** Ensure that the token buffer is sufficiently full */ void fill(unsigned int amount); /** Sync up deferred consumption */ void syncConsume(); protected: /// Token source TokenStream& input; /// Number of active markers unsigned int nMarkers; /// Additional offset used when markers are active unsigned int markerOffset; /// Number of calls to consume() since last LA() or LT() call unsigned int numToConsume; /// Circular queue with Tokens CircularQueue queue; private: TokenBuffer(const TokenBuffer& other); const TokenBuffer& operator=(const TokenBuffer& other); }; /** Sync up deferred consumption */ inline void TokenBuffer::syncConsume() { if (numToConsume > 0) { if (nMarkers > 0) markerOffset += numToConsume; else queue.removeItems( numToConsume ); numToConsume = 0; } } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenBuffer_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenRefCount.hpp000066400000000000000000000033031345112435200236030ustar00rootroot00000000000000#ifndef INC_TokenRefCount_hpp__ # define INC_TokenRefCount_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id:$ */ # include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class Token; struct ANTLR_API TokenRef { Token* const ptr; unsigned int count; TokenRef(Token* p); ~TokenRef(); TokenRef* increment() { ++count; return this; } bool decrement() { return (--count==0); } static TokenRef* getRef(const Token* p); private: TokenRef( const TokenRef& ); TokenRef& operator=( const TokenRef& ); }; template class ANTLR_API TokenRefCount { private: TokenRef* ref; public: TokenRefCount(const Token* p=0) : ref(p ? TokenRef::getRef(p) : 0) { } TokenRefCount(const TokenRefCount& other) : ref(other.ref ? other.ref->increment() : 0) { } ~TokenRefCount() { if (ref && ref->decrement()) delete ref; } TokenRefCount& operator=(Token* other) { TokenRef* tmp = TokenRef::getRef(other); if (ref && ref->decrement()) delete ref; ref=tmp; return *this; } TokenRefCount& operator=(const TokenRefCount& other) { if( other.ref != ref ) { TokenRef* tmp = other.ref ? other.ref->increment() : 0; if (ref && ref->decrement()) delete ref; ref=tmp; } return *this; } operator T* () const { return ref ? static_cast(ref->ptr) : 0; } T* operator->() const { return ref ? static_cast(ref->ptr) : 0; } T* get() const { return ref ? static_cast(ref->ptr) : 0; } }; typedef TokenRefCount RefToken; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenRefCount_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenStream.hpp000066400000000000000000000013161345112435200233130ustar00rootroot00000000000000#ifndef INC_TokenStream_hpp__ #define INC_TokenStream_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenStream.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** This interface allows any object to pretend it is a stream * of tokens. * @author Terence Parr, MageLang Institute */ class ANTLR_API TokenStream { public: virtual RefToken nextToken()=0; virtual ~TokenStream() { } }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenStream_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenStreamBasicFilter.hpp000066400000000000000000000020511345112435200254200ustar00rootroot00000000000000#ifndef INC_TokenStreamBasicFilter_hpp__ #define INC_TokenStreamBasicFilter_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenStreamBasicFilter.hpp#2 $ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** This object is a TokenStream that passes through all * tokens except for those that you tell it to discard. * There is no buffering of the tokens. */ class ANTLR_API TokenStreamBasicFilter : public TokenStream { /** The set of token types to discard */ protected: BitSet discardMask; /** The input stream */ protected: TokenStream* input; public: TokenStreamBasicFilter(TokenStream& input_); void discard(int ttype); void discard(const BitSet& mask); RefToken nextToken(); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenStreamBasicFilter_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenStreamException.hpp000066400000000000000000000016171345112435200251760ustar00rootroot00000000000000#ifndef INC_TokenStreamException_hpp__ #define INC_TokenStreamException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenStreamException.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** Baseclass for exceptions thrown by classes implementing the TokenStream * interface. * @see TokenStream */ class ANTLR_API TokenStreamException : public ANTLRException { public: TokenStreamException() : ANTLRException() { } TokenStreamException(const ANTLR_USE_NAMESPACE(std)string& s) : ANTLRException(s) { } virtual ~TokenStreamException() throw() { } }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenStreamException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenStreamHiddenTokenFilter.hpp000066400000000000000000000043761345112435200266070ustar00rootroot00000000000000#ifndef INC_TokenStreamHiddenTokenFilter_hpp__ #define INC_TokenStreamHiddenTokenFilter_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenStreamHiddenTokenFilter.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /**This object filters a token stream coming from a lexer * or another TokenStream so that only certain token channels * get transmitted to the parser. * * Any of the channels can be filtered off as "hidden" channels whose * tokens can be accessed from the parser. */ class ANTLR_API TokenStreamHiddenTokenFilter : public TokenStreamBasicFilter { // protected BitSet discardMask; protected: BitSet hideMask; private: RefToken nextMonitoredToken; protected: /** track tail of hidden list emanating from previous * monitored token */ RefToken lastHiddenToken; RefToken firstHidden; // = null; public: TokenStreamHiddenTokenFilter(TokenStream& input); protected: void consume(); private: void consumeFirst(); public: BitSet getDiscardMask() const; /** Return a ptr to the hidden token appearing immediately after * token t in the input stream. */ RefToken getHiddenAfter(RefToken t); /** Return a ptr to the hidden token appearing immediately before * token t in the input stream. */ RefToken getHiddenBefore(RefToken t); BitSet getHideMask() const; /** Return the first hidden token if one appears * before any monitored token. */ RefToken getInitialHiddenToken(); void hide(int m); void hide(const BitSet& mask); protected: RefToken LA(int i); public: /** Return the next monitored token. * Test the token following the monitored token. * If following is another monitored token, save it * for the next invocation of nextToken (like a single * lookahead token) and return it then. * If following is unmonitored, nondiscarded (hidden) * channel token, add it to the monitored token. * * Note: EOF must be a monitored Token. */ RefToken nextToken(); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenStreamHiddenTokenFilter_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenStreamIOException.hpp000066400000000000000000000015651345112435200254300ustar00rootroot00000000000000#ifndef INC_TokenStreamIOException_hpp__ #define INC_TokenStreamIOException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenStreamIOException.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class TokenStreamIOException : public TokenStreamException { public: TokenStreamIOException() : TokenStreamException() { } TokenStreamIOException(const ANTLR_USE_NAMESPACE(std)exception& e) : TokenStreamException(e.what()) , io(e) { } ~TokenStreamIOException() throw() { } private: ANTLR_USE_NAMESPACE(std)exception io; }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenStreamIOException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenStreamRecognitionException.hpp000066400000000000000000000025241345112435200273750ustar00rootroot00000000000000#ifndef INC_TokenStreamRecognitionException_hpp__ #define INC_TokenStreamRecognitionException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenStreamRecognitionException.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** Exception thrown from generated lexers when there's no default error * handler specified. * @see TokenStream */ class TokenStreamRecognitionException : public TokenStreamException { public: TokenStreamRecognitionException(RecognitionException& re) : TokenStreamException(re.getMessage()) , recog(re) { } virtual ~TokenStreamRecognitionException() throw() { } virtual ANTLR_USE_NAMESPACE(std)string toString() const { return recog.getFileLineColumnString()+getMessage(); } virtual ANTLR_USE_NAMESPACE(std)string getFilename() const throw() { return recog.getFilename(); } virtual int getLine() const throw() { return recog.getLine(); } virtual int getColumn() const throw() { return recog.getColumn(); } private: RecognitionException recog; }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenStreamRecognitionException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenStreamRetryException.hpp000066400000000000000000000013041345112435200262150ustar00rootroot00000000000000#ifndef INC_TokenStreamRetryException_hpp__ #define INC_TokenStreamRetryException_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenStreamRetryException.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class TokenStreamRetryException : public TokenStreamException { public: TokenStreamRetryException() {} ~TokenStreamRetryException() throw() {} }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenStreamRetryException_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenStreamRewriteEngine.hpp000066400000000000000000000304541345112435200260100ustar00rootroot00000000000000#ifndef INC_TokenStreamRewriteEngine_hpp__ #define INC_TokenStreamRewriteEngine_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html */ #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** This token stream tracks the *entire* token stream coming from * a lexer, but does not pass on the whitespace (or whatever else * you want to discard) to the parser. * * This class can then be asked for the ith token in the input stream. * Useful for dumping out the input stream exactly after doing some * augmentation or other manipulations. Tokens are index from 0..n-1 * * You can insert stuff, replace, and delete chunks. Note that the * operations are done lazily--only if you convert the buffer to a * String. This is very efficient because you are not moving data around * all the time. As the buffer of tokens is converted to strings, the * toString() method(s) check to see if there is an operation at the * current index. If so, the operation is done and then normal String * rendering continues on the buffer. This is like having multiple Turing * machine instruction streams (programs) operating on a single input tape. :) * * Since the operations are done lazily at toString-time, operations do not * screw up the token index values. That is, an insert operation at token * index i does not change the index values for tokens i+1..n-1. * * Because operations never actually alter the buffer, you may always get * the original token stream back without undoing anything. Since * the instructions are queued up, you can easily simulate transactions and * roll back any changes if there is an error just by removing instructions. * For example, * * TokenStreamRewriteEngine rewriteEngine = * new TokenStreamRewriteEngine(lexer); * JavaRecognizer parser = new JavaRecognizer(rewriteEngine); * ... * rewriteEngine.insertAfter("pass1", t, "foobar");} * rewriteEngine.insertAfter("pass2", u, "start");} * System.out.println(rewriteEngine.toString("pass1")); * System.out.println(rewriteEngine.toString("pass2")); * * You can also have multiple "instruction streams" and get multiple * rewrites from a single pass over the input. Just name the instruction * streams and use that name again when printing the buffer. This could be * useful for generating a C file and also its header file--all from the * same buffer. * * If you don't use named rewrite streams, a "default" stream is used. * * Terence Parr, parrt@cs.usfca.edu * University of San Francisco * February 2004 */ class TokenStreamRewriteEngine : public TokenStream { public: typedef ANTLR_USE_NAMESPACE(std)vector token_list; static const char* DEFAULT_PROGRAM_NAME; #ifndef NO_STATIC_CONSTS static const size_t MIN_TOKEN_INDEX; static const int PROGRAM_INIT_SIZE; #else enum { MIN_TOKEN_INDEX = 0, PROGRAM_INIT_SIZE = 100 }; #endif struct tokenToStream { tokenToStream( ANTLR_USE_NAMESPACE(std)ostream& o ) : out(o) {} template void operator() ( const T& t ) { out << t->getText(); } ANTLR_USE_NAMESPACE(std)ostream& out; }; class RewriteOperation { protected: RewriteOperation( size_t idx, const ANTLR_USE_NAMESPACE(std)string& txt ) : index(idx), text(txt) { } public: virtual ~RewriteOperation() { } /** Execute the rewrite operation by possibly adding to the buffer. * Return the index of the next token to operate on. */ virtual size_t execute( ANTLR_USE_NAMESPACE(std)ostream& /* out */ ) { return index; } virtual size_t getIndex() const { return index; } virtual const char* type() const { return "RewriteOperation"; } protected: size_t index; ANTLR_USE_NAMESPACE(std)string text; }; struct executeOperation { ANTLR_USE_NAMESPACE(std)ostream& out; executeOperation( ANTLR_USE_NAMESPACE(std)ostream& s ) : out(s) {} void operator () ( RewriteOperation* t ) { t->execute(out); } }; /// list of rewrite operations typedef ANTLR_USE_NAMESPACE(std)list operation_list; /// map program name to tuple typedef ANTLR_USE_NAMESPACE(std)map program_map; class InsertBeforeOp : public RewriteOperation { public: InsertBeforeOp( size_t index, const ANTLR_USE_NAMESPACE(std)string& text ) : RewriteOperation(index, text) { } virtual ~InsertBeforeOp() {} virtual size_t execute( ANTLR_USE_NAMESPACE(std)ostream& out ) { out << text; return index; } virtual const char* type() const { return "InsertBeforeOp"; } }; class ReplaceOp : public RewriteOperation { public: ReplaceOp(size_t from, size_t to, ANTLR_USE_NAMESPACE(std)string text) : RewriteOperation(from,text) , lastIndex(to) { } virtual ~ReplaceOp() {} virtual size_t execute( ANTLR_USE_NAMESPACE(std)ostream& out ) { out << text; return lastIndex+1; } virtual const char* type() const { return "ReplaceOp"; } protected: size_t lastIndex; }; class DeleteOp : public ReplaceOp { public: DeleteOp(size_t from, size_t to) : ReplaceOp(from,to,"") { } virtual const char* type() const { return "DeleteOp"; } }; TokenStreamRewriteEngine(TokenStream& upstream); TokenStreamRewriteEngine(TokenStream& upstream, size_t initialSize); RefToken nextToken( void ); void rollback(size_t instructionIndex) { rollback(DEFAULT_PROGRAM_NAME, instructionIndex); } /** Rollback the instruction stream for a program so that * the indicated instruction (via instructionIndex) is no * longer in the stream. UNTESTED! */ void rollback(const ANTLR_USE_NAMESPACE(std)string& programName, size_t instructionIndex ); void deleteProgram() { deleteProgram(DEFAULT_PROGRAM_NAME); } /** Reset the program so that no instructions exist */ void deleteProgram(const ANTLR_USE_NAMESPACE(std)string& programName) { rollback(programName, MIN_TOKEN_INDEX); } void insertAfter( RefTokenWithIndex t, const ANTLR_USE_NAMESPACE(std)string& text ) { insertAfter(DEFAULT_PROGRAM_NAME, t, text); } void insertAfter(size_t index, const ANTLR_USE_NAMESPACE(std)string& text) { insertAfter(DEFAULT_PROGRAM_NAME, index, text); } void insertAfter( const ANTLR_USE_NAMESPACE(std)string& programName, RefTokenWithIndex t, const ANTLR_USE_NAMESPACE(std)string& text ) { insertAfter(programName, t->getIndex(), text); } void insertAfter( const ANTLR_USE_NAMESPACE(std)string& programName, size_t index, const ANTLR_USE_NAMESPACE(std)string& text ) { // to insert after, just insert before next index (even if past end) insertBefore(programName,index+1, text); } void insertBefore( RefTokenWithIndex t, const ANTLR_USE_NAMESPACE(std)string& text ) { // std::cout << "insertBefore index " << t->getIndex() << " " << text << std::endl; insertBefore(DEFAULT_PROGRAM_NAME, t, text); } void insertBefore(size_t index, const ANTLR_USE_NAMESPACE(std)string& text) { insertBefore(DEFAULT_PROGRAM_NAME, index, text); } void insertBefore( const ANTLR_USE_NAMESPACE(std)string& programName, RefTokenWithIndex t, const ANTLR_USE_NAMESPACE(std)string& text ) { insertBefore(programName, t->getIndex(), text); } void insertBefore( const ANTLR_USE_NAMESPACE(std)string& programName, size_t index, const ANTLR_USE_NAMESPACE(std)string& text ) { addToSortedRewriteList(programName, new InsertBeforeOp(index,text)); } void replace(size_t index, const ANTLR_USE_NAMESPACE(std)string& text) { replace(DEFAULT_PROGRAM_NAME, index, index, text); } void replace( size_t from, size_t to, const ANTLR_USE_NAMESPACE(std)string& text) { replace(DEFAULT_PROGRAM_NAME, from, to, text); } void replace( RefTokenWithIndex indexT, const ANTLR_USE_NAMESPACE(std)string& text ) { replace(DEFAULT_PROGRAM_NAME, indexT->getIndex(), indexT->getIndex(), text); } void replace( RefTokenWithIndex from, RefTokenWithIndex to, const ANTLR_USE_NAMESPACE(std)string& text ) { replace(DEFAULT_PROGRAM_NAME, from, to, text); } void replace(const ANTLR_USE_NAMESPACE(std)string& programName, size_t from, size_t to, const ANTLR_USE_NAMESPACE(std)string& text ) { addToSortedRewriteList(programName,new ReplaceOp(from, to, text)); } void replace( const ANTLR_USE_NAMESPACE(std)string& programName, RefTokenWithIndex from, RefTokenWithIndex to, const ANTLR_USE_NAMESPACE(std)string& text ) { replace(programName, from->getIndex(), to->getIndex(), text); } void remove(size_t index) { remove(DEFAULT_PROGRAM_NAME, index, index); } void remove(size_t from, size_t to) { remove(DEFAULT_PROGRAM_NAME, from, to); } void remove(RefTokenWithIndex indexT) { remove(DEFAULT_PROGRAM_NAME, indexT, indexT); } void remove(RefTokenWithIndex from, RefTokenWithIndex to) { remove(DEFAULT_PROGRAM_NAME, from, to); } void remove( const ANTLR_USE_NAMESPACE(std)string& programName, size_t from, size_t to) { replace(programName,from,to,""); } void remove( const ANTLR_USE_NAMESPACE(std)string& programName, RefTokenWithIndex from, RefTokenWithIndex to ) { replace(programName,from,to,""); } void discard(int ttype) { discardMask.add(ttype); } RefToken getToken( size_t i ) { return RefToken(tokens.at(i)); } size_t getTokenStreamSize() const { return tokens.size(); } void originalToStream( ANTLR_USE_NAMESPACE(std)ostream& out ) const { ANTLR_USE_NAMESPACE(std)for_each( tokens.begin(), tokens.end(), tokenToStream(out) ); } void originalToStream( ANTLR_USE_NAMESPACE(std)ostream& out, size_t start, size_t end ) const; void toStream( ANTLR_USE_NAMESPACE(std)ostream& out ) const { toStream( out, MIN_TOKEN_INDEX, getTokenStreamSize()); } void toStream( ANTLR_USE_NAMESPACE(std)ostream& out, const ANTLR_USE_NAMESPACE(std)string& programName ) const { toStream( out, programName, MIN_TOKEN_INDEX, getTokenStreamSize()); } void toStream( ANTLR_USE_NAMESPACE(std)ostream& out, size_t start, size_t end ) const { toStream(out, DEFAULT_PROGRAM_NAME, start, end); } void toStream( ANTLR_USE_NAMESPACE(std)ostream& out, const ANTLR_USE_NAMESPACE(std)string& programName, size_t firstToken, size_t lastToken ) const; void toDebugStream( ANTLR_USE_NAMESPACE(std)ostream& out ) const { toDebugStream( out, MIN_TOKEN_INDEX, getTokenStreamSize()); } void toDebugStream( ANTLR_USE_NAMESPACE(std)ostream& out, size_t start, size_t end ) const; size_t getLastRewriteTokenIndex() const { return getLastRewriteTokenIndex(DEFAULT_PROGRAM_NAME); } /** Return the last index for the program named programName * return 0 if the program does not exist or the program is empty. * (Note this is different from the java implementation that returns -1) */ size_t getLastRewriteTokenIndex(const ANTLR_USE_NAMESPACE(std)string& programName) const { program_map::const_iterator rewrites = programs.find(programName); if( rewrites == programs.end() ) return 0; const operation_list& prog = rewrites->second; if( !prog.empty() ) { operation_list::const_iterator last = prog.end(); --last; return (*last)->getIndex(); } return 0; } protected: /** If op.index > lastRewriteTokenIndexes, just add to the end. * Otherwise, do linear */ void addToSortedRewriteList(RewriteOperation* op) { addToSortedRewriteList(DEFAULT_PROGRAM_NAME, op); } void addToSortedRewriteList( const ANTLR_USE_NAMESPACE(std)string& programName, RewriteOperation* op ); protected: /** Who do we suck tokens from? */ TokenStream& stream; /** track index of tokens */ size_t index; /** Track the incoming list of tokens */ token_list tokens; /** You may have multiple, named streams of rewrite operations. * I'm calling these things "programs." * Maps String (name) -> rewrite (List) */ program_map programs; /** Which (whitespace) token(s) to throw out */ BitSet discardMask; }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenStreamSelector.hpp000066400000000000000000000053171345112435200250210ustar00rootroot00000000000000#ifndef INC_TokenStreamSelector_hpp__ #define INC_TokenStreamSelector_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TokenStreamSelector.hpp#2 $ */ #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** A token stream MUX (multiplexor) knows about n token streams * and can multiplex them onto the same channel for use by token * stream consumer like a parser. This is a way to have multiple * lexers break up the same input stream for a single parser. * Or, you can have multiple instances of the same lexer handle * multiple input streams; this works great for includes. */ class ANTLR_API TokenStreamSelector : public TokenStream { protected: /** The set of inputs to the MUX */ #ifdef OS_NO_ALLOCATOR typedef ANTLR_USE_NAMESPACE(std)less lessp; typedef ANTLR_USE_NAMESPACE(std)map inputStreamNames_coll; #else typedef ANTLR_USE_NAMESPACE(std)map inputStreamNames_coll; #endif inputStreamNames_coll inputStreamNames; /** The currently-selected token stream input */ TokenStream* input; /** Used to track stack of input streams */ #ifdef OS_NO_ALLOCATOR typedef ANTLR_USE_NAMESPACE(std)stack > streamStack_coll; #else typedef ANTLR_USE_NAMESPACE(std)stack streamStack_coll; #endif streamStack_coll streamStack; public: TokenStreamSelector(); ~TokenStreamSelector(); void addInputStream(TokenStream* stream, const ANTLR_USE_NAMESPACE(std)string& key); /// Return the stream from which tokens are being pulled at the moment. TokenStream* getCurrentStream() const; TokenStream* getStream(const ANTLR_USE_NAMESPACE(std)string& sname) const; RefToken nextToken(); TokenStream* pop(); void push(TokenStream* stream); void push(const ANTLR_USE_NAMESPACE(std)string& sname); /** Abort recognition of current Token and try again. * A stream can push a new stream (for include files * for example, and then retry(), which will cause * the current stream to abort back to this.nextToken(). * this.nextToken() then asks for a token from the * current stream, which is the new "substream." */ void retry(); /** Set the stream without pushing old stream */ void select(TokenStream* stream); void select(const ANTLR_USE_NAMESPACE(std)string& sname); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TokenStreamSelector_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TokenWithIndex.hpp000066400000000000000000000031451345112435200237650ustar00rootroot00000000000000#ifndef INC_TokenWithIndex_hpp__ #define INC_TokenWithIndex_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id:$ */ #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API TokenWithIndex : public ANTLR_USE_NAMESPACE(antlr)CommonToken { public: // static size_t count; TokenWithIndex() : CommonToken(), index(0) { // std::cout << __PRETTY_FUNCTION__ << std::endl; // count++; } TokenWithIndex(int t, const ANTLR_USE_NAMESPACE(std)string& txt) : CommonToken(t,txt) , index(0) { // std::cout << __PRETTY_FUNCTION__ << std::endl; // count++; } TokenWithIndex(const ANTLR_USE_NAMESPACE(std)string& s) : CommonToken(s) , index(0) { // std::cout << __PRETTY_FUNCTION__ << std::endl; // count++; } ~TokenWithIndex() { // count--; } void setIndex( size_t idx ) { index = idx; } size_t getIndex( void ) const { return index; } ANTLR_USE_NAMESPACE(std)string toString() const { return ANTLR_USE_NAMESPACE(std)string("[")+ index+ ":\""+ getText()+"\",<"+ getType()+">,line="+ getLine()+",column="+ getColumn()+"]"; } static RefToken factory() { return RefToken(new TokenWithIndex()); } protected: size_t index; private: TokenWithIndex(const TokenWithIndex&); const TokenWithIndex& operator=(const TokenWithIndex&); }; typedef TokenRefCount RefTokenWithIndex; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_CommonToken_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TreeParser.hpp000066400000000000000000000103511345112435200231320ustar00rootroot00000000000000#ifndef INC_TreeParser_hpp__ #define INC_TreeParser_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TreeParser.hpp#2 $ */ #include #include #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif class ANTLR_API TreeParser { public: TreeParser() : astFactory(0) , inputState(new TreeParserInputState()) , traceDepth(0) { } TreeParser(const TreeParserSharedInputState& state) : astFactory(0) , inputState(state) , traceDepth(0) { } virtual ~TreeParser() { } /// Get the AST return value squirreled away in the parser virtual RefAST getAST() = 0; /** Make sure current lookahead symbol matches the given set * Throw an exception upon mismatch, which is caught by either the * error handler or by a syntactic predicate. */ virtual void match(RefAST t, const BitSet& b) { if ( !t || t==ASTNULL || !b.member(t->getType()) ) throw MismatchedTokenException( getTokenNames(), getNumTokens(), t, b, false ); } /** Specify the AST factory to be used during tree building. (Compulsory) * Setting the factory is compulsory (if you intend to modify * the tree in the treeparser). The AST Factory is shared between * parser (who builds the initial AST) and treeparser. * @see Parser::getASTFactory() */ virtual void setASTFactory(ASTFactory* factory) { astFactory = factory; } /// Return pointer to ASTFactory virtual ASTFactory* getASTFactory() const { return astFactory; } /// Get the name for token 'num' virtual const char* getTokenName(int num) const = 0; /// Return the number of tokens defined virtual int getNumTokens() const = 0; /// Return an array of getNumTokens() token names virtual const char* const* getTokenNames() const = 0; /// Parser error-reporting function can be overridden in subclass virtual void reportError(const RecognitionException& ex); /// Parser error-reporting function can be overridden in subclass virtual void reportError(const ANTLR_USE_NAMESPACE(std)string& s); /// Parser warning-reporting function can be overridden in subclass virtual void reportWarning(const ANTLR_USE_NAMESPACE(std)string& s); /// These are used during when traceTreeParser commandline option is passed. virtual void traceIndent(); virtual void traceIn(const char* rname, RefAST t); virtual void traceOut(const char* rname, RefAST t); /** The AST Null object; the parsing cursor is set to this when * it is found to be null. This way, we can test the * token type of a node without having to have tests for 0 * everywhere. */ static RefAST ASTNULL; protected: virtual void match(RefAST t, int ttype) { if (!t || t == ASTNULL || t->getType() != ttype ) throw MismatchedTokenException( getTokenNames(), getNumTokens(), t, ttype, false ); } virtual void matchNot(RefAST t, int ttype) { if ( !t || t == ASTNULL || t->getType() == ttype ) throw MismatchedTokenException( getTokenNames(), getNumTokens(), t, ttype, true ); } /** AST support code; parser and treeparser delegate to this object */ ASTFactory* astFactory; /// The input state of this tree parser. TreeParserSharedInputState inputState; /** Used to keep track of indent depth with -traceTreeParser */ int traceDepth; /** Utility class which allows tracing to work even when exceptions are * thrown. */ class Tracer { private: TreeParser* parser; const char* text; RefAST tree; public: Tracer(TreeParser* p, const char* t, RefAST a) : parser(p), text(t), tree(a) { parser->traceIn(text,tree); } ~Tracer() { parser->traceOut(text,tree); } private: Tracer(const Tracer&); // undefined const Tracer& operator=(const Tracer&); // undefined }; private: // no copying of treeparser instantiations... TreeParser(const TreeParser& other); TreeParser& operator=(const TreeParser& other); }; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TreeParser_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/TreeParserSharedInputState.hpp000066400000000000000000000022301345112435200262770ustar00rootroot00000000000000#ifndef INC_TreeParserSharedInputState_hpp__ #define INC_TreeParserSharedInputState_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/TreeParserSharedInputState.hpp#2 $ */ #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** This object contains the data associated with an * input AST. Multiple parsers * share a single TreeParserSharedInputState to parse * the same tree or to have the parser walk multiple * trees. */ class ANTLR_API TreeParserInputState { public: TreeParserInputState() : guessing(0) {} virtual ~TreeParserInputState() {} public: /** Are we guessing (guessing>0)? */ int guessing; //= 0; private: // we don't want these: TreeParserInputState(const TreeParserInputState&); TreeParserInputState& operator=(const TreeParserInputState&); }; typedef RefCount TreeParserSharedInputState; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif #endif //INC_TreeParserSharedInputState_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/antlr/config.hpp000066400000000000000000000206511345112435200223270ustar00rootroot00000000000000#ifndef INC_config_hpp__ #define INC_config_hpp__ /* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/config.hpp#2 $ */ /* * Just a simple configuration file to differentiate between the * various compilers used and reconfigure stuff for any oddities of the * compiler in question. * * These are the defaults. Per compiler these are amended. */ #define ANTLR_USE_NAMESPACE(_x_) _x_:: #define ANTLR_USING_NAMESPACE(_x_) using namespace _x_; #define ANTLR_CXX_SUPPORTS_NAMESPACE 1 #define ANTLR_C_USING(_x_) #define ANTLR_API #ifndef CUSTOM_API # define CUSTOM_API #endif #define ANTLR_IOS_BASE ios_base /** define if cctype functions/macros need a std:: prefix. A lot of compilers * define these as macros, in which case something barfs. */ #define ANTLR_CCTYPE_NEEDS_STD /// Define if C++ compiler supports std::uncaught_exception #define ANTLR_CXX_SUPPORTS_UNCAUGHT_EXCEPTION #define ANTLR_ATOI_IN_STD /******************************************************************************/ /*{{{ Microsoft Visual C++ */ // NOTE: If you provide patches for a specific MSVC version guard them for // the specific version!!!! // _MSC_VER == 1100 for Microsoft Visual C++ 5.0 // _MSC_VER == 1200 for Microsoft Visual C++ 6.0 // _MSC_VER == 1300 for Microsoft Visual C++ 7.0 #if defined(_MSC_VER) # if _MSC_VER < 1300 # define NOMINMAX # pragma warning(disable : 4786) # define min _cpp_min # endif // This warning really gets on my nerves. // It's the one about symbol longer than 256 chars, and it happens // all the time with STL. # pragma warning( disable : 4786 4231 ) // this shuts up some DLL interface warnings for STL # pragma warning( disable : 4251 ) # ifdef ANTLR_CXX_USE_STLPORT # undef ANTLR_CXX_SUPPORTS_UNCAUGHT_EXCEPTION # endif # if ( _MSC_VER < 1300 ) && ( defined(ANTLR_EXPORTS) || defined(ANTLR_IMPORTS) ) # error "DLL Build not supported on these MSVC versions." // see comment in lib/cpp/src/dll.cpp # endif // For the DLL support originally contributed by Stephen Naughton // If you are building statically leave ANTLR_EXPORTS/ANTLR_IMPORTS undefined // If you are building the DLL define ANTLR_EXPORTS // If you are compiling code to be used with the DLL define ANTLR_IMPORTS # ifdef ANTLR_EXPORTS # undef ANTLR_API # define ANTLR_API __declspec(dllexport) # endif # ifdef ANTLR_IMPORTS # undef ANTLR_API # define ANTLR_API __declspec(dllimport) # endif # if ( _MSC_VER < 1200 ) // supposedly only for MSVC5 and before... // Using vector requires operator<(X,X) to be defined # define NEEDS_OPERATOR_LESS_THAN # endif // VC6 # if ( _MSC_VER == 1200 ) # undef ANTLR_ATOI_IN_STD # endif # if ( _MSC_VER < 1310 ) // Supposedly only for MSVC7 and before... // Not allowed to put 'static const int XXX=20;' in a class definition # define NO_STATIC_CONSTS # define NO_TEMPLATE_PARTS # endif // No strcasecmp in the C library (so use stricmp instead) // - Anyone know which is in which standard? # define NO_STRCASECMP # undef ANTLR_CCTYPE_NEEDS_STD # define NO_STATIC_CONSTS #endif // End of Microsoft Visual C++ /*}}}*/ /******************************************************************************/ /*{{{ SunPro Compiler (Using OBJECTSPACE STL) *****************************************************************************/ #ifdef __SUNPRO_CC # if (__SUNPRO_CC >= 0x500) # define NEEDS_OPERATOR_LESS_THAN # define NO_TEMPLATE_PARTS # else # undef namespace # define namespace # if (__SUNPRO_CC == 0x420) /* This code is specif to SunWspro Compiler 4.2, and will compile with the objectspace 2.1 toolkit for Solaris2.6 */ # define HAS_NOT_CASSERT_H # define HAS_NOT_CSTRING_H # define HAS_NOT_CCTYPE_H # define HAS_NOT_CSTDIO_H # define HAS_OSTREAM_H /* #define OS_SOLARIS_2_6 #define OS_NO_WSTRING #define OS_NO_ALLOCATORS #define OS_MULTI_THREADED #define OS_SOLARIS_NATIVE #define OS_REALTIME #define __OSVERSION__=5 #define SVR4 */ // ObjectSpace + some specific templates constructions with stl. /* #define OS_NO_ALLOCATOR */ // This great compiler does not have the namespace feature. # undef ANTLR_USE_NAMESPACE # define ANTLR_USE_NAMESPACE(_x_) # undef ANTLR_USING_NAMESPACE # define ANTLR_USING_NAMESPACE(_x_) # undef ANTLR_CXX_SUPPORTS_NAMESPACE # endif // End __SUNPRO_CC == 0x420 # undef explicit # define explicit # define exception os_exception # define bad_exception os_bad_exception // Not allowed to put 'static const int XXX=20;' in a class definition # define NO_STATIC_CONSTS // Using vector requires operator<(X,X) to be defined # define NEEDS_OPERATOR_LESS_THAN # endif # undef ANTLR_CCTYPE_NEEDS_STD #endif // end __SUNPRO_CC /*}}}*/ /*****************************************************************************/ /*{{{ Inprise C++ Builder 3.0 *****************************************************************************/ #ifdef __BCPLUSPLUS__ # define NO_TEMPLATE_PARTS # define NO_STRCASECMP # undef ANTLR_CCTYPE_NEEDS_STD #endif // End of C++ Builder 3.0 /*}}}*/ /*****************************************************************************/ /*{{{ IBM VisualAge C++ ( which includes the Dinkumware C++ Library ) *****************************************************************************/ #ifdef __IBMCPP__ // No strcasecmp in the C library (so use stricmp instead) // - Anyone know which is in which standard? #if (defined(_AIX) && (__IBMCPP__ >= 600)) # define NO_STATIC_CONSTS #else # define NO_STRCASECMP # undef ANTLR_CCTYPE_NEEDS_STD #endif #endif // end IBM VisualAge C++ /*}}}*/ /*****************************************************************************/ /*{{{ Metrowerks Codewarrior *****************************************************************************/ #ifdef __MWERKS__ # if (__MWERKS__ <= 0x2201) # define NO_TEMPLATE_PARTS # endif // CW 6.0 and 7.0 still do not have it. # define ANTLR_REALLY_NO_STRCASECMP # undef ANTLR_C_USING # define ANTLR_C_USING(_x_) using std:: ## _x_; # define ANTLR_CCTYPE_NEEDS_STD # undef ANTLR_CXX_SUPPORTS_UNCAUGHT_EXCEPTION #endif // End of Metrowerks Codewarrior /*}}}*/ /*****************************************************************************/ /*{{{ SGI Irix 6.5.10 MIPSPro compiler *****************************************************************************/ // (contributed by Anna Winkler) // Note: you can't compile ANTLR with the MIPSPro compiler on // anything < 6.5.10 because SGI just fixed a big bug dealing with // namespaces in that release. #ifdef __sgi # define HAS_NOT_CCTYPE_H # define HAS_NOT_CSTRING_H # define HAS_NOT_CSTDIO_H # undef ANTLR_CCTYPE_NEEDS_STD #endif // End IRIX MIPSPro /*}}}*/ /*****************************************************************************/ /*{{{ G++ in various incarnations *****************************************************************************/ // With the gcc-2.95 and 3.0 being in the near future we should start handling // incompatabilities between the various libstdc++'s. #if defined(__GNUC__) || defined(__GNUG__) // gcc 2 branch.. # if (__GNUC__ == 2 ) # if (__GNUC_MINOR__ <= 8 ) # undef ANTLR_USE_NAMESPACE # define ANTLR_USE_NAMESPACE(_x_) # undef ANTLR_USING_NAMESPACE # define ANTLR_USING_NAMESPACE(_x_) # undef ANTLR_CXX_SUPPORTS_NAMESPACE # endif # if (__GNUC_MINOR__ > 8 && __GNUC_MINOR__ <= 95 ) # undef ANTLR_IOS_BASE # define ANTLR_IOS_BASE ios # undef ANTLR_CCTYPE_NEEDS_STD // compiling with -ansi ? # ifdef __STRICT_ANSI__ # undef ANTLR_REALLY_NO_STRCASECMP # define ANTLR_REALLY_NO_STRCASECMP # endif # else // experimental .96 .97 branches.. # undef ANTLR_CCTYPE_NEEDS_STD # endif # endif #endif // ! __GNUC__ /*}}}*/ /*****************************************************************************/ /*{{{ Digital CXX (Tru64) *****************************************************************************/ #ifdef __DECCXX #define __USE_STD_IOSTREAM #endif /*}}}*/ /*****************************************************************************/ #ifdef __BORLANDC__ # if __BORLANDC__ >= 560 # include # include # define ANTLR_CCTYPE_NEEDS_STD # else # error "sorry, compiler is too old - consider an update." # endif #endif // Redefine these for backwards compatability.. #undef ANTLR_BEGIN_NAMESPACE #undef ANTLR_END_NAMESPACE #if ANTLR_CXX_SUPPORTS_NAMESPACE == 1 # define ANTLR_BEGIN_NAMESPACE(_x_) namespace _x_ { # define ANTLR_END_NAMESPACE } #else # define ANTLR_BEGIN_NAMESPACE(_x_) # define ANTLR_END_NAMESPACE #endif #endif //INC_config_hpp__ sqlitebrowser-3.11.2/libs/antlr-2.7.7/doxygen.cfg000066400000000000000000000071531345112435200213710ustar00rootroot00000000000000# # Doxygen config file for ANTLR's C++ support libraries. # # Thanks to Bill Zheng for parts of this. # PROJECT_NAME = "ANTLR Support Libraries 2.7.1+" # Input files: INPUT = antlr src RECURSIVE = YES FILE_PATTERNS = *.cpp *.h *.hpp JAVADOC_AUTOBRIEF = NO #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. MACRO_EXPANSION = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = "ANTLR_USE_NAMESPACE(_x_)=_x_::" \ "ANTLR_USING_NAMESPACE(_x_)=using namespace _x_;" \ "ANTLR_C_USING(_x_)=" \ "ANTLR_API=" # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED tag. EXPAND_ONLY_PREDEF = YES # Output options OUTPUT_DIRECTORY = gen_doc PAPER_TYPE = a4wide #PAPER_TYPE = a4 TAB_SIZE = 3 CASE_SENSE_NAMES = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # if the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # reimplements. INHERIT_DOCS = YES # if the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # Dot and friends... HAVE_DOT = YES CLASS_GRAPH = YES COLLABORATION_GRAPH = YES INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES EXTRACT_ALL = YES EXTRACT_STATIC = YES EXTRACT_PRIVATE = YES # HTML output and friends... GENERATE_HTML = YES # Tree view gives too much trouble with various browsers. GENERATE_TREEVIEW = NO # Latex output and friends... GENERATE_LATEX = NO PDF_HYPERLINKS = YES GENERATE_MAN = NO GENERATE_RTF = NO # Control of convenience stuff GENERATE_TODOLIST = YES # Control over warnings etc. Unset EXTRACT_ALL to get this to work WARN_IF_UNDOCUMENTED = YES WARNINGS = YES QUIET = YES sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/000077500000000000000000000000001345112435200200145ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/ANTLRUtil.cpp000066400000000000000000000070741345112435200222460ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id:$ */ #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** Eat whitespace from the input stream * @param is the stream to read from */ ANTLR_USE_NAMESPACE(std)istream& eatwhite( ANTLR_USE_NAMESPACE(std)istream& is ) { char c; while( is.get(c) ) { #ifdef ANTLR_CCTYPE_NEEDS_STD if( !ANTLR_USE_NAMESPACE(std)isspace(c) ) #else if( !isspace(c) ) #endif { is.putback(c); break; } } return is; } /** Read a string enclosed by '"' from a stream. Also handles escaping of \". * Skips leading whitespace. * @param in the istream to read from. * @returns the string read from file exclusive the '"' * @throws IOException if string is badly formatted */ ANTLR_USE_NAMESPACE(std)string read_string( ANTLR_USE_NAMESPACE(std)istream& in ) { char ch; ANTLR_USE_NAMESPACE(std)string ret(""); // States for a simple state machine... enum { START, READING, ESCAPE, FINISHED }; int state = START; eatwhite(in); while( state != FINISHED && in.get(ch) ) { switch( state ) { case START: // start state: check wether starting with " then switch to READING if( ch != '"' ) throw IOException("string must start with '\"'"); state = READING; continue; case READING: // reading state: look out for escape sequences and closing " if( ch == '\\' ) // got escape sequence { state = ESCAPE; continue; } if( ch == '"' ) // close quote -> stop { state = FINISHED; continue; } ret += ch; // else append... continue; case ESCAPE: switch(ch) { case '\\': ret += ch; state = READING; continue; case '"': ret += ch; state = READING; continue; case '0': ret += '\0'; state = READING; continue; default: // unrecognized escape is not mapped ret += '\\'; ret += ch; state = READING; continue; } } } if( state != FINISHED ) throw IOException("badly formatted string: "+ret); return ret; } /* Read a ([A-Z][0-9][a-z]_)* kindoff thing. Skips leading whitespace. * @param in the istream to read from. */ ANTLR_USE_NAMESPACE(std)string read_identifier( ANTLR_USE_NAMESPACE(std)istream& in ) { char ch; ANTLR_USE_NAMESPACE(std)string ret(""); eatwhite(in); while( in.get(ch) ) { #ifdef ANTLR_CCTYPE_NEEDS_STD if( ANTLR_USE_NAMESPACE(std)isupper(ch) || ANTLR_USE_NAMESPACE(std)islower(ch) || ANTLR_USE_NAMESPACE(std)isdigit(ch) || ch == '_' ) #else if( isupper(ch) || islower(ch) || isdigit(ch) || ch == '_' ) #endif ret += ch; else { in.putback(ch); break; } } return ret; } /** Read a attribute="value" thing. Leading whitespace is skipped. * Between attribute and '=' no whitespace is allowed. After the '=' it is * permitted. * @param in the istream to read from. * @param attribute string the attribute name is put in * @param value string the value of the attribute is put in * @throws IOException if something is fishy. E.g. malformed quoting * or missing '=' */ void read_AttributeNValue( ANTLR_USE_NAMESPACE(std)istream& in, ANTLR_USE_NAMESPACE(std)string& attribute, ANTLR_USE_NAMESPACE(std)string& value ) { attribute = read_identifier(in); char ch; if( in.get(ch) && ch == '=' ) value = read_string(in); else throw IOException("invalid attribute=value thing "+attribute); } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/ASTFactory.cpp000066400000000000000000000301051345112435200224760ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/ASTFactory.cpp#2 $ */ #include "antlr/CommonAST.hpp" #include "antlr/ANTLRException.hpp" #include "antlr/IOException.hpp" #include "antlr/ASTFactory.hpp" #include "antlr/ANTLRUtil.hpp" #include #include using namespace std; #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** AST Support code shared by TreeParser and Parser. * We use delegation to share code (and have only one * bit of code to maintain) rather than subclassing * or superclassing (forces AST support code to be * loaded even when you don't want to do AST stuff). * * This class collects all factories of AST types used inside the code. * New AST node types are registered with the registerFactory method. * On creation of an ASTFactory object a default AST node factory may be * specified. * * When registering types gaps between different types are filled with entries * for the default factory. */ /// Initialize factory ASTFactory::ASTFactory() : default_factory_descriptor(ANTLR_USE_NAMESPACE(std)make_pair(CommonAST::TYPE_NAME,&CommonAST::factory)) { nodeFactories.resize( Token::MIN_USER_TYPE, &default_factory_descriptor ); } /** Initialize factory with a non default node type. * factory_node_name should be the name of the AST node type the factory * generates. (should exist during the existance of this ASTFactory instance) */ ASTFactory::ASTFactory( const char* factory_node_name, factory_type fact ) : default_factory_descriptor(ANTLR_USE_NAMESPACE(std)make_pair(factory_node_name, fact)) { nodeFactories.resize( Token::MIN_USER_TYPE, &default_factory_descriptor ); } /// Delete ASTFactory ASTFactory::~ASTFactory() { factory_descriptor_list::iterator i = nodeFactories.begin(); while( i != nodeFactories.end() ) { if( *i != &default_factory_descriptor ) delete *i; i++; } } /// Register a factory for a given AST type void ASTFactory::registerFactory( int type, const char* ast_name, factory_type factory ) { // check validity of arguments... if( type < Token::MIN_USER_TYPE ) throw ANTLRException("Internal parser error invalid type passed to RegisterFactory"); if( factory == 0 ) throw ANTLRException("Internal parser error 0 factory passed to RegisterFactory"); // resize up to and including 'type' and initalize any gaps to default // factory. if( nodeFactories.size() < (static_cast(type)+1) ) nodeFactories.resize( type+1, &default_factory_descriptor ); // And add new thing.. nodeFactories[type] = new ANTLR_USE_NAMESPACE(std)pair( ast_name, factory ); } void ASTFactory::setMaxNodeType( int type ) { if( nodeFactories.size() < (static_cast(type)+1) ) nodeFactories.resize( type+1, &default_factory_descriptor ); } /** Create a new empty AST node; if the user did not specify * an AST node type, then create a default one: CommonAST. */ RefAST ASTFactory::create() { RefAST node = nodeFactories[0]->second(); node->setType(Token::INVALID_TYPE); return node; } RefAST ASTFactory::create(int type) { RefAST t = nodeFactories[type]->second(); t->initialize(type,""); return t; } RefAST ASTFactory::create(int type, const ANTLR_USE_NAMESPACE(std)string& txt) { RefAST t = nodeFactories[type]->second(); t->initialize(type,txt); return t; } #ifdef ANTLR_SUPPORT_XML RefAST ASTFactory::create(const ANTLR_USE_NAMESPACE(std)string& type_name, ANTLR_USE_NAMESPACE(std)istream& infile ) { factory_descriptor_list::iterator fact = nodeFactories.begin(); while( fact != nodeFactories.end() ) { if( type_name == (*fact)->first ) { RefAST t = (*fact)->second(); t->initialize(infile); return t; } fact++; } string error = "ASTFactory::create: Unknown AST type '" + type_name + "'"; throw ANTLRException(error); } #endif /** Create a new empty AST node; if the user did not specify * an AST node type, then create a default one: CommonAST. */ RefAST ASTFactory::create(RefAST tr) { if (!tr) return nullAST; // cout << "create(tr)" << endl; RefAST t = nodeFactories[tr->getType()]->second(); t->initialize(tr); return t; } RefAST ASTFactory::create(RefToken tok) { // cout << "create( tok="<< tok->getType() << ", " << tok->getText() << ")" << nodeFactories.size() << endl; RefAST t = nodeFactories[tok->getType()]->second(); t->initialize(tok); return t; } /** Add a child to the current AST */ void ASTFactory::addASTChild(ASTPair& currentAST, RefAST child) { if (child) { if (!currentAST.root) { // Make new child the current root currentAST.root = child; } else { if (!currentAST.child) { // Add new child to current root currentAST.root->setFirstChild(child); } else { currentAST.child->setNextSibling(child); } } // Make new child the current child currentAST.child = child; currentAST.advanceChildToEnd(); } } /** Deep copy a single node. This function the new clone() methods in the AST * interface. Returns nullAST if t is null. */ RefAST ASTFactory::dup(RefAST t) { if( t ) return t->clone(); else return RefAST(nullASTptr); } /** Duplicate tree including siblings of root. */ RefAST ASTFactory::dupList(RefAST t) { RefAST result = dupTree(t); // if t == null, then result==null RefAST nt = result; while( t ) { // for each sibling of the root t = t->getNextSibling(); nt->setNextSibling(dupTree(t)); // dup each subtree, building new tree nt = nt->getNextSibling(); } return result; } /** Duplicate a tree, assuming this is a root node of a tree * duplicate that node and what's below; ignore siblings of root node. */ RefAST ASTFactory::dupTree(RefAST t) { RefAST result = dup(t); // make copy of root // copy all children of root. if( t ) result->setFirstChild( dupList(t->getFirstChild()) ); return result; } /** Make a tree from a list of nodes. The first element in the * array is the root. If the root is null, then the tree is * a simple list not a tree. Handles null children nodes correctly. * For example, make(a, b, null, c) yields tree (a b c). make(null,a,b) * yields tree (nil a b). */ RefAST ASTFactory::make(ANTLR_USE_NAMESPACE(std)vector& nodes) { if ( nodes.size() == 0 ) return RefAST(nullASTptr); RefAST root = nodes[0]; RefAST tail = RefAST(nullASTptr); if( root ) root->setFirstChild(RefAST(nullASTptr)); // don't leave any old pointers set // link in children; for( unsigned int i = 1; i < nodes.size(); i++ ) { if ( nodes[i] == 0 ) // ignore null nodes continue; if ( root == 0 ) // Set the root and set it up for a flat list root = tail = nodes[i]; else if ( tail == 0 ) { root->setFirstChild(nodes[i]); tail = root->getFirstChild(); } else { tail->setNextSibling(nodes[i]); tail = tail->getNextSibling(); } if( tail ) // RK: I cannot fathom why this missing check didn't bite anyone else... { // Chase tail to last sibling while (tail->getNextSibling()) tail = tail->getNextSibling(); } } return root; } /** Make a tree from a list of nodes, where the nodes are contained * in an ASTArray object */ RefAST ASTFactory::make(ASTArray* nodes) { RefAST ret = make(nodes->array); delete nodes; return ret; } /// Make an AST the root of current AST void ASTFactory::makeASTRoot( ASTPair& currentAST, RefAST root ) { if (root) { // Add the current root as a child of new root root->addChild(currentAST.root); // The new current child is the last sibling of the old root currentAST.child = currentAST.root; currentAST.advanceChildToEnd(); // Set the new root currentAST.root = root; } } void ASTFactory::setASTNodeFactory( const char* factory_node_name, factory_type factory ) { default_factory_descriptor.first = factory_node_name; default_factory_descriptor.second = factory; } #ifdef ANTLR_SUPPORT_XML bool ASTFactory::checkCloseTag( ANTLR_USE_NAMESPACE(std)istream& in ) { char ch; if( in.get(ch) ) { if( ch == '<' ) { char ch2; if( in.get(ch2) ) { if( ch2 == '/' ) { in.putback(ch2); in.putback(ch); return true; } in.putback(ch2); in.putback(ch); return false; } } in.putback(ch); return false; } return false; } void ASTFactory::loadChildren( ANTLR_USE_NAMESPACE(std)istream& infile, RefAST current ) { char ch; for(;;) // for all children of this node.... { eatwhite(infile); infile.get(ch); // '<' if( ch != '<' ) { string error = "Invalid XML file... no '<' found ("; error += ch + ")"; throw IOException(error); } infile.get(ch); // / or text.... if( ch == '/' ) // check for close tag... { string temp; // read until '>' and see if it matches the open tag... if not trouble temp = read_identifier( infile ); if( strcmp(temp.c_str(), current->typeName() ) != 0 ) { string error = "Invalid XML file... close tag does not match start tag: "; error += current->typeName(); error += " closed by " + temp; throw IOException(error); } infile.get(ch); // must be a '>' if( ch != '>' ) { string error = "Invalid XML file... no '>' found ("; error += ch + ")"; throw IOException(error); } // close tag => exit loop break; } // put our 'look ahead' back where it came from infile.putback(ch); infile.putback('<'); // and recurse into the tree... RefAST child = LoadAST(infile); current->addChild( child ); } } void ASTFactory::loadSiblings(ANTLR_USE_NAMESPACE(std)istream& infile, RefAST current ) { for(;;) { eatwhite(infile); if( infile.eof() ) break; if( checkCloseTag(infile) ) break; RefAST sibling = LoadAST(infile); current->setNextSibling(sibling); } } RefAST ASTFactory::LoadAST( ANTLR_USE_NAMESPACE(std)istream& infile ) { RefAST current = nullAST; char ch; eatwhite(infile); if( !infile.get(ch) ) return nullAST; if( ch != '<' ) { string error = "Invalid XML file... no '<' found ("; error += ch + ")"; throw IOException(error); } string ast_type = read_identifier(infile); // create the ast of type 'ast_type' current = create( ast_type, infile ); if( current == nullAST ) { string error = "Unsuported AST type: " + ast_type; throw IOException(error); } eatwhite(infile); infile.get(ch); // now if we have a '/' here it's a single node. If it's a '>' we get // a tree with children if( ch == '/' ) { infile.get(ch); // get the closing '>' if( ch != '>' ) { string error = "Invalid XML file... no '>' found after '/' ("; error += ch + ")"; throw IOException(error); } // get the rest on this level loadSiblings( infile, current ); return current; } // and finaly see if we got the close tag... if( ch != '>' ) { string error = "Invalid XML file... no '>' found ("; error += ch + ")"; throw IOException(error); } // handle the ones below this level.. loadChildren( infile, current ); // load the rest on this level... loadSiblings( infile, current ); return current; } #endif // ANTLR_SUPPORT_XML #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif /* Heterogeneous AST/XML-I/O ramblings... * * So there is some heterogeneous AST support.... * basically in the code generators a new custom ast is generated without * going throug the factory. It also expects the RefXAST to be defined. * * Is it maybe better to register all AST types with the ASTFactory class * together with the respective factory methods. * * More and more I get the impression that hetero ast was a kindoff hack * on top of ANTLR's normal AST system. * * The heteroast stuff will generate trouble for all astFactory.create( ... ) * invocations. Most of this is handled via getASTCreateString methods in the * codegenerator. At the moment getASTCreateString(GrammarAtom, String) has * slightly to little info to do it's job (ok the hack that is in now * works, but it's an ugly hack) * * An extra caveat is the 'nice' action.g thing. Which also judiciously calls * getASTCreateString methods because it handles the #( ... ) syntax. * And converts that to ASTFactory calls. * * */ sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/ASTNULLType.cpp000066400000000000000000000042161345112435200225070ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id:$ */ #include "antlr/config.hpp" #include "antlr/AST.hpp" #include "antlr/ASTNULLType.hpp" #include ANTLR_USING_NAMESPACE(std) #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif RefAST ASTNULLType::clone( void ) const { return RefAST(this); } void ASTNULLType::addChild( RefAST ) { } size_t ASTNULLType::getNumberOfChildren() const { return 0; } bool ASTNULLType::equals( RefAST ) const { return false; } bool ASTNULLType::equalsList( RefAST ) const { return false; } bool ASTNULLType::equalsListPartial( RefAST ) const { return false; } bool ASTNULLType::equalsTree( RefAST ) const { return false; } bool ASTNULLType::equalsTreePartial( RefAST ) const { return false; } vector ASTNULLType::findAll( RefAST ) { return vector(); } vector ASTNULLType::findAllPartial( RefAST ) { return vector(); } RefAST ASTNULLType::getFirstChild() const { return this; } RefAST ASTNULLType::getNextSibling() const { return this; } string ASTNULLType::getText() const { return ""; } int ASTNULLType::getType() const { return Token::NULL_TREE_LOOKAHEAD; } void ASTNULLType::initialize( int, const string& ) { } void ASTNULLType::initialize( RefAST ) { } void ASTNULLType::initialize( RefToken ) { } #ifdef ANTLR_SUPPORT_XML void ASTNULLType::initialize( istream& ) { } #endif void ASTNULLType::setFirstChild( RefAST ) { } void ASTNULLType::setNextSibling( RefAST ) { } void ASTNULLType::setText( const string& ) { } void ASTNULLType::setType( int ) { } string ASTNULLType::toString() const { return getText(); } string ASTNULLType::toStringList() const { return getText(); } string ASTNULLType::toStringTree() const { return getText(); } #ifdef ANTLR_SUPPORT_XML bool ASTNULLType::attributesToStream( ostream& ) const { return false; } void ASTNULLType::toStream( ostream& out ) const { out << "" << endl; } #endif const char* ASTNULLType::typeName( void ) const { return "ASTNULLType"; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/ASTRefCount.cpp000066400000000000000000000012741345112435200226210ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/ASTRefCount.cpp#2 $ */ #include "antlr/ASTRefCount.hpp" #include "antlr/AST.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif ASTRef::ASTRef(AST* p) : ptr(p), count(1) { if (p && !p->ref) p->ref = this; } ASTRef::~ASTRef() { delete ptr; } ASTRef* ASTRef::getRef(const AST* p) { if (p) { AST* pp = const_cast(p); if (pp->ref) return pp->ref->increment(); else return new ASTRef(pp); } else return 0; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/BaseAST.cpp000066400000000000000000000151071345112435200217460ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/BaseAST.cpp#2 $ */ #include "antlr/config.hpp" #include #include "antlr/AST.hpp" #include "antlr/BaseAST.hpp" ANTLR_USING_NAMESPACE(std) #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif size_t BaseAST::getNumberOfChildren() const { RefBaseAST t = this->down; size_t n = 0; if( t ) { n = 1; while( t->right ) { t = t->right; n++; } return n; } return n; } void BaseAST::doWorkForFindAll( ANTLR_USE_NAMESPACE(std)vector& v, RefAST target,bool partialMatch) { // Start walking sibling lists, looking for matches. for (RefAST sibling=this; sibling; sibling=sibling->getNextSibling()) { if ( (partialMatch && sibling->equalsTreePartial(target)) || (!partialMatch && sibling->equalsTree(target)) ) { v.push_back(sibling); } // regardless of match or not, check any children for matches if ( sibling->getFirstChild() ) { RefBaseAST(sibling->getFirstChild())->doWorkForFindAll(v, target, partialMatch); } } } /** Is t an exact structural and equals() match of this tree. The * 'this' reference is considered the start of a sibling list. */ bool BaseAST::equalsList(RefAST t) const { // the empty tree is not a match of any non-null tree. if (!t) return false; // Otherwise, start walking sibling lists. First mismatch, return false. RefAST sibling=this; for (;sibling && t; sibling=sibling->getNextSibling(), t=t->getNextSibling()) { // as a quick optimization, check roots first. if (!sibling->equals(t)) return false; // if roots match, do full list match test on children. if (sibling->getFirstChild()) { if (!sibling->getFirstChild()->equalsList(t->getFirstChild())) return false; } // sibling has no kids, make sure t doesn't either else if (t->getFirstChild()) return false; } if (!sibling && !t) return true; // one sibling list has more than the other return false; } /** Is 'sub' a subtree of this list? * The siblings of the root are NOT ignored. */ bool BaseAST::equalsListPartial(RefAST sub) const { // the empty tree is always a subset of any tree. if (!sub) return true; // Otherwise, start walking sibling lists. First mismatch, return false. RefAST sibling=this; for (;sibling && sub; sibling=sibling->getNextSibling(), sub=sub->getNextSibling()) { // as a quick optimization, check roots first. if (!sibling->equals(sub)) return false; // if roots match, do partial list match test on children. if (sibling->getFirstChild()) if (!sibling->getFirstChild()->equalsListPartial(sub->getFirstChild())) return false; } if (!sibling && sub) // nothing left to match in this tree, but subtree has more return false; // either both are null or sibling has more, but subtree doesn't return true; } /** Is tree rooted at 'this' equal to 't'? The siblings * of 'this' are ignored. */ bool BaseAST::equalsTree(RefAST t) const { // check roots first if (!equals(t)) return false; // if roots match, do full list match test on children. if (getFirstChild()) { if (!getFirstChild()->equalsList(t->getFirstChild())) return false; } // sibling has no kids, make sure t doesn't either else if (t->getFirstChild()) return false; return true; } /** Is 'sub' a subtree of the tree rooted at 'this'? The siblings * of 'this' are ignored. */ bool BaseAST::equalsTreePartial(RefAST sub) const { // the empty tree is always a subset of any tree. if (!sub) return true; // check roots first if (!equals(sub)) return false; // if roots match, do full list partial match test on children. if (getFirstChild()) if (!getFirstChild()->equalsListPartial(sub->getFirstChild())) return false; return true; } /** Walk the tree looking for all exact subtree matches. Return * an ASTEnumerator that lets the caller walk the list * of subtree roots found herein. */ ANTLR_USE_NAMESPACE(std)vector BaseAST::findAll(RefAST target) { ANTLR_USE_NAMESPACE(std)vector roots; // the empty tree cannot result in an enumeration if (target) { doWorkForFindAll(roots,target,false); // find all matches recursively } return roots; } /** Walk the tree looking for all subtrees. Return * an ASTEnumerator that lets the caller walk the list * of subtree roots found herein. */ ANTLR_USE_NAMESPACE(std)vector BaseAST::findAllPartial(RefAST target) { ANTLR_USE_NAMESPACE(std)vector roots; // the empty tree cannot result in an enumeration if (target) doWorkForFindAll(roots,target,true); // find all matches recursively return roots; } ANTLR_USE_NAMESPACE(std)string BaseAST::toStringList() const { ANTLR_USE_NAMESPACE(std)string ts=""; if (getFirstChild()) { ts+=" ( "; ts+=toString(); ts+=getFirstChild()->toStringList(); ts+=" )"; } else { ts+=" "; ts+=toString(); } if (getNextSibling()) ts+=getNextSibling()->toStringList(); return ts; } ANTLR_USE_NAMESPACE(std)string BaseAST::toStringTree() const { ANTLR_USE_NAMESPACE(std)string ts = ""; if (getFirstChild()) { ts+=" ( "; ts+=toString(); ts+=getFirstChild()->toStringList(); ts+=" )"; } else { ts+=" "; ts+=toString(); } return ts; } #ifdef ANTLR_SUPPORT_XML /* This whole XML output stuff needs a little bit more thought * I'd like to store extra XML data in the node. e.g. for custom ast's * with for instance symboltable references. This * should be more pluggable.. * @returns boolean value indicating wether a closetag should be produced. */ bool BaseAST::attributesToStream( ANTLR_USE_NAMESPACE(std)ostream& out ) const { out << "text=\"" << this->getText() << "\" type=\"" << this->getType() << "\""; return false; } void BaseAST::toStream( ANTLR_USE_NAMESPACE(std)ostream& out ) const { for( RefAST node = this; node != 0; node = node->getNextSibling() ) { out << "<" << this->typeName() << " "; // Write out attributes and if there is extra data... bool need_close_tag = node->attributesToStream( out ); if( need_close_tag ) { // got children so write them... if( node->getFirstChild() != 0 ) node->getFirstChild()->toStream( out ); // and a closing tag.. out << "typeName() << ">" << endl; } } } #endif // this is nasty, but it makes the code generation easier ANTLR_API RefAST nullAST; #if defined(_MSC_VER) && !defined(__ICL) // Microsoft Visual C++ extern ANTLR_API AST* const nullASTptr = 0; #else ANTLR_API AST* const nullASTptr = 0; #endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/BitSet.cpp000066400000000000000000000022701345112435200217130ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/BitSet.cpp#2 $ */ #include "antlr/BitSet.hpp" #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif BitSet::BitSet(unsigned int nbits) : storage(nbits) { for (unsigned int i = 0; i < nbits ; i++ ) storage[i] = false; } BitSet::BitSet( const unsigned long* bits_, unsigned int nlongs ) : storage(nlongs*32) { for ( unsigned int i = 0 ; i < (nlongs * 32); i++) storage[i] = (bits_[i>>5] & (1UL << (i&31))) ? true : false; } BitSet::~BitSet() { } void BitSet::add(unsigned int el) { if( el >= storage.size() ) storage.resize( el+1, false ); storage[el] = true; } bool BitSet::member(unsigned int el) const { if ( el >= storage.size()) return false; return storage[el]; } ANTLR_USE_NAMESPACE(std)vector BitSet::toArray() const { ANTLR_USE_NAMESPACE(std)vector elems; for (unsigned int i = 0; i < storage.size(); i++) { if (storage[i]) elems.push_back(i); } return elems; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/CharBuffer.cpp000066400000000000000000000026121345112435200225300ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/CharBuffer.cpp#2 $ */ #include "antlr/CharBuffer.hpp" #include //#include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /* RK: Per default istream does not throw exceptions. This can be * enabled with: * stream.exceptions(ios_base::badbit|ios_base::failbit|ios_base::eofbit); * * We could try catching the bad/fail stuff. But handling eof via this is * not a good idea. EOF is best handled as a 'normal' character. * * So this does not work yet with gcc... Comment it until I get to a platform * that does.. */ /** Create a character buffer. Enable fail and bad exceptions, if supported * by platform. */ CharBuffer::CharBuffer(ANTLR_USE_NAMESPACE(std)istream& input_) : input(input_) { // input.exceptions(ANTLR_USE_NAMESPACE(std)ios_base::badbit| // ANTLR_USE_NAMESPACE(std)ios_base::failbit); } /** Get the next character from the stream. May throw CharStreamIOException * when something bad happens (not EOF) (if supported by platform). */ int CharBuffer::getChar() { // try { return input.get(); // } // catch (ANTLR_USE_NAMESPACE(std)ios_base::failure& e) { // throw CharStreamIOException(e); // } } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/CharScanner.cpp000066400000000000000000000057601345112435200227170ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/CharScanner.cpp#2 $ */ #include #include "antlr/CharScanner.hpp" #include "antlr/CommonToken.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif ANTLR_C_USING(exit) CharScanner::CharScanner(InputBuffer& cb, bool case_sensitive ) : saveConsumedInput(true) //, caseSensitiveLiterals(true) , caseSensitive(case_sensitive) , literals(CharScannerLiteralsLess(this)) , inputState(new LexerInputState(cb)) , commitToPath(false) , tabsize(8) , traceDepth(0) { setTokenObjectFactory(&CommonToken::factory); } CharScanner::CharScanner(InputBuffer* cb, bool case_sensitive ) : saveConsumedInput(true) //, caseSensitiveLiterals(true) , caseSensitive(case_sensitive) , literals(CharScannerLiteralsLess(this)) , inputState(new LexerInputState(cb)) , commitToPath(false) , tabsize(8) , traceDepth(0) { setTokenObjectFactory(&CommonToken::factory); } CharScanner::CharScanner( const LexerSharedInputState& state, bool case_sensitive ) : saveConsumedInput(true) //, caseSensitiveLiterals(true) , caseSensitive(case_sensitive) , literals(CharScannerLiteralsLess(this)) , inputState(state) , commitToPath(false) , tabsize(8) , traceDepth(0) { setTokenObjectFactory(&CommonToken::factory); } /** Report exception errors caught in nextToken() */ void CharScanner::reportError(const RecognitionException& ex) { ANTLR_USE_NAMESPACE(std)cerr << ex.toString().c_str() << ANTLR_USE_NAMESPACE(std)endl; } /** Parser error-reporting function can be overridden in subclass */ void CharScanner::reportError(const ANTLR_USE_NAMESPACE(std)string& s) { if (getFilename() == "") ANTLR_USE_NAMESPACE(std)cerr << "error: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; else ANTLR_USE_NAMESPACE(std)cerr << getFilename().c_str() << ": error: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; } /** Parser warning-reporting function can be overridden in subclass */ void CharScanner::reportWarning(const ANTLR_USE_NAMESPACE(std)string& s) { if (getFilename() == "") ANTLR_USE_NAMESPACE(std)cerr << "warning: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; else ANTLR_USE_NAMESPACE(std)cerr << getFilename().c_str() << ": warning: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; } void CharScanner::traceIndent() { for( int i = 0; i < traceDepth; i++ ) ANTLR_USE_NAMESPACE(std)cout << " "; } void CharScanner::traceIn(const char* rname) { traceDepth++; traceIndent(); ANTLR_USE_NAMESPACE(std)cout << "> lexer " << rname << "; c==" << LA(1) << ANTLR_USE_NAMESPACE(std)endl; } void CharScanner::traceOut(const char* rname) { traceIndent(); ANTLR_USE_NAMESPACE(std)cout << "< lexer " << rname << "; c==" << LA(1) << ANTLR_USE_NAMESPACE(std)endl; traceDepth--; } #ifndef NO_STATIC_CONSTS const int CharScanner::NO_CHAR; const int CharScanner::EOF_CHAR; #endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/CommonAST.cpp000066400000000000000000000017641345112435200223300ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/CommonAST.cpp#2 $ */ #include "antlr/config.hpp" #include #include #include "antlr/CommonAST.hpp" #include "antlr/ANTLRUtil.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif const char* const CommonAST::TYPE_NAME = "CommonAST"; #ifdef ANTLR_SUPPORT_XML void CommonAST::initialize( ANTLR_USE_NAMESPACE(std)istream& in ) { ANTLR_USE_NAMESPACE(std)string t1, t2, text; // text read_AttributeNValue( in, t1, text ); read_AttributeNValue( in, t1, t2 ); #ifdef ANTLR_ATOI_IN_STD int type = ANTLR_USE_NAMESPACE(std)atoi(t2.c_str()); #else int type = atoi(t2.c_str()); #endif // initialize first part of AST. this->initialize( type, text ); } #endif RefAST CommonAST::factory() { return RefAST(new CommonAST); } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/CommonASTWithHiddenTokens.cpp000066400000000000000000000034661345112435200254650ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/CommonASTWithHiddenTokens.cpp#2 $ */ #include "antlr/config.hpp" #include "antlr/AST.hpp" #include "antlr/BaseAST.hpp" #include "antlr/CommonAST.hpp" #include "antlr/CommonASTWithHiddenTokens.hpp" #include "antlr/CommonHiddenStreamToken.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif const char* const CommonASTWithHiddenTokens::TYPE_NAME = "CommonASTWithHiddenTokens"; // RK: Do not put constructor and destructor into the header file here.. // this triggers something very obscure in gcc 2.95.3 (and 3.0) // missing vtables and stuff. // Although this may be a problem with with binutils. CommonASTWithHiddenTokens::CommonASTWithHiddenTokens() : CommonAST() { } CommonASTWithHiddenTokens::~CommonASTWithHiddenTokens() { } void CommonASTWithHiddenTokens::initialize(int t,const ANTLR_USE_NAMESPACE(std)string& txt) { CommonAST::initialize(t,txt); } void CommonASTWithHiddenTokens::initialize(RefAST t) { CommonAST::initialize(t); hiddenBefore = RefCommonASTWithHiddenTokens(t)->getHiddenBefore(); hiddenAfter = RefCommonASTWithHiddenTokens(t)->getHiddenAfter(); } void CommonASTWithHiddenTokens::initialize(RefToken t) { CommonAST::initialize(t); hiddenBefore = static_cast(t.get())->getHiddenBefore(); hiddenAfter = static_cast(t.get())->getHiddenAfter(); } RefAST CommonASTWithHiddenTokens::factory() { return RefAST(new CommonASTWithHiddenTokens); } RefAST CommonASTWithHiddenTokens::clone( void ) const { CommonASTWithHiddenTokens *ast = new CommonASTWithHiddenTokens( *this ); return RefAST(ast); } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/CommonHiddenStreamToken.cpp000066400000000000000000000021361345112435200252430ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/CommonHiddenStreamToken.cpp#2 $ */ #include "antlr/CommonHiddenStreamToken.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif CommonHiddenStreamToken::CommonHiddenStreamToken() : CommonToken() { } CommonHiddenStreamToken::CommonHiddenStreamToken(int t, const ANTLR_USE_NAMESPACE(std)string& txt) : CommonToken(t,txt) { } CommonHiddenStreamToken::CommonHiddenStreamToken(const ANTLR_USE_NAMESPACE(std)string& s) : CommonToken(s) { } RefToken CommonHiddenStreamToken::getHiddenAfter() { return hiddenAfter; } RefToken CommonHiddenStreamToken::getHiddenBefore() { return hiddenBefore; } RefToken CommonHiddenStreamToken::factory() { return RefToken(new CommonHiddenStreamToken); } void CommonHiddenStreamToken::setHiddenAfter(RefToken t) { hiddenAfter = t; } void CommonHiddenStreamToken::setHiddenBefore(RefToken t) { hiddenBefore = t; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/CommonToken.cpp000066400000000000000000000016351345112435200227560ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/CommonToken.cpp#2 $ */ #include "antlr/CommonToken.hpp" #include "antlr/String.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif CommonToken::CommonToken() : Token(), line(1), col(1), text("") {} CommonToken::CommonToken(int t, const ANTLR_USE_NAMESPACE(std)string& txt) : Token(t) , line(1) , col(1) , text(txt) {} CommonToken::CommonToken(const ANTLR_USE_NAMESPACE(std)string& s) : Token() , line(1) , col(1) , text(s) {} ANTLR_USE_NAMESPACE(std)string CommonToken::toString() const { return "[\""+getText()+"\",<"+getType()+">,line="+getLine()+",column="+getColumn()+"]"; } RefToken CommonToken::factory() { return RefToken(new CommonToken); } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/InputBuffer.cpp000066400000000000000000000034671345112435200227630ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/InputBuffer.cpp#2 $ */ #include "antlr/config.hpp" #include "antlr/InputBuffer.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** Ensure that the character buffer is sufficiently full */ void InputBuffer::fill(unsigned int amount) { syncConsume(); // Fill the buffer sufficiently to hold needed characters while (queue.entries() < amount + markerOffset) { // Append the next character queue.append(getChar()); } } /** get the current lookahead characters as a string * @warning it may treat 0 and EOF values wrong */ ANTLR_USE_NAMESPACE(std)string InputBuffer::getLAChars( void ) const { ANTLR_USE_NAMESPACE(std)string ret; for(unsigned int i = markerOffset; i < queue.entries(); i++) ret += queue.elementAt(i); return ret; } /** get the current marked characters as a string * @warning it may treat 0 and EOF values wrong */ ANTLR_USE_NAMESPACE(std)string InputBuffer::getMarkedChars( void ) const { ANTLR_USE_NAMESPACE(std)string ret; for(unsigned int i = 0; i < markerOffset; i++) ret += queue.elementAt(i); return ret; } /** Return an integer marker that can be used to rewind the buffer to * its current state. */ unsigned int InputBuffer::mark() { syncConsume(); nMarkers++; return markerOffset; } /** Rewind the character buffer to a marker. * @param mark Marker returned previously from mark() */ void InputBuffer::rewind(unsigned int mark) { syncConsume(); markerOffset = mark; nMarkers--; } unsigned int InputBuffer::entries() const { //assert(queue.entries() >= markerOffset); return queue.entries() - markerOffset; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/LLkParser.cpp000066400000000000000000000026251345112435200223640ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/LLkParser.cpp#2 $ */ #include "antlr/LLkParser.hpp" #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif ANTLR_USING_NAMESPACE(std) /**An LL(k) parser. * * @see antlr.Token * @see antlr.TokenBuffer * @see antlr.LL1Parser */ // LLkParser(int k_); LLkParser::LLkParser(const ParserSharedInputState& state, int k_) : Parser(state), k(k_) { } LLkParser::LLkParser(TokenBuffer& tokenBuf, int k_) : Parser(tokenBuf), k(k_) { } LLkParser::LLkParser(TokenStream& lexer, int k_) : Parser(new TokenBuffer(lexer)), k(k_) { } void LLkParser::trace(const char* ee, const char* rname) { traceIndent(); cout << ee << rname << ((inputState->guessing>0)?"; [guessing]":"; "); for (int i = 1; i <= k; i++) { if (i != 1) { cout << ", "; } cout << "LA(" << i << ")=="; string temp; try { temp = LT(i)->getText().c_str(); } catch( ANTLRException& ae ) { temp = "[error: "; temp += ae.toString(); temp += ']'; } cout << temp; } cout << endl; } void LLkParser::traceIn(const char* rname) { traceDepth++; trace("> ",rname); } void LLkParser::traceOut(const char* rname) { trace("< ",rname); traceDepth--; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/MismatchedCharException.cpp000066400000000000000000000062151345112435200252570ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/MismatchedCharException.cpp#2 $ */ #include "antlr/CharScanner.hpp" #include "antlr/MismatchedCharException.hpp" #include "antlr/String.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif MismatchedCharException::MismatchedCharException() : RecognitionException("Mismatched char") {} // Expected range / not range MismatchedCharException::MismatchedCharException( int c, int lower, int upper_, bool matchNot, CharScanner* scanner_ ) : RecognitionException("Mismatched char", scanner_->getFilename(), scanner_->getLine(), scanner_->getColumn()) , mismatchType(matchNot ? NOT_RANGE : RANGE) , foundChar(c) , expecting(lower) , upper(upper_) , scanner(scanner_) { } // Expected token / not token MismatchedCharException::MismatchedCharException( int c, int expecting_, bool matchNot, CharScanner* scanner_ ) : RecognitionException("Mismatched char", scanner_->getFilename(), scanner_->getLine(), scanner_->getColumn()) , mismatchType(matchNot ? NOT_CHAR : CHAR) , foundChar(c) , expecting(expecting_) , scanner(scanner_) { } // Expected BitSet / not BitSet MismatchedCharException::MismatchedCharException( int c, BitSet set_, bool matchNot, CharScanner* scanner_ ) : RecognitionException("Mismatched char", scanner_->getFilename(), scanner_->getLine(), scanner_->getColumn()) , mismatchType(matchNot ? NOT_SET : SET) , foundChar(c) , set(set_) , scanner(scanner_) { } ANTLR_USE_NAMESPACE(std)string MismatchedCharException::getMessage() const { ANTLR_USE_NAMESPACE(std)string s; switch (mismatchType) { case CHAR : s += "expecting '" + charName(expecting) + "', found '" + charName(foundChar) + "'"; break; case NOT_CHAR : s += "expecting anything but '" + charName(expecting) + "'; got it anyway"; break; case RANGE : s += "expecting token in range: '" + charName(expecting) + "'..'" + charName(upper) + "', found '" + charName(foundChar) + "'"; break; case NOT_RANGE : s += "expecting token NOT in range: " + charName(expecting) + "'..'" + charName(upper) + "', found '" + charName(foundChar) + "'"; break; case SET : case NOT_SET : { s += ANTLR_USE_NAMESPACE(std)string("expecting ") + (mismatchType == NOT_SET ? "NOT " : "") + "one of ("; ANTLR_USE_NAMESPACE(std)vector elems = set.toArray(); for ( unsigned int i = 0; i < elems.size(); i++ ) { s += " '"; s += charName(elems[i]); s += "'"; } s += "), found '" + charName(foundChar) + "'"; } break; default : s += RecognitionException::getMessage(); break; } return s; } #ifndef NO_STATIC_CONSTS const int MismatchedCharException::CHAR; const int MismatchedCharException::NOT_CHAR; const int MismatchedCharException::RANGE; const int MismatchedCharException::NOT_RANGE; const int MismatchedCharException::SET; const int MismatchedCharException::NOT_SET; #endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/MismatchedTokenException.cpp000066400000000000000000000124651345112435200254660ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/MismatchedTokenException.cpp#2 $ */ #include "antlr/MismatchedTokenException.hpp" #include "antlr/String.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif MismatchedTokenException::MismatchedTokenException() : RecognitionException("Mismatched Token: expecting any AST node","",-1,-1) , token(0) , node(nullASTptr) , tokenNames(0) , numTokens(0) { } // Expected range / not range MismatchedTokenException::MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefAST node_, int lower, int upper_, bool matchNot ) : RecognitionException("Mismatched Token","",-1,-1) , token(0) , node(node_) , tokenText( (node_ ? node_->toString(): ANTLR_USE_NAMESPACE(std)string("")) ) , mismatchType(matchNot ? NOT_RANGE : RANGE) , expecting(lower) , upper(upper_) , tokenNames(tokenNames_) , numTokens(numTokens_) { } // Expected token / not token MismatchedTokenException::MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefAST node_, int expecting_, bool matchNot ) : RecognitionException("Mismatched Token","",-1,-1) , token(0) , node(node_) , tokenText( (node_ ? node_->toString(): ANTLR_USE_NAMESPACE(std)string("")) ) , mismatchType(matchNot ? NOT_TOKEN : TOKEN) , expecting(expecting_) , tokenNames(tokenNames_) , numTokens(numTokens_) { } // Expected BitSet / not BitSet MismatchedTokenException::MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefAST node_, BitSet set_, bool matchNot ) : RecognitionException("Mismatched Token","",-1,-1) , token(0) , node(node_) , tokenText( (node_ ? node_->toString(): ANTLR_USE_NAMESPACE(std)string("")) ) , mismatchType(matchNot ? NOT_SET : SET) , set(set_) , tokenNames(tokenNames_) , numTokens(numTokens_) { } // Expected range / not range MismatchedTokenException::MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefToken token_, int lower, int upper_, bool matchNot, const ANTLR_USE_NAMESPACE(std)string& fileName_ ) : RecognitionException("Mismatched Token",fileName_,token_->getLine(),token_->getColumn()) , token(token_) , node(nullASTptr) , tokenText(token_->getText()) , mismatchType(matchNot ? NOT_RANGE : RANGE) , expecting(lower) , upper(upper_) , tokenNames(tokenNames_) , numTokens(numTokens_) { } // Expected token / not token MismatchedTokenException::MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefToken token_, int expecting_, bool matchNot, const ANTLR_USE_NAMESPACE(std)string& fileName_ ) : RecognitionException("Mismatched Token",fileName_,token_->getLine(),token_->getColumn()) , token(token_) , node(nullASTptr) , tokenText(token_->getText()) , mismatchType(matchNot ? NOT_TOKEN : TOKEN) , expecting(expecting_) , tokenNames(tokenNames_) , numTokens(numTokens_) { } // Expected BitSet / not BitSet MismatchedTokenException::MismatchedTokenException( const char* const* tokenNames_, const int numTokens_, RefToken token_, BitSet set_, bool matchNot, const ANTLR_USE_NAMESPACE(std)string& fileName_ ) : RecognitionException("Mismatched Token",fileName_,token_->getLine(),token_->getColumn()) , token(token_) , node(nullASTptr) , tokenText(token_->getText()) , mismatchType(matchNot ? NOT_SET : SET) , set(set_) , tokenNames(tokenNames_) , numTokens(numTokens_) { } ANTLR_USE_NAMESPACE(std)string MismatchedTokenException::getMessage() const { ANTLR_USE_NAMESPACE(std)string s; switch (mismatchType) { case TOKEN: s += "expecting " + tokenName(expecting) + ", found '" + tokenText + "'"; break; case NOT_TOKEN: s += "expecting anything but " + tokenName(expecting) + "; got it anyway"; break; case RANGE: s += "expecting token in range: " + tokenName(expecting) + ".." + tokenName(upper) + ", found '" + tokenText + "'"; break; case NOT_RANGE: s += "expecting token NOT in range: " + tokenName(expecting) + ".." + tokenName(upper) + ", found '" + tokenText + "'"; break; case SET: case NOT_SET: { s += ANTLR_USE_NAMESPACE(std)string("expecting ") + (mismatchType == NOT_SET ? "NOT " : "") + "one of ("; ANTLR_USE_NAMESPACE(std)vector elems = set.toArray(); for ( unsigned int i = 0; i < elems.size(); i++ ) { s += " "; s += tokenName(elems[i]); } s += "), found '" + tokenText + "'"; } break; default: s = RecognitionException::getMessage(); break; } return s; } ANTLR_USE_NAMESPACE(std)string MismatchedTokenException::tokenName(int tokenType) const { if (tokenType == Token::INVALID_TYPE) return ""; else if (tokenType < 0 || tokenType >= numTokens) return ANTLR_USE_NAMESPACE(std)string("<") + tokenType + ">"; else return tokenNames[tokenType]; } #ifndef NO_STATIC_CONSTS const int MismatchedTokenException::TOKEN; const int MismatchedTokenException::NOT_TOKEN; const int MismatchedTokenException::RANGE; const int MismatchedTokenException::NOT_RANGE; const int MismatchedTokenException::SET; const int MismatchedTokenException::NOT_SET; #endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/NoViableAltException.cpp000066400000000000000000000024321345112435200245400ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/NoViableAltException.cpp#2 $ */ #include "antlr/NoViableAltException.hpp" #include "antlr/String.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif ANTLR_USING_NAMESPACE(std) NoViableAltException::NoViableAltException(RefAST t) : RecognitionException("NoViableAlt","",-1,-1), token(0), node(t) { } NoViableAltException::NoViableAltException( RefToken t, const ANTLR_USE_NAMESPACE(std)string& fileName_ ) : RecognitionException("NoViableAlt",fileName_,t->getLine(),t->getColumn()), token(t), node(nullASTptr) { } ANTLR_USE_NAMESPACE(std)string NoViableAltException::getMessage() const { if (token) { if( token->getType() == Token::EOF_TYPE ) return string("unexpected end of file"); else if( token->getType() == Token::NULL_TREE_LOOKAHEAD ) return string("unexpected end of tree"); else return string("unexpected token: ")+token->getText(); } // must a tree parser error if token==null if (!node) return "unexpected end of subtree"; return string("unexpected AST node: ")+node->toString(); } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/NoViableAltForCharException.cpp000066400000000000000000000021061345112435200260030ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/NoViableAltForCharException.cpp#2 $ */ #include "antlr/NoViableAltForCharException.hpp" #include "antlr/String.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif NoViableAltForCharException::NoViableAltForCharException(int c, CharScanner* scanner) : RecognitionException("NoViableAlt", scanner->getFilename(), scanner->getLine(),scanner->getColumn()), foundChar(c) { } NoViableAltForCharException::NoViableAltForCharException( int c, const ANTLR_USE_NAMESPACE(std)string& fileName_, int line_, int column_) : RecognitionException("NoViableAlt",fileName_,line_,column_), foundChar(c) { } ANTLR_USE_NAMESPACE(std)string NoViableAltForCharException::getMessage() const { return ANTLR_USE_NAMESPACE(std)string("unexpected char: ")+charName(foundChar); } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/Parser.cpp000066400000000000000000000065221345112435200217610ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/Parser.cpp#2 $ */ #include "antlr/Parser.hpp" #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** A generic ANTLR parser (LL(k) for k>=1) containing a bunch of * utility routines useful at any lookahead depth. We distinguish between * the LL(1) and LL(k) parsers because of efficiency. This may not be * necessary in the near future. * * Each parser object contains the state of the parse including a lookahead * cache (the form of which is determined by the subclass), whether or * not the parser is in guess mode, where tokens come from, etc... * *

* During guess mode, the current lookahead token(s) and token type(s) * cache must be saved because the token stream may not have been informed * to save the token (via mark) before the try block. * Guessing is started by: *

    *
  1. saving the lookahead cache. *
  2. marking the current position in the TokenBuffer. *
  3. increasing the guessing level. *
* * After guessing, the parser state is restored by: *
    *
  1. restoring the lookahead cache. *
  2. rewinding the TokenBuffer. *
  3. decreasing the guessing level. *
* * @see antlr.Token * @see antlr.TokenBuffer * @see antlr.TokenStream * @see antlr.LL1Parser * @see antlr.LLkParser */ bool DEBUG_PARSER = false; /** Parser error-reporting function can be overridden in subclass */ void Parser::reportError(const RecognitionException& ex) { ANTLR_USE_NAMESPACE(std)cerr << ex.toString().c_str() << ANTLR_USE_NAMESPACE(std)endl; } /** Parser error-reporting function can be overridden in subclass */ void Parser::reportError(const ANTLR_USE_NAMESPACE(std)string& s) { if ( getFilename()=="" ) ANTLR_USE_NAMESPACE(std)cerr << "error: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; else ANTLR_USE_NAMESPACE(std)cerr << getFilename().c_str() << ": error: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; } /** Parser warning-reporting function can be overridden in subclass */ void Parser::reportWarning(const ANTLR_USE_NAMESPACE(std)string& s) { if ( getFilename()=="" ) ANTLR_USE_NAMESPACE(std)cerr << "warning: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; else ANTLR_USE_NAMESPACE(std)cerr << getFilename().c_str() << ": warning: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; } /** Set or change the input token buffer */ // void setTokenBuffer(TokenBuffer* t); void Parser::traceIndent() { for( int i = 0; i < traceDepth; i++ ) ANTLR_USE_NAMESPACE(std)cout << " "; } void Parser::traceIn(const char* rname) { traceDepth++; for( int i = 0; i < traceDepth; i++ ) ANTLR_USE_NAMESPACE(std)cout << " "; ANTLR_USE_NAMESPACE(std)cout << "> " << rname << "; LA(1)==" << LT(1)->getText().c_str() << ((inputState->guessing>0)?" [guessing]":"") << ANTLR_USE_NAMESPACE(std)endl; } void Parser::traceOut(const char* rname) { for( int i = 0; i < traceDepth; i++ ) ANTLR_USE_NAMESPACE(std)cout << " "; ANTLR_USE_NAMESPACE(std)cout << "< " << rname << "; LA(1)==" << LT(1)->getText().c_str() << ((inputState->guessing>0)?" [guessing]":"") << ANTLR_USE_NAMESPACE(std)endl; traceDepth--; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/RecognitionException.cpp000066400000000000000000000032611345112435200246610ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/RecognitionException.cpp#2 $ */ #include "antlr/RecognitionException.hpp" #include "antlr/String.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif RecognitionException::RecognitionException() : ANTLRException("parsing error") , line(-1) , column(-1) { } RecognitionException::RecognitionException(const ANTLR_USE_NAMESPACE(std)string& s) : ANTLRException(s) , line(-1) , column(-1) { } RecognitionException::RecognitionException(const ANTLR_USE_NAMESPACE(std)string& s, const ANTLR_USE_NAMESPACE(std)string& fileName_, int line_,int column_) : ANTLRException(s) , fileName(fileName_) , line(line_) , column(column_) { } ANTLR_USE_NAMESPACE(std)string RecognitionException::getFileLineColumnString() const { ANTLR_USE_NAMESPACE(std)string fileLineColumnString; if ( fileName.length() > 0 ) fileLineColumnString = fileName + ":"; if ( line != -1 ) { if ( fileName.length() == 0 ) fileLineColumnString = fileLineColumnString + "line "; fileLineColumnString = fileLineColumnString + line; if ( column != -1 ) fileLineColumnString = fileLineColumnString + ":" + column; fileLineColumnString = fileLineColumnString + ":"; } fileLineColumnString = fileLineColumnString + " "; return fileLineColumnString; } ANTLR_USE_NAMESPACE(std)string RecognitionException::toString() const { return getFileLineColumnString()+getMessage(); } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/String.cpp000066400000000000000000000031141345112435200217650ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/String.cpp#2 $ */ #include "antlr/String.hpp" #include #ifdef HAS_NOT_CSTDIO_H #include #else #include #endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif // wh: hack for Borland C++ 5.6 #if __BORLANDC__ using std::sprintf; #endif // RK: should be using snprintf actually... (or stringstream) ANTLR_C_USING(sprintf) ANTLR_USE_NAMESPACE(std)string operator+( const ANTLR_USE_NAMESPACE(std)string& lhs, const int rhs ) { char tmp[100]; sprintf(tmp,"%d",rhs); return lhs+tmp; } ANTLR_USE_NAMESPACE(std)string operator+( const ANTLR_USE_NAMESPACE(std)string& lhs, size_t rhs ) { char tmp[100]; sprintf(tmp,"%zu",rhs); return lhs+tmp; } /** Convert character to readable string */ ANTLR_USE_NAMESPACE(std)string charName(int ch) { if (ch == EOF) return "EOF"; else { ANTLR_USE_NAMESPACE(std)string s; // when you think you've seen it all.. an isprint that crashes... ch = ch & 0xFF; #ifdef ANTLR_CCTYPE_NEEDS_STD if( ANTLR_USE_NAMESPACE(std)isprint( ch ) ) #else if( isprint( ch ) ) #endif { s.append("'"); s += ch; s.append("'"); // s += "'"+ch+"'"; } else { s += "0x"; unsigned int t = ch >> 4; if( t < 10 ) s += t | 0x30; else s += t + 0x37; t = ch & 0xF; if( t < 10 ) s += t | 0x30; else s += t + 0x37; } return s; } } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/Token.cpp000066400000000000000000000024171345112435200216040ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/Token.cpp#2 $ */ #include "antlr/Token.hpp" #include "antlr/String.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif int Token::getColumn() const { return 0; } int Token::getLine() const { return 0; } ANTLR_USE_NAMESPACE(std)string Token::getText() const { return ""; } int Token::getType() const { return type; } void Token::setColumn(int) { } void Token::setLine(int) { } void Token::setText(const ANTLR_USE_NAMESPACE(std)string&) { } void Token::setType(int t) { type = t; } void Token::setFilename(const ANTLR_USE_NAMESPACE(std)string&) { } ANTLR_USE_NAMESPACE(std)string emptyString(""); const ANTLR_USE_NAMESPACE(std)string& Token::getFilename() const { return emptyString; } ANTLR_USE_NAMESPACE(std)string Token::toString() const { return "[\""+getText()+"\",<"+type+">]"; } ANTLR_API RefToken nullToken; #ifndef NO_STATIC_CONSTS const int Token::MIN_USER_TYPE; const int Token::NULL_TREE_LOOKAHEAD; const int Token::INVALID_TYPE; const int Token::EOF_TYPE; const int Token::SKIP; #endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/TokenBuffer.cpp000066400000000000000000000042321345112435200227330ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/TokenBuffer.cpp#2 $ */ #include "antlr/TokenBuffer.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /**A Stream of Token objects fed to the parser from a TokenStream that can * be rewound via mark()/rewind() methods. *

* A dynamic array is used to buffer up all the input tokens. Normally, * "k" tokens are stored in the buffer. More tokens may be stored during * guess mode (testing syntactic predicate), or when LT(i>k) is referenced. * Consumption of tokens is deferred. In other words, reading the next * token is not done by conume(), but deferred until needed by LA or LT. *

* * @see antlr.Token * @see antlr.TokenStream * @see antlr.TokenQueue */ /** Create a token buffer */ TokenBuffer::TokenBuffer( TokenStream& inp ) : input(inp) , nMarkers(0) , markerOffset(0) , numToConsume(0) { } TokenBuffer::~TokenBuffer( void ) { } /** Ensure that the token buffer is sufficiently full */ void TokenBuffer::fill(unsigned int amount) { syncConsume(); // Fill the buffer sufficiently to hold needed tokens while (queue.entries() < (amount + markerOffset)) { // Append the next token queue.append(input.nextToken()); } } /** Get a lookahead token value */ int TokenBuffer::LA(unsigned int i) { fill(i); return queue.elementAt(markerOffset+i-1)->getType(); } /** Get a lookahead token */ RefToken TokenBuffer::LT(unsigned int i) { fill(i); return queue.elementAt(markerOffset+i-1); } /** Return an integer marker that can be used to rewind the buffer to * its current state. */ unsigned int TokenBuffer::mark() { syncConsume(); nMarkers++; return markerOffset; } /**Rewind the token buffer to a marker. * @param mark Marker returned previously from mark() */ void TokenBuffer::rewind(unsigned int mark) { syncConsume(); markerOffset=mark; nMarkers--; } /// Get number of non-consumed tokens unsigned int TokenBuffer::entries() const { return queue.entries() - markerOffset; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/TokenRefCount.cpp000066400000000000000000000012141345112435200232440ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id:$ */ #include "antlr/TokenRefCount.hpp" #include "antlr/Token.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif TokenRef::TokenRef(Token* p) : ptr(p), count(1) { if (p && !p->ref) p->ref = this; } TokenRef::~TokenRef() { delete ptr; } TokenRef* TokenRef::getRef(const Token* p) { if (p) { Token* pp = const_cast(p); if (pp->ref) return pp->ref->increment(); else return new TokenRef(pp); } else return 0; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/TokenStreamBasicFilter.cpp000066400000000000000000000017341345112435200250710ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/TokenStreamBasicFilter.cpp#2 $ */ #include "antlr/TokenStreamBasicFilter.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** This object is a TokenStream that passes through all * tokens except for those that you tell it to discard. * There is no buffering of the tokens. */ TokenStreamBasicFilter::TokenStreamBasicFilter(TokenStream& input_) : input(&input_) { } void TokenStreamBasicFilter::discard(int ttype) { discardMask.add(ttype); } void TokenStreamBasicFilter::discard(const BitSet& mask) { discardMask = mask; } RefToken TokenStreamBasicFilter::nextToken() { RefToken tok = input->nextToken(); while ( tok && discardMask.member(tok->getType()) ) { tok = input->nextToken(); } return tok; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/TokenStreamHiddenTokenFilter.cpp000066400000000000000000000103031345112435200262340ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/TokenStreamHiddenTokenFilter.cpp#2 $ */ #include "antlr/TokenStreamHiddenTokenFilter.hpp" #include "antlr/CommonHiddenStreamToken.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /**This object filters a token stream coming from a lexer * or another TokenStream so that only certain token channels * get transmitted to the parser. * * Any of the channels can be filtered off as "hidden" channels whose * tokens can be accessed from the parser. */ TokenStreamHiddenTokenFilter::TokenStreamHiddenTokenFilter(TokenStream& input) : TokenStreamBasicFilter(input) { } void TokenStreamHiddenTokenFilter::consume() { nextMonitoredToken = input->nextToken(); } void TokenStreamHiddenTokenFilter::consumeFirst() { consume(); // Handle situation where hidden or discarded tokens // appear first in input stream RefToken p; // while hidden or discarded scarf tokens while ( hideMask.member(LA(1)->getType()) || discardMask.member(LA(1)->getType()) ) { if ( hideMask.member(LA(1)->getType()) ) { if ( !p ) { p = LA(1); } else { static_cast(p.get())->setHiddenAfter(LA(1)); static_cast(LA(1).get())->setHiddenBefore(p); // double-link p = LA(1); } lastHiddenToken = p; if (!firstHidden) firstHidden = p; // record hidden token if first } consume(); } } BitSet TokenStreamHiddenTokenFilter::getDiscardMask() const { return discardMask; } /** Return a ptr to the hidden token appearing immediately after * token t in the input stream. */ RefToken TokenStreamHiddenTokenFilter::getHiddenAfter(RefToken t) { return static_cast(t.get())->getHiddenAfter(); } /** Return a ptr to the hidden token appearing immediately before * token t in the input stream. */ RefToken TokenStreamHiddenTokenFilter::getHiddenBefore(RefToken t) { return static_cast(t.get())->getHiddenBefore(); } BitSet TokenStreamHiddenTokenFilter::getHideMask() const { return hideMask; } /** Return the first hidden token if one appears * before any monitored token. */ RefToken TokenStreamHiddenTokenFilter::getInitialHiddenToken() { return firstHidden; } void TokenStreamHiddenTokenFilter::hide(int m) { hideMask.add(m); } void TokenStreamHiddenTokenFilter::hide(const BitSet& mask) { hideMask = mask; } RefToken TokenStreamHiddenTokenFilter::LA(int) { return nextMonitoredToken; } /** Return the next monitored token. * Test the token following the monitored token. * If following is another monitored token, save it * for the next invocation of nextToken (like a single * lookahead token) and return it then. * If following is unmonitored, nondiscarded (hidden) * channel token, add it to the monitored token. * * Note: EOF must be a monitored Token. */ RefToken TokenStreamHiddenTokenFilter::nextToken() { // handle an initial condition; don't want to get lookahead // token of this splitter until first call to nextToken if ( !LA(1) ) { consumeFirst(); } // we always consume hidden tokens after monitored, thus, // upon entry LA(1) is a monitored token. RefToken monitored = LA(1); // point to hidden tokens found during last invocation static_cast(monitored.get())->setHiddenBefore(lastHiddenToken); lastHiddenToken = nullToken; // Look for hidden tokens, hook them into list emanating // from the monitored tokens. consume(); RefToken p = monitored; // while hidden or discarded scarf tokens while ( hideMask.member(LA(1)->getType()) || discardMask.member(LA(1)->getType()) ) { if ( hideMask.member(LA(1)->getType()) ) { // attach the hidden token to the monitored in a chain // link forwards static_cast(p.get())->setHiddenAfter(LA(1)); // link backwards if (p != monitored) { //hidden cannot point to monitored tokens static_cast(LA(1).get())->setHiddenBefore(p); } p = lastHiddenToken = LA(1); } consume(); } return monitored; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/TokenStreamRewriteEngine.cpp000066400000000000000000000132731345112435200254520ustar00rootroot00000000000000#include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif #ifndef NO_STATIC_CONSTS const size_t TokenStreamRewriteEngine::MIN_TOKEN_INDEX = 0; const int TokenStreamRewriteEngine::PROGRAM_INIT_SIZE = 100; #endif const char* TokenStreamRewriteEngine::DEFAULT_PROGRAM_NAME = "default"; namespace { struct compareOperationIndex { typedef TokenStreamRewriteEngine::RewriteOperation RewriteOperation; bool operator() ( const RewriteOperation* a, const RewriteOperation* b ) const { return a->getIndex() < b->getIndex(); } }; struct dumpTokenWithIndex { dumpTokenWithIndex( ANTLR_USE_NAMESPACE(std)ostream& o ) : out(o) {} void operator() ( const RefTokenWithIndex& t ) { out << "[txt='" << t->getText() << "' tp=" << t->getType() << " idx=" << t->getIndex() << "]\n"; } ANTLR_USE_NAMESPACE(std)ostream& out; }; } TokenStreamRewriteEngine::TokenStreamRewriteEngine(TokenStream& upstream) : stream(upstream) , index(MIN_TOKEN_INDEX) , tokens() , programs() , discardMask() { } TokenStreamRewriteEngine::TokenStreamRewriteEngine(TokenStream& upstream, size_t initialSize ) : stream(upstream) , index(MIN_TOKEN_INDEX) , tokens(initialSize) , programs() , discardMask() { } RefToken TokenStreamRewriteEngine::nextToken( void ) { RefTokenWithIndex t; // suck tokens until end of stream or we find a non-discarded token do { t = RefTokenWithIndex(stream.nextToken()); if ( t ) { t->setIndex(index); // what is t's index in list? if ( t->getType() != Token::EOF_TYPE ) { tokens.push_back(t); // track all tokens except EOF } index++; // move to next position } } while ( t && discardMask.member(t->getType()) ); return RefToken(t); } void TokenStreamRewriteEngine::rollback( const std::string& programName, size_t instructionIndex ) { program_map::iterator rewrite = programs.find(programName); if( rewrite != programs.end() ) { operation_list& prog = rewrite->second; operation_list::iterator j = prog.begin(), end = prog.end(); std::advance(j,instructionIndex); if( j != end ) prog.erase(j, end); } } void TokenStreamRewriteEngine::originalToStream( std::ostream& out, size_t start, size_t end ) const { token_list::const_iterator s = tokens.begin(); std::advance( s, start ); token_list::const_iterator e = s; std::advance( e, end-start ); std::for_each( s, e, tokenToStream(out) ); } void TokenStreamRewriteEngine::toStream( std::ostream& out, const std::string& programName, size_t firstToken, size_t lastToken ) const { if( tokens.size() == 0 ) return; program_map::const_iterator rewriter = programs.find(programName); if ( rewriter == programs.end() ) return; // get the prog and some iterators in it... const operation_list& prog = rewriter->second; operation_list::const_iterator rewriteOpIndex = prog.begin(), rewriteOpEnd = prog.end(); size_t tokenCursor = firstToken; // make sure we don't run out of the tokens we have... if( lastToken > (tokens.size() - 1) ) lastToken = tokens.size() - 1; while ( tokenCursor <= lastToken ) { // std::cout << "tokenCursor = " << tokenCursor << " first prog index = " << (*rewriteOpIndex)->getIndex() << std::endl; if( rewriteOpIndex != rewriteOpEnd ) { size_t up_to_here = std::min(lastToken,(*rewriteOpIndex)->getIndex()); while( tokenCursor < up_to_here ) out << tokens[tokenCursor++]->getText(); } while ( rewriteOpIndex != rewriteOpEnd && tokenCursor == (*rewriteOpIndex)->getIndex() && tokenCursor <= lastToken ) { tokenCursor = (*rewriteOpIndex)->execute(out); ++rewriteOpIndex; } if( tokenCursor <= lastToken ) out << tokens[tokenCursor++]->getText(); } // std::cout << "Handling tail operations # left = " << std::distance(rewriteOpIndex,rewriteOpEnd) << std::endl; // now see if there are operations (append) beyond last token index std::for_each( rewriteOpIndex, rewriteOpEnd, executeOperation(out) ); rewriteOpIndex = rewriteOpEnd; } void TokenStreamRewriteEngine::toDebugStream( std::ostream& out, size_t start, size_t end ) const { token_list::const_iterator s = tokens.begin(); std::advance( s, start ); token_list::const_iterator e = s; std::advance( e, end-start ); std::for_each( s, e, dumpTokenWithIndex(out) ); } void TokenStreamRewriteEngine::addToSortedRewriteList( const std::string& programName, RewriteOperation* op ) { program_map::iterator rewrites = programs.find(programName); // check if we got the program already.. if ( rewrites == programs.end() ) { // no prog make a new one... operation_list ops; ops.push_back(op); programs.insert(std::make_pair(programName,ops)); return; } operation_list& prog = rewrites->second; if( prog.empty() ) { prog.push_back(op); return; } operation_list::iterator i, end = prog.end(); i = end; --i; // if at or beyond last op's index, just append if ( op->getIndex() >= (*i)->getIndex() ) { prog.push_back(op); // append to list of operations return; } i = prog.begin(); if( i != end ) { operation_list::iterator pos = std::upper_bound( i, end, op, compareOperationIndex() ); prog.insert(pos,op); } else prog.push_back(op); } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/TokenStreamSelector.cpp000066400000000000000000000050011345112435200244510ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/TokenStreamSelector.cpp#2 $ */ #include "antlr/TokenStreamSelector.hpp" #include "antlr/TokenStreamRetryException.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** A token stream MUX (multiplexor) knows about n token streams * and can multiplex them onto the same channel for use by token * stream consumer like a parser. This is a way to have multiple * lexers break up the same input stream for a single parser. * Or, you can have multiple instances of the same lexer handle * multiple input streams; this works great for includes. */ TokenStreamSelector::TokenStreamSelector() : input(0) { } TokenStreamSelector::~TokenStreamSelector() { } void TokenStreamSelector::addInputStream(TokenStream* stream, const ANTLR_USE_NAMESPACE(std)string& key) { inputStreamNames[key] = stream; } TokenStream* TokenStreamSelector::getCurrentStream() const { return input; } TokenStream* TokenStreamSelector::getStream(const ANTLR_USE_NAMESPACE(std)string& sname) const { inputStreamNames_coll::const_iterator i = inputStreamNames.find(sname); if (i == inputStreamNames.end()) { throw ANTLR_USE_NAMESPACE(std)string("TokenStream ")+sname+" not found"; } return (*i).second; } RefToken TokenStreamSelector::nextToken() { // keep looking for a token until you don't // get a retry exception for (;;) { try { return input->nextToken(); } catch (TokenStreamRetryException&) { // just retry "forever" } } } TokenStream* TokenStreamSelector::pop() { TokenStream* stream = streamStack.top(); streamStack.pop(); select(stream); return stream; } void TokenStreamSelector::push(TokenStream* stream) { streamStack.push(input); select(stream); } void TokenStreamSelector::push(const ANTLR_USE_NAMESPACE(std)string& sname) { streamStack.push(input); select(sname); } void TokenStreamSelector::retry() { throw TokenStreamRetryException(); } /** Set the stream without pushing old stream */ void TokenStreamSelector::select(TokenStream* stream) { input = stream; } void TokenStreamSelector::select(const ANTLR_USE_NAMESPACE(std)string& sname) { inputStreamNames_coll::const_iterator i = inputStreamNames.find(sname); if (i == inputStreamNames.end()) { throw ANTLR_USE_NAMESPACE(std)string("TokenStream ")+sname+" not found"; } input = (*i).second; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/TreeParser.cpp000066400000000000000000000040501345112435200225730ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/TreeParser.cpp#2 $ */ #include "antlr/TreeParser.hpp" #include "antlr/ASTNULLType.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif /** The AST Null object; the parsing cursor is set to this when * it is found to be null. This way, we can test the * token type of a node without having to have tests for null * everywhere. */ RefAST TreeParser::ASTNULL(new ASTNULLType); /** Parser error-reporting function can be overridden in subclass */ void TreeParser::reportError(const RecognitionException& ex) { ANTLR_USE_NAMESPACE(std)cerr << ex.toString().c_str() << ANTLR_USE_NAMESPACE(std)endl; } /** Parser error-reporting function can be overridden in subclass */ void TreeParser::reportError(const ANTLR_USE_NAMESPACE(std)string& s) { ANTLR_USE_NAMESPACE(std)cerr << "error: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; } /** Parser warning-reporting function can be overridden in subclass */ void TreeParser::reportWarning(const ANTLR_USE_NAMESPACE(std)string& s) { ANTLR_USE_NAMESPACE(std)cerr << "warning: " << s.c_str() << ANTLR_USE_NAMESPACE(std)endl; } /** Procedure to write out an indent for traceIn and traceOut */ void TreeParser::traceIndent() { for( int i = 0; i < traceDepth; i++ ) ANTLR_USE_NAMESPACE(std)cout << " "; } void TreeParser::traceIn(const char* rname, RefAST t) { traceDepth++; traceIndent(); ANTLR_USE_NAMESPACE(std)cout << "> " << rname << "(" << (t ? t->toString().c_str() : "null") << ")" << ((inputState->guessing>0)?" [guessing]":"") << ANTLR_USE_NAMESPACE(std)endl; } void TreeParser::traceOut(const char* rname, RefAST t) { traceIndent(); ANTLR_USE_NAMESPACE(std)cout << "< " << rname << "(" << (t ? t->toString().c_str() : "null") << ")" << ((inputState->guessing>0)?" [guessing]":"") << ANTLR_USE_NAMESPACE(std)endl; traceDepth--; } #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/antlr-2.7.7/src/dll.cpp000066400000000000000000000237051345112435200213020ustar00rootroot00000000000000/* ANTLR Translator Generator * Project led by Terence Parr at http://www.jGuru.com * Software rights: http://www.antlr.org/license.html * * $Id:$ */ /* * DLL stub for MSVC++. Based upon versions of Stephen Naughton and Michael * T. Richter */ // RK: Uncommented by instruction of Alexander Lenski //#if _MSC_VER > 1000 //# pragma once //#endif // _MSC_VER > 1000 // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN #include #if defined( _MSC_VER ) && ( _MSC_VER < 1300 ) # error "DLL Build not supported on old MSVC's" // Ok it seems to be possible with STLPort in stead of the vanilla MSVC STL // implementation. This needs some work though. (and don't try it if you're // not that familiar with compilers/building C++ DLL's in windows) #endif #include #include "antlr/config.hpp" #include "antlr/Token.hpp" #include "antlr/CircularQueue.hpp" #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE namespace antlr { #endif // Take care of necessary implicit instantiations of templates from STL // This should take care of MSVC 7.0 #if defined( _MSC_VER ) && ( _MSC_VER == 1300 ) // these come from AST.hpp template class ANTLR_API ASTRefCount< AST >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< RefAST >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)vector< RefAST >; //template ANTLR_API int operator<( ASTRefCount< AST >, ASTRefCount< AST > ); // ASTFactory.hpp template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< factory_descriptor_* >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const char*, factory_type_ > >; template struct ANTLR_API ANTLR_USE_NAMESPACE(std)pair< const char*, factory_type_ >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Vector_val< factory_descriptor_*, ANTLR_USE_NAMESPACE(std)allocator< factory_descriptor_* > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)vector< factory_descriptor_* >; // BitSet.hpp template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< bool >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Vector_val< bool, ANTLR_USE_NAMESPACE(std)allocator< bool > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)vector< bool >; // CharScanner.hpp template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< ANTLR_USE_NAMESPACE(std)string, int > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, int > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)_Tree_nod< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, int, CharScannerLiteralsLess, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, int > >, false > >::_Node >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)_Tree_ptr< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, int, CharScannerLiteralsLess, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, int > >, false > >::_Nodeptr >; template struct ANTLR_API ANTLR_USE_NAMESPACE(std)pair< ANTLR_USE_NAMESPACE(std)string, int >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, int, CharScannerLiteralsLess, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, int > >,false >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tree_nod< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, int, CharScannerLiteralsLess, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, int > >,false > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tree_ptr< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, int, CharScannerLiteralsLess, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, int > >,false > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tree_val< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, int, CharScannerLiteralsLess, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, int > >,false > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tree< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, int, CharScannerLiteralsLess, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, int > >,false > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)map< ANTLR_USE_NAMESPACE(std)string, int, CharScannerLiteralsLess >; // CircularQueue.hpp // RK: it might well be that a load of these ints need to be unsigned ints // (made some more stuff unsigned) template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< int >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Vector_val< int, ANTLR_USE_NAMESPACE(std)allocator< int > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)vector< int >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)vector< int, ANTLR_USE_NAMESPACE(std)allocator< int > >; // template ANTLR_API inline int CircularQueue< int >::entries() const; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< RefToken >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Vector_val< RefToken, ANTLR_USE_NAMESPACE(std)allocator< RefToken > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)vector< RefToken >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)vector< RefToken, ANTLR_USE_NAMESPACE(std)allocator< RefToken > >; // template ANTLR_API inline int CircularQueue< RefToken >::entries() const; // CommonAST.hpp template class ANTLR_API ASTRefCount< CommonAST >; // CommonASTWithHiddenTokenTypes.hpp template class ANTLR_API ASTRefCount< CommonASTWithHiddenTokens >; // LexerSharedInputState.hpp template class ANTLR_API RefCount< LexerInputState >; // ParserSharedInputState.hpp template class ANTLR_API RefCount< ParserInputState >; // TokenStreamSelector.hpp template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< ANTLR_USE_NAMESPACE(std)string, TokenStream* > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, TokenStream* > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)_Tree_nod< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, TokenStream*, ANTLR_USE_NAMESPACE(std)less< ANTLR_USE_NAMESPACE(std)string >, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, TokenStream* > >, false > >::_Node >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)_Tree_ptr< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, TokenStream*, ANTLR_USE_NAMESPACE(std)less< ANTLR_USE_NAMESPACE(std)string >, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, TokenStream* > >, false > >::_Nodeptr >; template struct ANTLR_API ANTLR_USE_NAMESPACE(std)pair< ANTLR_USE_NAMESPACE(std)string, TokenStream* >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, TokenStream*, ANTLR_USE_NAMESPACE(std)less< ANTLR_USE_NAMESPACE(std)string >, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, TokenStream* > >,false >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tree_nod< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, TokenStream*, ANTLR_USE_NAMESPACE(std)less< ANTLR_USE_NAMESPACE(std)string >, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, TokenStream* > >,false > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tree_ptr< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, TokenStream*, ANTLR_USE_NAMESPACE(std)less< ANTLR_USE_NAMESPACE(std)string >, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, TokenStream* > >,false > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tree_val< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, TokenStream*, ANTLR_USE_NAMESPACE(std)less< ANTLR_USE_NAMESPACE(std)string >, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, TokenStream* > >,false > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Tree< ANTLR_USE_NAMESPACE(std)_Tmap_traits< ANTLR_USE_NAMESPACE(std)string, TokenStream*, ANTLR_USE_NAMESPACE(std)less< ANTLR_USE_NAMESPACE(std)string >, ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)pair< const ANTLR_USE_NAMESPACE(std)string, TokenStream* > >,false > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)map< ANTLR_USE_NAMESPACE(std)string, TokenStream* >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< TokenStream* >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)allocator< ANTLR_USE_NAMESPACE(std)_Deque_map< TokenStream* , ANTLR_USE_NAMESPACE(std)allocator< TokenStream* > >::_Tptr >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Deque_map< TokenStream*, ANTLR_USE_NAMESPACE(std)allocator< TokenStream* > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)_Deque_val< TokenStream*, ANTLR_USE_NAMESPACE(std)allocator< TokenStream* > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)deque< TokenStream*, ANTLR_USE_NAMESPACE(std)allocator< TokenStream* > >; template class ANTLR_API ANTLR_USE_NAMESPACE(std)stack< TokenStream*, ANTLR_USE_NAMESPACE(std)deque >; #elif defined( _MSC_VER ) && ( _MSC_VER == 1310 ) // Instantiations for MSVC 7.1 template class ANTLR_API CircularQueue< int >; template class ANTLR_API CircularQueue< RefToken >; // #else future msvc's #endif #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE } #endif BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } sqlitebrowser-3.11.2/libs/qcustomplot-source/000077500000000000000000000000001345112435200213245ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qcustomplot-source/CMakeLists.txt000066400000000000000000000006351345112435200240700ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(Qt5 REQUIRED COMPONENTS Widgets PrintSupport) set(QCUSTOMPLOT_SRC qcustomplot.cpp ) set(QCUSTOMPLOT_HDR ) set(QCUSTOMPLOT_MOC_HDR qcustomplot.h ) add_library(qcustomplot ${QCUSTOMPLOT_SRC} ${QCUSTOMPLOT_HDR} ${QCUSTOMPLOT_MOC}) target_link_libraries(qcustomplot Qt5::Widgets Qt5::PrintSupport) sqlitebrowser-3.11.2/libs/qcustomplot-source/GPL.txt000066400000000000000000001045131345112435200225130ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . sqlitebrowser-3.11.2/libs/qcustomplot-source/changelog.txt000066400000000000000000001377431345112435200240330ustar00rootroot00000000000000#### Version 2.0.0 released on 04.09.17 #### Added major features: - Axis tick and tick label generation was completely refactored and is now handled in the QCPAxisTicker class (also see QCPAxis::setTicker). Available ticker subclasses for special uses cases: QCPAxisTicker, QCPAxisTickerFixed, QCPAxisTickerLog, QCPAxisTickerPi, QCPAxisTickerTime, QCPAxisTickerDateTime, QCPAxisTickerText - Data container is now based on QCPDataContainer template for unified data interface and significantly improved memory footprint and better performance for common use-cases, especially data adding/removing. - New data selection mechanism allows selection of single data points and data ranges for plottables. See special documentation page "data selection mechanism". - Rubber band/selection rect for data point selection and axis zooming is now available, see documentation of QCustomPlot::setSelectionRectMode and QCPSelectionRect. For this purpose, the new default layer "overlay" was introduced, which is now the top layer, and holds the QCustomPlot's QCPSelectionRect instance. - Data sharing between plottables of the same type (see setData methods taking a QSharedPointer) - OpenGL hardware acceleration is now available across all Qt versions (including Qt4) in a unified, simple interface, with QCustomPlot::setOpenGl (experimental) - QCPStatisticalBox can now display a series of statistical boxes instead of only a single one - New QCPErrorBars plottable allows attaching error bars to any one-dimensional plottable (QCPGraph has thus lost its own error-bar capability) - QCPColorMap now supports transparency via alpha in its color gradient stops, and via a dedicated cell-wise alpha map (see QCPColorMapData::setAlpha) - Layers may now be individually replotted (QCPLayer::replot), if the mode (QCPLayer::setMode) is set to lmBuffered. Mutually adjacent lmLogical layers share a single paint buffer to save resources. By default, the new topmost "overlay" layer which contains the selection rect is an lmBuffered layer. Updating the selection rect is thus very fast, independent of the plot contents. - QCPLayerable (and thus practically all objects in QCP) now have virtual methods to receive mouse press/move/release/doubleclick/wheel events. Before, only QCPLayoutElement provided them. this makes it much easier to subclass e.g. items and plottables to provide custom mouse interactions that were cumbersome and awkward with the simpler signal-based interface Added minor features: - High-DPI support for Qt versions 5.0 and up, using device pixel ratio detected by Qt (can be changed manually via QCustomPlot::setBufferDevicePixelRatio). - QCPGraph and QCPCurve can now be configured to only display every n'th scatter symbol, see ::setScatterSkip() method - QCPFinancial allows to define bar width in absolute pixels and axis rect ratio, instead of only in plot key coordinates (see QCPFinancial::setWidthType) - Range dragging/zooming can now be configured to affect more than one axis per orientation (see new overloads of QCPAxisRect::setRangeDragAxes/setRangeZoomAxes) - Added QCPTextElement (replaces QCPPlotTitle) for general texts in layouts. Provides clicked and doubleClicked signals, as replacement for the removed QCustomPlot::titleClicked/titleDoubleClicked - Export functions (QCustomPlot::savePng etc.) now support specifying the resolution that will be written to the image file header. This improves operability with other tools which respect metadata. - Replots can now be queued to the next event loop iteration with replot(QCP::rpQueuedReplot). This way you can successively ask for a replot at multiple code locations without causing redundant replots - QCPAxisRect::zoom(...) allows to zoom to a specific rectangular region given in pixel coordinates, either affecting all axes or a specified subset of axes. - QCPRange::bounded returns a bounded range, trying to preserve its size. Works with rangeChanged signal to limit the allowed range (see rangeChanged doc) - Plottable rescaleValueAxis method (and getValueRange) now take parameter inKeyRange, which allows rescaling of the value axis only with respect to data in the currently visible key range - plottableClick and plottableDoubleClick signals now carry the clicked data point index as second parameter - Added QCPAxis::scaleRange overload without "center" argument, which scales around the current axis range center - Added QCPRange::expand/expanded overloads which take only one double parameter - Plottables addToLegend/removeFromLegend methods now have overloads that take any QCPLegend, to make working with non-default legends easier (legends that are not QCustomPlot::legend) - Added QCPStatisticalBox::setWhiskerAntialiased to allow controlling antialiasing state of whiskers independently of quartile box/median line - The virtual method QCPLayoutElement::layoutChanged() now allows subclasses to react on a move of the layout element between logical positions in the parent layout, or between layouts - QCPMarginGroup::commonMargin is now virtual, to facilitate subclassing of QCPMarginGroup - QCPGraph::getPreparedData is now virtual, and thus allows subclasses to easily generate own plotted data, e.g. on-the-fly. - Added QCPRange qDebug stream operator - QCPLayoutGrid (and thus QCPLegend) can now wrap rows or columns at specified row/column counts, see setFillOrder, setWrap and the new addElement overload which doesn't have row/column index Added minor features after beta: - QCPGraph fill now renders separate fill segments when there are gaps in the graph data (created by inserting NaN values) - fractional device pixel ratios are now used, if Qt version >= 5.6 - Axes may now be dragged/zoomed individually by starting the drag/zoom on top of the axis (previously, this required additional code) - Manual minimum and maximum layout element sizes (setMinimumSize/setMaximumSize) can now affect the inner or the outer rect, see QCPLayoutElement::setSizeConstraintRect Bugfixes [Also backported to 1.3.2]: - Fixed possible crash when having a QCPGraph with scatters only and a non-transparent main/fill brush of the graph - Fixed QCPItemPixmap not updating internally cached scaled pixmap if new pixmap set with same scaled dimensions - When using log axis scale and zooming out as far as possible (~1e-280..1e280), axis doesn't end up in (via mouse) unrecoverable range with strange axis ticks anymore - Axis tick label algorithm for beautifully typeset powers now checks whether "e" in tick label is actually part of a number before converting the exponent to superscript - Fixed QCustomPlot::moveLayer performing incorrect move and possible crash in certain situations - Fixed possible crash on QCustomPlot destruction due to wrong QObject-hierarchy. Only occurs if a QCPAxisRect is removed from the normal QCustomPlot destruction hierarchy by taking it out of its layout - Fixed possible freeze when data values become infinity after coord-to-pixel transformation (e.g. maximally zoomed out log axis), and line style is not solid (e.g. dashed) or phFastPolylines is disabled - Fixed a few missing enums in meta type system, by unifying usage of Q_ENUMS, Q_FLAGS and Q_DECLARE_METATYPE Bugfixes [Not in 1.3.2]: - Fixed QCPItemLine/QCPItemStraightLine not being selectable when defining coords are many orders of magnitude (>1e8) larger than currently viewed range - Fixed/worked around crash due to bug in QPainter::drawPixmap with very large negative x/y pixel coordinates, when drawing sparse pixmap scatters - Fixed possible (but unlikely) int overflow in adaptive sampling algorithm, that could cause plot artifacts when using extremely sparse data (with respect to current key axis range). - Fixed QCPBarsGroup bug which caused stPlotCoords spacing to be wrong with vertical key axes - A QCPBars axis rescale in the main window constructor (i.e. without well-defined plot size) now falls back to a datapoint-tight rescaling instead of doing nothing (because bar width can't be determined) - Improved QCPBars stacking when using bars with very large keys and key separation at limit of double precision Bugfixes after beta: - fixed QCPCurve vertex optimization algorithm not handling log axes correctly - upon removing the inner most axis, the offset of the new inner most axis (previously second axis) is now set to the value of the removed axis, instead of leaving a gap - QCPColorMap now has a default gradient (gpCold) again, instead of an empty and thus black gradient - doc: black QCPColorMap/QCPColorGradient documentation images fixed - scatter styles ssDiamond, ssTriangle and ssTriangleInverted now get proper filling with the specified brush - fixed click signals of plottable/axes/etc. not being emitted properly - fixed uninitialized scatterSkip on QCPCurve, leading to irregular default appearance of scatter skips - fixed device pixel ratio not being implemented correctly in cached tick labels - QCPLayoutElement::setMaximum/setMinimum now is with respect to the inner rect as intended (and documented), instead of the outer rect (and this can now be changed via setSizeConstraintRect) - fixed dllimport issue on template classes when compiling as shared library with MSVC Summary of backward incompatible changes: Plottable related: - Removed QCustomPlot::addPlottable, not needed anymore as plottables now automatically register in their constructor - Removed QCustomPlot::addItem, not needed anymore as items now automatically register in their constructor - QCPAbstractPlottable::addToLegend/removeFromLegend are not virtual anymore. If your plottable requires a custom legend item, add it to the legend manually. - setData/addData method overloads of plottables have changed to facilitate data sharing and new data container (see documentation) - plottableClick and plottableDoubleClick signals now carry the clicked data point index as second parameter, and the QMouseEvent parameter has moved to third. Check all your usages of those signals, because Qt's connect method only reports problems during runtime! - setSelectable now not only limits what can be selected by the user, but limits also any programmatic selection changes via setSelected. - enum QCPAbstractPlottable::SignDomain has changed namespace to QCP::SignDomain Axis related: - Removed QCPAxis::setAutoTicks, setAutoTickCount, setAutoTickLabels, setAutoTickStep, setAutoSubTicks, setTickLabelType, setDateTimeFormat, setDateTimeSpec, setTickStep, setTickVector, setTickVectorLabels, setSubTickCount in favor of new QCPAxisTicker-based interface - Added QCPAxis::setSubTicks to enable/disable subticks (manually controlling the subtick count needs subclassing of QCPAxisTicker, e.g. QCPAxisTickerText and QCPAxisTickerLog provide setSubTickCount) Item related: - Renamed QCPAbstractItem::rectSelectTest to rectDistance, to prevent confusion with new QCPAbstractPlottable1D::selectTestRect - Renamed QCPItemAnchor::pixelPoint to QCPItemAnchor::pixelPosition (also affects subclass QCPItemPosition) General: - Renamed QCustomPlot::RefreshPriority enums (parameter of the replot() method): rpImmediate to rpImmediateRefresh, rpQueued to rpQueuedRefresh, rpHint to rpRefreshHint - Renamed QCustomPlot::PlottingHint enum phForceRepaint to phImmediateRefresh - Removed QCPPlotTitle layout element (See new QCPTextElement for almost drop-in replacement) - Removed signals QCustomPlot::titleClicked/titleDoubleClicked, replaced by QCPTextElement signals clicked/doubleClicked. - QCustomPlot::savePdf has changed parameters from (fileName, bool noCosmeticPen, width, height,...) to (fileName, width, height, QCP::ExportPen exportPen,...) - Virtual methods QCPLayoutElement::mouseMoveEvent/mouseReleaseEvent (which are now introduced already in the superclass QCPLayerable) have gained an additional parameter const QPointF &startPos. If you have reimplemented these methods, make sure to update your function signatures, otherwise your reimplementations will likely be ignored by the compiler without warning - Creating a new QCPColorGradient without supplying a preset parameter in the constructor now creates an empty gradient, instead of loading the gpCold preset Other: - Replaced usage of Qt's QVector2D with own QCPVector2D which uses double precision and offers some convenience functions - Extended relative range to which QCPItemLine/QCPItemStraightLine can be zoomed before vanishing from ~1e9 to ~1e16 - Removed QCPItemStraightLine::distToStraightLine (replaced by QCPVector2D::distanceToStraightLine) - Removed QCPAbstractPlottable::distSqrToLine and QCPAbstractItem::distSqrToLine (replaced by QCPVector2D::distanceSquaredToLine) - Qt5.5 compatibility (If you use PDF export, test your outputs, as output dimensions might change when switching Qt versions -- QCP does not try to emulate previous Qt version behaviour here) - QCP now includes instead of just because some users had problems with the latter. Please report if you now experience issues due to the new include. - QCPGraph can now use a brush (filled polygon under the graph data) without having a graph line (line style lsNone) - QCPFinancial is now two-colored (setTwoColored(true)) by default, and has green/red as default two-colored brushes and pens - Plottable pixelsToCoords/coordsToPixels methods are now public, and offer transformations from pixel to plot coordinates and vice versa, using the plottable's axes - Plottable getKeyRange/getValueRange methods are now public - QCPBarsGroup now always places the QCPBars that was added to the group first towards lower keys, independent of axis orientation or direction (the ordering used to flip with axis orientation) - Default focus policy for QCustomPlot is now Qt::ClickFocus, instead of Qt::NoFocus. - tweaked QCPLegend and QCPAbstractLegendItem margins: The items have by default zero own margins, and QCPLegend row- and column spacing was increased to compensate. Legend was made slightly denser by default. - Used doxygen version is now 1.8.12, and documentation/postprocessing-scripts were adapted accordingly. Expect minor issues and some warnings when using older doxygen. Other after beta: - Integrated OpenGL support (QCustomPlot::setOpenGl) is experimental for now, due the strong dependency on the system/graphics driver of the current implementation - fixed some plot title font sizes in the example projects that were too small due to switch to QCPTextElement - added missing override specifiers on reimplemented virtual methods - changed to more intuitive defaults for QCPSelectionDecorator scatter style (now doesn't define an own scatter pen by default) #### Version 1.3.2 released on 22.12.15 #### Bugfixes [Backported from 2.0.0 branch]: - Fixed possible crash when having a QCPGraph with scatters only and a non-transparent main/fill brush of the graph - Fixed QCPItemPixmap not updating internally cached scaled pixmap if new pixmap set with same scaled dimensions - When using log axis scale and zooming out as far as possible (~1e-280..1e280), axis doesn't end up in (via mouse) unrecoverable range with strange axis ticks anymore - Axis tick label algorithm for beautifully typeset powers now checks whether "e" in tick label is actually part of a number before converting the exponent to superscript - Fixed QCustomPlot::moveLayer performing incorrect move and possible crash in certain situations - Fixed possible crash on QCustomPlot destruction due to wrong QObject-hierarchy. Only occurs if a QCPAxisRect is removed from the normal QCustomPlot destruction hierarchy by taking it out of its layout - Fixed possible freeze when data values become infinity after coord-to-pixel transformation (e.g. maximally zoomed out log axis), and line style is not solid (e.g. dashed) or phFastPolylines is disabled Other [Backported from 2.0.0 branch]: - A few documentation fixes/improvements - Qt5.5 compatibility (If you use PDF export, test your outputs, as output dimensions might change when switching Qt versions -- QCP does not try to emulate previous Qt version behaviour here) - QCP now includes instead of just because some users had problems with the latter. Please report if you now experience issues due to the new include. #### Version 1.3.1 released on 25.04.15 #### Bugfixes: - Fixed bug that prevented automatic axis rescaling when some graphs/curves had only NaN data points - Improved QCPItemBracket selection boundaries, especially bsCurly and bsCalligraphic - Fixed bug of axis rect and colorscale background shifted downward by one logical pixel (visible in scaled png and pdf export) - Replot upon mouse release is now only performed if a selection change has actually happened (improves responsivity on particularly complex plots) - Fixed bug that allowed scatter-only graphs to be selected by clicking the non-existent line between scatters - Fixed crash when trying to select a scatter-only QCPGraph whose only points in the visible key range are at identical key coordinates and vertically off-screen, with adaptive sampling enabled - Fixed pdf export of QCPColorMap with enabled interpolation (didn't appear interpolated in pdf) - Reduced QCPColorMap jitter of internal cell boundaries for small sized maps when viewed with high zoom, by applying oversampling factors dependant on map size - Fixed bug of QCPColorMap::fill() not causing the buffered internal image map to be updated, and thus the change didn't become visible immediately - Axis labels with size set in pixels (setPixelSize) instead of points now correctly calculate the exponent's font size if beautifully typeset powers are enabled - Fixed QCPColorMap appearing at the wrong position for logarithmic axes and color map spanning larger ranges Other: - Pdf export used to embed entire QCPColorMaps, potentially leading to large files. Now only the visible portion of the map is embedded in the pdf - Many documentation fixes and extensions, style modernization - Reduced documentation file size (and thus full package size) by automatically reducing image palettes during package build - Fixed MSVC warning message (at warning level 4) due to temporary QLists in some foreach statements #### Version 1.3.0 released on 27.12.14 #### Added features: - New plottable class QCPFinancial allows display of candlestick/ohlc data - New class QCPBarsGroup allows horizontal grouping of multiple QCPBars plottables - Added QCPBars feature allowing non-zero base values (see property QCPBars::setBaseValue) - Added QCPBars width type, for more flexible bar widths (see property QCPBars::setWidthType) - New QCPCurve optimization algorithm, fixes bug which caused line flicker at deep zoom into curve segment - Item positions can now have different position types and anchors for their x and y coordinates (QCPItemPosition::setTypeX/Y, setParentAnchorX/Y) - QCPGraph and QCPCurve can now display gaps in their lines, when inserting quiet NaNs as values (std::numeric_limits::quiet_NaN()) - QCPAxis now supports placing the tick labels inside the axis rect, for particularly space saving plots (QCPAxis::setTickLabelSide) Added features after beta: - Made code compatible with QT_NO_CAST_FROM_ASCII, QT_NO_CAST_TO_ASCII - Added compatibility with QT_NO_KEYWORDS after sending code files through a simple reg-ex script - Added possibility to inject own QCPAxis(-subclasses) via second, optional QCPAxisRect::addAxis parameter - Added parameter to QCPItemPixmap::setScaled to specify transformation mode Bugfixes: - Fixed bug in QCPCurve rendering of very zoomed-in curves (via new optimization algorithm) - Fixed conflict with MSVC-specific keyword "interface" in text-document-integration example - Fixed QCPScatterStyle bug ignoring the specified pen in the custom scatter shape constructor - Fixed bug (possible crash) during QCustomPlot teardown, when a QCPLegend that has no parent layout (i.e. was removed from layout manually) gets deleted Bugfixes after beta: - Fixed bug of QCPColorMap/QCPColorGradient colors being off by one color sampling step (only noticeable in special cases) - Fixed bug of QCPGraph adaptive sampling on vertical key axis, causing staggered look - Fixed low (float) precision in QCPCurve optimization algorithm, by not using QVector2D anymore Other: - Qt 5.3 and Qt 5.4 compatibility #### Version 1.2.1 released on 07.04.14 #### Bugfixes: - Fixed regression which garbled date-time tick labels on axes, if setTickLabelType is ltDateTime and setNumberFormat contains the "b" option #### Version 1.2.0 released on 14.03.14 #### Added features: - Adaptive Sampling for QCPGraph greatly improves performance for high data densities (see QCPGraph::setAdaptiveSampling) - QCPColorMap plottable with QCPColorScale layout element allows plotting of 2D color maps - QCustomPlot::savePdf now has additional optional parameters pdfCreator and pdfTitle to set according PDF metadata fields - QCustomPlot::replot now allows specifying whether the widget update is immediate (repaint) or queued (update) - QCPRange operators +, -, *, / with double operand for range shifting and scaling, and ==, != for range comparison - Layers now have a visibility property (QCPLayer::setVisible) - static functions QCPAxis::opposite and QCPAxis::orientation now offer more convenience when handling axis types - added notification signals for selectability change (selectableChanged) on all objects that have a selected/selectable property - added notification signal for QCPAxis scaleType property - added notification signal QCPLayerable::layerChanged Bugfixes: - Fixed assert halt, when QCPAxis auto tick labels not disabled but nevertheless a custom non-number tick label ending in "e" given - Fixed painting glitches when QCustomPlot resized inside a QMdiArea or under certain conditions inside a QLayout - If changing QCPAxis::scaleType and thus causing range sanitizing and a range modification, rangeChanged wouldn't be emitted - Fixed documentation bug that caused indentation to be lost in code examples Bugfixes after beta: - Fixed bug that caused crash if clicked-on legend item is removed in mousePressEvent. - On some systems, font size defaults to -1, which used to cause a debug output in QCPAxisPainterPrivate::TickLabelDataQCP. Now it's checked before setting values based on the default font size. - When using multiple axes on one side, setting one to invisible didn't properly compress the freed space. - Fixed bug that allowed selection of plottables when clicking in the bottom or top margin of a QCPAxisRect (outside the inner rect) Other: - In method QCPAbstractPlottable::getKeyRange/getValueRange, renamed parameter "validRange" to "foundRange", to better reflect its meaning (and contrast it from QCPRange::validRange) - QCPAxis low-level axis painting methods exported to QCPAxisPainterPrivate #### Version 1.1.1 released on 09.12.13 #### Bugfixes: - Fixed bug causing legends blocking input events from reaching underlying axis rect even if legend is invisible - Added missing Q_PROPERTY for QCPAxis::setDateTimeSpec - Fixed behaviour of QCPAxisRect::setupFullAxesBox (now transfers more properties from bottom/left to top/right axes and sets visibility of bottom/left axes to true) - Made sure PDF export doesn't default to grayscale output on some systems Other: - Plotting hint QCP::phForceRepaint is now enabled on all systems (and not only on windows) by default - Documentation improvements #### Version 1.1.0 released on 04.11.13 #### Added features: - Added QCPRange::expand and QCPRange::expanded - Added QCPAxis::rescale to rescale axis to all associated plottables - Added QCPAxis::setDateTimeSpec/dateTimeSpec to allow axis labels either in UTC or local time - QCPAxis now additionally emits a rangeChanged signal overload that provides the old range as second parameter Bugfixes: - Fixed QCustomPlot::rescaleAxes not rescaling properly if first plottable has an empty range - QCPGraph::rescaleAxes/rescaleKeyAxis/rescaleValueAxis are no longer virtual (never were in base class, was a mistake) - Fixed bugs in QCPAxis::items and QCPAxisRect::items not properly returning associated items and potentially stalling Other: - Internal change from QWeakPointer to QPointer, thus got rid of deprecated Qt functionality - Qt5.1 and Qt5.2 (beta1) compatibility - Release packages now extract to single subdirectory and don't place multiple files in current working directory #### Version 1.0.1 released on 05.09.13 #### Bugfixes: - using define flag QCUSTOMPLOT_CHECK_DATA caused debug output when data was correct, instead of invalid (fixed QCP::isInvalidData) - documentation images are now properly shown when viewed with Qt Assistant - fixed various documentation mistakes Other: - Adapted documentation style sheet to better match Qt5 documentation #### Version 1.0.0 released on 01.08.13 #### Quick Summary: - Layout system for multiple axis rects in one plot - Multiple axes per side - Qt5 compatibility - More flexible and consistent scatter configuration with QCPScatterStyle - Various interface cleanups/refactoring - Pixmap-cached axis labels for improved replot performance Changes that break backward compatibility: - QCustomPlot::axisRect() changed meaning due to the extensive changes to how axes and axis rects are handled it now returns a pointer to a QCPAxisRect and takes an integer index as parameter. - QCPAxis constructor changed to now take QCPAxisRect* as parent - setAutoMargin, setMarginLeft/Right/Top/Bottom removed due to the axis rect changes (see QCPAxisRect::setMargins/setAutoMargins) - setAxisRect removed due to the axis rect changes - setAxisBackground(-Scaled/-ScaledMode) now moved to QCPAxisRect as setBackground(-Scaled/ScaledMode) (access via QCustomPlot::axisRects()) - QCPLegend now is a QCPLayoutElement - QCPAbstractPlottable::drawLegendIcon parameter "rect" changed from QRect to QRectF - QCPAbstractLegendItem::draw second parameter removed (position/size now handled via QCPLayoutElement base class) - removed QCPLegend::setMargin/setMarginLeft/Right/Top/Bottom (now inherits the capability from QCPLayoutElement::setMargins) - removed QCPLegend::setMinimumSize (now inherits the capability from QCPLayoutElement::setMinimumSize) - removed enum QCPLegend::PositionStyle, QCPLegend::positionStyle/setPositionStyle/position/setPosition (replaced by capabilities of QCPLayoutInset) - QCPLegend transformed to work with new layout system (almost everything changed) - removed entire title interface: QCustomPlot::setTitle/setTitleFont/setTitleColor/setTitleSelected/setTitleSelectedFont/setTitleSelectedColor and the QCustomPlot::iSelectTitle interaction flag (all functionality is now given by the layout element "QCPPlotTitle" which can be added to the plot layout) - selectTest functions now take two additional parameters: bool onlySelectable and QVariant *details=0 - selectTest functions now ignores visibility of objects and (if parameter onlySelectable is true) does not anymore ignore selectability of the object - moved QCustomPlot::Interaction/Interactions to QCP namespace as QCP::Interaction/Interactions - moved QCustomPlot::setupFullAxesBox() to QCPAxisRect::setupFullAxesBox. Now also accepts parameter to decide whether to connect opposite axis ranges - moved range dragging/zooming interface from QCustomPlot to QCPAxisRect (setRangeDrag, setRangeZoom, setRangeDragAxes, setRangeZoomAxes,...) - rangeDrag/Zoom is now set to Qt::Horizontal|Qt::Vertical instead of 0 by default, on the other hand, iRangeDrag/Zoom is unset in interactions by default (this makes enabling dragging/zooming easier by just adding the interaction flags) - QCPScatterStyle takes over everything related to handling scatters in all plottables - removed setScatterPen/Size on QCPGraph and QCPCurve, removed setOutlierPen/Size on QCPStatisticalBox (now handled via QCPScatterStyle) - modified setScatterStyle on QCPGraph and QCPCurve, and setOutlierStyle on QCPStatisticalBox, to take QCPScatterStyle - axis grid and subgrid are now reachable via the QCPGrid *QCPAxis::grid() method. (e.g. instead of xAxis->setGrid(true), write xAxis->grid()->setVisible(true)) Added features: - Axis tick labels are now pixmap-cached, thus increasing replot performance (in usual setups by about 24%). See plotting hint phCacheLabels which is set by default - Advanced layout system, including the classes QCPLayoutElement, QCPLayout, QCPLayoutGrid, QCPLayoutInset, QCPAxisRect - QCustomPlot::axisRects() returns all the axis rects in the QCustomPlot. - QCustomPlot::plotLayout() returns the top level layout (initially a QCPLayoutGrid with one QCPAxisRect inside) - QCPAxis now may have an offset to the axis rect (setOffset) - Multiple axes per QCPAxisRect side are now supported (see QCPAxisRect::addAxis) - QCustomPlot::toPixmap renders the plot into a pixmap and returns it - When setting tick label rotation to +90 or -90 degrees on a vertical axis, the labels are now centered vertically on the tick height (This allows space saving vertical tick labels by having the text direction parallel to the axis) - Substantially increased replot performance when using very large manual tick vectors (> 10000 ticks) via QCPAxis::setTickVector - QCPAxis and QCPAxisRect now allow easy access to all plottables(), graphs() and items() that are associated with them - Added QCustomPlot::hasItem method for consistency with plottable interface, hasPlottable - Added QCPAxisRect::setMinimumMargins as replacement for hardcoded minimum axis margin (15 px) when auto margin is enabled - Added Flags type QCPAxis::AxisTypes (from QCPAxis::AxisType), used in QCPAxisRect interface - Automatic margin calculation can now be enabled/disabled on a per-side basis, see QCPAxisRect::setAutoMargins - QCPAxisRect margins of multiple axis rects can be coupled via QCPMarginGroup - Added new default layers "background" and "legend" (QCPAxisRect draws its background on the "background" layer, QCPLegend is on the "legend" layer by default) - Custom scatter style via QCP::ssCustom and respective setCustomScatter functions that take a QPainterPath - Filled scatters via QCPScatterStyle::setBrush Added features after beta: - Added QCustomPlot::toPainter method, to allow rendering with existing painter - QCPItemEllipse now provides a center anchor Bugfixes: - Fixed compile error on ARM - Wrong legend icons were displayed if using pixmaps for scatters that are smaller than the legend icon rect - Fixed clipping inaccuracy for rotated tick labels (were hidden too early, because the non-rotated bounding box was used) - Fixed bug that caused wrong clipping of axis ticks and subticks when the ticks were given manually by QCPAxis::setTickVector - Fixed Qt5 crash when dragging graph out of view (iterator out of bounds in QCPGraph::getVisibleDataBounds) - Fixed QCPItemText not scaling properly when using scaled raster export Bugfixes after beta: - Fixed bug that clipped the rightmost pixel column of tick labels when caching activated (only visible on windows for superscript exponents) - Restored compatibility to Qt4.6 - Restored support for -no-RTTI compilation - Empty manual tick labels are handled more gracefully (no QPainter qDebug messages anymore) - Fixed type ambiguity in QCPLineEnding::draw causing compile error on ARM - Fixed bug of grid layouts not propagating the minimum size from their child elements to the parent layout correctly - Fixed bug of child elements (e.g. axis rects) of inset layouts not properly receiving mouse events Other: - Opened up non-amalgamated project structure to public via git repository #### Version released on 09.06.12 #### Quick Summary: - Items (arrows, text,...) - Layers (easier control over rendering order) - New antialiasing system (Each objects controls own antialiasing with setAntialiased) - Performance Improvements - improved pixel-precise drawing - easier shared library creation/usage Changes that (might) break backward compatibility: - enum QCPGraph::ScatterSymbol was moved to QCP namespace (now QCP::ScatterSymbol). This replace should fix your code: "QCPGraph::ss" -> "QCP::ss" - enum QCustomPlot::AntialiasedElement and flag QCustomPlot::AntialiasedElements was moved to QCP namespace This replace should fix your code: "QCustomPlot::ae" -> "QCP::ae" - the meaning of QCustomPlot::setAntialiasedElements has changed slightly: It is now an override to force elements to be antialiased. If you want to force elements to not be drawn antialiased, use the new setNotAntialiasedElements. If an element is mentioned in neither of those functions, it now controls its antialiasing itself via its "setAntialiased" function(s). (e.g. QCPAxis::setAntialiased(bool), QCPAbstractPlottable::setAntialiased(bool), QCPAbstractPlottable::setAntialiasedScatters(bool), etc.) - QCPAxis::setTickVector and QCPAxis::setTickVectorLabels no longer take a pointer but a const reference of the respective QVector as parameter. (handing over a pointer didn't give any noticeable performance benefits but was inconsistent with the rest of the interface) - Equally QCPAxis::tickVector and QCPAxis::tickVectorLabels don't return by pointer but by value now - QCustomPlot::savePngScaled was removed, its purpose is now included as optional parameter "scale" of savePng. - If you have derived from QCPAbstractPlottable: all selectTest functions now consistently take the argument "const QPointF &pos" which is the test point in pixel coordinates. (the argument there was "double key, double value" in plot coordinates, before). - QCPAbstractPlottable, QCPAxis and QCPLegend now inherit from QCPLayerable - If you have derived from QCPAbstractPlottable: the draw method signature has changed from "draw (..) const" to "draw (..)", i.e. the method is not const anymore. This allows the draw function of your plottable to perform buffering/caching operations, if necessary. Added features: - Item system: QCPAbstractItem, QCPItemAnchor, QCPItemPosition, QCPLineEnding. Allows placing of lines, arrows, text, pixmaps etc. - New Items: QCPItemStraightLine, QCPItemLine, QCPItemCurve, QCPItemEllipse, QCPItemRect, QCPItemPixmap, QCPItemText, QCPItemBracket, QCPItemTracer - QCustomPlot::addItem/itemCount/item/removeItem/selectedItems - signals QCustomPlot::itemClicked/itemDoubleClicked - the QCustomPlot interactions property now includes iSelectItems (for selection of QCPAbstractItem) - QCPLineEnding. Represents the different styles a line/curve can end (e.g. different arrows, circle, square, bar, etc.), see e.g. QCPItemCurve::setHead - Layer system: QCPLayerable, QCPLayer. Allows more sophisticated control over drawing order and a kind of grouping. - QCPAbstractPlottable, QCPAbstractItem, QCPAxis, QCPGrid, QCPLegend are layerables and derive from QCPLayerable - QCustomPlot::addLayer/moveLayer/removeLayer/setCurrentLayer/layer/currentLayer/layerCount - Initially there are three layers: "grid", "main", and "axes". The "main" layer is initially empty and set as current layer, so new plottables/items are put there. - QCustomPlot::viewport now makes the previously inaccessible viewport rect read-only-accessible (needed that for item-interface) - PNG export now allows transparent background by calling QCustomPlot::setColor(Qt::transparent) before savePng - QCPStatisticalBox outlier symbols may now be all scatter symbols, not only hardcoded circles. - perfect precision of scatter symbol/error bar drawing and clipping in both antialiased and non-antialiased mode, by introducing QCPPainter that works around some QPainter bugs/inconveniences. Further, more complex symbols like ssCrossSquare used to look crooked, now they look good. - new antialiasing control system: Each drawing element now has its own "setAntialiased" function to control whether it is drawn antialiased. - QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements can be used to override the individual settings. - Subclasses of QCPAbstractPlottable can now use the convenience functions like applyFillAntialiasingHint or applyScattersAntialiasingHint to easily make their drawing code comply with the overall antialiasing system. - QCustomPlot::setNoAntialiasingOnDrag allows greatly improved performance and responsiveness by temporarily disabling all antialiasing while the user is dragging axis ranges - QCPGraph can now show scatter symbols at data points and hide its line (see QCPGraph::setScatterStyle, setScatterSize, setScatterPixmap, setLineStyle) - Grid drawing code was sourced out from QCPAxis to QCPGrid. QCPGrid is mainly an internal class and every QCPAxis owns one. The grid interface still works through QCPAxis and hasn't changed. The separation allows the grid to be drawn on a different layer as the axes, such that e.g. a graph can be above the grid but below the axes. - QCustomPlot::hasPlottable(plottable), returns whether the QCustomPlot contains the plottable - QCustomPlot::setPlottingHint/setPlottingHints, plotting hints control details about the plotting quality/speed - export to jpg and bmp added (QCustomPlot::saveJpg/saveBmp), as well as control over compression quality for png and jpg - multi-select-modifier may now be specified with QCustomPlot::setMultiSelectModifier and is not fixed to Ctrl anymore Bugfixes: - fixed QCustomPlot ignores replot after it had size (0,0) even if size becomes valid again - on Windows, a repaint used to be delayed during dragging/zooming of a complex plot, until the drag operation was done. This was fixed, i.e. repaints are forced after a replot() call. See QCP::phForceRepaint and setPlottingHints. - when using the raster paintengine and exporting to scaled PNG, pen widths are now scaled correctly (QPainter bug workaround via QCPPainter) - PDF export now respects QCustomPlot background color (QCustomPlot::setColor), also Qt::transparent - fixed a bug on QCPBars and QCPStatisticalBox where auto-rescaling of axis would fail when all data is very small (< 1e-11) - fixed mouse event propagation bug that prevented range dragging from working on KDE (GNU/Linux) - fixed a compiler warning on 64-bit systems due to pointer cast to int instead of quintptr in a qDebug output Other: - Added support for easier shared library creation (including examples for compiling and using QCustomPlot as shared library) - QCustomPlot now has the Qt::WA_OpaquePaintEvent widget attribute (gives slightly improved performance). - QCP::aeGraphs (enum QCP::AntialiasedElement, previously QCustomPlot::aeGraphs) has been marked deprecated since version 02.02.12 and was now removed. Use QCP::aePlottables instead. - optional performance-quality-tradeoff for solid graph lines (see QCustomPlot::setPlottingHints). - marked data classes and QCPRange as Q_MOVABLE_TYPE - replaced usage of own macro FUNCNAME with Qt macro Q_FUNC_INFO - QCustomPlot now returns a minimum size hint of 50*50 #### Version released on 31.03.12 #### Changes that (might) break backward compatibility: - QCPAbstractLegendItem now inherits from QObject - mousePress, mouseMove and mouseRelease signals are now emitted before and not after any QCustomPlot processing (range dragging, selecting, etc.) Added features: - Interaction system: now allows selecting of objects like plottables, axes, legend and plot title, see QCustomPlot::setInteractions documentation - Interaction system for plottables: - setSelectable, setSelected, setSelectedPen, setSelectedBrush, selectTest on QCPAbstractPlottable and all derived plottables - setSelectionTolerance on QCustomPlot - selectedPlottables and selectedGraphs on QCustomPlot (returns the list of currently selected plottables/graphs) - Interaction system for axes: - setSelectable, setSelected, setSelectedBasePen, setSelectedTickPen, setSelectedSubTickPen, setSelectedLabelFont, setSelectedTickLabelFont, setSelectedLabelColor, setSelectedTickLabelColor, selectTest on QCPAxis - selectedAxes on QCustomPlot (returns a list of the axes that currently have selected parts) - Interaction system for legend: - setSelectable, setSelected, setSelectedBorderPen, setSelectedIconBorderPen, setSelectedBrush, setSelectedFont, setSelectedTextColor, selectedItems on QCPLegend - setSelectedFont, setSelectedTextColor, setSelectable, setSelected on QCPAbstractLegendItem - selectedLegends on QCustomPlot - Interaction system for title: - setSelectedTitleFont, setSelectedTitleColor, setTitleSelected on QCustomPlot - new signals in accordance with the interaction system: - selectionChangedByUser on QCustomPlot - selectionChanged on QCPAbstractPlottable - selectionChanged on QCPAxis - selectionChanged on QCPLegend and QCPAbstractLegendItem - plottableClick, legendClick, axisClick, titleClick, plottableDoubleClick, legendDoubleClick, axisDoubleClick, titleDoubleClick on QCustomPlot - QCustomPlot::deselectAll (deselects everything, i.e. axes and plottables) - QCPAbstractPlottable::pixelsToCoords (inverse function to the already existing coordsToPixels function) - QCPRange::contains(double value) - QCPAxis::setLabelColor and setTickLabelColor - QCustomPlot::setTitleColor - QCustomPlot now emits beforeReplot and afterReplot signals. Note that it is safe to make two customPlots mutually call eachothers replot functions in one of these slots, it will not cause an infinite loop. (usefull for synchronizing axes ranges between two customPlots, because setRange alone doesn't replot) - If the Qt version is 4.7 or greater, the tick label strings in date-time-mode now support sub-second accuracy (e.g. with format like "hh:mm:ss.zzz"). Bugfixes: - tick labels/margins should no longer oscillate by one pixel when dragging range or replotting repeatedly while changing e.g. data. This was caused by a bug in Qt's QFontMetrics::boundingRect function when the font has an integer point size (probably some rounding problem). The fix hence consists of creating a temporary font (only for bounding-box calculation) which is 0.05pt larger and thus avoiding the jittering rounding outcome. - tick label, axis label and plot title colors used to be undefined. This was fixed by providing explicit color properties. Other: - fixed some glitches in the documentation - QCustomPlot::replot and QCustomPlot::rescaleAxes are now slots #### Version released on 02.02.12 #### Changes that break backward compatibility: - renamed all secondary classes from QCustomPlot[...] to QCP[...]: QCustomPlotAxis -> QCPAxis QCustomPlotGraph -> QCPGraph QCustomPlotRange -> QCPRange QCustomPlotData -> QCPData QCustomPlotDataMap -> QCPDataMap QCustomPlotLegend -> QCPLegend QCustomPlotDataMapIterator -> QCPDataMapIterator QCustomPlotDataMutableMapIterator -> QCPDataMutableMapIterator A simple search and replace on all code files should make your code run again, e.g. consider the regex "QCustomPlot(?=[AGRDL])" -> "QCP". Make sure not to just replace "QCustomPlot" with "QCP" because the main class QCustomPlot hasn't changed to QCP. This change was necessary because class names became unhandy, pardon my bad naming decision in the beginning. - QCPAxis::tickLength() and QCPAxis::subTickLength() now each split into two functions for inward and outward ticks (tickLengthIn/tickLengthOut). - QCPLegend now uses QCPAbstractLegendItem to carry item data (before, the legend was passed QCPGraphs directly) - QCustomPlot::addGraph() now doesn't return the index of the created graph anymore, but a pointer to the created QCPGraph. - QCustomPlot::setAutoAddGraphToLegend is replaced by setAutoAddPlottableToLegend Added features: - Reversed axis range with QCPAxis::setRangeReversed(bool) - Tick labels are now only drawn if not clipped by the viewport (widget border) on the sides (e.g. left and right on a horizontal axis). - Zerolines. Like grid lines only with a separate pen (QCPAxis::setZeroLinePen), at tick position zero. - Outward ticks. QCPAxis::setTickLength/setSubTickLength now accepts two arguments for inward and outward tick length. This doesn't break backward compatibility because the second argument (outward) has default value zero and thereby a call with one argument hasn't changed its meaning. - QCPGraph now inherits from QCPAbstractPlottable - QCustomPlot::addPlottable/plottable/removePlottable/clearPlottables added to interface with the new QCPAbstractPlottable-based system. The simpler interface which only acts on QCPGraphs (addGraph, graph, removeGraph, etc.) was adapted internally and is kept for backward compatibility and ease of use. - QCPLegend items for plottables (e.g. graphs) can automatically wrap their texts to fit the widths, see QCPLegend::setMinimumSize and QCPPlottableLegendItem::setTextWrap. - QCustomPlot::rescaleAxes. Adapts axis ranges to show all plottables/graphs, by calling QCPAbstractPlottable::rescaleAxes on all plottables in the plot. - QCPCurve. For plotting of parametric curves. - QCPBars. For plotting of bar charts. - QCPStatisticalBox. For statistical box plots. Bugfixes: - Fixed QCustomPlot::removeGraph(int) not being able to remove graph index 0 - made QCustomPlot::replot() abort painting when painter initialization fails (e.g. because width/height of QCustomPlot is zero) - The distance of the axis label from the axis ignored the tick label padding, this could have caused overlapping axis labels and tick labels - fixed memory leak in QCustomPlot (dtor didn't delete legend) - fixed bug that prevented QCPAxis::setRangeLower/Upper from setting the value to exactly 0. Other: - Changed default error bar handle size (QCustomPlotGraph::setErrorBarSize) from 4 to 6. - Removed QCustomPlotDataFetcher. Was deprecated and not used class. - Extended documentation, especially class descriptions. #### Version released on 15.01.12 #### Changes that (might) break backward compatibility: - QCustomPlotGraph now inherits from QObject Added features: - Added axis background pixmap (QCustomPlot::setAxisBackground, setAxisBackgroundScaled, setAxisBackgroundScaledMode) - Added width and height parameter on PDF export function QCustomPlot::savePdf(). This now allows PDF export to have arbitrary dimensions, independent of the current geometry of the QCustomPlot. - Added overload of QCustomPlot::removeGraph that takes QCustomPlotGraph* as parameter, instead the index of the graph - Added all enums to the Qt meta system via Q_ENUMS(). The enums can now be transformed to QString values easily with the Qt meta system, which makes saving state e.g. as XML significantly nicer. - added typedef QMapIterator QCustomPlotDataMapIterator and typedef QMutableMapIterator QCustomPlotDataMutableMapIterator for improved information hiding, when using iterators outside QCustomPlot code Bugfixes: - Fixed savePngScaled. Axis/label drawing functions used to reset the painter transform and thereby break savePngScaled. Now they buffer the current transform and restore it afterwards. - Fixed some glitches in the doxygen comments (affects documentation only) Other: - Changed the default tickLabelPadding of top axis from 3 to 6 pixels. Looks better. - Changed the default QCustomPlot::setAntialiasedElements setting: Graph fills are now antialiased by default. That's a bit slower, but makes fill borders look better. #### Version released on 19.11.11 #### Changes that break backward compatibility: - QCustomPlotAxis: tickFont and setTickFont renamed to tickLabelFont and setTickLabelFont (for naming consistency) Other: - QCustomPlotAxis: Added rotated tick labels, see setTickLabelRotation sqlitebrowser-3.11.2/libs/qcustomplot-source/qcustomplot.cpp000066400000000000000000042107751345112435200244420ustar00rootroot00000000000000/*************************************************************************** ** ** ** QCustomPlot, an easy to use, modern plotting widget for Qt ** ** Copyright (C) 2011-2017 Emanuel Eichhammer ** ** ** ** 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 3 of the License, or ** ** (at your option) any later version. ** ** ** ** This program is distributed in the hope that it will be useful, ** ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** ** GNU General Public License for more details. ** ** ** ** You should have received a copy of the GNU General Public License ** ** along with this program. If not, see http://www.gnu.org/licenses/. ** ** ** **************************************************************************** ** Author: Emanuel Eichhammer ** ** Website/Contact: http://www.qcustomplot.com/ ** ** Date: 04.09.17 ** ** Version: 2.0.0 ** ****************************************************************************/ #include "qcustomplot.h" /* including file 'src/vector2d.cpp', size 7340 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPVector2D //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPVector2D \brief Represents two doubles as a mathematical 2D vector This class acts as a replacement for QVector2D with the advantage of double precision instead of single, and some convenience methods tailored for the QCustomPlot library. */ /* start documentation of inline functions */ /*! \fn void QCPVector2D::setX(double x) Sets the x coordinate of this vector to \a x. \see setY */ /*! \fn void QCPVector2D::setY(double y) Sets the y coordinate of this vector to \a y. \see setX */ /*! \fn double QCPVector2D::length() const Returns the length of this vector. \see lengthSquared */ /*! \fn double QCPVector2D::lengthSquared() const Returns the squared length of this vector. In some situations, e.g. when just trying to find the shortest vector of a group, this is faster than calculating \ref length, because it avoids calculation of a square root. \see length */ /*! \fn QPoint QCPVector2D::toPoint() const Returns a QPoint which has the x and y coordinates of this vector, truncating any floating point information. \see toPointF */ /*! \fn QPointF QCPVector2D::toPointF() const Returns a QPointF which has the x and y coordinates of this vector. \see toPoint */ /*! \fn bool QCPVector2D::isNull() const Returns whether this vector is null. A vector is null if \c qIsNull returns true for both x and y coordinates, i.e. if both are binary equal to 0. */ /*! \fn QCPVector2D QCPVector2D::perpendicular() const Returns a vector perpendicular to this vector, with the same length. */ /*! \fn double QCPVector2D::dot() const Returns the dot/scalar product of this vector with the specified vector \a vec. */ /* end documentation of inline functions */ /*! Creates a QCPVector2D object and initializes the x and y coordinates to 0. */ QCPVector2D::QCPVector2D() : mX(0), mY(0) { } /*! Creates a QCPVector2D object and initializes the \a x and \a y coordinates with the specified values. */ QCPVector2D::QCPVector2D(double x, double y) : mX(x), mY(y) { } /*! Creates a QCPVector2D object and initializes the x and y coordinates respective coordinates of the specified \a point. */ QCPVector2D::QCPVector2D(const QPoint &point) : mX(point.x()), mY(point.y()) { } /*! Creates a QCPVector2D object and initializes the x and y coordinates respective coordinates of the specified \a point. */ QCPVector2D::QCPVector2D(const QPointF &point) : mX(point.x()), mY(point.y()) { } /*! Normalizes this vector. After this operation, the length of the vector is equal to 1. \see normalized, length, lengthSquared */ void QCPVector2D::normalize() { double len = length(); mX /= len; mY /= len; } /*! Returns a normalized version of this vector. The length of the returned vector is equal to 1. \see normalize, length, lengthSquared */ QCPVector2D QCPVector2D::normalized() const { QCPVector2D result(mX, mY); result.normalize(); return result; } /*! \overload Returns the squared shortest distance of this vector (interpreted as a point) to the finite line segment given by \a start and \a end. \see distanceToStraightLine */ double QCPVector2D::distanceSquaredToLine(const QCPVector2D &start, const QCPVector2D &end) const { QCPVector2D v(end-start); double vLengthSqr = v.lengthSquared(); if (!qFuzzyIsNull(vLengthSqr)) { double mu = v.dot(*this-start)/vLengthSqr; if (mu < 0) return (*this-start).lengthSquared(); else if (mu > 1) return (*this-end).lengthSquared(); else return ((start + mu*v)-*this).lengthSquared(); } else return (*this-start).lengthSquared(); } /*! \overload Returns the squared shortest distance of this vector (interpreted as a point) to the finite line segment given by \a line. \see distanceToStraightLine */ double QCPVector2D::distanceSquaredToLine(const QLineF &line) const { return distanceSquaredToLine(QCPVector2D(line.p1()), QCPVector2D(line.p2())); } /*! Returns the shortest distance of this vector (interpreted as a point) to the infinite straight line given by a \a base point and a \a direction vector. \see distanceSquaredToLine */ double QCPVector2D::distanceToStraightLine(const QCPVector2D &base, const QCPVector2D &direction) const { return qAbs((*this-base).dot(direction.perpendicular()))/direction.length(); } /*! Scales this vector by the given \a factor, i.e. the x and y components are multiplied by \a factor. */ QCPVector2D &QCPVector2D::operator*=(double factor) { mX *= factor; mY *= factor; return *this; } /*! Scales this vector by the given \a divisor, i.e. the x and y components are divided by \a divisor. */ QCPVector2D &QCPVector2D::operator/=(double divisor) { mX /= divisor; mY /= divisor; return *this; } /*! Adds the given \a vector to this vector component-wise. */ QCPVector2D &QCPVector2D::operator+=(const QCPVector2D &vector) { mX += vector.mX; mY += vector.mY; return *this; } /*! subtracts the given \a vector from this vector component-wise. */ QCPVector2D &QCPVector2D::operator-=(const QCPVector2D &vector) { mX -= vector.mX; mY -= vector.mY; return *this; } /* end of 'src/vector2d.cpp' */ /* including file 'src/painter.cpp', size 8670 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPPainter //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPPainter \brief QPainter subclass used internally This QPainter subclass is used to provide some extended functionality e.g. for tweaking position consistency between antialiased and non-antialiased painting. Further it provides workarounds for QPainter quirks. \warning This class intentionally hides non-virtual functions of QPainter, e.g. setPen, save and restore. So while it is possible to pass a QCPPainter instance to a function that expects a QPainter pointer, some of the workarounds and tweaks will be unavailable to the function (because it will call the base class implementations of the functions actually hidden by QCPPainter). */ /*! Creates a new QCPPainter instance and sets default values */ QCPPainter::QCPPainter() : QPainter(), mModes(pmDefault), mIsAntialiasing(false) { // don't setRenderHint(QPainter::NonCosmeticDefautPen) here, because painter isn't active yet and // a call to begin() will follow } /*! Creates a new QCPPainter instance on the specified paint \a device and sets default values. Just like the analogous QPainter constructor, begins painting on \a device immediately. Like \ref begin, this method sets QPainter::NonCosmeticDefaultPen in Qt versions before Qt5. */ QCPPainter::QCPPainter(QPaintDevice *device) : QPainter(device), mModes(pmDefault), mIsAntialiasing(false) { #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) // before Qt5, default pens used to be cosmetic if NonCosmeticDefaultPen flag isn't set. So we set it to get consistency across Qt versions. if (isActive()) setRenderHint(QPainter::NonCosmeticDefaultPen); #endif } /*! Sets the pen of the painter and applies certain fixes to it, depending on the mode of this QCPPainter. \note this function hides the non-virtual base class implementation. */ void QCPPainter::setPen(const QPen &pen) { QPainter::setPen(pen); if (mModes.testFlag(pmNonCosmetic)) makeNonCosmetic(); } /*! \overload Sets the pen (by color) of the painter and applies certain fixes to it, depending on the mode of this QCPPainter. \note this function hides the non-virtual base class implementation. */ void QCPPainter::setPen(const QColor &color) { QPainter::setPen(color); if (mModes.testFlag(pmNonCosmetic)) makeNonCosmetic(); } /*! \overload Sets the pen (by style) of the painter and applies certain fixes to it, depending on the mode of this QCPPainter. \note this function hides the non-virtual base class implementation. */ void QCPPainter::setPen(Qt::PenStyle penStyle) { QPainter::setPen(penStyle); if (mModes.testFlag(pmNonCosmetic)) makeNonCosmetic(); } /*! \overload Works around a Qt bug introduced with Qt 4.8 which makes drawing QLineF unpredictable when antialiasing is disabled. Thus when antialiasing is disabled, it rounds the \a line to integer coordinates and then passes it to the original drawLine. \note this function hides the non-virtual base class implementation. */ void QCPPainter::drawLine(const QLineF &line) { if (mIsAntialiasing || mModes.testFlag(pmVectorized)) QPainter::drawLine(line); else QPainter::drawLine(line.toLine()); } /*! Sets whether painting uses antialiasing or not. Use this method instead of using setRenderHint with QPainter::Antialiasing directly, as it allows QCPPainter to regain pixel exactness between antialiased and non-antialiased painting (Since Qt < 5.0 uses slightly different coordinate systems for AA/Non-AA painting). */ void QCPPainter::setAntialiasing(bool enabled) { setRenderHint(QPainter::Antialiasing, enabled); if (mIsAntialiasing != enabled) { mIsAntialiasing = enabled; if (!mModes.testFlag(pmVectorized)) // antialiasing half-pixel shift only needed for rasterized outputs { if (mIsAntialiasing) translate(0.5, 0.5); else translate(-0.5, -0.5); } } } /*! Sets the mode of the painter. This controls whether the painter shall adjust its fixes/workarounds optimized for certain output devices. */ void QCPPainter::setModes(QCPPainter::PainterModes modes) { mModes = modes; } /*! Sets the QPainter::NonCosmeticDefaultPen in Qt versions before Qt5 after beginning painting on \a device. This is necessary to get cosmetic pen consistency across Qt versions, because since Qt5, all pens are non-cosmetic by default, and in Qt4 this render hint must be set to get that behaviour. The Constructor \ref QCPPainter(QPaintDevice *device) which directly starts painting also sets the render hint as appropriate. \note this function hides the non-virtual base class implementation. */ bool QCPPainter::begin(QPaintDevice *device) { bool result = QPainter::begin(device); #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) // before Qt5, default pens used to be cosmetic if NonCosmeticDefaultPen flag isn't set. So we set it to get consistency across Qt versions. if (result) setRenderHint(QPainter::NonCosmeticDefaultPen); #endif return result; } /*! \overload Sets the mode of the painter. This controls whether the painter shall adjust its fixes/workarounds optimized for certain output devices. */ void QCPPainter::setMode(QCPPainter::PainterMode mode, bool enabled) { if (!enabled && mModes.testFlag(mode)) mModes &= ~mode; else if (enabled && !mModes.testFlag(mode)) mModes |= mode; } /*! Saves the painter (see QPainter::save). Since QCPPainter adds some new internal state to QPainter, the save/restore functions are reimplemented to also save/restore those members. \note this function hides the non-virtual base class implementation. \see restore */ void QCPPainter::save() { mAntialiasingStack.push(mIsAntialiasing); QPainter::save(); } /*! Restores the painter (see QPainter::restore). Since QCPPainter adds some new internal state to QPainter, the save/restore functions are reimplemented to also save/restore those members. \note this function hides the non-virtual base class implementation. \see save */ void QCPPainter::restore() { if (!mAntialiasingStack.isEmpty()) mIsAntialiasing = mAntialiasingStack.pop(); else qDebug() << Q_FUNC_INFO << "Unbalanced save/restore"; QPainter::restore(); } /*! Changes the pen width to 1 if it currently is 0. This function is called in the \ref setPen overrides when the \ref pmNonCosmetic mode is set. */ void QCPPainter::makeNonCosmetic() { if (qFuzzyIsNull(pen().widthF())) { QPen p = pen(); p.setWidth(1); QPainter::setPen(p); } } /* end of 'src/painter.cpp' */ /* including file 'src/paintbuffer.cpp', size 18502 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAbstractPaintBuffer //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAbstractPaintBuffer \brief The abstract base class for paint buffers, which define the rendering backend This abstract base class defines the basic interface that a paint buffer needs to provide in order to be usable by QCustomPlot. A paint buffer manages both a surface to draw onto, and the matching paint device. The size of the surface can be changed via \ref setSize. External classes (\ref QCustomPlot and \ref QCPLayer) request a painter via \ref startPainting and then perform the draw calls. Once the painting is complete, \ref donePainting is called, so the paint buffer implementation can do clean up if necessary. Before rendering a frame, each paint buffer is usually filled with a color using \ref clear (usually the color is \c Qt::transparent), to remove the contents of the previous frame. The simplest paint buffer implementation is \ref QCPPaintBufferPixmap which allows regular software rendering via the raster engine. Hardware accelerated rendering via pixel buffers and frame buffer objects is provided by \ref QCPPaintBufferGlPbuffer and \ref QCPPaintBufferGlFbo. They are used automatically if \ref QCustomPlot::setOpenGl is enabled. */ /* start documentation of pure virtual functions */ /*! \fn virtual QCPPainter *QCPAbstractPaintBuffer::startPainting() = 0 Returns a \ref QCPPainter which is ready to draw to this buffer. The ownership and thus the responsibility to delete the painter after the painting operations are complete is given to the caller of this method. Once you are done using the painter, delete the painter and call \ref donePainting. While a painter generated with this method is active, you must not call \ref setSize, \ref setDevicePixelRatio or \ref clear. This method may return 0, if a painter couldn't be activated on the buffer. This usually indicates a problem with the respective painting backend. */ /*! \fn virtual void QCPAbstractPaintBuffer::draw(QCPPainter *painter) const = 0 Draws the contents of this buffer with the provided \a painter. This is the method that is used to finally join all paint buffers and draw them onto the screen. */ /*! \fn virtual void QCPAbstractPaintBuffer::clear(const QColor &color) = 0 Fills the entire buffer with the provided \a color. To have an empty transparent buffer, use the named color \c Qt::transparent. This method must not be called if there is currently a painter (acquired with \ref startPainting) active. */ /*! \fn virtual void QCPAbstractPaintBuffer::reallocateBuffer() = 0 Reallocates the internal buffer with the currently configured size (\ref setSize) and device pixel ratio, if applicable (\ref setDevicePixelRatio). It is called as soon as any of those properties are changed on this paint buffer. \note Subclasses of \ref QCPAbstractPaintBuffer must call their reimplementation of this method in their constructor, to perform the first allocation (this can not be done by the base class because calling pure virtual methods in base class constructors is not possible). */ /* end documentation of pure virtual functions */ /* start documentation of inline functions */ /*! \fn virtual void QCPAbstractPaintBuffer::donePainting() If you have acquired a \ref QCPPainter to paint onto this paint buffer via \ref startPainting, call this method as soon as you are done with the painting operations and have deleted the painter. paint buffer subclasses may use this method to perform any type of cleanup that is necessary. The default implementation does nothing. */ /* end documentation of inline functions */ /*! Creates a paint buffer and initializes it with the provided \a size and \a devicePixelRatio. Subclasses must call their \ref reallocateBuffer implementation in their respective constructors. */ QCPAbstractPaintBuffer::QCPAbstractPaintBuffer(const QSize &size, double devicePixelRatio) : mSize(size), mDevicePixelRatio(devicePixelRatio), mInvalidated(true) { } QCPAbstractPaintBuffer::~QCPAbstractPaintBuffer() { } /*! Sets the paint buffer size. The buffer is reallocated (by calling \ref reallocateBuffer), so any painters that were obtained by \ref startPainting are invalidated and must not be used after calling this method. If \a size is already the current buffer size, this method does nothing. */ void QCPAbstractPaintBuffer::setSize(const QSize &size) { if (mSize != size) { mSize = size; reallocateBuffer(); } } /*! Sets the invalidated flag to \a invalidated. This mechanism is used internally in conjunction with isolated replotting of \ref QCPLayer instances (in \ref QCPLayer::lmBuffered mode). If \ref QCPLayer::replot is called on a buffered layer, i.e. an isolated repaint of only that layer (and its dedicated paint buffer) is requested, QCustomPlot will decide depending on the invalidated flags of other paint buffers whether it also replots them, instead of only the layer on which the replot was called. The invalidated flag is set to true when \ref QCPLayer association has changed, i.e. if layers were added or removed from this buffer, or if they were reordered. It is set to false as soon as all associated \ref QCPLayer instances are drawn onto the buffer. Under normal circumstances, it is not necessary to manually call this method. */ void QCPAbstractPaintBuffer::setInvalidated(bool invalidated) { mInvalidated = invalidated; } /*! Sets the the device pixel ratio to \a ratio. This is useful to render on high-DPI output devices. The ratio is automatically set to the device pixel ratio used by the parent QCustomPlot instance. The buffer is reallocated (by calling \ref reallocateBuffer), so any painters that were obtained by \ref startPainting are invalidated and must not be used after calling this method. \note This method is only available for Qt versions 5.4 and higher. */ void QCPAbstractPaintBuffer::setDevicePixelRatio(double ratio) { if (!qFuzzyCompare(ratio, mDevicePixelRatio)) { #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED mDevicePixelRatio = ratio; reallocateBuffer(); #else qDebug() << Q_FUNC_INFO << "Device pixel ratios not supported for Qt versions before 5.4"; mDevicePixelRatio = 1.0; #endif } } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPPaintBufferPixmap //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPPaintBufferPixmap \brief A paint buffer based on QPixmap, using software raster rendering This paint buffer is the default and fall-back paint buffer which uses software rendering and QPixmap as internal buffer. It is used if \ref QCustomPlot::setOpenGl is false. */ /*! Creates a pixmap paint buffer instancen with the specified \a size and \a devicePixelRatio, if applicable. */ QCPPaintBufferPixmap::QCPPaintBufferPixmap(const QSize &size, double devicePixelRatio) : QCPAbstractPaintBuffer(size, devicePixelRatio) { QCPPaintBufferPixmap::reallocateBuffer(); } QCPPaintBufferPixmap::~QCPPaintBufferPixmap() { } /* inherits documentation from base class */ QCPPainter *QCPPaintBufferPixmap::startPainting() { QCPPainter *result = new QCPPainter(&mBuffer); result->setRenderHint(QPainter::HighQualityAntialiasing); return result; } /* inherits documentation from base class */ void QCPPaintBufferPixmap::draw(QCPPainter *painter) const { if (painter && painter->isActive()) painter->drawPixmap(0, 0, mBuffer); else qDebug() << Q_FUNC_INFO << "invalid or inactive painter passed"; } /* inherits documentation from base class */ void QCPPaintBufferPixmap::clear(const QColor &color) { mBuffer.fill(color); } /* inherits documentation from base class */ void QCPPaintBufferPixmap::reallocateBuffer() { setInvalidated(); if (!qFuzzyCompare(1.0, mDevicePixelRatio)) { #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED mBuffer = QPixmap(mSize*mDevicePixelRatio); mBuffer.setDevicePixelRatio(mDevicePixelRatio); #else qDebug() << Q_FUNC_INFO << "Device pixel ratios not supported for Qt versions before 5.4"; mDevicePixelRatio = 1.0; mBuffer = QPixmap(mSize); #endif } else { mBuffer = QPixmap(mSize); } } #ifdef QCP_OPENGL_PBUFFER //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPPaintBufferGlPbuffer //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPPaintBufferGlPbuffer \brief A paint buffer based on OpenGL pixel buffers, using hardware accelerated rendering This paint buffer is one of the OpenGL paint buffers which facilitate hardware accelerated plot rendering. It is based on OpenGL pixel buffers (pbuffer) and is used in Qt versions before 5.0. (See \ref QCPPaintBufferGlFbo used in newer Qt versions.) The OpenGL paint buffers are used if \ref QCustomPlot::setOpenGl is set to true, and if they are supported by the system. */ /*! Creates a \ref QCPPaintBufferGlPbuffer instance with the specified \a size and \a devicePixelRatio, if applicable. The parameter \a multisamples defines how many samples are used per pixel. Higher values thus result in higher quality antialiasing. If the specified \a multisamples value exceeds the capability of the graphics hardware, the highest supported multisampling is used. */ QCPPaintBufferGlPbuffer::QCPPaintBufferGlPbuffer(const QSize &size, double devicePixelRatio, int multisamples) : QCPAbstractPaintBuffer(size, devicePixelRatio), mGlPBuffer(0), mMultisamples(qMax(0, multisamples)) { QCPPaintBufferGlPbuffer::reallocateBuffer(); } QCPPaintBufferGlPbuffer::~QCPPaintBufferGlPbuffer() { if (mGlPBuffer) delete mGlPBuffer; } /* inherits documentation from base class */ QCPPainter *QCPPaintBufferGlPbuffer::startPainting() { if (!mGlPBuffer->isValid()) { qDebug() << Q_FUNC_INFO << "OpenGL frame buffer object doesn't exist, reallocateBuffer was not called?"; return 0; } QCPPainter *result = new QCPPainter(mGlPBuffer); result->setRenderHint(QPainter::HighQualityAntialiasing); return result; } /* inherits documentation from base class */ void QCPPaintBufferGlPbuffer::draw(QCPPainter *painter) const { if (!painter || !painter->isActive()) { qDebug() << Q_FUNC_INFO << "invalid or inactive painter passed"; return; } if (!mGlPBuffer->isValid()) { qDebug() << Q_FUNC_INFO << "OpenGL pbuffer isn't valid, reallocateBuffer was not called?"; return; } painter->drawImage(0, 0, mGlPBuffer->toImage()); } /* inherits documentation from base class */ void QCPPaintBufferGlPbuffer::clear(const QColor &color) { if (mGlPBuffer->isValid()) { mGlPBuffer->makeCurrent(); glClearColor(color.redF(), color.greenF(), color.blueF(), color.alphaF()); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); mGlPBuffer->doneCurrent(); } else qDebug() << Q_FUNC_INFO << "OpenGL pbuffer invalid or context not current"; } /* inherits documentation from base class */ void QCPPaintBufferGlPbuffer::reallocateBuffer() { if (mGlPBuffer) delete mGlPBuffer; QGLFormat format; format.setAlpha(true); format.setSamples(mMultisamples); mGlPBuffer = new QGLPixelBuffer(mSize, format); } #endif // QCP_OPENGL_PBUFFER #ifdef QCP_OPENGL_FBO //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPPaintBufferGlFbo //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPPaintBufferGlFbo \brief A paint buffer based on OpenGL frame buffers objects, using hardware accelerated rendering This paint buffer is one of the OpenGL paint buffers which facilitate hardware accelerated plot rendering. It is based on OpenGL frame buffer objects (fbo) and is used in Qt versions 5.0 and higher. (See \ref QCPPaintBufferGlPbuffer used in older Qt versions.) The OpenGL paint buffers are used if \ref QCustomPlot::setOpenGl is set to true, and if they are supported by the system. */ /*! Creates a \ref QCPPaintBufferGlFbo instance with the specified \a size and \a devicePixelRatio, if applicable. All frame buffer objects shall share one OpenGL context and paint device, which need to be set up externally and passed via \a glContext and \a glPaintDevice. The set-up is done in \ref QCustomPlot::setupOpenGl and the context and paint device are managed by the parent QCustomPlot instance. */ QCPPaintBufferGlFbo::QCPPaintBufferGlFbo(const QSize &size, double devicePixelRatio, QWeakPointer glContext, QWeakPointer glPaintDevice) : QCPAbstractPaintBuffer(size, devicePixelRatio), mGlContext(glContext), mGlPaintDevice(glPaintDevice), mGlFrameBuffer(0) { QCPPaintBufferGlFbo::reallocateBuffer(); } QCPPaintBufferGlFbo::~QCPPaintBufferGlFbo() { if (mGlFrameBuffer) delete mGlFrameBuffer; } /* inherits documentation from base class */ QCPPainter *QCPPaintBufferGlFbo::startPainting() { if (mGlPaintDevice.isNull()) { qDebug() << Q_FUNC_INFO << "OpenGL paint device doesn't exist"; return 0; } if (!mGlFrameBuffer) { qDebug() << Q_FUNC_INFO << "OpenGL frame buffer object doesn't exist, reallocateBuffer was not called?"; return 0; } if (QOpenGLContext::currentContext() != mGlContext.data()) mGlContext.data()->makeCurrent(mGlContext.data()->surface()); mGlFrameBuffer->bind(); QCPPainter *result = new QCPPainter(mGlPaintDevice.data()); result->setRenderHint(QPainter::HighQualityAntialiasing); return result; } /* inherits documentation from base class */ void QCPPaintBufferGlFbo::donePainting() { if (mGlFrameBuffer && mGlFrameBuffer->isBound()) mGlFrameBuffer->release(); else qDebug() << Q_FUNC_INFO << "Either OpenGL frame buffer not valid or was not bound"; } /* inherits documentation from base class */ void QCPPaintBufferGlFbo::draw(QCPPainter *painter) const { if (!painter || !painter->isActive()) { qDebug() << Q_FUNC_INFO << "invalid or inactive painter passed"; return; } if (!mGlFrameBuffer) { qDebug() << Q_FUNC_INFO << "OpenGL frame buffer object doesn't exist, reallocateBuffer was not called?"; return; } painter->drawImage(0, 0, mGlFrameBuffer->toImage()); } /* inherits documentation from base class */ void QCPPaintBufferGlFbo::clear(const QColor &color) { if (mGlContext.isNull()) { qDebug() << Q_FUNC_INFO << "OpenGL context doesn't exist"; return; } if (!mGlFrameBuffer) { qDebug() << Q_FUNC_INFO << "OpenGL frame buffer object doesn't exist, reallocateBuffer was not called?"; return; } if (QOpenGLContext::currentContext() != mGlContext.data()) mGlContext.data()->makeCurrent(mGlContext.data()->surface()); mGlFrameBuffer->bind(); glClearColor(color.redF(), color.greenF(), color.blueF(), color.alphaF()); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); mGlFrameBuffer->release(); } /* inherits documentation from base class */ void QCPPaintBufferGlFbo::reallocateBuffer() { // release and delete possibly existing framebuffer: if (mGlFrameBuffer) { if (mGlFrameBuffer->isBound()) mGlFrameBuffer->release(); delete mGlFrameBuffer; mGlFrameBuffer = 0; } if (mGlContext.isNull()) { qDebug() << Q_FUNC_INFO << "OpenGL context doesn't exist"; return; } if (mGlPaintDevice.isNull()) { qDebug() << Q_FUNC_INFO << "OpenGL paint device doesn't exist"; return; } // create new fbo with appropriate size: mGlContext.data()->makeCurrent(mGlContext.data()->surface()); QOpenGLFramebufferObjectFormat frameBufferFormat; frameBufferFormat.setSamples(mGlContext.data()->format().samples()); frameBufferFormat.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); mGlFrameBuffer = new QOpenGLFramebufferObject(mSize*mDevicePixelRatio, frameBufferFormat); if (mGlPaintDevice.data()->size() != mSize*mDevicePixelRatio) mGlPaintDevice.data()->setSize(mSize*mDevicePixelRatio); #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED mGlPaintDevice.data()->setDevicePixelRatio(mDevicePixelRatio); #endif } #endif // QCP_OPENGL_FBO /* end of 'src/paintbuffer.cpp' */ /* including file 'src/layer.cpp', size 37064 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLayer //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPLayer \brief A layer that may contain objects, to control the rendering order The Layering system of QCustomPlot is the mechanism to control the rendering order of the elements inside the plot. It is based on the two classes QCPLayer and QCPLayerable. QCustomPlot holds an ordered list of one or more instances of QCPLayer (see QCustomPlot::addLayer, QCustomPlot::layer, QCustomPlot::moveLayer, etc.). When replotting, QCustomPlot goes through the list of layers bottom to top and successively draws the layerables of the layers into the paint buffer(s). A QCPLayer contains an ordered list of QCPLayerable instances. QCPLayerable is an abstract base class from which almost all visible objects derive, like axes, grids, graphs, items, etc. \section qcplayer-defaultlayers Default layers Initially, QCustomPlot has six layers: "background", "grid", "main", "axes", "legend" and "overlay" (in that order). On top is the "overlay" layer, which only contains the QCustomPlot's selection rect (\ref QCustomPlot::selectionRect). The next two layers "axes" and "legend" contain the default axes and legend, so they will be drawn above plottables. In the middle, there is the "main" layer. It is initially empty and set as the current layer (see QCustomPlot::setCurrentLayer). This means, all new plottables, items etc. are created on this layer by default. Then comes the "grid" layer which contains the QCPGrid instances (which belong tightly to QCPAxis, see \ref QCPAxis::grid). The Axis rect background shall be drawn behind everything else, thus the default QCPAxisRect instance is placed on the "background" layer. Of course, the layer affiliation of the individual objects can be changed as required (\ref QCPLayerable::setLayer). \section qcplayer-ordering Controlling the rendering order via layers Controlling the ordering of layerables in the plot is easy: Create a new layer in the position you want the layerable to be in, e.g. above "main", with \ref QCustomPlot::addLayer. Then set the current layer with \ref QCustomPlot::setCurrentLayer to that new layer and finally create the objects normally. They will be placed on the new layer automatically, due to the current layer setting. Alternatively you could have also ignored the current layer setting and just moved the objects with \ref QCPLayerable::setLayer to the desired layer after creating them. It is also possible to move whole layers. For example, If you want the grid to be shown in front of all plottables/items on the "main" layer, just move it above "main" with QCustomPlot::moveLayer. The rendering order within one layer is simply by order of creation or insertion. The item created last (or added last to the layer), is drawn on top of all other objects on that layer. When a layer is deleted, the objects on it are not deleted with it, but fall on the layer below the deleted layer, see QCustomPlot::removeLayer. \section qcplayer-buffering Replotting only a specific layer If the layer mode (\ref setMode) is set to \ref lmBuffered, you can replot only this specific layer by calling \ref replot. In certain situations this can provide better replot performance, compared with a full replot of all layers. Upon creation of a new layer, the layer mode is initialized to \ref lmLogical. The only layer that is set to \ref lmBuffered in a new \ref QCustomPlot instance is the "overlay" layer, containing the selection rect. */ /* start documentation of inline functions */ /*! \fn QList QCPLayer::children() const Returns a list of all layerables on this layer. The order corresponds to the rendering order: layerables with higher indices are drawn above layerables with lower indices. */ /*! \fn int QCPLayer::index() const Returns the index this layer has in the QCustomPlot. The index is the integer number by which this layer can be accessed via \ref QCustomPlot::layer. Layers with higher indices will be drawn above layers with lower indices. */ /* end documentation of inline functions */ /*! Creates a new QCPLayer instance. Normally you shouldn't directly instantiate layers, use \ref QCustomPlot::addLayer instead. \warning It is not checked that \a layerName is actually a unique layer name in \a parentPlot. This check is only performed by \ref QCustomPlot::addLayer. */ QCPLayer::QCPLayer(QCustomPlot *parentPlot, const QString &layerName) : QObject(parentPlot), mParentPlot(parentPlot), mName(layerName), mIndex(-1), // will be set to a proper value by the QCustomPlot layer creation function mVisible(true), mMode(lmLogical) { // Note: no need to make sure layerName is unique, because layer // management is done with QCustomPlot functions. } QCPLayer::~QCPLayer() { // If child layerables are still on this layer, detach them, so they don't try to reach back to this // then invalid layer once they get deleted/moved themselves. This only happens when layers are deleted // directly, like in the QCustomPlot destructor. (The regular layer removal procedure for the user is to // call QCustomPlot::removeLayer, which moves all layerables off this layer before deleting it.) while (!mChildren.isEmpty()) mChildren.last()->setLayer(0); // removes itself from mChildren via removeChild() if (mParentPlot->currentLayer() == this) qDebug() << Q_FUNC_INFO << "The parent plot's mCurrentLayer will be a dangling pointer. Should have been set to a valid layer or 0 beforehand."; } /*! Sets whether this layer is visible or not. If \a visible is set to false, all layerables on this layer will be invisible. This function doesn't change the visibility property of the layerables (\ref QCPLayerable::setVisible), but the \ref QCPLayerable::realVisibility of each layerable takes the visibility of the parent layer into account. */ void QCPLayer::setVisible(bool visible) { mVisible = visible; } /*! Sets the rendering mode of this layer. If \a mode is set to \ref lmBuffered for a layer, it will be given a dedicated paint buffer by the parent QCustomPlot instance. This means it may be replotted individually by calling \ref QCPLayer::replot, without needing to replot all other layers. Layers which are set to \ref lmLogical (the default) are used only to define the rendering order and can't be replotted individually. Note that each layer which is set to \ref lmBuffered requires additional paint buffers for the layers below, above and for the layer itself. This increases the memory consumption and (slightly) decreases the repainting speed because multiple paint buffers need to be joined. So you should carefully choose which layers benefit from having their own paint buffer. A typical example would be a layer which contains certain layerables (e.g. items) that need to be changed and thus replotted regularly, while all other layerables on other layers stay static. By default, only the topmost layer called "overlay" is in mode \ref lmBuffered, and contains the selection rect. \see replot */ void QCPLayer::setMode(QCPLayer::LayerMode mode) { if (mMode != mode) { mMode = mode; if (!mPaintBuffer.isNull()) mPaintBuffer.data()->setInvalidated(); } } /*! \internal Draws the contents of this layer with the provided \a painter. \see replot, drawToPaintBuffer */ void QCPLayer::draw(QCPPainter *painter) { foreach (QCPLayerable *child, mChildren) { if (child->realVisibility()) { painter->save(); painter->setClipRect(child->clipRect().translated(0, -1)); child->applyDefaultAntialiasingHint(painter); child->draw(painter); painter->restore(); } } } /*! \internal Draws the contents of this layer into the paint buffer which is associated with this layer. The association is established by the parent QCustomPlot, which manages all paint buffers (see \ref QCustomPlot::setupPaintBuffers). \see draw */ void QCPLayer::drawToPaintBuffer() { if (!mPaintBuffer.isNull()) { if (QCPPainter *painter = mPaintBuffer.data()->startPainting()) { if (painter->isActive()) draw(painter); else qDebug() << Q_FUNC_INFO << "paint buffer returned inactive painter"; delete painter; mPaintBuffer.data()->donePainting(); } else qDebug() << Q_FUNC_INFO << "paint buffer returned zero painter"; } else qDebug() << Q_FUNC_INFO << "no valid paint buffer associated with this layer"; } /*! If the layer mode (\ref setMode) is set to \ref lmBuffered, this method allows replotting only the layerables on this specific layer, without the need to replot all other layers (as a call to \ref QCustomPlot::replot would do). If the layer mode is \ref lmLogical however, this method simply calls \ref QCustomPlot::replot on the parent QCustomPlot instance. QCustomPlot also makes sure to replot all layers instead of only this one, if the layer ordering has changed since the last full replot and the other paint buffers were thus invalidated. \see draw */ void QCPLayer::replot() { if (mMode == lmBuffered && !mParentPlot->hasInvalidatedPaintBuffers()) { if (!mPaintBuffer.isNull()) { mPaintBuffer.data()->clear(Qt::transparent); drawToPaintBuffer(); mPaintBuffer.data()->setInvalidated(false); mParentPlot->update(); } else qDebug() << Q_FUNC_INFO << "no valid paint buffer associated with this layer"; } else if (mMode == lmLogical) mParentPlot->replot(); } /*! \internal Adds the \a layerable to the list of this layer. If \a prepend is set to true, the layerable will be prepended to the list, i.e. be drawn beneath the other layerables already in the list. This function does not change the \a mLayer member of \a layerable to this layer. (Use QCPLayerable::setLayer to change the layer of an object, not this function.) \see removeChild */ void QCPLayer::addChild(QCPLayerable *layerable, bool prepend) { if (!mChildren.contains(layerable)) { if (prepend) mChildren.prepend(layerable); else mChildren.append(layerable); if (!mPaintBuffer.isNull()) mPaintBuffer.data()->setInvalidated(); } else qDebug() << Q_FUNC_INFO << "layerable is already child of this layer" << reinterpret_cast(layerable); } /*! \internal Removes the \a layerable from the list of this layer. This function does not change the \a mLayer member of \a layerable. (Use QCPLayerable::setLayer to change the layer of an object, not this function.) \see addChild */ void QCPLayer::removeChild(QCPLayerable *layerable) { if (mChildren.removeOne(layerable)) { if (!mPaintBuffer.isNull()) mPaintBuffer.data()->setInvalidated(); } else qDebug() << Q_FUNC_INFO << "layerable is not child of this layer" << reinterpret_cast(layerable); } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLayerable //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPLayerable \brief Base class for all drawable objects This is the abstract base class most visible objects derive from, e.g. plottables, axes, grid etc. Every layerable is on a layer (QCPLayer) which allows controlling the rendering order by stacking the layers accordingly. For details about the layering mechanism, see the QCPLayer documentation. */ /* start documentation of inline functions */ /*! \fn QCPLayerable *QCPLayerable::parentLayerable() const Returns the parent layerable of this layerable. The parent layerable is used to provide visibility hierarchies in conjunction with the method \ref realVisibility. This way, layerables only get drawn if their parent layerables are visible, too. Note that a parent layerable is not necessarily also the QObject parent for memory management. Further, a layerable doesn't always have a parent layerable, so this function may return 0. A parent layerable is set implicitly when placed inside layout elements and doesn't need to be set manually by the user. */ /* end documentation of inline functions */ /* start documentation of pure virtual functions */ /*! \fn virtual void QCPLayerable::applyDefaultAntialiasingHint(QCPPainter *painter) const = 0 \internal This function applies the default antialiasing setting to the specified \a painter, using the function \ref applyAntialiasingHint. It is the antialiasing state the painter is put in, when \ref draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the \ref draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint. First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function. Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The \ref QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the \ref draw function is called, and that's the state it wants to draw the line with. */ /*! \fn virtual void QCPLayerable::draw(QCPPainter *painter) const = 0 \internal This function draws the layerable with the specified \a painter. It is only called by QCustomPlot, if the layerable is visible (\ref setVisible). Before this function is called, the painter's antialiasing state is set via \ref applyDefaultAntialiasingHint, see the documentation there. Further, the clipping rectangle was set to \ref clipRect. */ /* end documentation of pure virtual functions */ /* start documentation of signals */ /*! \fn void QCPLayerable::layerChanged(QCPLayer *newLayer); This signal is emitted when the layer of this layerable changes, i.e. this layerable is moved to a different layer. \see setLayer */ /* end documentation of signals */ /*! Creates a new QCPLayerable instance. Since QCPLayerable is an abstract base class, it can't be instantiated directly. Use one of the derived classes. If \a plot is provided, it automatically places itself on the layer named \a targetLayer. If \a targetLayer is an empty string, it places itself on the current layer of the plot (see \ref QCustomPlot::setCurrentLayer). It is possible to provide 0 as \a plot. In that case, you should assign a parent plot at a later time with \ref initializeParentPlot. The layerable's parent layerable is set to \a parentLayerable, if provided. Direct layerable parents are mainly used to control visibility in a hierarchy of layerables. This means a layerable is only drawn, if all its ancestor layerables are also visible. Note that \a parentLayerable does not become the QObject-parent (for memory management) of this layerable, \a plot does. It is not uncommon to set the QObject-parent to something else in the constructors of QCPLayerable subclasses, to guarantee a working destruction hierarchy. */ QCPLayerable::QCPLayerable(QCustomPlot *plot, QString targetLayer, QCPLayerable *parentLayerable) : QObject(plot), mVisible(true), mParentPlot(plot), mParentLayerable(parentLayerable), mLayer(0), mAntialiased(true) { if (mParentPlot) { if (targetLayer.isEmpty()) setLayer(mParentPlot->currentLayer()); else if (!setLayer(targetLayer)) qDebug() << Q_FUNC_INFO << "setting QCPlayerable initial layer to" << targetLayer << "failed."; } } QCPLayerable::~QCPLayerable() { if (mLayer) { mLayer->removeChild(this); mLayer = 0; } } /*! Sets the visibility of this layerable object. If an object is not visible, it will not be drawn on the QCustomPlot surface, and user interaction with it (e.g. click and selection) is not possible. */ void QCPLayerable::setVisible(bool on) { mVisible = on; } /*! Sets the \a layer of this layerable object. The object will be placed on top of the other objects already on \a layer. If \a layer is 0, this layerable will not be on any layer and thus not appear in the plot (or interact/receive events). Returns true if the layer of this layerable was successfully changed to \a layer. */ bool QCPLayerable::setLayer(QCPLayer *layer) { return moveToLayer(layer, false); } /*! \overload Sets the layer of this layerable object by name Returns true on success, i.e. if \a layerName is a valid layer name. */ bool QCPLayerable::setLayer(const QString &layerName) { if (!mParentPlot) { qDebug() << Q_FUNC_INFO << "no parent QCustomPlot set"; return false; } if (QCPLayer *layer = mParentPlot->layer(layerName)) { return setLayer(layer); } else { qDebug() << Q_FUNC_INFO << "there is no layer with name" << layerName; return false; } } /*! Sets whether this object will be drawn antialiased or not. Note that antialiasing settings may be overridden by QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements. */ void QCPLayerable::setAntialiased(bool enabled) { mAntialiased = enabled; } /*! Returns whether this layerable is visible, taking the visibility of the layerable parent and the visibility of this layerable's layer into account. This is the method that is consulted to decide whether a layerable shall be drawn or not. If this layerable has a direct layerable parent (usually set via hierarchies implemented in subclasses, like in the case of \ref QCPLayoutElement), this function returns true only if this layerable has its visibility set to true and the parent layerable's \ref realVisibility returns true. */ bool QCPLayerable::realVisibility() const { return mVisible && (!mLayer || mLayer->visible()) && (!mParentLayerable || mParentLayerable.data()->realVisibility()); } /*! This function is used to decide whether a click hits a layerable object or not. \a pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if \a onlySelectable is true and the object is not selectable, -1.0 is returned, too. If the object is represented not by single lines but by an area like a \ref QCPItemText or the bars of a \ref QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99). Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance). The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the \ref selectEvent/\ref deselectEvent methods. \a details is an optional output parameter. Every layerable subclass may place any information in \a details. This information will be passed to \ref selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to \ref selectEvent will carry the \a details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in \ref selectTest. The result (i.e. the actually clicked part) can then be placed in \a details. So in the subsequent \ref selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation. You may pass 0 as \a details to indicate that you are not interested in those selection details. \see selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions */ double QCPLayerable::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(pos) Q_UNUSED(onlySelectable) Q_UNUSED(details) return -1.0; } /*! \internal Sets the parent plot of this layerable. Use this function once to set the parent plot if you have passed 0 in the constructor. It can not be used to move a layerable from one QCustomPlot to another one. Note that, unlike when passing a non-null parent plot in the constructor, this function does not make \a parentPlot the QObject-parent of this layerable. If you want this, call QObject::setParent(\a parentPlot) in addition to this function. Further, you will probably want to set a layer (\ref setLayer) after calling this function, to make the layerable appear on the QCustomPlot. The parent plot change will be propagated to subclasses via a call to \ref parentPlotInitialized so they can react accordingly (e.g. also initialize the parent plot of child layerables, like QCPLayout does). */ void QCPLayerable::initializeParentPlot(QCustomPlot *parentPlot) { if (mParentPlot) { qDebug() << Q_FUNC_INFO << "called with mParentPlot already initialized"; return; } if (!parentPlot) qDebug() << Q_FUNC_INFO << "called with parentPlot zero"; mParentPlot = parentPlot; parentPlotInitialized(mParentPlot); } /*! \internal Sets the parent layerable of this layerable to \a parentLayerable. Note that \a parentLayerable does not become the QObject-parent (for memory management) of this layerable. The parent layerable has influence on the return value of the \ref realVisibility method. Only layerables with a fully visible parent tree will return true for \ref realVisibility, and thus be drawn. \see realVisibility */ void QCPLayerable::setParentLayerable(QCPLayerable *parentLayerable) { mParentLayerable = parentLayerable; } /*! \internal Moves this layerable object to \a layer. If \a prepend is true, this object will be prepended to the new layer's list, i.e. it will be drawn below the objects already on the layer. If it is false, the object will be appended. Returns true on success, i.e. if \a layer is a valid layer. */ bool QCPLayerable::moveToLayer(QCPLayer *layer, bool prepend) { if (layer && !mParentPlot) { qDebug() << Q_FUNC_INFO << "no parent QCustomPlot set"; return false; } if (layer && layer->parentPlot() != mParentPlot) { qDebug() << Q_FUNC_INFO << "layer" << layer->name() << "is not in same QCustomPlot as this layerable"; return false; } QCPLayer *oldLayer = mLayer; if (mLayer) mLayer->removeChild(this); mLayer = layer; if (mLayer) mLayer->addChild(this, prepend); if (mLayer != oldLayer) emit layerChanged(mLayer); return true; } /*! \internal Sets the QCPainter::setAntialiasing state on the provided \a painter, depending on the \a localAntialiased value as well as the overrides \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. Which override enum this function takes into account is controlled via \a overrideElement. */ void QCPLayerable::applyAntialiasingHint(QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const { if (mParentPlot && mParentPlot->notAntialiasedElements().testFlag(overrideElement)) painter->setAntialiasing(false); else if (mParentPlot && mParentPlot->antialiasedElements().testFlag(overrideElement)) painter->setAntialiasing(true); else painter->setAntialiasing(localAntialiased); } /*! \internal This function is called by \ref initializeParentPlot, to allow subclasses to react on the setting of a parent plot. This is the case when 0 was passed as parent plot in the constructor, and the parent plot is set at a later time. For example, QCPLayoutElement/QCPLayout hierarchies may be created independently of any QCustomPlot at first. When they are then added to a layout inside the QCustomPlot, the top level element of the hierarchy gets its parent plot initialized with \ref initializeParentPlot. To propagate the parent plot to all the children of the hierarchy, the top level element then uses this function to pass the parent plot on to its child elements. The default implementation does nothing. \see initializeParentPlot */ void QCPLayerable::parentPlotInitialized(QCustomPlot *parentPlot) { Q_UNUSED(parentPlot) } /*! \internal Returns the selection category this layerable shall belong to. The selection category is used in conjunction with \ref QCustomPlot::setInteractions to control which objects are selectable and which aren't. Subclasses that don't fit any of the normal \ref QCP::Interaction values can use \ref QCP::iSelectOther. This is what the default implementation returns. \see QCustomPlot::setInteractions */ QCP::Interaction QCPLayerable::selectionCategory() const { return QCP::iSelectOther; } /*! \internal Returns the clipping rectangle of this layerable object. By default, this is the viewport of the parent QCustomPlot. Specific subclasses may reimplement this function to provide different clipping rects. The returned clipping rect is set on the painter before the draw function of the respective object is called. */ QRect QCPLayerable::clipRect() const { if (mParentPlot) return mParentPlot->viewport(); else return QRect(); } /*! \internal This event is called when the layerable shall be selected, as a consequence of a click by the user. Subclasses should react to it by setting their selection state appropriately. The default implementation does nothing. \a event is the mouse event that caused the selection. \a additive indicates, whether the user was holding the multi-select-modifier while performing the selection (see \ref QCustomPlot::setMultiSelectModifier). if \a additive is true, the selection state must be toggled (i.e. become selected when unselected and unselected when selected). Every selectEvent is preceded by a call to \ref selectTest, which has returned positively (i.e. returned a value greater than 0 and less than the selection tolerance of the parent QCustomPlot). The \a details data you output from \ref selectTest is fed back via \a details here. You may use it to transport any kind of information from the selectTest to the possibly subsequent selectEvent. Usually \a details is used to transfer which part was clicked, if it is a layerable that has multiple individually selectable parts (like QCPAxis). This way selectEvent doesn't need to do the calculation again to find out which part was actually clicked. \a selectionStateChanged is an output parameter. If the pointer is non-null, this function must set the value either to true or false, depending on whether the selection state of this layerable was actually changed. For layerables that only are selectable as a whole and not in parts, this is simple: if \a additive is true, \a selectionStateChanged must also be set to true, because the selection toggles. If \a additive is false, \a selectionStateChanged is only set to true, if the layerable was previously unselected and now is switched to the selected state. \see selectTest, deselectEvent */ void QCPLayerable::selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) { Q_UNUSED(event) Q_UNUSED(additive) Q_UNUSED(details) Q_UNUSED(selectionStateChanged) } /*! \internal This event is called when the layerable shall be deselected, either as consequence of a user interaction or a call to \ref QCustomPlot::deselectAll. Subclasses should react to it by unsetting their selection appropriately. just as in \ref selectEvent, the output parameter \a selectionStateChanged (if non-null), must return true or false when the selection state of this layerable has changed or not changed, respectively. \see selectTest, selectEvent */ void QCPLayerable::deselectEvent(bool *selectionStateChanged) { Q_UNUSED(selectionStateChanged) } /*! This event gets called when the user presses a mouse button while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to \ref selectTest. The current pixel position of the cursor on the QCustomPlot widget is accessible via \c event->pos(). The parameter \a details contains layerable-specific details about the hit, which were generated in the previous call to \ref selectTest. For example, One-dimensional plottables like \ref QCPGraph or \ref QCPBars convey the clicked data point in the \a details parameter, as \ref QCPDataSelection packed as QVariant. Multi-part objects convey the specific \c SelectablePart that was hit (e.g. \ref QCPAxis::SelectablePart in the case of axes). QCustomPlot uses an event propagation system that works the same as Qt's system. If your layerable doesn't reimplement the \ref mousePressEvent or explicitly calls \c event->ignore() in its reimplementation, the event will be propagated to the next layerable in the stacking order. Once a layerable has accepted the \ref mousePressEvent, it is considered the mouse grabber and will receive all following calls to \ref mouseMoveEvent or \ref mouseReleaseEvent for this mouse interaction (a "mouse interaction" in this context ends with the release). The default implementation does nothing except explicitly ignoring the event with \c event->ignore(). \see mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent */ void QCPLayerable::mousePressEvent(QMouseEvent *event, const QVariant &details) { Q_UNUSED(details) event->ignore(); } /*! This event gets called when the user moves the mouse while holding a mouse button, after this layerable has become the mouse grabber by accepting the preceding \ref mousePressEvent. The current pixel position of the cursor on the QCustomPlot widget is accessible via \c event->pos(). The parameter \a startPos indicates the position where the initial \ref mousePressEvent occured, that started the mouse interaction. The default implementation does nothing. \see mousePressEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent */ void QCPLayerable::mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) { Q_UNUSED(startPos) event->ignore(); } /*! This event gets called when the user releases the mouse button, after this layerable has become the mouse grabber by accepting the preceding \ref mousePressEvent. The current pixel position of the cursor on the QCustomPlot widget is accessible via \c event->pos(). The parameter \a startPos indicates the position where the initial \ref mousePressEvent occured, that started the mouse interaction. The default implementation does nothing. \see mousePressEvent, mouseMoveEvent, mouseDoubleClickEvent, wheelEvent */ void QCPLayerable::mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) { Q_UNUSED(startPos) event->ignore(); } /*! This event gets called when the user presses the mouse button a second time in a double-click, while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to \ref selectTest. The \ref mouseDoubleClickEvent is called instead of the second \ref mousePressEvent. So in the case of a double-click, the event succession is pressEvent – releaseEvent – doubleClickEvent – releaseEvent. The current pixel position of the cursor on the QCustomPlot widget is accessible via \c event->pos(). The parameter \a details contains layerable-specific details about the hit, which were generated in the previous call to \ref selectTest. For example, One-dimensional plottables like \ref QCPGraph or \ref QCPBars convey the clicked data point in the \a details parameter, as \ref QCPDataSelection packed as QVariant. Multi-part objects convey the specific \c SelectablePart that was hit (e.g. \ref QCPAxis::SelectablePart in the case of axes). Similarly to \ref mousePressEvent, once a layerable has accepted the \ref mouseDoubleClickEvent, it is considered the mouse grabber and will receive all following calls to \ref mouseMoveEvent and \ref mouseReleaseEvent for this mouse interaction (a "mouse interaction" in this context ends with the release). The default implementation does nothing except explicitly ignoring the event with \c event->ignore(). \see mousePressEvent, mouseMoveEvent, mouseReleaseEvent, wheelEvent */ void QCPLayerable::mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details) { Q_UNUSED(details) event->ignore(); } /*! This event gets called when the user turns the mouse scroll wheel while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to \ref selectTest. The current pixel position of the cursor on the QCustomPlot widget is accessible via \c event->pos(). The \c event->delta() indicates how far the mouse wheel was turned, which is usually +/- 120 for single rotation steps. However, if the mouse wheel is turned rapidly, multiple steps may accumulate to one event, making \c event->delta() larger. On the other hand, if the wheel has very smooth steps or none at all, the delta may be smaller. The default implementation does nothing. \see mousePressEvent, mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent */ void QCPLayerable::wheelEvent(QWheelEvent *event) { event->ignore(); } /* end of 'src/layer.cpp' */ /* including file 'src/axis/range.cpp', size 12221 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPRange //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPRange \brief Represents the range an axis is encompassing. contains a \a lower and \a upper double value and provides convenience input, output and modification functions. \see QCPAxis::setRange */ /* start of documentation of inline functions */ /*! \fn double QCPRange::size() const Returns the size of the range, i.e. \a upper-\a lower */ /*! \fn double QCPRange::center() const Returns the center of the range, i.e. (\a upper+\a lower)*0.5 */ /*! \fn void QCPRange::normalize() Makes sure \a lower is numerically smaller than \a upper. If this is not the case, the values are swapped. */ /*! \fn bool QCPRange::contains(double value) const Returns true when \a value lies within or exactly on the borders of the range. */ /*! \fn QCPRange &QCPRange::operator+=(const double& value) Adds \a value to both boundaries of the range. */ /*! \fn QCPRange &QCPRange::operator-=(const double& value) Subtracts \a value from both boundaries of the range. */ /*! \fn QCPRange &QCPRange::operator*=(const double& value) Multiplies both boundaries of the range by \a value. */ /*! \fn QCPRange &QCPRange::operator/=(const double& value) Divides both boundaries of the range by \a value. */ /* end of documentation of inline functions */ /*! Minimum range size (\a upper - \a lower) the range changing functions will accept. Smaller intervals would cause errors due to the 11-bit exponent of double precision numbers, corresponding to a minimum magnitude of roughly 1e-308. \warning Do not use this constant to indicate "arbitrarily small" values in plotting logic (as values that will appear in the plot)! It is intended only as a bound to compare against, e.g. to prevent axis ranges from obtaining underflowing ranges. \see validRange, maxRange */ const double QCPRange::minRange = 1e-280; /*! Maximum values (negative and positive) the range will accept in range-changing functions. Larger absolute values would cause errors due to the 11-bit exponent of double precision numbers, corresponding to a maximum magnitude of roughly 1e308. \warning Do not use this constant to indicate "arbitrarily large" values in plotting logic (as values that will appear in the plot)! It is intended only as a bound to compare against, e.g. to prevent axis ranges from obtaining overflowing ranges. \see validRange, minRange */ const double QCPRange::maxRange = 1e250; /*! Constructs a range with \a lower and \a upper set to zero. */ QCPRange::QCPRange() : lower(0), upper(0) { } /*! \overload Constructs a range with the specified \a lower and \a upper values. The resulting range will be normalized (see \ref normalize), so if \a lower is not numerically smaller than \a upper, they will be swapped. */ QCPRange::QCPRange(double lower, double upper) : lower(lower), upper(upper) { normalize(); } /*! \overload Expands this range such that \a otherRange is contained in the new range. It is assumed that both this range and \a otherRange are normalized (see \ref normalize). If this range contains NaN as lower or upper bound, it will be replaced by the respective bound of \a otherRange. If \a otherRange is already inside the current range, this function does nothing. \see expanded */ void QCPRange::expand(const QCPRange &otherRange) { if (lower > otherRange.lower || qIsNaN(lower)) lower = otherRange.lower; if (upper < otherRange.upper || qIsNaN(upper)) upper = otherRange.upper; } /*! \overload Expands this range such that \a includeCoord is contained in the new range. It is assumed that this range is normalized (see \ref normalize). If this range contains NaN as lower or upper bound, the respective bound will be set to \a includeCoord. If \a includeCoord is already inside the current range, this function does nothing. \see expand */ void QCPRange::expand(double includeCoord) { if (lower > includeCoord || qIsNaN(lower)) lower = includeCoord; if (upper < includeCoord || qIsNaN(upper)) upper = includeCoord; } /*! \overload Returns an expanded range that contains this and \a otherRange. It is assumed that both this range and \a otherRange are normalized (see \ref normalize). If this range contains NaN as lower or upper bound, the returned range's bound will be taken from \a otherRange. \see expand */ QCPRange QCPRange::expanded(const QCPRange &otherRange) const { QCPRange result = *this; result.expand(otherRange); return result; } /*! \overload Returns an expanded range that includes the specified \a includeCoord. It is assumed that this range is normalized (see \ref normalize). If this range contains NaN as lower or upper bound, the returned range's bound will be set to \a includeCoord. \see expand */ QCPRange QCPRange::expanded(double includeCoord) const { QCPRange result = *this; result.expand(includeCoord); return result; } /*! Returns this range, possibly modified to not exceed the bounds provided as \a lowerBound and \a upperBound. If possible, the size of the current range is preserved in the process. If the range shall only be bounded at the lower side, you can set \a upperBound to \ref QCPRange::maxRange. If it shall only be bounded at the upper side, set \a lowerBound to -\ref QCPRange::maxRange. */ QCPRange QCPRange::bounded(double lowerBound, double upperBound) const { if (lowerBound > upperBound) qSwap(lowerBound, upperBound); QCPRange result(lower, upper); if (result.lower < lowerBound) { result.lower = lowerBound; result.upper = lowerBound + size(); if (result.upper > upperBound || qFuzzyCompare(size(), upperBound-lowerBound)) result.upper = upperBound; } else if (result.upper > upperBound) { result.upper = upperBound; result.lower = upperBound - size(); if (result.lower < lowerBound || qFuzzyCompare(size(), upperBound-lowerBound)) result.lower = lowerBound; } return result; } /*! Returns a sanitized version of the range. Sanitized means for logarithmic scales, that the range won't span the positive and negative sign domain, i.e. contain zero. Further \a lower will always be numerically smaller (or equal) to \a upper. If the original range does span positive and negative sign domains or contains zero, the returned range will try to approximate the original range as good as possible. If the positive interval of the original range is wider than the negative interval, the returned range will only contain the positive interval, with lower bound set to \a rangeFac or \a rangeFac *\a upper, whichever is closer to zero. Same procedure is used if the negative interval is wider than the positive interval, this time by changing the \a upper bound. */ QCPRange QCPRange::sanitizedForLogScale() const { double rangeFac = 1e-3; QCPRange sanitizedRange(lower, upper); sanitizedRange.normalize(); // can't have range spanning negative and positive values in log plot, so change range to fix it //if (qFuzzyCompare(sanitizedRange.lower+1, 1) && !qFuzzyCompare(sanitizedRange.upper+1, 1)) if (sanitizedRange.lower == 0.0 && sanitizedRange.upper != 0.0) { // case lower is 0 if (rangeFac < sanitizedRange.upper*rangeFac) sanitizedRange.lower = rangeFac; else sanitizedRange.lower = sanitizedRange.upper*rangeFac; } //else if (!qFuzzyCompare(lower+1, 1) && qFuzzyCompare(upper+1, 1)) else if (sanitizedRange.lower != 0.0 && sanitizedRange.upper == 0.0) { // case upper is 0 if (-rangeFac > sanitizedRange.lower*rangeFac) sanitizedRange.upper = -rangeFac; else sanitizedRange.upper = sanitizedRange.lower*rangeFac; } else if (sanitizedRange.lower < 0 && sanitizedRange.upper > 0) { // find out whether negative or positive interval is wider to decide which sign domain will be chosen if (-sanitizedRange.lower > sanitizedRange.upper) { // negative is wider, do same as in case upper is 0 if (-rangeFac > sanitizedRange.lower*rangeFac) sanitizedRange.upper = -rangeFac; else sanitizedRange.upper = sanitizedRange.lower*rangeFac; } else { // positive is wider, do same as in case lower is 0 if (rangeFac < sanitizedRange.upper*rangeFac) sanitizedRange.lower = rangeFac; else sanitizedRange.lower = sanitizedRange.upper*rangeFac; } } // due to normalization, case lower>0 && upper<0 should never occur, because that implies upper -maxRange && upper < maxRange && qAbs(lower-upper) > minRange && qAbs(lower-upper) < maxRange && !(lower > 0 && qIsInf(upper/lower)) && !(upper < 0 && qIsInf(lower/upper))); } /*! \overload Checks, whether the specified range is within valid bounds, which are defined as QCPRange::maxRange and QCPRange::minRange. A valid range means: \li range bounds within -maxRange and maxRange \li range size above minRange \li range size below maxRange */ bool QCPRange::validRange(const QCPRange &range) { return (range.lower > -maxRange && range.upper < maxRange && qAbs(range.lower-range.upper) > minRange && qAbs(range.lower-range.upper) < maxRange && !(range.lower > 0 && qIsInf(range.upper/range.lower)) && !(range.upper < 0 && qIsInf(range.lower/range.upper))); } /* end of 'src/axis/range.cpp' */ /* including file 'src/selection.cpp', size 21906 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPDataRange //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPDataRange \brief Describes a data range given by begin and end index QCPDataRange holds two integers describing the begin (\ref setBegin) and end (\ref setEnd) index of a contiguous set of data points. The end index points to the data point above the last data point that's part of the data range, similarly to the nomenclature used in standard iterators. Data Ranges are not bound to a certain plottable, thus they can be freely exchanged, created and modified. If a non-contiguous data set shall be described, the class \ref QCPDataSelection is used, which holds and manages multiple instances of \ref QCPDataRange. In most situations, \ref QCPDataSelection is thus used. Both \ref QCPDataRange and \ref QCPDataSelection offer convenience methods to work with them, e.g. \ref bounded, \ref expanded, \ref intersects, \ref intersection, \ref adjusted, \ref contains. Further, addition and subtraction operators (defined in \ref QCPDataSelection) can be used to join/subtract data ranges and data selections (or mixtures), to retrieve a corresponding \ref QCPDataSelection. %QCustomPlot's \ref dataselection "data selection mechanism" is based on \ref QCPDataSelection and QCPDataRange. \note Do not confuse \ref QCPDataRange with \ref QCPRange. A \ref QCPRange describes an interval in floating point plot coordinates, e.g. the current axis range. */ /* start documentation of inline functions */ /*! \fn int QCPDataRange::size() const Returns the number of data points described by this data range. This is equal to the end index minus the begin index. \see length */ /*! \fn int QCPDataRange::length() const Returns the number of data points described by this data range. Equivalent to \ref size. */ /*! \fn void QCPDataRange::setBegin(int begin) Sets the begin of this data range. The \a begin index points to the first data point that is part of the data range. No checks or corrections are made to ensure the resulting range is valid (\ref isValid). \see setEnd */ /*! \fn void QCPDataRange::setEnd(int end) Sets the end of this data range. The \a end index points to the data point just above the last data point that is part of the data range. No checks or corrections are made to ensure the resulting range is valid (\ref isValid). \see setBegin */ /*! \fn bool QCPDataRange::isValid() const Returns whether this range is valid. A valid range has a begin index greater or equal to 0, and an end index greater or equal to the begin index. \note Invalid ranges should be avoided and are never the result of any of QCustomPlot's methods (unless they are themselves fed with invalid ranges). Do not pass invalid ranges to QCustomPlot's methods. The invalid range is not inherently prevented in QCPDataRange, to allow temporary invalid begin/end values while manipulating the range. An invalid range is not necessarily empty (\ref isEmpty), since its \ref length can be negative and thus non-zero. */ /*! \fn bool QCPDataRange::isEmpty() const Returns whether this range is empty, i.e. whether its begin index equals its end index. \see size, length */ /*! \fn QCPDataRange QCPDataRange::adjusted(int changeBegin, int changeEnd) const Returns a data range where \a changeBegin and \a changeEnd were added to the begin and end indices, respectively. */ /* end documentation of inline functions */ /*! Creates an empty QCPDataRange, with begin and end set to 0. */ QCPDataRange::QCPDataRange() : mBegin(0), mEnd(0) { } /*! Creates a QCPDataRange, initialized with the specified \a begin and \a end. No checks or corrections are made to ensure the resulting range is valid (\ref isValid). */ QCPDataRange::QCPDataRange(int begin, int end) : mBegin(begin), mEnd(end) { } /*! Returns a data range that matches this data range, except that parts exceeding \a other are excluded. This method is very similar to \ref intersection, with one distinction: If this range and the \a other range share no intersection, the returned data range will be empty with begin and end set to the respective boundary side of \a other, at which this range is residing. (\ref intersection would just return a range with begin and end set to 0.) */ QCPDataRange QCPDataRange::bounded(const QCPDataRange &other) const { QCPDataRange result(intersection(other)); if (result.isEmpty()) // no intersection, preserve respective bounding side of otherRange as both begin and end of return value { if (mEnd <= other.mBegin) result = QCPDataRange(other.mBegin, other.mBegin); else result = QCPDataRange(other.mEnd, other.mEnd); } return result; } /*! Returns a data range that contains both this data range as well as \a other. */ QCPDataRange QCPDataRange::expanded(const QCPDataRange &other) const { return QCPDataRange(qMin(mBegin, other.mBegin), qMax(mEnd, other.mEnd)); } /*! Returns the data range which is contained in both this data range and \a other. This method is very similar to \ref bounded, with one distinction: If this range and the \a other range share no intersection, the returned data range will be empty with begin and end set to 0. (\ref bounded would return a range with begin and end set to one of the boundaries of \a other, depending on which side this range is on.) \see QCPDataSelection::intersection */ QCPDataRange QCPDataRange::intersection(const QCPDataRange &other) const { QCPDataRange result(qMax(mBegin, other.mBegin), qMin(mEnd, other.mEnd)); if (result.isValid()) return result; else return QCPDataRange(); } /*! Returns whether this data range and \a other share common data points. \see intersection, contains */ bool QCPDataRange::intersects(const QCPDataRange &other) const { return !( (mBegin > other.mBegin && mBegin >= other.mEnd) || (mEnd <= other.mBegin && mEnd < other.mEnd) ); } /*! Returns whether all data points described by this data range are also in \a other. \see intersects */ bool QCPDataRange::contains(const QCPDataRange &other) const { return mBegin <= other.mBegin && mEnd >= other.mEnd; } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPDataSelection //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPDataSelection \brief Describes a data set by holding multiple QCPDataRange instances QCPDataSelection manages multiple instances of QCPDataRange in order to represent any (possibly disjoint) set of data selection. The data selection can be modified with addition and subtraction operators which take QCPDataSelection and QCPDataRange instances, as well as methods such as \ref addDataRange and \ref clear. Read access is provided by \ref dataRange, \ref dataRanges, \ref dataRangeCount, etc. The method \ref simplify is used to join directly adjacent or even overlapping QCPDataRange instances. QCPDataSelection automatically simplifies when using the addition/subtraction operators. The only case when \ref simplify is left to the user, is when calling \ref addDataRange, with the parameter \a simplify explicitly set to false. This is useful if many data ranges will be added to the selection successively and the overhead for simplifying after each iteration shall be avoided. In this case, you should make sure to call \ref simplify after completing the operation. Use \ref enforceType to bring the data selection into a state complying with the constraints for selections defined in \ref QCP::SelectionType. %QCustomPlot's \ref dataselection "data selection mechanism" is based on QCPDataSelection and QCPDataRange. \section qcpdataselection-iterating Iterating over a data selection As an example, the following code snippet calculates the average value of a graph's data \ref QCPAbstractPlottable::selection "selection": \snippet documentation/doc-code-snippets/mainwindow.cpp qcpdataselection-iterating-1 */ /* start documentation of inline functions */ /*! \fn int QCPDataSelection::dataRangeCount() const Returns the number of ranges that make up the data selection. The ranges can be accessed by \ref dataRange via their index. \see dataRange, dataPointCount */ /*! \fn QList QCPDataSelection::dataRanges() const Returns all data ranges that make up the data selection. If the data selection is simplified (the usual state of the selection, see \ref simplify), the ranges are sorted by ascending data point index. \see dataRange */ /*! \fn bool QCPDataSelection::isEmpty() const Returns true if there are no data ranges, and thus no data points, in this QCPDataSelection instance. \see dataRangeCount */ /* end documentation of inline functions */ /*! Creates an empty QCPDataSelection. */ QCPDataSelection::QCPDataSelection() { } /*! Creates a QCPDataSelection containing the provided \a range. */ QCPDataSelection::QCPDataSelection(const QCPDataRange &range) { mDataRanges.append(range); } /*! Returns true if this selection is identical (contains the same data ranges with the same begin and end indices) to \a other. Note that both data selections must be in simplified state (the usual state of the selection, see \ref simplify) for this operator to return correct results. */ bool QCPDataSelection::operator==(const QCPDataSelection &other) const { if (mDataRanges.size() != other.mDataRanges.size()) return false; for (int i=0; i= other.end()) break; // since data ranges are sorted after the simplify() call, no ranges which contain other will come after this if (thisEnd > other.begin()) // ranges which don't fulfill this are entirely before other and can be ignored { if (thisBegin >= other.begin()) // range leading segment is encompassed { if (thisEnd <= other.end()) // range fully encompassed, remove completely { mDataRanges.removeAt(i); continue; } else // only leading segment is encompassed, trim accordingly mDataRanges[i].setBegin(other.end()); } else // leading segment is not encompassed { if (thisEnd <= other.end()) // only trailing segment is encompassed, trim accordingly { mDataRanges[i].setEnd(other.begin()); } else // other lies inside this range, so split range { mDataRanges[i].setEnd(other.begin()); mDataRanges.insert(i+1, QCPDataRange(other.end(), thisEnd)); break; // since data ranges are sorted (and don't overlap) after simplify() call, we're done here } } } ++i; } return *this; } /*! Returns the total number of data points contained in all data ranges that make up this data selection. */ int QCPDataSelection::dataPointCount() const { int result = 0; for (int i=0; i= 0 && index < mDataRanges.size()) { return mDataRanges.at(index); } else { qDebug() << Q_FUNC_INFO << "index out of range:" << index; return QCPDataRange(); } } /*! Returns a \ref QCPDataRange which spans the entire data selection, including possible intermediate segments which are not part of the original data selection. */ QCPDataRange QCPDataSelection::span() const { if (isEmpty()) return QCPDataRange(); else return QCPDataRange(mDataRanges.first().begin(), mDataRanges.last().end()); } /*! Adds the given \a dataRange to this data selection. This is equivalent to the += operator but allows disabling immediate simplification by setting \a simplify to false. This can improve performance if adding a very large amount of data ranges successively. In this case, make sure to call \ref simplify manually, after the operation. */ void QCPDataSelection::addDataRange(const QCPDataRange &dataRange, bool simplify) { mDataRanges.append(dataRange); if (simplify) this->simplify(); } /*! Removes all data ranges. The data selection then contains no data points. \ref isEmpty */ void QCPDataSelection::clear() { mDataRanges.clear(); } /*! Sorts all data ranges by range begin index in ascending order, and then joins directly adjacent or overlapping ranges. This can reduce the number of individual data ranges in the selection, and prevents possible double-counting when iterating over the data points held by the data ranges. This method is automatically called when using the addition/subtraction operators. The only case when \ref simplify is left to the user, is when calling \ref addDataRange, with the parameter \a simplify explicitly set to false. */ void QCPDataSelection::simplify() { // remove any empty ranges: for (int i=mDataRanges.size()-1; i>=0; --i) { if (mDataRanges.at(i).isEmpty()) mDataRanges.removeAt(i); } if (mDataRanges.isEmpty()) return; // sort ranges by starting value, ascending: std::sort(mDataRanges.begin(), mDataRanges.end(), lessThanDataRangeBegin); // join overlapping/contiguous ranges: int i = 1; while (i < mDataRanges.size()) { if (mDataRanges.at(i-1).end() >= mDataRanges.at(i).begin()) // range i overlaps/joins with i-1, so expand range i-1 appropriately and remove range i from list { mDataRanges[i-1].setEnd(qMax(mDataRanges.at(i-1).end(), mDataRanges.at(i).end())); mDataRanges.removeAt(i); } else ++i; } } /*! Makes sure this data selection conforms to the specified \a type selection type. Before the type is enforced, \ref simplify is called. Depending on \a type, enforcing means adding new data points that were previously not part of the selection, or removing data points from the selection. If the current selection already conforms to \a type, the data selection is not changed. \see QCP::SelectionType */ void QCPDataSelection::enforceType(QCP::SelectionType type) { simplify(); switch (type) { case QCP::stNone: { mDataRanges.clear(); break; } case QCP::stWhole: { // whole selection isn't defined by data range, so don't change anything (is handled in plottable methods) break; } case QCP::stSingleData: { // reduce all data ranges to the single first data point: if (!mDataRanges.isEmpty()) { if (mDataRanges.size() > 1) mDataRanges = QList() << mDataRanges.first(); if (mDataRanges.first().length() > 1) mDataRanges.first().setEnd(mDataRanges.first().begin()+1); } break; } case QCP::stDataRange: { mDataRanges = QList() << span(); break; } case QCP::stMultipleDataRanges: { // this is the selection type that allows all concievable combinations of ranges, so do nothing break; } } } /*! Returns true if the data selection \a other is contained entirely in this data selection, i.e. all data point indices that are in \a other are also in this data selection. \see QCPDataRange::contains */ bool QCPDataSelection::contains(const QCPDataSelection &other) const { if (other.isEmpty()) return false; int otherIndex = 0; int thisIndex = 0; while (thisIndex < mDataRanges.size() && otherIndex < other.mDataRanges.size()) { if (mDataRanges.at(thisIndex).contains(other.mDataRanges.at(otherIndex))) ++otherIndex; else ++thisIndex; } return thisIndex < mDataRanges.size(); // if thisIndex ran all the way to the end to find a containing range for the current otherIndex, other is not contained in this } /*! Returns a data selection containing the points which are both in this data selection and in the data range \a other. A common use case is to limit an unknown data selection to the valid range of a data container, using \ref QCPDataContainer::dataRange as \a other. One can then safely iterate over the returned data selection without exceeding the data container's bounds. */ QCPDataSelection QCPDataSelection::intersection(const QCPDataRange &other) const { QCPDataSelection result; for (int i=0; iorientation() == Qt::Horizontal) return QCPRange(axis->pixelToCoord(mRect.left()), axis->pixelToCoord(mRect.left()+mRect.width())); else return QCPRange(axis->pixelToCoord(mRect.top()+mRect.height()), axis->pixelToCoord(mRect.top())); } else { qDebug() << Q_FUNC_INFO << "called with axis zero"; return QCPRange(); } } /*! Sets the pen that will be used to draw the selection rect outline. \see setBrush */ void QCPSelectionRect::setPen(const QPen &pen) { mPen = pen; } /*! Sets the brush that will be used to fill the selection rect. By default the selection rect is not filled, i.e. \a brush is Qt::NoBrush. \see setPen */ void QCPSelectionRect::setBrush(const QBrush &brush) { mBrush = brush; } /*! If there is currently a selection interaction going on (\ref isActive), the interaction is canceled. The selection rect will emit the \ref canceled signal. */ void QCPSelectionRect::cancel() { if (mActive) { mActive = false; emit canceled(mRect, 0); } } /*! \internal This method is called by QCustomPlot to indicate that a selection rect interaction was initiated. The default implementation sets the selection rect to active, initializes the selection rect geometry and emits the \ref started signal. */ void QCPSelectionRect::startSelection(QMouseEvent *event) { mActive = true; mRect = QRect(event->pos(), event->pos()); emit started(event); } /*! \internal This method is called by QCustomPlot to indicate that an ongoing selection rect interaction needs to update its geometry. The default implementation updates the rect and emits the \ref changed signal. */ void QCPSelectionRect::moveSelection(QMouseEvent *event) { mRect.setBottomRight(event->pos()); emit changed(mRect, event); layer()->replot(); } /*! \internal This method is called by QCustomPlot to indicate that an ongoing selection rect interaction has finished by the user releasing the mouse button. The default implementation deactivates the selection rect and emits the \ref accepted signal. */ void QCPSelectionRect::endSelection(QMouseEvent *event) { mRect.setBottomRight(event->pos()); mActive = false; emit accepted(mRect, event); } /*! \internal This method is called by QCustomPlot when a key has been pressed by the user while the selection rect interaction is active. The default implementation allows to \ref cancel the interaction by hitting the escape key. */ void QCPSelectionRect::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape && mActive) { mActive = false; emit canceled(mRect, event); } } /* inherits documentation from base class */ void QCPSelectionRect::applyDefaultAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiased, QCP::aeOther); } /*! \internal If the selection rect is active (\ref isActive), draws the selection rect defined by \a mRect. \seebaseclassmethod */ void QCPSelectionRect::draw(QCPPainter *painter) { if (mActive) { painter->setPen(mPen); painter->setBrush(mBrush); painter->drawRect(mRect); } } /* end of 'src/selectionrect.cpp' */ /* including file 'src/layout.cpp', size 79064 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPMarginGroup //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPMarginGroup \brief A margin group allows synchronization of margin sides if working with multiple layout elements. QCPMarginGroup allows you to tie a margin side of two or more layout elements together, such that they will all have the same size, based on the largest required margin in the group. \n \image html QCPMarginGroup.png "Demonstration of QCPMarginGroup" \n In certain situations it is desirable that margins at specific sides are synchronized across layout elements. For example, if one QCPAxisRect is below another one in a grid layout, it will provide a cleaner look to the user if the left and right margins of the two axis rects are of the same size. The left axis of the top axis rect will then be at the same horizontal position as the left axis of the lower axis rect, making them appear aligned. The same applies for the right axes. This is what QCPMarginGroup makes possible. To add/remove a specific side of a layout element to/from a margin group, use the \ref QCPLayoutElement::setMarginGroup method. To completely break apart the margin group, either call \ref clear, or just delete the margin group. \section QCPMarginGroup-example Example First create a margin group: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpmargingroup-creation-1 Then set this group on the layout element sides: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpmargingroup-creation-2 Here, we've used the first two axis rects of the plot and synchronized their left margins with each other and their right margins with each other. */ /* start documentation of inline functions */ /*! \fn QList QCPMarginGroup::elements(QCP::MarginSide side) const Returns a list of all layout elements that have their margin \a side associated with this margin group. */ /* end documentation of inline functions */ /*! Creates a new QCPMarginGroup instance in \a parentPlot. */ QCPMarginGroup::QCPMarginGroup(QCustomPlot *parentPlot) : QObject(parentPlot), mParentPlot(parentPlot) { mChildren.insert(QCP::msLeft, QList()); mChildren.insert(QCP::msRight, QList()); mChildren.insert(QCP::msTop, QList()); mChildren.insert(QCP::msBottom, QList()); } QCPMarginGroup::~QCPMarginGroup() { clear(); } /*! Returns whether this margin group is empty. If this function returns true, no layout elements use this margin group to synchronize margin sides. */ bool QCPMarginGroup::isEmpty() const { QHashIterator > it(mChildren); while (it.hasNext()) { it.next(); if (!it.value().isEmpty()) return false; } return true; } /*! Clears this margin group. The synchronization of the margin sides that use this margin group is lifted and they will use their individual margin sizes again. */ void QCPMarginGroup::clear() { // make all children remove themselves from this margin group: QHashIterator > it(mChildren); while (it.hasNext()) { it.next(); const QList elements = it.value(); for (int i=elements.size()-1; i>=0; --i) elements.at(i)->setMarginGroup(it.key(), 0); // removes itself from mChildren via removeChild } } /*! \internal Returns the synchronized common margin for \a side. This is the margin value that will be used by the layout element on the respective side, if it is part of this margin group. The common margin is calculated by requesting the automatic margin (\ref QCPLayoutElement::calculateAutoMargin) of each element associated with \a side in this margin group, and choosing the largest returned value. (QCPLayoutElement::minimumMargins is taken into account, too.) */ int QCPMarginGroup::commonMargin(QCP::MarginSide side) const { // query all automatic margins of the layout elements in this margin group side and find maximum: int result = 0; const QList elements = mChildren.value(side); for (int i=0; iautoMargins().testFlag(side)) continue; int m = qMax(elements.at(i)->calculateAutoMargin(side), QCP::getMarginValue(elements.at(i)->minimumMargins(), side)); if (m > result) result = m; } return result; } /*! \internal Adds \a element to the internal list of child elements, for the margin \a side. This function does not modify the margin group property of \a element. */ void QCPMarginGroup::addChild(QCP::MarginSide side, QCPLayoutElement *element) { if (!mChildren[side].contains(element)) mChildren[side].append(element); else qDebug() << Q_FUNC_INFO << "element is already child of this margin group side" << reinterpret_cast(element); } /*! \internal Removes \a element from the internal list of child elements, for the margin \a side. This function does not modify the margin group property of \a element. */ void QCPMarginGroup::removeChild(QCP::MarginSide side, QCPLayoutElement *element) { if (!mChildren[side].removeOne(element)) qDebug() << Q_FUNC_INFO << "element is not child of this margin group side" << reinterpret_cast(element); } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLayoutElement //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPLayoutElement \brief The abstract base class for all objects that form \ref thelayoutsystem "the layout system". This is an abstract base class. As such, it can't be instantiated directly, rather use one of its subclasses. A Layout element is a rectangular object which can be placed in layouts. It has an outer rect (QCPLayoutElement::outerRect) and an inner rect (\ref QCPLayoutElement::rect). The difference between outer and inner rect is called its margin. The margin can either be set to automatic or manual (\ref setAutoMargins) on a per-side basis. If a side is set to manual, that margin can be set explicitly with \ref setMargins and will stay fixed at that value. If it's set to automatic, the layout element subclass will control the value itself (via \ref calculateAutoMargin). Layout elements can be placed in layouts (base class QCPLayout) like QCPLayoutGrid. The top level layout is reachable via \ref QCustomPlot::plotLayout, and is a \ref QCPLayoutGrid. Since \ref QCPLayout itself derives from \ref QCPLayoutElement, layouts can be nested. Thus in QCustomPlot one can divide layout elements into two categories: The ones that are invisible by themselves, because they don't draw anything. Their only purpose is to manage the position and size of other layout elements. This category of layout elements usually use QCPLayout as base class. Then there is the category of layout elements which actually draw something. For example, QCPAxisRect, QCPLegend and QCPTextElement are of this category. This does not necessarily mean that the latter category can't have child layout elements. QCPLegend for instance, actually derives from QCPLayoutGrid and the individual legend items are child layout elements in the grid layout. */ /* start documentation of inline functions */ /*! \fn QCPLayout *QCPLayoutElement::layout() const Returns the parent layout of this layout element. */ /*! \fn QRect QCPLayoutElement::rect() const Returns the inner rect of this layout element. The inner rect is the outer rect (\ref outerRect, \ref setOuterRect) shrinked by the margins (\ref setMargins, \ref setAutoMargins). In some cases, the area between outer and inner rect is left blank. In other cases the margin area is used to display peripheral graphics while the main content is in the inner rect. This is where automatic margin calculation becomes interesting because it allows the layout element to adapt the margins to the peripheral graphics it wants to draw. For example, \ref QCPAxisRect draws the axis labels and tick labels in the margin area, thus needs to adjust the margins (if \ref setAutoMargins is enabled) according to the space required by the labels of the axes. \see outerRect */ /*! \fn QRect QCPLayoutElement::outerRect() const Returns the outer rect of this layout element. The outer rect is the inner rect expanded by the margins (\ref setMargins, \ref setAutoMargins). The outer rect is used (and set via \ref setOuterRect) by the parent \ref QCPLayout to control the size of this layout element. \see rect */ /* end documentation of inline functions */ /*! Creates an instance of QCPLayoutElement and sets default values. */ QCPLayoutElement::QCPLayoutElement(QCustomPlot *parentPlot) : QCPLayerable(parentPlot), // parenthood is changed as soon as layout element gets inserted into a layout (except for top level layout) mParentLayout(0), mMinimumSize(), mMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX), mSizeConstraintRect(scrInnerRect), mRect(0, 0, 0, 0), mOuterRect(0, 0, 0, 0), mMargins(0, 0, 0, 0), mMinimumMargins(0, 0, 0, 0), mAutoMargins(QCP::msAll) { } QCPLayoutElement::~QCPLayoutElement() { setMarginGroup(QCP::msAll, 0); // unregister at margin groups, if there are any // unregister at layout: if (qobject_cast(mParentLayout)) // the qobject_cast is just a safeguard in case the layout forgets to call clear() in its dtor and this dtor is called by QObject dtor mParentLayout->take(this); } /*! Sets the outer rect of this layout element. If the layout element is inside a layout, the layout sets the position and size of this layout element using this function. Calling this function externally has no effect, since the layout will overwrite any changes to the outer rect upon the next replot. The layout element will adapt its inner \ref rect by applying the margins inward to the outer rect. \see rect */ void QCPLayoutElement::setOuterRect(const QRect &rect) { if (mOuterRect != rect) { mOuterRect = rect; mRect = mOuterRect.adjusted(mMargins.left(), mMargins.top(), -mMargins.right(), -mMargins.bottom()); } } /*! Sets the margins of this layout element. If \ref setAutoMargins is disabled for some or all sides, this function is used to manually set the margin on those sides. Sides that are still set to be handled automatically are ignored and may have any value in \a margins. The margin is the distance between the outer rect (controlled by the parent layout via \ref setOuterRect) and the inner \ref rect (which usually contains the main content of this layout element). \see setAutoMargins */ void QCPLayoutElement::setMargins(const QMargins &margins) { if (mMargins != margins) { mMargins = margins; mRect = mOuterRect.adjusted(mMargins.left(), mMargins.top(), -mMargins.right(), -mMargins.bottom()); } } /*! If \ref setAutoMargins is enabled on some or all margins, this function is used to provide minimum values for those margins. The minimum values are not enforced on margin sides that were set to be under manual control via \ref setAutoMargins. \see setAutoMargins */ void QCPLayoutElement::setMinimumMargins(const QMargins &margins) { if (mMinimumMargins != margins) { mMinimumMargins = margins; } } /*! Sets on which sides the margin shall be calculated automatically. If a side is calculated automatically, a minimum margin value may be provided with \ref setMinimumMargins. If a side is set to be controlled manually, the value may be specified with \ref setMargins. Margin sides that are under automatic control may participate in a \ref QCPMarginGroup (see \ref setMarginGroup), to synchronize (align) it with other layout elements in the plot. \see setMinimumMargins, setMargins, QCP::MarginSide */ void QCPLayoutElement::setAutoMargins(QCP::MarginSides sides) { mAutoMargins = sides; } /*! Sets the minimum size of this layout element. A parent layout tries to respect the \a size here by changing row/column sizes in the layout accordingly. If the parent layout size is not sufficient to satisfy all minimum size constraints of its child layout elements, the layout may set a size that is actually smaller than \a size. QCustomPlot propagates the layout's size constraints to the outside by setting its own minimum QWidget size accordingly, so violations of \a size should be exceptions. Whether this constraint applies to the inner or the outer rect can be specified with \ref setSizeConstraintRect (see \ref rect and \ref outerRect). */ void QCPLayoutElement::setMinimumSize(const QSize &size) { if (mMinimumSize != size) { mMinimumSize = size; if (mParentLayout) mParentLayout->sizeConstraintsChanged(); } } /*! \overload Sets the minimum size of this layout element. Whether this constraint applies to the inner or the outer rect can be specified with \ref setSizeConstraintRect (see \ref rect and \ref outerRect). */ void QCPLayoutElement::setMinimumSize(int width, int height) { setMinimumSize(QSize(width, height)); } /*! Sets the maximum size of this layout element. A parent layout tries to respect the \a size here by changing row/column sizes in the layout accordingly. Whether this constraint applies to the inner or the outer rect can be specified with \ref setSizeConstraintRect (see \ref rect and \ref outerRect). */ void QCPLayoutElement::setMaximumSize(const QSize &size) { if (mMaximumSize != size) { mMaximumSize = size; if (mParentLayout) mParentLayout->sizeConstraintsChanged(); } } /*! \overload Sets the maximum size of this layout element. Whether this constraint applies to the inner or the outer rect can be specified with \ref setSizeConstraintRect (see \ref rect and \ref outerRect). */ void QCPLayoutElement::setMaximumSize(int width, int height) { setMaximumSize(QSize(width, height)); } /*! Sets to which rect of a layout element the size constraints apply. Size constraints can be set via \ref setMinimumSize and \ref setMaximumSize. The outer rect (\ref outerRect) includes the margins (e.g. in the case of a QCPAxisRect the axis labels), whereas the inner rect (\ref rect) does not. \see setMinimumSize, setMaximumSize */ void QCPLayoutElement::setSizeConstraintRect(SizeConstraintRect constraintRect) { if (mSizeConstraintRect != constraintRect) { mSizeConstraintRect = constraintRect; if (mParentLayout) mParentLayout->sizeConstraintsChanged(); } } /*! Sets the margin \a group of the specified margin \a sides. Margin groups allow synchronizing specified margins across layout elements, see the documentation of \ref QCPMarginGroup. To unset the margin group of \a sides, set \a group to 0. Note that margin groups only work for margin sides that are set to automatic (\ref setAutoMargins). \see QCP::MarginSide */ void QCPLayoutElement::setMarginGroup(QCP::MarginSides sides, QCPMarginGroup *group) { QVector sideVector; if (sides.testFlag(QCP::msLeft)) sideVector.append(QCP::msLeft); if (sides.testFlag(QCP::msRight)) sideVector.append(QCP::msRight); if (sides.testFlag(QCP::msTop)) sideVector.append(QCP::msTop); if (sides.testFlag(QCP::msBottom)) sideVector.append(QCP::msBottom); for (int i=0; iremoveChild(side, this); if (!group) // if setting to 0, remove hash entry. Else set hash entry to new group and register there { mMarginGroups.remove(side); } else // setting to a new group { mMarginGroups[side] = group; group->addChild(side, this); } } } } /*! Updates the layout element and sub-elements. This function is automatically called before every replot by the parent layout element. It is called multiple times, once for every \ref UpdatePhase. The phases are run through in the order of the enum values. For details about what happens at the different phases, see the documentation of \ref UpdatePhase. Layout elements that have child elements should call the \ref update method of their child elements, and pass the current \a phase unchanged. The default implementation executes the automatic margin mechanism in the \ref upMargins phase. Subclasses should make sure to call the base class implementation. */ void QCPLayoutElement::update(UpdatePhase phase) { if (phase == upMargins) { if (mAutoMargins != QCP::msNone) { // set the margins of this layout element according to automatic margin calculation, either directly or via a margin group: QMargins newMargins = mMargins; QList allMarginSides = QList() << QCP::msLeft << QCP::msRight << QCP::msTop << QCP::msBottom; foreach (QCP::MarginSide side, allMarginSides) { if (mAutoMargins.testFlag(side)) // this side's margin shall be calculated automatically { if (mMarginGroups.contains(side)) QCP::setMarginValue(newMargins, side, mMarginGroups[side]->commonMargin(side)); // this side is part of a margin group, so get the margin value from that group else QCP::setMarginValue(newMargins, side, calculateAutoMargin(side)); // this side is not part of a group, so calculate the value directly // apply minimum margin restrictions: if (QCP::getMarginValue(newMargins, side) < QCP::getMarginValue(mMinimumMargins, side)) QCP::setMarginValue(newMargins, side, QCP::getMarginValue(mMinimumMargins, side)); } } setMargins(newMargins); } } } /*! Returns the suggested minimum size this layout element (the \ref outerRect) may be compressed to, if no manual minimum size is set. if a minimum size (\ref setMinimumSize) was not set manually, parent layouts use the returned size (usually indirectly through \ref QCPLayout::getFinalMinimumOuterSize) to determine the minimum allowed size of this layout element. A manual minimum size is considered set if it is non-zero. The default implementation simply returns the sum of the horizontal margins for the width and the sum of the vertical margins for the height. Reimplementations may use their detailed knowledge about the layout element's content to provide size hints. */ QSize QCPLayoutElement::minimumOuterSizeHint() const { return QSize(mMargins.left()+mMargins.right(), mMargins.top()+mMargins.bottom()); } /*! Returns the suggested maximum size this layout element (the \ref outerRect) may be expanded to, if no manual maximum size is set. if a maximum size (\ref setMaximumSize) was not set manually, parent layouts use the returned size (usually indirectly through \ref QCPLayout::getFinalMaximumOuterSize) to determine the maximum allowed size of this layout element. A manual maximum size is considered set if it is smaller than Qt's \c QWIDGETSIZE_MAX. The default implementation simply returns \c QWIDGETSIZE_MAX for both width and height, implying no suggested maximum size. Reimplementations may use their detailed knowledge about the layout element's content to provide size hints. */ QSize QCPLayoutElement::maximumOuterSizeHint() const { return QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); } /*! Returns a list of all child elements in this layout element. If \a recursive is true, all sub-child elements are included in the list, too. \warning There may be entries with value 0 in the returned list. (For example, QCPLayoutGrid may have empty cells which yield 0 at the respective index.) */ QList QCPLayoutElement::elements(bool recursive) const { Q_UNUSED(recursive) return QList(); } /*! Layout elements are sensitive to events inside their outer rect. If \a pos is within the outer rect, this method returns a value corresponding to 0.99 times the parent plot's selection tolerance. However, layout elements are not selectable by default. So if \a onlySelectable is true, -1.0 is returned. See \ref QCPLayerable::selectTest for a general explanation of this virtual method. QCPLayoutElement subclasses may reimplement this method to provide more specific selection test behaviour. */ double QCPLayoutElement::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable) return -1; if (QRectF(mOuterRect).contains(pos)) { if (mParentPlot) return mParentPlot->selectionTolerance()*0.99; else { qDebug() << Q_FUNC_INFO << "parent plot not defined"; return -1; } } else return -1; } /*! \internal propagates the parent plot initialization to all child elements, by calling \ref QCPLayerable::initializeParentPlot on them. */ void QCPLayoutElement::parentPlotInitialized(QCustomPlot *parentPlot) { foreach (QCPLayoutElement* el, elements(false)) { if (!el->parentPlot()) el->initializeParentPlot(parentPlot); } } /*! \internal Returns the margin size for this \a side. It is used if automatic margins is enabled for this \a side (see \ref setAutoMargins). If a minimum margin was set with \ref setMinimumMargins, the returned value will not be smaller than the specified minimum margin. The default implementation just returns the respective manual margin (\ref setMargins) or the minimum margin, whichever is larger. */ int QCPLayoutElement::calculateAutoMargin(QCP::MarginSide side) { return qMax(QCP::getMarginValue(mMargins, side), QCP::getMarginValue(mMinimumMargins, side)); } /*! \internal This virtual method is called when this layout element was moved to a different QCPLayout, or when this layout element has changed its logical position (e.g. row and/or column) within the same QCPLayout. Subclasses may use this to react accordingly. Since this method is called after the completion of the move, you can access the new parent layout via \ref layout(). The default implementation does nothing. */ void QCPLayoutElement::layoutChanged() { } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLayout //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPLayout \brief The abstract base class for layouts This is an abstract base class for layout elements whose main purpose is to define the position and size of other child layout elements. In most cases, layouts don't draw anything themselves (but there are exceptions to this, e.g. QCPLegend). QCPLayout derives from QCPLayoutElement, and thus can itself be nested in other layouts. QCPLayout introduces a common interface for accessing and manipulating the child elements. Those functions are most notably \ref elementCount, \ref elementAt, \ref takeAt, \ref take, \ref simplify, \ref removeAt, \ref remove and \ref clear. Individual subclasses may add more functions to this interface which are more specialized to the form of the layout. For example, \ref QCPLayoutGrid adds functions that take row and column indices to access cells of the layout grid more conveniently. Since this is an abstract base class, you can't instantiate it directly. Rather use one of its subclasses like QCPLayoutGrid or QCPLayoutInset. For a general introduction to the layout system, see the dedicated documentation page \ref thelayoutsystem "The Layout System". */ /* start documentation of pure virtual functions */ /*! \fn virtual int QCPLayout::elementCount() const = 0 Returns the number of elements/cells in the layout. \see elements, elementAt */ /*! \fn virtual QCPLayoutElement* QCPLayout::elementAt(int index) const = 0 Returns the element in the cell with the given \a index. If \a index is invalid, returns 0. Note that even if \a index is valid, the respective cell may be empty in some layouts (e.g. QCPLayoutGrid), so this function may return 0 in those cases. You may use this function to check whether a cell is empty or not. \see elements, elementCount, takeAt */ /*! \fn virtual QCPLayoutElement* QCPLayout::takeAt(int index) = 0 Removes the element with the given \a index from the layout and returns it. If the \a index is invalid or the cell with that index is empty, returns 0. Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use \ref simplify. \see elementAt, take */ /*! \fn virtual bool QCPLayout::take(QCPLayoutElement* element) = 0 Removes the specified \a element from the layout and returns true on success. If the \a element isn't in this layout, returns false. Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use \ref simplify. \see takeAt */ /* end documentation of pure virtual functions */ /*! Creates an instance of QCPLayout and sets default values. Note that since QCPLayout is an abstract base class, it can't be instantiated directly. */ QCPLayout::QCPLayout() { } /*! If \a phase is \ref upLayout, calls \ref updateLayout, which subclasses may reimplement to reposition and resize their cells. Finally, the call is propagated down to all child \ref QCPLayoutElement "QCPLayoutElements". For details about this method and the update phases, see the documentation of \ref QCPLayoutElement::update. */ void QCPLayout::update(UpdatePhase phase) { QCPLayoutElement::update(phase); // set child element rects according to layout: if (phase == upLayout) updateLayout(); // propagate update call to child elements: const int elCount = elementCount(); for (int i=0; iupdate(phase); } } /* inherits documentation from base class */ QList QCPLayout::elements(bool recursive) const { const int c = elementCount(); QList result; #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) result.reserve(c); #endif for (int i=0; ielements(recursive); } } return result; } /*! Simplifies the layout by collapsing empty cells. The exact behavior depends on subclasses, the default implementation does nothing. Not all layouts need simplification. For example, QCPLayoutInset doesn't use explicit simplification while QCPLayoutGrid does. */ void QCPLayout::simplify() { } /*! Removes and deletes the element at the provided \a index. Returns true on success. If \a index is invalid or points to an empty cell, returns false. This function internally uses \ref takeAt to remove the element from the layout and then deletes the returned element. Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use \ref simplify. \see remove, takeAt */ bool QCPLayout::removeAt(int index) { if (QCPLayoutElement *el = takeAt(index)) { delete el; return true; } else return false; } /*! Removes and deletes the provided \a element. Returns true on success. If \a element is not in the layout, returns false. This function internally uses \ref takeAt to remove the element from the layout and then deletes the element. Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use \ref simplify. \see removeAt, take */ bool QCPLayout::remove(QCPLayoutElement *element) { if (take(element)) { delete element; return true; } else return false; } /*! Removes and deletes all layout elements in this layout. Finally calls \ref simplify to make sure all empty cells are collapsed. \see remove, removeAt */ void QCPLayout::clear() { for (int i=elementCount()-1; i>=0; --i) { if (elementAt(i)) removeAt(i); } simplify(); } /*! Subclasses call this method to report changed (minimum/maximum) size constraints. If the parent of this layout is again a QCPLayout, forwards the call to the parent's \ref sizeConstraintsChanged. If the parent is a QWidget (i.e. is the \ref QCustomPlot::plotLayout of QCustomPlot), calls QWidget::updateGeometry, so if the QCustomPlot widget is inside a Qt QLayout, it may update itself and resize cells accordingly. */ void QCPLayout::sizeConstraintsChanged() const { if (QWidget *w = qobject_cast(parent())) w->updateGeometry(); else if (QCPLayout *l = qobject_cast(parent())) l->sizeConstraintsChanged(); } /*! \internal Subclasses reimplement this method to update the position and sizes of the child elements/cells via calling their \ref QCPLayoutElement::setOuterRect. The default implementation does nothing. The geometry used as a reference is the inner \ref rect of this layout. Child elements should stay within that rect. \ref getSectionSizes may help with the reimplementation of this function. \see update */ void QCPLayout::updateLayout() { } /*! \internal Associates \a el with this layout. This is done by setting the \ref QCPLayoutElement::layout, the \ref QCPLayerable::parentLayerable and the QObject parent to this layout. Further, if \a el didn't previously have a parent plot, calls \ref QCPLayerable::initializeParentPlot on \a el to set the paret plot. This method is used by subclass specific methods that add elements to the layout. Note that this method only changes properties in \a el. The removal from the old layout and the insertion into the new layout must be done additionally. */ void QCPLayout::adoptElement(QCPLayoutElement *el) { if (el) { el->mParentLayout = this; el->setParentLayerable(this); el->setParent(this); if (!el->parentPlot()) el->initializeParentPlot(mParentPlot); el->layoutChanged(); } else qDebug() << Q_FUNC_INFO << "Null element passed"; } /*! \internal Disassociates \a el from this layout. This is done by setting the \ref QCPLayoutElement::layout and the \ref QCPLayerable::parentLayerable to zero. The QObject parent is set to the parent QCustomPlot. This method is used by subclass specific methods that remove elements from the layout (e.g. \ref take or \ref takeAt). Note that this method only changes properties in \a el. The removal from the old layout must be done additionally. */ void QCPLayout::releaseElement(QCPLayoutElement *el) { if (el) { el->mParentLayout = 0; el->setParentLayerable(0); el->setParent(mParentPlot); // Note: Don't initializeParentPlot(0) here, because layout element will stay in same parent plot } else qDebug() << Q_FUNC_INFO << "Null element passed"; } /*! \internal This is a helper function for the implementation of \ref updateLayout in subclasses. It calculates the sizes of one-dimensional sections with provided constraints on maximum section sizes, minimum section sizes, relative stretch factors and the final total size of all sections. The QVector entries refer to the sections. Thus all QVectors must have the same size. \a maxSizes gives the maximum allowed size of each section. If there shall be no maximum size imposed, set all vector values to Qt's QWIDGETSIZE_MAX. \a minSizes gives the minimum allowed size of each section. If there shall be no minimum size imposed, set all vector values to zero. If the \a minSizes entries add up to a value greater than \a totalSize, sections will be scaled smaller than the proposed minimum sizes. (In other words, not exceeding the allowed total size is taken to be more important than not going below minimum section sizes.) \a stretchFactors give the relative proportions of the sections to each other. If all sections shall be scaled equally, set all values equal. If the first section shall be double the size of each individual other section, set the first number of \a stretchFactors to double the value of the other individual values (e.g. {2, 1, 1, 1}). \a totalSize is the value that the final section sizes will add up to. Due to rounding, the actual sum may differ slightly. If you want the section sizes to sum up to exactly that value, you could distribute the remaining difference on the sections. The return value is a QVector containing the section sizes. */ QVector QCPLayout::getSectionSizes(QVector maxSizes, QVector minSizes, QVector stretchFactors, int totalSize) const { if (maxSizes.size() != minSizes.size() || minSizes.size() != stretchFactors.size()) { qDebug() << Q_FUNC_INFO << "Passed vector sizes aren't equal:" << maxSizes << minSizes << stretchFactors; return QVector(); } if (stretchFactors.isEmpty()) return QVector(); int sectionCount = stretchFactors.size(); QVector sectionSizes(sectionCount); // if provided total size is forced smaller than total minimum size, ignore minimum sizes (squeeze sections): int minSizeSum = 0; for (int i=0; i minimumLockedSections; QList unfinishedSections; for (int i=0; i result(sectionCount); for (int i=0; iminimumOuterSizeHint(); QSize minOuter = el->minimumSize(); // depending on sizeConstraitRect this might be with respect to inner rect, so possibly add margins in next four lines (preserving unset minimum of 0) if (minOuter.width() > 0 && el->sizeConstraintRect() == QCPLayoutElement::scrInnerRect) minOuter.rwidth() += el->margins().left() + el->margins().right(); if (minOuter.height() > 0 && el->sizeConstraintRect() == QCPLayoutElement::scrInnerRect) minOuter.rheight() += el->margins().top() + el->margins().bottom(); return QSize(minOuter.width() > 0 ? minOuter.width() : minOuterHint.width(), minOuter.height() > 0 ? minOuter.height() : minOuterHint.height());; } /*! \internal This is a helper function for the implementation of subclasses. It returns the maximum size that should finally be used for the outer rect of the passed layout element \a el. It takes into account whether a manual maximum size is set (\ref QCPLayoutElement::setMaximumSize), which size constraint is set (\ref QCPLayoutElement::setSizeConstraintRect), as well as the maximum size hint, if no manual maximum size was set (\ref QCPLayoutElement::maximumOuterSizeHint). */ QSize QCPLayout::getFinalMaximumOuterSize(const QCPLayoutElement *el) { QSize maxOuterHint = el->maximumOuterSizeHint(); QSize maxOuter = el->maximumSize(); // depending on sizeConstraitRect this might be with respect to inner rect, so possibly add margins in next four lines (preserving unset maximum of QWIDGETSIZE_MAX) if (maxOuter.width() < QWIDGETSIZE_MAX && el->sizeConstraintRect() == QCPLayoutElement::scrInnerRect) maxOuter.rwidth() += el->margins().left() + el->margins().right(); if (maxOuter.height() < QWIDGETSIZE_MAX && el->sizeConstraintRect() == QCPLayoutElement::scrInnerRect) maxOuter.rheight() += el->margins().top() + el->margins().bottom(); return QSize(maxOuter.width() < QWIDGETSIZE_MAX ? maxOuter.width() : maxOuterHint.width(), maxOuter.height() < QWIDGETSIZE_MAX ? maxOuter.height() : maxOuterHint.height()); } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLayoutGrid //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPLayoutGrid \brief A layout that arranges child elements in a grid Elements are laid out in a grid with configurable stretch factors (\ref setColumnStretchFactor, \ref setRowStretchFactor) and spacing (\ref setColumnSpacing, \ref setRowSpacing). Elements can be added to cells via \ref addElement. The grid is expanded if the specified row or column doesn't exist yet. Whether a cell contains a valid layout element can be checked with \ref hasElement, that element can be retrieved with \ref element. If rows and columns that only have empty cells shall be removed, call \ref simplify. Removal of elements is either done by just adding the element to a different layout or by using the QCPLayout interface \ref take or \ref remove. If you use \ref addElement(QCPLayoutElement*) without explicit parameters for \a row and \a column, the grid layout will choose the position according to the current \ref setFillOrder and the wrapping (\ref setWrap). Row and column insertion can be performed with \ref insertRow and \ref insertColumn. */ /* start documentation of inline functions */ /*! \fn int QCPLayoutGrid::rowCount() const Returns the number of rows in the layout. \see columnCount */ /*! \fn int QCPLayoutGrid::columnCount() const Returns the number of columns in the layout. \see rowCount */ /* end documentation of inline functions */ /*! Creates an instance of QCPLayoutGrid and sets default values. */ QCPLayoutGrid::QCPLayoutGrid() : mColumnSpacing(5), mRowSpacing(5), mWrap(0), mFillOrder(foRowsFirst) { } QCPLayoutGrid::~QCPLayoutGrid() { // clear all child layout elements. This is important because only the specific layouts know how // to handle removing elements (clear calls virtual removeAt method to do that). clear(); } /*! Returns the element in the cell in \a row and \a column. Returns 0 if either the row/column is invalid or if the cell is empty. In those cases, a qDebug message is printed. To check whether a cell exists and isn't empty, use \ref hasElement. \see addElement, hasElement */ QCPLayoutElement *QCPLayoutGrid::element(int row, int column) const { if (row >= 0 && row < mElements.size()) { if (column >= 0 && column < mElements.first().size()) { if (QCPLayoutElement *result = mElements.at(row).at(column)) return result; else qDebug() << Q_FUNC_INFO << "Requested cell is empty. Row:" << row << "Column:" << column; } else qDebug() << Q_FUNC_INFO << "Invalid column. Row:" << row << "Column:" << column; } else qDebug() << Q_FUNC_INFO << "Invalid row. Row:" << row << "Column:" << column; return 0; } /*! \overload Adds the \a element to cell with \a row and \a column. If \a element is already in a layout, it is first removed from there. If \a row or \a column don't exist yet, the layout is expanded accordingly. Returns true if the element was added successfully, i.e. if the cell at \a row and \a column didn't already have an element. Use the overload of this method without explicit row/column index to place the element according to the configured fill order and wrapping settings. \see element, hasElement, take, remove */ bool QCPLayoutGrid::addElement(int row, int column, QCPLayoutElement *element) { if (!hasElement(row, column)) { if (element && element->layout()) // remove from old layout first element->layout()->take(element); expandTo(row+1, column+1); mElements[row][column] = element; if (element) adoptElement(element); return true; } else qDebug() << Q_FUNC_INFO << "There is already an element in the specified row/column:" << row << column; return false; } /*! \overload Adds the \a element to the next empty cell according to the current fill order (\ref setFillOrder) and wrapping (\ref setWrap). If \a element is already in a layout, it is first removed from there. If necessary, the layout is expanded to hold the new element. Returns true if the element was added successfully. \see setFillOrder, setWrap, element, hasElement, take, remove */ bool QCPLayoutGrid::addElement(QCPLayoutElement *element) { int rowIndex = 0; int colIndex = 0; if (mFillOrder == foColumnsFirst) { while (hasElement(rowIndex, colIndex)) { ++colIndex; if (colIndex >= mWrap && mWrap > 0) { colIndex = 0; ++rowIndex; } } } else { while (hasElement(rowIndex, colIndex)) { ++rowIndex; if (rowIndex >= mWrap && mWrap > 0) { rowIndex = 0; ++colIndex; } } } return addElement(rowIndex, colIndex, element); } /*! Returns whether the cell at \a row and \a column exists and contains a valid element, i.e. isn't empty. \see element */ bool QCPLayoutGrid::hasElement(int row, int column) { if (row >= 0 && row < rowCount() && column >= 0 && column < columnCount()) return mElements.at(row).at(column); else return false; } /*! Sets the stretch \a factor of \a column. Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights, regardless of the stretch factor. (see \ref QCPLayoutElement::setMinimumSize, \ref QCPLayoutElement::setMaximumSize, \ref QCPLayoutElement::setSizeConstraintRect.) The default stretch factor of newly created rows/columns is 1. \see setColumnStretchFactors, setRowStretchFactor */ void QCPLayoutGrid::setColumnStretchFactor(int column, double factor) { if (column >= 0 && column < columnCount()) { if (factor > 0) mColumnStretchFactors[column] = factor; else qDebug() << Q_FUNC_INFO << "Invalid stretch factor, must be positive:" << factor; } else qDebug() << Q_FUNC_INFO << "Invalid column:" << column; } /*! Sets the stretch \a factors of all columns. \a factors must have the size \ref columnCount. Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights, regardless of the stretch factor. (see \ref QCPLayoutElement::setMinimumSize, \ref QCPLayoutElement::setMaximumSize, \ref QCPLayoutElement::setSizeConstraintRect.) The default stretch factor of newly created rows/columns is 1. \see setColumnStretchFactor, setRowStretchFactors */ void QCPLayoutGrid::setColumnStretchFactors(const QList &factors) { if (factors.size() == mColumnStretchFactors.size()) { mColumnStretchFactors = factors; for (int i=0; i= 0 && row < rowCount()) { if (factor > 0) mRowStretchFactors[row] = factor; else qDebug() << Q_FUNC_INFO << "Invalid stretch factor, must be positive:" << factor; } else qDebug() << Q_FUNC_INFO << "Invalid row:" << row; } /*! Sets the stretch \a factors of all rows. \a factors must have the size \ref rowCount. Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights, regardless of the stretch factor. (see \ref QCPLayoutElement::setMinimumSize, \ref QCPLayoutElement::setMaximumSize, \ref QCPLayoutElement::setSizeConstraintRect.) The default stretch factor of newly created rows/columns is 1. \see setRowStretchFactor, setColumnStretchFactors */ void QCPLayoutGrid::setRowStretchFactors(const QList &factors) { if (factors.size() == mRowStretchFactors.size()) { mRowStretchFactors = factors; for (int i=0; i tempElements; if (rearrange) { tempElements.reserve(elCount); for (int i=0; i()); mRowStretchFactors.append(1); } // go through rows and expand columns as necessary: int newColCount = qMax(columnCount(), newColumnCount); for (int i=0; i rowCount()) newIndex = rowCount(); mRowStretchFactors.insert(newIndex, 1); QList newRow; for (int col=0; col columnCount()) newIndex = columnCount(); mColumnStretchFactors.insert(newIndex, 1); for (int row=0; row= 0 && row < rowCount()) { if (column >= 0 && column < columnCount()) { switch (mFillOrder) { case foRowsFirst: return column*rowCount() + row; case foColumnsFirst: return row*columnCount() + column; } } else qDebug() << Q_FUNC_INFO << "row index out of bounds:" << row; } else qDebug() << Q_FUNC_INFO << "column index out of bounds:" << column; return 0; } /*! Converts the linear index to row and column indices and writes the result to \a row and \a column. The way the cells are indexed depends on \ref setFillOrder. If it is \ref foRowsFirst, the indices increase left to right and then top to bottom. If it is \ref foColumnsFirst, the indices increase top to bottom and then left to right. If there are no cells (i.e. column or row count is zero), sets \a row and \a column to -1. For the retrieved \a row and \a column to be valid, the passed \a index must be valid itself, i.e. greater or equal to zero and smaller than the current \ref elementCount. \see rowColToIndex */ void QCPLayoutGrid::indexToRowCol(int index, int &row, int &column) const { row = -1; column = -1; const int nCols = columnCount(); const int nRows = rowCount(); if (nCols == 0 || nRows == 0) return; if (index < 0 || index >= elementCount()) { qDebug() << Q_FUNC_INFO << "index out of bounds:" << index; return; } switch (mFillOrder) { case foRowsFirst: { column = index / nRows; row = index % nRows; break; } case foColumnsFirst: { row = index / nCols; column = index % nCols; break; } } } /* inherits documentation from base class */ void QCPLayoutGrid::updateLayout() { QVector minColWidths, minRowHeights, maxColWidths, maxRowHeights; getMinimumRowColSizes(&minColWidths, &minRowHeights); getMaximumRowColSizes(&maxColWidths, &maxRowHeights); int totalRowSpacing = (rowCount()-1) * mRowSpacing; int totalColSpacing = (columnCount()-1) * mColumnSpacing; QVector colWidths = getSectionSizes(maxColWidths, minColWidths, mColumnStretchFactors.toVector(), mRect.width()-totalColSpacing); QVector rowHeights = getSectionSizes(maxRowHeights, minRowHeights, mRowStretchFactors.toVector(), mRect.height()-totalRowSpacing); // go through cells and set rects accordingly: int yOffset = mRect.top(); for (int row=0; row 0) yOffset += rowHeights.at(row-1)+mRowSpacing; int xOffset = mRect.left(); for (int col=0; col 0) xOffset += colWidths.at(col-1)+mColumnSpacing; if (mElements.at(row).at(col)) mElements.at(row).at(col)->setOuterRect(QRect(xOffset, yOffset, colWidths.at(col), rowHeights.at(row))); } } } /*! \seebaseclassmethod Note that the association of the linear \a index to the row/column based cells depends on the current setting of \ref setFillOrder. \see rowColToIndex */ QCPLayoutElement *QCPLayoutGrid::elementAt(int index) const { if (index >= 0 && index < elementCount()) { int row, col; indexToRowCol(index, row, col); return mElements.at(row).at(col); } else return 0; } /*! \seebaseclassmethod Note that the association of the linear \a index to the row/column based cells depends on the current setting of \ref setFillOrder. \see rowColToIndex */ QCPLayoutElement *QCPLayoutGrid::takeAt(int index) { if (QCPLayoutElement *el = elementAt(index)) { releaseElement(el); int row, col; indexToRowCol(index, row, col); mElements[row][col] = 0; return el; } else { qDebug() << Q_FUNC_INFO << "Attempt to take invalid index:" << index; return 0; } } /* inherits documentation from base class */ bool QCPLayoutGrid::take(QCPLayoutElement *element) { if (element) { for (int i=0; i QCPLayoutGrid::elements(bool recursive) const { QList result; const int elCount = elementCount(); #if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0) result.reserve(elCount); #endif for (int i=0; ielements(recursive); } } return result; } /*! Simplifies the layout by collapsing rows and columns which only contain empty cells. */ void QCPLayoutGrid::simplify() { // remove rows with only empty cells: for (int row=rowCount()-1; row>=0; --row) { bool hasElements = false; for (int col=0; col=0; --col) { bool hasElements = false; for (int row=0; row minColWidths, minRowHeights; getMinimumRowColSizes(&minColWidths, &minRowHeights); QSize result(0, 0); for (int i=0; i maxColWidths, maxRowHeights; getMaximumRowColSizes(&maxColWidths, &maxRowHeights); QSize result(0, 0); for (int i=0; i QWIDGETSIZE_MAX) result.setHeight(QWIDGETSIZE_MAX); if (result.width() > QWIDGETSIZE_MAX) result.setWidth(QWIDGETSIZE_MAX); return result; } /*! \internal Places the minimum column widths and row heights into \a minColWidths and \a minRowHeights respectively. The minimum height of a row is the largest minimum height of any element's outer rect in that row. The minimum width of a column is the largest minimum width of any element's outer rect in that column. This is a helper function for \ref updateLayout. \see getMaximumRowColSizes */ void QCPLayoutGrid::getMinimumRowColSizes(QVector *minColWidths, QVector *minRowHeights) const { *minColWidths = QVector(columnCount(), 0); *minRowHeights = QVector(rowCount(), 0); for (int row=0; rowat(col) < minSize.width()) (*minColWidths)[col] = minSize.width(); if (minRowHeights->at(row) < minSize.height()) (*minRowHeights)[row] = minSize.height(); } } } } /*! \internal Places the maximum column widths and row heights into \a maxColWidths and \a maxRowHeights respectively. The maximum height of a row is the smallest maximum height of any element's outer rect in that row. The maximum width of a column is the smallest maximum width of any element's outer rect in that column. This is a helper function for \ref updateLayout. \see getMinimumRowColSizes */ void QCPLayoutGrid::getMaximumRowColSizes(QVector *maxColWidths, QVector *maxRowHeights) const { *maxColWidths = QVector(columnCount(), QWIDGETSIZE_MAX); *maxRowHeights = QVector(rowCount(), QWIDGETSIZE_MAX); for (int row=0; rowat(col) > maxSize.width()) (*maxColWidths)[col] = maxSize.width(); if (maxRowHeights->at(row) > maxSize.height()) (*maxRowHeights)[row] = maxSize.height(); } } } } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLayoutInset //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPLayoutInset \brief A layout that places child elements aligned to the border or arbitrarily positioned Elements are placed either aligned to the border or at arbitrary position in the area of the layout. Which placement applies is controlled with the \ref InsetPlacement (\ref setInsetPlacement). Elements are added via \ref addElement(QCPLayoutElement *element, Qt::Alignment alignment) or addElement(QCPLayoutElement *element, const QRectF &rect). If the first method is used, the inset placement will default to \ref ipBorderAligned and the element will be aligned according to the \a alignment parameter. The second method defaults to \ref ipFree and allows placing elements at arbitrary position and size, defined by \a rect. The alignment or rect can be set via \ref setInsetAlignment or \ref setInsetRect, respectively. This is the layout that every QCPAxisRect has as \ref QCPAxisRect::insetLayout. */ /* start documentation of inline functions */ /*! \fn virtual void QCPLayoutInset::simplify() The QCPInsetLayout does not need simplification since it can never have empty cells due to its linear index structure. This method does nothing. */ /* end documentation of inline functions */ /*! Creates an instance of QCPLayoutInset and sets default values. */ QCPLayoutInset::QCPLayoutInset() { } QCPLayoutInset::~QCPLayoutInset() { // clear all child layout elements. This is important because only the specific layouts know how // to handle removing elements (clear calls virtual removeAt method to do that). clear(); } /*! Returns the placement type of the element with the specified \a index. */ QCPLayoutInset::InsetPlacement QCPLayoutInset::insetPlacement(int index) const { if (elementAt(index)) return mInsetPlacement.at(index); else { qDebug() << Q_FUNC_INFO << "Invalid element index:" << index; return ipFree; } } /*! Returns the alignment of the element with the specified \a index. The alignment only has a meaning, if the inset placement (\ref setInsetPlacement) is \ref ipBorderAligned. */ Qt::Alignment QCPLayoutInset::insetAlignment(int index) const { if (elementAt(index)) return mInsetAlignment.at(index); else { qDebug() << Q_FUNC_INFO << "Invalid element index:" << index; return 0; } } /*! Returns the rect of the element with the specified \a index. The rect only has a meaning, if the inset placement (\ref setInsetPlacement) is \ref ipFree. */ QRectF QCPLayoutInset::insetRect(int index) const { if (elementAt(index)) return mInsetRect.at(index); else { qDebug() << Q_FUNC_INFO << "Invalid element index:" << index; return QRectF(); } } /*! Sets the inset placement type of the element with the specified \a index to \a placement. \see InsetPlacement */ void QCPLayoutInset::setInsetPlacement(int index, QCPLayoutInset::InsetPlacement placement) { if (elementAt(index)) mInsetPlacement[index] = placement; else qDebug() << Q_FUNC_INFO << "Invalid element index:" << index; } /*! If the inset placement (\ref setInsetPlacement) is \ref ipBorderAligned, this function is used to set the alignment of the element with the specified \a index to \a alignment. \a alignment is an or combination of the following alignment flags: Qt::AlignLeft, Qt::AlignHCenter, Qt::AlighRight, Qt::AlignTop, Qt::AlignVCenter, Qt::AlignBottom. Any other alignment flags will be ignored. */ void QCPLayoutInset::setInsetAlignment(int index, Qt::Alignment alignment) { if (elementAt(index)) mInsetAlignment[index] = alignment; else qDebug() << Q_FUNC_INFO << "Invalid element index:" << index; } /*! If the inset placement (\ref setInsetPlacement) is \ref ipFree, this function is used to set the position and size of the element with the specified \a index to \a rect. \a rect is given in fractions of the whole inset layout rect. So an inset with rect (0, 0, 1, 1) will span the entire layout. An inset with rect (0.6, 0.1, 0.35, 0.35) will be in the top right corner of the layout, with 35% width and height of the parent layout. Note that the minimum and maximum sizes of the embedded element (\ref QCPLayoutElement::setMinimumSize, \ref QCPLayoutElement::setMaximumSize) are enforced. */ void QCPLayoutInset::setInsetRect(int index, const QRectF &rect) { if (elementAt(index)) mInsetRect[index] = rect; else qDebug() << Q_FUNC_INFO << "Invalid element index:" << index; } /* inherits documentation from base class */ void QCPLayoutInset::updateLayout() { for (int i=0; i finalMaxSize.width()) insetRect.setWidth(finalMaxSize.width()); if (insetRect.size().height() > finalMaxSize.height()) insetRect.setHeight(finalMaxSize.height()); } else if (mInsetPlacement.at(i) == ipBorderAligned) { insetRect.setSize(finalMinSize); Qt::Alignment al = mInsetAlignment.at(i); if (al.testFlag(Qt::AlignLeft)) insetRect.moveLeft(rect().x()); else if (al.testFlag(Qt::AlignRight)) insetRect.moveRight(rect().x()+rect().width()); else insetRect.moveLeft(rect().x()+rect().width()*0.5-finalMinSize.width()*0.5); // default to Qt::AlignHCenter if (al.testFlag(Qt::AlignTop)) insetRect.moveTop(rect().y()); else if (al.testFlag(Qt::AlignBottom)) insetRect.moveBottom(rect().y()+rect().height()); else insetRect.moveTop(rect().y()+rect().height()*0.5-finalMinSize.height()*0.5); // default to Qt::AlignVCenter } mElements.at(i)->setOuterRect(insetRect); } } /* inherits documentation from base class */ int QCPLayoutInset::elementCount() const { return mElements.size(); } /* inherits documentation from base class */ QCPLayoutElement *QCPLayoutInset::elementAt(int index) const { if (index >= 0 && index < mElements.size()) return mElements.at(index); else return 0; } /* inherits documentation from base class */ QCPLayoutElement *QCPLayoutInset::takeAt(int index) { if (QCPLayoutElement *el = elementAt(index)) { releaseElement(el); mElements.removeAt(index); mInsetPlacement.removeAt(index); mInsetAlignment.removeAt(index); mInsetRect.removeAt(index); return el; } else { qDebug() << Q_FUNC_INFO << "Attempt to take invalid index:" << index; return 0; } } /* inherits documentation from base class */ bool QCPLayoutInset::take(QCPLayoutElement *element) { if (element) { for (int i=0; irealVisibility() && mElements.at(i)->selectTest(pos, onlySelectable) >= 0) return mParentPlot->selectionTolerance()*0.99; } return -1; } /*! Adds the specified \a element to the layout as an inset aligned at the border (\ref setInsetAlignment is initialized with \ref ipBorderAligned). The alignment is set to \a alignment. \a alignment is an or combination of the following alignment flags: Qt::AlignLeft, Qt::AlignHCenter, Qt::AlighRight, Qt::AlignTop, Qt::AlignVCenter, Qt::AlignBottom. Any other alignment flags will be ignored. \see addElement(QCPLayoutElement *element, const QRectF &rect) */ void QCPLayoutInset::addElement(QCPLayoutElement *element, Qt::Alignment alignment) { if (element) { if (element->layout()) // remove from old layout first element->layout()->take(element); mElements.append(element); mInsetPlacement.append(ipBorderAligned); mInsetAlignment.append(alignment); mInsetRect.append(QRectF(0.6, 0.6, 0.4, 0.4)); adoptElement(element); } else qDebug() << Q_FUNC_INFO << "Can't add null element"; } /*! Adds the specified \a element to the layout as an inset with free positioning/sizing (\ref setInsetAlignment is initialized with \ref ipFree). The position and size is set to \a rect. \a rect is given in fractions of the whole inset layout rect. So an inset with rect (0, 0, 1, 1) will span the entire layout. An inset with rect (0.6, 0.1, 0.35, 0.35) will be in the top right corner of the layout, with 35% width and height of the parent layout. \see addElement(QCPLayoutElement *element, Qt::Alignment alignment) */ void QCPLayoutInset::addElement(QCPLayoutElement *element, const QRectF &rect) { if (element) { if (element->layout()) // remove from old layout first element->layout()->take(element); mElements.append(element); mInsetPlacement.append(ipFree); mInsetAlignment.append(Qt::AlignRight|Qt::AlignTop); mInsetRect.append(rect); adoptElement(element); } else qDebug() << Q_FUNC_INFO << "Can't add null element"; } /* end of 'src/layout.cpp' */ /* including file 'src/lineending.cpp', size 11536 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLineEnding //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPLineEnding \brief Handles the different ending decorations for line-like items \image html QCPLineEnding.png "The various ending styles currently supported" For every ending a line-like item has, an instance of this class exists. For example, QCPItemLine has two endings which can be set with QCPItemLine::setHead and QCPItemLine::setTail. The styles themselves are defined via the enum QCPLineEnding::EndingStyle. Most decorations can be modified regarding width and length, see \ref setWidth and \ref setLength. The direction of the ending decoration (e.g. direction an arrow is pointing) is controlled by the line-like item. For example, when both endings of a QCPItemLine are set to be arrows, they will point to opposite directions, e.g. "outward". This can be changed by \ref setInverted, which would make the respective arrow point inward. Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle where actually a QCPLineEnding is expected, e.g. \snippet documentation/doc-code-snippets/mainwindow.cpp qcplineending-sethead */ /*! Creates a QCPLineEnding instance with default values (style \ref esNone). */ QCPLineEnding::QCPLineEnding() : mStyle(esNone), mWidth(8), mLength(10), mInverted(false) { } /*! Creates a QCPLineEnding instance with the specified values. */ QCPLineEnding::QCPLineEnding(QCPLineEnding::EndingStyle style, double width, double length, bool inverted) : mStyle(style), mWidth(width), mLength(length), mInverted(inverted) { } /*! Sets the style of the ending decoration. */ void QCPLineEnding::setStyle(QCPLineEnding::EndingStyle style) { mStyle = style; } /*! Sets the width of the ending decoration, if the style supports it. On arrows, for example, the width defines the size perpendicular to the arrow's pointing direction. \see setLength */ void QCPLineEnding::setWidth(double width) { mWidth = width; } /*! Sets the length of the ending decoration, if the style supports it. On arrows, for example, the length defines the size in pointing direction. \see setWidth */ void QCPLineEnding::setLength(double length) { mLength = length; } /*! Sets whether the ending decoration shall be inverted. For example, an arrow decoration will point inward when \a inverted is set to true. Note that also the \a width direction is inverted. For symmetrical ending styles like arrows or discs, this doesn't make a difference. However, asymmetric styles like \ref esHalfBar are affected by it, which can be used to control to which side the half bar points to. */ void QCPLineEnding::setInverted(bool inverted) { mInverted = inverted; } /*! \internal Returns the maximum pixel radius the ending decoration might cover, starting from the position the decoration is drawn at (typically a line ending/\ref QCPItemPosition of an item). This is relevant for clipping. Only omit painting of the decoration when the position where the decoration is supposed to be drawn is farther away from the clipping rect than the returned distance. */ double QCPLineEnding::boundingDistance() const { switch (mStyle) { case esNone: return 0; case esFlatArrow: case esSpikeArrow: case esLineArrow: case esSkewedBar: return qSqrt(mWidth*mWidth+mLength*mLength); // items that have width and length case esDisc: case esSquare: case esDiamond: case esBar: case esHalfBar: return mWidth*1.42; // items that only have a width -> width*sqrt(2) } return 0; } /*! Starting from the origin of this line ending (which is style specific), returns the length covered by the line ending symbol, in backward direction. For example, the \ref esSpikeArrow has a shorter real length than a \ref esFlatArrow, even if both have the same \ref setLength value, because the spike arrow has an inward curved back, which reduces the length along its center axis (the drawing origin for arrows is at the tip). This function is used for precise, style specific placement of line endings, for example in QCPAxes. */ double QCPLineEnding::realLength() const { switch (mStyle) { case esNone: case esLineArrow: case esSkewedBar: case esBar: case esHalfBar: return 0; case esFlatArrow: return mLength; case esDisc: case esSquare: case esDiamond: return mWidth*0.5; case esSpikeArrow: return mLength*0.8; } return 0; } /*! \internal Draws the line ending with the specified \a painter at the position \a pos. The direction of the line ending is controlled with \a dir. */ void QCPLineEnding::draw(QCPPainter *painter, const QCPVector2D &pos, const QCPVector2D &dir) const { if (mStyle == esNone) return; QCPVector2D lengthVec = dir.normalized() * mLength*(mInverted ? -1 : 1); if (lengthVec.isNull()) lengthVec = QCPVector2D(1, 0); QCPVector2D widthVec = dir.normalized().perpendicular() * mWidth*0.5*(mInverted ? -1 : 1); QPen penBackup = painter->pen(); QBrush brushBackup = painter->brush(); QPen miterPen = penBackup; miterPen.setJoinStyle(Qt::MiterJoin); // to make arrow heads spikey QBrush brush(painter->pen().color(), Qt::SolidPattern); switch (mStyle) { case esNone: break; case esFlatArrow: { QPointF points[3] = {pos.toPointF(), (pos-lengthVec+widthVec).toPointF(), (pos-lengthVec-widthVec).toPointF() }; painter->setPen(miterPen); painter->setBrush(brush); painter->drawConvexPolygon(points, 3); painter->setBrush(brushBackup); painter->setPen(penBackup); break; } case esSpikeArrow: { QPointF points[4] = {pos.toPointF(), (pos-lengthVec+widthVec).toPointF(), (pos-lengthVec*0.8).toPointF(), (pos-lengthVec-widthVec).toPointF() }; painter->setPen(miterPen); painter->setBrush(brush); painter->drawConvexPolygon(points, 4); painter->setBrush(brushBackup); painter->setPen(penBackup); break; } case esLineArrow: { QPointF points[3] = {(pos-lengthVec+widthVec).toPointF(), pos.toPointF(), (pos-lengthVec-widthVec).toPointF() }; painter->setPen(miterPen); painter->drawPolyline(points, 3); painter->setPen(penBackup); break; } case esDisc: { painter->setBrush(brush); painter->drawEllipse(pos.toPointF(), mWidth*0.5, mWidth*0.5); painter->setBrush(brushBackup); break; } case esSquare: { QCPVector2D widthVecPerp = widthVec.perpendicular(); QPointF points[4] = {(pos-widthVecPerp+widthVec).toPointF(), (pos-widthVecPerp-widthVec).toPointF(), (pos+widthVecPerp-widthVec).toPointF(), (pos+widthVecPerp+widthVec).toPointF() }; painter->setPen(miterPen); painter->setBrush(brush); painter->drawConvexPolygon(points, 4); painter->setBrush(brushBackup); painter->setPen(penBackup); break; } case esDiamond: { QCPVector2D widthVecPerp = widthVec.perpendicular(); QPointF points[4] = {(pos-widthVecPerp).toPointF(), (pos-widthVec).toPointF(), (pos+widthVecPerp).toPointF(), (pos+widthVec).toPointF() }; painter->setPen(miterPen); painter->setBrush(brush); painter->drawConvexPolygon(points, 4); painter->setBrush(brushBackup); painter->setPen(penBackup); break; } case esBar: { painter->drawLine((pos+widthVec).toPointF(), (pos-widthVec).toPointF()); break; } case esHalfBar: { painter->drawLine((pos+widthVec).toPointF(), pos.toPointF()); break; } case esSkewedBar: { if (qFuzzyIsNull(painter->pen().widthF()) && !painter->modes().testFlag(QCPPainter::pmNonCosmetic)) { // if drawing with cosmetic pen (perfectly thin stroke, happens only in vector exports), draw bar exactly on tip of line painter->drawLine((pos+widthVec+lengthVec*0.2*(mInverted?-1:1)).toPointF(), (pos-widthVec-lengthVec*0.2*(mInverted?-1:1)).toPointF()); } else { // if drawing with thick (non-cosmetic) pen, shift bar a little in line direction to prevent line from sticking through bar slightly painter->drawLine((pos+widthVec+lengthVec*0.2*(mInverted?-1:1)+dir.normalized()*qMax(1.0f, (float)painter->pen().widthF())*0.5f).toPointF(), (pos-widthVec-lengthVec*0.2*(mInverted?-1:1)+dir.normalized()*qMax(1.0f, (float)painter->pen().widthF())*0.5f).toPointF()); } break; } } } /*! \internal \overload Draws the line ending. The direction is controlled with the \a angle parameter in radians. */ void QCPLineEnding::draw(QCPPainter *painter, const QCPVector2D &pos, double angle) const { draw(painter, pos, QCPVector2D(qCos(angle), qSin(angle))); } /* end of 'src/lineending.cpp' */ /* including file 'src/axis/axisticker.cpp', size 18664 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTicker //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxisTicker \brief The base class tick generator used by QCPAxis to create tick positions and tick labels Each QCPAxis has an internal QCPAxisTicker (or a subclass) in order to generate tick positions and tick labels for the current axis range. The ticker of an axis can be set via \ref QCPAxis::setTicker. Since that method takes a QSharedPointer, multiple axes can share the same ticker instance. This base class generates normal tick coordinates and numeric labels for linear axes. It picks a reasonable tick step (the separation between ticks) which results in readable tick labels. The number of ticks that should be approximately generated can be set via \ref setTickCount. Depending on the current tick step strategy (\ref setTickStepStrategy), the algorithm either sacrifices readability to better match the specified tick count (\ref QCPAxisTicker::tssMeetTickCount) or relaxes the tick count in favor of better tick steps (\ref QCPAxisTicker::tssReadability), which is the default. The following more specialized axis ticker subclasses are available, see details in the respective class documentation:

QCPAxisTickerFixed\image html axisticker-fixed.png
QCPAxisTickerLog\image html axisticker-log.png
QCPAxisTickerPi\image html axisticker-pi.png
QCPAxisTickerText\image html axisticker-text.png
QCPAxisTickerDateTime\image html axisticker-datetime.png
QCPAxisTickerTime\image html axisticker-time.png \image html axisticker-time2.png
\section axisticker-subclassing Creating own axis tickers Creating own axis tickers can be achieved very easily by sublassing QCPAxisTicker and reimplementing some or all of the available virtual methods. In the simplest case you might wish to just generate different tick steps than the other tickers, so you only reimplement the method \ref getTickStep. If you additionally want control over the string that will be shown as tick label, reimplement \ref getTickLabel. If you wish to have complete control, you can generate the tick vectors and tick label vectors yourself by reimplementing \ref createTickVector and \ref createLabelVector. The default implementations use the previously mentioned virtual methods \ref getTickStep and \ref getTickLabel, but your reimplementations don't necessarily need to do so. For example in the case of unequal tick steps, the method \ref getTickStep loses its usefulness and can be ignored. The sub tick count between major ticks can be controlled with \ref getSubTickCount. Full sub tick placement control is obtained by reimplementing \ref createSubTickVector. See the documentation of all these virtual methods in QCPAxisTicker for detailed information about the parameters and expected return values. */ /*! Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. */ QCPAxisTicker::QCPAxisTicker() : mTickStepStrategy(tssReadability), mTickCount(5), mTickOrigin(0) { } QCPAxisTicker::~QCPAxisTicker() { } /*! Sets which strategy the axis ticker follows when choosing the size of the tick step. For the available strategies, see \ref TickStepStrategy. */ void QCPAxisTicker::setTickStepStrategy(QCPAxisTicker::TickStepStrategy strategy) { mTickStepStrategy = strategy; } /*! Sets how many ticks this ticker shall aim to generate across the axis range. Note that \a count is not guaranteed to be matched exactly, as generating readable tick intervals may conflict with the requested number of ticks. Whether the readability has priority over meeting the requested \a count can be specified with \ref setTickStepStrategy. */ void QCPAxisTicker::setTickCount(int count) { if (count > 0) mTickCount = count; else qDebug() << Q_FUNC_INFO << "tick count must be greater than zero:" << count; } /*! Sets the mathematical coordinate (or "offset") of the zeroth tick. This tick coordinate is just a concept and doesn't need to be inside the currently visible axis range. By default \a origin is zero, which for example yields ticks {-5, 0, 5, 10, 15,...} when the tick step is five. If \a origin is now set to 1 instead, the correspondingly generated ticks would be {-4, 1, 6, 11, 16,...}. */ void QCPAxisTicker::setTickOrigin(double origin) { mTickOrigin = origin; } /*! This is the method called by QCPAxis in order to actually generate tick coordinates (\a ticks), tick label strings (\a tickLabels) and sub tick coordinates (\a subTicks). The ticks are generated for the specified \a range. The generated labels typically follow the specified \a locale, \a formatChar and number \a precision, however this might be different (or even irrelevant) for certain QCPAxisTicker subclasses. The output parameter \a ticks is filled with the generated tick positions in axis coordinates. The output parameters \a subTicks and \a tickLabels are optional (set them to 0 if not needed) and are respectively filled with sub tick coordinates, and tick label strings belonging to \a ticks by index. */ void QCPAxisTicker::generate(const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector &ticks, QVector *subTicks, QVector *tickLabels) { // generate (major) ticks: double tickStep = getTickStep(range); ticks = createTickVector(tickStep, range); trimTicks(range, ticks, true); // trim ticks to visible range plus one outer tick on each side (incase a subclass createTickVector creates more) // generate sub ticks between major ticks: if (subTicks) { if (ticks.size() > 0) { *subTicks = createSubTickVector(getSubTickCount(tickStep), ticks); trimTicks(range, *subTicks, false); } else *subTicks = QVector(); } // finally trim also outliers (no further clipping happens in axis drawing): trimTicks(range, ticks, false); // generate labels for visible ticks if requested: if (tickLabels) *tickLabels = createLabelVector(ticks, locale, formatChar, precision); } /*! \internal Takes the entire currently visible axis range and returns a sensible tick step in order to provide readable tick labels as well as a reasonable number of tick counts (see \ref setTickCount, \ref setTickStepStrategy). If a QCPAxisTicker subclass only wants a different tick step behaviour than the default implementation, it should reimplement this method. See \ref cleanMantissa for a possible helper function. */ double QCPAxisTicker::getTickStep(const QCPRange &range) { double exactStep = range.size()/(double)(mTickCount+1e-10); // mTickCount ticks on average, the small addition is to prevent jitter on exact integers return cleanMantissa(exactStep); } /*! \internal Takes the \a tickStep, i.e. the distance between two consecutive ticks, and returns an appropriate number of sub ticks for that specific tick step. Note that a returned sub tick count of e.g. 4 will split each tick interval into 5 sections. */ int QCPAxisTicker::getSubTickCount(double tickStep) { int result = 1; // default to 1, if no proper value can be found // separate integer and fractional part of mantissa: double epsilon = 0.01; double intPartf; int intPart; double fracPart = modf(getMantissa(tickStep), &intPartf); intPart = intPartf; // handle cases with (almost) integer mantissa: if (fracPart < epsilon || 1.0-fracPart < epsilon) { if (1.0-fracPart < epsilon) ++intPart; switch (intPart) { case 1: result = 4; break; // 1.0 -> 0.2 substep case 2: result = 3; break; // 2.0 -> 0.5 substep case 3: result = 2; break; // 3.0 -> 1.0 substep case 4: result = 3; break; // 4.0 -> 1.0 substep case 5: result = 4; break; // 5.0 -> 1.0 substep case 6: result = 2; break; // 6.0 -> 2.0 substep case 7: result = 6; break; // 7.0 -> 1.0 substep case 8: result = 3; break; // 8.0 -> 2.0 substep case 9: result = 2; break; // 9.0 -> 3.0 substep } } else { // handle cases with significantly fractional mantissa: if (qAbs(fracPart-0.5) < epsilon) // *.5 mantissa { switch (intPart) { case 1: result = 2; break; // 1.5 -> 0.5 substep case 2: result = 4; break; // 2.5 -> 0.5 substep case 3: result = 4; break; // 3.5 -> 0.7 substep case 4: result = 2; break; // 4.5 -> 1.5 substep case 5: result = 4; break; // 5.5 -> 1.1 substep (won't occur with default getTickStep from here on) case 6: result = 4; break; // 6.5 -> 1.3 substep case 7: result = 2; break; // 7.5 -> 2.5 substep case 8: result = 4; break; // 8.5 -> 1.7 substep case 9: result = 4; break; // 9.5 -> 1.9 substep } } // if mantissa fraction isn't 0.0 or 0.5, don't bother finding good sub tick marks, leave default } return result; } /*! \internal This method returns the tick label string as it should be printed under the \a tick coordinate. If a textual number is returned, it should respect the provided \a locale, \a formatChar and \a precision. If the returned value contains exponentials of the form "2e5" and beautifully typeset powers is enabled in the QCPAxis number format (\ref QCPAxis::setNumberFormat), the exponential part will be formatted accordingly using multiplication symbol and superscript during rendering of the label automatically. */ QString QCPAxisTicker::getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) { return locale.toString(tick, formatChar.toLatin1(), precision); } /*! \internal Returns a vector containing all coordinates of sub ticks that should be drawn. It generates \a subTickCount sub ticks between each tick pair given in \a ticks. If a QCPAxisTicker subclass needs maximal control over the generated sub ticks, it should reimplement this method. Depending on the purpose of the subclass it doesn't necessarily need to base its result on \a subTickCount or \a ticks. */ QVector QCPAxisTicker::createSubTickVector(int subTickCount, const QVector &ticks) { QVector result; if (subTickCount <= 0 || ticks.size() < 2) return result; result.reserve((ticks.size()-1)*subTickCount); for (int i=1; i QCPAxisTicker::createTickVector(double tickStep, const QCPRange &range) { QVector result; // Generate tick positions according to tickStep: qint64 firstStep = floor((range.lower-mTickOrigin)/tickStep); // do not use qFloor here, or we'll lose 64 bit precision qint64 lastStep = ceil((range.upper-mTickOrigin)/tickStep); // do not use qCeil here, or we'll lose 64 bit precision int tickcount = lastStep-firstStep+1; if (tickcount < 0) tickcount = 0; result.resize(tickcount); for (int i=0; i QCPAxisTicker::createLabelVector(const QVector &ticks, const QLocale &locale, QChar formatChar, int precision) { QVector result; result.reserve(ticks.size()); for (int i=0; i &ticks, bool keepOneOutlier) const { bool lowFound = false; bool highFound = false; int lowIndex = 0; int highIndex = -1; for (int i=0; i < ticks.size(); ++i) { if (ticks.at(i) >= range.lower) { lowFound = true; lowIndex = i; break; } } for (int i=ticks.size()-1; i >= 0; --i) { if (ticks.at(i) <= range.upper) { highFound = true; highIndex = i; break; } } if (highFound && lowFound) { int trimFront = qMax(0, lowIndex-(keepOneOutlier ? 1 : 0)); int trimBack = qMax(0, ticks.size()-(keepOneOutlier ? 2 : 1)-highIndex); if (trimFront > 0 || trimBack > 0) ticks = ticks.mid(trimFront, ticks.size()-trimFront-trimBack); } else // all ticks are either all below or all above the range ticks.clear(); } /*! \internal Returns the coordinate contained in \a candidates which is closest to the provided \a target. This method assumes \a candidates is not empty and sorted in ascending order. */ double QCPAxisTicker::pickClosest(double target, const QVector &candidates) const { if (candidates.size() == 1) return candidates.first(); QVector::const_iterator it = std::lower_bound(candidates.constBegin(), candidates.constEnd(), target); if (it == candidates.constEnd()) return *(it-1); else if (it == candidates.constBegin()) return *it; else return target-*(it-1) < *it-target ? *(it-1) : *it; } /*! \internal Returns the decimal mantissa of \a input. Optionally, if \a magnitude is not set to zero, it also returns the magnitude of \a input as a power of 10. For example, an input of 142.6 will return a mantissa of 1.426 and a magnitude of 100. */ double QCPAxisTicker::getMantissa(double input, double *magnitude) const { const double mag = qPow(10.0, qFloor(qLn(input)/qLn(10.0))); if (magnitude) *magnitude = mag; return input/mag; } /*! \internal Returns a number that is close to \a input but has a clean, easier human readable mantissa. How strongly the mantissa is altered, and thus how strong the result deviates from the original \a input, depends on the current tick step strategy (see \ref setTickStepStrategy). */ double QCPAxisTicker::cleanMantissa(double input) const { double magnitude; const double mantissa = getMantissa(input, &magnitude); switch (mTickStepStrategy) { case tssReadability: { return pickClosest(mantissa, QVector() << 1.0 << 2.0 << 2.5 << 5.0 << 10.0)*magnitude; } case tssMeetTickCount: { // this gives effectively a mantissa of 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 8.0, 10.0 if (mantissa <= 5.0) return (int)(mantissa*2)/2.0*magnitude; // round digit after decimal point to 0.5 else return (int)(mantissa/2.0)*2.0*magnitude; // round to first digit in multiples of 2 } } return input; } /* end of 'src/axis/axisticker.cpp' */ /* including file 'src/axis/axistickerdatetime.cpp', size 14443 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerDateTime //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxisTickerDateTime \brief Specialized axis ticker for calendar dates and times as axis ticks \image html axisticker-datetime.png This QCPAxisTicker subclass generates ticks that correspond to real calendar dates and times. The plot axis coordinate is interpreted as Unix Time, so seconds since Epoch (January 1, 1970, 00:00 UTC). This is also used for example by QDateTime in the toTime_t()/setTime_t() methods with a precision of one second. Since Qt 4.7, millisecond accuracy can be obtained from QDateTime by using QDateTime::fromMSecsSinceEpoch()/1000.0. The static methods \ref dateTimeToKey and \ref keyToDateTime conveniently perform this conversion achieving a precision of one millisecond on all Qt versions. The format of the date/time display in the tick labels is controlled with \ref setDateTimeFormat. If a different time spec (time zone) shall be used, see \ref setDateTimeSpec. This ticker produces unequal tick spacing in order to provide intuitive date and time-of-day ticks. For example, if the axis range spans a few years such that there is one tick per year, ticks will be positioned on 1. January of every year. This is intuitive but, due to leap years, will result in slightly unequal tick intervals (visually unnoticeable). The same can be seen in the image above: even though the number of days varies month by month, this ticker generates ticks on the same day of each month. If you would like to change the date/time that is used as a (mathematical) starting date for the ticks, use the \ref setTickOrigin(const QDateTime &origin) method overload, which takes a QDateTime. If you pass 15. July, 9:45 to this method, the yearly ticks will end up on 15. July at 9:45 of every year. The ticker can be created and assigned to an axis like this: \snippet documentation/doc-image-generator/mainwindow.cpp axistickerdatetime-creation \note If you rather wish to display relative times in terms of days, hours, minutes, seconds and milliseconds, and are not interested in the intricacies of real calendar dates with months and (leap) years, have a look at QCPAxisTickerTime instead. */ /*! Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. */ QCPAxisTickerDateTime::QCPAxisTickerDateTime() : mDateTimeFormat(QLatin1String("hh:mm:ss\ndd.MM.yy")), mDateTimeSpec(Qt::LocalTime), mDateStrategy(dsNone) { setTickCount(4); } /*! Sets the format in which dates and times are displayed as tick labels. For details about the \a format string, see the documentation of QDateTime::toString(). Newlines can be inserted with "\n". \see setDateTimeSpec */ void QCPAxisTickerDateTime::setDateTimeFormat(const QString &format) { mDateTimeFormat = format; } /*! Sets the time spec that is used for creating the tick labels from corresponding dates/times. The default value of QDateTime objects (and also QCPAxisTickerDateTime) is Qt::LocalTime. However, if the date time values passed to QCustomPlot (e.g. in the form of axis ranges or keys of a plottable) are given in the UTC spec, set \a spec to Qt::UTC to get the correct axis labels. \see setDateTimeFormat */ void QCPAxisTickerDateTime::setDateTimeSpec(Qt::TimeSpec spec) { mDateTimeSpec = spec; } /*! Sets the tick origin (see \ref QCPAxisTicker::setTickOrigin) in seconds since Epoch (1. Jan 1970, 00:00 UTC). For the date time ticker it might be more intuitive to use the overload which directly takes a QDateTime, see \ref setTickOrigin(const QDateTime &origin). This is useful to define the month/day/time recurring at greater tick interval steps. For example, If you pass 15. July, 9:45 to this method and the tick interval happens to be one tick per year, the ticks will end up on 15. July at 9:45 of every year. */ void QCPAxisTickerDateTime::setTickOrigin(double origin) { QCPAxisTicker::setTickOrigin(origin); } /*! Sets the tick origin (see \ref QCPAxisTicker::setTickOrigin) as a QDateTime \a origin. This is useful to define the month/day/time recurring at greater tick interval steps. For example, If you pass 15. July, 9:45 to this method and the tick interval happens to be one tick per year, the ticks will end up on 15. July at 9:45 of every year. */ void QCPAxisTickerDateTime::setTickOrigin(const QDateTime &origin) { setTickOrigin(dateTimeToKey(origin)); } /*! \internal Returns a sensible tick step with intervals appropriate for a date-time-display, such as weekly, monthly, bi-monthly, etc. Note that this tick step isn't used exactly when generating the tick vector in \ref createTickVector, but only as a guiding value requiring some correction for each individual tick interval. Otherwise this would lead to unintuitive date displays, e.g. jumping between first day in the month to the last day in the previous month from tick to tick, due to the non-uniform length of months. The same problem arises with leap years. \seebaseclassmethod */ double QCPAxisTickerDateTime::getTickStep(const QCPRange &range) { double result = range.size()/(double)(mTickCount+1e-10); // mTickCount ticks on average, the small addition is to prevent jitter on exact integers mDateStrategy = dsNone; if (result < 1) // ideal tick step is below 1 second -> use normal clean mantissa algorithm in units of seconds { result = cleanMantissa(result); } else if (result < 86400*30.4375*12) // below a year { result = pickClosest(result, QVector() << 1 << 2.5 << 5 << 10 << 15 << 30 << 60 << 2.5*60 << 5*60 << 10*60 << 15*60 << 30*60 << 60*60 // second, minute, hour range << 3600*2 << 3600*3 << 3600*6 << 3600*12 << 3600*24 // hour to day range << 86400*2 << 86400*5 << 86400*7 << 86400*14 << 86400*30.4375 << 86400*30.4375*2 << 86400*30.4375*3 << 86400*30.4375*6 << 86400*30.4375*12); // day, week, month range (avg. days per month includes leap years) if (result > 86400*30.4375-1) // month tick intervals or larger mDateStrategy = dsUniformDayInMonth; else if (result > 3600*24-1) // day tick intervals or larger mDateStrategy = dsUniformTimeInDay; } else // more than a year, go back to normal clean mantissa algorithm but in units of years { const double secondsPerYear = 86400*30.4375*12; // average including leap years result = cleanMantissa(result/secondsPerYear)*secondsPerYear; mDateStrategy = dsUniformDayInMonth; } return result; } /*! \internal Returns a sensible sub tick count with intervals appropriate for a date-time-display, such as weekly, monthly, bi-monthly, etc. \seebaseclassmethod */ int QCPAxisTickerDateTime::getSubTickCount(double tickStep) { int result = QCPAxisTicker::getSubTickCount(tickStep); switch (qRound(tickStep)) // hand chosen subticks for specific minute/hour/day/week/month range (as specified in getTickStep) { case 5*60: result = 4; break; case 10*60: result = 1; break; case 15*60: result = 2; break; case 30*60: result = 1; break; case 60*60: result = 3; break; case 3600*2: result = 3; break; case 3600*3: result = 2; break; case 3600*6: result = 1; break; case 3600*12: result = 3; break; case 3600*24: result = 3; break; case 86400*2: result = 1; break; case 86400*5: result = 4; break; case 86400*7: result = 6; break; case 86400*14: result = 1; break; case (int)(86400*30.4375+0.5): result = 3; break; case (int)(86400*30.4375*2+0.5): result = 1; break; case (int)(86400*30.4375*3+0.5): result = 2; break; case (int)(86400*30.4375*6+0.5): result = 5; break; case (int)(86400*30.4375*12+0.5): result = 3; break; } return result; } /*! \internal Generates a date/time tick label for tick coordinate \a tick, based on the currently set format (\ref setDateTimeFormat) and time spec (\ref setDateTimeSpec). \seebaseclassmethod */ QString QCPAxisTickerDateTime::getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) { Q_UNUSED(precision) Q_UNUSED(formatChar) return locale.toString(keyToDateTime(tick).toTimeSpec(mDateTimeSpec), mDateTimeFormat); } /*! \internal Uses the passed \a tickStep as a guiding value and applies corrections in order to obtain non-uniform tick intervals but intuitive tick labels, e.g. falling on the same day of each month. \seebaseclassmethod */ QVector QCPAxisTickerDateTime::createTickVector(double tickStep, const QCPRange &range) { QVector result = QCPAxisTicker::createTickVector(tickStep, range); if (!result.isEmpty()) { if (mDateStrategy == dsUniformTimeInDay) { QDateTime uniformDateTime = keyToDateTime(mTickOrigin); // the time of this datetime will be set for all other ticks, if possible QDateTime tickDateTime; for (int i=0; i 15) // with leap years involved, date month may jump backwards or forwards, and needs to be corrected before setting day tickDateTime = tickDateTime.addMonths(-1); tickDateTime.setDate(QDate(tickDateTime.date().year(), tickDateTime.date().month(), thisUniformDay)); result[i] = dateTimeToKey(tickDateTime); } } } return result; } /*! A convenience method which turns \a key (in seconds since Epoch 1. Jan 1970, 00:00 UTC) into a QDateTime object. This can be used to turn axis coordinates to actual QDateTimes. The accuracy achieved by this method is one millisecond, irrespective of the used Qt version (it works around the lack of a QDateTime::fromMSecsSinceEpoch in Qt 4.6) \see dateTimeToKey */ QDateTime QCPAxisTickerDateTime::keyToDateTime(double key) { # if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) return QDateTime::fromTime_t(key).addMSecs((key-(qint64)key)*1000); # else return QDateTime::fromMSecsSinceEpoch(key*1000.0); # endif } /*! \overload A convenience method which turns a QDateTime object into a double value that corresponds to seconds since Epoch (1. Jan 1970, 00:00 UTC). This is the format used as axis coordinates by QCPAxisTickerDateTime. The accuracy achieved by this method is one millisecond, irrespective of the used Qt version (it works around the lack of a QDateTime::toMSecsSinceEpoch in Qt 4.6) \see keyToDateTime */ double QCPAxisTickerDateTime::dateTimeToKey(const QDateTime dateTime) { # if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) return dateTime.toTime_t()+dateTime.time().msec()/1000.0; # else return dateTime.toMSecsSinceEpoch()/1000.0; # endif } /*! \overload A convenience method which turns a QDate object into a double value that corresponds to seconds since Epoch (1. Jan 1970, 00:00 UTC). This is the format used as axis coordinates by QCPAxisTickerDateTime. \see keyToDateTime */ double QCPAxisTickerDateTime::dateTimeToKey(const QDate date) { # if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) return QDateTime(date).toTime_t(); # else return QDateTime(date).toMSecsSinceEpoch()/1000.0; # endif } /* end of 'src/axis/axistickerdatetime.cpp' */ /* including file 'src/axis/axistickertime.cpp', size 11747 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerTime //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxisTickerTime \brief Specialized axis ticker for time spans in units of milliseconds to days \image html axisticker-time.png This QCPAxisTicker subclass generates ticks that corresponds to time intervals. The format of the time display in the tick labels is controlled with \ref setTimeFormat and \ref setFieldWidth. The time coordinate is in the unit of seconds with respect to the time coordinate zero. Unlike with QCPAxisTickerDateTime, the ticks don't correspond to a specific calendar date and time. The time can be displayed in milliseconds, seconds, minutes, hours and days. Depending on the largest available unit in the format specified with \ref setTimeFormat, any time spans above will be carried in that largest unit. So for example if the format string is "%m:%s" and a tick at coordinate value 7815 (being 2 hours, 10 minutes and 15 seconds) is created, the resulting tick label will show "130:15" (130 minutes, 15 seconds). If the format string is "%h:%m:%s", the hour unit will be used and the label will thus be "02:10:15". Negative times with respect to the axis zero will carry a leading minus sign. The ticker can be created and assigned to an axis like this: \snippet documentation/doc-image-generator/mainwindow.cpp axistickertime-creation Here is an example of a time axis providing time information in days, hours and minutes. Due to the axis range spanning a few days and the wanted tick count (\ref setTickCount), the ticker decided to use tick steps of 12 hours: \image html axisticker-time2.png The format string for this example is \snippet documentation/doc-image-generator/mainwindow.cpp axistickertime-creation-2 \note If you rather wish to display calendar dates and times, have a look at QCPAxisTickerDateTime instead. */ /*! Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. */ QCPAxisTickerTime::QCPAxisTickerTime() : mTimeFormat(QLatin1String("%h:%m:%s")), mSmallestUnit(tuSeconds), mBiggestUnit(tuHours) { setTickCount(4); mFieldWidth[tuMilliseconds] = 3; mFieldWidth[tuSeconds] = 2; mFieldWidth[tuMinutes] = 2; mFieldWidth[tuHours] = 2; mFieldWidth[tuDays] = 1; mFormatPattern[tuMilliseconds] = QLatin1String("%z"); mFormatPattern[tuSeconds] = QLatin1String("%s"); mFormatPattern[tuMinutes] = QLatin1String("%m"); mFormatPattern[tuHours] = QLatin1String("%h"); mFormatPattern[tuDays] = QLatin1String("%d"); } /*! Sets the format that will be used to display time in the tick labels. The available patterns are: - %%z for milliseconds - %%s for seconds - %%m for minutes - %%h for hours - %%d for days The field width (zero padding) can be controlled for each unit with \ref setFieldWidth. The largest unit that appears in \a format will carry all the remaining time of a certain tick coordinate, even if it overflows the natural limit of the unit. For example, if %%m is the largest unit it might become larger than 59 in order to consume larger time values. If on the other hand %%h is available, the minutes will wrap around to zero after 59 and the time will carry to the hour digit. */ void QCPAxisTickerTime::setTimeFormat(const QString &format) { mTimeFormat = format; // determine smallest and biggest unit in format, to optimize unit replacement and allow biggest // unit to consume remaining time of a tick value and grow beyond its modulo (e.g. min > 59) mSmallestUnit = tuMilliseconds; mBiggestUnit = tuMilliseconds; bool hasSmallest = false; for (int i = tuMilliseconds; i <= tuDays; ++i) { TimeUnit unit = static_cast(i); if (mTimeFormat.contains(mFormatPattern.value(unit))) { if (!hasSmallest) { mSmallestUnit = unit; hasSmallest = true; } mBiggestUnit = unit; } } } /*! Sets the field widh of the specified \a unit to be \a width digits, when displayed in the tick label. If the number for the specific unit is shorter than \a width, it will be padded with an according number of zeros to the left in order to reach the field width. \see setTimeFormat */ void QCPAxisTickerTime::setFieldWidth(QCPAxisTickerTime::TimeUnit unit, int width) { mFieldWidth[unit] = qMax(width, 1); } /*! \internal Returns the tick step appropriate for time displays, depending on the provided \a range and the smallest available time unit in the current format (\ref setTimeFormat). For example if the unit of seconds isn't available in the format, this method will not generate steps (like 2.5 minutes) that require sub-minute precision to be displayed correctly. \seebaseclassmethod */ double QCPAxisTickerTime::getTickStep(const QCPRange &range) { double result = range.size()/(double)(mTickCount+1e-10); // mTickCount ticks on average, the small addition is to prevent jitter on exact integers if (result < 1) // ideal tick step is below 1 second -> use normal clean mantissa algorithm in units of seconds { if (mSmallestUnit == tuMilliseconds) result = qMax(cleanMantissa(result), 0.001); // smallest tick step is 1 millisecond else // have no milliseconds available in format, so stick with 1 second tickstep result = 1.0; } else if (result < 3600*24) // below a day { // the filling of availableSteps seems a bit contorted but it fills in a sorted fashion and thus saves a post-fill sorting run QVector availableSteps; // seconds range: if (mSmallestUnit <= tuSeconds) availableSteps << 1; if (mSmallestUnit == tuMilliseconds) availableSteps << 2.5; // only allow half second steps if milliseconds are there to display it else if (mSmallestUnit == tuSeconds) availableSteps << 2; if (mSmallestUnit <= tuSeconds) availableSteps << 5 << 10 << 15 << 30; // minutes range: if (mSmallestUnit <= tuMinutes) availableSteps << 1*60; if (mSmallestUnit <= tuSeconds) availableSteps << 2.5*60; // only allow half minute steps if seconds are there to display it else if (mSmallestUnit == tuMinutes) availableSteps << 2*60; if (mSmallestUnit <= tuMinutes) availableSteps << 5*60 << 10*60 << 15*60 << 30*60; // hours range: if (mSmallestUnit <= tuHours) availableSteps << 1*3600 << 2*3600 << 3*3600 << 6*3600 << 12*3600 << 24*3600; // pick available step that is most appropriate to approximate ideal step: result = pickClosest(result, availableSteps); } else // more than a day, go back to normal clean mantissa algorithm but in units of days { const double secondsPerDay = 3600*24; result = cleanMantissa(result/secondsPerDay)*secondsPerDay; } return result; } /*! \internal Returns the sub tick count appropriate for the provided \a tickStep and time displays. \seebaseclassmethod */ int QCPAxisTickerTime::getSubTickCount(double tickStep) { int result = QCPAxisTicker::getSubTickCount(tickStep); switch (qRound(tickStep)) // hand chosen subticks for specific minute/hour/day range (as specified in getTickStep) { case 5*60: result = 4; break; case 10*60: result = 1; break; case 15*60: result = 2; break; case 30*60: result = 1; break; case 60*60: result = 3; break; case 3600*2: result = 3; break; case 3600*3: result = 2; break; case 3600*6: result = 1; break; case 3600*12: result = 3; break; case 3600*24: result = 3; break; } return result; } /*! \internal Returns the tick label corresponding to the provided \a tick and the configured format and field widths (\ref setTimeFormat, \ref setFieldWidth). \seebaseclassmethod */ QString QCPAxisTickerTime::getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) { Q_UNUSED(precision) Q_UNUSED(formatChar) Q_UNUSED(locale) bool negative = tick < 0; if (negative) tick *= -1; double values[tuDays+1]; // contains the msec/sec/min/... value with its respective modulo (e.g. minute 0..59) double restValues[tuDays+1]; // contains the msec/sec/min/... value as if it's the largest available unit and thus consumes the remaining time restValues[tuMilliseconds] = tick*1000; values[tuMilliseconds] = modf(restValues[tuMilliseconds]/1000, &restValues[tuSeconds])*1000; values[tuSeconds] = modf(restValues[tuSeconds]/60, &restValues[tuMinutes])*60; values[tuMinutes] = modf(restValues[tuMinutes]/60, &restValues[tuHours])*60; values[tuHours] = modf(restValues[tuHours]/24, &restValues[tuDays])*24; // no need to set values[tuDays] because days are always a rest value (there is no higher unit so it consumes all remaining time) QString result = mTimeFormat; for (int i = mSmallestUnit; i <= mBiggestUnit; ++i) { TimeUnit iUnit = static_cast(i); replaceUnit(result, iUnit, qRound(iUnit == mBiggestUnit ? restValues[iUnit] : values[iUnit])); } if (negative) result.prepend(QLatin1Char('-')); return result; } /*! \internal Replaces all occurrences of the format pattern belonging to \a unit in \a text with the specified \a value, using the field width as specified with \ref setFieldWidth for the \a unit. */ void QCPAxisTickerTime::replaceUnit(QString &text, QCPAxisTickerTime::TimeUnit unit, int value) const { QString valueStr = QString::number(value); while (valueStr.size() < mFieldWidth.value(unit)) valueStr.prepend(QLatin1Char('0')); text.replace(mFormatPattern.value(unit), valueStr); } /* end of 'src/axis/axistickertime.cpp' */ /* including file 'src/axis/axistickerfixed.cpp', size 5583 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerFixed //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxisTickerFixed \brief Specialized axis ticker with a fixed tick step \image html axisticker-fixed.png This QCPAxisTicker subclass generates ticks with a fixed tick step set with \ref setTickStep. It is also possible to allow integer multiples and integer powers of the specified tick step with \ref setScaleStrategy. A typical application of this ticker is to make an axis only display integers, by setting the tick step of the ticker to 1.0 and the scale strategy to \ref ssMultiples. Another case is when a certain number has a special meaning and axis ticks should only appear at multiples of that value. In this case you might also want to consider \ref QCPAxisTickerPi because despite the name it is not limited to only pi symbols/values. The ticker can be created and assigned to an axis like this: \snippet documentation/doc-image-generator/mainwindow.cpp axistickerfixed-creation */ /*! Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. */ QCPAxisTickerFixed::QCPAxisTickerFixed() : mTickStep(1.0), mScaleStrategy(ssNone) { } /*! Sets the fixed tick interval to \a step. The axis ticker will only use this tick step when generating axis ticks. This might cause a very high tick density and overlapping labels if the axis range is zoomed out. Using \ref setScaleStrategy it is possible to relax the fixed step and also allow multiples or powers of \a step. This will enable the ticker to reduce the number of ticks to a reasonable amount (see \ref setTickCount). */ void QCPAxisTickerFixed::setTickStep(double step) { if (step > 0) mTickStep = step; else qDebug() << Q_FUNC_INFO << "tick step must be greater than zero:" << step; } /*! Sets whether the specified tick step (\ref setTickStep) is absolutely fixed or whether modifications may be applied to it before calculating the finally used tick step, such as permitting multiples or powers. See \ref ScaleStrategy for details. The default strategy is \ref ssNone, which means the tick step is absolutely fixed. */ void QCPAxisTickerFixed::setScaleStrategy(QCPAxisTickerFixed::ScaleStrategy strategy) { mScaleStrategy = strategy; } /*! \internal Determines the actually used tick step from the specified tick step and scale strategy (\ref setTickStep, \ref setScaleStrategy). This method either returns the specified tick step exactly, or, if the scale strategy is not \ref ssNone, a modification of it to allow varying the number of ticks in the current axis range. \seebaseclassmethod */ double QCPAxisTickerFixed::getTickStep(const QCPRange &range) { switch (mScaleStrategy) { case ssNone: { return mTickStep; } case ssMultiples: { double exactStep = range.size()/(double)(mTickCount+1e-10); // mTickCount ticks on average, the small addition is to prevent jitter on exact integers if (exactStep < mTickStep) return mTickStep; else return (qint64)(cleanMantissa(exactStep/mTickStep)+0.5)*mTickStep; } case ssPowers: { double exactStep = range.size()/(double)(mTickCount+1e-10); // mTickCount ticks on average, the small addition is to prevent jitter on exact integers return qPow(mTickStep, (int)(qLn(exactStep)/qLn(mTickStep)+0.5)); } } return mTickStep; } /* end of 'src/axis/axistickerfixed.cpp' */ /* including file 'src/axis/axistickertext.cpp', size 8653 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerText //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxisTickerText \brief Specialized axis ticker which allows arbitrary labels at specified coordinates \image html axisticker-text.png This QCPAxisTicker subclass generates ticks which can be directly specified by the user as coordinates and associated strings. They can be passed as a whole with \ref setTicks or one at a time with \ref addTick. Alternatively you can directly access the internal storage via \ref ticks and modify the tick/label data there. This is useful for cases where the axis represents categories rather than numerical values. If you are updating the ticks of this ticker regularly and in a dynamic fasion (e.g. dependent on the axis range), it is a sign that you should probably create an own ticker by subclassing QCPAxisTicker, instead of using this one. The ticker can be created and assigned to an axis like this: \snippet documentation/doc-image-generator/mainwindow.cpp axistickertext-creation */ /* start of documentation of inline functions */ /*! \fn QMap &QCPAxisTickerText::ticks() Returns a non-const reference to the internal map which stores the tick coordinates and their labels. You can access the map directly in order to add, remove or manipulate ticks, as an alternative to using the methods provided by QCPAxisTickerText, such as \ref setTicks and \ref addTick. */ /* end of documentation of inline functions */ /*! Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. */ QCPAxisTickerText::QCPAxisTickerText() : mSubTickCount(0) { } /*! \overload Sets the ticks that shall appear on the axis. The map key of \a ticks corresponds to the axis coordinate, and the map value is the string that will appear as tick label. An alternative to manipulate ticks is to directly access the internal storage with the \ref ticks getter. \see addTicks, addTick, clear */ void QCPAxisTickerText::setTicks(const QMap &ticks) { mTicks = ticks; } /*! \overload Sets the ticks that shall appear on the axis. The entries of \a positions correspond to the axis coordinates, and the entries of \a labels are the respective strings that will appear as tick labels. \see addTicks, addTick, clear */ void QCPAxisTickerText::setTicks(const QVector &positions, const QVector labels) { clear(); addTicks(positions, labels); } /*! Sets the number of sub ticks that shall appear between ticks. For QCPAxisTickerText, there is no automatic sub tick count calculation. So if sub ticks are needed, they must be configured with this method. */ void QCPAxisTickerText::setSubTickCount(int subTicks) { if (subTicks >= 0) mSubTickCount = subTicks; else qDebug() << Q_FUNC_INFO << "sub tick count can't be negative:" << subTicks; } /*! Clears all ticks. An alternative to manipulate ticks is to directly access the internal storage with the \ref ticks getter. \see setTicks, addTicks, addTick */ void QCPAxisTickerText::clear() { mTicks.clear(); } /*! Adds a single tick to the axis at the given axis coordinate \a position, with the provided tick \a label. \see addTicks, setTicks, clear */ void QCPAxisTickerText::addTick(double position, QString label) { mTicks.insert(position, label); } /*! \overload Adds the provided \a ticks to the ones already existing. The map key of \a ticks corresponds to the axis coordinate, and the map value is the string that will appear as tick label. An alternative to manipulate ticks is to directly access the internal storage with the \ref ticks getter. \see addTick, setTicks, clear */ void QCPAxisTickerText::addTicks(const QMap &ticks) { mTicks.unite(ticks); } /*! \overload Adds the provided ticks to the ones already existing. The entries of \a positions correspond to the axis coordinates, and the entries of \a labels are the respective strings that will appear as tick labels. An alternative to manipulate ticks is to directly access the internal storage with the \ref ticks getter. \see addTick, setTicks, clear */ void QCPAxisTickerText::addTicks(const QVector &positions, const QVector &labels) { if (positions.size() != labels.size()) qDebug() << Q_FUNC_INFO << "passed unequal length vectors for positions and labels:" << positions.size() << labels.size(); int n = qMin(positions.size(), labels.size()); for (int i=0; i QCPAxisTickerText::createTickVector(double tickStep, const QCPRange &range) { Q_UNUSED(tickStep) QVector result; if (mTicks.isEmpty()) return result; QMap::const_iterator start = mTicks.lowerBound(range.lower); QMap::const_iterator end = mTicks.upperBound(range.upper); // this method should try to give one tick outside of range so proper subticks can be generated: if (start != mTicks.constBegin()) --start; if (end != mTicks.constEnd()) ++end; for (QMap::const_iterator it = start; it != end; ++it) result.append(it.key()); return result; } /* end of 'src/axis/axistickertext.cpp' */ /* including file 'src/axis/axistickerpi.cpp', size 11170 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerPi //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxisTickerPi \brief Specialized axis ticker to display ticks in units of an arbitrary constant, for example pi \image html axisticker-pi.png This QCPAxisTicker subclass generates ticks that are expressed with respect to a given symbolic constant with a numerical value specified with \ref setPiValue and an appearance in the tick labels specified with \ref setPiSymbol. Ticks may be generated at fractions of the symbolic constant. How these fractions appear in the tick label can be configured with \ref setFractionStyle. The ticker can be created and assigned to an axis like this: \snippet documentation/doc-image-generator/mainwindow.cpp axistickerpi-creation */ /*! Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. */ QCPAxisTickerPi::QCPAxisTickerPi() : mPiSymbol(QLatin1String(" ")+QChar(0x03C0)), mPiValue(M_PI), mPeriodicity(0), mFractionStyle(fsUnicodeFractions), mPiTickStep(0) { setTickCount(4); } /*! Sets how the symbol part (which is always a suffix to the number) shall appear in the axis tick label. If a space shall appear between the number and the symbol, make sure the space is contained in \a symbol. */ void QCPAxisTickerPi::setPiSymbol(QString symbol) { mPiSymbol = symbol; } /*! Sets the numerical value that the symbolic constant has. This will be used to place the appropriate fractions of the symbol at the respective axis coordinates. */ void QCPAxisTickerPi::setPiValue(double pi) { mPiValue = pi; } /*! Sets whether the axis labels shall appear periodicly and if so, at which multiplicity of the symbolic constant. To disable periodicity, set \a multiplesOfPi to zero. For example, an axis that identifies 0 with 2pi would set \a multiplesOfPi to two. */ void QCPAxisTickerPi::setPeriodicity(int multiplesOfPi) { mPeriodicity = qAbs(multiplesOfPi); } /*! Sets how the numerical/fractional part preceding the symbolic constant is displayed in tick labels. See \ref FractionStyle for the various options. */ void QCPAxisTickerPi::setFractionStyle(QCPAxisTickerPi::FractionStyle style) { mFractionStyle = style; } /*! \internal Returns the tick step, using the constant's value (\ref setPiValue) as base unit. In consequence the numerical/fractional part preceding the symbolic constant is made to have a readable mantissa. \seebaseclassmethod */ double QCPAxisTickerPi::getTickStep(const QCPRange &range) { mPiTickStep = range.size()/mPiValue/(double)(mTickCount+1e-10); // mTickCount ticks on average, the small addition is to prevent jitter on exact integers mPiTickStep = cleanMantissa(mPiTickStep); return mPiTickStep*mPiValue; } /*! \internal Returns the sub tick count, using the constant's value (\ref setPiValue) as base unit. In consequence the sub ticks divide the numerical/fractional part preceding the symbolic constant reasonably, and not the total tick coordinate. \seebaseclassmethod */ int QCPAxisTickerPi::getSubTickCount(double tickStep) { return QCPAxisTicker::getSubTickCount(tickStep/mPiValue); } /*! \internal Returns the tick label as a fractional/numerical part and a symbolic string as suffix. The formatting of the fraction is done according to the specified \ref setFractionStyle. The appended symbol is specified with \ref setPiSymbol. \seebaseclassmethod */ QString QCPAxisTickerPi::getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) { double tickInPis = tick/mPiValue; if (mPeriodicity > 0) tickInPis = fmod(tickInPis, mPeriodicity); if (mFractionStyle != fsFloatingPoint && mPiTickStep > 0.09 && mPiTickStep < 50) { // simply construct fraction from decimal like 1.234 -> 1234/1000 and then simplify fraction, smaller digits are irrelevant due to mPiTickStep conditional above int denominator = 1000; int numerator = qRound(tickInPis*denominator); simplifyFraction(numerator, denominator); if (qAbs(numerator) == 1 && denominator == 1) return (numerator < 0 ? QLatin1String("-") : QLatin1String("")) + mPiSymbol.trimmed(); else if (numerator == 0) return QLatin1String("0"); else return fractionToString(numerator, denominator) + mPiSymbol; } else { if (qFuzzyIsNull(tickInPis)) return QLatin1String("0"); else if (qFuzzyCompare(qAbs(tickInPis), 1.0)) return (tickInPis < 0 ? QLatin1String("-") : QLatin1String("")) + mPiSymbol.trimmed(); else return QCPAxisTicker::getTickLabel(tickInPis, locale, formatChar, precision) + mPiSymbol; } } /*! \internal Takes the fraction given by \a numerator and \a denominator and modifies the values to make sure the fraction is in irreducible form, i.e. numerator and denominator don't share any common factors which could be cancelled. */ void QCPAxisTickerPi::simplifyFraction(int &numerator, int &denominator) const { if (numerator == 0 || denominator == 0) return; int num = numerator; int denom = denominator; while (denom != 0) // euclidean gcd algorithm { int oldDenom = denom; denom = num % denom; num = oldDenom; } // num is now gcd of numerator and denominator numerator /= num; denominator /= num; } /*! \internal Takes the fraction given by \a numerator and \a denominator and returns a string representation. The result depends on the configured fraction style (\ref setFractionStyle). This method is used to format the numerical/fractional part when generating tick labels. It simplifies the passed fraction to an irreducible form using \ref simplifyFraction and factors out any integer parts of the fraction (e.g. "10/4" becomes "2 1/2"). */ QString QCPAxisTickerPi::fractionToString(int numerator, int denominator) const { if (denominator == 0) { qDebug() << Q_FUNC_INFO << "called with zero denominator"; return QString(); } if (mFractionStyle == fsFloatingPoint) // should never be the case when calling this function { qDebug() << Q_FUNC_INFO << "shouldn't be called with fraction style fsDecimal"; return QString::number(numerator/(double)denominator); // failsafe } int sign = numerator*denominator < 0 ? -1 : 1; numerator = qAbs(numerator); denominator = qAbs(denominator); if (denominator == 1) { return QString::number(sign*numerator); } else { int integerPart = numerator/denominator; int remainder = numerator%denominator; if (remainder == 0) { return QString::number(sign*integerPart); } else { if (mFractionStyle == fsAsciiFractions) { return QString(QLatin1String("%1%2%3/%4")) .arg(sign == -1 ? QLatin1String("-") : QLatin1String("")) .arg(integerPart > 0 ? QString::number(integerPart)+QLatin1String(" ") : QLatin1String("")) .arg(remainder) .arg(denominator); } else if (mFractionStyle == fsUnicodeFractions) { return QString(QLatin1String("%1%2%3")) .arg(sign == -1 ? QLatin1String("-") : QLatin1String("")) .arg(integerPart > 0 ? QString::number(integerPart) : QLatin1String("")) .arg(unicodeFraction(remainder, denominator)); } } } return QString(); } /*! \internal Returns the unicode string representation of the fraction given by \a numerator and \a denominator. This is the representation used in \ref fractionToString when the fraction style (\ref setFractionStyle) is \ref fsUnicodeFractions. This method doesn't use the single-character common fractions but builds each fraction from a superscript unicode number, the unicode fraction character, and a subscript unicode number. */ QString QCPAxisTickerPi::unicodeFraction(int numerator, int denominator) const { return unicodeSuperscript(numerator)+QChar(0x2044)+unicodeSubscript(denominator); } /*! \internal Returns the unicode string representing \a number as superscript. This is used to build unicode fractions in \ref unicodeFraction. */ QString QCPAxisTickerPi::unicodeSuperscript(int number) const { if (number == 0) return QString(QChar(0x2070)); QString result; while (number > 0) { const int digit = number%10; switch (digit) { case 1: { result.prepend(QChar(0x00B9)); break; } case 2: { result.prepend(QChar(0x00B2)); break; } case 3: { result.prepend(QChar(0x00B3)); break; } default: { result.prepend(QChar(0x2070+digit)); break; } } number /= 10; } return result; } /*! \internal Returns the unicode string representing \a number as subscript. This is used to build unicode fractions in \ref unicodeFraction. */ QString QCPAxisTickerPi::unicodeSubscript(int number) const { if (number == 0) return QString(QChar(0x2080)); QString result; while (number > 0) { result.prepend(QChar(0x2080+number%10)); number /= 10; } return result; } /* end of 'src/axis/axistickerpi.cpp' */ /* including file 'src/axis/axistickerlog.cpp', size 7106 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisTickerLog //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxisTickerLog \brief Specialized axis ticker suited for logarithmic axes \image html axisticker-log.png This QCPAxisTicker subclass generates ticks with unequal tick intervals suited for logarithmic axis scales. The ticks are placed at powers of the specified log base (\ref setLogBase). Especially in the case of a log base equal to 10 (the default), it might be desirable to have tick labels in the form of powers of ten without mantissa display. To achieve this, set the number precision (\ref QCPAxis::setNumberPrecision) to zero and the number format (\ref QCPAxis::setNumberFormat) to scientific (exponential) display with beautifully typeset decimal powers, so a format string of "eb". This will result in the following axis tick labels: \image html axisticker-log-powers.png The ticker can be created and assigned to an axis like this: \snippet documentation/doc-image-generator/mainwindow.cpp axistickerlog-creation */ /*! Constructs the ticker and sets reasonable default values. Axis tickers are commonly created managed by a QSharedPointer, which then can be passed to QCPAxis::setTicker. */ QCPAxisTickerLog::QCPAxisTickerLog() : mLogBase(10.0), mSubTickCount(8), // generates 10 intervals mLogBaseLnInv(1.0/qLn(mLogBase)) { } /*! Sets the logarithm base used for tick coordinate generation. The ticks will be placed at integer powers of \a base. */ void QCPAxisTickerLog::setLogBase(double base) { if (base > 0) { mLogBase = base; mLogBaseLnInv = 1.0/qLn(mLogBase); } else qDebug() << Q_FUNC_INFO << "log base has to be greater than zero:" << base; } /*! Sets the number of sub ticks in a tick interval. Within each interval, the sub ticks are spaced linearly to provide a better visual guide, so the sub tick density increases toward the higher tick. Note that \a subTicks is the number of sub ticks (not sub intervals) in one tick interval. So in the case of logarithm base 10 an intuitive sub tick spacing would be achieved with eight sub ticks (the default). This means e.g. between the ticks 10 and 100 there will be eight ticks, namely at 20, 30, 40, 50, 60, 70, 80 and 90. */ void QCPAxisTickerLog::setSubTickCount(int subTicks) { if (subTicks >= 0) mSubTickCount = subTicks; else qDebug() << Q_FUNC_INFO << "sub tick count can't be negative:" << subTicks; } /*! \internal Since logarithmic tick steps are necessarily different for each tick interval, this method does nothing in the case of QCPAxisTickerLog \seebaseclassmethod */ double QCPAxisTickerLog::getTickStep(const QCPRange &range) { // Logarithmic axis ticker has unequal tick spacing, so doesn't need this method Q_UNUSED(range) return 1.0; } /*! \internal Returns the sub tick count specified in \ref setSubTickCount. For QCPAxisTickerLog, there is no automatic sub tick count calculation necessary. \seebaseclassmethod */ int QCPAxisTickerLog::getSubTickCount(double tickStep) { Q_UNUSED(tickStep) return mSubTickCount; } /*! \internal Creates ticks with a spacing given by the logarithm base and an increasing integer power in the provided \a range. The step in which the power increases tick by tick is chosen in order to keep the total number of ticks as close as possible to the tick count (\ref setTickCount). The parameter \a tickStep is ignored for QCPAxisTickerLog \seebaseclassmethod */ QVector QCPAxisTickerLog::createTickVector(double tickStep, const QCPRange &range) { Q_UNUSED(tickStep) QVector result; if (range.lower > 0 && range.upper > 0) // positive range { double exactPowerStep = qLn(range.upper/range.lower)*mLogBaseLnInv/(double)(mTickCount+1e-10); double newLogBase = qPow(mLogBase, qMax((int)cleanMantissa(exactPowerStep), 1)); double currentTick = qPow(newLogBase, qFloor(qLn(range.lower)/qLn(newLogBase))); result.append(currentTick); while (currentTick < range.upper && currentTick > 0) // currentMag might be zero for ranges ~1e-300, just cancel in that case { currentTick *= newLogBase; result.append(currentTick); } } else if (range.lower < 0 && range.upper < 0) // negative range { double exactPowerStep = qLn(range.lower/range.upper)*mLogBaseLnInv/(double)(mTickCount+1e-10); double newLogBase = qPow(mLogBase, qMax((int)cleanMantissa(exactPowerStep), 1)); double currentTick = -qPow(newLogBase, qCeil(qLn(-range.lower)/qLn(newLogBase))); result.append(currentTick); while (currentTick < range.upper && currentTick < 0) // currentMag might be zero for ranges ~1e-300, just cancel in that case { currentTick /= newLogBase; result.append(currentTick); } } else // invalid range for logarithmic scale, because lower and upper have different sign { qDebug() << Q_FUNC_INFO << "Invalid range for logarithmic plot: " << range.lower << ".." << range.upper; } return result; } /* end of 'src/axis/axistickerlog.cpp' */ /* including file 'src/axis/axis.cpp', size 99397 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPGrid //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPGrid \brief Responsible for drawing the grid of a QCPAxis. This class is tightly bound to QCPAxis. Every axis owns a grid instance and uses it to draw the grid lines, sub grid lines and zero-line. You can interact with the grid of an axis via \ref QCPAxis::grid. Normally, you don't need to create an instance of QCPGrid yourself. The axis and grid drawing was split into two classes to allow them to be placed on different layers (both QCPAxis and QCPGrid inherit from QCPLayerable). Thus it is possible to have the grid in the background and the axes in the foreground, and any plottables/items in between. This described situation is the default setup, see the QCPLayer documentation. */ /*! Creates a QCPGrid instance and sets default values. You shouldn't instantiate grids on their own, since every QCPAxis brings its own QCPGrid. */ QCPGrid::QCPGrid(QCPAxis *parentAxis) : QCPLayerable(parentAxis->parentPlot(), QString(), parentAxis), mParentAxis(parentAxis) { // warning: this is called in QCPAxis constructor, so parentAxis members should not be accessed/called setParent(parentAxis); setPen(QPen(QColor(200,200,200), 0, Qt::DotLine)); setSubGridPen(QPen(QColor(220,220,220), 0, Qt::DotLine)); setZeroLinePen(QPen(QColor(200,200,200), 0, Qt::SolidLine)); setSubGridVisible(false); setAntialiased(false); setAntialiasedSubGrid(false); setAntialiasedZeroLine(false); } /*! Sets whether grid lines at sub tick marks are drawn. \see setSubGridPen */ void QCPGrid::setSubGridVisible(bool visible) { mSubGridVisible = visible; } /*! Sets whether sub grid lines are drawn antialiased. */ void QCPGrid::setAntialiasedSubGrid(bool enabled) { mAntialiasedSubGrid = enabled; } /*! Sets whether zero lines are drawn antialiased. */ void QCPGrid::setAntialiasedZeroLine(bool enabled) { mAntialiasedZeroLine = enabled; } /*! Sets the pen with which (major) grid lines are drawn. */ void QCPGrid::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen with which sub grid lines are drawn. */ void QCPGrid::setSubGridPen(const QPen &pen) { mSubGridPen = pen; } /*! Sets the pen with which zero lines are drawn. Zero lines are lines at value coordinate 0 which may be drawn with a different pen than other grid lines. To disable zero lines and just draw normal grid lines at zero, set \a pen to Qt::NoPen. */ void QCPGrid::setZeroLinePen(const QPen &pen) { mZeroLinePen = pen; } /*! \internal A convenience function to easily set the QPainter::Antialiased hint on the provided \a painter before drawing the major grid lines. This is the antialiasing state the painter passed to the \ref draw method is in by default. This function takes into account the local setting of the antialiasing flag as well as the overrides set with \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. \see setAntialiased */ void QCPGrid::applyDefaultAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiased, QCP::aeGrid); } /*! \internal Draws grid lines and sub grid lines at the positions of (sub) ticks of the parent axis, spanning over the complete axis rect. Also draws the zero line, if appropriate (\ref setZeroLinePen). */ void QCPGrid::draw(QCPPainter *painter) { if (!mParentAxis) { qDebug() << Q_FUNC_INFO << "invalid parent axis"; return; } if (mParentAxis->subTicks() && mSubGridVisible) drawSubGridLines(painter); drawGridLines(painter); } /*! \internal Draws the main grid lines and possibly a zero line with the specified painter. This is a helper function called by \ref draw. */ void QCPGrid::drawGridLines(QCPPainter *painter) const { if (!mParentAxis) { qDebug() << Q_FUNC_INFO << "invalid parent axis"; return; } const int tickCount = mParentAxis->mTickVector.size(); double t; // helper variable, result of coordinate-to-pixel transforms if (mParentAxis->orientation() == Qt::Horizontal) { // draw zeroline: int zeroLineIndex = -1; if (mZeroLinePen.style() != Qt::NoPen && mParentAxis->mRange.lower < 0 && mParentAxis->mRange.upper > 0) { applyAntialiasingHint(painter, mAntialiasedZeroLine, QCP::aeZeroLine); painter->setPen(mZeroLinePen); double epsilon = mParentAxis->range().size()*1E-6; // for comparing double to zero for (int i=0; imTickVector.at(i)) < epsilon) { zeroLineIndex = i; t = mParentAxis->coordToPixel(mParentAxis->mTickVector.at(i)); // x painter->drawLine(QLineF(t, mParentAxis->mAxisRect->bottom(), t, mParentAxis->mAxisRect->top())); break; } } } // draw grid lines: applyDefaultAntialiasingHint(painter); painter->setPen(mPen); for (int i=0; icoordToPixel(mParentAxis->mTickVector.at(i)); // x painter->drawLine(QLineF(t, mParentAxis->mAxisRect->bottom(), t, mParentAxis->mAxisRect->top())); } } else { // draw zeroline: int zeroLineIndex = -1; if (mZeroLinePen.style() != Qt::NoPen && mParentAxis->mRange.lower < 0 && mParentAxis->mRange.upper > 0) { applyAntialiasingHint(painter, mAntialiasedZeroLine, QCP::aeZeroLine); painter->setPen(mZeroLinePen); double epsilon = mParentAxis->mRange.size()*1E-6; // for comparing double to zero for (int i=0; imTickVector.at(i)) < epsilon) { zeroLineIndex = i; t = mParentAxis->coordToPixel(mParentAxis->mTickVector.at(i)); // y painter->drawLine(QLineF(mParentAxis->mAxisRect->left(), t, mParentAxis->mAxisRect->right(), t)); break; } } } // draw grid lines: applyDefaultAntialiasingHint(painter); painter->setPen(mPen); for (int i=0; icoordToPixel(mParentAxis->mTickVector.at(i)); // y painter->drawLine(QLineF(mParentAxis->mAxisRect->left(), t, mParentAxis->mAxisRect->right(), t)); } } } /*! \internal Draws the sub grid lines with the specified painter. This is a helper function called by \ref draw. */ void QCPGrid::drawSubGridLines(QCPPainter *painter) const { if (!mParentAxis) { qDebug() << Q_FUNC_INFO << "invalid parent axis"; return; } applyAntialiasingHint(painter, mAntialiasedSubGrid, QCP::aeSubGrid); double t; // helper variable, result of coordinate-to-pixel transforms painter->setPen(mSubGridPen); if (mParentAxis->orientation() == Qt::Horizontal) { for (int i=0; imSubTickVector.size(); ++i) { t = mParentAxis->coordToPixel(mParentAxis->mSubTickVector.at(i)); // x painter->drawLine(QLineF(t, mParentAxis->mAxisRect->bottom(), t, mParentAxis->mAxisRect->top())); } } else { for (int i=0; imSubTickVector.size(); ++i) { t = mParentAxis->coordToPixel(mParentAxis->mSubTickVector.at(i)); // y painter->drawLine(QLineF(mParentAxis->mAxisRect->left(), t, mParentAxis->mAxisRect->right(), t)); } } } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxis //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxis \brief Manages a single axis inside a QCustomPlot. Usually doesn't need to be instantiated externally. Access %QCustomPlot's default four axes via QCustomPlot::xAxis (bottom), QCustomPlot::yAxis (left), QCustomPlot::xAxis2 (top) and QCustomPlot::yAxis2 (right). Axes are always part of an axis rect, see QCPAxisRect. \image html AxisNamesOverview.png
Naming convention of axis parts
\n \image html AxisRectSpacingOverview.png
Overview of the spacings and paddings that define the geometry of an axis. The dashed gray line on the left represents the QCustomPlot widget border.
Each axis holds an instance of QCPAxisTicker which is used to generate the tick coordinates and tick labels. You can access the currently installed \ref ticker or set a new one (possibly one of the specialized subclasses, or your own subclass) via \ref setTicker. For details, see the documentation of QCPAxisTicker. */ /* start of documentation of inline functions */ /*! \fn Qt::Orientation QCPAxis::orientation() const Returns the orientation of this axis. The axis orientation (horizontal or vertical) is deduced from the axis type (left, top, right or bottom). \see orientation(AxisType type), pixelOrientation */ /*! \fn QCPGrid *QCPAxis::grid() const Returns the \ref QCPGrid instance belonging to this axis. Access it to set details about the way the grid is displayed. */ /*! \fn static Qt::Orientation QCPAxis::orientation(AxisType type) Returns the orientation of the specified axis type \see orientation(), pixelOrientation */ /*! \fn int QCPAxis::pixelOrientation() const Returns which direction points towards higher coordinate values/keys, in pixel space. This method returns either 1 or -1. If it returns 1, then going in the positive direction along the orientation of the axis in pixels corresponds to going from lower to higher axis coordinates. On the other hand, if this method returns -1, going to smaller pixel values corresponds to going from lower to higher axis coordinates. For example, this is useful to easily shift axis coordinates by a certain amount given in pixels, without having to care about reversed or vertically aligned axes: \code double newKey = keyAxis->pixelToCoord(keyAxis->coordToPixel(oldKey)+10*keyAxis->pixelOrientation()); \endcode \a newKey will then contain a key that is ten pixels towards higher keys, starting from \a oldKey. */ /*! \fn QSharedPointer QCPAxis::ticker() const Returns a modifiable shared pointer to the currently installed axis ticker. The axis ticker is responsible for generating the tick positions and tick labels of this axis. You can access the \ref QCPAxisTicker with this method and modify basic properties such as the approximate tick count (\ref QCPAxisTicker::setTickCount). You can gain more control over the axis ticks by setting a different \ref QCPAxisTicker subclass, see the documentation there. A new axis ticker can be set with \ref setTicker. Since the ticker is stored in the axis as a shared pointer, multiple axes may share the same axis ticker simply by passing the same shared pointer to multiple axes. \see setTicker */ /* end of documentation of inline functions */ /* start of documentation of signals */ /*! \fn void QCPAxis::rangeChanged(const QCPRange &newRange) This signal is emitted when the range of this axis has changed. You can connect it to the \ref setRange slot of another axis to communicate the new range to the other axis, in order for it to be synchronized. You may also manipulate/correct the range with \ref setRange in a slot connected to this signal. This is useful if for example a maximum range span shall not be exceeded, or if the lower/upper range shouldn't go beyond certain values (see \ref QCPRange::bounded). For example, the following slot would limit the x axis to ranges between 0 and 10: \code customPlot->xAxis->setRange(newRange.bounded(0, 10)) \endcode */ /*! \fn void QCPAxis::rangeChanged(const QCPRange &newRange, const QCPRange &oldRange) \overload Additionally to the new range, this signal also provides the previous range held by the axis as \a oldRange. */ /*! \fn void QCPAxis::scaleTypeChanged(QCPAxis::ScaleType scaleType); This signal is emitted when the scale type changes, by calls to \ref setScaleType */ /*! \fn void QCPAxis::selectionChanged(QCPAxis::SelectableParts selection) This signal is emitted when the selection state of this axis has changed, either by user interaction or by a direct call to \ref setSelectedParts. */ /*! \fn void QCPAxis::selectableChanged(const QCPAxis::SelectableParts &parts); This signal is emitted when the selectability changes, by calls to \ref setSelectableParts */ /* end of documentation of signals */ /*! Constructs an Axis instance of Type \a type for the axis rect \a parent. Usually it isn't necessary to instantiate axes directly, because you can let QCustomPlot create them for you with \ref QCPAxisRect::addAxis. If you want to use own QCPAxis-subclasses however, create them manually and then inject them also via \ref QCPAxisRect::addAxis. */ QCPAxis::QCPAxis(QCPAxisRect *parent, AxisType type) : QCPLayerable(parent->parentPlot(), QString(), parent), // axis base: mAxisType(type), mAxisRect(parent), mPadding(5), mOrientation(orientation(type)), mSelectableParts(spAxis | spTickLabels | spAxisLabel), mSelectedParts(spNone), mBasePen(QPen(Qt::black, 0, Qt::SolidLine, Qt::SquareCap)), mSelectedBasePen(QPen(Qt::blue, 2)), // axis label: mLabel(), mLabelFont(mParentPlot->font()), mSelectedLabelFont(QFont(mLabelFont.family(), mLabelFont.pointSize(), QFont::Bold)), mLabelColor(Qt::black), mSelectedLabelColor(Qt::blue), // tick labels: mTickLabels(true), mTickLabelFont(mParentPlot->font()), mSelectedTickLabelFont(QFont(mTickLabelFont.family(), mTickLabelFont.pointSize(), QFont::Bold)), mTickLabelColor(Qt::black), mSelectedTickLabelColor(Qt::blue), mNumberPrecision(6), mNumberFormatChar('g'), mNumberBeautifulPowers(true), // ticks and subticks: mTicks(true), mSubTicks(true), mTickPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::SquareCap)), mSelectedTickPen(QPen(Qt::blue, 2)), mSubTickPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::SquareCap)), mSelectedSubTickPen(QPen(Qt::blue, 2)), // scale and range: mRange(0, 5), mRangeReversed(false), mScaleType(stLinear), // internal members: mGrid(new QCPGrid(this)), mAxisPainter(new QCPAxisPainterPrivate(parent->parentPlot())), mTicker(new QCPAxisTicker), mCachedMarginValid(false), mCachedMargin(0) { setParent(parent); mGrid->setVisible(false); setAntialiased(false); setLayer(mParentPlot->currentLayer()); // it's actually on that layer already, but we want it in front of the grid, so we place it on there again if (type == atTop) { setTickLabelPadding(3); setLabelPadding(6); } else if (type == atRight) { setTickLabelPadding(7); setLabelPadding(12); } else if (type == atBottom) { setTickLabelPadding(3); setLabelPadding(3); } else if (type == atLeft) { setTickLabelPadding(5); setLabelPadding(10); } } QCPAxis::~QCPAxis() { delete mAxisPainter; delete mGrid; // delete grid here instead of via parent ~QObject for better defined deletion order } /* No documentation as it is a property getter */ int QCPAxis::tickLabelPadding() const { return mAxisPainter->tickLabelPadding; } /* No documentation as it is a property getter */ double QCPAxis::tickLabelRotation() const { return mAxisPainter->tickLabelRotation; } /* No documentation as it is a property getter */ QCPAxis::LabelSide QCPAxis::tickLabelSide() const { return mAxisPainter->tickLabelSide; } /* No documentation as it is a property getter */ QString QCPAxis::numberFormat() const { QString result; result.append(mNumberFormatChar); if (mNumberBeautifulPowers) { result.append(QLatin1Char('b')); if (mAxisPainter->numberMultiplyCross) result.append(QLatin1Char('c')); } return result; } /* No documentation as it is a property getter */ int QCPAxis::tickLengthIn() const { return mAxisPainter->tickLengthIn; } /* No documentation as it is a property getter */ int QCPAxis::tickLengthOut() const { return mAxisPainter->tickLengthOut; } /* No documentation as it is a property getter */ int QCPAxis::subTickLengthIn() const { return mAxisPainter->subTickLengthIn; } /* No documentation as it is a property getter */ int QCPAxis::subTickLengthOut() const { return mAxisPainter->subTickLengthOut; } /* No documentation as it is a property getter */ int QCPAxis::labelPadding() const { return mAxisPainter->labelPadding; } /* No documentation as it is a property getter */ int QCPAxis::offset() const { return mAxisPainter->offset; } /* No documentation as it is a property getter */ QCPLineEnding QCPAxis::lowerEnding() const { return mAxisPainter->lowerEnding; } /* No documentation as it is a property getter */ QCPLineEnding QCPAxis::upperEnding() const { return mAxisPainter->upperEnding; } /*! Sets whether the axis uses a linear scale or a logarithmic scale. Note that this method controls the coordinate transformation. You will likely also want to use a logarithmic tick spacing and labeling, which can be achieved by setting an instance of \ref QCPAxisTickerLog via \ref setTicker. See the documentation of \ref QCPAxisTickerLog about the details of logarithmic axis tick creation. \ref setNumberPrecision */ void QCPAxis::setScaleType(QCPAxis::ScaleType type) { if (mScaleType != type) { mScaleType = type; if (mScaleType == stLogarithmic) setRange(mRange.sanitizedForLogScale()); mCachedMarginValid = false; emit scaleTypeChanged(mScaleType); } } /*! Sets the range of the axis. This slot may be connected with the \ref rangeChanged signal of another axis so this axis is always synchronized with the other axis range, when it changes. To invert the direction of an axis, use \ref setRangeReversed. */ void QCPAxis::setRange(const QCPRange &range) { if (range.lower == mRange.lower && range.upper == mRange.upper) return; if (!QCPRange::validRange(range)) return; QCPRange oldRange = mRange; if (mScaleType == stLogarithmic) { mRange = range.sanitizedForLogScale(); } else { mRange = range.sanitizedForLinScale(); } emit rangeChanged(mRange); emit rangeChanged(mRange, oldRange); } /*! Sets whether the user can (de-)select the parts in \a selectable by clicking on the QCustomPlot surface. (When \ref QCustomPlot::setInteractions contains iSelectAxes.) However, even when \a selectable is set to a value not allowing the selection of a specific part, it is still possible to set the selection of this part manually, by calling \ref setSelectedParts directly. \see SelectablePart, setSelectedParts */ void QCPAxis::setSelectableParts(const SelectableParts &selectable) { if (mSelectableParts != selectable) { mSelectableParts = selectable; emit selectableChanged(mSelectableParts); } } /*! Sets the selected state of the respective axis parts described by \ref SelectablePart. When a part is selected, it uses a different pen/font. The entire selection mechanism for axes is handled automatically when \ref QCustomPlot::setInteractions contains iSelectAxes. You only need to call this function when you wish to change the selection state manually. This function can change the selection state of a part, independent of the \ref setSelectableParts setting. emits the \ref selectionChanged signal when \a selected is different from the previous selection state. \see SelectablePart, setSelectableParts, selectTest, setSelectedBasePen, setSelectedTickPen, setSelectedSubTickPen, setSelectedTickLabelFont, setSelectedLabelFont, setSelectedTickLabelColor, setSelectedLabelColor */ void QCPAxis::setSelectedParts(const SelectableParts &selected) { if (mSelectedParts != selected) { mSelectedParts = selected; emit selectionChanged(mSelectedParts); } } /*! \overload Sets the lower and upper bound of the axis range. To invert the direction of an axis, use \ref setRangeReversed. There is also a slot to set a range, see \ref setRange(const QCPRange &range). */ void QCPAxis::setRange(double lower, double upper) { if (lower == mRange.lower && upper == mRange.upper) return; if (!QCPRange::validRange(lower, upper)) return; QCPRange oldRange = mRange; mRange.lower = lower; mRange.upper = upper; if (mScaleType == stLogarithmic) { mRange = mRange.sanitizedForLogScale(); } else { mRange = mRange.sanitizedForLinScale(); } emit rangeChanged(mRange); emit rangeChanged(mRange, oldRange); } /*! \overload Sets the range of the axis. The \a position coordinate indicates together with the \a alignment parameter, where the new range will be positioned. \a size defines the size of the new axis range. \a alignment may be Qt::AlignLeft, Qt::AlignRight or Qt::AlignCenter. This will cause the left border, right border, or center of the range to be aligned with \a position. Any other values of \a alignment will default to Qt::AlignCenter. */ void QCPAxis::setRange(double position, double size, Qt::AlignmentFlag alignment) { if (alignment == Qt::AlignLeft) setRange(position, position+size); else if (alignment == Qt::AlignRight) setRange(position-size, position); else // alignment == Qt::AlignCenter setRange(position-size/2.0, position+size/2.0); } /*! Sets the lower bound of the axis range. The upper bound is not changed. \see setRange */ void QCPAxis::setRangeLower(double lower) { if (mRange.lower == lower) return; QCPRange oldRange = mRange; mRange.lower = lower; if (mScaleType == stLogarithmic) { mRange = mRange.sanitizedForLogScale(); } else { mRange = mRange.sanitizedForLinScale(); } emit rangeChanged(mRange); emit rangeChanged(mRange, oldRange); } /*! Sets the upper bound of the axis range. The lower bound is not changed. \see setRange */ void QCPAxis::setRangeUpper(double upper) { if (mRange.upper == upper) return; QCPRange oldRange = mRange; mRange.upper = upper; if (mScaleType == stLogarithmic) { mRange = mRange.sanitizedForLogScale(); } else { mRange = mRange.sanitizedForLinScale(); } emit rangeChanged(mRange); emit rangeChanged(mRange, oldRange); } /*! Sets whether the axis range (direction) is displayed reversed. Normally, the values on horizontal axes increase left to right, on vertical axes bottom to top. When \a reversed is set to true, the direction of increasing values is inverted. Note that the range and data interface stays the same for reversed axes, e.g. the \a lower part of the \ref setRange interface will still reference the mathematically smaller number than the \a upper part. */ void QCPAxis::setRangeReversed(bool reversed) { mRangeReversed = reversed; } /*! The axis ticker is responsible for generating the tick positions and tick labels. See the documentation of QCPAxisTicker for details on how to work with axis tickers. You can change the tick positioning/labeling behaviour of this axis by setting a different QCPAxisTicker subclass using this method. If you only wish to modify the currently installed axis ticker, access it via \ref ticker. Since the ticker is stored in the axis as a shared pointer, multiple axes may share the same axis ticker simply by passing the same shared pointer to multiple axes. \see ticker */ void QCPAxis::setTicker(QSharedPointer ticker) { if (ticker) mTicker = ticker; else qDebug() << Q_FUNC_INFO << "can not set 0 as axis ticker"; // no need to invalidate margin cache here because produced tick labels are checked for changes in setupTickVector } /*! Sets whether tick marks are displayed. Note that setting \a show to false does not imply that tick labels are invisible, too. To achieve that, see \ref setTickLabels. \see setSubTicks */ void QCPAxis::setTicks(bool show) { if (mTicks != show) { mTicks = show; mCachedMarginValid = false; } } /*! Sets whether tick labels are displayed. Tick labels are the numbers drawn next to tick marks. */ void QCPAxis::setTickLabels(bool show) { if (mTickLabels != show) { mTickLabels = show; mCachedMarginValid = false; if (!mTickLabels) mTickVectorLabels.clear(); } } /*! Sets the distance between the axis base line (including any outward ticks) and the tick labels. \see setLabelPadding, setPadding */ void QCPAxis::setTickLabelPadding(int padding) { if (mAxisPainter->tickLabelPadding != padding) { mAxisPainter->tickLabelPadding = padding; mCachedMarginValid = false; } } /*! Sets the font of the tick labels. \see setTickLabels, setTickLabelColor */ void QCPAxis::setTickLabelFont(const QFont &font) { if (font != mTickLabelFont) { mTickLabelFont = font; mCachedMarginValid = false; } } /*! Sets the color of the tick labels. \see setTickLabels, setTickLabelFont */ void QCPAxis::setTickLabelColor(const QColor &color) { mTickLabelColor = color; } /*! Sets the rotation of the tick labels. If \a degrees is zero, the labels are drawn normally. Else, the tick labels are drawn rotated by \a degrees clockwise. The specified angle is bound to values from -90 to 90 degrees. If \a degrees is exactly -90, 0 or 90, the tick labels are centered on the tick coordinate. For other angles, the label is drawn with an offset such that it seems to point toward or away from the tick mark. */ void QCPAxis::setTickLabelRotation(double degrees) { if (!qFuzzyIsNull(degrees-mAxisPainter->tickLabelRotation)) { mAxisPainter->tickLabelRotation = qBound(-90.0, degrees, 90.0); mCachedMarginValid = false; } } /*! Sets whether the tick labels (numbers) shall appear inside or outside the axis rect. The usual and default setting is \ref lsOutside. Very compact plots sometimes require tick labels to be inside the axis rect, to save space. If \a side is set to \ref lsInside, the tick labels appear on the inside are additionally clipped to the axis rect. */ void QCPAxis::setTickLabelSide(LabelSide side) { mAxisPainter->tickLabelSide = side; mCachedMarginValid = false; } /*! Sets the number format for the numbers in tick labels. This \a formatCode is an extended version of the format code used e.g. by QString::number() and QLocale::toString(). For reference about that, see the "Argument Formats" section in the detailed description of the QString class. \a formatCode is a string of one, two or three characters. The first character is identical to the normal format code used by Qt. In short, this means: 'e'/'E' scientific format, 'f' fixed format, 'g'/'G' scientific or fixed, whichever is shorter. The second and third characters are optional and specific to QCustomPlot:\n If the first char was 'e' or 'g', numbers are/might be displayed in the scientific format, e.g. "5.5e9", which is ugly in a plot. So when the second char of \a formatCode is set to 'b' (for "beautiful"), those exponential numbers are formatted in a more natural way, i.e. "5.5 [multiplication sign] 10 [superscript] 9". By default, the multiplication sign is a centered dot. If instead a cross should be shown (as is usual in the USA), the third char of \a formatCode can be set to 'c'. The inserted multiplication signs are the UTF-8 characters 215 (0xD7) for the cross and 183 (0xB7) for the dot. Examples for \a formatCode: \li \c g normal format code behaviour. If number is small, fixed format is used, if number is large, normal scientific format is used \li \c gb If number is small, fixed format is used, if number is large, scientific format is used with beautifully typeset decimal powers and a dot as multiplication sign \li \c ebc All numbers are in scientific format with beautifully typeset decimal power and a cross as multiplication sign \li \c fb illegal format code, since fixed format doesn't support (or need) beautifully typeset decimal powers. Format code will be reduced to 'f'. \li \c hello illegal format code, since first char is not 'e', 'E', 'f', 'g' or 'G'. Current format code will not be changed. */ void QCPAxis::setNumberFormat(const QString &formatCode) { if (formatCode.isEmpty()) { qDebug() << Q_FUNC_INFO << "Passed formatCode is empty"; return; } mCachedMarginValid = false; // interpret first char as number format char: QString allowedFormatChars(QLatin1String("eEfgG")); if (allowedFormatChars.contains(formatCode.at(0))) { mNumberFormatChar = QLatin1Char(formatCode.at(0).toLatin1()); } else { qDebug() << Q_FUNC_INFO << "Invalid number format code (first char not in 'eEfgG'):" << formatCode; return; } if (formatCode.length() < 2) { mNumberBeautifulPowers = false; mAxisPainter->numberMultiplyCross = false; return; } // interpret second char as indicator for beautiful decimal powers: if (formatCode.at(1) == QLatin1Char('b') && (mNumberFormatChar == QLatin1Char('e') || mNumberFormatChar == QLatin1Char('g'))) { mNumberBeautifulPowers = true; } else { qDebug() << Q_FUNC_INFO << "Invalid number format code (second char not 'b' or first char neither 'e' nor 'g'):" << formatCode; return; } if (formatCode.length() < 3) { mAxisPainter->numberMultiplyCross = false; return; } // interpret third char as indicator for dot or cross multiplication symbol: if (formatCode.at(2) == QLatin1Char('c')) { mAxisPainter->numberMultiplyCross = true; } else if (formatCode.at(2) == QLatin1Char('d')) { mAxisPainter->numberMultiplyCross = false; } else { qDebug() << Q_FUNC_INFO << "Invalid number format code (third char neither 'c' nor 'd'):" << formatCode; return; } } /*! Sets the precision of the tick label numbers. See QLocale::toString(double i, char f, int prec) for details. The effect of precisions are most notably for number Formats starting with 'e', see \ref setNumberFormat */ void QCPAxis::setNumberPrecision(int precision) { if (mNumberPrecision != precision) { mNumberPrecision = precision; mCachedMarginValid = false; } } /*! Sets the length of the ticks in pixels. \a inside is the length the ticks will reach inside the plot and \a outside is the length they will reach outside the plot. If \a outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks. \see setSubTickLength, setTickLengthIn, setTickLengthOut */ void QCPAxis::setTickLength(int inside, int outside) { setTickLengthIn(inside); setTickLengthOut(outside); } /*! Sets the length of the inward ticks in pixels. \a inside is the length the ticks will reach inside the plot. \see setTickLengthOut, setTickLength, setSubTickLength */ void QCPAxis::setTickLengthIn(int inside) { if (mAxisPainter->tickLengthIn != inside) { mAxisPainter->tickLengthIn = inside; } } /*! Sets the length of the outward ticks in pixels. \a outside is the length the ticks will reach outside the plot. If \a outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks. \see setTickLengthIn, setTickLength, setSubTickLength */ void QCPAxis::setTickLengthOut(int outside) { if (mAxisPainter->tickLengthOut != outside) { mAxisPainter->tickLengthOut = outside; mCachedMarginValid = false; // only outside tick length can change margin } } /*! Sets whether sub tick marks are displayed. Sub ticks are only potentially visible if (major) ticks are also visible (see \ref setTicks) \see setTicks */ void QCPAxis::setSubTicks(bool show) { if (mSubTicks != show) { mSubTicks = show; mCachedMarginValid = false; } } /*! Sets the length of the subticks in pixels. \a inside is the length the subticks will reach inside the plot and \a outside is the length they will reach outside the plot. If \a outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks. \see setTickLength, setSubTickLengthIn, setSubTickLengthOut */ void QCPAxis::setSubTickLength(int inside, int outside) { setSubTickLengthIn(inside); setSubTickLengthOut(outside); } /*! Sets the length of the inward subticks in pixels. \a inside is the length the subticks will reach inside the plot. \see setSubTickLengthOut, setSubTickLength, setTickLength */ void QCPAxis::setSubTickLengthIn(int inside) { if (mAxisPainter->subTickLengthIn != inside) { mAxisPainter->subTickLengthIn = inside; } } /*! Sets the length of the outward subticks in pixels. \a outside is the length the subticks will reach outside the plot. If \a outside is greater than zero, the tick labels will increase their distance to the axis accordingly, so they won't collide with the ticks. \see setSubTickLengthIn, setSubTickLength, setTickLength */ void QCPAxis::setSubTickLengthOut(int outside) { if (mAxisPainter->subTickLengthOut != outside) { mAxisPainter->subTickLengthOut = outside; mCachedMarginValid = false; // only outside tick length can change margin } } /*! Sets the pen, the axis base line is drawn with. \see setTickPen, setSubTickPen */ void QCPAxis::setBasePen(const QPen &pen) { mBasePen = pen; } /*! Sets the pen, tick marks will be drawn with. \see setTickLength, setBasePen */ void QCPAxis::setTickPen(const QPen &pen) { mTickPen = pen; } /*! Sets the pen, subtick marks will be drawn with. \see setSubTickCount, setSubTickLength, setBasePen */ void QCPAxis::setSubTickPen(const QPen &pen) { mSubTickPen = pen; } /*! Sets the font of the axis label. \see setLabelColor */ void QCPAxis::setLabelFont(const QFont &font) { if (mLabelFont != font) { mLabelFont = font; mCachedMarginValid = false; } } /*! Sets the color of the axis label. \see setLabelFont */ void QCPAxis::setLabelColor(const QColor &color) { mLabelColor = color; } /*! Sets the text of the axis label that will be shown below/above or next to the axis, depending on its orientation. To disable axis labels, pass an empty string as \a str. */ void QCPAxis::setLabel(const QString &str) { if (mLabel != str) { mLabel = str; mCachedMarginValid = false; } } /*! Sets the distance between the tick labels and the axis label. \see setTickLabelPadding, setPadding */ void QCPAxis::setLabelPadding(int padding) { if (mAxisPainter->labelPadding != padding) { mAxisPainter->labelPadding = padding; mCachedMarginValid = false; } } /*! Sets the padding of the axis. When \ref QCPAxisRect::setAutoMargins is enabled, the padding is the additional outer most space, that is left blank. The axis padding has no meaning if \ref QCPAxisRect::setAutoMargins is disabled. \see setLabelPadding, setTickLabelPadding */ void QCPAxis::setPadding(int padding) { if (mPadding != padding) { mPadding = padding; mCachedMarginValid = false; } } /*! Sets the offset the axis has to its axis rect side. If an axis rect side has multiple axes and automatic margin calculation is enabled for that side, only the offset of the inner most axis has meaning (even if it is set to be invisible). The offset of the other, outer axes is controlled automatically, to place them at appropriate positions. */ void QCPAxis::setOffset(int offset) { mAxisPainter->offset = offset; } /*! Sets the font that is used for tick labels when they are selected. \see setTickLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions */ void QCPAxis::setSelectedTickLabelFont(const QFont &font) { if (font != mSelectedTickLabelFont) { mSelectedTickLabelFont = font; // don't set mCachedMarginValid to false here because margin calculation is always done with non-selected fonts } } /*! Sets the font that is used for the axis label when it is selected. \see setLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions */ void QCPAxis::setSelectedLabelFont(const QFont &font) { mSelectedLabelFont = font; // don't set mCachedMarginValid to false here because margin calculation is always done with non-selected fonts } /*! Sets the color that is used for tick labels when they are selected. \see setTickLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions */ void QCPAxis::setSelectedTickLabelColor(const QColor &color) { if (color != mSelectedTickLabelColor) { mSelectedTickLabelColor = color; } } /*! Sets the color that is used for the axis label when it is selected. \see setLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions */ void QCPAxis::setSelectedLabelColor(const QColor &color) { mSelectedLabelColor = color; } /*! Sets the pen that is used to draw the axis base line when selected. \see setBasePen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions */ void QCPAxis::setSelectedBasePen(const QPen &pen) { mSelectedBasePen = pen; } /*! Sets the pen that is used to draw the (major) ticks when selected. \see setTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions */ void QCPAxis::setSelectedTickPen(const QPen &pen) { mSelectedTickPen = pen; } /*! Sets the pen that is used to draw the subticks when selected. \see setSubTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions */ void QCPAxis::setSelectedSubTickPen(const QPen &pen) { mSelectedSubTickPen = pen; } /*! Sets the style for the lower axis ending. See the documentation of QCPLineEnding for available styles. For horizontal axes, this method refers to the left ending, for vertical axes the bottom ending. Note that this meaning does not change when the axis range is reversed with \ref setRangeReversed. \see setUpperEnding */ void QCPAxis::setLowerEnding(const QCPLineEnding &ending) { mAxisPainter->lowerEnding = ending; } /*! Sets the style for the upper axis ending. See the documentation of QCPLineEnding for available styles. For horizontal axes, this method refers to the right ending, for vertical axes the top ending. Note that this meaning does not change when the axis range is reversed with \ref setRangeReversed. \see setLowerEnding */ void QCPAxis::setUpperEnding(const QCPLineEnding &ending) { mAxisPainter->upperEnding = ending; } /*! If the scale type (\ref setScaleType) is \ref stLinear, \a diff is added to the lower and upper bounds of the range. The range is simply moved by \a diff. If the scale type is \ref stLogarithmic, the range bounds are multiplied by \a diff. This corresponds to an apparent "linear" move in logarithmic scaling by a distance of log(diff). */ void QCPAxis::moveRange(double diff) { QCPRange oldRange = mRange; if (mScaleType == stLinear) { mRange.lower += diff; mRange.upper += diff; } else // mScaleType == stLogarithmic { mRange.lower *= diff; mRange.upper *= diff; } emit rangeChanged(mRange); emit rangeChanged(mRange, oldRange); } /*! Scales the range of this axis by \a factor around the center of the current axis range. For example, if \a factor is 2.0, then the axis range will double its size, and the point at the axis range center won't have changed its position in the QCustomPlot widget (i.e. coordinates around the center will have moved symmetrically closer). If you wish to scale around a different coordinate than the current axis range center, use the overload \ref scaleRange(double factor, double center). */ void QCPAxis::scaleRange(double factor) { scaleRange(factor, range().center()); } /*! \overload Scales the range of this axis by \a factor around the coordinate \a center. For example, if \a factor is 2.0, \a center is 1.0, then the axis range will double its size, and the point at coordinate 1.0 won't have changed its position in the QCustomPlot widget (i.e. coordinates around 1.0 will have moved symmetrically closer to 1.0). \see scaleRange(double factor) */ void QCPAxis::scaleRange(double factor, double center) { QCPRange oldRange = mRange; if (mScaleType == stLinear) { QCPRange newRange; newRange.lower = (mRange.lower-center)*factor + center; newRange.upper = (mRange.upper-center)*factor + center; if (QCPRange::validRange(newRange)) mRange = newRange.sanitizedForLinScale(); } else // mScaleType == stLogarithmic { if ((mRange.upper < 0 && center < 0) || (mRange.upper > 0 && center > 0)) // make sure center has same sign as range { QCPRange newRange; newRange.lower = qPow(mRange.lower/center, factor)*center; newRange.upper = qPow(mRange.upper/center, factor)*center; if (QCPRange::validRange(newRange)) mRange = newRange.sanitizedForLogScale(); } else qDebug() << Q_FUNC_INFO << "Center of scaling operation doesn't lie in same logarithmic sign domain as range:" << center; } emit rangeChanged(mRange); emit rangeChanged(mRange, oldRange); } /*! Scales the range of this axis to have a certain scale \a ratio to \a otherAxis. The scaling will be done around the center of the current axis range. For example, if \a ratio is 1, this axis is the \a yAxis and \a otherAxis is \a xAxis, graphs plotted with those axes will appear in a 1:1 aspect ratio, independent of the aspect ratio the axis rect has. This is an operation that changes the range of this axis once, it doesn't fix the scale ratio indefinitely. Note that calling this function in the constructor of the QCustomPlot's parent won't have the desired effect, since the widget dimensions aren't defined yet, and a resizeEvent will follow. */ void QCPAxis::setScaleRatio(const QCPAxis *otherAxis, double ratio) { int otherPixelSize, ownPixelSize; if (otherAxis->orientation() == Qt::Horizontal) otherPixelSize = otherAxis->axisRect()->width(); else otherPixelSize = otherAxis->axisRect()->height(); if (orientation() == Qt::Horizontal) ownPixelSize = axisRect()->width(); else ownPixelSize = axisRect()->height(); double newRangeSize = ratio*otherAxis->range().size()*ownPixelSize/(double)otherPixelSize; setRange(range().center(), newRangeSize, Qt::AlignCenter); } /*! Changes the axis range such that all plottables associated with this axis are fully visible in that dimension. \see QCPAbstractPlottable::rescaleAxes, QCustomPlot::rescaleAxes */ void QCPAxis::rescale(bool onlyVisiblePlottables) { QList p = plottables(); QCPRange newRange; bool haveRange = false; for (int i=0; irealVisibility() && onlyVisiblePlottables) continue; QCPRange plottableRange; bool currentFoundRange; QCP::SignDomain signDomain = QCP::sdBoth; if (mScaleType == stLogarithmic) signDomain = (mRange.upper < 0 ? QCP::sdNegative : QCP::sdPositive); if (p.at(i)->keyAxis() == this) plottableRange = p.at(i)->getKeyRange(currentFoundRange, signDomain); else plottableRange = p.at(i)->getValueRange(currentFoundRange, signDomain); if (currentFoundRange) { if (!haveRange) newRange = plottableRange; else newRange.expand(plottableRange); haveRange = true; } } if (haveRange) { if (!QCPRange::validRange(newRange)) // likely due to range being zero (plottable has only constant data in this axis dimension), shift current range to at least center the plottable { double center = (newRange.lower+newRange.upper)*0.5; // upper and lower should be equal anyway, but just to make sure, incase validRange returned false for other reason if (mScaleType == stLinear) { newRange.lower = center-mRange.size()/2.0; newRange.upper = center+mRange.size()/2.0; } else // mScaleType == stLogarithmic { newRange.lower = center/qSqrt(mRange.upper/mRange.lower); newRange.upper = center*qSqrt(mRange.upper/mRange.lower); } } setRange(newRange); } } /*! Transforms \a value, in pixel coordinates of the QCustomPlot widget, to axis coordinates. */ double QCPAxis::pixelToCoord(double value) const { if (orientation() == Qt::Horizontal) { if (mScaleType == stLinear) { if (!mRangeReversed) return (value-mAxisRect->left())/(double)mAxisRect->width()*mRange.size()+mRange.lower; else return -(value-mAxisRect->left())/(double)mAxisRect->width()*mRange.size()+mRange.upper; } else // mScaleType == stLogarithmic { if (!mRangeReversed) return qPow(mRange.upper/mRange.lower, (value-mAxisRect->left())/(double)mAxisRect->width())*mRange.lower; else return qPow(mRange.upper/mRange.lower, (mAxisRect->left()-value)/(double)mAxisRect->width())*mRange.upper; } } else // orientation() == Qt::Vertical { if (mScaleType == stLinear) { if (!mRangeReversed) return (mAxisRect->bottom()-value)/(double)mAxisRect->height()*mRange.size()+mRange.lower; else return -(mAxisRect->bottom()-value)/(double)mAxisRect->height()*mRange.size()+mRange.upper; } else // mScaleType == stLogarithmic { if (!mRangeReversed) return qPow(mRange.upper/mRange.lower, (mAxisRect->bottom()-value)/(double)mAxisRect->height())*mRange.lower; else return qPow(mRange.upper/mRange.lower, (value-mAxisRect->bottom())/(double)mAxisRect->height())*mRange.upper; } } } /*! Transforms \a value, in coordinates of the axis, to pixel coordinates of the QCustomPlot widget. */ double QCPAxis::coordToPixel(double value) const { if (orientation() == Qt::Horizontal) { if (mScaleType == stLinear) { if (!mRangeReversed) return (value-mRange.lower)/mRange.size()*mAxisRect->width()+mAxisRect->left(); else return (mRange.upper-value)/mRange.size()*mAxisRect->width()+mAxisRect->left(); } else // mScaleType == stLogarithmic { if (value >= 0.0 && mRange.upper < 0.0) // invalid value for logarithmic scale, just draw it outside visible range return !mRangeReversed ? mAxisRect->right()+200 : mAxisRect->left()-200; else if (value <= 0.0 && mRange.upper >= 0.0) // invalid value for logarithmic scale, just draw it outside visible range return !mRangeReversed ? mAxisRect->left()-200 : mAxisRect->right()+200; else { if (!mRangeReversed) return qLn(value/mRange.lower)/qLn(mRange.upper/mRange.lower)*mAxisRect->width()+mAxisRect->left(); else return qLn(mRange.upper/value)/qLn(mRange.upper/mRange.lower)*mAxisRect->width()+mAxisRect->left(); } } } else // orientation() == Qt::Vertical { if (mScaleType == stLinear) { if (!mRangeReversed) return mAxisRect->bottom()-(value-mRange.lower)/mRange.size()*mAxisRect->height(); else return mAxisRect->bottom()-(mRange.upper-value)/mRange.size()*mAxisRect->height(); } else // mScaleType == stLogarithmic { if (value >= 0.0 && mRange.upper < 0.0) // invalid value for logarithmic scale, just draw it outside visible range return !mRangeReversed ? mAxisRect->top()-200 : mAxisRect->bottom()+200; else if (value <= 0.0 && mRange.upper >= 0.0) // invalid value for logarithmic scale, just draw it outside visible range return !mRangeReversed ? mAxisRect->bottom()+200 : mAxisRect->top()-200; else { if (!mRangeReversed) return mAxisRect->bottom()-qLn(value/mRange.lower)/qLn(mRange.upper/mRange.lower)*mAxisRect->height(); else return mAxisRect->bottom()-qLn(mRange.upper/value)/qLn(mRange.upper/mRange.lower)*mAxisRect->height(); } } } } /*! Returns the part of the axis that is hit by \a pos (in pixels). The return value of this function is independent of the user-selectable parts defined with \ref setSelectableParts. Further, this function does not change the current selection state of the axis. If the axis is not visible (\ref setVisible), this function always returns \ref spNone. \see setSelectedParts, setSelectableParts, QCustomPlot::setInteractions */ QCPAxis::SelectablePart QCPAxis::getPartAt(const QPointF &pos) const { if (!mVisible) return spNone; if (mAxisPainter->axisSelectionBox().contains(pos.toPoint())) return spAxis; else if (mAxisPainter->tickLabelsSelectionBox().contains(pos.toPoint())) return spTickLabels; else if (mAxisPainter->labelSelectionBox().contains(pos.toPoint())) return spAxisLabel; else return spNone; } /* inherits documentation from base class */ double QCPAxis::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { if (!mParentPlot) return -1; SelectablePart part = getPartAt(pos); if ((onlySelectable && !mSelectableParts.testFlag(part)) || part == spNone) return -1; if (details) details->setValue(part); return mParentPlot->selectionTolerance()*0.99; } /*! Returns a list of all the plottables that have this axis as key or value axis. If you are only interested in plottables of type QCPGraph, see \ref graphs. \see graphs, items */ QList QCPAxis::plottables() const { QList result; if (!mParentPlot) return result; for (int i=0; imPlottables.size(); ++i) { if (mParentPlot->mPlottables.at(i)->keyAxis() == this ||mParentPlot->mPlottables.at(i)->valueAxis() == this) result.append(mParentPlot->mPlottables.at(i)); } return result; } /*! Returns a list of all the graphs that have this axis as key or value axis. \see plottables, items */ QList QCPAxis::graphs() const { QList result; if (!mParentPlot) return result; for (int i=0; imGraphs.size(); ++i) { if (mParentPlot->mGraphs.at(i)->keyAxis() == this || mParentPlot->mGraphs.at(i)->valueAxis() == this) result.append(mParentPlot->mGraphs.at(i)); } return result; } /*! Returns a list of all the items that are associated with this axis. An item is considered associated with an axis if at least one of its positions uses the axis as key or value axis. \see plottables, graphs */ QList QCPAxis::items() const { QList result; if (!mParentPlot) return result; for (int itemId=0; itemIdmItems.size(); ++itemId) { QList positions = mParentPlot->mItems.at(itemId)->positions(); for (int posId=0; posIdkeyAxis() == this || positions.at(posId)->valueAxis() == this) { result.append(mParentPlot->mItems.at(itemId)); break; } } } return result; } /*! Transforms a margin side to the logically corresponding axis type. (QCP::msLeft to QCPAxis::atLeft, QCP::msRight to QCPAxis::atRight, etc.) */ QCPAxis::AxisType QCPAxis::marginSideToAxisType(QCP::MarginSide side) { switch (side) { case QCP::msLeft: return atLeft; case QCP::msRight: return atRight; case QCP::msTop: return atTop; case QCP::msBottom: return atBottom; default: break; } qDebug() << Q_FUNC_INFO << "Invalid margin side passed:" << (int)side; return atLeft; } /*! Returns the axis type that describes the opposite axis of an axis with the specified \a type. */ QCPAxis::AxisType QCPAxis::opposite(QCPAxis::AxisType type) { switch (type) { case atLeft: return atRight; break; case atRight: return atLeft; break; case atBottom: return atTop; break; case atTop: return atBottom; break; default: qDebug() << Q_FUNC_INFO << "invalid axis type"; return atLeft; break; } } /* inherits documentation from base class */ void QCPAxis::selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) { Q_UNUSED(event) SelectablePart part = details.value(); if (mSelectableParts.testFlag(part)) { SelectableParts selBefore = mSelectedParts; setSelectedParts(additive ? mSelectedParts^part : part); if (selectionStateChanged) *selectionStateChanged = mSelectedParts != selBefore; } } /* inherits documentation from base class */ void QCPAxis::deselectEvent(bool *selectionStateChanged) { SelectableParts selBefore = mSelectedParts; setSelectedParts(mSelectedParts & ~mSelectableParts); if (selectionStateChanged) *selectionStateChanged = mSelectedParts != selBefore; } /*! \internal This mouse event reimplementation provides the functionality to let the user drag individual axes exclusively, by startig the drag on top of the axis. For the axis to accept this event and perform the single axis drag, the parent \ref QCPAxisRect must be configured accordingly, i.e. it must allow range dragging in the orientation of this axis (\ref QCPAxisRect::setRangeDrag) and this axis must be a draggable axis (\ref QCPAxisRect::setRangeDragAxes) \seebaseclassmethod \note The dragging of possibly multiple axes at once by starting the drag anywhere in the axis rect is handled by the axis rect's mouse event, e.g. \ref QCPAxisRect::mousePressEvent. */ void QCPAxis::mousePressEvent(QMouseEvent *event, const QVariant &details) { Q_UNUSED(details) if (!mParentPlot->interactions().testFlag(QCP::iRangeDrag) || !mAxisRect->rangeDrag().testFlag(orientation()) || !mAxisRect->rangeDragAxes(orientation()).contains(this)) { event->ignore(); return; } if (event->buttons() & Qt::LeftButton) { mDragging = true; // initialize antialiasing backup in case we start dragging: if (mParentPlot->noAntialiasingOnDrag()) { mAADragBackup = mParentPlot->antialiasedElements(); mNotAADragBackup = mParentPlot->notAntialiasedElements(); } // Mouse range dragging interaction: if (mParentPlot->interactions().testFlag(QCP::iRangeDrag)) mDragStartRange = mRange; } } /*! \internal This mouse event reimplementation provides the functionality to let the user drag individual axes exclusively, by startig the drag on top of the axis. \seebaseclassmethod \note The dragging of possibly multiple axes at once by starting the drag anywhere in the axis rect is handled by the axis rect's mouse event, e.g. \ref QCPAxisRect::mousePressEvent. \see QCPAxis::mousePressEvent */ void QCPAxis::mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) { if (mDragging) { const double startPixel = orientation() == Qt::Horizontal ? startPos.x() : startPos.y(); const double currentPixel = orientation() == Qt::Horizontal ? event->pos().x() : event->pos().y(); if (mScaleType == QCPAxis::stLinear) { const double diff = pixelToCoord(startPixel) - pixelToCoord(currentPixel); setRange(mDragStartRange.lower+diff, mDragStartRange.upper+diff); } else if (mScaleType == QCPAxis::stLogarithmic) { const double diff = pixelToCoord(startPixel) / pixelToCoord(currentPixel); setRange(mDragStartRange.lower*diff, mDragStartRange.upper*diff); } if (mParentPlot->noAntialiasingOnDrag()) mParentPlot->setNotAntialiasedElements(QCP::aeAll); mParentPlot->replot(QCustomPlot::rpQueuedReplot); } } /*! \internal This mouse event reimplementation provides the functionality to let the user drag individual axes exclusively, by startig the drag on top of the axis. \seebaseclassmethod \note The dragging of possibly multiple axes at once by starting the drag anywhere in the axis rect is handled by the axis rect's mouse event, e.g. \ref QCPAxisRect::mousePressEvent. \see QCPAxis::mousePressEvent */ void QCPAxis::mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) { Q_UNUSED(event) Q_UNUSED(startPos) mDragging = false; if (mParentPlot->noAntialiasingOnDrag()) { mParentPlot->setAntialiasedElements(mAADragBackup); mParentPlot->setNotAntialiasedElements(mNotAADragBackup); } } /*! \internal This mouse event reimplementation provides the functionality to let the user zoom individual axes exclusively, by performing the wheel event on top of the axis. For the axis to accept this event and perform the single axis zoom, the parent \ref QCPAxisRect must be configured accordingly, i.e. it must allow range zooming in the orientation of this axis (\ref QCPAxisRect::setRangeZoom) and this axis must be a zoomable axis (\ref QCPAxisRect::setRangeZoomAxes) \seebaseclassmethod \note The zooming of possibly multiple axes at once by performing the wheel event anywhere in the axis rect is handled by the axis rect's mouse event, e.g. \ref QCPAxisRect::wheelEvent. */ void QCPAxis::wheelEvent(QWheelEvent *event) { // Mouse range zooming interaction: if (!mParentPlot->interactions().testFlag(QCP::iRangeZoom) || !mAxisRect->rangeZoom().testFlag(orientation()) || !mAxisRect->rangeZoomAxes(orientation()).contains(this)) { event->ignore(); return; } const double wheelSteps = event->delta()/120.0; // a single step delta is +/-120 usually const double factor = qPow(mAxisRect->rangeZoomFactor(orientation()), wheelSteps); scaleRange(factor, pixelToCoord(orientation() == Qt::Horizontal ? event->pos().x() : event->pos().y())); mParentPlot->replot(); } /*! \internal A convenience function to easily set the QPainter::Antialiased hint on the provided \a painter before drawing axis lines. This is the antialiasing state the painter passed to the \ref draw method is in by default. This function takes into account the local setting of the antialiasing flag as well as the overrides set with \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. \seebaseclassmethod \see setAntialiased */ void QCPAxis::applyDefaultAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiased, QCP::aeAxes); } /*! \internal Draws the axis with the specified \a painter, using the internal QCPAxisPainterPrivate instance. \seebaseclassmethod */ void QCPAxis::draw(QCPPainter *painter) { QVector subTickPositions; // the final coordToPixel transformed vector passed to QCPAxisPainter QVector tickPositions; // the final coordToPixel transformed vector passed to QCPAxisPainter QVector tickLabels; // the final vector passed to QCPAxisPainter tickPositions.reserve(mTickVector.size()); tickLabels.reserve(mTickVector.size()); subTickPositions.reserve(mSubTickVector.size()); if (mTicks) { for (int i=0; itype = mAxisType; mAxisPainter->basePen = getBasePen(); mAxisPainter->labelFont = getLabelFont(); mAxisPainter->labelColor = getLabelColor(); mAxisPainter->label = mLabel; mAxisPainter->substituteExponent = mNumberBeautifulPowers; mAxisPainter->tickPen = getTickPen(); mAxisPainter->subTickPen = getSubTickPen(); mAxisPainter->tickLabelFont = getTickLabelFont(); mAxisPainter->tickLabelColor = getTickLabelColor(); mAxisPainter->axisRect = mAxisRect->rect(); mAxisPainter->viewportRect = mParentPlot->viewport(); mAxisPainter->abbreviateDecimalPowers = mScaleType == stLogarithmic; mAxisPainter->reversedEndings = mRangeReversed; mAxisPainter->tickPositions = tickPositions; mAxisPainter->tickLabels = tickLabels; mAxisPainter->subTickPositions = subTickPositions; mAxisPainter->draw(painter); } /*! \internal Prepares the internal tick vector, sub tick vector and tick label vector. This is done by calling QCPAxisTicker::generate on the currently installed ticker. If a change in the label text/count is detected, the cached axis margin is invalidated to make sure the next margin calculation recalculates the label sizes and returns an up-to-date value. */ void QCPAxis::setupTickVectors() { if (!mParentPlot) return; if ((!mTicks && !mTickLabels && !mGrid->visible()) || mRange.size() <= 0) return; QVector oldLabels = mTickVectorLabels; mTicker->generate(mRange, mParentPlot->locale(), mNumberFormatChar, mNumberPrecision, mTickVector, mSubTicks ? &mSubTickVector : 0, mTickLabels ? &mTickVectorLabels : 0); mCachedMarginValid &= mTickVectorLabels == oldLabels; // if labels have changed, margin might have changed, too } /*! \internal Returns the pen that is used to draw the axis base line. Depending on the selection state, this is either mSelectedBasePen or mBasePen. */ QPen QCPAxis::getBasePen() const { return mSelectedParts.testFlag(spAxis) ? mSelectedBasePen : mBasePen; } /*! \internal Returns the pen that is used to draw the (major) ticks. Depending on the selection state, this is either mSelectedTickPen or mTickPen. */ QPen QCPAxis::getTickPen() const { return mSelectedParts.testFlag(spAxis) ? mSelectedTickPen : mTickPen; } /*! \internal Returns the pen that is used to draw the subticks. Depending on the selection state, this is either mSelectedSubTickPen or mSubTickPen. */ QPen QCPAxis::getSubTickPen() const { return mSelectedParts.testFlag(spAxis) ? mSelectedSubTickPen : mSubTickPen; } /*! \internal Returns the font that is used to draw the tick labels. Depending on the selection state, this is either mSelectedTickLabelFont or mTickLabelFont. */ QFont QCPAxis::getTickLabelFont() const { return mSelectedParts.testFlag(spTickLabels) ? mSelectedTickLabelFont : mTickLabelFont; } /*! \internal Returns the font that is used to draw the axis label. Depending on the selection state, this is either mSelectedLabelFont or mLabelFont. */ QFont QCPAxis::getLabelFont() const { return mSelectedParts.testFlag(spAxisLabel) ? mSelectedLabelFont : mLabelFont; } /*! \internal Returns the color that is used to draw the tick labels. Depending on the selection state, this is either mSelectedTickLabelColor or mTickLabelColor. */ QColor QCPAxis::getTickLabelColor() const { return mSelectedParts.testFlag(spTickLabels) ? mSelectedTickLabelColor : mTickLabelColor; } /*! \internal Returns the color that is used to draw the axis label. Depending on the selection state, this is either mSelectedLabelColor or mLabelColor. */ QColor QCPAxis::getLabelColor() const { return mSelectedParts.testFlag(spAxisLabel) ? mSelectedLabelColor : mLabelColor; } /*! \internal Returns the appropriate outward margin for this axis. It is needed if \ref QCPAxisRect::setAutoMargins is set to true on the parent axis rect. An axis with axis type \ref atLeft will return an appropriate left margin, \ref atBottom will return an appropriate bottom margin and so forth. For the calculation, this function goes through similar steps as \ref draw, so changing one function likely requires the modification of the other one as well. The margin consists of the outward tick length, tick label padding, tick label size, label padding, label size, and padding. The margin is cached internally, so repeated calls while leaving the axis range, fonts, etc. unchanged are very fast. */ int QCPAxis::calculateMargin() { if (!mVisible) // if not visible, directly return 0, don't cache 0 because we can't react to setVisible in QCPAxis return 0; if (mCachedMarginValid) return mCachedMargin; // run through similar steps as QCPAxis::draw, and calculate margin needed to fit axis and its labels int margin = 0; QVector tickPositions; // the final coordToPixel transformed vector passed to QCPAxisPainter QVector tickLabels; // the final vector passed to QCPAxisPainter tickPositions.reserve(mTickVector.size()); tickLabels.reserve(mTickVector.size()); if (mTicks) { for (int i=0; itype = mAxisType; mAxisPainter->labelFont = getLabelFont(); mAxisPainter->label = mLabel; mAxisPainter->tickLabelFont = mTickLabelFont; mAxisPainter->axisRect = mAxisRect->rect(); mAxisPainter->viewportRect = mParentPlot->viewport(); mAxisPainter->tickPositions = tickPositions; mAxisPainter->tickLabels = tickLabels; margin += mAxisPainter->size(); margin += mPadding; mCachedMargin = margin; mCachedMarginValid = true; return margin; } /* inherits documentation from base class */ QCP::Interaction QCPAxis::selectionCategory() const { return QCP::iSelectAxes; } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisPainterPrivate //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxisPainterPrivate \internal \brief (Private) This is a private class and not part of the public QCustomPlot interface. It is used by QCPAxis to do the low-level drawing of axis backbone, tick marks, tick labels and axis label. It also buffers the labels to reduce replot times. The parameters are configured by directly accessing the public member variables. */ /*! Constructs a QCPAxisPainterPrivate instance. Make sure to not create a new instance on every redraw, to utilize the caching mechanisms. */ QCPAxisPainterPrivate::QCPAxisPainterPrivate(QCustomPlot *parentPlot) : type(QCPAxis::atLeft), basePen(QPen(Qt::black, 0, Qt::SolidLine, Qt::SquareCap)), lowerEnding(QCPLineEnding::esNone), upperEnding(QCPLineEnding::esNone), labelPadding(0), tickLabelPadding(0), tickLabelRotation(0), tickLabelSide(QCPAxis::lsOutside), substituteExponent(true), numberMultiplyCross(false), tickLengthIn(5), tickLengthOut(0), subTickLengthIn(2), subTickLengthOut(0), tickPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::SquareCap)), subTickPen(QPen(Qt::black, 0, Qt::SolidLine, Qt::SquareCap)), offset(0), abbreviateDecimalPowers(false), reversedEndings(false), mParentPlot(parentPlot), mLabelCache(16) // cache at most 16 (tick) labels { } QCPAxisPainterPrivate::~QCPAxisPainterPrivate() { } /*! \internal Draws the axis with the specified \a painter. The selection boxes (mAxisSelectionBox, mTickLabelsSelectionBox, mLabelSelectionBox) are set here, too. */ void QCPAxisPainterPrivate::draw(QCPPainter *painter) { QByteArray newHash = generateLabelParameterHash(); if (newHash != mLabelParameterHash) { mLabelCache.clear(); mLabelParameterHash = newHash; } QPoint origin; switch (type) { case QCPAxis::atLeft: origin = axisRect.bottomLeft() +QPoint(-offset, 0); break; case QCPAxis::atRight: origin = axisRect.bottomRight()+QPoint(+offset, 0); break; case QCPAxis::atTop: origin = axisRect.topLeft() +QPoint(0, -offset); break; case QCPAxis::atBottom: origin = axisRect.bottomLeft() +QPoint(0, +offset); break; } double xCor = 0, yCor = 0; // paint system correction, for pixel exact matches (affects baselines and ticks of top/right axes) switch (type) { case QCPAxis::atTop: yCor = -1; break; case QCPAxis::atRight: xCor = 1; break; default: break; } int margin = 0; // draw baseline: QLineF baseLine; painter->setPen(basePen); if (QCPAxis::orientation(type) == Qt::Horizontal) baseLine.setPoints(origin+QPointF(xCor, yCor), origin+QPointF(axisRect.width()+xCor, yCor)); else baseLine.setPoints(origin+QPointF(xCor, yCor), origin+QPointF(xCor, -axisRect.height()+yCor)); if (reversedEndings) baseLine = QLineF(baseLine.p2(), baseLine.p1()); // won't make a difference for line itself, but for line endings later painter->drawLine(baseLine); // draw ticks: if (!tickPositions.isEmpty()) { painter->setPen(tickPen); int tickDir = (type == QCPAxis::atBottom || type == QCPAxis::atRight) ? -1 : 1; // direction of ticks ("inward" is right for left axis and left for right axis) if (QCPAxis::orientation(type) == Qt::Horizontal) { for (int i=0; idrawLine(QLineF(tickPositions.at(i)+xCor, origin.y()-tickLengthOut*tickDir+yCor, tickPositions.at(i)+xCor, origin.y()+tickLengthIn*tickDir+yCor)); } else { for (int i=0; idrawLine(QLineF(origin.x()-tickLengthOut*tickDir+xCor, tickPositions.at(i)+yCor, origin.x()+tickLengthIn*tickDir+xCor, tickPositions.at(i)+yCor)); } } // draw subticks: if (!subTickPositions.isEmpty()) { painter->setPen(subTickPen); // direction of ticks ("inward" is right for left axis and left for right axis) int tickDir = (type == QCPAxis::atBottom || type == QCPAxis::atRight) ? -1 : 1; if (QCPAxis::orientation(type) == Qt::Horizontal) { for (int i=0; idrawLine(QLineF(subTickPositions.at(i)+xCor, origin.y()-subTickLengthOut*tickDir+yCor, subTickPositions.at(i)+xCor, origin.y()+subTickLengthIn*tickDir+yCor)); } else { for (int i=0; idrawLine(QLineF(origin.x()-subTickLengthOut*tickDir+xCor, subTickPositions.at(i)+yCor, origin.x()+subTickLengthIn*tickDir+xCor, subTickPositions.at(i)+yCor)); } } margin += qMax(0, qMax(tickLengthOut, subTickLengthOut)); // draw axis base endings: bool antialiasingBackup = painter->antialiasing(); painter->setAntialiasing(true); // always want endings to be antialiased, even if base and ticks themselves aren't painter->setBrush(QBrush(basePen.color())); QCPVector2D baseLineVector(baseLine.dx(), baseLine.dy()); if (lowerEnding.style() != QCPLineEnding::esNone) lowerEnding.draw(painter, QCPVector2D(baseLine.p1())-baseLineVector.normalized()*lowerEnding.realLength()*(lowerEnding.inverted()?-1:1), -baseLineVector); if (upperEnding.style() != QCPLineEnding::esNone) upperEnding.draw(painter, QCPVector2D(baseLine.p2())+baseLineVector.normalized()*upperEnding.realLength()*(upperEnding.inverted()?-1:1), baseLineVector); painter->setAntialiasing(antialiasingBackup); // tick labels: QRect oldClipRect; if (tickLabelSide == QCPAxis::lsInside) // if using inside labels, clip them to the axis rect { oldClipRect = painter->clipRegion().boundingRect(); painter->setClipRect(axisRect); } QSize tickLabelsSize(0, 0); // size of largest tick label, for offset calculation of axis label if (!tickLabels.isEmpty()) { if (tickLabelSide == QCPAxis::lsOutside) margin += tickLabelPadding; painter->setFont(tickLabelFont); painter->setPen(QPen(tickLabelColor)); const int maxLabelIndex = qMin(tickPositions.size(), tickLabels.size()); int distanceToAxis = margin; if (tickLabelSide == QCPAxis::lsInside) distanceToAxis = -(qMax(tickLengthIn, subTickLengthIn)+tickLabelPadding); for (int i=0; isetClipRect(oldClipRect); // axis label: QRect labelBounds; if (!label.isEmpty()) { margin += labelPadding; painter->setFont(labelFont); painter->setPen(QPen(labelColor)); labelBounds = painter->fontMetrics().boundingRect(0, 0, 0, 0, Qt::TextDontClip, label); if (type == QCPAxis::atLeft) { QTransform oldTransform = painter->transform(); painter->translate((origin.x()-margin-labelBounds.height()), origin.y()); painter->rotate(-90); painter->drawText(0, 0, axisRect.height(), labelBounds.height(), Qt::TextDontClip | Qt::AlignCenter, label); painter->setTransform(oldTransform); } else if (type == QCPAxis::atRight) { QTransform oldTransform = painter->transform(); painter->translate((origin.x()+margin+labelBounds.height()), origin.y()-axisRect.height()); painter->rotate(90); painter->drawText(0, 0, axisRect.height(), labelBounds.height(), Qt::TextDontClip | Qt::AlignCenter, label); painter->setTransform(oldTransform); } else if (type == QCPAxis::atTop) painter->drawText(origin.x(), origin.y()-margin-labelBounds.height(), axisRect.width(), labelBounds.height(), Qt::TextDontClip | Qt::AlignCenter, label); else if (type == QCPAxis::atBottom) painter->drawText(origin.x(), origin.y()+margin, axisRect.width(), labelBounds.height(), Qt::TextDontClip | Qt::AlignCenter, label); } // set selection boxes: int selectionTolerance = 0; if (mParentPlot) selectionTolerance = mParentPlot->selectionTolerance(); else qDebug() << Q_FUNC_INFO << "mParentPlot is null"; int selAxisOutSize = qMax(qMax(tickLengthOut, subTickLengthOut), selectionTolerance); int selAxisInSize = selectionTolerance; int selTickLabelSize; int selTickLabelOffset; if (tickLabelSide == QCPAxis::lsOutside) { selTickLabelSize = (QCPAxis::orientation(type) == Qt::Horizontal ? tickLabelsSize.height() : tickLabelsSize.width()); selTickLabelOffset = qMax(tickLengthOut, subTickLengthOut)+tickLabelPadding; } else { selTickLabelSize = -(QCPAxis::orientation(type) == Qt::Horizontal ? tickLabelsSize.height() : tickLabelsSize.width()); selTickLabelOffset = -(qMax(tickLengthIn, subTickLengthIn)+tickLabelPadding); } int selLabelSize = labelBounds.height(); int selLabelOffset = qMax(tickLengthOut, subTickLengthOut)+(!tickLabels.isEmpty() && tickLabelSide == QCPAxis::lsOutside ? tickLabelPadding+selTickLabelSize : 0)+labelPadding; if (type == QCPAxis::atLeft) { mAxisSelectionBox.setCoords(origin.x()-selAxisOutSize, axisRect.top(), origin.x()+selAxisInSize, axisRect.bottom()); mTickLabelsSelectionBox.setCoords(origin.x()-selTickLabelOffset-selTickLabelSize, axisRect.top(), origin.x()-selTickLabelOffset, axisRect.bottom()); mLabelSelectionBox.setCoords(origin.x()-selLabelOffset-selLabelSize, axisRect.top(), origin.x()-selLabelOffset, axisRect.bottom()); } else if (type == QCPAxis::atRight) { mAxisSelectionBox.setCoords(origin.x()-selAxisInSize, axisRect.top(), origin.x()+selAxisOutSize, axisRect.bottom()); mTickLabelsSelectionBox.setCoords(origin.x()+selTickLabelOffset+selTickLabelSize, axisRect.top(), origin.x()+selTickLabelOffset, axisRect.bottom()); mLabelSelectionBox.setCoords(origin.x()+selLabelOffset+selLabelSize, axisRect.top(), origin.x()+selLabelOffset, axisRect.bottom()); } else if (type == QCPAxis::atTop) { mAxisSelectionBox.setCoords(axisRect.left(), origin.y()-selAxisOutSize, axisRect.right(), origin.y()+selAxisInSize); mTickLabelsSelectionBox.setCoords(axisRect.left(), origin.y()-selTickLabelOffset-selTickLabelSize, axisRect.right(), origin.y()-selTickLabelOffset); mLabelSelectionBox.setCoords(axisRect.left(), origin.y()-selLabelOffset-selLabelSize, axisRect.right(), origin.y()-selLabelOffset); } else if (type == QCPAxis::atBottom) { mAxisSelectionBox.setCoords(axisRect.left(), origin.y()-selAxisInSize, axisRect.right(), origin.y()+selAxisOutSize); mTickLabelsSelectionBox.setCoords(axisRect.left(), origin.y()+selTickLabelOffset+selTickLabelSize, axisRect.right(), origin.y()+selTickLabelOffset); mLabelSelectionBox.setCoords(axisRect.left(), origin.y()+selLabelOffset+selLabelSize, axisRect.right(), origin.y()+selLabelOffset); } mAxisSelectionBox = mAxisSelectionBox.normalized(); mTickLabelsSelectionBox = mTickLabelsSelectionBox.normalized(); mLabelSelectionBox = mLabelSelectionBox.normalized(); // draw hitboxes for debug purposes: //painter->setBrush(Qt::NoBrush); //painter->drawRects(QVector() << mAxisSelectionBox << mTickLabelsSelectionBox << mLabelSelectionBox); } /*! \internal Returns the size ("margin" in QCPAxisRect context, so measured perpendicular to the axis backbone direction) needed to fit the axis. */ int QCPAxisPainterPrivate::size() const { int result = 0; // get length of tick marks pointing outwards: if (!tickPositions.isEmpty()) result += qMax(0, qMax(tickLengthOut, subTickLengthOut)); // calculate size of tick labels: if (tickLabelSide == QCPAxis::lsOutside) { QSize tickLabelsSize(0, 0); if (!tickLabels.isEmpty()) { for (int i=0; ibufferDevicePixelRatio())); result.append(QByteArray::number(tickLabelRotation)); result.append(QByteArray::number((int)tickLabelSide)); result.append(QByteArray::number((int)substituteExponent)); result.append(QByteArray::number((int)numberMultiplyCross)); result.append(tickLabelColor.name().toLatin1()+QByteArray::number(tickLabelColor.alpha(), 16)); result.append(tickLabelFont.toString().toLatin1()); return result; } /*! \internal Draws a single tick label with the provided \a painter, utilizing the internal label cache to significantly speed up drawing of labels that were drawn in previous calls. The tick label is always bound to an axis, the distance to the axis is controllable via \a distanceToAxis in pixels. The pixel position in the axis direction is passed in the \a position parameter. Hence for the bottom axis, \a position would indicate the horizontal pixel position (not coordinate), at which the label should be drawn. In order to later draw the axis label in a place that doesn't overlap with the tick labels, the largest tick label size is needed. This is acquired by passing a \a tickLabelsSize to the \ref drawTickLabel calls during the process of drawing all tick labels of one axis. In every call, \a tickLabelsSize is expanded, if the drawn label exceeds the value \a tickLabelsSize currently holds. The label is drawn with the font and pen that are currently set on the \a painter. To draw superscripted powers, the font is temporarily made smaller by a fixed factor (see \ref getTickLabelData). */ void QCPAxisPainterPrivate::placeTickLabel(QCPPainter *painter, double position, int distanceToAxis, const QString &text, QSize *tickLabelsSize) { // warning: if you change anything here, also adapt getMaxTickLabelSize() accordingly! if (text.isEmpty()) return; QSize finalSize; QPointF labelAnchor; switch (type) { case QCPAxis::atLeft: labelAnchor = QPointF(axisRect.left()-distanceToAxis-offset, position); break; case QCPAxis::atRight: labelAnchor = QPointF(axisRect.right()+distanceToAxis+offset, position); break; case QCPAxis::atTop: labelAnchor = QPointF(position, axisRect.top()-distanceToAxis-offset); break; case QCPAxis::atBottom: labelAnchor = QPointF(position, axisRect.bottom()+distanceToAxis+offset); break; } if (mParentPlot->plottingHints().testFlag(QCP::phCacheLabels) && !painter->modes().testFlag(QCPPainter::pmNoCaching)) // label caching enabled { CachedLabel *cachedLabel = mLabelCache.take(text); // attempt to get label from cache if (!cachedLabel) // no cached label existed, create it { cachedLabel = new CachedLabel; TickLabelData labelData = getTickLabelData(painter->font(), text); cachedLabel->offset = getTickLabelDrawOffset(labelData)+labelData.rotatedTotalBounds.topLeft(); if (!qFuzzyCompare(1.0, mParentPlot->bufferDevicePixelRatio())) { cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size()*mParentPlot->bufferDevicePixelRatio()); #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED # ifdef QCP_DEVICEPIXELRATIO_FLOAT cachedLabel->pixmap.setDevicePixelRatio(mParentPlot->devicePixelRatioF()); # else cachedLabel->pixmap.setDevicePixelRatio(mParentPlot->devicePixelRatio()); # endif #endif } else cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size()); cachedLabel->pixmap.fill(Qt::transparent); QCPPainter cachePainter(&cachedLabel->pixmap); cachePainter.setPen(painter->pen()); drawTickLabel(&cachePainter, -labelData.rotatedTotalBounds.topLeft().x(), -labelData.rotatedTotalBounds.topLeft().y(), labelData); } // if label would be partly clipped by widget border on sides, don't draw it (only for outside tick labels): bool labelClippedByBorder = false; if (tickLabelSide == QCPAxis::lsOutside) { if (QCPAxis::orientation(type) == Qt::Horizontal) labelClippedByBorder = labelAnchor.x()+cachedLabel->offset.x()+cachedLabel->pixmap.width()/mParentPlot->bufferDevicePixelRatio() > viewportRect.right() || labelAnchor.x()+cachedLabel->offset.x() < viewportRect.left(); else labelClippedByBorder = labelAnchor.y()+cachedLabel->offset.y()+cachedLabel->pixmap.height()/mParentPlot->bufferDevicePixelRatio() > viewportRect.bottom() || labelAnchor.y()+cachedLabel->offset.y() < viewportRect.top(); } if (!labelClippedByBorder) { painter->drawPixmap(labelAnchor+cachedLabel->offset, cachedLabel->pixmap); finalSize = cachedLabel->pixmap.size()/mParentPlot->bufferDevicePixelRatio(); } mLabelCache.insert(text, cachedLabel); // return label to cache or insert for the first time if newly created } else // label caching disabled, draw text directly on surface: { TickLabelData labelData = getTickLabelData(painter->font(), text); QPointF finalPosition = labelAnchor + getTickLabelDrawOffset(labelData); // if label would be partly clipped by widget border on sides, don't draw it (only for outside tick labels): bool labelClippedByBorder = false; if (tickLabelSide == QCPAxis::lsOutside) { if (QCPAxis::orientation(type) == Qt::Horizontal) labelClippedByBorder = finalPosition.x()+(labelData.rotatedTotalBounds.width()+labelData.rotatedTotalBounds.left()) > viewportRect.right() || finalPosition.x()+labelData.rotatedTotalBounds.left() < viewportRect.left(); else labelClippedByBorder = finalPosition.y()+(labelData.rotatedTotalBounds.height()+labelData.rotatedTotalBounds.top()) > viewportRect.bottom() || finalPosition.y()+labelData.rotatedTotalBounds.top() < viewportRect.top(); } if (!labelClippedByBorder) { drawTickLabel(painter, finalPosition.x(), finalPosition.y(), labelData); finalSize = labelData.rotatedTotalBounds.size(); } } // expand passed tickLabelsSize if current tick label is larger: if (finalSize.width() > tickLabelsSize->width()) tickLabelsSize->setWidth(finalSize.width()); if (finalSize.height() > tickLabelsSize->height()) tickLabelsSize->setHeight(finalSize.height()); } /*! \internal This is a \ref placeTickLabel helper function. Draws the tick label specified in \a labelData with \a painter at the pixel positions \a x and \a y. This function is used by \ref placeTickLabel to create new tick labels for the cache, or to directly draw the labels on the QCustomPlot surface when label caching is disabled, i.e. when QCP::phCacheLabels plotting hint is not set. */ void QCPAxisPainterPrivate::drawTickLabel(QCPPainter *painter, double x, double y, const TickLabelData &labelData) const { // backup painter settings that we're about to change: QTransform oldTransform = painter->transform(); QFont oldFont = painter->font(); // transform painter to position/rotation: painter->translate(x, y); if (!qFuzzyIsNull(tickLabelRotation)) painter->rotate(tickLabelRotation); // draw text: if (!labelData.expPart.isEmpty()) // indicator that beautiful powers must be used { painter->setFont(labelData.baseFont); painter->drawText(0, 0, 0, 0, Qt::TextDontClip, labelData.basePart); if (!labelData.suffixPart.isEmpty()) painter->drawText(labelData.baseBounds.width()+1+labelData.expBounds.width(), 0, 0, 0, Qt::TextDontClip, labelData.suffixPart); painter->setFont(labelData.expFont); painter->drawText(labelData.baseBounds.width()+1, 0, labelData.expBounds.width(), labelData.expBounds.height(), Qt::TextDontClip, labelData.expPart); } else { painter->setFont(labelData.baseFont); painter->drawText(0, 0, labelData.totalBounds.width(), labelData.totalBounds.height(), Qt::TextDontClip | Qt::AlignHCenter, labelData.basePart); } // reset painter settings to what it was before: painter->setTransform(oldTransform); painter->setFont(oldFont); } /*! \internal This is a \ref placeTickLabel helper function. Transforms the passed \a text and \a font to a tickLabelData structure that can then be further processed by \ref getTickLabelDrawOffset and \ref drawTickLabel. It splits the text into base and exponent if necessary (member substituteExponent) and calculates appropriate bounding boxes. */ QCPAxisPainterPrivate::TickLabelData QCPAxisPainterPrivate::getTickLabelData(const QFont &font, const QString &text) const { TickLabelData result; // determine whether beautiful decimal powers should be used bool useBeautifulPowers = false; int ePos = -1; // first index of exponent part, text before that will be basePart, text until eLast will be expPart int eLast = -1; // last index of exponent part, rest of text after this will be suffixPart if (substituteExponent) { ePos = text.indexOf(QLatin1Char('e')); if (ePos > 0 && text.at(ePos-1).isDigit()) { eLast = ePos; while (eLast+1 < text.size() && (text.at(eLast+1) == QLatin1Char('+') || text.at(eLast+1) == QLatin1Char('-') || text.at(eLast+1).isDigit())) ++eLast; if (eLast > ePos) // only if also to right of 'e' is a digit/+/- interpret it as beautifiable power useBeautifulPowers = true; } } // calculate text bounding rects and do string preparation for beautiful decimal powers: result.baseFont = font; if (result.baseFont.pointSizeF() > 0) // might return -1 if specified with setPixelSize, in that case we can't do correction in next line result.baseFont.setPointSizeF(result.baseFont.pointSizeF()+0.05); // QFontMetrics.boundingRect has a bug for exact point sizes that make the results oscillate due to internal rounding if (useBeautifulPowers) { // split text into parts of number/symbol that will be drawn normally and part that will be drawn as exponent: result.basePart = text.left(ePos); result.suffixPart = text.mid(eLast+1); // also drawn normally but after exponent // in log scaling, we want to turn "1*10^n" into "10^n", else add multiplication sign and decimal base: if (abbreviateDecimalPowers && result.basePart == QLatin1String("1")) result.basePart = QLatin1String("10"); else result.basePart += (numberMultiplyCross ? QString(QChar(215)) : QString(QChar(183))) + QLatin1String("10"); result.expPart = text.mid(ePos+1, eLast-ePos); // clip "+" and leading zeros off expPart: while (result.expPart.length() > 2 && result.expPart.at(1) == QLatin1Char('0')) // length > 2 so we leave one zero when numberFormatChar is 'e' result.expPart.remove(1, 1); if (!result.expPart.isEmpty() && result.expPart.at(0) == QLatin1Char('+')) result.expPart.remove(0, 1); // prepare smaller font for exponent: result.expFont = font; if (result.expFont.pointSize() > 0) result.expFont.setPointSize(result.expFont.pointSize()*0.75); else result.expFont.setPixelSize(result.expFont.pixelSize()*0.75); // calculate bounding rects of base part(s), exponent part and total one: result.baseBounds = QFontMetrics(result.baseFont).boundingRect(0, 0, 0, 0, Qt::TextDontClip, result.basePart); result.expBounds = QFontMetrics(result.expFont).boundingRect(0, 0, 0, 0, Qt::TextDontClip, result.expPart); if (!result.suffixPart.isEmpty()) result.suffixBounds = QFontMetrics(result.baseFont).boundingRect(0, 0, 0, 0, Qt::TextDontClip, result.suffixPart); result.totalBounds = result.baseBounds.adjusted(0, 0, result.expBounds.width()+result.suffixBounds.width()+2, 0); // +2 consists of the 1 pixel spacing between base and exponent (see drawTickLabel) and an extra pixel to include AA } else // useBeautifulPowers == false { result.basePart = text; result.totalBounds = QFontMetrics(result.baseFont).boundingRect(0, 0, 0, 0, Qt::TextDontClip | Qt::AlignHCenter, result.basePart); } result.totalBounds.moveTopLeft(QPoint(0, 0)); // want bounding box aligned top left at origin, independent of how it was created, to make further processing simpler // calculate possibly different bounding rect after rotation: result.rotatedTotalBounds = result.totalBounds; if (!qFuzzyIsNull(tickLabelRotation)) { QTransform transform; transform.rotate(tickLabelRotation); result.rotatedTotalBounds = transform.mapRect(result.rotatedTotalBounds); } return result; } /*! \internal This is a \ref placeTickLabel helper function. Calculates the offset at which the top left corner of the specified tick label shall be drawn. The offset is relative to a point right next to the tick the label belongs to. This function is thus responsible for e.g. centering tick labels under ticks and positioning them appropriately when they are rotated. */ QPointF QCPAxisPainterPrivate::getTickLabelDrawOffset(const TickLabelData &labelData) const { /* calculate label offset from base point at tick (non-trivial, for best visual appearance): short explanation for bottom axis: The anchor, i.e. the point in the label that is placed horizontally under the corresponding tick is always on the label side that is closer to the axis (e.g. the left side of the text when we're rotating clockwise). On that side, the height is halved and the resulting point is defined the anchor. This way, a 90 degree rotated text will be centered under the tick (i.e. displaced horizontally by half its height). At the same time, a 45 degree rotated text will "point toward" its tick, as is typical for rotated tick labels. */ bool doRotation = !qFuzzyIsNull(tickLabelRotation); bool flip = qFuzzyCompare(qAbs(tickLabelRotation), 90.0); // perfect +/-90 degree flip. Indicates vertical label centering on vertical axes. double radians = tickLabelRotation/180.0*M_PI; int x=0, y=0; if ((type == QCPAxis::atLeft && tickLabelSide == QCPAxis::lsOutside) || (type == QCPAxis::atRight && tickLabelSide == QCPAxis::lsInside)) // Anchor at right side of tick label { if (doRotation) { if (tickLabelRotation > 0) { x = -qCos(radians)*labelData.totalBounds.width(); y = flip ? -labelData.totalBounds.width()/2.0 : -qSin(radians)*labelData.totalBounds.width()-qCos(radians)*labelData.totalBounds.height()/2.0; } else { x = -qCos(-radians)*labelData.totalBounds.width()-qSin(-radians)*labelData.totalBounds.height(); y = flip ? +labelData.totalBounds.width()/2.0 : +qSin(-radians)*labelData.totalBounds.width()-qCos(-radians)*labelData.totalBounds.height()/2.0; } } else { x = -labelData.totalBounds.width(); y = -labelData.totalBounds.height()/2.0; } } else if ((type == QCPAxis::atRight && tickLabelSide == QCPAxis::lsOutside) || (type == QCPAxis::atLeft && tickLabelSide == QCPAxis::lsInside)) // Anchor at left side of tick label { if (doRotation) { if (tickLabelRotation > 0) { x = +qSin(radians)*labelData.totalBounds.height(); y = flip ? -labelData.totalBounds.width()/2.0 : -qCos(radians)*labelData.totalBounds.height()/2.0; } else { x = 0; y = flip ? +labelData.totalBounds.width()/2.0 : -qCos(-radians)*labelData.totalBounds.height()/2.0; } } else { x = 0; y = -labelData.totalBounds.height()/2.0; } } else if ((type == QCPAxis::atTop && tickLabelSide == QCPAxis::lsOutside) || (type == QCPAxis::atBottom && tickLabelSide == QCPAxis::lsInside)) // Anchor at bottom side of tick label { if (doRotation) { if (tickLabelRotation > 0) { x = -qCos(radians)*labelData.totalBounds.width()+qSin(radians)*labelData.totalBounds.height()/2.0; y = -qSin(radians)*labelData.totalBounds.width()-qCos(radians)*labelData.totalBounds.height(); } else { x = -qSin(-radians)*labelData.totalBounds.height()/2.0; y = -qCos(-radians)*labelData.totalBounds.height(); } } else { x = -labelData.totalBounds.width()/2.0; y = -labelData.totalBounds.height(); } } else if ((type == QCPAxis::atBottom && tickLabelSide == QCPAxis::lsOutside) || (type == QCPAxis::atTop && tickLabelSide == QCPAxis::lsInside)) // Anchor at top side of tick label { if (doRotation) { if (tickLabelRotation > 0) { x = +qSin(radians)*labelData.totalBounds.height()/2.0; y = 0; } else { x = -qCos(-radians)*labelData.totalBounds.width()-qSin(-radians)*labelData.totalBounds.height()/2.0; y = +qSin(-radians)*labelData.totalBounds.width(); } } else { x = -labelData.totalBounds.width()/2.0; y = 0; } } return QPointF(x, y); } /*! \internal Simulates the steps done by \ref placeTickLabel by calculating bounding boxes of the text label to be drawn, depending on number format etc. Since only the largest tick label is wanted for the margin calculation, the passed \a tickLabelsSize is only expanded, if it's currently set to a smaller width/height. */ void QCPAxisPainterPrivate::getMaxTickLabelSize(const QFont &font, const QString &text, QSize *tickLabelsSize) const { // note: this function must return the same tick label sizes as the placeTickLabel function. QSize finalSize; if (mParentPlot->plottingHints().testFlag(QCP::phCacheLabels) && mLabelCache.contains(text)) // label caching enabled and have cached label { const CachedLabel *cachedLabel = mLabelCache.object(text); finalSize = cachedLabel->pixmap.size()/mParentPlot->bufferDevicePixelRatio(); } else // label caching disabled or no label with this text cached: { TickLabelData labelData = getTickLabelData(font, text); finalSize = labelData.rotatedTotalBounds.size(); } // expand passed tickLabelsSize if current tick label is larger: if (finalSize.width() > tickLabelsSize->width()) tickLabelsSize->setWidth(finalSize.width()); if (finalSize.height() > tickLabelsSize->height()) tickLabelsSize->setHeight(finalSize.height()); } /* end of 'src/axis/axis.cpp' */ /* including file 'src/scatterstyle.cpp', size 17450 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPScatterStyle //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPScatterStyle \brief Represents the visual appearance of scatter points This class holds information about shape, color and size of scatter points. In plottables like QCPGraph it is used to store how scatter points shall be drawn. For example, \ref QCPGraph::setScatterStyle takes a QCPScatterStyle instance. A scatter style consists of a shape (\ref setShape), a line color (\ref setPen) and possibly a fill (\ref setBrush), if the shape provides a fillable area. Further, the size of the shape can be controlled with \ref setSize. \section QCPScatterStyle-defining Specifying a scatter style You can set all these configurations either by calling the respective functions on an instance: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpscatterstyle-creation-1 Or you can use one of the various constructors that take different parameter combinations, making it easy to specify a scatter style in a single call, like so: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpscatterstyle-creation-2 \section QCPScatterStyle-undefinedpen Leaving the color/pen up to the plottable There are two constructors which leave the pen undefined: \ref QCPScatterStyle() and \ref QCPScatterStyle(ScatterShape shape, double size). If those constructors are used, a call to \ref isPenDefined will return false. It leads to scatter points that inherit the pen from the plottable that uses the scatter style. Thus, if such a scatter style is passed to QCPGraph, the line color of the graph (\ref QCPGraph::setPen) will be used by the scatter points. This makes it very convenient to set up typical scatter settings: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpscatterstyle-shortcreation Notice that it wasn't even necessary to explicitly call a QCPScatterStyle constructor. This works because QCPScatterStyle provides a constructor that can transform a \ref ScatterShape directly into a QCPScatterStyle instance (that's the \ref QCPScatterStyle(ScatterShape shape, double size) constructor with a default for \a size). In those cases, C++ allows directly supplying a \ref ScatterShape, where actually a QCPScatterStyle is expected. \section QCPScatterStyle-custompath-and-pixmap Custom shapes and pixmaps QCPScatterStyle supports drawing custom shapes and arbitrary pixmaps as scatter points. For custom shapes, you can provide a QPainterPath with the desired shape to the \ref setCustomPath function or call the constructor that takes a painter path. The scatter shape will automatically be set to \ref ssCustom. For pixmaps, you call \ref setPixmap with the desired QPixmap. Alternatively you can use the constructor that takes a QPixmap. The scatter shape will automatically be set to \ref ssPixmap. Note that \ref setSize does not influence the appearance of the pixmap. */ /* start documentation of inline functions */ /*! \fn bool QCPScatterStyle::isNone() const Returns whether the scatter shape is \ref ssNone. \see setShape */ /*! \fn bool QCPScatterStyle::isPenDefined() const Returns whether a pen has been defined for this scatter style. The pen is undefined if a constructor is called that does not carry \a pen as parameter. Those are \ref QCPScatterStyle() and \ref QCPScatterStyle(ScatterShape shape, double size). If the pen is undefined, the pen of the respective plottable will be used for drawing scatters. If a pen was defined for this scatter style instance, and you now wish to undefine the pen, call \ref undefinePen. \see setPen */ /* end documentation of inline functions */ /*! Creates a new QCPScatterStyle instance with size set to 6. No shape, pen or brush is defined. Since the pen is undefined (\ref isPenDefined returns false), the scatter color will be inherited from the plottable that uses this scatter style. */ QCPScatterStyle::QCPScatterStyle() : mSize(6), mShape(ssNone), mPen(Qt::NoPen), mBrush(Qt::NoBrush), mPenDefined(false) { } /*! Creates a new QCPScatterStyle instance with shape set to \a shape and size to \a size. No pen or brush is defined. Since the pen is undefined (\ref isPenDefined returns false), the scatter color will be inherited from the plottable that uses this scatter style. */ QCPScatterStyle::QCPScatterStyle(ScatterShape shape, double size) : mSize(size), mShape(shape), mPen(Qt::NoPen), mBrush(Qt::NoBrush), mPenDefined(false) { } /*! Creates a new QCPScatterStyle instance with shape set to \a shape, the pen color set to \a color, and size to \a size. No brush is defined, i.e. the scatter point will not be filled. */ QCPScatterStyle::QCPScatterStyle(ScatterShape shape, const QColor &color, double size) : mSize(size), mShape(shape), mPen(QPen(color)), mBrush(Qt::NoBrush), mPenDefined(true) { } /*! Creates a new QCPScatterStyle instance with shape set to \a shape, the pen color set to \a color, the brush color to \a fill (with a solid pattern), and size to \a size. */ QCPScatterStyle::QCPScatterStyle(ScatterShape shape, const QColor &color, const QColor &fill, double size) : mSize(size), mShape(shape), mPen(QPen(color)), mBrush(QBrush(fill)), mPenDefined(true) { } /*! Creates a new QCPScatterStyle instance with shape set to \a shape, the pen set to \a pen, the brush to \a brush, and size to \a size. \warning In some cases it might be tempting to directly use a pen style like Qt::NoPen as \a pen and a color like Qt::blue as \a brush. Notice however, that the corresponding call\n QCPScatterStyle(QCPScatterShape::ssCircle, Qt::NoPen, Qt::blue, 5)\n doesn't necessarily lead C++ to use this constructor in some cases, but might mistake Qt::NoPen for a QColor and use the \ref QCPScatterStyle(ScatterShape shape, const QColor &color, const QColor &fill, double size) constructor instead (which will lead to an unexpected look of the scatter points). To prevent this, be more explicit with the parameter types. For example, use QBrush(Qt::blue) instead of just Qt::blue, to clearly point out to the compiler that this constructor is wanted. */ QCPScatterStyle::QCPScatterStyle(ScatterShape shape, const QPen &pen, const QBrush &brush, double size) : mSize(size), mShape(shape), mPen(pen), mBrush(brush), mPenDefined(pen.style() != Qt::NoPen) { } /*! Creates a new QCPScatterStyle instance which will show the specified \a pixmap. The scatter shape is set to \ref ssPixmap. */ QCPScatterStyle::QCPScatterStyle(const QPixmap &pixmap) : mSize(5), mShape(ssPixmap), mPen(Qt::NoPen), mBrush(Qt::NoBrush), mPixmap(pixmap), mPenDefined(false) { } /*! Creates a new QCPScatterStyle instance with a custom shape that is defined via \a customPath. The scatter shape is set to \ref ssCustom. The custom shape line will be drawn with \a pen and filled with \a brush. The size has a slightly different meaning than for built-in scatter points: The custom path will be drawn scaled by a factor of \a size/6.0. Since the default \a size is 6, the custom path will appear in its original size by default. To for example double the size of the path, set \a size to 12. */ QCPScatterStyle::QCPScatterStyle(const QPainterPath &customPath, const QPen &pen, const QBrush &brush, double size) : mSize(size), mShape(ssCustom), mPen(pen), mBrush(brush), mCustomPath(customPath), mPenDefined(pen.style() != Qt::NoPen) { } /*! Copies the specified \a properties from the \a other scatter style to this scatter style. */ void QCPScatterStyle::setFromOther(const QCPScatterStyle &other, ScatterProperties properties) { if (properties.testFlag(spPen)) { setPen(other.pen()); if (!other.isPenDefined()) undefinePen(); } if (properties.testFlag(spBrush)) setBrush(other.brush()); if (properties.testFlag(spSize)) setSize(other.size()); if (properties.testFlag(spShape)) { setShape(other.shape()); if (other.shape() == ssPixmap) setPixmap(other.pixmap()); else if (other.shape() == ssCustom) setCustomPath(other.customPath()); } } /*! Sets the size (pixel diameter) of the drawn scatter points to \a size. \see setShape */ void QCPScatterStyle::setSize(double size) { mSize = size; } /*! Sets the shape to \a shape. Note that the calls \ref setPixmap and \ref setCustomPath automatically set the shape to \ref ssPixmap and \ref ssCustom, respectively. \see setSize */ void QCPScatterStyle::setShape(QCPScatterStyle::ScatterShape shape) { mShape = shape; } /*! Sets the pen that will be used to draw scatter points to \a pen. If the pen was previously undefined (see \ref isPenDefined), the pen is considered defined after a call to this function, even if \a pen is Qt::NoPen. If you have defined a pen previously by calling this function and now wish to undefine the pen, call \ref undefinePen. \see setBrush */ void QCPScatterStyle::setPen(const QPen &pen) { mPenDefined = true; mPen = pen; } /*! Sets the brush that will be used to fill scatter points to \a brush. Note that not all scatter shapes have fillable areas. For example, \ref ssPlus does not while \ref ssCircle does. \see setPen */ void QCPScatterStyle::setBrush(const QBrush &brush) { mBrush = brush; } /*! Sets the pixmap that will be drawn as scatter point to \a pixmap. Note that \ref setSize does not influence the appearance of the pixmap. The scatter shape is automatically set to \ref ssPixmap. */ void QCPScatterStyle::setPixmap(const QPixmap &pixmap) { setShape(ssPixmap); mPixmap = pixmap; } /*! Sets the custom shape that will be drawn as scatter point to \a customPath. The scatter shape is automatically set to \ref ssCustom. */ void QCPScatterStyle::setCustomPath(const QPainterPath &customPath) { setShape(ssCustom); mCustomPath = customPath; } /*! Sets this scatter style to have an undefined pen (see \ref isPenDefined for what an undefined pen implies). A call to \ref setPen will define a pen. */ void QCPScatterStyle::undefinePen() { mPenDefined = false; } /*! Applies the pen and the brush of this scatter style to \a painter. If this scatter style has an undefined pen (\ref isPenDefined), sets the pen of \a painter to \a defaultPen instead. This function is used by plottables (or any class that wants to draw scatters) just before a number of scatters with this style shall be drawn with the \a painter. \see drawShape */ void QCPScatterStyle::applyTo(QCPPainter *painter, const QPen &defaultPen) const { painter->setPen(mPenDefined ? mPen : defaultPen); painter->setBrush(mBrush); } /*! Draws the scatter shape with \a painter at position \a pos. This function does not modify the pen or the brush on the painter, as \ref applyTo is meant to be called before scatter points are drawn with \ref drawShape. \see applyTo */ void QCPScatterStyle::drawShape(QCPPainter *painter, const QPointF &pos) const { drawShape(painter, pos.x(), pos.y()); } /*! \overload Draws the scatter shape with \a painter at position \a x and \a y. */ void QCPScatterStyle::drawShape(QCPPainter *painter, double x, double y) const { double w = mSize/2.0; switch (mShape) { case ssNone: break; case ssDot: { painter->drawLine(QPointF(x, y), QPointF(x+0.0001, y)); break; } case ssCross: { painter->drawLine(QLineF(x-w, y-w, x+w, y+w)); painter->drawLine(QLineF(x-w, y+w, x+w, y-w)); break; } case ssPlus: { painter->drawLine(QLineF(x-w, y, x+w, y)); painter->drawLine(QLineF( x, y+w, x, y-w)); break; } case ssCircle: { painter->drawEllipse(QPointF(x , y), w, w); break; } case ssDisc: { QBrush b = painter->brush(); painter->setBrush(painter->pen().color()); painter->drawEllipse(QPointF(x , y), w, w); painter->setBrush(b); break; } case ssSquare: { painter->drawRect(QRectF(x-w, y-w, mSize, mSize)); break; } case ssDiamond: { QPointF lineArray[4] = {QPointF(x-w, y), QPointF( x, y-w), QPointF(x+w, y), QPointF( x, y+w)}; painter->drawPolygon(lineArray, 4); break; } case ssStar: { painter->drawLine(QLineF(x-w, y, x+w, y)); painter->drawLine(QLineF( x, y+w, x, y-w)); painter->drawLine(QLineF(x-w*0.707, y-w*0.707, x+w*0.707, y+w*0.707)); painter->drawLine(QLineF(x-w*0.707, y+w*0.707, x+w*0.707, y-w*0.707)); break; } case ssTriangle: { QPointF lineArray[3] = {QPointF(x-w, y+0.755*w), QPointF(x+w, y+0.755*w), QPointF( x, y-0.977*w)}; painter->drawPolygon(lineArray, 3); break; } case ssTriangleInverted: { QPointF lineArray[3] = {QPointF(x-w, y-0.755*w), QPointF(x+w, y-0.755*w), QPointF( x, y+0.977*w)}; painter->drawPolygon(lineArray, 3); break; } case ssCrossSquare: { painter->drawRect(QRectF(x-w, y-w, mSize, mSize)); painter->drawLine(QLineF(x-w, y-w, x+w*0.95, y+w*0.95)); painter->drawLine(QLineF(x-w, y+w*0.95, x+w*0.95, y-w)); break; } case ssPlusSquare: { painter->drawRect(QRectF(x-w, y-w, mSize, mSize)); painter->drawLine(QLineF(x-w, y, x+w*0.95, y)); painter->drawLine(QLineF( x, y+w, x, y-w)); break; } case ssCrossCircle: { painter->drawEllipse(QPointF(x, y), w, w); painter->drawLine(QLineF(x-w*0.707, y-w*0.707, x+w*0.670, y+w*0.670)); painter->drawLine(QLineF(x-w*0.707, y+w*0.670, x+w*0.670, y-w*0.707)); break; } case ssPlusCircle: { painter->drawEllipse(QPointF(x, y), w, w); painter->drawLine(QLineF(x-w, y, x+w, y)); painter->drawLine(QLineF( x, y+w, x, y-w)); break; } case ssPeace: { painter->drawEllipse(QPointF(x, y), w, w); painter->drawLine(QLineF(x, y-w, x, y+w)); painter->drawLine(QLineF(x, y, x-w*0.707, y+w*0.707)); painter->drawLine(QLineF(x, y, x+w*0.707, y+w*0.707)); break; } case ssPixmap: { const double widthHalf = mPixmap.width()*0.5; const double heightHalf = mPixmap.height()*0.5; #if QT_VERSION < QT_VERSION_CHECK(4, 8, 0) const QRectF clipRect = painter->clipRegion().boundingRect().adjusted(-widthHalf, -heightHalf, widthHalf, heightHalf); #else const QRectF clipRect = painter->clipBoundingRect().adjusted(-widthHalf, -heightHalf, widthHalf, heightHalf); #endif if (clipRect.contains(x, y)) painter->drawPixmap(x-widthHalf, y-heightHalf, mPixmap); break; } case ssCustom: { QTransform oldTransform = painter->transform(); painter->translate(x, y); painter->scale(mSize/6.0, mSize/6.0); painter->drawPath(mCustomPath); painter->setTransform(oldTransform); break; } } } /* end of 'src/scatterstyle.cpp' */ //amalgamation: add datacontainer.cpp /* including file 'src/plottable.cpp', size 38845 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPSelectionDecorator //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPSelectionDecorator \brief Controls how a plottable's data selection is drawn Each \ref QCPAbstractPlottable instance has one \ref QCPSelectionDecorator (accessible via \ref QCPAbstractPlottable::selectionDecorator) and uses it when drawing selected segments of its data. The selection decorator controls both pen (\ref setPen) and brush (\ref setBrush), as well as the scatter style (\ref setScatterStyle) if the plottable draws scatters. Since a \ref QCPScatterStyle is itself composed of different properties such as color shape and size, the decorator allows specifying exactly which of those properties shall be used for the selected data point, via \ref setUsedScatterProperties. A \ref QCPSelectionDecorator subclass instance can be passed to a plottable via \ref QCPAbstractPlottable::setSelectionDecorator, allowing greater customizability of the appearance of selected segments. Use \ref copyFrom to easily transfer the settings of one decorator to another one. This is especially useful since plottables take ownership of the passed selection decorator, and thus the same decorator instance can not be passed to multiple plottables. Selection decorators can also themselves perform drawing operations by reimplementing \ref drawDecoration, which is called by the plottable's draw method. The base class \ref QCPSelectionDecorator does not make use of this however. For example, \ref QCPSelectionDecoratorBracket draws brackets around selected data segments. */ /*! Creates a new QCPSelectionDecorator instance with default values */ QCPSelectionDecorator::QCPSelectionDecorator() : mPen(QColor(80, 80, 255), 2.5), mBrush(Qt::NoBrush), mScatterStyle(), mUsedScatterProperties(QCPScatterStyle::spNone), mPlottable(0) { } QCPSelectionDecorator::~QCPSelectionDecorator() { } /*! Sets the pen that will be used by the parent plottable to draw selected data segments. */ void QCPSelectionDecorator::setPen(const QPen &pen) { mPen = pen; } /*! Sets the brush that will be used by the parent plottable to draw selected data segments. */ void QCPSelectionDecorator::setBrush(const QBrush &brush) { mBrush = brush; } /*! Sets the scatter style that will be used by the parent plottable to draw scatters in selected data segments. \a usedProperties specifies which parts of the passed \a scatterStyle will be used by the plottable. The used properties can also be changed via \ref setUsedScatterProperties. */ void QCPSelectionDecorator::setScatterStyle(const QCPScatterStyle &scatterStyle, QCPScatterStyle::ScatterProperties usedProperties) { mScatterStyle = scatterStyle; setUsedScatterProperties(usedProperties); } /*! Use this method to define which properties of the scatter style (set via \ref setScatterStyle) will be used for selected data segments. All properties of the scatter style that are not specified in \a properties will remain as specified in the plottable's original scatter style. \see QCPScatterStyle::ScatterProperty */ void QCPSelectionDecorator::setUsedScatterProperties(const QCPScatterStyle::ScatterProperties &properties) { mUsedScatterProperties = properties; } /*! Sets the pen of \a painter to the pen of this selection decorator. \see applyBrush, getFinalScatterStyle */ void QCPSelectionDecorator::applyPen(QCPPainter *painter) const { painter->setPen(mPen); } /*! Sets the brush of \a painter to the brush of this selection decorator. \see applyPen, getFinalScatterStyle */ void QCPSelectionDecorator::applyBrush(QCPPainter *painter) const { painter->setBrush(mBrush); } /*! Returns the scatter style that the parent plottable shall use for selected scatter points. The plottable's original (unselected) scatter style must be passed as \a unselectedStyle. Depending on the setting of \ref setUsedScatterProperties, the returned scatter style is a mixture of this selecion decorator's scatter style (\ref setScatterStyle), and \a unselectedStyle. \see applyPen, applyBrush, setScatterStyle */ QCPScatterStyle QCPSelectionDecorator::getFinalScatterStyle(const QCPScatterStyle &unselectedStyle) const { QCPScatterStyle result(unselectedStyle); result.setFromOther(mScatterStyle, mUsedScatterProperties); // if style shall inherit pen from plottable (has no own pen defined), give it the selected // plottable pen explicitly, so it doesn't use the unselected plottable pen when used in the // plottable: if (!result.isPenDefined()) result.setPen(mPen); return result; } /*! Copies all properties (e.g. color, fill, scatter style) of the \a other selection decorator to this selection decorator. */ void QCPSelectionDecorator::copyFrom(const QCPSelectionDecorator *other) { setPen(other->pen()); setBrush(other->brush()); setScatterStyle(other->scatterStyle(), other->usedScatterProperties()); } /*! This method is called by all plottables' draw methods to allow custom selection decorations to be drawn. Use the passed \a painter to perform the drawing operations. \a selection carries the data selection for which the decoration shall be drawn. The default base class implementation of \ref QCPSelectionDecorator has no special decoration, so this method does nothing. */ void QCPSelectionDecorator::drawDecoration(QCPPainter *painter, QCPDataSelection selection) { Q_UNUSED(painter) Q_UNUSED(selection) } /*! \internal This method is called as soon as a selection decorator is associated with a plottable, by a call to \ref QCPAbstractPlottable::setSelectionDecorator. This way the selection decorator can obtain a pointer to the plottable that uses it (e.g. to access data points via the \ref QCPAbstractPlottable::interface1D interface). If the selection decorator was already added to a different plottable before, this method aborts the registration and returns false. */ bool QCPSelectionDecorator::registerWithPlottable(QCPAbstractPlottable *plottable) { if (!mPlottable) { mPlottable = plottable; return true; } else { qDebug() << Q_FUNC_INFO << "This selection decorator is already registered with plottable:" << reinterpret_cast(mPlottable); return false; } } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAbstractPlottable //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAbstractPlottable \brief The abstract base class for all data representing objects in a plot. It defines a very basic interface like name, pen, brush, visibility etc. Since this class is abstract, it can't be instantiated. Use one of the subclasses or create a subclass yourself to create new ways of displaying data (see "Creating own plottables" below). Plottables that display one-dimensional data (i.e. data points have a single key dimension and one or multiple values at each key) are based off of the template subclass \ref QCPAbstractPlottable1D, see details there. All further specifics are in the subclasses, for example: \li A normal graph with possibly a line and/or scatter points \ref QCPGraph (typically created with \ref QCustomPlot::addGraph) \li A parametric curve: \ref QCPCurve \li A bar chart: \ref QCPBars \li A statistical box plot: \ref QCPStatisticalBox \li A color encoded two-dimensional map: \ref QCPColorMap \li An OHLC/Candlestick chart: \ref QCPFinancial \section plottables-subclassing Creating own plottables Subclassing directly from QCPAbstractPlottable is only recommended if you wish to display two-dimensional data like \ref QCPColorMap, i.e. two logical key dimensions and one (or more) data dimensions. If you want to display data with only one logical key dimension, you should rather derive from \ref QCPAbstractPlottable1D. If subclassing QCPAbstractPlottable directly, these are the pure virtual functions you must implement: \li \ref selectTest \li \ref draw \li \ref drawLegendIcon \li \ref getKeyRange \li \ref getValueRange See the documentation of those functions for what they need to do. For drawing your plot, you can use the \ref coordsToPixels functions to translate a point in plot coordinates to pixel coordinates. This function is quite convenient, because it takes the orientation of the key and value axes into account for you (x and y are swapped when the key axis is vertical and the value axis horizontal). If you are worried about performance (i.e. you need to translate many points in a loop like QCPGraph), you can directly use \ref QCPAxis::coordToPixel. However, you must then take care about the orientation of the axis yourself. Here are some important members you inherit from QCPAbstractPlottable:
QCustomPlot *\b mParentPlot A pointer to the parent QCustomPlot instance. The parent plot is inferred from the axes that are passed in the constructor.
QString \b mName The name of the plottable.
QPen \b mPen The generic pen of the plottable. You should use this pen for the most prominent data representing lines in the plottable (e.g QCPGraph uses this pen for its graph lines and scatters)
QBrush \b mBrush The generic brush of the plottable. You should use this brush for the most prominent fillable structures in the plottable (e.g. QCPGraph uses this brush to control filling under the graph)
QPointer<\ref QCPAxis> \b mKeyAxis, \b mValueAxis The key and value axes this plottable is attached to. Call their QCPAxis::coordToPixel functions to translate coordinates to pixels in either the key or value dimension. Make sure to check whether the pointer is null before using it. If one of the axes is null, don't draw the plottable.
\ref QCPSelectionDecorator \b mSelectionDecorator The currently set selection decorator which specifies how selected data of the plottable shall be drawn and decorated. When drawing your data, you must consult this decorator for the appropriate pen/brush before drawing unselected/selected data segments. Finally, you should call its \ref QCPSelectionDecorator::drawDecoration method at the end of your \ref draw implementation.
\ref QCP::SelectionType \b mSelectable In which composition, if at all, this plottable's data may be selected. Enforcing this setting on the data selection is done by QCPAbstractPlottable automatically.
\ref QCPDataSelection \b mSelection Holds the current selection state of the plottable's data, i.e. the selected data ranges (\ref QCPDataRange).
*/ /* start of documentation of inline functions */ /*! \fn QCPSelectionDecorator *QCPAbstractPlottable::selectionDecorator() const Provides access to the selection decorator of this plottable. The selection decorator controls how selected data ranges are drawn (e.g. their pen color and fill), see \ref QCPSelectionDecorator for details. If you wish to use an own \ref QCPSelectionDecorator subclass, pass an instance of it to \ref setSelectionDecorator. */ /*! \fn bool QCPAbstractPlottable::selected() const Returns true if there are any data points of the plottable currently selected. Use \ref selection to retrieve the current \ref QCPDataSelection. */ /*! \fn QCPDataSelection QCPAbstractPlottable::selection() const Returns a \ref QCPDataSelection encompassing all the data points that are currently selected on this plottable. \see selected, setSelection, setSelectable */ /*! \fn virtual QCPPlottableInterface1D *QCPAbstractPlottable::interface1D() If this plottable is a one-dimensional plottable, i.e. it implements the \ref QCPPlottableInterface1D, returns the \a this pointer with that type. Otherwise (e.g. in the case of a \ref QCPColorMap) returns zero. You can use this method to gain read access to data coordinates while holding a pointer to the abstract base class only. */ /* end of documentation of inline functions */ /* start of documentation of pure virtual functions */ /*! \fn void QCPAbstractPlottable::drawLegendIcon(QCPPainter *painter, const QRect &rect) const = 0 \internal called by QCPLegend::draw (via QCPPlottableLegendItem::draw) to create a graphical representation of this plottable inside \a rect, next to the plottable name. The passed \a painter has its cliprect set to \a rect, so painting outside of \a rect won't appear outside the legend icon border. */ /*! \fn QCPRange QCPAbstractPlottable::getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain) const = 0 Returns the coordinate range that all data in this plottable span in the key axis dimension. For logarithmic plots, one can set \a inSignDomain to either \ref QCP::sdNegative or \ref QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set \a inSignDomain to \ref QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set \a inSignDomain to \ref QCP::sdBoth (default). \a foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data). Note that \a foundRange is not the same as \ref QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case \a foundRange would return true, but the returned range is not a valid range in terms of \ref QCPRange::validRange. \see rescaleAxes, getValueRange */ /*! \fn QCPRange QCPAbstractPlottable::getValueRange(bool &foundRange, QCP::SignDomain inSignDomain, const QCPRange &inKeyRange) const = 0 Returns the coordinate range that the data points in the specified key range (\a inKeyRange) span in the value axis dimension. For logarithmic plots, one can set \a inSignDomain to either \ref QCP::sdNegative or \ref QCP::sdPositive in order to restrict the returned range to that sign domain. E.g. when only negative range is wanted, set \a inSignDomain to \ref QCP::sdNegative and all positive points will be ignored for range calculation. For no restriction, just set \a inSignDomain to \ref QCP::sdBoth (default). \a foundRange is an output parameter that indicates whether a range could be found or not. If this is false, you shouldn't use the returned range (e.g. no points in data). If \a inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys. Note that \a foundRange is not the same as \ref QCPRange::validRange, since the range returned by this function may have size zero (e.g. when there is only one data point). In this case \a foundRange would return true, but the returned range is not a valid range in terms of \ref QCPRange::validRange. \see rescaleAxes, getKeyRange */ /* end of documentation of pure virtual functions */ /* start of documentation of signals */ /*! \fn void QCPAbstractPlottable::selectionChanged(bool selected) This signal is emitted when the selection state of this plottable has changed, either by user interaction or by a direct call to \ref setSelection. The parameter \a selected indicates whether there are any points selected or not. \see selectionChanged(const QCPDataSelection &selection) */ /*! \fn void QCPAbstractPlottable::selectionChanged(const QCPDataSelection &selection) This signal is emitted when the selection state of this plottable has changed, either by user interaction or by a direct call to \ref setSelection. The parameter \a selection holds the currently selected data ranges. \see selectionChanged(bool selected) */ /*! \fn void QCPAbstractPlottable::selectableChanged(QCP::SelectionType selectable); This signal is emitted when the selectability of this plottable has changed. \see setSelectable */ /* end of documentation of signals */ /*! Constructs an abstract plottable which uses \a keyAxis as its key axis ("x") and \a valueAxis as its value axis ("y"). \a keyAxis and \a valueAxis must reside in the same QCustomPlot instance and have perpendicular orientations. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though. Since QCPAbstractPlottable is an abstract class that defines the basic interface to plottables, it can't be directly instantiated. You probably want one of the subclasses like \ref QCPGraph or \ref QCPCurve instead. */ QCPAbstractPlottable::QCPAbstractPlottable(QCPAxis *keyAxis, QCPAxis *valueAxis) : QCPLayerable(keyAxis->parentPlot(), QString(), keyAxis->axisRect()), mName(), mAntialiasedFill(true), mAntialiasedScatters(true), mPen(Qt::black), mBrush(Qt::NoBrush), mKeyAxis(keyAxis), mValueAxis(valueAxis), mSelectable(QCP::stWhole), mSelectionDecorator(0) { if (keyAxis->parentPlot() != valueAxis->parentPlot()) qDebug() << Q_FUNC_INFO << "Parent plot of keyAxis is not the same as that of valueAxis."; if (keyAxis->orientation() == valueAxis->orientation()) qDebug() << Q_FUNC_INFO << "keyAxis and valueAxis must be orthogonal to each other."; mParentPlot->registerPlottable(this); setSelectionDecorator(new QCPSelectionDecorator); } QCPAbstractPlottable::~QCPAbstractPlottable() { if (mSelectionDecorator) { delete mSelectionDecorator; mSelectionDecorator = 0; } } /*! The name is the textual representation of this plottable as it is displayed in the legend (\ref QCPLegend). It may contain any UTF-8 characters, including newlines. */ void QCPAbstractPlottable::setName(const QString &name) { mName = name; } /*! Sets whether fills of this plottable are drawn antialiased or not. Note that this setting may be overridden by \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. */ void QCPAbstractPlottable::setAntialiasedFill(bool enabled) { mAntialiasedFill = enabled; } /*! Sets whether the scatter symbols of this plottable are drawn antialiased or not. Note that this setting may be overridden by \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. */ void QCPAbstractPlottable::setAntialiasedScatters(bool enabled) { mAntialiasedScatters = enabled; } /*! The pen is used to draw basic lines that make up the plottable representation in the plot. For example, the \ref QCPGraph subclass draws its graph lines with this pen. \see setBrush */ void QCPAbstractPlottable::setPen(const QPen &pen) { mPen = pen; } /*! The brush is used to draw basic fills of the plottable representation in the plot. The Fill can be a color, gradient or texture, see the usage of QBrush. For example, the \ref QCPGraph subclass draws the fill under the graph with this brush, when it's not set to Qt::NoBrush. \see setPen */ void QCPAbstractPlottable::setBrush(const QBrush &brush) { mBrush = brush; } /*! The key axis of a plottable can be set to any axis of a QCustomPlot, as long as it is orthogonal to the plottable's value axis. This function performs no checks to make sure this is the case. The typical mathematical choice is to use the x-axis (QCustomPlot::xAxis) as key axis and the y-axis (QCustomPlot::yAxis) as value axis. Normally, the key and value axes are set in the constructor of the plottable (or \ref QCustomPlot::addGraph when working with QCPGraphs through the dedicated graph interface). \see setValueAxis */ void QCPAbstractPlottable::setKeyAxis(QCPAxis *axis) { mKeyAxis = axis; } /*! The value axis of a plottable can be set to any axis of a QCustomPlot, as long as it is orthogonal to the plottable's key axis. This function performs no checks to make sure this is the case. The typical mathematical choice is to use the x-axis (QCustomPlot::xAxis) as key axis and the y-axis (QCustomPlot::yAxis) as value axis. Normally, the key and value axes are set in the constructor of the plottable (or \ref QCustomPlot::addGraph when working with QCPGraphs through the dedicated graph interface). \see setKeyAxis */ void QCPAbstractPlottable::setValueAxis(QCPAxis *axis) { mValueAxis = axis; } /*! Sets which data ranges of this plottable are selected. Selected data ranges are drawn differently (e.g. color) in the plot. This can be controlled via the selection decorator (see \ref selectionDecorator). The entire selection mechanism for plottables is handled automatically when \ref QCustomPlot::setInteractions contains iSelectPlottables. You only need to call this function when you wish to change the selection state programmatically. Using \ref setSelectable you can further specify for each plottable whether and to which granularity it is selectable. If \a selection is not compatible with the current \ref QCP::SelectionType set via \ref setSelectable, the resulting selection will be adjusted accordingly (see \ref QCPDataSelection::enforceType). emits the \ref selectionChanged signal when \a selected is different from the previous selection state. \see setSelectable, selectTest */ void QCPAbstractPlottable::setSelection(QCPDataSelection selection) { selection.enforceType(mSelectable); if (mSelection != selection) { mSelection = selection; emit selectionChanged(selected()); emit selectionChanged(mSelection); } } /*! Use this method to set an own QCPSelectionDecorator (subclass) instance. This allows you to customize the visual representation of selected data ranges further than by using the default QCPSelectionDecorator. The plottable takes ownership of the \a decorator. The currently set decorator can be accessed via \ref selectionDecorator. */ void QCPAbstractPlottable::setSelectionDecorator(QCPSelectionDecorator *decorator) { if (decorator) { if (decorator->registerWithPlottable(this)) { if (mSelectionDecorator) // delete old decorator if necessary delete mSelectionDecorator; mSelectionDecorator = decorator; } } else if (mSelectionDecorator) // just clear decorator { delete mSelectionDecorator; mSelectionDecorator = 0; } } /*! Sets whether and to which granularity this plottable can be selected. A selection can happen by clicking on the QCustomPlot surface (When \ref QCustomPlot::setInteractions contains \ref QCP::iSelectPlottables), by dragging a selection rect (When \ref QCustomPlot::setSelectionRectMode is \ref QCP::srmSelect), or programmatically by calling \ref setSelection. \see setSelection, QCP::SelectionType */ void QCPAbstractPlottable::setSelectable(QCP::SelectionType selectable) { if (mSelectable != selectable) { mSelectable = selectable; QCPDataSelection oldSelection = mSelection; mSelection.enforceType(mSelectable); emit selectableChanged(mSelectable); if (mSelection != oldSelection) { emit selectionChanged(selected()); emit selectionChanged(mSelection); } } } /*! Convenience function for transforming a key/value pair to pixels on the QCustomPlot surface, taking the orientations of the axes associated with this plottable into account (e.g. whether key represents x or y). \a key and \a value are transformed to the coodinates in pixels and are written to \a x and \a y. \see pixelsToCoords, QCPAxis::coordToPixel */ void QCPAbstractPlottable::coordsToPixels(double key, double value, double &x, double &y) const { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } if (keyAxis->orientation() == Qt::Horizontal) { x = keyAxis->coordToPixel(key); y = valueAxis->coordToPixel(value); } else { y = keyAxis->coordToPixel(key); x = valueAxis->coordToPixel(value); } } /*! \overload Transforms the given \a key and \a value to pixel coordinates and returns them in a QPointF. */ const QPointF QCPAbstractPlottable::coordsToPixels(double key, double value) const { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return QPointF(); } if (keyAxis->orientation() == Qt::Horizontal) return QPointF(keyAxis->coordToPixel(key), valueAxis->coordToPixel(value)); else return QPointF(valueAxis->coordToPixel(value), keyAxis->coordToPixel(key)); } /*! Convenience function for transforming a x/y pixel pair on the QCustomPlot surface to plot coordinates, taking the orientations of the axes associated with this plottable into account (e.g. whether key represents x or y). \a x and \a y are transformed to the plot coodinates and are written to \a key and \a value. \see coordsToPixels, QCPAxis::coordToPixel */ void QCPAbstractPlottable::pixelsToCoords(double x, double y, double &key, double &value) const { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } if (keyAxis->orientation() == Qt::Horizontal) { key = keyAxis->pixelToCoord(x); value = valueAxis->pixelToCoord(y); } else { key = keyAxis->pixelToCoord(y); value = valueAxis->pixelToCoord(x); } } /*! \overload Returns the pixel input \a pixelPos as plot coordinates \a key and \a value. */ void QCPAbstractPlottable::pixelsToCoords(const QPointF &pixelPos, double &key, double &value) const { pixelsToCoords(pixelPos.x(), pixelPos.y(), key, value); } /*! Rescales the key and value axes associated with this plottable to contain all displayed data, so the whole plottable is visible. If the scaling of an axis is logarithmic, rescaleAxes will make sure not to rescale to an illegal range i.e. a range containing different signs and/or zero. Instead it will stay in the current sign domain and ignore all parts of the plottable that lie outside of that domain. \a onlyEnlarge makes sure the ranges are only expanded, never reduced. So it's possible to show multiple plottables in their entirety by multiple calls to rescaleAxes where the first call has \a onlyEnlarge set to false (the default), and all subsequent set to true. \see rescaleKeyAxis, rescaleValueAxis, QCustomPlot::rescaleAxes, QCPAxis::rescale */ void QCPAbstractPlottable::rescaleAxes(bool onlyEnlarge) const { rescaleKeyAxis(onlyEnlarge); rescaleValueAxis(onlyEnlarge); } /*! Rescales the key axis of the plottable so the whole plottable is visible. See \ref rescaleAxes for detailed behaviour. */ void QCPAbstractPlottable::rescaleKeyAxis(bool onlyEnlarge) const { QCPAxis *keyAxis = mKeyAxis.data(); if (!keyAxis) { qDebug() << Q_FUNC_INFO << "invalid key axis"; return; } QCP::SignDomain signDomain = QCP::sdBoth; if (keyAxis->scaleType() == QCPAxis::stLogarithmic) signDomain = (keyAxis->range().upper < 0 ? QCP::sdNegative : QCP::sdPositive); bool foundRange; QCPRange newRange = getKeyRange(foundRange, signDomain); if (foundRange) { if (onlyEnlarge) newRange.expand(keyAxis->range()); if (!QCPRange::validRange(newRange)) // likely due to range being zero (plottable has only constant data in this axis dimension), shift current range to at least center the plottable { double center = (newRange.lower+newRange.upper)*0.5; // upper and lower should be equal anyway, but just to make sure, incase validRange returned false for other reason if (keyAxis->scaleType() == QCPAxis::stLinear) { newRange.lower = center-keyAxis->range().size()/2.0; newRange.upper = center+keyAxis->range().size()/2.0; } else // scaleType() == stLogarithmic { newRange.lower = center/qSqrt(keyAxis->range().upper/keyAxis->range().lower); newRange.upper = center*qSqrt(keyAxis->range().upper/keyAxis->range().lower); } } keyAxis->setRange(newRange); } } /*! Rescales the value axis of the plottable so the whole plottable is visible. If \a inKeyRange is set to true, only the data points which are in the currently visible key axis range are considered. Returns true if the axis was actually scaled. This might not be the case if this plottable has an invalid range, e.g. because it has no data points. See \ref rescaleAxes for detailed behaviour. */ void QCPAbstractPlottable::rescaleValueAxis(bool onlyEnlarge, bool inKeyRange) const { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } QCP::SignDomain signDomain = QCP::sdBoth; if (valueAxis->scaleType() == QCPAxis::stLogarithmic) signDomain = (valueAxis->range().upper < 0 ? QCP::sdNegative : QCP::sdPositive); bool foundRange; QCPRange newRange = getValueRange(foundRange, signDomain, inKeyRange ? keyAxis->range() : QCPRange()); if (foundRange) { if (onlyEnlarge) newRange.expand(valueAxis->range()); if (!QCPRange::validRange(newRange)) // likely due to range being zero (plottable has only constant data in this axis dimension), shift current range to at least center the plottable { double center = (newRange.lower+newRange.upper)*0.5; // upper and lower should be equal anyway, but just to make sure, incase validRange returned false for other reason if (valueAxis->scaleType() == QCPAxis::stLinear) { newRange.lower = center-valueAxis->range().size()/2.0; newRange.upper = center+valueAxis->range().size()/2.0; } else // scaleType() == stLogarithmic { newRange.lower = center/qSqrt(valueAxis->range().upper/valueAxis->range().lower); newRange.upper = center*qSqrt(valueAxis->range().upper/valueAxis->range().lower); } } valueAxis->setRange(newRange); } } /*! \overload Adds this plottable to the specified \a legend. Creates a QCPPlottableLegendItem which is inserted into the legend. Returns true on success, i.e. when the legend exists and a legend item associated with this plottable isn't already in the legend. If the plottable needs a more specialized representation in the legend, you can create a corresponding subclass of \ref QCPPlottableLegendItem and add it to the legend manually instead of calling this method. \see removeFromLegend, QCPLegend::addItem */ bool QCPAbstractPlottable::addToLegend(QCPLegend *legend) { if (!legend) { qDebug() << Q_FUNC_INFO << "passed legend is null"; return false; } if (legend->parentPlot() != mParentPlot) { qDebug() << Q_FUNC_INFO << "passed legend isn't in the same QCustomPlot as this plottable"; return false; } if (!legend->hasItemWithPlottable(this)) { legend->addItem(new QCPPlottableLegendItem(legend, this)); return true; } else return false; } /*! \overload Adds this plottable to the legend of the parent QCustomPlot (\ref QCustomPlot::legend). \see removeFromLegend */ bool QCPAbstractPlottable::addToLegend() { if (!mParentPlot || !mParentPlot->legend) return false; else return addToLegend(mParentPlot->legend); } /*! \overload Removes the plottable from the specifed \a legend. This means the \ref QCPPlottableLegendItem that is associated with this plottable is removed. Returns true on success, i.e. if the legend exists and a legend item associated with this plottable was found and removed. \see addToLegend, QCPLegend::removeItem */ bool QCPAbstractPlottable::removeFromLegend(QCPLegend *legend) const { if (!legend) { qDebug() << Q_FUNC_INFO << "passed legend is null"; return false; } if (QCPPlottableLegendItem *lip = legend->itemWithPlottable(this)) return legend->removeItem(lip); else return false; } /*! \overload Removes the plottable from the legend of the parent QCustomPlot. \see addToLegend */ bool QCPAbstractPlottable::removeFromLegend() const { if (!mParentPlot || !mParentPlot->legend) return false; else return removeFromLegend(mParentPlot->legend); } /* inherits documentation from base class */ QRect QCPAbstractPlottable::clipRect() const { if (mKeyAxis && mValueAxis) return mKeyAxis.data()->axisRect()->rect() & mValueAxis.data()->axisRect()->rect(); else return QRect(); } /* inherits documentation from base class */ QCP::Interaction QCPAbstractPlottable::selectionCategory() const { return QCP::iSelectPlottables; } /*! \internal A convenience function to easily set the QPainter::Antialiased hint on the provided \a painter before drawing plottable lines. This is the antialiasing state the painter passed to the \ref draw method is in by default. This function takes into account the local setting of the antialiasing flag as well as the overrides set with \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. \seebaseclassmethod \see setAntialiased, applyFillAntialiasingHint, applyScattersAntialiasingHint */ void QCPAbstractPlottable::applyDefaultAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiased, QCP::aePlottables); } /*! \internal A convenience function to easily set the QPainter::Antialiased hint on the provided \a painter before drawing plottable fills. This function takes into account the local setting of the antialiasing flag as well as the overrides set with \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. \see setAntialiased, applyDefaultAntialiasingHint, applyScattersAntialiasingHint */ void QCPAbstractPlottable::applyFillAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiasedFill, QCP::aeFills); } /*! \internal A convenience function to easily set the QPainter::Antialiased hint on the provided \a painter before drawing plottable scatter points. This function takes into account the local setting of the antialiasing flag as well as the overrides set with \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. \see setAntialiased, applyFillAntialiasingHint, applyDefaultAntialiasingHint */ void QCPAbstractPlottable::applyScattersAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiasedScatters, QCP::aeScatters); } /* inherits documentation from base class */ void QCPAbstractPlottable::selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) { Q_UNUSED(event) if (mSelectable != QCP::stNone) { QCPDataSelection newSelection = details.value(); QCPDataSelection selectionBefore = mSelection; if (additive) { if (mSelectable == QCP::stWhole) // in whole selection mode, we toggle to no selection even if currently unselected point was hit { if (selected()) setSelection(QCPDataSelection()); else setSelection(newSelection); } else // in all other selection modes we toggle selections of homogeneously selected/unselected segments { if (mSelection.contains(newSelection)) // if entire newSelection is already selected, toggle selection setSelection(mSelection-newSelection); else setSelection(mSelection+newSelection); } } else setSelection(newSelection); if (selectionStateChanged) *selectionStateChanged = mSelection != selectionBefore; } } /* inherits documentation from base class */ void QCPAbstractPlottable::deselectEvent(bool *selectionStateChanged) { if (mSelectable != QCP::stNone) { QCPDataSelection selectionBefore = mSelection; setSelection(QCPDataSelection()); if (selectionStateChanged) *selectionStateChanged = mSelection != selectionBefore; } } /* end of 'src/plottable.cpp' */ /* including file 'src/item.cpp', size 49269 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemAnchor //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemAnchor \brief An anchor of an item to which positions can be attached to. An item (QCPAbstractItem) may have one or more anchors. Unlike QCPItemPosition, an anchor doesn't control anything on its item, but provides a way to tie other items via their positions to the anchor. For example, a QCPItemRect is defined by its positions \a topLeft and \a bottomRight. Additionally it has various anchors like \a top, \a topRight or \a bottomLeft etc. So you can attach the \a start (which is a QCPItemPosition) of a QCPItemLine to one of the anchors by calling QCPItemPosition::setParentAnchor on \a start, passing the wanted anchor of the QCPItemRect. This way the start of the line will now always follow the respective anchor location on the rect item. Note that QCPItemPosition derives from QCPItemAnchor, so every position can also serve as an anchor to other positions. To learn how to provide anchors in your own item subclasses, see the subclassing section of the QCPAbstractItem documentation. */ /* start documentation of inline functions */ /*! \fn virtual QCPItemPosition *QCPItemAnchor::toQCPItemPosition() Returns 0 if this instance is merely a QCPItemAnchor, and a valid pointer of type QCPItemPosition* if it actually is a QCPItemPosition (which is a subclass of QCPItemAnchor). This safe downcast functionality could also be achieved with a dynamic_cast. However, QCustomPlot avoids dynamic_cast to work with projects that don't have RTTI support enabled (e.g. -fno-rtti flag with gcc compiler). */ /* end documentation of inline functions */ /*! Creates a new QCPItemAnchor. You shouldn't create QCPItemAnchor instances directly, even if you want to make a new item subclass. Use \ref QCPAbstractItem::createAnchor instead, as explained in the subclassing section of the QCPAbstractItem documentation. */ QCPItemAnchor::QCPItemAnchor(QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name, int anchorId) : mName(name), mParentPlot(parentPlot), mParentItem(parentItem), mAnchorId(anchorId) { } QCPItemAnchor::~QCPItemAnchor() { // unregister as parent at children: foreach (QCPItemPosition *child, mChildrenX.toList()) { if (child->parentAnchorX() == this) child->setParentAnchorX(0); // this acts back on this anchor and child removes itself from mChildrenX } foreach (QCPItemPosition *child, mChildrenY.toList()) { if (child->parentAnchorY() == this) child->setParentAnchorY(0); // this acts back on this anchor and child removes itself from mChildrenY } } /*! Returns the final absolute pixel position of the QCPItemAnchor on the QCustomPlot surface. The pixel information is internally retrieved via QCPAbstractItem::anchorPixelPosition of the parent item, QCPItemAnchor is just an intermediary. */ QPointF QCPItemAnchor::pixelPosition() const { if (mParentItem) { if (mAnchorId > -1) { return mParentItem->anchorPixelPosition(mAnchorId); } else { qDebug() << Q_FUNC_INFO << "no valid anchor id set:" << mAnchorId; return QPointF(); } } else { qDebug() << Q_FUNC_INFO << "no parent item set"; return QPointF(); } } /*! \internal Adds \a pos to the childX list of this anchor, which keeps track of which children use this anchor as parent anchor for the respective coordinate. This is necessary to notify the children prior to destruction of the anchor. Note that this function does not change the parent setting in \a pos. */ void QCPItemAnchor::addChildX(QCPItemPosition *pos) { if (!mChildrenX.contains(pos)) mChildrenX.insert(pos); else qDebug() << Q_FUNC_INFO << "provided pos is child already" << reinterpret_cast(pos); } /*! \internal Removes \a pos from the childX list of this anchor. Note that this function does not change the parent setting in \a pos. */ void QCPItemAnchor::removeChildX(QCPItemPosition *pos) { if (!mChildrenX.remove(pos)) qDebug() << Q_FUNC_INFO << "provided pos isn't child" << reinterpret_cast(pos); } /*! \internal Adds \a pos to the childY list of this anchor, which keeps track of which children use this anchor as parent anchor for the respective coordinate. This is necessary to notify the children prior to destruction of the anchor. Note that this function does not change the parent setting in \a pos. */ void QCPItemAnchor::addChildY(QCPItemPosition *pos) { if (!mChildrenY.contains(pos)) mChildrenY.insert(pos); else qDebug() << Q_FUNC_INFO << "provided pos is child already" << reinterpret_cast(pos); } /*! \internal Removes \a pos from the childY list of this anchor. Note that this function does not change the parent setting in \a pos. */ void QCPItemAnchor::removeChildY(QCPItemPosition *pos) { if (!mChildrenY.remove(pos)) qDebug() << Q_FUNC_INFO << "provided pos isn't child" << reinterpret_cast(pos); } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemPosition //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemPosition \brief Manages the position of an item. Every item has at least one public QCPItemPosition member pointer which provides ways to position the item on the QCustomPlot surface. Some items have multiple positions, for example QCPItemRect has two: \a topLeft and \a bottomRight. QCPItemPosition has a type (\ref PositionType) that can be set with \ref setType. This type defines how coordinates passed to \ref setCoords are to be interpreted, e.g. as absolute pixel coordinates, as plot coordinates of certain axes, etc. For more advanced plots it is also possible to assign different types per X/Y coordinate of the position (see \ref setTypeX, \ref setTypeY). This way an item could be positioned at a fixed pixel distance from the top in the Y direction, while following a plot coordinate in the X direction. A QCPItemPosition may have a parent QCPItemAnchor, see \ref setParentAnchor. This way you can tie multiple items together. If the QCPItemPosition has a parent, its coordinates (\ref setCoords) are considered to be absolute pixels in the reference frame of the parent anchor, where (0, 0) means directly ontop of the parent anchor. For example, You could attach the \a start position of a QCPItemLine to the \a bottom anchor of a QCPItemText to make the starting point of the line always be centered under the text label, no matter where the text is moved to. For more advanced plots, it is possible to assign different parent anchors per X/Y coordinate of the position, see \ref setParentAnchorX, \ref setParentAnchorY. This way an item could follow another item in the X direction but stay at a fixed position in the Y direction. Or even follow item A in X, and item B in Y. Note that every QCPItemPosition inherits from QCPItemAnchor and thus can itself be used as parent anchor for other positions. To set the apparent pixel position on the QCustomPlot surface directly, use \ref setPixelPosition. This works no matter what type this QCPItemPosition is or what parent-child situation it is in, as \ref setPixelPosition transforms the coordinates appropriately, to make the position appear at the specified pixel values. */ /* start documentation of inline functions */ /*! \fn QCPItemPosition::PositionType *QCPItemPosition::type() const Returns the current position type. If different types were set for X and Y (\ref setTypeX, \ref setTypeY), this method returns the type of the X coordinate. In that case rather use \a typeX() and \a typeY(). \see setType */ /*! \fn QCPItemAnchor *QCPItemPosition::parentAnchor() const Returns the current parent anchor. If different parent anchors were set for X and Y (\ref setParentAnchorX, \ref setParentAnchorY), this method returns the parent anchor of the Y coordinate. In that case rather use \a parentAnchorX() and \a parentAnchorY(). \see setParentAnchor */ /* end documentation of inline functions */ /*! Creates a new QCPItemPosition. You shouldn't create QCPItemPosition instances directly, even if you want to make a new item subclass. Use \ref QCPAbstractItem::createPosition instead, as explained in the subclassing section of the QCPAbstractItem documentation. */ QCPItemPosition::QCPItemPosition(QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name) : QCPItemAnchor(parentPlot, parentItem, name), mPositionTypeX(ptAbsolute), mPositionTypeY(ptAbsolute), mKey(0), mValue(0), mParentAnchorX(0), mParentAnchorY(0) { } QCPItemPosition::~QCPItemPosition() { // unregister as parent at children: // Note: this is done in ~QCPItemAnchor again, but it's important QCPItemPosition does it itself, because only then // the setParentAnchor(0) call the correct QCPItemPosition::pixelPosition function instead of QCPItemAnchor::pixelPosition foreach (QCPItemPosition *child, mChildrenX.toList()) { if (child->parentAnchorX() == this) child->setParentAnchorX(0); // this acts back on this anchor and child removes itself from mChildrenX } foreach (QCPItemPosition *child, mChildrenY.toList()) { if (child->parentAnchorY() == this) child->setParentAnchorY(0); // this acts back on this anchor and child removes itself from mChildrenY } // unregister as child in parent: if (mParentAnchorX) mParentAnchorX->removeChildX(this); if (mParentAnchorY) mParentAnchorY->removeChildY(this); } /* can't make this a header inline function, because QPointer breaks with forward declared types, see QTBUG-29588 */ QCPAxisRect *QCPItemPosition::axisRect() const { return mAxisRect.data(); } /*! Sets the type of the position. The type defines how the coordinates passed to \ref setCoords should be handled and how the QCPItemPosition should behave in the plot. The possible values for \a type can be separated in two main categories: \li The position is regarded as a point in plot coordinates. This corresponds to \ref ptPlotCoords and requires two axes that define the plot coordinate system. They can be specified with \ref setAxes. By default, the QCustomPlot's x- and yAxis are used. \li The position is fixed on the QCustomPlot surface, i.e. independent of axis ranges. This corresponds to all other types, i.e. \ref ptAbsolute, \ref ptViewportRatio and \ref ptAxisRectRatio. They differ only in the way the absolute position is described, see the documentation of \ref PositionType for details. For \ref ptAxisRectRatio, note that you can specify the axis rect with \ref setAxisRect. By default this is set to the main axis rect. Note that the position type \ref ptPlotCoords is only available (and sensible) when the position has no parent anchor (\ref setParentAnchor). If the type is changed, the apparent pixel position on the plot is preserved. This means the coordinates as retrieved with coords() and set with \ref setCoords may change in the process. This method sets the type for both X and Y directions. It is also possible to set different types for X and Y, see \ref setTypeX, \ref setTypeY. */ void QCPItemPosition::setType(QCPItemPosition::PositionType type) { setTypeX(type); setTypeY(type); } /*! This method sets the position type of the X coordinate to \a type. For a detailed description of what a position type is, see the documentation of \ref setType. \see setType, setTypeY */ void QCPItemPosition::setTypeX(QCPItemPosition::PositionType type) { if (mPositionTypeX != type) { // if switching from or to coordinate type that isn't valid (e.g. because axes or axis rect // were deleted), don't try to recover the pixelPosition() because it would output a qDebug warning. bool retainPixelPosition = true; if ((mPositionTypeX == ptPlotCoords || type == ptPlotCoords) && (!mKeyAxis || !mValueAxis)) retainPixelPosition = false; if ((mPositionTypeX == ptAxisRectRatio || type == ptAxisRectRatio) && (!mAxisRect)) retainPixelPosition = false; QPointF pixel; if (retainPixelPosition) pixel = pixelPosition(); mPositionTypeX = type; if (retainPixelPosition) setPixelPosition(pixel); } } /*! This method sets the position type of the Y coordinate to \a type. For a detailed description of what a position type is, see the documentation of \ref setType. \see setType, setTypeX */ void QCPItemPosition::setTypeY(QCPItemPosition::PositionType type) { if (mPositionTypeY != type) { // if switching from or to coordinate type that isn't valid (e.g. because axes or axis rect // were deleted), don't try to recover the pixelPosition() because it would output a qDebug warning. bool retainPixelPosition = true; if ((mPositionTypeY == ptPlotCoords || type == ptPlotCoords) && (!mKeyAxis || !mValueAxis)) retainPixelPosition = false; if ((mPositionTypeY == ptAxisRectRatio || type == ptAxisRectRatio) && (!mAxisRect)) retainPixelPosition = false; QPointF pixel; if (retainPixelPosition) pixel = pixelPosition(); mPositionTypeY = type; if (retainPixelPosition) setPixelPosition(pixel); } } /*! Sets the parent of this QCPItemPosition to \a parentAnchor. This means the position will now follow any position changes of the anchor. The local coordinate system of positions with a parent anchor always is absolute pixels, with (0, 0) being exactly on top of the parent anchor. (Hence the type shouldn't be set to \ref ptPlotCoords for positions with parent anchors.) if \a keepPixelPosition is true, the current pixel position of the QCPItemPosition is preserved during reparenting. If it's set to false, the coordinates are set to (0, 0), i.e. the position will be exactly on top of the parent anchor. To remove this QCPItemPosition from any parent anchor, set \a parentAnchor to 0. If the QCPItemPosition previously had no parent and the type is \ref ptPlotCoords, the type is set to \ref ptAbsolute, to keep the position in a valid state. This method sets the parent anchor for both X and Y directions. It is also possible to set different parents for X and Y, see \ref setParentAnchorX, \ref setParentAnchorY. */ bool QCPItemPosition::setParentAnchor(QCPItemAnchor *parentAnchor, bool keepPixelPosition) { bool successX = setParentAnchorX(parentAnchor, keepPixelPosition); bool successY = setParentAnchorY(parentAnchor, keepPixelPosition); return successX && successY; } /*! This method sets the parent anchor of the X coordinate to \a parentAnchor. For a detailed description of what a parent anchor is, see the documentation of \ref setParentAnchor. \see setParentAnchor, setParentAnchorY */ bool QCPItemPosition::setParentAnchorX(QCPItemAnchor *parentAnchor, bool keepPixelPosition) { // make sure self is not assigned as parent: if (parentAnchor == this) { qDebug() << Q_FUNC_INFO << "can't set self as parent anchor" << reinterpret_cast(parentAnchor); return false; } // make sure no recursive parent-child-relationships are created: QCPItemAnchor *currentParent = parentAnchor; while (currentParent) { if (QCPItemPosition *currentParentPos = currentParent->toQCPItemPosition()) { // is a QCPItemPosition, might have further parent, so keep iterating if (currentParentPos == this) { qDebug() << Q_FUNC_INFO << "can't create recursive parent-child-relationship" << reinterpret_cast(parentAnchor); return false; } currentParent = currentParentPos->parentAnchorX(); } else { // is a QCPItemAnchor, can't have further parent. Now make sure the parent items aren't the // same, to prevent a position being child of an anchor which itself depends on the position, // because they're both on the same item: if (currentParent->mParentItem == mParentItem) { qDebug() << Q_FUNC_INFO << "can't set parent to be an anchor which itself depends on this position" << reinterpret_cast(parentAnchor); return false; } break; } } // if previously no parent set and PosType is still ptPlotCoords, set to ptAbsolute: if (!mParentAnchorX && mPositionTypeX == ptPlotCoords) setTypeX(ptAbsolute); // save pixel position: QPointF pixelP; if (keepPixelPosition) pixelP = pixelPosition(); // unregister at current parent anchor: if (mParentAnchorX) mParentAnchorX->removeChildX(this); // register at new parent anchor: if (parentAnchor) parentAnchor->addChildX(this); mParentAnchorX = parentAnchor; // restore pixel position under new parent: if (keepPixelPosition) setPixelPosition(pixelP); else setCoords(0, coords().y()); return true; } /*! This method sets the parent anchor of the Y coordinate to \a parentAnchor. For a detailed description of what a parent anchor is, see the documentation of \ref setParentAnchor. \see setParentAnchor, setParentAnchorX */ bool QCPItemPosition::setParentAnchorY(QCPItemAnchor *parentAnchor, bool keepPixelPosition) { // make sure self is not assigned as parent: if (parentAnchor == this) { qDebug() << Q_FUNC_INFO << "can't set self as parent anchor" << reinterpret_cast(parentAnchor); return false; } // make sure no recursive parent-child-relationships are created: QCPItemAnchor *currentParent = parentAnchor; while (currentParent) { if (QCPItemPosition *currentParentPos = currentParent->toQCPItemPosition()) { // is a QCPItemPosition, might have further parent, so keep iterating if (currentParentPos == this) { qDebug() << Q_FUNC_INFO << "can't create recursive parent-child-relationship" << reinterpret_cast(parentAnchor); return false; } currentParent = currentParentPos->parentAnchorY(); } else { // is a QCPItemAnchor, can't have further parent. Now make sure the parent items aren't the // same, to prevent a position being child of an anchor which itself depends on the position, // because they're both on the same item: if (currentParent->mParentItem == mParentItem) { qDebug() << Q_FUNC_INFO << "can't set parent to be an anchor which itself depends on this position" << reinterpret_cast(parentAnchor); return false; } break; } } // if previously no parent set and PosType is still ptPlotCoords, set to ptAbsolute: if (!mParentAnchorY && mPositionTypeY == ptPlotCoords) setTypeY(ptAbsolute); // save pixel position: QPointF pixelP; if (keepPixelPosition) pixelP = pixelPosition(); // unregister at current parent anchor: if (mParentAnchorY) mParentAnchorY->removeChildY(this); // register at new parent anchor: if (parentAnchor) parentAnchor->addChildY(this); mParentAnchorY = parentAnchor; // restore pixel position under new parent: if (keepPixelPosition) setPixelPosition(pixelP); else setCoords(coords().x(), 0); return true; } /*! Sets the coordinates of this QCPItemPosition. What the coordinates mean, is defined by the type (\ref setType, \ref setTypeX, \ref setTypeY). For example, if the type is \ref ptAbsolute, \a key and \a value mean the x and y pixel position on the QCustomPlot surface. In that case the origin (0, 0) is in the top left corner of the QCustomPlot viewport. If the type is \ref ptPlotCoords, \a key and \a value mean a point in the plot coordinate system defined by the axes set by \ref setAxes. By default those are the QCustomPlot's xAxis and yAxis. See the documentation of \ref setType for other available coordinate types and their meaning. If different types were configured for X and Y (\ref setTypeX, \ref setTypeY), \a key and \a value must also be provided in the different coordinate systems. Here, the X type refers to \a key, and the Y type refers to \a value. \see setPixelPosition */ void QCPItemPosition::setCoords(double key, double value) { mKey = key; mValue = value; } /*! \overload Sets the coordinates as a QPointF \a pos where pos.x has the meaning of \a key and pos.y the meaning of \a value of the \ref setCoords(double key, double value) method. */ void QCPItemPosition::setCoords(const QPointF &pos) { setCoords(pos.x(), pos.y()); } /*! Returns the final absolute pixel position of the QCPItemPosition on the QCustomPlot surface. It includes all effects of type (\ref setType) and possible parent anchors (\ref setParentAnchor). \see setPixelPosition */ QPointF QCPItemPosition::pixelPosition() const { QPointF result; // determine X: switch (mPositionTypeX) { case ptAbsolute: { result.rx() = mKey; if (mParentAnchorX) result.rx() += mParentAnchorX->pixelPosition().x(); break; } case ptViewportRatio: { result.rx() = mKey*mParentPlot->viewport().width(); if (mParentAnchorX) result.rx() += mParentAnchorX->pixelPosition().x(); else result.rx() += mParentPlot->viewport().left(); break; } case ptAxisRectRatio: { if (mAxisRect) { result.rx() = mKey*mAxisRect.data()->width(); if (mParentAnchorX) result.rx() += mParentAnchorX->pixelPosition().x(); else result.rx() += mAxisRect.data()->left(); } else qDebug() << Q_FUNC_INFO << "Item position type x is ptAxisRectRatio, but no axis rect was defined"; break; } case ptPlotCoords: { if (mKeyAxis && mKeyAxis.data()->orientation() == Qt::Horizontal) result.rx() = mKeyAxis.data()->coordToPixel(mKey); else if (mValueAxis && mValueAxis.data()->orientation() == Qt::Horizontal) result.rx() = mValueAxis.data()->coordToPixel(mValue); else qDebug() << Q_FUNC_INFO << "Item position type x is ptPlotCoords, but no axes were defined"; break; } } // determine Y: switch (mPositionTypeY) { case ptAbsolute: { result.ry() = mValue; if (mParentAnchorY) result.ry() += mParentAnchorY->pixelPosition().y(); break; } case ptViewportRatio: { result.ry() = mValue*mParentPlot->viewport().height(); if (mParentAnchorY) result.ry() += mParentAnchorY->pixelPosition().y(); else result.ry() += mParentPlot->viewport().top(); break; } case ptAxisRectRatio: { if (mAxisRect) { result.ry() = mValue*mAxisRect.data()->height(); if (mParentAnchorY) result.ry() += mParentAnchorY->pixelPosition().y(); else result.ry() += mAxisRect.data()->top(); } else qDebug() << Q_FUNC_INFO << "Item position type y is ptAxisRectRatio, but no axis rect was defined"; break; } case ptPlotCoords: { if (mKeyAxis && mKeyAxis.data()->orientation() == Qt::Vertical) result.ry() = mKeyAxis.data()->coordToPixel(mKey); else if (mValueAxis && mValueAxis.data()->orientation() == Qt::Vertical) result.ry() = mValueAxis.data()->coordToPixel(mValue); else qDebug() << Q_FUNC_INFO << "Item position type y is ptPlotCoords, but no axes were defined"; break; } } return result; } /*! When \ref setType is \ref ptPlotCoords, this function may be used to specify the axes the coordinates set with \ref setCoords relate to. By default they are set to the initial xAxis and yAxis of the QCustomPlot. */ void QCPItemPosition::setAxes(QCPAxis *keyAxis, QCPAxis *valueAxis) { mKeyAxis = keyAxis; mValueAxis = valueAxis; } /*! When \ref setType is \ref ptAxisRectRatio, this function may be used to specify the axis rect the coordinates set with \ref setCoords relate to. By default this is set to the main axis rect of the QCustomPlot. */ void QCPItemPosition::setAxisRect(QCPAxisRect *axisRect) { mAxisRect = axisRect; } /*! Sets the apparent pixel position. This works no matter what type (\ref setType) this QCPItemPosition is or what parent-child situation it is in, as coordinates are transformed appropriately, to make the position finally appear at the specified pixel values. Only if the type is \ref ptAbsolute and no parent anchor is set, this function's effect is identical to that of \ref setCoords. \see pixelPosition, setCoords */ void QCPItemPosition::setPixelPosition(const QPointF &pixelPosition) { double x = pixelPosition.x(); double y = pixelPosition.y(); switch (mPositionTypeX) { case ptAbsolute: { if (mParentAnchorX) x -= mParentAnchorX->pixelPosition().x(); break; } case ptViewportRatio: { if (mParentAnchorX) x -= mParentAnchorX->pixelPosition().x(); else x -= mParentPlot->viewport().left(); x /= (double)mParentPlot->viewport().width(); break; } case ptAxisRectRatio: { if (mAxisRect) { if (mParentAnchorX) x -= mParentAnchorX->pixelPosition().x(); else x -= mAxisRect.data()->left(); x /= (double)mAxisRect.data()->width(); } else qDebug() << Q_FUNC_INFO << "Item position type x is ptAxisRectRatio, but no axis rect was defined"; break; } case ptPlotCoords: { if (mKeyAxis && mKeyAxis.data()->orientation() == Qt::Horizontal) x = mKeyAxis.data()->pixelToCoord(x); else if (mValueAxis && mValueAxis.data()->orientation() == Qt::Horizontal) y = mValueAxis.data()->pixelToCoord(x); else qDebug() << Q_FUNC_INFO << "Item position type x is ptPlotCoords, but no axes were defined"; break; } } switch (mPositionTypeY) { case ptAbsolute: { if (mParentAnchorY) y -= mParentAnchorY->pixelPosition().y(); break; } case ptViewportRatio: { if (mParentAnchorY) y -= mParentAnchorY->pixelPosition().y(); else y -= mParentPlot->viewport().top(); y /= (double)mParentPlot->viewport().height(); break; } case ptAxisRectRatio: { if (mAxisRect) { if (mParentAnchorY) y -= mParentAnchorY->pixelPosition().y(); else y -= mAxisRect.data()->top(); y /= (double)mAxisRect.data()->height(); } else qDebug() << Q_FUNC_INFO << "Item position type y is ptAxisRectRatio, but no axis rect was defined"; break; } case ptPlotCoords: { if (mKeyAxis && mKeyAxis.data()->orientation() == Qt::Vertical) x = mKeyAxis.data()->pixelToCoord(y); else if (mValueAxis && mValueAxis.data()->orientation() == Qt::Vertical) y = mValueAxis.data()->pixelToCoord(y); else qDebug() << Q_FUNC_INFO << "Item position type y is ptPlotCoords, but no axes were defined"; break; } } setCoords(x, y); } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAbstractItem //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAbstractItem \brief The abstract base class for all items in a plot. In QCustomPlot, items are supplemental graphical elements that are neither plottables (QCPAbstractPlottable) nor axes (QCPAxis). While plottables are always tied to two axes and thus plot coordinates, items can also be placed in absolute coordinates independent of any axes. Each specific item has at least one QCPItemPosition member which controls the positioning. Some items are defined by more than one coordinate and thus have two or more QCPItemPosition members (For example, QCPItemRect has \a topLeft and \a bottomRight). This abstract base class defines a very basic interface like visibility and clipping. Since this class is abstract, it can't be instantiated. Use one of the subclasses or create a subclass yourself to create new items. The built-in items are:
QCPItemLineA line defined by a start and an end point. May have different ending styles on each side (e.g. arrows).
QCPItemStraightLineA straight line defined by a start and a direction point. Unlike QCPItemLine, the straight line is infinitely long and has no endings.
QCPItemCurveA curve defined by start, end and two intermediate control points. May have different ending styles on each side (e.g. arrows).
QCPItemRectA rectangle
QCPItemEllipseAn ellipse
QCPItemPixmapAn arbitrary pixmap
QCPItemTextA text label
QCPItemBracketA bracket which may be used to reference/highlight certain parts in the plot.
QCPItemTracerAn item that can be attached to a QCPGraph and sticks to its data points, given a key coordinate.
\section items-clipping Clipping Items are by default clipped to the main axis rect (they are only visible inside the axis rect). To make an item visible outside that axis rect, disable clipping via \ref setClipToAxisRect "setClipToAxisRect(false)". On the other hand if you want the item to be clipped to a different axis rect, specify it via \ref setClipAxisRect. This clipAxisRect property of an item is only used for clipping behaviour, and in principle is independent of the coordinate axes the item might be tied to via its position members (\ref QCPItemPosition::setAxes). However, it is common that the axis rect for clipping also contains the axes used for the item positions. \section items-using Using items First you instantiate the item you want to use and add it to the plot: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpitemline-creation-1 by default, the positions of the item are bound to the x- and y-Axis of the plot. So we can just set the plot coordinates where the line should start/end: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpitemline-creation-2 If we don't want the line to be positioned in plot coordinates but a different coordinate system, e.g. absolute pixel positions on the QCustomPlot surface, we need to change the position type like this: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpitemline-creation-3 Then we can set the coordinates, this time in pixels: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpitemline-creation-4 and make the line visible on the entire QCustomPlot, by disabling clipping to the axis rect: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpitemline-creation-5 For more advanced plots, it is even possible to set different types and parent anchors per X/Y coordinate of an item position, using for example \ref QCPItemPosition::setTypeX or \ref QCPItemPosition::setParentAnchorX. For details, see the documentation of \ref QCPItemPosition. \section items-subclassing Creating own items To create an own item, you implement a subclass of QCPAbstractItem. These are the pure virtual functions, you must implement: \li \ref selectTest \li \ref draw See the documentation of those functions for what they need to do. \subsection items-positioning Allowing the item to be positioned As mentioned, item positions are represented by QCPItemPosition members. Let's assume the new item shall have only one point as its position (as opposed to two like a rect or multiple like a polygon). You then add a public member of type QCPItemPosition like so: \code QCPItemPosition * const myPosition;\endcode the const makes sure the pointer itself can't be modified from the user of your new item (the QCPItemPosition instance it points to, can be modified, of course). The initialization of this pointer is made easy with the \ref createPosition function. Just assign the return value of this function to each QCPItemPosition in the constructor of your item. \ref createPosition takes a string which is the name of the position, typically this is identical to the variable name. For example, the constructor of QCPItemExample could look like this: \code QCPItemExample::QCPItemExample(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), myPosition(createPosition("myPosition")) { // other constructor code } \endcode \subsection items-drawing The draw function To give your item a visual representation, reimplement the \ref draw function and use the passed QCPPainter to draw the item. You can retrieve the item position in pixel coordinates from the position member(s) via \ref QCPItemPosition::pixelPosition. To optimize performance you should calculate a bounding rect first (don't forget to take the pen width into account), check whether it intersects the \ref clipRect, and only draw the item at all if this is the case. \subsection items-selection The selectTest function Your implementation of the \ref selectTest function may use the helpers \ref QCPVector2D::distanceSquaredToLine and \ref rectDistance. With these, the implementation of the selection test becomes significantly simpler for most items. See the documentation of \ref selectTest for what the function parameters mean and what the function should return. \subsection anchors Providing anchors Providing anchors (QCPItemAnchor) starts off like adding a position. First you create a public member, e.g. \code QCPItemAnchor * const bottom;\endcode and create it in the constructor with the \ref createAnchor function, assigning it a name and an anchor id (an integer enumerating all anchors on the item, you may create an own enum for this). Since anchors can be placed anywhere, relative to the item's position(s), your item needs to provide the position of every anchor with the reimplementation of the \ref anchorPixelPosition(int anchorId) function. In essence the QCPItemAnchor is merely an intermediary that itself asks your item for the pixel position when anything attached to the anchor needs to know the coordinates. */ /* start of documentation of inline functions */ /*! \fn QList QCPAbstractItem::positions() const Returns all positions of the item in a list. \see anchors, position */ /*! \fn QList QCPAbstractItem::anchors() const Returns all anchors of the item in a list. Note that since a position (QCPItemPosition) is always also an anchor, the list will also contain the positions of this item. \see positions, anchor */ /* end of documentation of inline functions */ /* start documentation of pure virtual functions */ /*! \fn void QCPAbstractItem::draw(QCPPainter *painter) = 0 \internal Draws this item with the provided \a painter. The cliprect of the provided painter is set to the rect returned by \ref clipRect before this function is called. The clipRect depends on the clipping settings defined by \ref setClipToAxisRect and \ref setClipAxisRect. */ /* end documentation of pure virtual functions */ /* start documentation of signals */ /*! \fn void QCPAbstractItem::selectionChanged(bool selected) This signal is emitted when the selection state of this item has changed, either by user interaction or by a direct call to \ref setSelected. */ /* end documentation of signals */ /*! Base class constructor which initializes base class members. */ QCPAbstractItem::QCPAbstractItem(QCustomPlot *parentPlot) : QCPLayerable(parentPlot), mClipToAxisRect(false), mSelectable(true), mSelected(false) { parentPlot->registerItem(this); QList rects = parentPlot->axisRects(); if (rects.size() > 0) { setClipToAxisRect(true); setClipAxisRect(rects.first()); } } QCPAbstractItem::~QCPAbstractItem() { // don't delete mPositions because every position is also an anchor and thus in mAnchors qDeleteAll(mAnchors); } /* can't make this a header inline function, because QPointer breaks with forward declared types, see QTBUG-29588 */ QCPAxisRect *QCPAbstractItem::clipAxisRect() const { return mClipAxisRect.data(); } /*! Sets whether the item shall be clipped to an axis rect or whether it shall be visible on the entire QCustomPlot. The axis rect can be set with \ref setClipAxisRect. \see setClipAxisRect */ void QCPAbstractItem::setClipToAxisRect(bool clip) { mClipToAxisRect = clip; if (mClipToAxisRect) setParentLayerable(mClipAxisRect.data()); } /*! Sets the clip axis rect. It defines the rect that will be used to clip the item when \ref setClipToAxisRect is set to true. \see setClipToAxisRect */ void QCPAbstractItem::setClipAxisRect(QCPAxisRect *rect) { mClipAxisRect = rect; if (mClipToAxisRect) setParentLayerable(mClipAxisRect.data()); } /*! Sets whether the user can (de-)select this item by clicking on the QCustomPlot surface. (When \ref QCustomPlot::setInteractions contains QCustomPlot::iSelectItems.) However, even when \a selectable was set to false, it is possible to set the selection manually, by calling \ref setSelected. \see QCustomPlot::setInteractions, setSelected */ void QCPAbstractItem::setSelectable(bool selectable) { if (mSelectable != selectable) { mSelectable = selectable; emit selectableChanged(mSelectable); } } /*! Sets whether this item is selected or not. When selected, it might use a different visual appearance (e.g. pen and brush), this depends on the specific item though. The entire selection mechanism for items is handled automatically when \ref QCustomPlot::setInteractions contains QCustomPlot::iSelectItems. You only need to call this function when you wish to change the selection state manually. This function can change the selection state even when \ref setSelectable was set to false. emits the \ref selectionChanged signal when \a selected is different from the previous selection state. \see setSelectable, selectTest */ void QCPAbstractItem::setSelected(bool selected) { if (mSelected != selected) { mSelected = selected; emit selectionChanged(mSelected); } } /*! Returns the QCPItemPosition with the specified \a name. If this item doesn't have a position by that name, returns 0. This function provides an alternative way to access item positions. Normally, you access positions direcly by their member pointers (which typically have the same variable name as \a name). \see positions, anchor */ QCPItemPosition *QCPAbstractItem::position(const QString &name) const { for (int i=0; iname() == name) return mPositions.at(i); } qDebug() << Q_FUNC_INFO << "position with name not found:" << name; return 0; } /*! Returns the QCPItemAnchor with the specified \a name. If this item doesn't have an anchor by that name, returns 0. This function provides an alternative way to access item anchors. Normally, you access anchors direcly by their member pointers (which typically have the same variable name as \a name). \see anchors, position */ QCPItemAnchor *QCPAbstractItem::anchor(const QString &name) const { for (int i=0; iname() == name) return mAnchors.at(i); } qDebug() << Q_FUNC_INFO << "anchor with name not found:" << name; return 0; } /*! Returns whether this item has an anchor with the specified \a name. Note that you can check for positions with this function, too. This is because every position is also an anchor (QCPItemPosition inherits from QCPItemAnchor). \see anchor, position */ bool QCPAbstractItem::hasAnchor(const QString &name) const { for (int i=0; iname() == name) return true; } return false; } /*! \internal Returns the rect the visual representation of this item is clipped to. This depends on the current setting of \ref setClipToAxisRect as well as the axis rect set with \ref setClipAxisRect. If the item is not clipped to an axis rect, QCustomPlot's viewport rect is returned. \see draw */ QRect QCPAbstractItem::clipRect() const { if (mClipToAxisRect && mClipAxisRect) return mClipAxisRect.data()->rect(); else return mParentPlot->viewport(); } /*! \internal A convenience function to easily set the QPainter::Antialiased hint on the provided \a painter before drawing item lines. This is the antialiasing state the painter passed to the \ref draw method is in by default. This function takes into account the local setting of the antialiasing flag as well as the overrides set with \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. \see setAntialiased */ void QCPAbstractItem::applyDefaultAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiased, QCP::aeItems); } /*! \internal A convenience function which returns the selectTest value for a specified \a rect and a specified click position \a pos. \a filledRect defines whether a click inside the rect should also be considered a hit or whether only the rect border is sensitive to hits. This function may be used to help with the implementation of the \ref selectTest function for specific items. For example, if your item consists of four rects, call this function four times, once for each rect, in your \ref selectTest reimplementation. Finally, return the minimum (non -1) of all four returned values. */ double QCPAbstractItem::rectDistance(const QRectF &rect, const QPointF &pos, bool filledRect) const { double result = -1; // distance to border: QList lines; lines << QLineF(rect.topLeft(), rect.topRight()) << QLineF(rect.bottomLeft(), rect.bottomRight()) << QLineF(rect.topLeft(), rect.bottomLeft()) << QLineF(rect.topRight(), rect.bottomRight()); double minDistSqr = std::numeric_limits::max(); for (int i=0; i mParentPlot->selectionTolerance()*0.99) { if (rect.contains(pos)) result = mParentPlot->selectionTolerance()*0.99; } return result; } /*! \internal Returns the pixel position of the anchor with Id \a anchorId. This function must be reimplemented in item subclasses if they want to provide anchors (QCPItemAnchor). For example, if the item has two anchors with id 0 and 1, this function takes one of these anchor ids and returns the respective pixel points of the specified anchor. \see createAnchor */ QPointF QCPAbstractItem::anchorPixelPosition(int anchorId) const { qDebug() << Q_FUNC_INFO << "called on item which shouldn't have any anchors (this method not reimplemented). anchorId" << anchorId; return QPointF(); } /*! \internal Creates a QCPItemPosition, registers it with this item and returns a pointer to it. The specified \a name must be a unique string that is usually identical to the variable name of the position member (This is needed to provide the name-based \ref position access to positions). Don't delete positions created by this function manually, as the item will take care of it. Use this function in the constructor (initialization list) of the specific item subclass to create each position member. Don't create QCPItemPositions with \b new yourself, because they won't be registered with the item properly. \see createAnchor */ QCPItemPosition *QCPAbstractItem::createPosition(const QString &name) { if (hasAnchor(name)) qDebug() << Q_FUNC_INFO << "anchor/position with name exists already:" << name; QCPItemPosition *newPosition = new QCPItemPosition(mParentPlot, this, name); mPositions.append(newPosition); mAnchors.append(newPosition); // every position is also an anchor newPosition->setAxes(mParentPlot->xAxis, mParentPlot->yAxis); newPosition->setType(QCPItemPosition::ptPlotCoords); if (mParentPlot->axisRect()) newPosition->setAxisRect(mParentPlot->axisRect()); newPosition->setCoords(0, 0); return newPosition; } /*! \internal Creates a QCPItemAnchor, registers it with this item and returns a pointer to it. The specified \a name must be a unique string that is usually identical to the variable name of the anchor member (This is needed to provide the name based \ref anchor access to anchors). The \a anchorId must be a number identifying the created anchor. It is recommended to create an enum (e.g. "AnchorIndex") for this on each item that uses anchors. This id is used by the anchor to identify itself when it calls QCPAbstractItem::anchorPixelPosition. That function then returns the correct pixel coordinates for the passed anchor id. Don't delete anchors created by this function manually, as the item will take care of it. Use this function in the constructor (initialization list) of the specific item subclass to create each anchor member. Don't create QCPItemAnchors with \b new yourself, because then they won't be registered with the item properly. \see createPosition */ QCPItemAnchor *QCPAbstractItem::createAnchor(const QString &name, int anchorId) { if (hasAnchor(name)) qDebug() << Q_FUNC_INFO << "anchor/position with name exists already:" << name; QCPItemAnchor *newAnchor = new QCPItemAnchor(mParentPlot, this, name, anchorId); mAnchors.append(newAnchor); return newAnchor; } /* inherits documentation from base class */ void QCPAbstractItem::selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) { Q_UNUSED(event) Q_UNUSED(details) if (mSelectable) { bool selBefore = mSelected; setSelected(additive ? !mSelected : true); if (selectionStateChanged) *selectionStateChanged = mSelected != selBefore; } } /* inherits documentation from base class */ void QCPAbstractItem::deselectEvent(bool *selectionStateChanged) { if (mSelectable) { bool selBefore = mSelected; setSelected(false); if (selectionStateChanged) *selectionStateChanged = mSelected != selBefore; } } /* inherits documentation from base class */ QCP::Interaction QCPAbstractItem::selectionCategory() const { return QCP::iSelectItems; } /* end of 'src/item.cpp' */ /* including file 'src/core.cpp', size 125037 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCustomPlot //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCustomPlot \brief The central class of the library. This is the QWidget which displays the plot and interacts with the user. For tutorials on how to use QCustomPlot, see the website\n http://www.qcustomplot.com/ */ /* start of documentation of inline functions */ /*! \fn QCPSelectionRect *QCustomPlot::selectionRect() const Allows access to the currently used QCPSelectionRect instance (or subclass thereof), that is used to handle and draw selection rect interactions (see \ref setSelectionRectMode). \see setSelectionRect */ /*! \fn QCPLayoutGrid *QCustomPlot::plotLayout() const Returns the top level layout of this QCustomPlot instance. It is a \ref QCPLayoutGrid, initially containing just one cell with the main QCPAxisRect inside. */ /* end of documentation of inline functions */ /* start of documentation of signals */ /*! \fn void QCustomPlot::mouseDoubleClick(QMouseEvent *event) This signal is emitted when the QCustomPlot receives a mouse double click event. */ /*! \fn void QCustomPlot::mousePress(QMouseEvent *event) This signal is emitted when the QCustomPlot receives a mouse press event. It is emitted before QCustomPlot handles any other mechanism like range dragging. So a slot connected to this signal can still influence the behaviour e.g. with \ref QCPAxisRect::setRangeDrag or \ref QCPAxisRect::setRangeDragAxes. */ /*! \fn void QCustomPlot::mouseMove(QMouseEvent *event) This signal is emitted when the QCustomPlot receives a mouse move event. It is emitted before QCustomPlot handles any other mechanism like range dragging. So a slot connected to this signal can still influence the behaviour e.g. with \ref QCPAxisRect::setRangeDrag or \ref QCPAxisRect::setRangeDragAxes. \warning It is discouraged to change the drag-axes with \ref QCPAxisRect::setRangeDragAxes here, because the dragging starting point was saved the moment the mouse was pressed. Thus it only has a meaning for the range drag axes that were set at that moment. If you want to change the drag axes, consider doing this in the \ref mousePress signal instead. */ /*! \fn void QCustomPlot::mouseRelease(QMouseEvent *event) This signal is emitted when the QCustomPlot receives a mouse release event. It is emitted before QCustomPlot handles any other mechanisms like object selection. So a slot connected to this signal can still influence the behaviour e.g. with \ref setInteractions or \ref QCPAbstractPlottable::setSelectable. */ /*! \fn void QCustomPlot::mouseWheel(QMouseEvent *event) This signal is emitted when the QCustomPlot receives a mouse wheel event. It is emitted before QCustomPlot handles any other mechanisms like range zooming. So a slot connected to this signal can still influence the behaviour e.g. with \ref QCPAxisRect::setRangeZoom, \ref QCPAxisRect::setRangeZoomAxes or \ref QCPAxisRect::setRangeZoomFactor. */ /*! \fn void QCustomPlot::plottableClick(QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event) This signal is emitted when a plottable is clicked. \a event is the mouse event that caused the click and \a plottable is the plottable that received the click. The parameter \a dataIndex indicates the data point that was closest to the click position. \see plottableDoubleClick */ /*! \fn void QCustomPlot::plottableDoubleClick(QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event) This signal is emitted when a plottable is double clicked. \a event is the mouse event that caused the click and \a plottable is the plottable that received the click. The parameter \a dataIndex indicates the data point that was closest to the click position. \see plottableClick */ /*! \fn void QCustomPlot::itemClick(QCPAbstractItem *item, QMouseEvent *event) This signal is emitted when an item is clicked. \a event is the mouse event that caused the click and \a item is the item that received the click. \see itemDoubleClick */ /*! \fn void QCustomPlot::itemDoubleClick(QCPAbstractItem *item, QMouseEvent *event) This signal is emitted when an item is double clicked. \a event is the mouse event that caused the click and \a item is the item that received the click. \see itemClick */ /*! \fn void QCustomPlot::axisClick(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event) This signal is emitted when an axis is clicked. \a event is the mouse event that caused the click, \a axis is the axis that received the click and \a part indicates the part of the axis that was clicked. \see axisDoubleClick */ /*! \fn void QCustomPlot::axisDoubleClick(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event) This signal is emitted when an axis is double clicked. \a event is the mouse event that caused the click, \a axis is the axis that received the click and \a part indicates the part of the axis that was clicked. \see axisClick */ /*! \fn void QCustomPlot::legendClick(QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event) This signal is emitted when a legend (item) is clicked. \a event is the mouse event that caused the click, \a legend is the legend that received the click and \a item is the legend item that received the click. If only the legend and no item is clicked, \a item is 0. This happens for a click inside the legend padding or the space between two items. \see legendDoubleClick */ /*! \fn void QCustomPlot::legendDoubleClick(QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event) This signal is emitted when a legend (item) is double clicked. \a event is the mouse event that caused the click, \a legend is the legend that received the click and \a item is the legend item that received the click. If only the legend and no item is clicked, \a item is 0. This happens for a click inside the legend padding or the space between two items. \see legendClick */ /*! \fn void QCustomPlot::selectionChangedByUser() This signal is emitted after the user has changed the selection in the QCustomPlot, e.g. by clicking. It is not emitted when the selection state of an object has changed programmatically by a direct call to setSelected()/setSelection() on an object or by calling \ref deselectAll. In addition to this signal, selectable objects also provide individual signals, for example \ref QCPAxis::selectionChanged or \ref QCPAbstractPlottable::selectionChanged. Note that those signals are emitted even if the selection state is changed programmatically. See the documentation of \ref setInteractions for details about the selection mechanism. \see selectedPlottables, selectedGraphs, selectedItems, selectedAxes, selectedLegends */ /*! \fn void QCustomPlot::beforeReplot() This signal is emitted immediately before a replot takes place (caused by a call to the slot \ref replot). It is safe to mutually connect the replot slot with this signal on two QCustomPlots to make them replot synchronously, it won't cause an infinite recursion. \see replot, afterReplot */ /*! \fn void QCustomPlot::afterReplot() This signal is emitted immediately after a replot has taken place (caused by a call to the slot \ref replot). It is safe to mutually connect the replot slot with this signal on two QCustomPlots to make them replot synchronously, it won't cause an infinite recursion. \see replot, beforeReplot */ /* end of documentation of signals */ /* start of documentation of public members */ /*! \var QCPAxis *QCustomPlot::xAxis A pointer to the primary x Axis (bottom) of the main axis rect of the plot. QCustomPlot offers convenient pointers to the axes (\ref xAxis, \ref yAxis, \ref xAxis2, \ref yAxis2) and the \ref legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use \link thelayoutsystem the layout system\endlink to add multiple axis rects or multiple axes to one side, use the \ref QCPAxisRect::axis interface to access the new axes. If one of the four default axes or the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointers become 0. If an axis convenience pointer is currently zero and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the \ref legend convenience pointer will be reset if a legend is added after the main legend was removed before. */ /*! \var QCPAxis *QCustomPlot::yAxis A pointer to the primary y Axis (left) of the main axis rect of the plot. QCustomPlot offers convenient pointers to the axes (\ref xAxis, \ref yAxis, \ref xAxis2, \ref yAxis2) and the \ref legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use \link thelayoutsystem the layout system\endlink to add multiple axis rects or multiple axes to one side, use the \ref QCPAxisRect::axis interface to access the new axes. If one of the four default axes or the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointers become 0. If an axis convenience pointer is currently zero and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the \ref legend convenience pointer will be reset if a legend is added after the main legend was removed before. */ /*! \var QCPAxis *QCustomPlot::xAxis2 A pointer to the secondary x Axis (top) of the main axis rect of the plot. Secondary axes are invisible by default. Use QCPAxis::setVisible to change this (or use \ref QCPAxisRect::setupFullAxesBox). QCustomPlot offers convenient pointers to the axes (\ref xAxis, \ref yAxis, \ref xAxis2, \ref yAxis2) and the \ref legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use \link thelayoutsystem the layout system\endlink to add multiple axis rects or multiple axes to one side, use the \ref QCPAxisRect::axis interface to access the new axes. If one of the four default axes or the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointers become 0. If an axis convenience pointer is currently zero and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the \ref legend convenience pointer will be reset if a legend is added after the main legend was removed before. */ /*! \var QCPAxis *QCustomPlot::yAxis2 A pointer to the secondary y Axis (right) of the main axis rect of the plot. Secondary axes are invisible by default. Use QCPAxis::setVisible to change this (or use \ref QCPAxisRect::setupFullAxesBox). QCustomPlot offers convenient pointers to the axes (\ref xAxis, \ref yAxis, \ref xAxis2, \ref yAxis2) and the \ref legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use \link thelayoutsystem the layout system\endlink to add multiple axis rects or multiple axes to one side, use the \ref QCPAxisRect::axis interface to access the new axes. If one of the four default axes or the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointers become 0. If an axis convenience pointer is currently zero and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the \ref legend convenience pointer will be reset if a legend is added after the main legend was removed before. */ /*! \var QCPLegend *QCustomPlot::legend A pointer to the default legend of the main axis rect. The legend is invisible by default. Use QCPLegend::setVisible to change this. QCustomPlot offers convenient pointers to the axes (\ref xAxis, \ref yAxis, \ref xAxis2, \ref yAxis2) and the \ref legend. They make it very easy working with plots that only have a single axis rect and at most one axis at each axis rect side. If you use \link thelayoutsystem the layout system\endlink to add multiple legends to the plot, use the layout system interface to access the new legend. For example, legends can be placed inside an axis rect's \ref QCPAxisRect::insetLayout "inset layout", and must then also be accessed via the inset layout. If the default legend is removed due to manipulation of the layout system (e.g. by removing the main axis rect), the corresponding pointer becomes 0. If an axis convenience pointer is currently zero and a new axis rect or a corresponding axis is added in the place of the main axis rect, QCustomPlot resets the convenience pointers to the according new axes. Similarly the \ref legend convenience pointer will be reset if a legend is added after the main legend was removed before. */ /* end of documentation of public members */ /*! Constructs a QCustomPlot and sets reasonable default values. */ QCustomPlot::QCustomPlot(QWidget *parent) : QWidget(parent), xAxis(0), yAxis(0), xAxis2(0), yAxis2(0), legend(0), mBufferDevicePixelRatio(1.0), // will be adapted to primary screen below mPlotLayout(0), mAutoAddPlottableToLegend(true), mAntialiasedElements(QCP::aeNone), mNotAntialiasedElements(QCP::aeNone), mInteractions(0), mSelectionTolerance(8), mNoAntialiasingOnDrag(false), mBackgroundBrush(Qt::white, Qt::SolidPattern), mBackgroundScaled(true), mBackgroundScaledMode(Qt::KeepAspectRatioByExpanding), mCurrentLayer(0), mPlottingHints(QCP::phCacheLabels|QCP::phImmediateRefresh), mMultiSelectModifier(Qt::ControlModifier), mSelectionRectMode(QCP::srmNone), mSelectionRect(0), mOpenGl(false), mMouseHasMoved(false), mMouseEventLayerable(0), mMouseSignalLayerable(0), mReplotting(false), mReplotQueued(false), mOpenGlMultisamples(16), mOpenGlAntialiasedElementsBackup(QCP::aeNone), mOpenGlCacheLabelsBackup(true) { setAttribute(Qt::WA_NoMousePropagation); setAttribute(Qt::WA_OpaquePaintEvent); setFocusPolicy(Qt::ClickFocus); setMouseTracking(true); QLocale currentLocale = locale(); currentLocale.setNumberOptions(QLocale::OmitGroupSeparator); setLocale(currentLocale); #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED # ifdef QCP_DEVICEPIXELRATIO_FLOAT setBufferDevicePixelRatio(QWidget::devicePixelRatioF()); # else setBufferDevicePixelRatio(QWidget::devicePixelRatio()); # endif #endif mOpenGlAntialiasedElementsBackup = mAntialiasedElements; mOpenGlCacheLabelsBackup = mPlottingHints.testFlag(QCP::phCacheLabels); // create initial layers: mLayers.append(new QCPLayer(this, QLatin1String("background"))); mLayers.append(new QCPLayer(this, QLatin1String("grid"))); mLayers.append(new QCPLayer(this, QLatin1String("main"))); mLayers.append(new QCPLayer(this, QLatin1String("axes"))); mLayers.append(new QCPLayer(this, QLatin1String("legend"))); mLayers.append(new QCPLayer(this, QLatin1String("overlay"))); updateLayerIndices(); setCurrentLayer(QLatin1String("main")); layer(QLatin1String("overlay"))->setMode(QCPLayer::lmBuffered); // create initial layout, axis rect and legend: mPlotLayout = new QCPLayoutGrid; mPlotLayout->initializeParentPlot(this); mPlotLayout->setParent(this); // important because if parent is QWidget, QCPLayout::sizeConstraintsChanged will call QWidget::updateGeometry mPlotLayout->setLayer(QLatin1String("main")); QCPAxisRect *defaultAxisRect = new QCPAxisRect(this, true); mPlotLayout->addElement(0, 0, defaultAxisRect); xAxis = defaultAxisRect->axis(QCPAxis::atBottom); yAxis = defaultAxisRect->axis(QCPAxis::atLeft); xAxis2 = defaultAxisRect->axis(QCPAxis::atTop); yAxis2 = defaultAxisRect->axis(QCPAxis::atRight); legend = new QCPLegend; legend->setVisible(false); defaultAxisRect->insetLayout()->addElement(legend, Qt::AlignRight|Qt::AlignTop); defaultAxisRect->insetLayout()->setMargins(QMargins(12, 12, 12, 12)); defaultAxisRect->setLayer(QLatin1String("background")); xAxis->setLayer(QLatin1String("axes")); yAxis->setLayer(QLatin1String("axes")); xAxis2->setLayer(QLatin1String("axes")); yAxis2->setLayer(QLatin1String("axes")); xAxis->grid()->setLayer(QLatin1String("grid")); yAxis->grid()->setLayer(QLatin1String("grid")); xAxis2->grid()->setLayer(QLatin1String("grid")); yAxis2->grid()->setLayer(QLatin1String("grid")); legend->setLayer(QLatin1String("legend")); // create selection rect instance: mSelectionRect = new QCPSelectionRect(this); mSelectionRect->setLayer(QLatin1String("overlay")); setViewport(rect()); // needs to be called after mPlotLayout has been created replot(rpQueuedReplot); } QCustomPlot::~QCustomPlot() { clearPlottables(); clearItems(); if (mPlotLayout) { delete mPlotLayout; mPlotLayout = 0; } mCurrentLayer = 0; qDeleteAll(mLayers); // don't use removeLayer, because it would prevent the last layer to be removed mLayers.clear(); } /*! Sets which elements are forcibly drawn antialiased as an \a or combination of QCP::AntialiasedElement. This overrides the antialiasing settings for whole element groups, normally controlled with the \a setAntialiasing function on the individual elements. If an element is neither specified in \ref setAntialiasedElements nor in \ref setNotAntialiasedElements, the antialiasing setting on each individual element instance is used. For example, if \a antialiasedElements contains \ref QCP::aePlottables, all plottables will be drawn antialiased, no matter what the specific QCPAbstractPlottable::setAntialiased value was set to. if an element in \a antialiasedElements is already set in \ref setNotAntialiasedElements, it is removed from there. \see setNotAntialiasedElements */ void QCustomPlot::setAntialiasedElements(const QCP::AntialiasedElements &antialiasedElements) { mAntialiasedElements = antialiasedElements; // make sure elements aren't in mNotAntialiasedElements and mAntialiasedElements simultaneously: if ((mNotAntialiasedElements & mAntialiasedElements) != 0) mNotAntialiasedElements |= ~mAntialiasedElements; } /*! Sets whether the specified \a antialiasedElement is forcibly drawn antialiased. See \ref setAntialiasedElements for details. \see setNotAntialiasedElement */ void QCustomPlot::setAntialiasedElement(QCP::AntialiasedElement antialiasedElement, bool enabled) { if (!enabled && mAntialiasedElements.testFlag(antialiasedElement)) mAntialiasedElements &= ~antialiasedElement; else if (enabled && !mAntialiasedElements.testFlag(antialiasedElement)) mAntialiasedElements |= antialiasedElement; // make sure elements aren't in mNotAntialiasedElements and mAntialiasedElements simultaneously: if ((mNotAntialiasedElements & mAntialiasedElements) != 0) mNotAntialiasedElements |= ~mAntialiasedElements; } /*! Sets which elements are forcibly drawn not antialiased as an \a or combination of QCP::AntialiasedElement. This overrides the antialiasing settings for whole element groups, normally controlled with the \a setAntialiasing function on the individual elements. If an element is neither specified in \ref setAntialiasedElements nor in \ref setNotAntialiasedElements, the antialiasing setting on each individual element instance is used. For example, if \a notAntialiasedElements contains \ref QCP::aePlottables, no plottables will be drawn antialiased, no matter what the specific QCPAbstractPlottable::setAntialiased value was set to. if an element in \a notAntialiasedElements is already set in \ref setAntialiasedElements, it is removed from there. \see setAntialiasedElements */ void QCustomPlot::setNotAntialiasedElements(const QCP::AntialiasedElements ¬AntialiasedElements) { mNotAntialiasedElements = notAntialiasedElements; // make sure elements aren't in mNotAntialiasedElements and mAntialiasedElements simultaneously: if ((mNotAntialiasedElements & mAntialiasedElements) != 0) mAntialiasedElements |= ~mNotAntialiasedElements; } /*! Sets whether the specified \a notAntialiasedElement is forcibly drawn not antialiased. See \ref setNotAntialiasedElements for details. \see setAntialiasedElement */ void QCustomPlot::setNotAntialiasedElement(QCP::AntialiasedElement notAntialiasedElement, bool enabled) { if (!enabled && mNotAntialiasedElements.testFlag(notAntialiasedElement)) mNotAntialiasedElements &= ~notAntialiasedElement; else if (enabled && !mNotAntialiasedElements.testFlag(notAntialiasedElement)) mNotAntialiasedElements |= notAntialiasedElement; // make sure elements aren't in mNotAntialiasedElements and mAntialiasedElements simultaneously: if ((mNotAntialiasedElements & mAntialiasedElements) != 0) mAntialiasedElements |= ~mNotAntialiasedElements; } /*! If set to true, adding a plottable (e.g. a graph) to the QCustomPlot automatically also adds the plottable to the legend (QCustomPlot::legend). \see addGraph, QCPLegend::addItem */ void QCustomPlot::setAutoAddPlottableToLegend(bool on) { mAutoAddPlottableToLegend = on; } /*! Sets the possible interactions of this QCustomPlot as an or-combination of \ref QCP::Interaction enums. There are the following types of interactions: Axis range manipulation is controlled via \ref QCP::iRangeDrag and \ref QCP::iRangeZoom. When the respective interaction is enabled, the user may drag axes ranges and zoom with the mouse wheel. For details how to control which axes the user may drag/zoom and in what orientations, see \ref QCPAxisRect::setRangeDrag, \ref QCPAxisRect::setRangeZoom, \ref QCPAxisRect::setRangeDragAxes, \ref QCPAxisRect::setRangeZoomAxes. Plottable data selection is controlled by \ref QCP::iSelectPlottables. If \ref QCP::iSelectPlottables is set, the user may select plottables (graphs, curves, bars,...) and their data by clicking on them or in their vicinity (\ref setSelectionTolerance). Whether the user can actually select a plottable and its data can further be restricted with the \ref QCPAbstractPlottable::setSelectable method on the specific plottable. For details, see the special page about the \ref dataselection "data selection mechanism". To retrieve a list of all currently selected plottables, call \ref selectedPlottables. If you're only interested in QCPGraphs, you may use the convenience function \ref selectedGraphs. Item selection is controlled by \ref QCP::iSelectItems. If \ref QCP::iSelectItems is set, the user may select items (QCPItemLine, QCPItemText,...) by clicking on them or in their vicinity. To find out whether a specific item is selected, call QCPAbstractItem::selected(). To retrieve a list of all currently selected items, call \ref selectedItems. Axis selection is controlled with \ref QCP::iSelectAxes. If \ref QCP::iSelectAxes is set, the user may select parts of the axes by clicking on them. What parts exactly (e.g. Axis base line, tick labels, axis label) are selectable can be controlled via \ref QCPAxis::setSelectableParts for each axis. To retrieve a list of all axes that currently contain selected parts, call \ref selectedAxes. Which parts of an axis are selected, can be retrieved with QCPAxis::selectedParts(). Legend selection is controlled with \ref QCP::iSelectLegend. If this is set, the user may select the legend itself or individual items by clicking on them. What parts exactly are selectable can be controlled via \ref QCPLegend::setSelectableParts. To find out whether the legend or any of its child items are selected, check the value of QCPLegend::selectedParts. To find out which child items are selected, call \ref QCPLegend::selectedItems. All other selectable elements The selection of all other selectable objects (e.g. QCPTextElement, or your own layerable subclasses) is controlled with \ref QCP::iSelectOther. If set, the user may select those objects by clicking on them. To find out which are currently selected, you need to check their selected state explicitly. If the selection state has changed by user interaction, the \ref selectionChangedByUser signal is emitted. Each selectable object additionally emits an individual selectionChanged signal whenever their selection state has changed, i.e. not only by user interaction. To allow multiple objects to be selected by holding the selection modifier (\ref setMultiSelectModifier), set the flag \ref QCP::iMultiSelect. \note In addition to the selection mechanism presented here, QCustomPlot always emits corresponding signals, when an object is clicked or double clicked. see \ref plottableClick and \ref plottableDoubleClick for example. \see setInteraction, setSelectionTolerance */ void QCustomPlot::setInteractions(const QCP::Interactions &interactions) { mInteractions = interactions; } /*! Sets the single \a interaction of this QCustomPlot to \a enabled. For details about the interaction system, see \ref setInteractions. \see setInteractions */ void QCustomPlot::setInteraction(const QCP::Interaction &interaction, bool enabled) { if (!enabled && mInteractions.testFlag(interaction)) mInteractions &= ~interaction; else if (enabled && !mInteractions.testFlag(interaction)) mInteractions |= interaction; } /*! Sets the tolerance that is used to decide whether a click selects an object (e.g. a plottable) or not. If the user clicks in the vicinity of the line of e.g. a QCPGraph, it's only regarded as a potential selection when the minimum distance between the click position and the graph line is smaller than \a pixels. Objects that are defined by an area (e.g. QCPBars) only react to clicks directly inside the area and ignore this selection tolerance. In other words, it only has meaning for parts of objects that are too thin to exactly hit with a click and thus need such a tolerance. \see setInteractions, QCPLayerable::selectTest */ void QCustomPlot::setSelectionTolerance(int pixels) { mSelectionTolerance = pixels; } /*! Sets whether antialiasing is disabled for this QCustomPlot while the user is dragging axes ranges. If many objects, especially plottables, are drawn antialiased, this greatly improves performance during dragging. Thus it creates a more responsive user experience. As soon as the user stops dragging, the last replot is done with normal antialiasing, to restore high image quality. \see setAntialiasedElements, setNotAntialiasedElements */ void QCustomPlot::setNoAntialiasingOnDrag(bool enabled) { mNoAntialiasingOnDrag = enabled; } /*! Sets the plotting hints for this QCustomPlot instance as an \a or combination of QCP::PlottingHint. \see setPlottingHint */ void QCustomPlot::setPlottingHints(const QCP::PlottingHints &hints) { mPlottingHints = hints; } /*! Sets the specified plotting \a hint to \a enabled. \see setPlottingHints */ void QCustomPlot::setPlottingHint(QCP::PlottingHint hint, bool enabled) { QCP::PlottingHints newHints = mPlottingHints; if (!enabled) newHints &= ~hint; else newHints |= hint; if (newHints != mPlottingHints) setPlottingHints(newHints); } /*! Sets the keyboard modifier that will be recognized as multi-select-modifier. If \ref QCP::iMultiSelect is specified in \ref setInteractions, the user may select multiple objects (or data points) by clicking on them one after the other while holding down \a modifier. By default the multi-select-modifier is set to Qt::ControlModifier. \see setInteractions */ void QCustomPlot::setMultiSelectModifier(Qt::KeyboardModifier modifier) { mMultiSelectModifier = modifier; } /*! Sets how QCustomPlot processes mouse click-and-drag interactions by the user. If \a mode is \ref QCP::srmNone, the mouse drag is forwarded to the underlying objects. For example, QCPAxisRect may process a mouse drag by dragging axis ranges, see \ref QCPAxisRect::setRangeDrag. If \a mode is not \ref QCP::srmNone, the current selection rect (\ref selectionRect) becomes activated and allows e.g. rect zooming and data point selection. If you wish to provide your user both with axis range dragging and data selection/range zooming, use this method to switch between the modes just before the interaction is processed, e.g. in reaction to the \ref mousePress or \ref mouseMove signals. For example you could check whether the user is holding a certain keyboard modifier, and then decide which \a mode shall be set. If a selection rect interaction is currently active, and \a mode is set to \ref QCP::srmNone, the interaction is canceled (\ref QCPSelectionRect::cancel). Switching between any of the other modes will keep the selection rect active. Upon completion of the interaction, the behaviour is as defined by the currently set \a mode, not the mode that was set when the interaction started. \see setInteractions, setSelectionRect, QCPSelectionRect */ void QCustomPlot::setSelectionRectMode(QCP::SelectionRectMode mode) { if (mSelectionRect) { if (mode == QCP::srmNone) mSelectionRect->cancel(); // when switching to none, we immediately want to abort a potentially active selection rect // disconnect old connections: if (mSelectionRectMode == QCP::srmSelect) disconnect(mSelectionRect, SIGNAL(accepted(QRect,QMouseEvent*)), this, SLOT(processRectSelection(QRect,QMouseEvent*))); else if (mSelectionRectMode == QCP::srmZoom) disconnect(mSelectionRect, SIGNAL(accepted(QRect,QMouseEvent*)), this, SLOT(processRectZoom(QRect,QMouseEvent*))); // establish new ones: if (mode == QCP::srmSelect) connect(mSelectionRect, SIGNAL(accepted(QRect,QMouseEvent*)), this, SLOT(processRectSelection(QRect,QMouseEvent*))); else if (mode == QCP::srmZoom) connect(mSelectionRect, SIGNAL(accepted(QRect,QMouseEvent*)), this, SLOT(processRectZoom(QRect,QMouseEvent*))); } mSelectionRectMode = mode; } /*! Sets the \ref QCPSelectionRect instance that QCustomPlot will use if \a mode is not \ref QCP::srmNone and the user performs a click-and-drag interaction. QCustomPlot takes ownership of the passed \a selectionRect. It can be accessed later via \ref selectionRect. This method is useful if you wish to replace the default QCPSelectionRect instance with an instance of a QCPSelectionRect subclass, to introduce custom behaviour of the selection rect. \see setSelectionRectMode */ void QCustomPlot::setSelectionRect(QCPSelectionRect *selectionRect) { if (mSelectionRect) delete mSelectionRect; mSelectionRect = selectionRect; if (mSelectionRect) { // establish connections with new selection rect: if (mSelectionRectMode == QCP::srmSelect) connect(mSelectionRect, SIGNAL(accepted(QRect,QMouseEvent*)), this, SLOT(processRectSelection(QRect,QMouseEvent*))); else if (mSelectionRectMode == QCP::srmZoom) connect(mSelectionRect, SIGNAL(accepted(QRect,QMouseEvent*)), this, SLOT(processRectZoom(QRect,QMouseEvent*))); } } /*! \warning This is still an experimental feature and its performance depends on the system that it runs on. Having multiple QCustomPlot widgets in one application with enabled OpenGL rendering might cause context conflicts on some systems. This method allows to enable OpenGL plot rendering, for increased plotting performance of graphically demanding plots (thick lines, translucent fills, etc.). If \a enabled is set to true, QCustomPlot will try to initialize OpenGL and, if successful, continue plotting with hardware acceleration. The parameter \a multisampling controls how many samples will be used per pixel, it essentially controls the antialiasing quality. If \a multisampling is set too high for the current graphics hardware, the maximum allowed value will be used. You can test whether switching to OpenGL rendering was successful by checking whether the according getter \a QCustomPlot::openGl() returns true. If the OpenGL initialization fails, rendering continues with the regular software rasterizer, and an according qDebug output is generated. If switching to OpenGL was successful, this method disables label caching (\ref setPlottingHint "setPlottingHint(QCP::phCacheLabels, false)") and turns on QCustomPlot's antialiasing override for all elements (\ref setAntialiasedElements "setAntialiasedElements(QCP::aeAll)"), leading to a higher quality output. The antialiasing override allows for pixel-grid aligned drawing in the OpenGL paint device. As stated before, in OpenGL rendering the actual antialiasing of the plot is controlled with \a multisampling. If \a enabled is set to false, the antialiasing/label caching settings are restored to what they were before OpenGL was enabled, if they weren't altered in the meantime. \note OpenGL support is only enabled if QCustomPlot is compiled with the macro \c QCUSTOMPLOT_USE_OPENGL defined. This define must be set before including the QCustomPlot header both during compilation of the QCustomPlot library as well as when compiling your application. It is best to just include the line DEFINES += QCUSTOMPLOT_USE_OPENGL in the respective qmake project files. \note If you are using a Qt version before 5.0, you must also add the module "opengl" to your \c QT variable in the qmake project files. For Qt versions 5.0 and higher, QCustomPlot switches to a newer OpenGL interface which is already in the "gui" module. */ void QCustomPlot::setOpenGl(bool enabled, int multisampling) { mOpenGlMultisamples = qMax(0, multisampling); #ifdef QCUSTOMPLOT_USE_OPENGL mOpenGl = enabled; if (mOpenGl) { if (setupOpenGl()) { // backup antialiasing override and labelcaching setting so we can restore upon disabling OpenGL mOpenGlAntialiasedElementsBackup = mAntialiasedElements; mOpenGlCacheLabelsBackup = mPlottingHints.testFlag(QCP::phCacheLabels); // set antialiasing override to antialias all (aligns gl pixel grid properly), and disable label caching (would use software rasterizer for pixmap caches): setAntialiasedElements(QCP::aeAll); setPlottingHint(QCP::phCacheLabels, false); } else { qDebug() << Q_FUNC_INFO << "Failed to enable OpenGL, continuing plotting without hardware acceleration."; mOpenGl = false; } } else { // restore antialiasing override and labelcaching to what it was before enabling OpenGL, if nobody changed it in the meantime: if (mAntialiasedElements == QCP::aeAll) setAntialiasedElements(mOpenGlAntialiasedElementsBackup); if (!mPlottingHints.testFlag(QCP::phCacheLabels)) setPlottingHint(QCP::phCacheLabels, mOpenGlCacheLabelsBackup); freeOpenGl(); } // recreate all paint buffers: mPaintBuffers.clear(); setupPaintBuffers(); #else Q_UNUSED(enabled) qDebug() << Q_FUNC_INFO << "QCustomPlot can't use OpenGL because QCUSTOMPLOT_USE_OPENGL was not defined during compilation (add 'DEFINES += QCUSTOMPLOT_USE_OPENGL' to your qmake .pro file)"; #endif } /*! Sets the viewport of this QCustomPlot. Usually users of QCustomPlot don't need to change the viewport manually. The viewport is the area in which the plot is drawn. All mechanisms, e.g. margin caluclation take the viewport to be the outer border of the plot. The viewport normally is the rect() of the QCustomPlot widget, i.e. a rect with top left (0, 0) and size of the QCustomPlot widget. Don't confuse the viewport with the axis rect (QCustomPlot::axisRect). An axis rect is typically an area enclosed by four axes, where the graphs/plottables are drawn in. The viewport is larger and contains also the axes themselves, their tick numbers, their labels, or even additional axis rects, color scales and other layout elements. This function is used to allow arbitrary size exports with \ref toPixmap, \ref savePng, \ref savePdf, etc. by temporarily changing the viewport size. */ void QCustomPlot::setViewport(const QRect &rect) { mViewport = rect; if (mPlotLayout) mPlotLayout->setOuterRect(mViewport); } /*! Sets the device pixel ratio used by the paint buffers of this QCustomPlot instance. Normally, this doesn't need to be set manually, because it is initialized with the regular \a QWidget::devicePixelRatio which is configured by Qt to fit the display device (e.g. 1 for normal displays, 2 for High-DPI displays). Device pixel ratios are supported by Qt only for Qt versions since 5.4. If this method is called when QCustomPlot is being used with older Qt versions, outputs an according qDebug message and leaves the internal buffer device pixel ratio at 1.0. */ void QCustomPlot::setBufferDevicePixelRatio(double ratio) { if (!qFuzzyCompare(ratio, mBufferDevicePixelRatio)) { #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED mBufferDevicePixelRatio = ratio; for (int i=0; isetDevicePixelRatio(mBufferDevicePixelRatio); // Note: axis label cache has devicePixelRatio as part of cache hash, so no need to manually clear cache here #else qDebug() << Q_FUNC_INFO << "Device pixel ratios not supported for Qt versions before 5.4"; mBufferDevicePixelRatio = 1.0; #endif } } /*! Sets \a pm as the viewport background pixmap (see \ref setViewport). The pixmap is always drawn below all other objects in the plot. For cases where the provided pixmap doesn't have the same size as the viewport, scaling can be enabled with \ref setBackgroundScaled and the scaling mode (whether and how the aspect ratio is preserved) can be set with \ref setBackgroundScaledMode. To set all these options in one call, consider using the overloaded version of this function. If a background brush was set with \ref setBackground(const QBrush &brush), the viewport will first be filled with that brush, before drawing the background pixmap. This can be useful for background pixmaps with translucent areas. \see setBackgroundScaled, setBackgroundScaledMode */ void QCustomPlot::setBackground(const QPixmap &pm) { mBackgroundPixmap = pm; mScaledBackgroundPixmap = QPixmap(); } /*! Sets the background brush of the viewport (see \ref setViewport). Before drawing everything else, the background is filled with \a brush. If a background pixmap was set with \ref setBackground(const QPixmap &pm), this brush will be used to fill the viewport before the background pixmap is drawn. This can be useful for background pixmaps with translucent areas. Set \a brush to Qt::NoBrush or Qt::Transparent to leave background transparent. This can be useful for exporting to image formats which support transparency, e.g. \ref savePng. \see setBackgroundScaled, setBackgroundScaledMode */ void QCustomPlot::setBackground(const QBrush &brush) { mBackgroundBrush = brush; } /*! \overload Allows setting the background pixmap of the viewport, whether it shall be scaled and how it shall be scaled in one call. \see setBackground(const QPixmap &pm), setBackgroundScaled, setBackgroundScaledMode */ void QCustomPlot::setBackground(const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode) { mBackgroundPixmap = pm; mScaledBackgroundPixmap = QPixmap(); mBackgroundScaled = scaled; mBackgroundScaledMode = mode; } /*! Sets whether the viewport background pixmap shall be scaled to fit the viewport. If \a scaled is set to true, control whether and how the aspect ratio of the original pixmap is preserved with \ref setBackgroundScaledMode. Note that the scaled version of the original pixmap is buffered, so there is no performance penalty on replots. (Except when the viewport dimensions are changed continuously.) \see setBackground, setBackgroundScaledMode */ void QCustomPlot::setBackgroundScaled(bool scaled) { mBackgroundScaled = scaled; } /*! If scaling of the viewport background pixmap is enabled (\ref setBackgroundScaled), use this function to define whether and how the aspect ratio of the original pixmap is preserved. \see setBackground, setBackgroundScaled */ void QCustomPlot::setBackgroundScaledMode(Qt::AspectRatioMode mode) { mBackgroundScaledMode = mode; } /*! Returns the plottable with \a index. If the index is invalid, returns 0. There is an overloaded version of this function with no parameter which returns the last added plottable, see QCustomPlot::plottable() \see plottableCount */ QCPAbstractPlottable *QCustomPlot::plottable(int index) { if (index >= 0 && index < mPlottables.size()) { return mPlottables.at(index); } else { qDebug() << Q_FUNC_INFO << "index out of bounds:" << index; return 0; } } /*! \overload Returns the last plottable that was added to the plot. If there are no plottables in the plot, returns 0. \see plottableCount */ QCPAbstractPlottable *QCustomPlot::plottable() { if (!mPlottables.isEmpty()) { return mPlottables.last(); } else return 0; } /*! Removes the specified plottable from the plot and deletes it. If necessary, the corresponding legend item is also removed from the default legend (QCustomPlot::legend). Returns true on success. \see clearPlottables */ bool QCustomPlot::removePlottable(QCPAbstractPlottable *plottable) { if (!mPlottables.contains(plottable)) { qDebug() << Q_FUNC_INFO << "plottable not in list:" << reinterpret_cast(plottable); return false; } // remove plottable from legend: plottable->removeFromLegend(); // special handling for QCPGraphs to maintain the simple graph interface: if (QCPGraph *graph = qobject_cast(plottable)) mGraphs.removeOne(graph); // remove plottable: delete plottable; mPlottables.removeOne(plottable); return true; } /*! \overload Removes and deletes the plottable by its \a index. */ bool QCustomPlot::removePlottable(int index) { if (index >= 0 && index < mPlottables.size()) return removePlottable(mPlottables[index]); else { qDebug() << Q_FUNC_INFO << "index out of bounds:" << index; return false; } } /*! Removes all plottables from the plot and deletes them. Corresponding legend items are also removed from the default legend (QCustomPlot::legend). Returns the number of plottables removed. \see removePlottable */ int QCustomPlot::clearPlottables() { int c = mPlottables.size(); for (int i=c-1; i >= 0; --i) removePlottable(mPlottables[i]); return c; } /*! Returns the number of currently existing plottables in the plot \see plottable */ int QCustomPlot::plottableCount() const { return mPlottables.size(); } /*! Returns a list of the selected plottables. If no plottables are currently selected, the list is empty. There is a convenience function if you're only interested in selected graphs, see \ref selectedGraphs. \see setInteractions, QCPAbstractPlottable::setSelectable, QCPAbstractPlottable::setSelection */ QList QCustomPlot::selectedPlottables() const { QList result; foreach (QCPAbstractPlottable *plottable, mPlottables) { if (plottable->selected()) result.append(plottable); } return result; } /*! Returns the plottable at the pixel position \a pos. Plottables that only consist of single lines (like graphs) have a tolerance band around them, see \ref setSelectionTolerance. If multiple plottables come into consideration, the one closest to \a pos is returned. If \a onlySelectable is true, only plottables that are selectable (QCPAbstractPlottable::setSelectable) are considered. If there is no plottable at \a pos, the return value is 0. \see itemAt, layoutElementAt */ QCPAbstractPlottable *QCustomPlot::plottableAt(const QPointF &pos, bool onlySelectable) const { QCPAbstractPlottable *resultPlottable = 0; double resultDistance = mSelectionTolerance; // only regard clicks with distances smaller than mSelectionTolerance as selections, so initialize with that value foreach (QCPAbstractPlottable *plottable, mPlottables) { if (onlySelectable && !plottable->selectable()) // we could have also passed onlySelectable to the selectTest function, but checking here is faster, because we have access to QCPabstractPlottable::selectable continue; if ((plottable->keyAxis()->axisRect()->rect() & plottable->valueAxis()->axisRect()->rect()).contains(pos.toPoint())) // only consider clicks inside the rect that is spanned by the plottable's key/value axes { double currentDistance = plottable->selectTest(pos, false); if (currentDistance >= 0 && currentDistance < resultDistance) { resultPlottable = plottable; resultDistance = currentDistance; } } } return resultPlottable; } /*! Returns whether this QCustomPlot instance contains the \a plottable. */ bool QCustomPlot::hasPlottable(QCPAbstractPlottable *plottable) const { return mPlottables.contains(plottable); } /*! Returns the graph with \a index. If the index is invalid, returns 0. There is an overloaded version of this function with no parameter which returns the last created graph, see QCustomPlot::graph() \see graphCount, addGraph */ QCPGraph *QCustomPlot::graph(int index) const { if (index >= 0 && index < mGraphs.size()) { return mGraphs.at(index); } else { qDebug() << Q_FUNC_INFO << "index out of bounds:" << index; return 0; } } /*! \overload Returns the last graph, that was created with \ref addGraph. If there are no graphs in the plot, returns 0. \see graphCount, addGraph */ QCPGraph *QCustomPlot::graph() const { if (!mGraphs.isEmpty()) { return mGraphs.last(); } else return 0; } /*! Creates a new graph inside the plot. If \a keyAxis and \a valueAxis are left unspecified (0), the bottom (xAxis) is used as key and the left (yAxis) is used as value axis. If specified, \a keyAxis and \a valueAxis must reside in this QCustomPlot. \a keyAxis will be used as key axis (typically "x") and \a valueAxis as value axis (typically "y") for the graph. Returns a pointer to the newly created graph, or 0 if adding the graph failed. \see graph, graphCount, removeGraph, clearGraphs */ QCPGraph *QCustomPlot::addGraph(QCPAxis *keyAxis, QCPAxis *valueAxis) { if (!keyAxis) keyAxis = xAxis; if (!valueAxis) valueAxis = yAxis; if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "can't use default QCustomPlot xAxis or yAxis, because at least one is invalid (has been deleted)"; return 0; } if (keyAxis->parentPlot() != this || valueAxis->parentPlot() != this) { qDebug() << Q_FUNC_INFO << "passed keyAxis or valueAxis doesn't have this QCustomPlot as parent"; return 0; } QCPGraph *newGraph = new QCPGraph(keyAxis, valueAxis); newGraph->setName(QLatin1String("Graph ")+QString::number(mGraphs.size())); return newGraph; } /*! Removes the specified \a graph from the plot and deletes it. If necessary, the corresponding legend item is also removed from the default legend (QCustomPlot::legend). If any other graphs in the plot have a channel fill set towards the removed graph, the channel fill property of those graphs is reset to zero (no channel fill). Returns true on success. \see clearGraphs */ bool QCustomPlot::removeGraph(QCPGraph *graph) { return removePlottable(graph); } /*! \overload Removes and deletes the graph by its \a index. */ bool QCustomPlot::removeGraph(int index) { if (index >= 0 && index < mGraphs.size()) return removeGraph(mGraphs[index]); else return false; } /*! Removes all graphs from the plot and deletes them. Corresponding legend items are also removed from the default legend (QCustomPlot::legend). Returns the number of graphs removed. \see removeGraph */ int QCustomPlot::clearGraphs() { int c = mGraphs.size(); for (int i=c-1; i >= 0; --i) removeGraph(mGraphs[i]); return c; } /*! Returns the number of currently existing graphs in the plot \see graph, addGraph */ int QCustomPlot::graphCount() const { return mGraphs.size(); } /*! Returns a list of the selected graphs. If no graphs are currently selected, the list is empty. If you are not only interested in selected graphs but other plottables like QCPCurve, QCPBars, etc., use \ref selectedPlottables. \see setInteractions, selectedPlottables, QCPAbstractPlottable::setSelectable, QCPAbstractPlottable::setSelection */ QList QCustomPlot::selectedGraphs() const { QList result; foreach (QCPGraph *graph, mGraphs) { if (graph->selected()) result.append(graph); } return result; } /*! Returns the item with \a index. If the index is invalid, returns 0. There is an overloaded version of this function with no parameter which returns the last added item, see QCustomPlot::item() \see itemCount */ QCPAbstractItem *QCustomPlot::item(int index) const { if (index >= 0 && index < mItems.size()) { return mItems.at(index); } else { qDebug() << Q_FUNC_INFO << "index out of bounds:" << index; return 0; } } /*! \overload Returns the last item that was added to this plot. If there are no items in the plot, returns 0. \see itemCount */ QCPAbstractItem *QCustomPlot::item() const { if (!mItems.isEmpty()) { return mItems.last(); } else return 0; } /*! Removes the specified item from the plot and deletes it. Returns true on success. \see clearItems */ bool QCustomPlot::removeItem(QCPAbstractItem *item) { if (mItems.contains(item)) { delete item; mItems.removeOne(item); return true; } else { qDebug() << Q_FUNC_INFO << "item not in list:" << reinterpret_cast(item); return false; } } /*! \overload Removes and deletes the item by its \a index. */ bool QCustomPlot::removeItem(int index) { if (index >= 0 && index < mItems.size()) return removeItem(mItems[index]); else { qDebug() << Q_FUNC_INFO << "index out of bounds:" << index; return false; } } /*! Removes all items from the plot and deletes them. Returns the number of items removed. \see removeItem */ int QCustomPlot::clearItems() { int c = mItems.size(); for (int i=c-1; i >= 0; --i) removeItem(mItems[i]); return c; } /*! Returns the number of currently existing items in the plot \see item */ int QCustomPlot::itemCount() const { return mItems.size(); } /*! Returns a list of the selected items. If no items are currently selected, the list is empty. \see setInteractions, QCPAbstractItem::setSelectable, QCPAbstractItem::setSelected */ QList QCustomPlot::selectedItems() const { QList result; foreach (QCPAbstractItem *item, mItems) { if (item->selected()) result.append(item); } return result; } /*! Returns the item at the pixel position \a pos. Items that only consist of single lines (e.g. \ref QCPItemLine or \ref QCPItemCurve) have a tolerance band around them, see \ref setSelectionTolerance. If multiple items come into consideration, the one closest to \a pos is returned. If \a onlySelectable is true, only items that are selectable (QCPAbstractItem::setSelectable) are considered. If there is no item at \a pos, the return value is 0. \see plottableAt, layoutElementAt */ QCPAbstractItem *QCustomPlot::itemAt(const QPointF &pos, bool onlySelectable) const { QCPAbstractItem *resultItem = 0; double resultDistance = mSelectionTolerance; // only regard clicks with distances smaller than mSelectionTolerance as selections, so initialize with that value foreach (QCPAbstractItem *item, mItems) { if (onlySelectable && !item->selectable()) // we could have also passed onlySelectable to the selectTest function, but checking here is faster, because we have access to QCPAbstractItem::selectable continue; if (!item->clipToAxisRect() || item->clipRect().contains(pos.toPoint())) // only consider clicks inside axis cliprect of the item if actually clipped to it { double currentDistance = item->selectTest(pos, false); if (currentDistance >= 0 && currentDistance < resultDistance) { resultItem = item; resultDistance = currentDistance; } } } return resultItem; } /*! Returns whether this QCustomPlot contains the \a item. \see item */ bool QCustomPlot::hasItem(QCPAbstractItem *item) const { return mItems.contains(item); } /*! Returns the layer with the specified \a name. If there is no layer with the specified name, 0 is returned. Layer names are case-sensitive. \see addLayer, moveLayer, removeLayer */ QCPLayer *QCustomPlot::layer(const QString &name) const { foreach (QCPLayer *layer, mLayers) { if (layer->name() == name) return layer; } return 0; } /*! \overload Returns the layer by \a index. If the index is invalid, 0 is returned. \see addLayer, moveLayer, removeLayer */ QCPLayer *QCustomPlot::layer(int index) const { if (index >= 0 && index < mLayers.size()) { return mLayers.at(index); } else { qDebug() << Q_FUNC_INFO << "index out of bounds:" << index; return 0; } } /*! Returns the layer that is set as current layer (see \ref setCurrentLayer). */ QCPLayer *QCustomPlot::currentLayer() const { return mCurrentLayer; } /*! Sets the layer with the specified \a name to be the current layer. All layerables (\ref QCPLayerable), e.g. plottables and items, are created on the current layer. Returns true on success, i.e. if there is a layer with the specified \a name in the QCustomPlot. Layer names are case-sensitive. \see addLayer, moveLayer, removeLayer, QCPLayerable::setLayer */ bool QCustomPlot::setCurrentLayer(const QString &name) { if (QCPLayer *newCurrentLayer = layer(name)) { return setCurrentLayer(newCurrentLayer); } else { qDebug() << Q_FUNC_INFO << "layer with name doesn't exist:" << name; return false; } } /*! \overload Sets the provided \a layer to be the current layer. Returns true on success, i.e. when \a layer is a valid layer in the QCustomPlot. \see addLayer, moveLayer, removeLayer */ bool QCustomPlot::setCurrentLayer(QCPLayer *layer) { if (!mLayers.contains(layer)) { qDebug() << Q_FUNC_INFO << "layer not a layer of this QCustomPlot:" << reinterpret_cast(layer); return false; } mCurrentLayer = layer; return true; } /*! Returns the number of currently existing layers in the plot \see layer, addLayer */ int QCustomPlot::layerCount() const { return mLayers.size(); } /*! Adds a new layer to this QCustomPlot instance. The new layer will have the name \a name, which must be unique. Depending on \a insertMode, it is positioned either below or above \a otherLayer. Returns true on success, i.e. if there is no other layer named \a name and \a otherLayer is a valid layer inside this QCustomPlot. If \a otherLayer is 0, the highest layer in the QCustomPlot will be used. For an explanation of what layers are in QCustomPlot, see the documentation of \ref QCPLayer. \see layer, moveLayer, removeLayer */ bool QCustomPlot::addLayer(const QString &name, QCPLayer *otherLayer, QCustomPlot::LayerInsertMode insertMode) { if (!otherLayer) otherLayer = mLayers.last(); if (!mLayers.contains(otherLayer)) { qDebug() << Q_FUNC_INFO << "otherLayer not a layer of this QCustomPlot:" << reinterpret_cast(otherLayer); return false; } if (layer(name)) { qDebug() << Q_FUNC_INFO << "A layer exists already with the name" << name; return false; } QCPLayer *newLayer = new QCPLayer(this, name); mLayers.insert(otherLayer->index() + (insertMode==limAbove ? 1:0), newLayer); updateLayerIndices(); setupPaintBuffers(); // associates new layer with the appropriate paint buffer return true; } /*! Removes the specified \a layer and returns true on success. All layerables (e.g. plottables and items) on the removed layer will be moved to the layer below \a layer. If \a layer is the bottom layer, the layerables are moved to the layer above. In both cases, the total rendering order of all layerables in the QCustomPlot is preserved. If \a layer is the current layer (\ref setCurrentLayer), the layer below (or above, if bottom layer) becomes the new current layer. It is not possible to remove the last layer of the plot. \see layer, addLayer, moveLayer */ bool QCustomPlot::removeLayer(QCPLayer *layer) { if (!mLayers.contains(layer)) { qDebug() << Q_FUNC_INFO << "layer not a layer of this QCustomPlot:" << reinterpret_cast(layer); return false; } if (mLayers.size() < 2) { qDebug() << Q_FUNC_INFO << "can't remove last layer"; return false; } // append all children of this layer to layer below (if this is lowest layer, prepend to layer above) int removedIndex = layer->index(); bool isFirstLayer = removedIndex==0; QCPLayer *targetLayer = isFirstLayer ? mLayers.at(removedIndex+1) : mLayers.at(removedIndex-1); QList children = layer->children(); if (isFirstLayer) // prepend in reverse order (so order relative to each other stays the same) { for (int i=children.size()-1; i>=0; --i) children.at(i)->moveToLayer(targetLayer, true); } else // append normally { for (int i=0; imoveToLayer(targetLayer, false); } // if removed layer is current layer, change current layer to layer below/above: if (layer == mCurrentLayer) setCurrentLayer(targetLayer); // invalidate the paint buffer that was responsible for this layer: if (!layer->mPaintBuffer.isNull()) layer->mPaintBuffer.data()->setInvalidated(); // remove layer: delete layer; mLayers.removeOne(layer); updateLayerIndices(); return true; } /*! Moves the specified \a layer either above or below \a otherLayer. Whether it's placed above or below is controlled with \a insertMode. Returns true on success, i.e. when both \a layer and \a otherLayer are valid layers in the QCustomPlot. \see layer, addLayer, moveLayer */ bool QCustomPlot::moveLayer(QCPLayer *layer, QCPLayer *otherLayer, QCustomPlot::LayerInsertMode insertMode) { if (!mLayers.contains(layer)) { qDebug() << Q_FUNC_INFO << "layer not a layer of this QCustomPlot:" << reinterpret_cast(layer); return false; } if (!mLayers.contains(otherLayer)) { qDebug() << Q_FUNC_INFO << "otherLayer not a layer of this QCustomPlot:" << reinterpret_cast(otherLayer); return false; } if (layer->index() > otherLayer->index()) mLayers.move(layer->index(), otherLayer->index() + (insertMode==limAbove ? 1:0)); else if (layer->index() < otherLayer->index()) mLayers.move(layer->index(), otherLayer->index() + (insertMode==limAbove ? 0:-1)); // invalidate the paint buffers that are responsible for the layers: if (!layer->mPaintBuffer.isNull()) layer->mPaintBuffer.data()->setInvalidated(); if (!otherLayer->mPaintBuffer.isNull()) otherLayer->mPaintBuffer.data()->setInvalidated(); updateLayerIndices(); return true; } /*! Returns the number of axis rects in the plot. All axis rects can be accessed via QCustomPlot::axisRect(). Initially, only one axis rect exists in the plot. \see axisRect, axisRects */ int QCustomPlot::axisRectCount() const { return axisRects().size(); } /*! Returns the axis rect with \a index. Initially, only one axis rect (with index 0) exists in the plot. If multiple axis rects were added, all of them may be accessed with this function in a linear fashion (even when they are nested in a layout hierarchy or inside other axis rects via QCPAxisRect::insetLayout). \see axisRectCount, axisRects */ QCPAxisRect *QCustomPlot::axisRect(int index) const { const QList rectList = axisRects(); if (index >= 0 && index < rectList.size()) { return rectList.at(index); } else { qDebug() << Q_FUNC_INFO << "invalid axis rect index" << index; return 0; } } /*! Returns all axis rects in the plot. \see axisRectCount, axisRect */ QList QCustomPlot::axisRects() const { QList result; QStack elementStack; if (mPlotLayout) elementStack.push(mPlotLayout); while (!elementStack.isEmpty()) { foreach (QCPLayoutElement *element, elementStack.pop()->elements(false)) { if (element) { elementStack.push(element); if (QCPAxisRect *ar = qobject_cast(element)) result.append(ar); } } } return result; } /*! Returns the layout element at pixel position \a pos. If there is no element at that position, returns 0. Only visible elements are used. If \ref QCPLayoutElement::setVisible on the element itself or on any of its parent elements is set to false, it will not be considered. \see itemAt, plottableAt */ QCPLayoutElement *QCustomPlot::layoutElementAt(const QPointF &pos) const { QCPLayoutElement *currentElement = mPlotLayout; bool searchSubElements = true; while (searchSubElements && currentElement) { searchSubElements = false; foreach (QCPLayoutElement *subElement, currentElement->elements(false)) { if (subElement && subElement->realVisibility() && subElement->selectTest(pos, false) >= 0) { currentElement = subElement; searchSubElements = true; break; } } } return currentElement; } /*! Returns the layout element of type \ref QCPAxisRect at pixel position \a pos. This method ignores other layout elements even if they are visually in front of the axis rect (e.g. a \ref QCPLegend). If there is no axis rect at that position, returns 0. Only visible axis rects are used. If \ref QCPLayoutElement::setVisible on the axis rect itself or on any of its parent elements is set to false, it will not be considered. \see layoutElementAt */ QCPAxisRect *QCustomPlot::axisRectAt(const QPointF &pos) const { QCPAxisRect *result = 0; QCPLayoutElement *currentElement = mPlotLayout; bool searchSubElements = true; while (searchSubElements && currentElement) { searchSubElements = false; foreach (QCPLayoutElement *subElement, currentElement->elements(false)) { if (subElement && subElement->realVisibility() && subElement->selectTest(pos, false) >= 0) { currentElement = subElement; searchSubElements = true; if (QCPAxisRect *ar = qobject_cast(currentElement)) result = ar; break; } } } return result; } /*! Returns the axes that currently have selected parts, i.e. whose selection state is not \ref QCPAxis::spNone. \see selectedPlottables, selectedLegends, setInteractions, QCPAxis::setSelectedParts, QCPAxis::setSelectableParts */ QList QCustomPlot::selectedAxes() const { QList result, allAxes; foreach (QCPAxisRect *rect, axisRects()) allAxes << rect->axes(); foreach (QCPAxis *axis, allAxes) { if (axis->selectedParts() != QCPAxis::spNone) result.append(axis); } return result; } /*! Returns the legends that currently have selected parts, i.e. whose selection state is not \ref QCPLegend::spNone. \see selectedPlottables, selectedAxes, setInteractions, QCPLegend::setSelectedParts, QCPLegend::setSelectableParts, QCPLegend::selectedItems */ QList QCustomPlot::selectedLegends() const { QList result; QStack elementStack; if (mPlotLayout) elementStack.push(mPlotLayout); while (!elementStack.isEmpty()) { foreach (QCPLayoutElement *subElement, elementStack.pop()->elements(false)) { if (subElement) { elementStack.push(subElement); if (QCPLegend *leg = qobject_cast(subElement)) { if (leg->selectedParts() != QCPLegend::spNone) result.append(leg); } } } } return result; } /*! Deselects all layerables (plottables, items, axes, legends,...) of the QCustomPlot. Since calling this function is not a user interaction, this does not emit the \ref selectionChangedByUser signal. The individual selectionChanged signals are emitted though, if the objects were previously selected. \see setInteractions, selectedPlottables, selectedItems, selectedAxes, selectedLegends */ void QCustomPlot::deselectAll() { foreach (QCPLayer *layer, mLayers) { foreach (QCPLayerable *layerable, layer->children()) layerable->deselectEvent(0); } } /*! Causes a complete replot into the internal paint buffer(s). Finally, the widget surface is refreshed with the new buffer contents. This is the method that must be called to make changes to the plot, e.g. on the axis ranges or data points of graphs, visible. The parameter \a refreshPriority can be used to fine-tune the timing of the replot. For example if your application calls \ref replot very quickly in succession (e.g. multiple independent functions change some aspects of the plot and each wants to make sure the change gets replotted), it is advisable to set \a refreshPriority to \ref QCustomPlot::rpQueuedReplot. This way, the actual replotting is deferred to the next event loop iteration. Multiple successive calls of \ref replot with this priority will only cause a single replot, avoiding redundant replots and improving performance. Under a few circumstances, QCustomPlot causes a replot by itself. Those are resize events of the QCustomPlot widget and user interactions (object selection and range dragging/zooming). Before the replot happens, the signal \ref beforeReplot is emitted. After the replot, \ref afterReplot is emitted. It is safe to mutually connect the replot slot with any of those two signals on two QCustomPlots to make them replot synchronously, it won't cause an infinite recursion. If a layer is in mode \ref QCPLayer::lmBuffered (\ref QCPLayer::setMode), it is also possible to replot only that specific layer via \ref QCPLayer::replot. See the documentation there for details. */ void QCustomPlot::replot(QCustomPlot::RefreshPriority refreshPriority) { if (refreshPriority == QCustomPlot::rpQueuedReplot) { if (!mReplotQueued) { mReplotQueued = true; QTimer::singleShot(0, this, SLOT(replot())); } return; } if (mReplotting) // incase signals loop back to replot slot return; mReplotting = true; mReplotQueued = false; emit beforeReplot(); updateLayout(); // draw all layered objects (grid, axes, plottables, items, legend,...) into their buffers: setupPaintBuffers(); foreach (QCPLayer *layer, mLayers) layer->drawToPaintBuffer(); for (int i=0; isetInvalidated(false); if ((refreshPriority == rpRefreshHint && mPlottingHints.testFlag(QCP::phImmediateRefresh)) || refreshPriority==rpImmediateRefresh) repaint(); else update(); emit afterReplot(); mReplotting = false; } /*! Rescales the axes such that all plottables (like graphs) in the plot are fully visible. if \a onlyVisiblePlottables is set to true, only the plottables that have their visibility set to true (QCPLayerable::setVisible), will be used to rescale the axes. \see QCPAbstractPlottable::rescaleAxes, QCPAxis::rescale */ void QCustomPlot::rescaleAxes(bool onlyVisiblePlottables) { QList allAxes; foreach (QCPAxisRect *rect, axisRects()) allAxes << rect->axes(); foreach (QCPAxis *axis, allAxes) axis->rescale(onlyVisiblePlottables); } /*! Saves a PDF with the vectorized plot to the file \a fileName. The axis ratio as well as the scale of texts and lines will be derived from the specified \a width and \a height. This means, the output will look like the normal on-screen output of a QCustomPlot widget with the corresponding pixel width and height. If either \a width or \a height is zero, the exported image will have the same dimensions as the QCustomPlot widget currently has. Setting \a exportPen to \ref QCP::epNoCosmetic allows to disable the use of cosmetic pens when drawing to the PDF file. Cosmetic pens are pens with numerical width 0, which are always drawn as a one pixel wide line, no matter what zoom factor is set in the PDF-Viewer. For more information about cosmetic pens, see the QPainter and QPen documentation. The objects of the plot will appear in the current selection state. If you don't want any selected objects to be painted in their selected look, deselect everything with \ref deselectAll before calling this function. Returns true on success. \warning \li If you plan on editing the exported PDF file with a vector graphics editor like Inkscape, it is advised to set \a exportPen to \ref QCP::epNoCosmetic to avoid losing those cosmetic lines (which might be quite many, because cosmetic pens are the default for e.g. axes and tick marks). \li If calling this function inside the constructor of the parent of the QCustomPlot widget (i.e. the MainWindow constructor, if QCustomPlot is inside the MainWindow), always provide explicit non-zero widths and heights. If you leave \a width or \a height as 0 (default), this function uses the current width and height of the QCustomPlot widget. However, in Qt, these aren't defined yet inside the constructor, so you would get an image that has strange widths/heights. \a pdfCreator and \a pdfTitle may be used to set the according metadata fields in the resulting PDF file. \note On Android systems, this method does nothing and issues an according qDebug warning message. This is also the case if for other reasons the define flag \c QT_NO_PRINTER is set. \see savePng, saveBmp, saveJpg, saveRastered */ bool QCustomPlot::savePdf(const QString &fileName, int width, int height, QCP::ExportPen exportPen, const QString &pdfCreator, const QString &pdfTitle) { bool success = false; #ifdef QT_NO_PRINTER Q_UNUSED(fileName) Q_UNUSED(exportPen) Q_UNUSED(width) Q_UNUSED(height) Q_UNUSED(pdfCreator) Q_UNUSED(pdfTitle) qDebug() << Q_FUNC_INFO << "Qt was built without printer support (QT_NO_PRINTER). PDF not created."; #else int newWidth, newHeight; if (width == 0 || height == 0) { newWidth = this->width(); newHeight = this->height(); } else { newWidth = width; newHeight = height; } QPrinter printer(QPrinter::ScreenResolution); printer.setOutputFileName(fileName); printer.setOutputFormat(QPrinter::PdfFormat); printer.setColorMode(QPrinter::Color); printer.printEngine()->setProperty(QPrintEngine::PPK_Creator, pdfCreator); printer.printEngine()->setProperty(QPrintEngine::PPK_DocumentName, pdfTitle); QRect oldViewport = viewport(); setViewport(QRect(0, 0, newWidth, newHeight)); #if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) printer.setFullPage(true); printer.setPaperSize(viewport().size(), QPrinter::DevicePixel); #else QPageLayout pageLayout; pageLayout.setMode(QPageLayout::FullPageMode); pageLayout.setOrientation(QPageLayout::Portrait); pageLayout.setMargins(QMarginsF(0, 0, 0, 0)); pageLayout.setPageSize(QPageSize(viewport().size(), QPageSize::Point, QString(), QPageSize::ExactMatch)); printer.setPageLayout(pageLayout); #endif QCPPainter printpainter; if (printpainter.begin(&printer)) { printpainter.setMode(QCPPainter::pmVectorized); printpainter.setMode(QCPPainter::pmNoCaching); printpainter.setMode(QCPPainter::pmNonCosmetic, exportPen==QCP::epNoCosmetic); printpainter.setWindow(mViewport); if (mBackgroundBrush.style() != Qt::NoBrush && mBackgroundBrush.color() != Qt::white && mBackgroundBrush.color() != Qt::transparent && mBackgroundBrush.color().alpha() > 0) // draw pdf background color if not white/transparent printpainter.fillRect(viewport(), mBackgroundBrush); draw(&printpainter); printpainter.end(); success = true; } setViewport(oldViewport); #endif // QT_NO_PRINTER return success; } /*! Saves a PNG image file to \a fileName on disc. The output plot will have the dimensions \a width and \a height in pixels, multiplied by \a scale. If either \a width or \a height is zero, the current width and height of the QCustomPlot widget is used instead. Line widths and texts etc. are not scaled up when larger widths/heights are used. If you want that effect, use the \a scale parameter. For example, if you set both \a width and \a height to 100 and \a scale to 2, you will end up with an image file of size 200*200 in which all graphical elements are scaled up by factor 2 (line widths, texts, etc.). This scaling is not done by stretching a 100*100 image, the result will have full 200*200 pixel resolution. If you use a high scaling factor, it is recommended to enable antialiasing for all elements by temporarily setting \ref QCustomPlot::setAntialiasedElements to \ref QCP::aeAll as this allows QCustomPlot to place objects with sub-pixel accuracy. image compression can be controlled with the \a quality parameter which must be between 0 and 100 or -1 to use the default setting. The \a resolution will be written to the image file header and has no direct consequence for the quality or the pixel size. However, if opening the image with a tool which respects the metadata, it will be able to scale the image to match either a given size in real units of length (inch, centimeters, etc.), or the target display DPI. You can specify in which units \a resolution is given, by setting \a resolutionUnit. The \a resolution is converted to the format's expected resolution unit internally. Returns true on success. If this function fails, most likely the PNG format isn't supported by the system, see Qt docs about QImageWriter::supportedImageFormats(). The objects of the plot will appear in the current selection state. If you don't want any selected objects to be painted in their selected look, deselect everything with \ref deselectAll before calling this function. If you want the PNG to have a transparent background, call \ref setBackground(const QBrush &brush) with no brush (Qt::NoBrush) or a transparent color (Qt::transparent), before saving. \warning If calling this function inside the constructor of the parent of the QCustomPlot widget (i.e. the MainWindow constructor, if QCustomPlot is inside the MainWindow), always provide explicit non-zero widths and heights. If you leave \a width or \a height as 0 (default), this function uses the current width and height of the QCustomPlot widget. However, in Qt, these aren't defined yet inside the constructor, so you would get an image that has strange widths/heights. \see savePdf, saveBmp, saveJpg, saveRastered */ bool QCustomPlot::savePng(const QString &fileName, int width, int height, double scale, int quality, int resolution, QCP::ResolutionUnit resolutionUnit) { return saveRastered(fileName, width, height, scale, "PNG", quality, resolution, resolutionUnit); } /*! Saves a JPEG image file to \a fileName on disc. The output plot will have the dimensions \a width and \a height in pixels, multiplied by \a scale. If either \a width or \a height is zero, the current width and height of the QCustomPlot widget is used instead. Line widths and texts etc. are not scaled up when larger widths/heights are used. If you want that effect, use the \a scale parameter. For example, if you set both \a width and \a height to 100 and \a scale to 2, you will end up with an image file of size 200*200 in which all graphical elements are scaled up by factor 2 (line widths, texts, etc.). This scaling is not done by stretching a 100*100 image, the result will have full 200*200 pixel resolution. If you use a high scaling factor, it is recommended to enable antialiasing for all elements by temporarily setting \ref QCustomPlot::setAntialiasedElements to \ref QCP::aeAll as this allows QCustomPlot to place objects with sub-pixel accuracy. image compression can be controlled with the \a quality parameter which must be between 0 and 100 or -1 to use the default setting. The \a resolution will be written to the image file header and has no direct consequence for the quality or the pixel size. However, if opening the image with a tool which respects the metadata, it will be able to scale the image to match either a given size in real units of length (inch, centimeters, etc.), or the target display DPI. You can specify in which units \a resolution is given, by setting \a resolutionUnit. The \a resolution is converted to the format's expected resolution unit internally. Returns true on success. If this function fails, most likely the JPEG format isn't supported by the system, see Qt docs about QImageWriter::supportedImageFormats(). The objects of the plot will appear in the current selection state. If you don't want any selected objects to be painted in their selected look, deselect everything with \ref deselectAll before calling this function. \warning If calling this function inside the constructor of the parent of the QCustomPlot widget (i.e. the MainWindow constructor, if QCustomPlot is inside the MainWindow), always provide explicit non-zero widths and heights. If you leave \a width or \a height as 0 (default), this function uses the current width and height of the QCustomPlot widget. However, in Qt, these aren't defined yet inside the constructor, so you would get an image that has strange widths/heights. \see savePdf, savePng, saveBmp, saveRastered */ bool QCustomPlot::saveJpg(const QString &fileName, int width, int height, double scale, int quality, int resolution, QCP::ResolutionUnit resolutionUnit) { return saveRastered(fileName, width, height, scale, "JPG", quality, resolution, resolutionUnit); } /*! Saves a BMP image file to \a fileName on disc. The output plot will have the dimensions \a width and \a height in pixels, multiplied by \a scale. If either \a width or \a height is zero, the current width and height of the QCustomPlot widget is used instead. Line widths and texts etc. are not scaled up when larger widths/heights are used. If you want that effect, use the \a scale parameter. For example, if you set both \a width and \a height to 100 and \a scale to 2, you will end up with an image file of size 200*200 in which all graphical elements are scaled up by factor 2 (line widths, texts, etc.). This scaling is not done by stretching a 100*100 image, the result will have full 200*200 pixel resolution. If you use a high scaling factor, it is recommended to enable antialiasing for all elements by temporarily setting \ref QCustomPlot::setAntialiasedElements to \ref QCP::aeAll as this allows QCustomPlot to place objects with sub-pixel accuracy. The \a resolution will be written to the image file header and has no direct consequence for the quality or the pixel size. However, if opening the image with a tool which respects the metadata, it will be able to scale the image to match either a given size in real units of length (inch, centimeters, etc.), or the target display DPI. You can specify in which units \a resolution is given, by setting \a resolutionUnit. The \a resolution is converted to the format's expected resolution unit internally. Returns true on success. If this function fails, most likely the BMP format isn't supported by the system, see Qt docs about QImageWriter::supportedImageFormats(). The objects of the plot will appear in the current selection state. If you don't want any selected objects to be painted in their selected look, deselect everything with \ref deselectAll before calling this function. \warning If calling this function inside the constructor of the parent of the QCustomPlot widget (i.e. the MainWindow constructor, if QCustomPlot is inside the MainWindow), always provide explicit non-zero widths and heights. If you leave \a width or \a height as 0 (default), this function uses the current width and height of the QCustomPlot widget. However, in Qt, these aren't defined yet inside the constructor, so you would get an image that has strange widths/heights. \see savePdf, savePng, saveJpg, saveRastered */ bool QCustomPlot::saveBmp(const QString &fileName, int width, int height, double scale, int resolution, QCP::ResolutionUnit resolutionUnit) { return saveRastered(fileName, width, height, scale, "BMP", -1, resolution, resolutionUnit); } /*! \internal Returns a minimum size hint that corresponds to the minimum size of the top level layout (\ref plotLayout). To prevent QCustomPlot from being collapsed to size/width zero, set a minimum size (setMinimumSize) either on the whole QCustomPlot or on any layout elements inside the plot. This is especially important, when placed in a QLayout where other components try to take in as much space as possible (e.g. QMdiArea). */ QSize QCustomPlot::minimumSizeHint() const { return mPlotLayout->minimumOuterSizeHint(); } /*! \internal Returns a size hint that is the same as \ref minimumSizeHint. */ QSize QCustomPlot::sizeHint() const { return mPlotLayout->minimumOuterSizeHint(); } /*! \internal Event handler for when the QCustomPlot widget needs repainting. This does not cause a \ref replot, but draws the internal buffer on the widget surface. */ void QCustomPlot::paintEvent(QPaintEvent *event) { Q_UNUSED(event); QCPPainter painter(this); if (painter.isActive()) { painter.setRenderHint(QPainter::HighQualityAntialiasing); // to make Antialiasing look good if using the OpenGL graphicssystem if (mBackgroundBrush.style() != Qt::NoBrush) painter.fillRect(mViewport, mBackgroundBrush); drawBackground(&painter); for (int bufferIndex = 0; bufferIndex < mPaintBuffers.size(); ++bufferIndex) mPaintBuffers.at(bufferIndex)->draw(&painter); } } /*! \internal Event handler for a resize of the QCustomPlot widget. The viewport (which becomes the outer rect of mPlotLayout) is resized appropriately. Finally a \ref replot is performed. */ void QCustomPlot::resizeEvent(QResizeEvent *event) { Q_UNUSED(event) // resize and repaint the buffer: setViewport(rect()); replot(rpQueuedRefresh); // queued refresh is important here, to prevent painting issues in some contexts (e.g. MDI subwindow) } /*! \internal Event handler for when a double click occurs. Emits the \ref mouseDoubleClick signal, then determines the layerable under the cursor and forwards the event to it. Finally, emits the specialized signals when certain objecs are clicked (e.g. \ref plottableDoubleClick, \ref axisDoubleClick, etc.). \see mousePressEvent, mouseReleaseEvent */ void QCustomPlot::mouseDoubleClickEvent(QMouseEvent *event) { emit mouseDoubleClick(event); mMouseHasMoved = false; mMousePressPos = event->pos(); // determine layerable under the cursor (this event is called instead of the second press event in a double-click): QList details; QList candidates = layerableListAt(mMousePressPos, false, &details); for (int i=0; iaccept(); // default impl of QCPLayerable's mouse events ignore the event, in that case propagate to next candidate in list candidates.at(i)->mouseDoubleClickEvent(event, details.at(i)); if (event->isAccepted()) { mMouseEventLayerable = candidates.at(i); mMouseEventLayerableDetails = details.at(i); break; } } // emit specialized object double click signals: if (!candidates.isEmpty()) { if (QCPAbstractPlottable *ap = qobject_cast(candidates.first())) { int dataIndex = 0; if (!details.first().value().isEmpty()) dataIndex = details.first().value().dataRange().begin(); emit plottableDoubleClick(ap, dataIndex, event); } else if (QCPAxis *ax = qobject_cast(candidates.first())) emit axisDoubleClick(ax, details.first().value(), event); else if (QCPAbstractItem *ai = qobject_cast(candidates.first())) emit itemDoubleClick(ai, event); else if (QCPLegend *lg = qobject_cast(candidates.first())) emit legendDoubleClick(lg, 0, event); else if (QCPAbstractLegendItem *li = qobject_cast(candidates.first())) emit legendDoubleClick(li->parentLegend(), li, event); } event->accept(); // in case QCPLayerable reimplementation manipulates event accepted state. In QWidget event system, QCustomPlot wants to accept the event. } /*! \internal Event handler for when a mouse button is pressed. Emits the mousePress signal. If the current \ref setSelectionRectMode is not \ref QCP::srmNone, passes the event to the selection rect. Otherwise determines the layerable under the cursor and forwards the event to it. \see mouseMoveEvent, mouseReleaseEvent */ void QCustomPlot::mousePressEvent(QMouseEvent *event) { emit mousePress(event); // save some state to tell in releaseEvent whether it was a click: mMouseHasMoved = false; mMousePressPos = event->pos(); if (mSelectionRect && mSelectionRectMode != QCP::srmNone) { if (mSelectionRectMode != QCP::srmZoom || qobject_cast(axisRectAt(mMousePressPos))) // in zoom mode only activate selection rect if on an axis rect mSelectionRect->startSelection(event); } else { // no selection rect interaction, prepare for click signal emission and forward event to layerable under the cursor: QList details; QList candidates = layerableListAt(mMousePressPos, false, &details); if (!candidates.isEmpty()) { mMouseSignalLayerable = candidates.first(); // candidate for signal emission is always topmost hit layerable (signal emitted in release event) mMouseSignalLayerableDetails = details.first(); } // forward event to topmost candidate which accepts the event: for (int i=0; iaccept(); // default impl of QCPLayerable's mouse events call ignore() on the event, in that case propagate to next candidate in list candidates.at(i)->mousePressEvent(event, details.at(i)); if (event->isAccepted()) { mMouseEventLayerable = candidates.at(i); mMouseEventLayerableDetails = details.at(i); break; } } } event->accept(); // in case QCPLayerable reimplementation manipulates event accepted state. In QWidget event system, QCustomPlot wants to accept the event. } /*! \internal Event handler for when the cursor is moved. Emits the \ref mouseMove signal. If the selection rect (\ref setSelectionRect) is currently active, the event is forwarded to it in order to update the rect geometry. Otherwise, if a layout element has mouse capture focus (a mousePressEvent happened on top of the layout element before), the mouseMoveEvent is forwarded to that element. \see mousePressEvent, mouseReleaseEvent */ void QCustomPlot::mouseMoveEvent(QMouseEvent *event) { emit mouseMove(event); if (!mMouseHasMoved && (mMousePressPos-event->pos()).manhattanLength() > 3) mMouseHasMoved = true; // moved too far from mouse press position, don't handle as click on mouse release if (mSelectionRect && mSelectionRect->isActive()) mSelectionRect->moveSelection(event); else if (mMouseEventLayerable) // call event of affected layerable: mMouseEventLayerable->mouseMoveEvent(event, mMousePressPos); event->accept(); // in case QCPLayerable reimplementation manipulates event accepted state. In QWidget event system, QCustomPlot wants to accept the event. } /*! \internal Event handler for when a mouse button is released. Emits the \ref mouseRelease signal. If the mouse was moved less than a certain threshold in any direction since the \ref mousePressEvent, it is considered a click which causes the selection mechanism (if activated via \ref setInteractions) to possibly change selection states accordingly. Further, specialized mouse click signals are emitted (e.g. \ref plottableClick, \ref axisClick, etc.) If a layerable is the mouse capturer (a \ref mousePressEvent happened on top of the layerable before), the \ref mouseReleaseEvent is forwarded to that element. \see mousePressEvent, mouseMoveEvent */ void QCustomPlot::mouseReleaseEvent(QMouseEvent *event) { emit mouseRelease(event); if (!mMouseHasMoved) // mouse hasn't moved (much) between press and release, so handle as click { if (mSelectionRect && mSelectionRect->isActive()) // a simple click shouldn't successfully finish a selection rect, so cancel it here mSelectionRect->cancel(); if (event->button() == Qt::LeftButton) processPointSelection(event); // emit specialized click signals of QCustomPlot instance: if (QCPAbstractPlottable *ap = qobject_cast(mMouseSignalLayerable)) { int dataIndex = 0; if (!mMouseSignalLayerableDetails.value().isEmpty()) dataIndex = mMouseSignalLayerableDetails.value().dataRange().begin(); emit plottableClick(ap, dataIndex, event); } else if (QCPAxis *ax = qobject_cast(mMouseSignalLayerable)) emit axisClick(ax, mMouseSignalLayerableDetails.value(), event); else if (QCPAbstractItem *ai = qobject_cast(mMouseSignalLayerable)) emit itemClick(ai, event); else if (QCPLegend *lg = qobject_cast(mMouseSignalLayerable)) emit legendClick(lg, 0, event); else if (QCPAbstractLegendItem *li = qobject_cast(mMouseSignalLayerable)) emit legendClick(li->parentLegend(), li, event); mMouseSignalLayerable = 0; } if (mSelectionRect && mSelectionRect->isActive()) // Note: if a click was detected above, the selection rect is canceled there { // finish selection rect, the appropriate action will be taken via signal-slot connection: mSelectionRect->endSelection(event); } else { // call event of affected layerable: if (mMouseEventLayerable) { mMouseEventLayerable->mouseReleaseEvent(event, mMousePressPos); mMouseEventLayerable = 0; } } if (noAntialiasingOnDrag()) replot(rpQueuedReplot); event->accept(); // in case QCPLayerable reimplementation manipulates event accepted state. In QWidget event system, QCustomPlot wants to accept the event. } /*! \internal Event handler for mouse wheel events. First, the \ref mouseWheel signal is emitted. Then determines the affected layerable and forwards the event to it. */ void QCustomPlot::wheelEvent(QWheelEvent *event) { emit mouseWheel(event); // forward event to layerable under cursor: QList candidates = layerableListAt(event->pos(), false); for (int i=0; iaccept(); // default impl of QCPLayerable's mouse events ignore the event, in that case propagate to next candidate in list candidates.at(i)->wheelEvent(event); if (event->isAccepted()) break; } event->accept(); // in case QCPLayerable reimplementation manipulates event accepted state. In QWidget event system, QCustomPlot wants to accept the event. } /*! \internal This function draws the entire plot, including background pixmap, with the specified \a painter. It does not make use of the paint buffers like \ref replot, so this is the function typically used by saving/exporting methods such as \ref savePdf or \ref toPainter. Note that it does not fill the background with the background brush (as the user may specify with \ref setBackground(const QBrush &brush)), this is up to the respective functions calling this method. */ void QCustomPlot::draw(QCPPainter *painter) { updateLayout(); // draw viewport background pixmap: drawBackground(painter); // draw all layered objects (grid, axes, plottables, items, legend,...): foreach (QCPLayer *layer, mLayers) layer->draw(painter); /* Debug code to draw all layout element rects foreach (QCPLayoutElement* el, findChildren()) { painter->setBrush(Qt::NoBrush); painter->setPen(QPen(QColor(0, 0, 0, 100), 0, Qt::DashLine)); painter->drawRect(el->rect()); painter->setPen(QPen(QColor(255, 0, 0, 100), 0, Qt::DashLine)); painter->drawRect(el->outerRect()); } */ } /*! \internal Performs the layout update steps defined by \ref QCPLayoutElement::UpdatePhase, by calling \ref QCPLayoutElement::update on the main plot layout. Here, the layout elements calculate their positions and margins, and prepare for the following draw call. */ void QCustomPlot::updateLayout() { // run through layout phases: mPlotLayout->update(QCPLayoutElement::upPreparation); mPlotLayout->update(QCPLayoutElement::upMargins); mPlotLayout->update(QCPLayoutElement::upLayout); } /*! \internal Draws the viewport background pixmap of the plot. If a pixmap was provided via \ref setBackground, this function buffers the scaled version depending on \ref setBackgroundScaled and \ref setBackgroundScaledMode and then draws it inside the viewport with the provided \a painter. The scaled version is buffered in mScaledBackgroundPixmap to prevent expensive rescaling at every redraw. It is only updated, when the axis rect has changed in a way that requires a rescale of the background pixmap (this is dependent on the \ref setBackgroundScaledMode), or when a differend axis background pixmap was set. Note that this function does not draw a fill with the background brush (\ref setBackground(const QBrush &brush)) beneath the pixmap. \see setBackground, setBackgroundScaled, setBackgroundScaledMode */ void QCustomPlot::drawBackground(QCPPainter *painter) { // Note: background color is handled in individual replot/save functions // draw background pixmap (on top of fill, if brush specified): if (!mBackgroundPixmap.isNull()) { if (mBackgroundScaled) { // check whether mScaledBackground needs to be updated: QSize scaledSize(mBackgroundPixmap.size()); scaledSize.scale(mViewport.size(), mBackgroundScaledMode); if (mScaledBackgroundPixmap.size() != scaledSize) mScaledBackgroundPixmap = mBackgroundPixmap.scaled(mViewport.size(), mBackgroundScaledMode, Qt::SmoothTransformation); painter->drawPixmap(mViewport.topLeft(), mScaledBackgroundPixmap, QRect(0, 0, mViewport.width(), mViewport.height()) & mScaledBackgroundPixmap.rect()); } else { painter->drawPixmap(mViewport.topLeft(), mBackgroundPixmap, QRect(0, 0, mViewport.width(), mViewport.height())); } } } /*! \internal Goes through the layers and makes sure this QCustomPlot instance holds the correct number of paint buffers and that they have the correct configuration (size, pixel ratio, etc.). Allocations, reallocations and deletions of paint buffers are performed as necessary. It also associates the paint buffers with the layers, so they draw themselves into the right buffer when \ref QCPLayer::drawToPaintBuffer is called. This means it associates adjacent \ref QCPLayer::lmLogical layers to a mutual paint buffer and creates dedicated paint buffers for layers in \ref QCPLayer::lmBuffered mode. This method uses \ref createPaintBuffer to create new paint buffers. After this method, the paint buffers are empty (filled with \c Qt::transparent) and invalidated (so an attempt to replot only a single buffered layer causes a full replot). This method is called in every \ref replot call, prior to actually drawing the layers (into their associated paint buffer). If the paint buffers don't need changing/reallocating, this method basically leaves them alone and thus finishes very fast. */ void QCustomPlot::setupPaintBuffers() { int bufferIndex = 0; if (mPaintBuffers.isEmpty()) mPaintBuffers.append(QSharedPointer(createPaintBuffer())); for (int layerIndex = 0; layerIndex < mLayers.size(); ++layerIndex) { QCPLayer *layer = mLayers.at(layerIndex); if (layer->mode() == QCPLayer::lmLogical) { layer->mPaintBuffer = mPaintBuffers.at(bufferIndex).toWeakRef(); } else if (layer->mode() == QCPLayer::lmBuffered) { ++bufferIndex; if (bufferIndex >= mPaintBuffers.size()) mPaintBuffers.append(QSharedPointer(createPaintBuffer())); layer->mPaintBuffer = mPaintBuffers.at(bufferIndex).toWeakRef(); if (layerIndex < mLayers.size()-1 && mLayers.at(layerIndex+1)->mode() == QCPLayer::lmLogical) // not last layer, and next one is logical, so prepare another buffer for next layerables { ++bufferIndex; if (bufferIndex >= mPaintBuffers.size()) mPaintBuffers.append(QSharedPointer(createPaintBuffer())); } } } // remove unneeded buffers: while (mPaintBuffers.size()-1 > bufferIndex) mPaintBuffers.removeLast(); // resize buffers to viewport size and clear contents: for (int i=0; isetSize(viewport().size()); // won't do anything if already correct size mPaintBuffers.at(i)->clear(Qt::transparent); mPaintBuffers.at(i)->setInvalidated(); } } /*! \internal This method is used by \ref setupPaintBuffers when it needs to create new paint buffers. Depending on the current setting of \ref setOpenGl, and the current Qt version, different backends (subclasses of \ref QCPAbstractPaintBuffer) are created, initialized with the proper size and device pixel ratio, and returned. */ QCPAbstractPaintBuffer *QCustomPlot::createPaintBuffer() { if (mOpenGl) { #if defined(QCP_OPENGL_FBO) return new QCPPaintBufferGlFbo(viewport().size(), mBufferDevicePixelRatio, mGlContext, mGlPaintDevice); #elif defined(QCP_OPENGL_PBUFFER) return new QCPPaintBufferGlPbuffer(viewport().size(), mBufferDevicePixelRatio, mOpenGlMultisamples); #else qDebug() << Q_FUNC_INFO << "OpenGL enabled even though no support for it compiled in, this shouldn't have happened. Falling back to pixmap paint buffer."; return new QCPPaintBufferPixmap(viewport().size(), mBufferDevicePixelRatio); #endif } else return new QCPPaintBufferPixmap(viewport().size(), mBufferDevicePixelRatio); } /*! This method returns whether any of the paint buffers held by this QCustomPlot instance are invalidated. If any buffer is invalidated, a partial replot (\ref QCPLayer::replot) is not allowed and always causes a full replot (\ref QCustomPlot::replot) of all layers. This is the case when for example the layer order has changed, new layers were added, layers were removed, or layer modes were changed (\ref QCPLayer::setMode). \see QCPAbstractPaintBuffer::setInvalidated */ bool QCustomPlot::hasInvalidatedPaintBuffers() { for (int i=0; iinvalidated()) return true; } return false; } /*! \internal When \ref setOpenGl is set to true, this method is used to initialize OpenGL (create a context, surface, paint device). Returns true on success. If this method is successful, all paint buffers should be deleted and then reallocated by calling \ref setupPaintBuffers, so the OpenGL-based paint buffer subclasses (\ref QCPPaintBufferGlPbuffer, \ref QCPPaintBufferGlFbo) are used for subsequent replots. \see freeOpenGl */ bool QCustomPlot::setupOpenGl() { #ifdef QCP_OPENGL_FBO freeOpenGl(); QSurfaceFormat proposedSurfaceFormat; proposedSurfaceFormat.setSamples(mOpenGlMultisamples); #ifdef QCP_OPENGL_OFFSCREENSURFACE QOffscreenSurface *surface = new QOffscreenSurface; #else QWindow *surface = new QWindow; surface->setSurfaceType(QSurface::OpenGLSurface); #endif surface->setFormat(proposedSurfaceFormat); surface->create(); mGlSurface = QSharedPointer(surface); mGlContext = QSharedPointer(new QOpenGLContext); mGlContext->setFormat(mGlSurface->format()); if (!mGlContext->create()) { qDebug() << Q_FUNC_INFO << "Failed to create OpenGL context"; mGlContext.clear(); mGlSurface.clear(); return false; } if (!mGlContext->makeCurrent(mGlSurface.data())) // context needs to be current to create paint device { qDebug() << Q_FUNC_INFO << "Failed to make opengl context current"; mGlContext.clear(); mGlSurface.clear(); return false; } if (!QOpenGLFramebufferObject::hasOpenGLFramebufferObjects()) { qDebug() << Q_FUNC_INFO << "OpenGL of this system doesn't support frame buffer objects"; mGlContext.clear(); mGlSurface.clear(); return false; } mGlPaintDevice = QSharedPointer(new QOpenGLPaintDevice); return true; #elif defined(QCP_OPENGL_PBUFFER) return QGLFormat::hasOpenGL(); #else return false; #endif } /*! \internal When \ref setOpenGl is set to false, this method is used to deinitialize OpenGL (releases the context and frees resources). After OpenGL is disabled, all paint buffers should be deleted and then reallocated by calling \ref setupPaintBuffers, so the standard software rendering paint buffer subclass (\ref QCPPaintBufferPixmap) is used for subsequent replots. \see setupOpenGl */ void QCustomPlot::freeOpenGl() { #ifdef QCP_OPENGL_FBO mGlPaintDevice.clear(); mGlContext.clear(); mGlSurface.clear(); #endif } /*! \internal This method is used by \ref QCPAxisRect::removeAxis to report removed axes to the QCustomPlot so it may clear its QCustomPlot::xAxis, yAxis, xAxis2 and yAxis2 members accordingly. */ void QCustomPlot::axisRemoved(QCPAxis *axis) { if (xAxis == axis) xAxis = 0; if (xAxis2 == axis) xAxis2 = 0; if (yAxis == axis) yAxis = 0; if (yAxis2 == axis) yAxis2 = 0; // Note: No need to take care of range drag axes and range zoom axes, because they are stored in smart pointers } /*! \internal This method is used by the QCPLegend destructor to report legend removal to the QCustomPlot so it may clear its QCustomPlot::legend member accordingly. */ void QCustomPlot::legendRemoved(QCPLegend *legend) { if (this->legend == legend) this->legend = 0; } /*! \internal This slot is connected to the selection rect's \ref QCPSelectionRect::accepted signal when \ref setSelectionRectMode is set to \ref QCP::srmSelect. First, it determines which axis rect was the origin of the selection rect judging by the starting point of the selection. Then it goes through the plottables (\ref QCPAbstractPlottable1D to be precise) associated with that axis rect and finds the data points that are in \a rect. It does this by querying their \ref QCPAbstractPlottable1D::selectTestRect method. Then, the actual selection is done by calling the plottables' \ref QCPAbstractPlottable::selectEvent, placing the found selected data points in the \a details parameter as QVariant(\ref QCPDataSelection). All plottables that weren't touched by \a rect receive a \ref QCPAbstractPlottable::deselectEvent. \see processRectZoom */ void QCustomPlot::processRectSelection(QRect rect, QMouseEvent *event) { bool selectionStateChanged = false; if (mInteractions.testFlag(QCP::iSelectPlottables)) { QMap > potentialSelections; // map key is number of selected data points, so we have selections sorted by size QRectF rectF(rect.normalized()); if (QCPAxisRect *affectedAxisRect = axisRectAt(rectF.topLeft())) { // determine plottables that were hit by the rect and thus are candidates for selection: foreach (QCPAbstractPlottable *plottable, affectedAxisRect->plottables()) { if (QCPPlottableInterface1D *plottableInterface = plottable->interface1D()) { QCPDataSelection dataSel = plottableInterface->selectTestRect(rectF, true); if (!dataSel.isEmpty()) potentialSelections.insertMulti(dataSel.dataPointCount(), QPair(plottable, dataSel)); } } if (!mInteractions.testFlag(QCP::iMultiSelect)) { // only leave plottable with most selected points in map, since we will only select a single plottable: if (!potentialSelections.isEmpty()) { QMap >::iterator it = potentialSelections.begin(); while (it != potentialSelections.end()-1) // erase all except last element it = potentialSelections.erase(it); } } bool additive = event->modifiers().testFlag(mMultiSelectModifier); // deselect all other layerables if not additive selection: if (!additive) { // emit deselection except to those plottables who will be selected afterwards: foreach (QCPLayer *layer, mLayers) { foreach (QCPLayerable *layerable, layer->children()) { if ((potentialSelections.isEmpty() || potentialSelections.constBegin()->first != layerable) && mInteractions.testFlag(layerable->selectionCategory())) { bool selChanged = false; layerable->deselectEvent(&selChanged); selectionStateChanged |= selChanged; } } } } // go through selections in reverse (largest selection first) and emit select events: QMap >::const_iterator it = potentialSelections.constEnd(); while (it != potentialSelections.constBegin()) { --it; if (mInteractions.testFlag(it.value().first->selectionCategory())) { bool selChanged = false; it.value().first->selectEvent(event, additive, QVariant::fromValue(it.value().second), &selChanged); selectionStateChanged |= selChanged; } } } } if (selectionStateChanged) { emit selectionChangedByUser(); replot(rpQueuedReplot); } else if (mSelectionRect) mSelectionRect->layer()->replot(); } /*! \internal This slot is connected to the selection rect's \ref QCPSelectionRect::accepted signal when \ref setSelectionRectMode is set to \ref QCP::srmZoom. It determines which axis rect was the origin of the selection rect judging by the starting point of the selection, and then zooms the axes defined via \ref QCPAxisRect::setRangeZoomAxes to the provided \a rect (see \ref QCPAxisRect::zoom). \see processRectSelection */ void QCustomPlot::processRectZoom(QRect rect, QMouseEvent *event) { Q_UNUSED(event) if (QCPAxisRect *axisRect = axisRectAt(rect.topLeft())) { QList affectedAxes = QList() << axisRect->rangeZoomAxes(Qt::Horizontal) << axisRect->rangeZoomAxes(Qt::Vertical); affectedAxes.removeAll(static_cast(0)); axisRect->zoom(QRectF(rect), affectedAxes); } replot(rpQueuedReplot); // always replot to make selection rect disappear } /*! \internal This method is called when a simple left mouse click was detected on the QCustomPlot surface. It first determines the layerable that was hit by the click, and then calls its \ref QCPLayerable::selectEvent. All other layerables receive a QCPLayerable::deselectEvent (unless the multi-select modifier was pressed, see \ref setMultiSelectModifier). In this method the hit layerable is determined a second time using \ref layerableAt (after the one in \ref mousePressEvent), because we want \a onlySelectable set to true this time. This implies that the mouse event grabber (mMouseEventLayerable) may be a different one from the clicked layerable determined here. For example, if a non-selectable layerable is in front of a selectable layerable at the click position, the front layerable will receive mouse events but the selectable one in the back will receive the \ref QCPLayerable::selectEvent. \see processRectSelection, QCPLayerable::selectTest */ void QCustomPlot::processPointSelection(QMouseEvent *event) { QVariant details; QCPLayerable *clickedLayerable = layerableAt(event->pos(), true, &details); bool selectionStateChanged = false; bool additive = mInteractions.testFlag(QCP::iMultiSelect) && event->modifiers().testFlag(mMultiSelectModifier); // deselect all other layerables if not additive selection: if (!additive) { foreach (QCPLayer *layer, mLayers) { foreach (QCPLayerable *layerable, layer->children()) { if (layerable != clickedLayerable && mInteractions.testFlag(layerable->selectionCategory())) { bool selChanged = false; layerable->deselectEvent(&selChanged); selectionStateChanged |= selChanged; } } } } if (clickedLayerable && mInteractions.testFlag(clickedLayerable->selectionCategory())) { // a layerable was actually clicked, call its selectEvent: bool selChanged = false; clickedLayerable->selectEvent(event, additive, details, &selChanged); selectionStateChanged |= selChanged; } if (selectionStateChanged) { emit selectionChangedByUser(); replot(rpQueuedReplot); } } /*! \internal Registers the specified plottable with this QCustomPlot and, if \ref setAutoAddPlottableToLegend is enabled, adds it to the legend (QCustomPlot::legend). QCustomPlot takes ownership of the plottable. Returns true on success, i.e. when \a plottable isn't already in this plot and the parent plot of \a plottable is this QCustomPlot. This method is called automatically in the QCPAbstractPlottable base class constructor. */ bool QCustomPlot::registerPlottable(QCPAbstractPlottable *plottable) { if (mPlottables.contains(plottable)) { qDebug() << Q_FUNC_INFO << "plottable already added to this QCustomPlot:" << reinterpret_cast(plottable); return false; } if (plottable->parentPlot() != this) { qDebug() << Q_FUNC_INFO << "plottable not created with this QCustomPlot as parent:" << reinterpret_cast(plottable); return false; } mPlottables.append(plottable); // possibly add plottable to legend: if (mAutoAddPlottableToLegend) plottable->addToLegend(); if (!plottable->layer()) // usually the layer is already set in the constructor of the plottable (via QCPLayerable constructor) plottable->setLayer(currentLayer()); return true; } /*! \internal In order to maintain the simplified graph interface of QCustomPlot, this method is called by the QCPGraph constructor to register itself with this QCustomPlot's internal graph list. Returns true on success, i.e. if \a graph is valid and wasn't already registered with this QCustomPlot. This graph specific registration happens in addition to the call to \ref registerPlottable by the QCPAbstractPlottable base class. */ bool QCustomPlot::registerGraph(QCPGraph *graph) { if (!graph) { qDebug() << Q_FUNC_INFO << "passed graph is zero"; return false; } if (mGraphs.contains(graph)) { qDebug() << Q_FUNC_INFO << "graph already registered with this QCustomPlot"; return false; } mGraphs.append(graph); return true; } /*! \internal Registers the specified item with this QCustomPlot. QCustomPlot takes ownership of the item. Returns true on success, i.e. when \a item wasn't already in the plot and the parent plot of \a item is this QCustomPlot. This method is called automatically in the QCPAbstractItem base class constructor. */ bool QCustomPlot::registerItem(QCPAbstractItem *item) { if (mItems.contains(item)) { qDebug() << Q_FUNC_INFO << "item already added to this QCustomPlot:" << reinterpret_cast(item); return false; } if (item->parentPlot() != this) { qDebug() << Q_FUNC_INFO << "item not created with this QCustomPlot as parent:" << reinterpret_cast(item); return false; } mItems.append(item); if (!item->layer()) // usually the layer is already set in the constructor of the item (via QCPLayerable constructor) item->setLayer(currentLayer()); return true; } /*! \internal Assigns all layers their index (QCPLayer::mIndex) in the mLayers list. This method is thus called after every operation that changes the layer indices, like layer removal, layer creation, layer moving. */ void QCustomPlot::updateLayerIndices() const { for (int i=0; imIndex = i; } /*! \internal Returns the top-most layerable at pixel position \a pos. If \a onlySelectable is set to true, only those layerables that are selectable will be considered. (Layerable subclasses communicate their selectability via the QCPLayerable::selectTest method, by returning -1.) \a selectionDetails is an output parameter that contains selection specifics of the affected layerable. This is useful if the respective layerable shall be given a subsequent QCPLayerable::selectEvent (like in \ref mouseReleaseEvent). \a selectionDetails usually contains information about which part of the layerable was hit, in multi-part layerables (e.g. QCPAxis::SelectablePart). If the layerable is a plottable, \a selectionDetails contains a \ref QCPDataSelection instance with the single data point which is closest to \a pos. \see layerableListAt, layoutElementAt, axisRectAt */ QCPLayerable *QCustomPlot::layerableAt(const QPointF &pos, bool onlySelectable, QVariant *selectionDetails) const { QList details; QList candidates = layerableListAt(pos, onlySelectable, selectionDetails ? &details : 0); if (selectionDetails && !details.isEmpty()) *selectionDetails = details.first(); if (!candidates.isEmpty()) return candidates.first(); else return 0; } /*! \internal Returns the layerables at pixel position \a pos. If \a onlySelectable is set to true, only those layerables that are selectable will be considered. (Layerable subclasses communicate their selectability via the QCPLayerable::selectTest method, by returning -1.) The returned list is sorted by the layerable/drawing order. If you only need to know the top-most layerable, rather use \ref layerableAt. \a selectionDetails is an output parameter that contains selection specifics of the affected layerable. This is useful if the respective layerable shall be given a subsequent QCPLayerable::selectEvent (like in \ref mouseReleaseEvent). \a selectionDetails usually contains information about which part of the layerable was hit, in multi-part layerables (e.g. QCPAxis::SelectablePart). If the layerable is a plottable, \a selectionDetails contains a \ref QCPDataSelection instance with the single data point which is closest to \a pos. \see layerableAt, layoutElementAt, axisRectAt */ QList QCustomPlot::layerableListAt(const QPointF &pos, bool onlySelectable, QList *selectionDetails) const { QList result; for (int layerIndex=mLayers.size()-1; layerIndex>=0; --layerIndex) { const QList layerables = mLayers.at(layerIndex)->children(); for (int i=layerables.size()-1; i>=0; --i) { if (!layerables.at(i)->realVisibility()) continue; QVariant details; double dist = layerables.at(i)->selectTest(pos, onlySelectable, selectionDetails ? &details : 0); if (dist >= 0 && dist < selectionTolerance()) { result.append(layerables.at(i)); if (selectionDetails) selectionDetails->append(details); } } } return result; } /*! Saves the plot to a rastered image file \a fileName in the image format \a format. The plot is sized to \a width and \a height in pixels and scaled with \a scale. (width 100 and scale 2.0 lead to a full resolution file with width 200.) If the \a format supports compression, \a quality may be between 0 and 100 to control it. Returns true on success. If this function fails, most likely the given \a format isn't supported by the system, see Qt docs about QImageWriter::supportedImageFormats(). The \a resolution will be written to the image file header (if the file format supports this) and has no direct consequence for the quality or the pixel size. However, if opening the image with a tool which respects the metadata, it will be able to scale the image to match either a given size in real units of length (inch, centimeters, etc.), or the target display DPI. You can specify in which units \a resolution is given, by setting \a resolutionUnit. The \a resolution is converted to the format's expected resolution unit internally. \see saveBmp, saveJpg, savePng, savePdf */ bool QCustomPlot::saveRastered(const QString &fileName, int width, int height, double scale, const char *format, int quality, int resolution, QCP::ResolutionUnit resolutionUnit) { QImage buffer = toPixmap(width, height, scale).toImage(); int dotsPerMeter = 0; switch (resolutionUnit) { case QCP::ruDotsPerMeter: dotsPerMeter = resolution; break; case QCP::ruDotsPerCentimeter: dotsPerMeter = resolution*100; break; case QCP::ruDotsPerInch: dotsPerMeter = resolution/0.0254; break; } buffer.setDotsPerMeterX(dotsPerMeter); // this is saved together with some image formats, e.g. PNG, and is relevant when opening image in other tools buffer.setDotsPerMeterY(dotsPerMeter); // this is saved together with some image formats, e.g. PNG, and is relevant when opening image in other tools if (!buffer.isNull()) return buffer.save(fileName, format, quality); else return false; } /*! Renders the plot to a pixmap and returns it. The plot is sized to \a width and \a height in pixels and scaled with \a scale. (width 100 and scale 2.0 lead to a full resolution pixmap with width 200.) \see toPainter, saveRastered, saveBmp, savePng, saveJpg, savePdf */ QPixmap QCustomPlot::toPixmap(int width, int height, double scale) { // this method is somewhat similar to toPainter. Change something here, and a change in toPainter might be necessary, too. int newWidth, newHeight; if (width == 0 || height == 0) { newWidth = this->width(); newHeight = this->height(); } else { newWidth = width; newHeight = height; } int scaledWidth = qRound(scale*newWidth); int scaledHeight = qRound(scale*newHeight); QPixmap result(scaledWidth, scaledHeight); result.fill(mBackgroundBrush.style() == Qt::SolidPattern ? mBackgroundBrush.color() : Qt::transparent); // if using non-solid pattern, make transparent now and draw brush pattern later QCPPainter painter; painter.begin(&result); if (painter.isActive()) { QRect oldViewport = viewport(); setViewport(QRect(0, 0, newWidth, newHeight)); painter.setMode(QCPPainter::pmNoCaching); if (!qFuzzyCompare(scale, 1.0)) { if (scale > 1.0) // for scale < 1 we always want cosmetic pens where possible, because else lines might disappear for very small scales painter.setMode(QCPPainter::pmNonCosmetic); painter.scale(scale, scale); } if (mBackgroundBrush.style() != Qt::SolidPattern && mBackgroundBrush.style() != Qt::NoBrush) // solid fills were done a few lines above with QPixmap::fill painter.fillRect(mViewport, mBackgroundBrush); draw(&painter); setViewport(oldViewport); painter.end(); } else // might happen if pixmap has width or height zero { qDebug() << Q_FUNC_INFO << "Couldn't activate painter on pixmap"; return QPixmap(); } return result; } /*! Renders the plot using the passed \a painter. The plot is sized to \a width and \a height in pixels. If the \a painter's scale is not 1.0, the resulting plot will appear scaled accordingly. \note If you are restricted to using a QPainter (instead of QCPPainter), create a temporary QPicture and open a QCPPainter on it. Then call \ref toPainter with this QCPPainter. After ending the paint operation on the picture, draw it with the QPainter. This will reproduce the painter actions the QCPPainter took, with a QPainter. \see toPixmap */ void QCustomPlot::toPainter(QCPPainter *painter, int width, int height) { // this method is somewhat similar to toPixmap. Change something here, and a change in toPixmap might be necessary, too. int newWidth, newHeight; if (width == 0 || height == 0) { newWidth = this->width(); newHeight = this->height(); } else { newWidth = width; newHeight = height; } if (painter->isActive()) { QRect oldViewport = viewport(); setViewport(QRect(0, 0, newWidth, newHeight)); painter->setMode(QCPPainter::pmNoCaching); if (mBackgroundBrush.style() != Qt::NoBrush) // unlike in toPixmap, we can't do QPixmap::fill for Qt::SolidPattern brush style, so we also draw solid fills with fillRect here painter->fillRect(mViewport, mBackgroundBrush); draw(painter); setViewport(oldViewport); } else qDebug() << Q_FUNC_INFO << "Passed painter is not active"; } /* end of 'src/core.cpp' */ //amalgamation: add plottable1d.cpp /* including file 'src/colorgradient.cpp', size 24646 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPColorGradient //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPColorGradient \brief Defines a color gradient for use with e.g. \ref QCPColorMap This class describes a color gradient which can be used to encode data with color. For example, QCPColorMap and QCPColorScale have \ref QCPColorMap::setGradient "setGradient" methods which take an instance of this class. Colors are set with \ref setColorStopAt(double position, const QColor &color) with a \a position from 0 to 1. In between these defined color positions, the color will be interpolated linearly either in RGB or HSV space, see \ref setColorInterpolation. Alternatively, load one of the preset color gradients shown in the image below, with \ref loadPreset, or by directly specifying the preset in the constructor. Apart from red, green and blue components, the gradient also interpolates the alpha values of the configured color stops. This allows to display some portions of the data range as transparent in the plot. \image html QCPColorGradient.png The \ref QCPColorGradient(GradientPreset preset) constructor allows directly converting a \ref GradientPreset to a QCPColorGradient. This means that you can directly pass \ref GradientPreset to all the \a setGradient methods, e.g.: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpcolorgradient-setgradient The total number of levels used in the gradient can be set with \ref setLevelCount. Whether the color gradient shall be applied periodically (wrapping around) to data values that lie outside the data range specified on the plottable instance can be controlled with \ref setPeriodic. */ /*! Constructs a new, empty QCPColorGradient with no predefined color stops. You can add own color stops with \ref setColorStopAt. The color level count is initialized to 350. */ QCPColorGradient::QCPColorGradient() : mLevelCount(350), mColorInterpolation(ciRGB), mPeriodic(false), mColorBufferInvalidated(true) { mColorBuffer.fill(qRgb(0, 0, 0), mLevelCount); } /*! Constructs a new QCPColorGradient initialized with the colors and color interpolation according to \a preset. The color level count is initialized to 350. */ QCPColorGradient::QCPColorGradient(GradientPreset preset) : mLevelCount(350), mColorInterpolation(ciRGB), mPeriodic(false), mColorBufferInvalidated(true) { mColorBuffer.fill(qRgb(0, 0, 0), mLevelCount); loadPreset(preset); } /* undocumented operator */ bool QCPColorGradient::operator==(const QCPColorGradient &other) const { return ((other.mLevelCount == this->mLevelCount) && (other.mColorInterpolation == this->mColorInterpolation) && (other.mPeriodic == this->mPeriodic) && (other.mColorStops == this->mColorStops)); } /*! Sets the number of discretization levels of the color gradient to \a n. The default is 350 which is typically enough to create a smooth appearance. The minimum number of levels is 2. \image html QCPColorGradient-levelcount.png */ void QCPColorGradient::setLevelCount(int n) { if (n < 2) { qDebug() << Q_FUNC_INFO << "n must be greater or equal 2 but was" << n; n = 2; } if (n != mLevelCount) { mLevelCount = n; mColorBufferInvalidated = true; } } /*! Sets at which positions from 0 to 1 which color shall occur. The positions are the keys, the colors are the values of the passed QMap \a colorStops. In between these color stops, the color is interpolated according to \ref setColorInterpolation. A more convenient way to create a custom gradient may be to clear all color stops with \ref clearColorStops (or creating a new, empty QCPColorGradient) and then adding them one by one with \ref setColorStopAt. \see clearColorStops */ void QCPColorGradient::setColorStops(const QMap &colorStops) { mColorStops = colorStops; mColorBufferInvalidated = true; } /*! Sets the \a color the gradient will have at the specified \a position (from 0 to 1). In between these color stops, the color is interpolated according to \ref setColorInterpolation. \see setColorStops, clearColorStops */ void QCPColorGradient::setColorStopAt(double position, const QColor &color) { mColorStops.insert(position, color); mColorBufferInvalidated = true; } /*! Sets whether the colors in between the configured color stops (see \ref setColorStopAt) shall be interpolated linearly in RGB or in HSV color space. For example, a sweep in RGB space from red to green will have a muddy brown intermediate color, whereas in HSV space the intermediate color is yellow. */ void QCPColorGradient::setColorInterpolation(QCPColorGradient::ColorInterpolation interpolation) { if (interpolation != mColorInterpolation) { mColorInterpolation = interpolation; mColorBufferInvalidated = true; } } /*! Sets whether data points that are outside the configured data range (e.g. \ref QCPColorMap::setDataRange) are colored by periodically repeating the color gradient or whether they all have the same color, corresponding to the respective gradient boundary color. \image html QCPColorGradient-periodic.png As shown in the image above, gradients that have the same start and end color are especially suitable for a periodic gradient mapping, since they produce smooth color transitions throughout the color map. A preset that has this property is \ref gpHues. In practice, using periodic color gradients makes sense when the data corresponds to a periodic dimension, such as an angle or a phase. If this is not the case, the color encoding might become ambiguous, because multiple different data values are shown as the same color. */ void QCPColorGradient::setPeriodic(bool enabled) { mPeriodic = enabled; } /*! \overload This method is used to quickly convert a \a data array to colors. The colors will be output in the array \a scanLine. Both \a data and \a scanLine must have the length \a n when passed to this function. The data range that shall be used for mapping the data value to the gradient is passed in \a range. \a logarithmic indicates whether the data values shall be mapped to colors logarithmically. if \a data actually contains 2D-data linearized via [row*columnCount + column], you can set \a dataIndexFactor to columnCount to convert a column instead of a row of the data array, in \a scanLine. \a scanLine will remain a regular (1D) array. This works because \a data is addressed data[i*dataIndexFactor]. Use the overloaded method to additionally provide alpha map data. The QRgb values that are placed in \a scanLine have their r, g and b components premultiplied with alpha (see QImage::Format_ARGB32_Premultiplied). */ void QCPColorGradient::colorize(const double *data, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor, bool logarithmic) { // If you change something here, make sure to also adapt color() and the other colorize() overload if (!data) { qDebug() << Q_FUNC_INFO << "null pointer given as data"; return; } if (!scanLine) { qDebug() << Q_FUNC_INFO << "null pointer given as scanLine"; return; } if (mColorBufferInvalidated) updateColorBuffer(); if (!logarithmic) { const double posToIndexFactor = (mLevelCount-1)/range.size(); if (mPeriodic) { for (int i=0; i= mLevelCount) index = mLevelCount-1; scanLine[i] = mColorBuffer.at(index); } } } else // logarithmic == true { if (mPeriodic) { for (int i=0; i= mLevelCount) index = mLevelCount-1; scanLine[i] = mColorBuffer.at(index); } } } } /*! \overload Additionally to the other overload of \ref colorize, this method takes the array \a alpha, which has the same size and structure as \a data and encodes the alpha information per data point. The QRgb values that are placed in \a scanLine have their r, g and b components premultiplied with alpha (see QImage::Format_ARGB32_Premultiplied). */ void QCPColorGradient::colorize(const double *data, const unsigned char *alpha, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor, bool logarithmic) { // If you change something here, make sure to also adapt color() and the other colorize() overload if (!data) { qDebug() << Q_FUNC_INFO << "null pointer given as data"; return; } if (!alpha) { qDebug() << Q_FUNC_INFO << "null pointer given as alpha"; return; } if (!scanLine) { qDebug() << Q_FUNC_INFO << "null pointer given as scanLine"; return; } if (mColorBufferInvalidated) updateColorBuffer(); if (!logarithmic) { const double posToIndexFactor = (mLevelCount-1)/range.size(); if (mPeriodic) { for (int i=0; i= mLevelCount) index = mLevelCount-1; if (alpha[dataIndexFactor*i] == 255) { scanLine[i] = mColorBuffer.at(index); } else { const QRgb rgb = mColorBuffer.at(index); const float alphaF = alpha[dataIndexFactor*i]/255.0f; scanLine[i] = qRgba(qRed(rgb)*alphaF, qGreen(rgb)*alphaF, qBlue(rgb)*alphaF, qAlpha(rgb)*alphaF); } } } } else // logarithmic == true { if (mPeriodic) { for (int i=0; i= mLevelCount) index = mLevelCount-1; if (alpha[dataIndexFactor*i] == 255) { scanLine[i] = mColorBuffer.at(index); } else { const QRgb rgb = mColorBuffer.at(index); const float alphaF = alpha[dataIndexFactor*i]/255.0f; scanLine[i] = qRgba(qRed(rgb)*alphaF, qGreen(rgb)*alphaF, qBlue(rgb)*alphaF, qAlpha(rgb)*alphaF); } } } } } /*! \internal This method is used to colorize a single data value given in \a position, to colors. The data range that shall be used for mapping the data value to the gradient is passed in \a range. \a logarithmic indicates whether the data value shall be mapped to a color logarithmically. If an entire array of data values shall be converted, rather use \ref colorize, for better performance. The returned QRgb has its r, g and b components premultiplied with alpha (see QImage::Format_ARGB32_Premultiplied). */ QRgb QCPColorGradient::color(double position, const QCPRange &range, bool logarithmic) { // If you change something here, make sure to also adapt ::colorize() if (mColorBufferInvalidated) updateColorBuffer(); int index = 0; if (!logarithmic) index = (position-range.lower)*(mLevelCount-1)/range.size(); else index = qLn(position/range.lower)/qLn(range.upper/range.lower)*(mLevelCount-1); if (mPeriodic) { index = index % mLevelCount; if (index < 0) index += mLevelCount; } else { if (index < 0) index = 0; else if (index >= mLevelCount) index = mLevelCount-1; } return mColorBuffer.at(index); } /*! Clears the current color stops and loads the specified \a preset. A preset consists of predefined color stops and the corresponding color interpolation method. The available presets are: \image html QCPColorGradient.png */ void QCPColorGradient::loadPreset(GradientPreset preset) { clearColorStops(); switch (preset) { case gpGrayscale: setColorInterpolation(ciRGB); setColorStopAt(0, Qt::black); setColorStopAt(1, Qt::white); break; case gpHot: setColorInterpolation(ciRGB); setColorStopAt(0, QColor(50, 0, 0)); setColorStopAt(0.2, QColor(180, 10, 0)); setColorStopAt(0.4, QColor(245, 50, 0)); setColorStopAt(0.6, QColor(255, 150, 10)); setColorStopAt(0.8, QColor(255, 255, 50)); setColorStopAt(1, QColor(255, 255, 255)); break; case gpCold: setColorInterpolation(ciRGB); setColorStopAt(0, QColor(0, 0, 50)); setColorStopAt(0.2, QColor(0, 10, 180)); setColorStopAt(0.4, QColor(0, 50, 245)); setColorStopAt(0.6, QColor(10, 150, 255)); setColorStopAt(0.8, QColor(50, 255, 255)); setColorStopAt(1, QColor(255, 255, 255)); break; case gpNight: setColorInterpolation(ciHSV); setColorStopAt(0, QColor(10, 20, 30)); setColorStopAt(1, QColor(250, 255, 250)); break; case gpCandy: setColorInterpolation(ciHSV); setColorStopAt(0, QColor(0, 0, 255)); setColorStopAt(1, QColor(255, 250, 250)); break; case gpGeography: setColorInterpolation(ciRGB); setColorStopAt(0, QColor(70, 170, 210)); setColorStopAt(0.20, QColor(90, 160, 180)); setColorStopAt(0.25, QColor(45, 130, 175)); setColorStopAt(0.30, QColor(100, 140, 125)); setColorStopAt(0.5, QColor(100, 140, 100)); setColorStopAt(0.6, QColor(130, 145, 120)); setColorStopAt(0.7, QColor(140, 130, 120)); setColorStopAt(0.9, QColor(180, 190, 190)); setColorStopAt(1, QColor(210, 210, 230)); break; case gpIon: setColorInterpolation(ciHSV); setColorStopAt(0, QColor(50, 10, 10)); setColorStopAt(0.45, QColor(0, 0, 255)); setColorStopAt(0.8, QColor(0, 255, 255)); setColorStopAt(1, QColor(0, 255, 0)); break; case gpThermal: setColorInterpolation(ciRGB); setColorStopAt(0, QColor(0, 0, 50)); setColorStopAt(0.15, QColor(20, 0, 120)); setColorStopAt(0.33, QColor(200, 30, 140)); setColorStopAt(0.6, QColor(255, 100, 0)); setColorStopAt(0.85, QColor(255, 255, 40)); setColorStopAt(1, QColor(255, 255, 255)); break; case gpPolar: setColorInterpolation(ciRGB); setColorStopAt(0, QColor(50, 255, 255)); setColorStopAt(0.18, QColor(10, 70, 255)); setColorStopAt(0.28, QColor(10, 10, 190)); setColorStopAt(0.5, QColor(0, 0, 0)); setColorStopAt(0.72, QColor(190, 10, 10)); setColorStopAt(0.82, QColor(255, 70, 10)); setColorStopAt(1, QColor(255, 255, 50)); break; case gpSpectrum: setColorInterpolation(ciHSV); setColorStopAt(0, QColor(50, 0, 50)); setColorStopAt(0.15, QColor(0, 0, 255)); setColorStopAt(0.35, QColor(0, 255, 255)); setColorStopAt(0.6, QColor(255, 255, 0)); setColorStopAt(0.75, QColor(255, 30, 0)); setColorStopAt(1, QColor(50, 0, 0)); break; case gpJet: setColorInterpolation(ciRGB); setColorStopAt(0, QColor(0, 0, 100)); setColorStopAt(0.15, QColor(0, 50, 255)); setColorStopAt(0.35, QColor(0, 255, 255)); setColorStopAt(0.65, QColor(255, 255, 0)); setColorStopAt(0.85, QColor(255, 30, 0)); setColorStopAt(1, QColor(100, 0, 0)); break; case gpHues: setColorInterpolation(ciHSV); setColorStopAt(0, QColor(255, 0, 0)); setColorStopAt(1.0/3.0, QColor(0, 0, 255)); setColorStopAt(2.0/3.0, QColor(0, 255, 0)); setColorStopAt(1, QColor(255, 0, 0)); break; } } /*! Clears all color stops. \see setColorStops, setColorStopAt */ void QCPColorGradient::clearColorStops() { mColorStops.clear(); mColorBufferInvalidated = true; } /*! Returns an inverted gradient. The inverted gradient has all properties as this \ref QCPColorGradient, but the order of the color stops is inverted. \see setColorStops, setColorStopAt */ QCPColorGradient QCPColorGradient::inverted() const { QCPColorGradient result(*this); result.clearColorStops(); for (QMap::const_iterator it=mColorStops.constBegin(); it!=mColorStops.constEnd(); ++it) result.setColorStopAt(1.0-it.key(), it.value()); return result; } /*! \internal Returns true if the color gradient uses transparency, i.e. if any of the configured color stops has an alpha value below 255. */ bool QCPColorGradient::stopsUseAlpha() const { for (QMap::const_iterator it=mColorStops.constBegin(); it!=mColorStops.constEnd(); ++it) { if (it.value().alpha() < 255) return true; } return false; } /*! \internal Updates the internal color buffer which will be used by \ref colorize and \ref color, to quickly convert positions to colors. This is where the interpolation between color stops is calculated. */ void QCPColorGradient::updateColorBuffer() { if (mColorBuffer.size() != mLevelCount) mColorBuffer.resize(mLevelCount); if (mColorStops.size() > 1) { double indexToPosFactor = 1.0/(double)(mLevelCount-1); const bool useAlpha = stopsUseAlpha(); for (int i=0; i::const_iterator it = mColorStops.lowerBound(position); if (it == mColorStops.constEnd()) // position is on or after last stop, use color of last stop { mColorBuffer[i] = (it-1).value().rgba(); } else if (it == mColorStops.constBegin()) // position is on or before first stop, use color of first stop { mColorBuffer[i] = it.value().rgba(); } else // position is in between stops (or on an intermediate stop), interpolate color { QMap::const_iterator high = it; QMap::const_iterator low = it-1; double t = (position-low.key())/(high.key()-low.key()); // interpolation factor 0..1 switch (mColorInterpolation) { case ciRGB: { if (useAlpha) { const int alpha = (1-t)*low.value().alpha() + t*high.value().alpha(); const float alphaPremultiplier = alpha/255.0f; // since we use QImage::Format_ARGB32_Premultiplied mColorBuffer[i] = qRgba(((1-t)*low.value().red() + t*high.value().red())*alphaPremultiplier, ((1-t)*low.value().green() + t*high.value().green())*alphaPremultiplier, ((1-t)*low.value().blue() + t*high.value().blue())*alphaPremultiplier, alpha); } else { mColorBuffer[i] = qRgb(((1-t)*low.value().red() + t*high.value().red()), ((1-t)*low.value().green() + t*high.value().green()), ((1-t)*low.value().blue() + t*high.value().blue())); } break; } case ciHSV: { QColor lowHsv = low.value().toHsv(); QColor highHsv = high.value().toHsv(); double hue = 0; double hueDiff = highHsv.hueF()-lowHsv.hueF(); if (hueDiff > 0.5) hue = lowHsv.hueF() - t*(1.0-hueDiff); else if (hueDiff < -0.5) hue = lowHsv.hueF() + t*(1.0+hueDiff); else hue = lowHsv.hueF() + t*hueDiff; if (hue < 0) hue += 1.0; else if (hue >= 1.0) hue -= 1.0; if (useAlpha) { const QRgb rgb = QColor::fromHsvF(hue, (1-t)*lowHsv.saturationF() + t*highHsv.saturationF(), (1-t)*lowHsv.valueF() + t*highHsv.valueF()).rgb(); const float alpha = (1-t)*lowHsv.alphaF() + t*highHsv.alphaF(); mColorBuffer[i] = qRgba(qRed(rgb)*alpha, qGreen(rgb)*alpha, qBlue(rgb)*alpha, 255*alpha); } else { mColorBuffer[i] = QColor::fromHsvF(hue, (1-t)*lowHsv.saturationF() + t*highHsv.saturationF(), (1-t)*lowHsv.valueF() + t*highHsv.valueF()).rgb(); } break; } } } } } else if (mColorStops.size() == 1) { const QRgb rgb = mColorStops.constBegin().value().rgb(); const float alpha = mColorStops.constBegin().value().alphaF(); mColorBuffer.fill(qRgba(qRed(rgb)*alpha, qGreen(rgb)*alpha, qBlue(rgb)*alpha, 255*alpha)); } else // mColorStops is empty, fill color buffer with black { mColorBuffer.fill(qRgb(0, 0, 0)); } mColorBufferInvalidated = false; } /* end of 'src/colorgradient.cpp' */ /* including file 'src/selectiondecorator-bracket.cpp', size 12313 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPSelectionDecoratorBracket //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPSelectionDecoratorBracket \brief A selection decorator which draws brackets around each selected data segment Additionally to the regular highlighting of selected segments via color, fill and scatter style, this \ref QCPSelectionDecorator subclass draws markers at the begin and end of each selected data segment of the plottable. The shape of the markers can be controlled with \ref setBracketStyle, \ref setBracketWidth and \ref setBracketHeight. The color/fill can be controlled with \ref setBracketPen and \ref setBracketBrush. To introduce custom bracket styles, it is only necessary to sublcass \ref QCPSelectionDecoratorBracket and reimplement \ref drawBracket. The rest will be managed by the base class. */ /*! Creates a new QCPSelectionDecoratorBracket instance with default values. */ QCPSelectionDecoratorBracket::QCPSelectionDecoratorBracket() : mBracketPen(QPen(Qt::black)), mBracketBrush(Qt::NoBrush), mBracketWidth(5), mBracketHeight(50), mBracketStyle(bsSquareBracket), mTangentToData(false), mTangentAverage(2) { } QCPSelectionDecoratorBracket::~QCPSelectionDecoratorBracket() { } /*! Sets the pen that will be used to draw the brackets at the beginning and end of each selected data segment. */ void QCPSelectionDecoratorBracket::setBracketPen(const QPen &pen) { mBracketPen = pen; } /*! Sets the brush that will be used to draw the brackets at the beginning and end of each selected data segment. */ void QCPSelectionDecoratorBracket::setBracketBrush(const QBrush &brush) { mBracketBrush = brush; } /*! Sets the width of the drawn bracket. The width dimension is always parallel to the key axis of the data, or the tangent direction of the current data slope, if \ref setTangentToData is enabled. */ void QCPSelectionDecoratorBracket::setBracketWidth(int width) { mBracketWidth = width; } /*! Sets the height of the drawn bracket. The height dimension is always perpendicular to the key axis of the data, or the tangent direction of the current data slope, if \ref setTangentToData is enabled. */ void QCPSelectionDecoratorBracket::setBracketHeight(int height) { mBracketHeight = height; } /*! Sets the shape that the bracket/marker will have. \see setBracketWidth, setBracketHeight */ void QCPSelectionDecoratorBracket::setBracketStyle(QCPSelectionDecoratorBracket::BracketStyle style) { mBracketStyle = style; } /*! Sets whether the brackets will be rotated such that they align with the slope of the data at the position that they appear in. For noisy data, it might be more visually appealing to average the slope over multiple data points. This can be configured via \ref setTangentAverage. */ void QCPSelectionDecoratorBracket::setTangentToData(bool enabled) { mTangentToData = enabled; } /*! Controls over how many data points the slope shall be averaged, when brackets shall be aligned with the data (if \ref setTangentToData is true). From the position of the bracket, \a pointCount points towards the selected data range will be taken into account. The smallest value of \a pointCount is 1, which is effectively equivalent to disabling \ref setTangentToData. */ void QCPSelectionDecoratorBracket::setTangentAverage(int pointCount) { mTangentAverage = pointCount; if (mTangentAverage < 1) mTangentAverage = 1; } /*! Draws the bracket shape with \a painter. The parameter \a direction is either -1 or 1 and indicates whether the bracket shall point to the left or the right (i.e. is a closing or opening bracket, respectively). The passed \a painter already contains all transformations that are necessary to position and rotate the bracket appropriately. Painting operations can be performed as if drawing upright brackets on flat data with horizontal key axis, with (0, 0) being the center of the bracket. If you wish to sublcass \ref QCPSelectionDecoratorBracket in order to provide custom bracket shapes (see \ref QCPSelectionDecoratorBracket::bsUserStyle), this is the method you should reimplement. */ void QCPSelectionDecoratorBracket::drawBracket(QCPPainter *painter, int direction) const { switch (mBracketStyle) { case bsSquareBracket: { painter->drawLine(QLineF(mBracketWidth*direction, -mBracketHeight*0.5, 0, -mBracketHeight*0.5)); painter->drawLine(QLineF(mBracketWidth*direction, mBracketHeight*0.5, 0, mBracketHeight*0.5)); painter->drawLine(QLineF(0, -mBracketHeight*0.5, 0, mBracketHeight*0.5)); break; } case bsHalfEllipse: { painter->drawArc(-mBracketWidth*0.5, -mBracketHeight*0.5, mBracketWidth, mBracketHeight, -90*16, -180*16*direction); break; } case bsEllipse: { painter->drawEllipse(-mBracketWidth*0.5, -mBracketHeight*0.5, mBracketWidth, mBracketHeight); break; } case bsPlus: { painter->drawLine(QLineF(0, -mBracketHeight*0.5, 0, mBracketHeight*0.5)); painter->drawLine(QLineF(-mBracketWidth*0.5, 0, mBracketWidth*0.5, 0)); break; } default: { qDebug() << Q_FUNC_INFO << "unknown/custom bracket style can't be handeld by default implementation:" << static_cast(mBracketStyle); break; } } } /*! Draws the bracket decoration on the data points at the begin and end of each selected data segment given in \a seletion. It uses the method \ref drawBracket to actually draw the shapes. \seebaseclassmethod */ void QCPSelectionDecoratorBracket::drawDecoration(QCPPainter *painter, QCPDataSelection selection) { if (!mPlottable || selection.isEmpty()) return; if (QCPPlottableInterface1D *interface1d = mPlottable->interface1D()) { foreach (const QCPDataRange &dataRange, selection.dataRanges()) { // determine position and (if tangent mode is enabled) angle of brackets: int openBracketDir = (mPlottable->keyAxis() && !mPlottable->keyAxis()->rangeReversed()) ? 1 : -1; int closeBracketDir = -openBracketDir; QPointF openBracketPos = getPixelCoordinates(interface1d, dataRange.begin()); QPointF closeBracketPos = getPixelCoordinates(interface1d, dataRange.end()-1); double openBracketAngle = 0; double closeBracketAngle = 0; if (mTangentToData) { openBracketAngle = getTangentAngle(interface1d, dataRange.begin(), openBracketDir); closeBracketAngle = getTangentAngle(interface1d, dataRange.end()-1, closeBracketDir); } // draw opening bracket: QTransform oldTransform = painter->transform(); painter->setPen(mBracketPen); painter->setBrush(mBracketBrush); painter->translate(openBracketPos); painter->rotate(openBracketAngle/M_PI*180.0); drawBracket(painter, openBracketDir); painter->setTransform(oldTransform); // draw closing bracket: painter->setPen(mBracketPen); painter->setBrush(mBracketBrush); painter->translate(closeBracketPos); painter->rotate(closeBracketAngle/M_PI*180.0); drawBracket(painter, closeBracketDir); painter->setTransform(oldTransform); } } } /*! \internal If \ref setTangentToData is enabled, brackets need to be rotated according to the data slope. This method returns the angle in radians by which a bracket at the given \a dataIndex must be rotated. The parameter \a direction must be set to either -1 or 1, representing whether it is an opening or closing bracket. Since for slope calculation multiple data points are required, this defines the direction in which the algorithm walks, starting at \a dataIndex, to average those data points. (see \ref setTangentToData and \ref setTangentAverage) \a interface1d is the interface to the plottable's data which is used to query data coordinates. */ double QCPSelectionDecoratorBracket::getTangentAngle(const QCPPlottableInterface1D *interface1d, int dataIndex, int direction) const { if (!interface1d || dataIndex < 0 || dataIndex >= interface1d->dataCount()) return 0; direction = direction < 0 ? -1 : 1; // enforce direction is either -1 or 1 // how many steps we can actually go from index in the given direction without exceeding data bounds: int averageCount; if (direction < 0) averageCount = qMin(mTangentAverage, dataIndex); else averageCount = qMin(mTangentAverage, interface1d->dataCount()-1-dataIndex); qDebug() << averageCount; // calculate point average of averageCount points: QVector points(averageCount); QPointF pointsAverage; int currentIndex = dataIndex; for (int i=0; ikeyAxis(); QCPAxis *valueAxis = mPlottable->valueAxis(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return QPointF(0, 0); } if (keyAxis->orientation() == Qt::Horizontal) return QPointF(keyAxis->coordToPixel(interface1d->dataMainKey(dataIndex)), valueAxis->coordToPixel(interface1d->dataMainValue(dataIndex))); else return QPointF(valueAxis->coordToPixel(interface1d->dataMainValue(dataIndex)), keyAxis->coordToPixel(interface1d->dataMainKey(dataIndex))); } /* end of 'src/selectiondecorator-bracket.cpp' */ /* including file 'src/layoutelements/layoutelement-axisrect.cpp', size 47584 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAxisRect //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAxisRect \brief Holds multiple axes and arranges them in a rectangular shape. This class represents an axis rect, a rectangular area that is bounded on all sides with an arbitrary number of axes. Initially QCustomPlot has one axis rect, accessible via QCustomPlot::axisRect(). However, the layout system allows to have multiple axis rects, e.g. arranged in a grid layout (QCustomPlot::plotLayout). By default, QCPAxisRect comes with four axes, at bottom, top, left and right. They can be accessed via \ref axis by providing the respective axis type (\ref QCPAxis::AxisType) and index. If you need all axes in the axis rect, use \ref axes. The top and right axes are set to be invisible initially (QCPAxis::setVisible). To add more axes to a side, use \ref addAxis or \ref addAxes. To remove an axis, use \ref removeAxis. The axis rect layerable itself only draws a background pixmap or color, if specified (\ref setBackground). It is placed on the "background" layer initially (see \ref QCPLayer for an explanation of the QCustomPlot layer system). The axes that are held by the axis rect can be placed on other layers, independently of the axis rect. Every axis rect has a child layout of type \ref QCPLayoutInset. It is accessible via \ref insetLayout and can be used to have other layout elements (or even other layouts with multiple elements) hovering inside the axis rect. If an axis rect is clicked and dragged, it processes this by moving certain axis ranges. The behaviour can be controlled with \ref setRangeDrag and \ref setRangeDragAxes. If the mouse wheel is scrolled while the cursor is on the axis rect, certain axes are scaled. This is controllable via \ref setRangeZoom, \ref setRangeZoomAxes and \ref setRangeZoomFactor. These interactions are only enabled if \ref QCustomPlot::setInteractions contains \ref QCP::iRangeDrag and \ref QCP::iRangeZoom. \image html AxisRectSpacingOverview.png
Overview of the spacings and paddings that define the geometry of an axis. The dashed line on the far left indicates the viewport/widget border.
*/ /* start documentation of inline functions */ /*! \fn QCPLayoutInset *QCPAxisRect::insetLayout() const Returns the inset layout of this axis rect. It can be used to place other layout elements (or even layouts with multiple other elements) inside/on top of an axis rect. \see QCPLayoutInset */ /*! \fn int QCPAxisRect::left() const Returns the pixel position of the left border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn int QCPAxisRect::right() const Returns the pixel position of the right border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn int QCPAxisRect::top() const Returns the pixel position of the top border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn int QCPAxisRect::bottom() const Returns the pixel position of the bottom border of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn int QCPAxisRect::width() const Returns the pixel width of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn int QCPAxisRect::height() const Returns the pixel height of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn QSize QCPAxisRect::size() const Returns the pixel size of this axis rect. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn QPoint QCPAxisRect::topLeft() const Returns the top left corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn QPoint QCPAxisRect::topRight() const Returns the top right corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn QPoint QCPAxisRect::bottomLeft() const Returns the bottom left corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn QPoint QCPAxisRect::bottomRight() const Returns the bottom right corner of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /*! \fn QPoint QCPAxisRect::center() const Returns the center of this axis rect in pixels. Margins are not taken into account here, so the returned value is with respect to the inner \ref rect. */ /* end documentation of inline functions */ /*! Creates a QCPAxisRect instance and sets default values. An axis is added for each of the four sides, the top and right axes are set invisible initially. */ QCPAxisRect::QCPAxisRect(QCustomPlot *parentPlot, bool setupDefaultAxes) : QCPLayoutElement(parentPlot), mBackgroundBrush(Qt::NoBrush), mBackgroundScaled(true), mBackgroundScaledMode(Qt::KeepAspectRatioByExpanding), mInsetLayout(new QCPLayoutInset), mRangeDrag(Qt::Horizontal|Qt::Vertical), mRangeZoom(Qt::Horizontal|Qt::Vertical), mRangeZoomFactorHorz(0.85), mRangeZoomFactorVert(0.85), mDragging(false) { mInsetLayout->initializeParentPlot(mParentPlot); mInsetLayout->setParentLayerable(this); mInsetLayout->setParent(this); setMinimumSize(50, 50); setMinimumMargins(QMargins(15, 15, 15, 15)); mAxes.insert(QCPAxis::atLeft, QList()); mAxes.insert(QCPAxis::atRight, QList()); mAxes.insert(QCPAxis::atTop, QList()); mAxes.insert(QCPAxis::atBottom, QList()); if (setupDefaultAxes) { QCPAxis *xAxis = addAxis(QCPAxis::atBottom); QCPAxis *yAxis = addAxis(QCPAxis::atLeft); QCPAxis *xAxis2 = addAxis(QCPAxis::atTop); QCPAxis *yAxis2 = addAxis(QCPAxis::atRight); setRangeDragAxes(xAxis, yAxis); setRangeZoomAxes(xAxis, yAxis); xAxis2->setVisible(false); yAxis2->setVisible(false); xAxis->grid()->setVisible(true); yAxis->grid()->setVisible(true); xAxis2->grid()->setVisible(false); yAxis2->grid()->setVisible(false); xAxis2->grid()->setZeroLinePen(Qt::NoPen); yAxis2->grid()->setZeroLinePen(Qt::NoPen); xAxis2->grid()->setVisible(false); yAxis2->grid()->setVisible(false); } } QCPAxisRect::~QCPAxisRect() { delete mInsetLayout; mInsetLayout = 0; QList axesList = axes(); for (int i=0; i ax(mAxes.value(type)); if (index >= 0 && index < ax.size()) { return ax.at(index); } else { qDebug() << Q_FUNC_INFO << "Axis index out of bounds:" << index; return 0; } } /*! Returns all axes on the axis rect sides specified with \a types. \a types may be a single \ref QCPAxis::AxisType or an or-combination, to get the axes of multiple sides. \see axis */ QList QCPAxisRect::axes(QCPAxis::AxisTypes types) const { QList result; if (types.testFlag(QCPAxis::atLeft)) result << mAxes.value(QCPAxis::atLeft); if (types.testFlag(QCPAxis::atRight)) result << mAxes.value(QCPAxis::atRight); if (types.testFlag(QCPAxis::atTop)) result << mAxes.value(QCPAxis::atTop); if (types.testFlag(QCPAxis::atBottom)) result << mAxes.value(QCPAxis::atBottom); return result; } /*! \overload Returns all axes of this axis rect. */ QList QCPAxisRect::axes() const { QList result; QHashIterator > it(mAxes); while (it.hasNext()) { it.next(); result << it.value(); } return result; } /*! Adds a new axis to the axis rect side specified with \a type, and returns it. If \a axis is 0, a new QCPAxis instance is created internally. QCustomPlot owns the returned axis, so if you want to remove an axis, use \ref removeAxis instead of deleting it manually. You may inject QCPAxis instances (or subclasses of QCPAxis) by setting \a axis to an axis that was previously created outside QCustomPlot. It is important to note that QCustomPlot takes ownership of the axis, so you may not delete it afterwards. Further, the \a axis must have been created with this axis rect as parent and with the same axis type as specified in \a type. If this is not the case, a debug output is generated, the axis is not added, and the method returns 0. This method can not be used to move \a axis between axis rects. The same \a axis instance must not be added multiple times to the same or different axis rects. If an axis rect side already contains one or more axes, the lower and upper endings of the new axis (\ref QCPAxis::setLowerEnding, \ref QCPAxis::setUpperEnding) are set to \ref QCPLineEnding::esHalfBar. \see addAxes, setupFullAxesBox */ QCPAxis *QCPAxisRect::addAxis(QCPAxis::AxisType type, QCPAxis *axis) { QCPAxis *newAxis = axis; if (!newAxis) { newAxis = new QCPAxis(this, type); } else // user provided existing axis instance, do some sanity checks { if (newAxis->axisType() != type) { qDebug() << Q_FUNC_INFO << "passed axis has different axis type than specified in type parameter"; return 0; } if (newAxis->axisRect() != this) { qDebug() << Q_FUNC_INFO << "passed axis doesn't have this axis rect as parent axis rect"; return 0; } if (axes().contains(newAxis)) { qDebug() << Q_FUNC_INFO << "passed axis is already owned by this axis rect"; return 0; } } if (mAxes[type].size() > 0) // multiple axes on one side, add half-bar axis ending to additional axes with offset { bool invert = (type == QCPAxis::atRight) || (type == QCPAxis::atBottom); newAxis->setLowerEnding(QCPLineEnding(QCPLineEnding::esHalfBar, 6, 10, !invert)); newAxis->setUpperEnding(QCPLineEnding(QCPLineEnding::esHalfBar, 6, 10, invert)); } mAxes[type].append(newAxis); // reset convenience axis pointers on parent QCustomPlot if they are unset: if (mParentPlot && mParentPlot->axisRectCount() > 0 && mParentPlot->axisRect(0) == this) { switch (type) { case QCPAxis::atBottom: { if (!mParentPlot->xAxis) mParentPlot->xAxis = newAxis; break; } case QCPAxis::atLeft: { if (!mParentPlot->yAxis) mParentPlot->yAxis = newAxis; break; } case QCPAxis::atTop: { if (!mParentPlot->xAxis2) mParentPlot->xAxis2 = newAxis; break; } case QCPAxis::atRight: { if (!mParentPlot->yAxis2) mParentPlot->yAxis2 = newAxis; break; } } } return newAxis; } /*! Adds a new axis with \ref addAxis to each axis rect side specified in \a types. This may be an or-combination of QCPAxis::AxisType, so axes can be added to multiple sides at once. Returns a list of the added axes. \see addAxis, setupFullAxesBox */ QList QCPAxisRect::addAxes(QCPAxis::AxisTypes types) { QList result; if (types.testFlag(QCPAxis::atLeft)) result << addAxis(QCPAxis::atLeft); if (types.testFlag(QCPAxis::atRight)) result << addAxis(QCPAxis::atRight); if (types.testFlag(QCPAxis::atTop)) result << addAxis(QCPAxis::atTop); if (types.testFlag(QCPAxis::atBottom)) result << addAxis(QCPAxis::atBottom); return result; } /*! Removes the specified \a axis from the axis rect and deletes it. Returns true on success, i.e. if \a axis was a valid axis in this axis rect. \see addAxis */ bool QCPAxisRect::removeAxis(QCPAxis *axis) { // don't access axis->axisType() to provide safety when axis is an invalid pointer, rather go through all axis containers: QHashIterator > it(mAxes); while (it.hasNext()) { it.next(); if (it.value().contains(axis)) { if (it.value().first() == axis && it.value().size() > 1) // if removing first axis, transfer axis offset to the new first axis (which at this point is the second axis, if it exists) it.value()[1]->setOffset(axis->offset()); mAxes[it.key()].removeOne(axis); if (qobject_cast(parentPlot())) // make sure this isn't called from QObject dtor when QCustomPlot is already destructed (happens when the axis rect is not in any layout and thus QObject-child of QCustomPlot) parentPlot()->axisRemoved(axis); delete axis; return true; } } qDebug() << Q_FUNC_INFO << "Axis isn't in axis rect:" << reinterpret_cast(axis); return false; } /*! Zooms in (or out) to the passed rectangular region \a pixelRect, given in pixel coordinates. All axes of this axis rect will have their range zoomed accordingly. If you only wish to zoom specific axes, use the overloaded version of this method. \see QCustomPlot::setSelectionRectMode */ void QCPAxisRect::zoom(const QRectF &pixelRect) { zoom(pixelRect, axes()); } /*! \overload Zooms in (or out) to the passed rectangular region \a pixelRect, given in pixel coordinates. Only the axes passed in \a affectedAxes will have their ranges zoomed accordingly. \see QCustomPlot::setSelectionRectMode */ void QCPAxisRect::zoom(const QRectF &pixelRect, const QList &affectedAxes) { foreach (QCPAxis *axis, affectedAxes) { if (!axis) { qDebug() << Q_FUNC_INFO << "a passed axis was zero"; continue; } QCPRange pixelRange; if (axis->orientation() == Qt::Horizontal) pixelRange = QCPRange(pixelRect.left(), pixelRect.right()); else pixelRange = QCPRange(pixelRect.top(), pixelRect.bottom()); axis->setRange(axis->pixelToCoord(pixelRange.lower), axis->pixelToCoord(pixelRange.upper)); } } /*! Convenience function to create an axis on each side that doesn't have any axes yet and set their visibility to true. Further, the top/right axes are assigned the following properties of the bottom/left axes: \li range (\ref QCPAxis::setRange) \li range reversed (\ref QCPAxis::setRangeReversed) \li scale type (\ref QCPAxis::setScaleType) \li tick visibility (\ref QCPAxis::setTicks) \li number format (\ref QCPAxis::setNumberFormat) \li number precision (\ref QCPAxis::setNumberPrecision) \li tick count of ticker (\ref QCPAxisTicker::setTickCount) \li tick origin of ticker (\ref QCPAxisTicker::setTickOrigin) Tick label visibility (\ref QCPAxis::setTickLabels) of the right and top axes are set to false. If \a connectRanges is true, the \ref QCPAxis::rangeChanged "rangeChanged" signals of the bottom and left axes are connected to the \ref QCPAxis::setRange slots of the top and right axes. */ void QCPAxisRect::setupFullAxesBox(bool connectRanges) { QCPAxis *xAxis, *yAxis, *xAxis2, *yAxis2; if (axisCount(QCPAxis::atBottom) == 0) xAxis = addAxis(QCPAxis::atBottom); else xAxis = axis(QCPAxis::atBottom); if (axisCount(QCPAxis::atLeft) == 0) yAxis = addAxis(QCPAxis::atLeft); else yAxis = axis(QCPAxis::atLeft); if (axisCount(QCPAxis::atTop) == 0) xAxis2 = addAxis(QCPAxis::atTop); else xAxis2 = axis(QCPAxis::atTop); if (axisCount(QCPAxis::atRight) == 0) yAxis2 = addAxis(QCPAxis::atRight); else yAxis2 = axis(QCPAxis::atRight); xAxis->setVisible(true); yAxis->setVisible(true); xAxis2->setVisible(true); yAxis2->setVisible(true); xAxis2->setTickLabels(false); yAxis2->setTickLabels(false); xAxis2->setRange(xAxis->range()); xAxis2->setRangeReversed(xAxis->rangeReversed()); xAxis2->setScaleType(xAxis->scaleType()); xAxis2->setTicks(xAxis->ticks()); xAxis2->setNumberFormat(xAxis->numberFormat()); xAxis2->setNumberPrecision(xAxis->numberPrecision()); xAxis2->ticker()->setTickCount(xAxis->ticker()->tickCount()); xAxis2->ticker()->setTickOrigin(xAxis->ticker()->tickOrigin()); yAxis2->setRange(yAxis->range()); yAxis2->setRangeReversed(yAxis->rangeReversed()); yAxis2->setScaleType(yAxis->scaleType()); yAxis2->setTicks(yAxis->ticks()); yAxis2->setNumberFormat(yAxis->numberFormat()); yAxis2->setNumberPrecision(yAxis->numberPrecision()); yAxis2->ticker()->setTickCount(yAxis->ticker()->tickCount()); yAxis2->ticker()->setTickOrigin(yAxis->ticker()->tickOrigin()); if (connectRanges) { connect(xAxis, SIGNAL(rangeChanged(QCPRange)), xAxis2, SLOT(setRange(QCPRange))); connect(yAxis, SIGNAL(rangeChanged(QCPRange)), yAxis2, SLOT(setRange(QCPRange))); } } /*! Returns a list of all the plottables that are associated with this axis rect. A plottable is considered associated with an axis rect if its key or value axis (or both) is in this axis rect. \see graphs, items */ QList QCPAxisRect::plottables() const { // Note: don't append all QCPAxis::plottables() into a list, because we might get duplicate entries QList result; for (int i=0; imPlottables.size(); ++i) { if (mParentPlot->mPlottables.at(i)->keyAxis()->axisRect() == this || mParentPlot->mPlottables.at(i)->valueAxis()->axisRect() == this) result.append(mParentPlot->mPlottables.at(i)); } return result; } /*! Returns a list of all the graphs that are associated with this axis rect. A graph is considered associated with an axis rect if its key or value axis (or both) is in this axis rect. \see plottables, items */ QList QCPAxisRect::graphs() const { // Note: don't append all QCPAxis::graphs() into a list, because we might get duplicate entries QList result; for (int i=0; imGraphs.size(); ++i) { if (mParentPlot->mGraphs.at(i)->keyAxis()->axisRect() == this || mParentPlot->mGraphs.at(i)->valueAxis()->axisRect() == this) result.append(mParentPlot->mGraphs.at(i)); } return result; } /*! Returns a list of all the items that are associated with this axis rect. An item is considered associated with an axis rect if any of its positions has key or value axis set to an axis that is in this axis rect, or if any of its positions has \ref QCPItemPosition::setAxisRect set to the axis rect, or if the clip axis rect (\ref QCPAbstractItem::setClipAxisRect) is set to this axis rect. \see plottables, graphs */ QList QCPAxisRect::items() const { // Note: don't just append all QCPAxis::items() into a list, because we might get duplicate entries // and miss those items that have this axis rect as clipAxisRect. QList result; for (int itemId=0; itemIdmItems.size(); ++itemId) { if (mParentPlot->mItems.at(itemId)->clipAxisRect() == this) { result.append(mParentPlot->mItems.at(itemId)); continue; } QList positions = mParentPlot->mItems.at(itemId)->positions(); for (int posId=0; posIdaxisRect() == this || positions.at(posId)->keyAxis()->axisRect() == this || positions.at(posId)->valueAxis()->axisRect() == this) { result.append(mParentPlot->mItems.at(itemId)); break; } } } return result; } /*! This method is called automatically upon replot and doesn't need to be called by users of QCPAxisRect. Calls the base class implementation to update the margins (see \ref QCPLayoutElement::update), and finally passes the \ref rect to the inset layout (\ref insetLayout) and calls its QCPInsetLayout::update function. \seebaseclassmethod */ void QCPAxisRect::update(UpdatePhase phase) { QCPLayoutElement::update(phase); switch (phase) { case upPreparation: { QList allAxes = axes(); for (int i=0; isetupTickVectors(); break; } case upLayout: { mInsetLayout->setOuterRect(rect()); break; } default: break; } // pass update call on to inset layout (doesn't happen automatically, because QCPAxisRect doesn't derive from QCPLayout): mInsetLayout->update(phase); } /* inherits documentation from base class */ QList QCPAxisRect::elements(bool recursive) const { QList result; if (mInsetLayout) { result << mInsetLayout; if (recursive) result << mInsetLayout->elements(recursive); } return result; } /* inherits documentation from base class */ void QCPAxisRect::applyDefaultAntialiasingHint(QCPPainter *painter) const { painter->setAntialiasing(false); } /* inherits documentation from base class */ void QCPAxisRect::draw(QCPPainter *painter) { drawBackground(painter); } /*! Sets \a pm as the axis background pixmap. The axis background pixmap will be drawn inside the axis rect. Since axis rects place themselves on the "background" layer by default, the axis rect backgrounds are usually drawn below everything else. For cases where the provided pixmap doesn't have the same size as the axis rect, scaling can be enabled with \ref setBackgroundScaled and the scaling mode (i.e. whether and how the aspect ratio is preserved) can be set with \ref setBackgroundScaledMode. To set all these options in one call, consider using the overloaded version of this function. Below the pixmap, the axis rect may be optionally filled with a brush, if specified with \ref setBackground(const QBrush &brush). \see setBackgroundScaled, setBackgroundScaledMode, setBackground(const QBrush &brush) */ void QCPAxisRect::setBackground(const QPixmap &pm) { mBackgroundPixmap = pm; mScaledBackgroundPixmap = QPixmap(); } /*! \overload Sets \a brush as the background brush. The axis rect background will be filled with this brush. Since axis rects place themselves on the "background" layer by default, the axis rect backgrounds are usually drawn below everything else. The brush will be drawn before (under) any background pixmap, which may be specified with \ref setBackground(const QPixmap &pm). To disable drawing of a background brush, set \a brush to Qt::NoBrush. \see setBackground(const QPixmap &pm) */ void QCPAxisRect::setBackground(const QBrush &brush) { mBackgroundBrush = brush; } /*! \overload Allows setting the background pixmap of the axis rect, whether it shall be scaled and how it shall be scaled in one call. \see setBackground(const QPixmap &pm), setBackgroundScaled, setBackgroundScaledMode */ void QCPAxisRect::setBackground(const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode) { mBackgroundPixmap = pm; mScaledBackgroundPixmap = QPixmap(); mBackgroundScaled = scaled; mBackgroundScaledMode = mode; } /*! Sets whether the axis background pixmap shall be scaled to fit the axis rect or not. If \a scaled is set to true, you may control whether and how the aspect ratio of the original pixmap is preserved with \ref setBackgroundScaledMode. Note that the scaled version of the original pixmap is buffered, so there is no performance penalty on replots. (Except when the axis rect dimensions are changed continuously.) \see setBackground, setBackgroundScaledMode */ void QCPAxisRect::setBackgroundScaled(bool scaled) { mBackgroundScaled = scaled; } /*! If scaling of the axis background pixmap is enabled (\ref setBackgroundScaled), use this function to define whether and how the aspect ratio of the original pixmap passed to \ref setBackground is preserved. \see setBackground, setBackgroundScaled */ void QCPAxisRect::setBackgroundScaledMode(Qt::AspectRatioMode mode) { mBackgroundScaledMode = mode; } /*! Returns the range drag axis of the \a orientation provided. If multiple axes were set, returns the first one (use \ref rangeDragAxes to retrieve a list with all set axes). \see setRangeDragAxes */ QCPAxis *QCPAxisRect::rangeDragAxis(Qt::Orientation orientation) { if (orientation == Qt::Horizontal) return mRangeDragHorzAxis.isEmpty() ? 0 : mRangeDragHorzAxis.first().data(); else return mRangeDragVertAxis.isEmpty() ? 0 : mRangeDragVertAxis.first().data(); } /*! Returns the range zoom axis of the \a orientation provided. If multiple axes were set, returns the first one (use \ref rangeZoomAxes to retrieve a list with all set axes). \see setRangeZoomAxes */ QCPAxis *QCPAxisRect::rangeZoomAxis(Qt::Orientation orientation) { if (orientation == Qt::Horizontal) return mRangeZoomHorzAxis.isEmpty() ? 0 : mRangeZoomHorzAxis.first().data(); else return mRangeZoomVertAxis.isEmpty() ? 0 : mRangeZoomVertAxis.first().data(); } /*! Returns all range drag axes of the \a orientation provided. \see rangeZoomAxis, setRangeZoomAxes */ QList QCPAxisRect::rangeDragAxes(Qt::Orientation orientation) { QList result; if (orientation == Qt::Horizontal) { for (int i=0; i QCPAxisRect::rangeZoomAxes(Qt::Orientation orientation) { QList result; if (orientation == Qt::Horizontal) { for (int i=0; iQt::Horizontal | Qt::Vertical as \a orientations. In addition to setting \a orientations to a non-zero value, make sure \ref QCustomPlot::setInteractions contains \ref QCP::iRangeDrag to enable the range dragging interaction. \see setRangeZoom, setRangeDragAxes, QCustomPlot::setNoAntialiasingOnDrag */ void QCPAxisRect::setRangeDrag(Qt::Orientations orientations) { mRangeDrag = orientations; } /*! Sets which axis orientation may be zoomed by the user with the mouse wheel. What orientation corresponds to which specific axis can be set with \ref setRangeZoomAxes(QCPAxis *horizontal, QCPAxis *vertical). By default, the horizontal axis is the bottom axis (xAxis) and the vertical axis is the left axis (yAxis). To disable range zooming entirely, pass 0 as \a orientations or remove \ref QCP::iRangeZoom from \ref QCustomPlot::setInteractions. To enable range zooming for both directions, pass Qt::Horizontal | Qt::Vertical as \a orientations. In addition to setting \a orientations to a non-zero value, make sure \ref QCustomPlot::setInteractions contains \ref QCP::iRangeZoom to enable the range zooming interaction. \see setRangeZoomFactor, setRangeZoomAxes, setRangeDrag */ void QCPAxisRect::setRangeZoom(Qt::Orientations orientations) { mRangeZoom = orientations; } /*! \overload Sets the axes whose range will be dragged when \ref setRangeDrag enables mouse range dragging on the QCustomPlot widget. Pass 0 if no axis shall be dragged in the respective orientation. Use the overload taking a list of axes, if multiple axes (more than one per orientation) shall react to dragging interactions. \see setRangeZoomAxes */ void QCPAxisRect::setRangeDragAxes(QCPAxis *horizontal, QCPAxis *vertical) { QList horz, vert; if (horizontal) horz.append(horizontal); if (vertical) vert.append(vertical); setRangeDragAxes(horz, vert); } /*! \overload This method allows to set up multiple axes to react to horizontal and vertical dragging. The drag orientation that the respective axis will react to is deduced from its orientation (\ref QCPAxis::orientation). In the unusual case that you wish to e.g. drag a vertically oriented axis with a horizontal drag motion, use the overload taking two separate lists for horizontal and vertical dragging. */ void QCPAxisRect::setRangeDragAxes(QList axes) { QList horz, vert; foreach (QCPAxis *ax, axes) { if (ax->orientation() == Qt::Horizontal) horz.append(ax); else vert.append(ax); } setRangeDragAxes(horz, vert); } /*! \overload This method allows to set multiple axes up to react to horizontal and vertical dragging, and define specifically which axis reacts to which drag orientation (irrespective of the axis orientation). */ void QCPAxisRect::setRangeDragAxes(QList horizontal, QList vertical) { mRangeDragHorzAxis.clear(); foreach (QCPAxis *ax, horizontal) { QPointer axPointer(ax); if (!axPointer.isNull()) mRangeDragHorzAxis.append(axPointer); else qDebug() << Q_FUNC_INFO << "invalid axis passed in horizontal list:" << reinterpret_cast(ax); } mRangeDragVertAxis.clear(); foreach (QCPAxis *ax, vertical) { QPointer axPointer(ax); if (!axPointer.isNull()) mRangeDragVertAxis.append(axPointer); else qDebug() << Q_FUNC_INFO << "invalid axis passed in vertical list:" << reinterpret_cast(ax); } } /*! Sets the axes whose range will be zoomed when \ref setRangeZoom enables mouse wheel zooming on the QCustomPlot widget. Pass 0 if no axis shall be zoomed in the respective orientation. The two axes can be zoomed with different strengths, when different factors are passed to \ref setRangeZoomFactor(double horizontalFactor, double verticalFactor). Use the overload taking a list of axes, if multiple axes (more than one per orientation) shall react to zooming interactions. \see setRangeDragAxes */ void QCPAxisRect::setRangeZoomAxes(QCPAxis *horizontal, QCPAxis *vertical) { QList horz, vert; if (horizontal) horz.append(horizontal); if (vertical) vert.append(vertical); setRangeZoomAxes(horz, vert); } /*! \overload This method allows to set up multiple axes to react to horizontal and vertical range zooming. The zoom orientation that the respective axis will react to is deduced from its orientation (\ref QCPAxis::orientation). In the unusual case that you wish to e.g. zoom a vertically oriented axis with a horizontal zoom interaction, use the overload taking two separate lists for horizontal and vertical zooming. */ void QCPAxisRect::setRangeZoomAxes(QList axes) { QList horz, vert; foreach (QCPAxis *ax, axes) { if (ax->orientation() == Qt::Horizontal) horz.append(ax); else vert.append(ax); } setRangeZoomAxes(horz, vert); } /*! \overload This method allows to set multiple axes up to react to horizontal and vertical zooming, and define specifically which axis reacts to which zoom orientation (irrespective of the axis orientation). */ void QCPAxisRect::setRangeZoomAxes(QList horizontal, QList vertical) { mRangeZoomHorzAxis.clear(); foreach (QCPAxis *ax, horizontal) { QPointer axPointer(ax); if (!axPointer.isNull()) mRangeZoomHorzAxis.append(axPointer); else qDebug() << Q_FUNC_INFO << "invalid axis passed in horizontal list:" << reinterpret_cast(ax); } mRangeZoomVertAxis.clear(); foreach (QCPAxis *ax, vertical) { QPointer axPointer(ax); if (!axPointer.isNull()) mRangeZoomVertAxis.append(axPointer); else qDebug() << Q_FUNC_INFO << "invalid axis passed in vertical list:" << reinterpret_cast(ax); } } /*! Sets how strong one rotation step of the mouse wheel zooms, when range zoom was activated with \ref setRangeZoom. The two parameters \a horizontalFactor and \a verticalFactor provide a way to let the horizontal axis zoom at different rates than the vertical axis. Which axis is horizontal and which is vertical, can be set with \ref setRangeZoomAxes. When the zoom factor is greater than one, scrolling the mouse wheel backwards (towards the user) will zoom in (make the currently visible range smaller). For zoom factors smaller than one, the same scrolling direction will zoom out. */ void QCPAxisRect::setRangeZoomFactor(double horizontalFactor, double verticalFactor) { mRangeZoomFactorHorz = horizontalFactor; mRangeZoomFactorVert = verticalFactor; } /*! \overload Sets both the horizontal and vertical zoom \a factor. */ void QCPAxisRect::setRangeZoomFactor(double factor) { mRangeZoomFactorHorz = factor; mRangeZoomFactorVert = factor; } /*! \internal Draws the background of this axis rect. It may consist of a background fill (a QBrush) and a pixmap. If a brush was given via \ref setBackground(const QBrush &brush), this function first draws an according filling inside the axis rect with the provided \a painter. Then, if a pixmap was provided via \ref setBackground, this function buffers the scaled version depending on \ref setBackgroundScaled and \ref setBackgroundScaledMode and then draws it inside the axis rect with the provided \a painter. The scaled version is buffered in mScaledBackgroundPixmap to prevent expensive rescaling at every redraw. It is only updated, when the axis rect has changed in a way that requires a rescale of the background pixmap (this is dependent on the \ref setBackgroundScaledMode), or when a differend axis background pixmap was set. \see setBackground, setBackgroundScaled, setBackgroundScaledMode */ void QCPAxisRect::drawBackground(QCPPainter *painter) { // draw background fill: if (mBackgroundBrush != Qt::NoBrush) painter->fillRect(mRect, mBackgroundBrush); // draw background pixmap (on top of fill, if brush specified): if (!mBackgroundPixmap.isNull()) { if (mBackgroundScaled) { // check whether mScaledBackground needs to be updated: QSize scaledSize(mBackgroundPixmap.size()); scaledSize.scale(mRect.size(), mBackgroundScaledMode); if (mScaledBackgroundPixmap.size() != scaledSize) mScaledBackgroundPixmap = mBackgroundPixmap.scaled(mRect.size(), mBackgroundScaledMode, Qt::SmoothTransformation); painter->drawPixmap(mRect.topLeft()+QPoint(0, -1), mScaledBackgroundPixmap, QRect(0, 0, mRect.width(), mRect.height()) & mScaledBackgroundPixmap.rect()); } else { painter->drawPixmap(mRect.topLeft()+QPoint(0, -1), mBackgroundPixmap, QRect(0, 0, mRect.width(), mRect.height())); } } } /*! \internal This function makes sure multiple axes on the side specified with \a type don't collide, but are distributed according to their respective space requirement (QCPAxis::calculateMargin). It does this by setting an appropriate offset (\ref QCPAxis::setOffset) on all axes except the one with index zero. This function is called by \ref calculateAutoMargin. */ void QCPAxisRect::updateAxesOffset(QCPAxis::AxisType type) { const QList axesList = mAxes.value(type); if (axesList.isEmpty()) return; bool isFirstVisible = !axesList.first()->visible(); // if the first axis is visible, the second axis (which is where the loop starts) isn't the first visible axis, so initialize with false for (int i=1; ioffset() + axesList.at(i-1)->calculateMargin(); if (axesList.at(i)->visible()) // only add inner tick length to offset if this axis is visible and it's not the first visible one (might happen if true first axis is invisible) { if (!isFirstVisible) offset += axesList.at(i)->tickLengthIn(); isFirstVisible = false; } axesList.at(i)->setOffset(offset); } } /* inherits documentation from base class */ int QCPAxisRect::calculateAutoMargin(QCP::MarginSide side) { if (!mAutoMargins.testFlag(side)) qDebug() << Q_FUNC_INFO << "Called with side that isn't specified as auto margin"; updateAxesOffset(QCPAxis::marginSideToAxisType(side)); // note: only need to look at the last (outer most) axis to determine the total margin, due to updateAxisOffset call const QList axesList = mAxes.value(QCPAxis::marginSideToAxisType(side)); if (axesList.size() > 0) return axesList.last()->offset() + axesList.last()->calculateMargin(); else return 0; } /*! \internal Reacts to a change in layout to potentially set the convenience axis pointers \ref QCustomPlot::xAxis, \ref QCustomPlot::yAxis, etc. of the parent QCustomPlot to the respective axes of this axis rect. This is only done if the respective convenience pointer is currently zero and if there is no QCPAxisRect at position (0, 0) of the plot layout. This automation makes it simpler to replace the main axis rect with a newly created one, without the need to manually reset the convenience pointers. */ void QCPAxisRect::layoutChanged() { if (mParentPlot && mParentPlot->axisRectCount() > 0 && mParentPlot->axisRect(0) == this) { if (axisCount(QCPAxis::atBottom) > 0 && !mParentPlot->xAxis) mParentPlot->xAxis = axis(QCPAxis::atBottom); if (axisCount(QCPAxis::atLeft) > 0 && !mParentPlot->yAxis) mParentPlot->yAxis = axis(QCPAxis::atLeft); if (axisCount(QCPAxis::atTop) > 0 && !mParentPlot->xAxis2) mParentPlot->xAxis2 = axis(QCPAxis::atTop); if (axisCount(QCPAxis::atRight) > 0 && !mParentPlot->yAxis2) mParentPlot->yAxis2 = axis(QCPAxis::atRight); } } /*! \internal Event handler for when a mouse button is pressed on the axis rect. If the left mouse button is pressed, the range dragging interaction is initialized (the actual range manipulation happens in the \ref mouseMoveEvent). The mDragging flag is set to true and some anchor points are set that are needed to determine the distance the mouse was dragged in the mouse move/release events later. \see mouseMoveEvent, mouseReleaseEvent */ void QCPAxisRect::mousePressEvent(QMouseEvent *event, const QVariant &details) { Q_UNUSED(details) if (event->buttons() & Qt::LeftButton) { mDragging = true; // initialize antialiasing backup in case we start dragging: if (mParentPlot->noAntialiasingOnDrag()) { mAADragBackup = mParentPlot->antialiasedElements(); mNotAADragBackup = mParentPlot->notAntialiasedElements(); } // Mouse range dragging interaction: if (mParentPlot->interactions().testFlag(QCP::iRangeDrag)) { mDragStartHorzRange.clear(); for (int i=0; irange()); mDragStartVertRange.clear(); for (int i=0; irange()); } } } /*! \internal Event handler for when the mouse is moved on the axis rect. If range dragging was activated in a preceding \ref mousePressEvent, the range is moved accordingly. \see mousePressEvent, mouseReleaseEvent */ void QCPAxisRect::mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) { Q_UNUSED(startPos) // Mouse range dragging interaction: if (mDragging && mParentPlot->interactions().testFlag(QCP::iRangeDrag)) { if (mRangeDrag.testFlag(Qt::Horizontal)) { for (int i=0; i= mDragStartHorzRange.size()) break; if (ax->mScaleType == QCPAxis::stLinear) { double diff = ax->pixelToCoord(startPos.x()) - ax->pixelToCoord(event->pos().x()); ax->setRange(mDragStartHorzRange.at(i).lower+diff, mDragStartHorzRange.at(i).upper+diff); } else if (ax->mScaleType == QCPAxis::stLogarithmic) { double diff = ax->pixelToCoord(startPos.x()) / ax->pixelToCoord(event->pos().x()); ax->setRange(mDragStartHorzRange.at(i).lower*diff, mDragStartHorzRange.at(i).upper*diff); } } } if (mRangeDrag.testFlag(Qt::Vertical)) { for (int i=0; i= mDragStartVertRange.size()) break; if (ax->mScaleType == QCPAxis::stLinear) { double diff = ax->pixelToCoord(startPos.y()) - ax->pixelToCoord(event->pos().y()); ax->setRange(mDragStartVertRange.at(i).lower+diff, mDragStartVertRange.at(i).upper+diff); } else if (ax->mScaleType == QCPAxis::stLogarithmic) { double diff = ax->pixelToCoord(startPos.y()) / ax->pixelToCoord(event->pos().y()); ax->setRange(mDragStartVertRange.at(i).lower*diff, mDragStartVertRange.at(i).upper*diff); } } } if (mRangeDrag != 0) // if either vertical or horizontal drag was enabled, do a replot { if (mParentPlot->noAntialiasingOnDrag()) mParentPlot->setNotAntialiasedElements(QCP::aeAll); mParentPlot->replot(QCustomPlot::rpQueuedReplot); } } } /* inherits documentation from base class */ void QCPAxisRect::mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) { Q_UNUSED(event) Q_UNUSED(startPos) mDragging = false; if (mParentPlot->noAntialiasingOnDrag()) { mParentPlot->setAntialiasedElements(mAADragBackup); mParentPlot->setNotAntialiasedElements(mNotAADragBackup); } } /*! \internal Event handler for mouse wheel events. If rangeZoom is Qt::Horizontal, Qt::Vertical or both, the ranges of the axes defined as rangeZoomHorzAxis and rangeZoomVertAxis are scaled. The center of the scaling operation is the current cursor position inside the axis rect. The scaling factor is dependent on the mouse wheel delta (which direction the wheel was rotated) to provide a natural zooming feel. The Strength of the zoom can be controlled via \ref setRangeZoomFactor. Note, that event->delta() is usually +/-120 for single rotation steps. However, if the mouse wheel is turned rapidly, many steps may bunch up to one event, so the event->delta() may then be multiples of 120. This is taken into account here, by calculating \a wheelSteps and using it as exponent of the range zoom factor. This takes care of the wheel direction automatically, by inverting the factor, when the wheel step is negative (f^-1 = 1/f). */ void QCPAxisRect::wheelEvent(QWheelEvent *event) { // Mouse range zooming interaction: if (mParentPlot->interactions().testFlag(QCP::iRangeZoom)) { if (mRangeZoom != 0) { double factor; double wheelSteps = event->delta()/120.0; // a single step delta is +/-120 usually if (mRangeZoom.testFlag(Qt::Horizontal)) { factor = qPow(mRangeZoomFactorHorz, wheelSteps); for (int i=0; iscaleRange(factor, mRangeZoomHorzAxis.at(i)->pixelToCoord(event->pos().x())); } } if (mRangeZoom.testFlag(Qt::Vertical)) { factor = qPow(mRangeZoomFactorVert, wheelSteps); for (int i=0; iscaleRange(factor, mRangeZoomVertAxis.at(i)->pixelToCoord(event->pos().y())); } } mParentPlot->replot(); } } } /* end of 'src/layoutelements/layoutelement-axisrect.cpp' */ /* including file 'src/layoutelements/layoutelement-legend.cpp', size 31097 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAbstractLegendItem //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAbstractLegendItem \brief The abstract base class for all entries in a QCPLegend. It defines a very basic interface for entries in a QCPLegend. For representing plottables in the legend, the subclass \ref QCPPlottableLegendItem is more suitable. Only derive directly from this class when you need absolute freedom (e.g. a custom legend entry that's not even associated with a plottable). You must implement the following pure virtual functions: \li \ref draw (from QCPLayerable) You inherit the following members you may use:
QCPLegend *\b mParentLegend A pointer to the parent QCPLegend.
QFont \b mFont The generic font of the item. You should use this font for all or at least the most prominent text of the item.
*/ /* start of documentation of signals */ /*! \fn void QCPAbstractLegendItem::selectionChanged(bool selected) This signal is emitted when the selection state of this legend item has changed, either by user interaction or by a direct call to \ref setSelected. */ /* end of documentation of signals */ /*! Constructs a QCPAbstractLegendItem and associates it with the QCPLegend \a parent. This does not cause the item to be added to \a parent, so \ref QCPLegend::addItem must be called separately. */ QCPAbstractLegendItem::QCPAbstractLegendItem(QCPLegend *parent) : QCPLayoutElement(parent->parentPlot()), mParentLegend(parent), mFont(parent->font()), mTextColor(parent->textColor()), mSelectedFont(parent->selectedFont()), mSelectedTextColor(parent->selectedTextColor()), mSelectable(true), mSelected(false) { setLayer(QLatin1String("legend")); setMargins(QMargins(0, 0, 0, 0)); } /*! Sets the default font of this specific legend item to \a font. \see setTextColor, QCPLegend::setFont */ void QCPAbstractLegendItem::setFont(const QFont &font) { mFont = font; } /*! Sets the default text color of this specific legend item to \a color. \see setFont, QCPLegend::setTextColor */ void QCPAbstractLegendItem::setTextColor(const QColor &color) { mTextColor = color; } /*! When this legend item is selected, \a font is used to draw generic text, instead of the normal font set with \ref setFont. \see setFont, QCPLegend::setSelectedFont */ void QCPAbstractLegendItem::setSelectedFont(const QFont &font) { mSelectedFont = font; } /*! When this legend item is selected, \a color is used to draw generic text, instead of the normal color set with \ref setTextColor. \see setTextColor, QCPLegend::setSelectedTextColor */ void QCPAbstractLegendItem::setSelectedTextColor(const QColor &color) { mSelectedTextColor = color; } /*! Sets whether this specific legend item is selectable. \see setSelectedParts, QCustomPlot::setInteractions */ void QCPAbstractLegendItem::setSelectable(bool selectable) { if (mSelectable != selectable) { mSelectable = selectable; emit selectableChanged(mSelectable); } } /*! Sets whether this specific legend item is selected. It is possible to set the selection state of this item by calling this function directly, even if setSelectable is set to false. \see setSelectableParts, QCustomPlot::setInteractions */ void QCPAbstractLegendItem::setSelected(bool selected) { if (mSelected != selected) { mSelected = selected; emit selectionChanged(mSelected); } } /* inherits documentation from base class */ double QCPAbstractLegendItem::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (!mParentPlot) return -1; if (onlySelectable && (!mSelectable || !mParentLegend->selectableParts().testFlag(QCPLegend::spItems))) return -1; if (mRect.contains(pos.toPoint())) return mParentPlot->selectionTolerance()*0.99; else return -1; } /* inherits documentation from base class */ void QCPAbstractLegendItem::applyDefaultAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiased, QCP::aeLegendItems); } /* inherits documentation from base class */ QRect QCPAbstractLegendItem::clipRect() const { return mOuterRect; } /* inherits documentation from base class */ void QCPAbstractLegendItem::selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) { Q_UNUSED(event) Q_UNUSED(details) if (mSelectable && mParentLegend->selectableParts().testFlag(QCPLegend::spItems)) { bool selBefore = mSelected; setSelected(additive ? !mSelected : true); if (selectionStateChanged) *selectionStateChanged = mSelected != selBefore; } } /* inherits documentation from base class */ void QCPAbstractLegendItem::deselectEvent(bool *selectionStateChanged) { if (mSelectable && mParentLegend->selectableParts().testFlag(QCPLegend::spItems)) { bool selBefore = mSelected; setSelected(false); if (selectionStateChanged) *selectionStateChanged = mSelected != selBefore; } } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPPlottableLegendItem //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPPlottableLegendItem \brief A legend item representing a plottable with an icon and the plottable name. This is the standard legend item for plottables. It displays an icon of the plottable next to the plottable name. The icon is drawn by the respective plottable itself (\ref QCPAbstractPlottable::drawLegendIcon), and tries to give an intuitive symbol for the plottable. For example, the QCPGraph draws a centered horizontal line and/or a single scatter point in the middle. Legend items of this type are always associated with one plottable (retrievable via the plottable() function and settable with the constructor). You may change the font of the plottable name with \ref setFont. Icon padding and border pen is taken from the parent QCPLegend, see \ref QCPLegend::setIconBorderPen and \ref QCPLegend::setIconTextPadding. The function \ref QCPAbstractPlottable::addToLegend/\ref QCPAbstractPlottable::removeFromLegend creates/removes legend items of this type. Since QCPLegend is based on QCPLayoutGrid, a legend item itself is just a subclass of QCPLayoutElement. While it could be added to a legend (or any other layout) via the normal layout interface, QCPLegend has specialized functions for handling legend items conveniently, see the documentation of \ref QCPLegend. */ /*! Creates a new legend item associated with \a plottable. Once it's created, it can be added to the legend via \ref QCPLegend::addItem. A more convenient way of adding/removing a plottable to/from the legend is via the functions \ref QCPAbstractPlottable::addToLegend and \ref QCPAbstractPlottable::removeFromLegend. */ QCPPlottableLegendItem::QCPPlottableLegendItem(QCPLegend *parent, QCPAbstractPlottable *plottable) : QCPAbstractLegendItem(parent), mPlottable(plottable) { setAntialiased(false); } /*! \internal Returns the pen that shall be used to draw the icon border, taking into account the selection state of this item. */ QPen QCPPlottableLegendItem::getIconBorderPen() const { return mSelected ? mParentLegend->selectedIconBorderPen() : mParentLegend->iconBorderPen(); } /*! \internal Returns the text color that shall be used to draw text, taking into account the selection state of this item. */ QColor QCPPlottableLegendItem::getTextColor() const { return mSelected ? mSelectedTextColor : mTextColor; } /*! \internal Returns the font that shall be used to draw text, taking into account the selection state of this item. */ QFont QCPPlottableLegendItem::getFont() const { return mSelected ? mSelectedFont : mFont; } /*! \internal Draws the item with \a painter. The size and position of the drawn legend item is defined by the parent layout (typically a \ref QCPLegend) and the \ref minimumOuterSizeHint and \ref maximumOuterSizeHint of this legend item. */ void QCPPlottableLegendItem::draw(QCPPainter *painter) { if (!mPlottable) return; painter->setFont(getFont()); painter->setPen(QPen(getTextColor())); QSizeF iconSize = mParentLegend->iconSize(); QRectF textRect = painter->fontMetrics().boundingRect(0, 0, 0, iconSize.height(), Qt::TextDontClip, mPlottable->name()); QRectF iconRect(mRect.topLeft(), iconSize); int textHeight = qMax(textRect.height(), iconSize.height()); // if text has smaller height than icon, center text vertically in icon height, else align tops painter->drawText(mRect.x()+iconSize.width()+mParentLegend->iconTextPadding(), mRect.y(), textRect.width(), textHeight, Qt::TextDontClip, mPlottable->name()); // draw icon: painter->save(); painter->setClipRect(iconRect, Qt::IntersectClip); mPlottable->drawLegendIcon(painter, iconRect); painter->restore(); // draw icon border: if (getIconBorderPen().style() != Qt::NoPen) { painter->setPen(getIconBorderPen()); painter->setBrush(Qt::NoBrush); int halfPen = qCeil(painter->pen().widthF()*0.5)+1; painter->setClipRect(mOuterRect.adjusted(-halfPen, -halfPen, halfPen, halfPen)); // extend default clip rect so thicker pens (especially during selection) are not clipped painter->drawRect(iconRect); } } /*! \internal Calculates and returns the size of this item. This includes the icon, the text and the padding in between. \seebaseclassmethod */ QSize QCPPlottableLegendItem::minimumOuterSizeHint() const { if (!mPlottable) return QSize(); QSize result(0, 0); QRect textRect; QFontMetrics fontMetrics(getFont()); QSize iconSize = mParentLegend->iconSize(); textRect = fontMetrics.boundingRect(0, 0, 0, iconSize.height(), Qt::TextDontClip, mPlottable->name()); result.setWidth(iconSize.width() + mParentLegend->iconTextPadding() + textRect.width()); result.setHeight(qMax(textRect.height(), iconSize.height())); result.rwidth() += mMargins.left()+mMargins.right(); result.rheight() += mMargins.top()+mMargins.bottom(); return result; } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPLegend //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPLegend \brief Manages a legend inside a QCustomPlot. A legend is a small box somewhere in the plot which lists plottables with their name and icon. A legend is populated with legend items by calling \ref QCPAbstractPlottable::addToLegend on the plottable, for which a legend item shall be created. In the case of the main legend (\ref QCustomPlot::legend), simply adding plottables to the plot while \ref QCustomPlot::setAutoAddPlottableToLegend is set to true (the default) creates corresponding legend items. The legend item associated with a certain plottable can be removed with \ref QCPAbstractPlottable::removeFromLegend. However, QCPLegend also offers an interface to add and manipulate legend items directly: \ref item, \ref itemWithPlottable, \ref itemCount, \ref addItem, \ref removeItem, etc. Since \ref QCPLegend derives from \ref QCPLayoutGrid, it can be placed in any position a \ref QCPLayoutElement may be positioned. The legend items are themselves \ref QCPLayoutElement "QCPLayoutElements" which are placed in the grid layout of the legend. \ref QCPLegend only adds an interface specialized for handling child elements of type \ref QCPAbstractLegendItem, as mentioned above. In principle, any other layout elements may also be added to a legend via the normal \ref QCPLayoutGrid interface. See the special page about \link thelayoutsystem The Layout System\endlink for examples on how to add other elements to the legend and move it outside the axis rect. Use the methods \ref setFillOrder and \ref setWrap inherited from \ref QCPLayoutGrid to control in which order (column first or row first) the legend is filled up when calling \ref addItem, and at which column or row wrapping occurs. By default, every QCustomPlot has one legend (\ref QCustomPlot::legend) which is placed in the inset layout of the main axis rect (\ref QCPAxisRect::insetLayout). To move the legend to another position inside the axis rect, use the methods of the \ref QCPLayoutInset. To move the legend outside of the axis rect, place it anywhere else with the \ref QCPLayout/\ref QCPLayoutElement interface. */ /* start of documentation of signals */ /*! \fn void QCPLegend::selectionChanged(QCPLegend::SelectableParts selection); This signal is emitted when the selection state of this legend has changed. \see setSelectedParts, setSelectableParts */ /* end of documentation of signals */ /*! Constructs a new QCPLegend instance with default values. Note that by default, QCustomPlot already contains a legend ready to be used as \ref QCustomPlot::legend */ QCPLegend::QCPLegend() { setFillOrder(QCPLayoutGrid::foRowsFirst); setWrap(0); setRowSpacing(3); setColumnSpacing(8); setMargins(QMargins(7, 5, 7, 4)); setAntialiased(false); setIconSize(32, 18); setIconTextPadding(7); setSelectableParts(spLegendBox | spItems); setSelectedParts(spNone); setBorderPen(QPen(Qt::black, 0)); setSelectedBorderPen(QPen(Qt::blue, 2)); setIconBorderPen(Qt::NoPen); setSelectedIconBorderPen(QPen(Qt::blue, 2)); setBrush(Qt::white); setSelectedBrush(Qt::white); setTextColor(Qt::black); setSelectedTextColor(Qt::blue); } QCPLegend::~QCPLegend() { clearItems(); if (qobject_cast(mParentPlot)) // make sure this isn't called from QObject dtor when QCustomPlot is already destructed (happens when the legend is not in any layout and thus QObject-child of QCustomPlot) mParentPlot->legendRemoved(this); } /* no doc for getter, see setSelectedParts */ QCPLegend::SelectableParts QCPLegend::selectedParts() const { // check whether any legend elements selected, if yes, add spItems to return value bool hasSelectedItems = false; for (int i=0; iselected()) { hasSelectedItems = true; break; } } if (hasSelectedItems) return mSelectedParts | spItems; else return mSelectedParts & ~spItems; } /*! Sets the pen, the border of the entire legend is drawn with. */ void QCPLegend::setBorderPen(const QPen &pen) { mBorderPen = pen; } /*! Sets the brush of the legend background. */ void QCPLegend::setBrush(const QBrush &brush) { mBrush = brush; } /*! Sets the default font of legend text. Legend items that draw text (e.g. the name of a graph) will use this font by default. However, a different font can be specified on a per-item-basis by accessing the specific legend item. This function will also set \a font on all already existing legend items. \see QCPAbstractLegendItem::setFont */ void QCPLegend::setFont(const QFont &font) { mFont = font; for (int i=0; isetFont(mFont); } } /*! Sets the default color of legend text. Legend items that draw text (e.g. the name of a graph) will use this color by default. However, a different colors can be specified on a per-item-basis by accessing the specific legend item. This function will also set \a color on all already existing legend items. \see QCPAbstractLegendItem::setTextColor */ void QCPLegend::setTextColor(const QColor &color) { mTextColor = color; for (int i=0; isetTextColor(color); } } /*! Sets the size of legend icons. Legend items that draw an icon (e.g. a visual representation of the graph) will use this size by default. */ void QCPLegend::setIconSize(const QSize &size) { mIconSize = size; } /*! \overload */ void QCPLegend::setIconSize(int width, int height) { mIconSize.setWidth(width); mIconSize.setHeight(height); } /*! Sets the horizontal space in pixels between the legend icon and the text next to it. Legend items that draw an icon (e.g. a visual representation of the graph) and text (e.g. the name of the graph) will use this space by default. */ void QCPLegend::setIconTextPadding(int padding) { mIconTextPadding = padding; } /*! Sets the pen used to draw a border around each legend icon. Legend items that draw an icon (e.g. a visual representation of the graph) will use this pen by default. If no border is wanted, set this to \a Qt::NoPen. */ void QCPLegend::setIconBorderPen(const QPen &pen) { mIconBorderPen = pen; } /*! Sets whether the user can (de-)select the parts in \a selectable by clicking on the QCustomPlot surface. (When \ref QCustomPlot::setInteractions contains \ref QCP::iSelectLegend.) However, even when \a selectable is set to a value not allowing the selection of a specific part, it is still possible to set the selection of this part manually, by calling \ref setSelectedParts directly. \see SelectablePart, setSelectedParts */ void QCPLegend::setSelectableParts(const SelectableParts &selectable) { if (mSelectableParts != selectable) { mSelectableParts = selectable; emit selectableChanged(mSelectableParts); } } /*! Sets the selected state of the respective legend parts described by \ref SelectablePart. When a part is selected, it uses a different pen/font and brush. If some legend items are selected and \a selected doesn't contain \ref spItems, those items become deselected. The entire selection mechanism is handled automatically when \ref QCustomPlot::setInteractions contains iSelectLegend. You only need to call this function when you wish to change the selection state manually. This function can change the selection state of a part even when \ref setSelectableParts was set to a value that actually excludes the part. emits the \ref selectionChanged signal when \a selected is different from the previous selection state. Note that it doesn't make sense to set the selected state \ref spItems here when it wasn't set before, because there's no way to specify which exact items to newly select. Do this by calling \ref QCPAbstractLegendItem::setSelected directly on the legend item you wish to select. \see SelectablePart, setSelectableParts, selectTest, setSelectedBorderPen, setSelectedIconBorderPen, setSelectedBrush, setSelectedFont */ void QCPLegend::setSelectedParts(const SelectableParts &selected) { SelectableParts newSelected = selected; mSelectedParts = this->selectedParts(); // update mSelectedParts in case item selection changed if (mSelectedParts != newSelected) { if (!mSelectedParts.testFlag(spItems) && newSelected.testFlag(spItems)) // attempt to set spItems flag (can't do that) { qDebug() << Q_FUNC_INFO << "spItems flag can not be set, it can only be unset with this function"; newSelected &= ~spItems; } if (mSelectedParts.testFlag(spItems) && !newSelected.testFlag(spItems)) // spItems flag was unset, so clear item selection { for (int i=0; isetSelected(false); } } mSelectedParts = newSelected; emit selectionChanged(mSelectedParts); } } /*! When the legend box is selected, this pen is used to draw the border instead of the normal pen set via \ref setBorderPen. \see setSelectedParts, setSelectableParts, setSelectedBrush */ void QCPLegend::setSelectedBorderPen(const QPen &pen) { mSelectedBorderPen = pen; } /*! Sets the pen legend items will use to draw their icon borders, when they are selected. \see setSelectedParts, setSelectableParts, setSelectedFont */ void QCPLegend::setSelectedIconBorderPen(const QPen &pen) { mSelectedIconBorderPen = pen; } /*! When the legend box is selected, this brush is used to draw the legend background instead of the normal brush set via \ref setBrush. \see setSelectedParts, setSelectableParts, setSelectedBorderPen */ void QCPLegend::setSelectedBrush(const QBrush &brush) { mSelectedBrush = brush; } /*! Sets the default font that is used by legend items when they are selected. This function will also set \a font on all already existing legend items. \see setFont, QCPAbstractLegendItem::setSelectedFont */ void QCPLegend::setSelectedFont(const QFont &font) { mSelectedFont = font; for (int i=0; isetSelectedFont(font); } } /*! Sets the default text color that is used by legend items when they are selected. This function will also set \a color on all already existing legend items. \see setTextColor, QCPAbstractLegendItem::setSelectedTextColor */ void QCPLegend::setSelectedTextColor(const QColor &color) { mSelectedTextColor = color; for (int i=0; isetSelectedTextColor(color); } } /*! Returns the item with index \a i. Note that the linear index depends on the current fill order (\ref setFillOrder). \see itemCount, addItem, itemWithPlottable */ QCPAbstractLegendItem *QCPLegend::item(int index) const { return qobject_cast(elementAt(index)); } /*! Returns the QCPPlottableLegendItem which is associated with \a plottable (e.g. a \ref QCPGraph*). If such an item isn't in the legend, returns 0. \see hasItemWithPlottable */ QCPPlottableLegendItem *QCPLegend::itemWithPlottable(const QCPAbstractPlottable *plottable) const { for (int i=0; i(item(i))) { if (pli->plottable() == plottable) return pli; } } return 0; } /*! Returns the number of items currently in the legend. Note that if empty cells are in the legend (e.g. by calling methods of the \ref QCPLayoutGrid base class which allows creating empty cells), they are included in the returned count. \see item */ int QCPLegend::itemCount() const { return elementCount(); } /*! Returns whether the legend contains \a item. \see hasItemWithPlottable */ bool QCPLegend::hasItem(QCPAbstractLegendItem *item) const { for (int i=0; iitem(i)) return true; } return false; } /*! Returns whether the legend contains a QCPPlottableLegendItem which is associated with \a plottable (e.g. a \ref QCPGraph*). If such an item isn't in the legend, returns false. \see itemWithPlottable */ bool QCPLegend::hasItemWithPlottable(const QCPAbstractPlottable *plottable) const { return itemWithPlottable(plottable); } /*! Adds \a item to the legend, if it's not present already. The element is arranged according to the current fill order (\ref setFillOrder) and wrapping (\ref setWrap). Returns true on sucess, i.e. if the item wasn't in the list already and has been successfuly added. The legend takes ownership of the item. \see removeItem, item, hasItem */ bool QCPLegend::addItem(QCPAbstractLegendItem *item) { return addElement(item); } /*! \overload Removes the item with the specified \a index from the legend and deletes it. After successful removal, the legend is reordered according to the current fill order (\ref setFillOrder) and wrapping (\ref setWrap), so no empty cell remains where the removed \a item was. If you don't want this, rather use the raw element interface of \ref QCPLayoutGrid. Returns true, if successful. Unlike \ref QCPLayoutGrid::removeAt, this method only removes elements derived from \ref QCPAbstractLegendItem. \see itemCount, clearItems */ bool QCPLegend::removeItem(int index) { if (QCPAbstractLegendItem *ali = item(index)) { bool success = remove(ali); if (success) setFillOrder(fillOrder(), true); // gets rid of empty cell by reordering return success; } else return false; } /*! \overload Removes \a item from the legend and deletes it. After successful removal, the legend is reordered according to the current fill order (\ref setFillOrder) and wrapping (\ref setWrap), so no empty cell remains where the removed \a item was. If you don't want this, rather use the raw element interface of \ref QCPLayoutGrid. Returns true, if successful. \see clearItems */ bool QCPLegend::removeItem(QCPAbstractLegendItem *item) { bool success = remove(item); if (success) setFillOrder(fillOrder(), true); // gets rid of empty cell by reordering return success; } /*! Removes all items from the legend. */ void QCPLegend::clearItems() { for (int i=itemCount()-1; i>=0; --i) removeItem(i); } /*! Returns the legend items that are currently selected. If no items are selected, the list is empty. \see QCPAbstractLegendItem::setSelected, setSelectable */ QList QCPLegend::selectedItems() const { QList result; for (int i=0; iselected()) result.append(ali); } } return result; } /*! \internal A convenience function to easily set the QPainter::Antialiased hint on the provided \a painter before drawing main legend elements. This is the antialiasing state the painter passed to the \ref draw method is in by default. This function takes into account the local setting of the antialiasing flag as well as the overrides set with \ref QCustomPlot::setAntialiasedElements and \ref QCustomPlot::setNotAntialiasedElements. \seebaseclassmethod \see setAntialiased */ void QCPLegend::applyDefaultAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiased, QCP::aeLegend); } /*! \internal Returns the pen used to paint the border of the legend, taking into account the selection state of the legend box. */ QPen QCPLegend::getBorderPen() const { return mSelectedParts.testFlag(spLegendBox) ? mSelectedBorderPen : mBorderPen; } /*! \internal Returns the brush used to paint the background of the legend, taking into account the selection state of the legend box. */ QBrush QCPLegend::getBrush() const { return mSelectedParts.testFlag(spLegendBox) ? mSelectedBrush : mBrush; } /*! \internal Draws the legend box with the provided \a painter. The individual legend items are layerables themselves, thus are drawn independently. */ void QCPLegend::draw(QCPPainter *painter) { // draw background rect: painter->setBrush(getBrush()); painter->setPen(getBorderPen()); painter->drawRect(mOuterRect); } /* inherits documentation from base class */ double QCPLegend::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { if (!mParentPlot) return -1; if (onlySelectable && !mSelectableParts.testFlag(spLegendBox)) return -1; if (mOuterRect.contains(pos.toPoint())) { if (details) details->setValue(spLegendBox); return mParentPlot->selectionTolerance()*0.99; } return -1; } /* inherits documentation from base class */ void QCPLegend::selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) { Q_UNUSED(event) mSelectedParts = selectedParts(); // in case item selection has changed if (details.value() == spLegendBox && mSelectableParts.testFlag(spLegendBox)) { SelectableParts selBefore = mSelectedParts; setSelectedParts(additive ? mSelectedParts^spLegendBox : mSelectedParts|spLegendBox); // no need to unset spItems in !additive case, because they will be deselected by QCustomPlot (they're normal QCPLayerables with own deselectEvent) if (selectionStateChanged) *selectionStateChanged = mSelectedParts != selBefore; } } /* inherits documentation from base class */ void QCPLegend::deselectEvent(bool *selectionStateChanged) { mSelectedParts = selectedParts(); // in case item selection has changed if (mSelectableParts.testFlag(spLegendBox)) { SelectableParts selBefore = mSelectedParts; setSelectedParts(selectedParts() & ~spLegendBox); if (selectionStateChanged) *selectionStateChanged = mSelectedParts != selBefore; } } /* inherits documentation from base class */ QCP::Interaction QCPLegend::selectionCategory() const { return QCP::iSelectLegend; } /* inherits documentation from base class */ QCP::Interaction QCPAbstractLegendItem::selectionCategory() const { return QCP::iSelectLegend; } /* inherits documentation from base class */ void QCPLegend::parentPlotInitialized(QCustomPlot *parentPlot) { if (parentPlot && !parentPlot->legend) parentPlot->legend = this; } /* end of 'src/layoutelements/layoutelement-legend.cpp' */ /* including file 'src/layoutelements/layoutelement-textelement.cpp', size 12761 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPTextElement //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPTextElement \brief A layout element displaying a text The text may be specified with \ref setText, the formatting can be controlled with \ref setFont, \ref setTextColor, and \ref setTextFlags. A text element can be added as follows: \snippet documentation/doc-code-snippets/mainwindow.cpp qcptextelement-creation */ /* start documentation of signals */ /*! \fn void QCPTextElement::selectionChanged(bool selected) This signal is emitted when the selection state has changed to \a selected, either by user interaction or by a direct call to \ref setSelected. \see setSelected, setSelectable */ /*! \fn void QCPTextElement::clicked(QMouseEvent *event) This signal is emitted when the text element is clicked. \see doubleClicked, selectTest */ /*! \fn void QCPTextElement::doubleClicked(QMouseEvent *event) This signal is emitted when the text element is double clicked. \see clicked, selectTest */ /* end documentation of signals */ /*! \overload Creates a new QCPTextElement instance and sets default values. The initial text is empty (\ref setText). */ QCPTextElement::QCPTextElement(QCustomPlot *parentPlot) : QCPLayoutElement(parentPlot), mText(), mTextFlags(Qt::AlignCenter|Qt::TextWordWrap), mFont(QFont(QLatin1String("sans serif"), 12)), // will be taken from parentPlot if available, see below mTextColor(Qt::black), mSelectedFont(QFont(QLatin1String("sans serif"), 12)), // will be taken from parentPlot if available, see below mSelectedTextColor(Qt::blue), mSelectable(false), mSelected(false) { if (parentPlot) { mFont = parentPlot->font(); mSelectedFont = parentPlot->font(); } setMargins(QMargins(2, 2, 2, 2)); } /*! \overload Creates a new QCPTextElement instance and sets default values. The initial text is set to \a text. */ QCPTextElement::QCPTextElement(QCustomPlot *parentPlot, const QString &text) : QCPLayoutElement(parentPlot), mText(text), mTextFlags(Qt::AlignCenter|Qt::TextWordWrap), mFont(QFont(QLatin1String("sans serif"), 12)), // will be taken from parentPlot if available, see below mTextColor(Qt::black), mSelectedFont(QFont(QLatin1String("sans serif"), 12)), // will be taken from parentPlot if available, see below mSelectedTextColor(Qt::blue), mSelectable(false), mSelected(false) { if (parentPlot) { mFont = parentPlot->font(); mSelectedFont = parentPlot->font(); } setMargins(QMargins(2, 2, 2, 2)); } /*! \overload Creates a new QCPTextElement instance and sets default values. The initial text is set to \a text with \a pointSize. */ QCPTextElement::QCPTextElement(QCustomPlot *parentPlot, const QString &text, double pointSize) : QCPLayoutElement(parentPlot), mText(text), mTextFlags(Qt::AlignCenter|Qt::TextWordWrap), mFont(QFont(QLatin1String("sans serif"), pointSize)), // will be taken from parentPlot if available, see below mTextColor(Qt::black), mSelectedFont(QFont(QLatin1String("sans serif"), pointSize)), // will be taken from parentPlot if available, see below mSelectedTextColor(Qt::blue), mSelectable(false), mSelected(false) { if (parentPlot) { mFont = parentPlot->font(); mFont.setPointSizeF(pointSize); mSelectedFont = parentPlot->font(); mSelectedFont.setPointSizeF(pointSize); } setMargins(QMargins(2, 2, 2, 2)); } /*! \overload Creates a new QCPTextElement instance and sets default values. The initial text is set to \a text with \a pointSize and the specified \a fontFamily. */ QCPTextElement::QCPTextElement(QCustomPlot *parentPlot, const QString &text, const QString &fontFamily, double pointSize) : QCPLayoutElement(parentPlot), mText(text), mTextFlags(Qt::AlignCenter|Qt::TextWordWrap), mFont(QFont(fontFamily, pointSize)), mTextColor(Qt::black), mSelectedFont(QFont(fontFamily, pointSize)), mSelectedTextColor(Qt::blue), mSelectable(false), mSelected(false) { setMargins(QMargins(2, 2, 2, 2)); } /*! \overload Creates a new QCPTextElement instance and sets default values. The initial text is set to \a text with the specified \a font. */ QCPTextElement::QCPTextElement(QCustomPlot *parentPlot, const QString &text, const QFont &font) : QCPLayoutElement(parentPlot), mText(text), mTextFlags(Qt::AlignCenter|Qt::TextWordWrap), mFont(font), mTextColor(Qt::black), mSelectedFont(font), mSelectedTextColor(Qt::blue), mSelectable(false), mSelected(false) { setMargins(QMargins(2, 2, 2, 2)); } /*! Sets the text that will be displayed to \a text. Multiple lines can be created by insertion of "\n". \see setFont, setTextColor, setTextFlags */ void QCPTextElement::setText(const QString &text) { mText = text; } /*! Sets options for text alignment and wrapping behaviour. \a flags is a bitwise OR-combination of \c Qt::AlignmentFlag and \c Qt::TextFlag enums. Possible enums are: - Qt::AlignLeft - Qt::AlignRight - Qt::AlignHCenter - Qt::AlignJustify - Qt::AlignTop - Qt::AlignBottom - Qt::AlignVCenter - Qt::AlignCenter - Qt::TextDontClip - Qt::TextSingleLine - Qt::TextExpandTabs - Qt::TextShowMnemonic - Qt::TextWordWrap - Qt::TextIncludeTrailingSpaces */ void QCPTextElement::setTextFlags(int flags) { mTextFlags = flags; } /*! Sets the \a font of the text. \see setTextColor, setSelectedFont */ void QCPTextElement::setFont(const QFont &font) { mFont = font; } /*! Sets the \a color of the text. \see setFont, setSelectedTextColor */ void QCPTextElement::setTextColor(const QColor &color) { mTextColor = color; } /*! Sets the \a font of the text that will be used if the text element is selected (\ref setSelected). \see setFont */ void QCPTextElement::setSelectedFont(const QFont &font) { mSelectedFont = font; } /*! Sets the \a color of the text that will be used if the text element is selected (\ref setSelected). \see setTextColor */ void QCPTextElement::setSelectedTextColor(const QColor &color) { mSelectedTextColor = color; } /*! Sets whether the user may select this text element. Note that even when \a selectable is set to false, the selection state may be changed programmatically via \ref setSelected. */ void QCPTextElement::setSelectable(bool selectable) { if (mSelectable != selectable) { mSelectable = selectable; emit selectableChanged(mSelectable); } } /*! Sets the selection state of this text element to \a selected. If the selection has changed, \ref selectionChanged is emitted. Note that this function can change the selection state independently of the current \ref setSelectable state. */ void QCPTextElement::setSelected(bool selected) { if (mSelected != selected) { mSelected = selected; emit selectionChanged(mSelected); } } /* inherits documentation from base class */ void QCPTextElement::applyDefaultAntialiasingHint(QCPPainter *painter) const { applyAntialiasingHint(painter, mAntialiased, QCP::aeOther); } /* inherits documentation from base class */ void QCPTextElement::draw(QCPPainter *painter) { painter->setFont(mainFont()); painter->setPen(QPen(mainTextColor())); painter->drawText(mRect, Qt::AlignCenter, mText, &mTextBoundingRect); } /* inherits documentation from base class */ QSize QCPTextElement::minimumOuterSizeHint() const { QFontMetrics metrics(mFont); QSize result(metrics.boundingRect(0, 0, 0, 0, Qt::AlignCenter, mText).size()); result.rwidth() += mMargins.left()+mMargins.right(); result.rheight() += mMargins.top()+mMargins.bottom(); return result; } /* inherits documentation from base class */ QSize QCPTextElement::maximumOuterSizeHint() const { QFontMetrics metrics(mFont); QSize result(metrics.boundingRect(0, 0, 0, 0, Qt::AlignCenter, mText).size()); result.setWidth(QWIDGETSIZE_MAX); result.rheight() += mMargins.top()+mMargins.bottom(); return result; } /* inherits documentation from base class */ void QCPTextElement::selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) { Q_UNUSED(event) Q_UNUSED(details) if (mSelectable) { bool selBefore = mSelected; setSelected(additive ? !mSelected : true); if (selectionStateChanged) *selectionStateChanged = mSelected != selBefore; } } /* inherits documentation from base class */ void QCPTextElement::deselectEvent(bool *selectionStateChanged) { if (mSelectable) { bool selBefore = mSelected; setSelected(false); if (selectionStateChanged) *selectionStateChanged = mSelected != selBefore; } } /*! Returns 0.99*selectionTolerance (see \ref QCustomPlot::setSelectionTolerance) when \a pos is within the bounding box of the text element's text. Note that this bounding box is updated in the draw call. If \a pos is outside the text's bounding box or if \a onlySelectable is true and this text element is not selectable (\ref setSelectable), returns -1. \seebaseclassmethod */ double QCPTextElement::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; if (mTextBoundingRect.contains(pos.toPoint())) return mParentPlot->selectionTolerance()*0.99; else return -1; } /*! Accepts the mouse event in order to emit the according click signal in the \ref mouseReleaseEvent. \seebaseclassmethod */ void QCPTextElement::mousePressEvent(QMouseEvent *event, const QVariant &details) { Q_UNUSED(details) event->accept(); } /*! Emits the \ref clicked signal if the cursor hasn't moved by more than a few pixels since the \ref mousePressEvent. \seebaseclassmethod */ void QCPTextElement::mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) { if ((QPointF(event->pos())-startPos).manhattanLength() <= 3) emit clicked(event); } /*! Emits the \ref doubleClicked signal. \seebaseclassmethod */ void QCPTextElement::mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details) { Q_UNUSED(details) emit doubleClicked(event); } /*! \internal Returns the main font to be used. This is mSelectedFont if \ref setSelected is set to true, else mFont is returned. */ QFont QCPTextElement::mainFont() const { return mSelected ? mSelectedFont : mFont; } /*! \internal Returns the main color to be used. This is mSelectedTextColor if \ref setSelected is set to true, else mTextColor is returned. */ QColor QCPTextElement::mainTextColor() const { return mSelected ? mSelectedTextColor : mTextColor; } /* end of 'src/layoutelements/layoutelement-textelement.cpp' */ /* including file 'src/layoutelements/layoutelement-colorscale.cpp', size 25770 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPColorScale //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPColorScale \brief A color scale for use with color coding data such as QCPColorMap This layout element can be placed on the plot to correlate a color gradient with data values. It is usually used in combination with one or multiple \ref QCPColorMap "QCPColorMaps". \image html QCPColorScale.png The color scale can be either horizontal or vertical, as shown in the image above. The orientation and the side where the numbers appear is controlled with \ref setType. Use \ref QCPColorMap::setColorScale to connect a color map with a color scale. Once they are connected, they share their gradient, data range and data scale type (\ref setGradient, \ref setDataRange, \ref setDataScaleType). Multiple color maps may be associated with a single color scale, to make them all synchronize these properties. To have finer control over the number display and axis behaviour, you can directly access the \ref axis. See the documentation of QCPAxis for details about configuring axes. For example, if you want to change the number of automatically generated ticks, call \snippet documentation/doc-code-snippets/mainwindow.cpp qcpcolorscale-tickcount Placing a color scale next to the main axis rect works like with any other layout element: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpcolorscale-creation In this case we have placed it to the right of the default axis rect, so it wasn't necessary to call \ref setType, since \ref QCPAxis::atRight is already the default. The text next to the color scale can be set with \ref setLabel. For optimum appearance (like in the image above), it may be desirable to line up the axis rect and the borders of the color scale. Use a \ref QCPMarginGroup to achieve this: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpcolorscale-margingroup Color scales are initialized with a non-zero minimum top and bottom margin (\ref setMinimumMargins), because vertical color scales are most common and the minimum top/bottom margin makes sure it keeps some distance to the top/bottom widget border. So if you change to a horizontal color scale by setting \ref setType to \ref QCPAxis::atBottom or \ref QCPAxis::atTop, you might want to also change the minimum margins accordingly, e.g. setMinimumMargins(QMargins(6, 0, 6, 0)). */ /* start documentation of inline functions */ /*! \fn QCPAxis *QCPColorScale::axis() const Returns the internal \ref QCPAxis instance of this color scale. You can access it to alter the appearance and behaviour of the axis. \ref QCPColorScale duplicates some properties in its interface for convenience. Those are \ref setDataRange (\ref QCPAxis::setRange), \ref setDataScaleType (\ref QCPAxis::setScaleType), and the method \ref setLabel (\ref QCPAxis::setLabel). As they each are connected, it does not matter whether you use the method on the QCPColorScale or on its QCPAxis. If the type of the color scale is changed with \ref setType, the axis returned by this method will change, too, to either the left, right, bottom or top axis, depending on which type was set. */ /* end documentation of signals */ /* start documentation of signals */ /*! \fn void QCPColorScale::dataRangeChanged(const QCPRange &newRange); This signal is emitted when the data range changes. \see setDataRange */ /*! \fn void QCPColorScale::dataScaleTypeChanged(QCPAxis::ScaleType scaleType); This signal is emitted when the data scale type changes. \see setDataScaleType */ /*! \fn void QCPColorScale::gradientChanged(const QCPColorGradient &newGradient); This signal is emitted when the gradient changes. \see setGradient */ /* end documentation of signals */ /*! Constructs a new QCPColorScale. */ QCPColorScale::QCPColorScale(QCustomPlot *parentPlot) : QCPLayoutElement(parentPlot), mType(QCPAxis::atTop), // set to atTop such that setType(QCPAxis::atRight) below doesn't skip work because it thinks it's already atRight mDataScaleType(QCPAxis::stLinear), mBarWidth(20), mAxisRect(new QCPColorScaleAxisRectPrivate(this)) { setMinimumMargins(QMargins(0, 6, 0, 6)); // for default right color scale types, keep some room at bottom and top (important if no margin group is used) setType(QCPAxis::atRight); setDataRange(QCPRange(0, 6)); } QCPColorScale::~QCPColorScale() { delete mAxisRect; } /* undocumented getter */ QString QCPColorScale::label() const { if (!mColorAxis) { qDebug() << Q_FUNC_INFO << "internal color axis undefined"; return QString(); } return mColorAxis.data()->label(); } /* undocumented getter */ bool QCPColorScale::rangeDrag() const { if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return false; } return mAxisRect.data()->rangeDrag().testFlag(QCPAxis::orientation(mType)) && mAxisRect.data()->rangeDragAxis(QCPAxis::orientation(mType)) && mAxisRect.data()->rangeDragAxis(QCPAxis::orientation(mType))->orientation() == QCPAxis::orientation(mType); } /* undocumented getter */ bool QCPColorScale::rangeZoom() const { if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return false; } return mAxisRect.data()->rangeZoom().testFlag(QCPAxis::orientation(mType)) && mAxisRect.data()->rangeZoomAxis(QCPAxis::orientation(mType)) && mAxisRect.data()->rangeZoomAxis(QCPAxis::orientation(mType))->orientation() == QCPAxis::orientation(mType); } /*! Sets at which side of the color scale the axis is placed, and thus also its orientation. Note that after setting \a type to a different value, the axis returned by \ref axis() will be a different one. The new axis will adopt the following properties from the previous axis: The range, scale type, label and ticker (the latter will be shared and not copied). */ void QCPColorScale::setType(QCPAxis::AxisType type) { if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return; } if (mType != type) { mType = type; QCPRange rangeTransfer(0, 6); QString labelTransfer; QSharedPointer tickerTransfer; // transfer/revert some settings on old axis if it exists: bool doTransfer = (bool)mColorAxis; if (doTransfer) { rangeTransfer = mColorAxis.data()->range(); labelTransfer = mColorAxis.data()->label(); tickerTransfer = mColorAxis.data()->ticker(); mColorAxis.data()->setLabel(QString()); disconnect(mColorAxis.data(), SIGNAL(rangeChanged(QCPRange)), this, SLOT(setDataRange(QCPRange))); disconnect(mColorAxis.data(), SIGNAL(scaleTypeChanged(QCPAxis::ScaleType)), this, SLOT(setDataScaleType(QCPAxis::ScaleType))); } QList allAxisTypes = QList() << QCPAxis::atLeft << QCPAxis::atRight << QCPAxis::atBottom << QCPAxis::atTop; foreach (QCPAxis::AxisType atype, allAxisTypes) { mAxisRect.data()->axis(atype)->setTicks(atype == mType); mAxisRect.data()->axis(atype)->setTickLabels(atype== mType); } // set new mColorAxis pointer: mColorAxis = mAxisRect.data()->axis(mType); // transfer settings to new axis: if (doTransfer) { mColorAxis.data()->setRange(rangeTransfer); // range transfer necessary if axis changes from vertical to horizontal or vice versa (axes with same orientation are synchronized via signals) mColorAxis.data()->setLabel(labelTransfer); mColorAxis.data()->setTicker(tickerTransfer); } connect(mColorAxis.data(), SIGNAL(rangeChanged(QCPRange)), this, SLOT(setDataRange(QCPRange))); connect(mColorAxis.data(), SIGNAL(scaleTypeChanged(QCPAxis::ScaleType)), this, SLOT(setDataScaleType(QCPAxis::ScaleType))); mAxisRect.data()->setRangeDragAxes(QList() << mColorAxis.data()); } } /*! Sets the range spanned by the color gradient and that is shown by the axis in the color scale. It is equivalent to calling QCPColorMap::setDataRange on any of the connected color maps. It is also equivalent to directly accessing the \ref axis and setting its range with \ref QCPAxis::setRange. \see setDataScaleType, setGradient, rescaleDataRange */ void QCPColorScale::setDataRange(const QCPRange &dataRange) { if (mDataRange.lower != dataRange.lower || mDataRange.upper != dataRange.upper) { mDataRange = dataRange; if (mColorAxis) mColorAxis.data()->setRange(mDataRange); emit dataRangeChanged(mDataRange); } } /*! Sets the scale type of the color scale, i.e. whether values are linearly associated with colors or logarithmically. It is equivalent to calling QCPColorMap::setDataScaleType on any of the connected color maps. It is also equivalent to directly accessing the \ref axis and setting its scale type with \ref QCPAxis::setScaleType. \see setDataRange, setGradient */ void QCPColorScale::setDataScaleType(QCPAxis::ScaleType scaleType) { if (mDataScaleType != scaleType) { mDataScaleType = scaleType; if (mColorAxis) mColorAxis.data()->setScaleType(mDataScaleType); if (mDataScaleType == QCPAxis::stLogarithmic) setDataRange(mDataRange.sanitizedForLogScale()); emit dataScaleTypeChanged(mDataScaleType); } } /*! Sets the color gradient that will be used to represent data values. It is equivalent to calling QCPColorMap::setGradient on any of the connected color maps. \see setDataRange, setDataScaleType */ void QCPColorScale::setGradient(const QCPColorGradient &gradient) { if (mGradient != gradient) { mGradient = gradient; if (mAxisRect) mAxisRect.data()->mGradientImageInvalidated = true; emit gradientChanged(mGradient); } } /*! Sets the axis label of the color scale. This is equivalent to calling \ref QCPAxis::setLabel on the internal \ref axis. */ void QCPColorScale::setLabel(const QString &str) { if (!mColorAxis) { qDebug() << Q_FUNC_INFO << "internal color axis undefined"; return; } mColorAxis.data()->setLabel(str); } /*! Sets the width (or height, for horizontal color scales) the bar where the gradient is displayed will have. */ void QCPColorScale::setBarWidth(int width) { mBarWidth = width; } /*! Sets whether the user can drag the data range (\ref setDataRange). Note that \ref QCP::iRangeDrag must be in the QCustomPlot's interactions (\ref QCustomPlot::setInteractions) to allow range dragging. */ void QCPColorScale::setRangeDrag(bool enabled) { if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return; } if (enabled) mAxisRect.data()->setRangeDrag(QCPAxis::orientation(mType)); else mAxisRect.data()->setRangeDrag(0); } /*! Sets whether the user can zoom the data range (\ref setDataRange) by scrolling the mouse wheel. Note that \ref QCP::iRangeZoom must be in the QCustomPlot's interactions (\ref QCustomPlot::setInteractions) to allow range dragging. */ void QCPColorScale::setRangeZoom(bool enabled) { if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return; } if (enabled) mAxisRect.data()->setRangeZoom(QCPAxis::orientation(mType)); else mAxisRect.data()->setRangeZoom(0); } /*! Returns a list of all the color maps associated with this color scale. */ QList QCPColorScale::colorMaps() const { QList result; for (int i=0; iplottableCount(); ++i) { if (QCPColorMap *cm = qobject_cast(mParentPlot->plottable(i))) if (cm->colorScale() == this) result.append(cm); } return result; } /*! Changes the data range such that all color maps associated with this color scale are fully mapped to the gradient in the data dimension. \see setDataRange */ void QCPColorScale::rescaleDataRange(bool onlyVisibleMaps) { QList maps = colorMaps(); QCPRange newRange; bool haveRange = false; QCP::SignDomain sign = QCP::sdBoth; if (mDataScaleType == QCPAxis::stLogarithmic) sign = (mDataRange.upper < 0 ? QCP::sdNegative : QCP::sdPositive); for (int i=0; irealVisibility() && onlyVisibleMaps) continue; QCPRange mapRange; if (maps.at(i)->colorScale() == this) { bool currentFoundRange = true; mapRange = maps.at(i)->data()->dataBounds(); if (sign == QCP::sdPositive) { if (mapRange.lower <= 0 && mapRange.upper > 0) mapRange.lower = mapRange.upper*1e-3; else if (mapRange.lower <= 0 && mapRange.upper <= 0) currentFoundRange = false; } else if (sign == QCP::sdNegative) { if (mapRange.upper >= 0 && mapRange.lower < 0) mapRange.upper = mapRange.lower*1e-3; else if (mapRange.upper >= 0 && mapRange.lower >= 0) currentFoundRange = false; } if (currentFoundRange) { if (!haveRange) newRange = mapRange; else newRange.expand(mapRange); haveRange = true; } } } if (haveRange) { if (!QCPRange::validRange(newRange)) // likely due to range being zero (plottable has only constant data in this dimension), shift current range to at least center the data { double center = (newRange.lower+newRange.upper)*0.5; // upper and lower should be equal anyway, but just to make sure, incase validRange returned false for other reason if (mDataScaleType == QCPAxis::stLinear) { newRange.lower = center-mDataRange.size()/2.0; newRange.upper = center+mDataRange.size()/2.0; } else // mScaleType == stLogarithmic { newRange.lower = center/qSqrt(mDataRange.upper/mDataRange.lower); newRange.upper = center*qSqrt(mDataRange.upper/mDataRange.lower); } } setDataRange(newRange); } } /* inherits documentation from base class */ void QCPColorScale::update(UpdatePhase phase) { QCPLayoutElement::update(phase); if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return; } mAxisRect.data()->update(phase); switch (phase) { case upMargins: { if (mType == QCPAxis::atBottom || mType == QCPAxis::atTop) { setMaximumSize(QWIDGETSIZE_MAX, mBarWidth+mAxisRect.data()->margins().top()+mAxisRect.data()->margins().bottom()); setMinimumSize(0, mBarWidth+mAxisRect.data()->margins().top()+mAxisRect.data()->margins().bottom()); } else { setMaximumSize(mBarWidth+mAxisRect.data()->margins().left()+mAxisRect.data()->margins().right(), QWIDGETSIZE_MAX); setMinimumSize(mBarWidth+mAxisRect.data()->margins().left()+mAxisRect.data()->margins().right(), 0); } break; } case upLayout: { mAxisRect.data()->setOuterRect(rect()); break; } default: break; } } /* inherits documentation from base class */ void QCPColorScale::applyDefaultAntialiasingHint(QCPPainter *painter) const { painter->setAntialiasing(false); } /* inherits documentation from base class */ void QCPColorScale::mousePressEvent(QMouseEvent *event, const QVariant &details) { if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return; } mAxisRect.data()->mousePressEvent(event, details); } /* inherits documentation from base class */ void QCPColorScale::mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) { if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return; } mAxisRect.data()->mouseMoveEvent(event, startPos); } /* inherits documentation from base class */ void QCPColorScale::mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) { if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return; } mAxisRect.data()->mouseReleaseEvent(event, startPos); } /* inherits documentation from base class */ void QCPColorScale::wheelEvent(QWheelEvent *event) { if (!mAxisRect) { qDebug() << Q_FUNC_INFO << "internal axis rect was deleted"; return; } mAxisRect.data()->wheelEvent(event); } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPColorScaleAxisRectPrivate //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPColorScaleAxisRectPrivate \internal \brief An axis rect subclass for use in a QCPColorScale This is a private class and not part of the public QCustomPlot interface. It provides the axis rect functionality for the QCPColorScale class. */ /*! Creates a new instance, as a child of \a parentColorScale. */ QCPColorScaleAxisRectPrivate::QCPColorScaleAxisRectPrivate(QCPColorScale *parentColorScale) : QCPAxisRect(parentColorScale->parentPlot(), true), mParentColorScale(parentColorScale), mGradientImageInvalidated(true) { setParentLayerable(parentColorScale); setMinimumMargins(QMargins(0, 0, 0, 0)); QList allAxisTypes = QList() << QCPAxis::atBottom << QCPAxis::atTop << QCPAxis::atLeft << QCPAxis::atRight; foreach (QCPAxis::AxisType type, allAxisTypes) { axis(type)->setVisible(true); axis(type)->grid()->setVisible(false); axis(type)->setPadding(0); connect(axis(type), SIGNAL(selectionChanged(QCPAxis::SelectableParts)), this, SLOT(axisSelectionChanged(QCPAxis::SelectableParts))); connect(axis(type), SIGNAL(selectableChanged(QCPAxis::SelectableParts)), this, SLOT(axisSelectableChanged(QCPAxis::SelectableParts))); } connect(axis(QCPAxis::atLeft), SIGNAL(rangeChanged(QCPRange)), axis(QCPAxis::atRight), SLOT(setRange(QCPRange))); connect(axis(QCPAxis::atRight), SIGNAL(rangeChanged(QCPRange)), axis(QCPAxis::atLeft), SLOT(setRange(QCPRange))); connect(axis(QCPAxis::atBottom), SIGNAL(rangeChanged(QCPRange)), axis(QCPAxis::atTop), SLOT(setRange(QCPRange))); connect(axis(QCPAxis::atTop), SIGNAL(rangeChanged(QCPRange)), axis(QCPAxis::atBottom), SLOT(setRange(QCPRange))); connect(axis(QCPAxis::atLeft), SIGNAL(scaleTypeChanged(QCPAxis::ScaleType)), axis(QCPAxis::atRight), SLOT(setScaleType(QCPAxis::ScaleType))); connect(axis(QCPAxis::atRight), SIGNAL(scaleTypeChanged(QCPAxis::ScaleType)), axis(QCPAxis::atLeft), SLOT(setScaleType(QCPAxis::ScaleType))); connect(axis(QCPAxis::atBottom), SIGNAL(scaleTypeChanged(QCPAxis::ScaleType)), axis(QCPAxis::atTop), SLOT(setScaleType(QCPAxis::ScaleType))); connect(axis(QCPAxis::atTop), SIGNAL(scaleTypeChanged(QCPAxis::ScaleType)), axis(QCPAxis::atBottom), SLOT(setScaleType(QCPAxis::ScaleType))); // make layer transfers of color scale transfer to axis rect and axes // the axes must be set after axis rect, such that they appear above color gradient drawn by axis rect: connect(parentColorScale, SIGNAL(layerChanged(QCPLayer*)), this, SLOT(setLayer(QCPLayer*))); foreach (QCPAxis::AxisType type, allAxisTypes) connect(parentColorScale, SIGNAL(layerChanged(QCPLayer*)), axis(type), SLOT(setLayer(QCPLayer*))); } /*! \internal Updates the color gradient image if necessary, by calling \ref updateGradientImage, then draws it. Then the axes are drawn by calling the \ref QCPAxisRect::draw base class implementation. \seebaseclassmethod */ void QCPColorScaleAxisRectPrivate::draw(QCPPainter *painter) { if (mGradientImageInvalidated) updateGradientImage(); bool mirrorHorz = false; bool mirrorVert = false; if (mParentColorScale->mColorAxis) { mirrorHorz = mParentColorScale->mColorAxis.data()->rangeReversed() && (mParentColorScale->type() == QCPAxis::atBottom || mParentColorScale->type() == QCPAxis::atTop); mirrorVert = mParentColorScale->mColorAxis.data()->rangeReversed() && (mParentColorScale->type() == QCPAxis::atLeft || mParentColorScale->type() == QCPAxis::atRight); } painter->drawImage(rect().adjusted(0, -1, 0, -1), mGradientImage.mirrored(mirrorHorz, mirrorVert)); QCPAxisRect::draw(painter); } /*! \internal Uses the current gradient of the parent \ref QCPColorScale (specified in the constructor) to generate a gradient image. This gradient image will be used in the \ref draw method. */ void QCPColorScaleAxisRectPrivate::updateGradientImage() { if (rect().isEmpty()) return; const QImage::Format format = QImage::Format_ARGB32_Premultiplied; int n = mParentColorScale->mGradient.levelCount(); int w, h; QVector data(n); for (int i=0; imType == QCPAxis::atBottom || mParentColorScale->mType == QCPAxis::atTop) { w = n; h = rect().height(); mGradientImage = QImage(w, h, format); QVector pixels; for (int y=0; y(mGradientImage.scanLine(y))); mParentColorScale->mGradient.colorize(data.constData(), QCPRange(0, n-1), pixels.first(), n); for (int y=1; y(mGradientImage.scanLine(y)); const QRgb lineColor = mParentColorScale->mGradient.color(data[h-1-y], QCPRange(0, n-1)); for (int x=0; x allAxisTypes = QList() << QCPAxis::atBottom << QCPAxis::atTop << QCPAxis::atLeft << QCPAxis::atRight; foreach (QCPAxis::AxisType type, allAxisTypes) { if (QCPAxis *senderAxis = qobject_cast(sender())) if (senderAxis->axisType() == type) continue; if (axis(type)->selectableParts().testFlag(QCPAxis::spAxis)) { if (selectedParts.testFlag(QCPAxis::spAxis)) axis(type)->setSelectedParts(axis(type)->selectedParts() | QCPAxis::spAxis); else axis(type)->setSelectedParts(axis(type)->selectedParts() & ~QCPAxis::spAxis); } } } /*! \internal This slot is connected to the selectableChanged signals of the four axes in the constructor. It synchronizes the selectability of the axes. */ void QCPColorScaleAxisRectPrivate::axisSelectableChanged(QCPAxis::SelectableParts selectableParts) { // synchronize axis base selectability: QList allAxisTypes = QList() << QCPAxis::atBottom << QCPAxis::atTop << QCPAxis::atLeft << QCPAxis::atRight; foreach (QCPAxis::AxisType type, allAxisTypes) { if (QCPAxis *senderAxis = qobject_cast(sender())) if (senderAxis->axisType() == type) continue; if (axis(type)->selectableParts().testFlag(QCPAxis::spAxis)) { if (selectableParts.testFlag(QCPAxis::spAxis)) axis(type)->setSelectableParts(axis(type)->selectableParts() | QCPAxis::spAxis); else axis(type)->setSelectableParts(axis(type)->selectableParts() & ~QCPAxis::spAxis); } } } /* end of 'src/layoutelements/layoutelement-colorscale.cpp' */ /* including file 'src/plottables/plottable-graph.cpp', size 73960 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPGraphData //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPGraphData \brief Holds the data of one single data point for QCPGraph. The stored data is: \li \a key: coordinate on the key axis of this data point (this is the \a mainKey and the \a sortKey) \li \a value: coordinate on the value axis of this data point (this is the \a mainValue) The container for storing multiple data points is \ref QCPGraphDataContainer. It is a typedef for \ref QCPDataContainer with \ref QCPGraphData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods. \see QCPGraphDataContainer */ /* start documentation of inline functions */ /*! \fn double QCPGraphData::sortKey() const Returns the \a key member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static QCPGraphData QCPGraphData::fromSortKey(double sortKey) Returns a data point with the specified \a sortKey. All other members are set to zero. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static static bool QCPGraphData::sortKeyIsMainKey() Since the member \a key is both the data point key coordinate and the data ordering parameter, this method returns true. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPGraphData::mainKey() const Returns the \a key member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPGraphData::mainValue() const Returns the \a value member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn QCPRange QCPGraphData::valueRange() const Returns a QCPRange with both lower and upper boundary set to \a value of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /* end documentation of inline functions */ /*! Constructs a data point with key and value set to zero. */ QCPGraphData::QCPGraphData() : key(0), value(0) { } /*! Constructs a data point with the specified \a key and \a value. */ QCPGraphData::QCPGraphData(double key, double value) : key(key), value(value) { } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPGraph //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPGraph \brief A plottable representing a graph in a plot. \image html QCPGraph.png Usually you create new graphs by calling QCustomPlot::addGraph. The resulting instance can be accessed via QCustomPlot::graph. To plot data, assign it with the \ref setData or \ref addData functions. Alternatively, you can also access and modify the data via the \ref data method, which returns a pointer to the internal \ref QCPGraphDataContainer. Graphs are used to display single-valued data. Single-valued means that there should only be one data point per unique key coordinate. In other words, the graph can't have \a loops. If you do want to plot non-single-valued curves, rather use the QCPCurve plottable. Gaps in the graph line can be created by adding data points with NaN as value (qQNaN() or std::numeric_limits::quiet_NaN()) in between the two data points that shall be separated. \section qcpgraph-appearance Changing the appearance The appearance of the graph is mainly determined by the line style, scatter style, brush and pen of the graph (\ref setLineStyle, \ref setScatterStyle, \ref setBrush, \ref setPen). \subsection filling Filling under or between graphs QCPGraph knows two types of fills: Normal graph fills towards the zero-value-line parallel to the key axis of the graph, and fills between two graphs, called channel fills. To enable a fill, just set a brush with \ref setBrush which is neither Qt::NoBrush nor fully transparent. By default, a normal fill towards the zero-value-line will be drawn. To set up a channel fill between this graph and another one, call \ref setChannelFillGraph with the other graph as parameter. \see QCustomPlot::addGraph, QCustomPlot::graph */ /* start of documentation of inline functions */ /*! \fn QSharedPointer QCPGraph::data() const Returns a shared pointer to the internal data storage of type \ref QCPGraphDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular \ref setData or \ref addData methods. */ /* end of documentation of inline functions */ /*! Constructs a graph which uses \a keyAxis as its key axis ("x") and \a valueAxis as its value axis ("y"). \a keyAxis and \a valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though. The created QCPGraph is automatically registered with the QCustomPlot instance inferred from \a keyAxis. This QCustomPlot instance takes ownership of the QCPGraph, so do not delete it manually but use QCustomPlot::removePlottable() instead. To directly create a graph inside a plot, you can also use the simpler QCustomPlot::addGraph function. */ QCPGraph::QCPGraph(QCPAxis *keyAxis, QCPAxis *valueAxis) : QCPAbstractPlottable1D(keyAxis, valueAxis) { // special handling for QCPGraphs to maintain the simple graph interface: mParentPlot->registerGraph(this); setPen(QPen(Qt::blue, 0)); setBrush(Qt::NoBrush); setLineStyle(lsLine); setScatterSkip(0); setChannelFillGraph(0); setAdaptiveSampling(true); } QCPGraph::~QCPGraph() { } /*! \overload Replaces the current data container with the provided \a data container. Since a QSharedPointer is used, multiple QCPGraphs may share the same data container safely. Modifying the data in the container will then affect all graphs that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpgraph-datasharing-1 If you do not wish to share containers, but create a copy from an existing container, rather use the \ref QCPDataContainer::set method on the graph's data container directly: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpgraph-datasharing-2 \see addData */ void QCPGraph::setData(QSharedPointer data) { mDataContainer = data; } /*! \overload Replaces the current data with the provided points in \a keys and \a values. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a keys in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. \see addData */ void QCPGraph::setData(const QVector &keys, const QVector &values, bool alreadySorted) { mDataContainer->clear(); addData(keys, values, alreadySorted); } /*! Sets how the single data points are connected in the plot. For scatter-only plots, set \a ls to \ref lsNone and \ref setScatterStyle to the desired scatter style. \see setScatterStyle */ void QCPGraph::setLineStyle(LineStyle ls) { mLineStyle = ls; } /*! Sets the visual appearance of single data points in the plot. If set to \ref QCPScatterStyle::ssNone, no scatter points are drawn (e.g. for line-only-plots with appropriate line style). \see QCPScatterStyle, setLineStyle */ void QCPGraph::setScatterStyle(const QCPScatterStyle &style) { mScatterStyle = style; } /*! If scatters are displayed (scatter style not \ref QCPScatterStyle::ssNone), \a skip number of scatter points are skipped/not drawn after every drawn scatter point. This can be used to make the data appear sparser while for example still having a smooth line, and to improve performance for very high density plots. If \a skip is set to 0 (default), all scatter points are drawn. \see setScatterStyle */ void QCPGraph::setScatterSkip(int skip) { mScatterSkip = qMax(0, skip); } /*! Sets the target graph for filling the area between this graph and \a targetGraph with the current brush (\ref setBrush). When \a targetGraph is set to 0, a normal graph fill to the zero-value-line will be shown. To disable any filling, set the brush to Qt::NoBrush. \see setBrush */ void QCPGraph::setChannelFillGraph(QCPGraph *targetGraph) { // prevent setting channel target to this graph itself: if (targetGraph == this) { qDebug() << Q_FUNC_INFO << "targetGraph is this graph itself"; mChannelFillGraph = 0; return; } // prevent setting channel target to a graph not in the plot: if (targetGraph && targetGraph->mParentPlot != mParentPlot) { qDebug() << Q_FUNC_INFO << "targetGraph not in same plot"; mChannelFillGraph = 0; return; } mChannelFillGraph = targetGraph; } /*! Sets whether adaptive sampling shall be used when plotting this graph. QCustomPlot's adaptive sampling technique can drastically improve the replot performance for graphs with a larger number of points (e.g. above 10,000), without notably changing the appearance of the graph. By default, adaptive sampling is enabled. Even if enabled, QCustomPlot decides whether adaptive sampling shall actually be used on a per-graph basis. So leaving adaptive sampling enabled has no disadvantage in almost all cases. \image html adaptive-sampling-line.png "A line plot of 500,000 points without and with adaptive sampling" As can be seen, line plots experience no visual degradation from adaptive sampling. Outliers are reproduced reliably, as well as the overall shape of the data set. The replot time reduces dramatically though. This allows QCustomPlot to display large amounts of data in realtime. \image html adaptive-sampling-scatter.png "A scatter plot of 100,000 points without and with adaptive sampling" Care must be taken when using high-density scatter plots in combination with adaptive sampling. The adaptive sampling algorithm treats scatter plots more carefully than line plots which still gives a significant reduction of replot times, but not quite as much as for line plots. This is because scatter plots inherently need more data points to be preserved in order to still resemble the original, non-adaptive-sampling plot. As shown above, the results still aren't quite identical, as banding occurs for the outer data points. This is in fact intentional, such that the boundaries of the data cloud stay visible to the viewer. How strong the banding appears, depends on the point density, i.e. the number of points in the plot. For some situations with scatter plots it might thus be desirable to manually turn adaptive sampling off. For example, when saving the plot to disk. This can be achieved by setting \a enabled to false before issuing a command like \ref QCustomPlot::savePng, and setting \a enabled back to true afterwards. */ void QCPGraph::setAdaptiveSampling(bool enabled) { mAdaptiveSampling = enabled; } /*! \overload Adds the provided points in \a keys and \a values to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a keys in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPGraph::addData(const QVector &keys, const QVector &values, bool alreadySorted) { if (keys.size() != values.size()) qDebug() << Q_FUNC_INFO << "keys and values have different sizes:" << keys.size() << values.size(); const int n = qMin(keys.size(), values.size()); QVector tempData(n); QVector::iterator it = tempData.begin(); const QVector::iterator itEnd = tempData.end(); int i = 0; while (it != itEnd) { it->key = keys[i]; it->value = values[i]; ++it; ++i; } mDataContainer->add(tempData, alreadySorted); // don't modify tempData beyond this to prevent copy on write } /*! \overload Adds the provided data point as \a key and \a value to the current data. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPGraph::addData(double key, double value) { mDataContainer->add(QCPGraphData(key, value)); } /* inherits documentation from base class */ double QCPGraph::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return -1; if (!mKeyAxis || !mValueAxis) return -1; if (mKeyAxis.data()->axisRect()->rect().contains(pos.toPoint())) { QCPGraphDataContainer::const_iterator closestDataPoint = mDataContainer->constEnd(); double result = pointDistance(pos, closestDataPoint); if (details) { int pointIndex = closestDataPoint-mDataContainer->constBegin(); details->setValue(QCPDataSelection(QCPDataRange(pointIndex, pointIndex+1))); } return result; } else return -1; } /* inherits documentation from base class */ QCPRange QCPGraph::getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain) const { return mDataContainer->keyRange(foundRange, inSignDomain); } /* inherits documentation from base class */ QCPRange QCPGraph::getValueRange(bool &foundRange, QCP::SignDomain inSignDomain, const QCPRange &inKeyRange) const { return mDataContainer->valueRange(foundRange, inSignDomain, inKeyRange); } /* inherits documentation from base class */ void QCPGraph::draw(QCPPainter *painter) { if (!mKeyAxis || !mValueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } if (mKeyAxis.data()->range().size() <= 0 || mDataContainer->isEmpty()) return; if (mLineStyle == lsNone && mScatterStyle.isNone()) return; QVector lines, scatters; // line and (if necessary) scatter pixel coordinates will be stored here while iterating over segments // loop over and draw segments of unselected/selected data: QList selectedSegments, unselectedSegments, allSegments; getDataSegments(selectedSegments, unselectedSegments); allSegments << unselectedSegments << selectedSegments; for (int i=0; i= unselectedSegments.size(); // get line pixel points appropriate to line style: QCPDataRange lineDataRange = isSelectedSegment ? allSegments.at(i) : allSegments.at(i).adjusted(-1, 1); // unselected segments extend lines to bordering selected data point (safe to exceed total data bounds in first/last segment, getLines takes care) getLines(&lines, lineDataRange); // check data validity if flag set: #ifdef QCUSTOMPLOT_CHECK_DATA QCPGraphDataContainer::const_iterator it; for (it = mDataContainer->constBegin(); it != mDataContainer->constEnd(); ++it) { if (QCP::isInvalidData(it->key, it->value)) qDebug() << Q_FUNC_INFO << "Data point at" << it->key << "invalid." << "Plottable name:" << name(); } #endif // draw fill of graph: if (isSelectedSegment && mSelectionDecorator) mSelectionDecorator->applyBrush(painter); else painter->setBrush(mBrush); painter->setPen(Qt::NoPen); drawFill(painter, &lines); // draw line: if (mLineStyle != lsNone) { if (isSelectedSegment && mSelectionDecorator) mSelectionDecorator->applyPen(painter); else painter->setPen(mPen); painter->setBrush(Qt::NoBrush); if (mLineStyle == lsImpulse) drawImpulsePlot(painter, lines); else drawLinePlot(painter, lines); // also step plots can be drawn as a line plot } // draw scatters: QCPScatterStyle finalScatterStyle = mScatterStyle; if (isSelectedSegment && mSelectionDecorator) finalScatterStyle = mSelectionDecorator->getFinalScatterStyle(mScatterStyle); if (!finalScatterStyle.isNone()) { getScatters(&scatters, allSegments.at(i)); drawScatterPlot(painter, scatters, finalScatterStyle); } } // draw other selection decoration that isn't just line/scatter pens and brushes: if (mSelectionDecorator) mSelectionDecorator->drawDecoration(painter, selection()); } /* inherits documentation from base class */ void QCPGraph::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const { // draw fill: if (mBrush.style() != Qt::NoBrush) { applyFillAntialiasingHint(painter); painter->fillRect(QRectF(rect.left(), rect.top()+rect.height()/2.0, rect.width(), rect.height()/3.0), mBrush); } // draw line vertically centered: if (mLineStyle != lsNone) { applyDefaultAntialiasingHint(painter); painter->setPen(mPen); painter->drawLine(QLineF(rect.left(), rect.top()+rect.height()/2.0, rect.right()+5, rect.top()+rect.height()/2.0)); // +5 on x2 else last segment is missing from dashed/dotted pens } // draw scatter symbol: if (!mScatterStyle.isNone()) { applyScattersAntialiasingHint(painter); // scale scatter pixmap if it's too large to fit in legend icon rect: if (mScatterStyle.shape() == QCPScatterStyle::ssPixmap && (mScatterStyle.pixmap().size().width() > rect.width() || mScatterStyle.pixmap().size().height() > rect.height())) { QCPScatterStyle scaledStyle(mScatterStyle); scaledStyle.setPixmap(scaledStyle.pixmap().scaled(rect.size().toSize(), Qt::KeepAspectRatio, Qt::SmoothTransformation)); scaledStyle.applyTo(painter, mPen); scaledStyle.drawShape(painter, QRectF(rect).center()); } else { mScatterStyle.applyTo(painter, mPen); mScatterStyle.drawShape(painter, QRectF(rect).center()); } } } /*! \internal This method retrieves an optimized set of data points via \ref getOptimizedLineData, an branches out to the line style specific functions such as \ref dataToLines, \ref dataToStepLeftLines, etc. according to the line style of the graph. \a lines will be filled with points in pixel coordinates, that can be drawn with the according draw functions like \ref drawLinePlot and \ref drawImpulsePlot. The points returned in \a lines aren't necessarily the original data points. For example, step line styles require additional points to form the steps when drawn. If the line style of the graph is \ref lsNone, the \a lines vector will be empty. \a dataRange specifies the beginning and ending data indices that will be taken into account for conversion. In this function, the specified range may exceed the total data bounds without harm: a correspondingly trimmed data range will be used. This takes the burden off the user of this function to check for valid indices in \a dataRange, e.g. when extending ranges coming from \ref getDataSegments. \see getScatters */ void QCPGraph::getLines(QVector *lines, const QCPDataRange &dataRange) const { if (!lines) return; QCPGraphDataContainer::const_iterator begin, end; getVisibleDataBounds(begin, end, dataRange); if (begin == end) { lines->clear(); return; } QVector lineData; if (mLineStyle != lsNone) getOptimizedLineData(&lineData, begin, end); if (mKeyAxis->rangeReversed() != (mKeyAxis->orientation() == Qt::Vertical)) // make sure key pixels are sorted ascending in lineData (significantly simplifies following processing) std::reverse(lineData.begin(), lineData.end()); switch (mLineStyle) { case lsNone: lines->clear(); break; case lsLine: *lines = dataToLines(lineData); break; case lsStepLeft: *lines = dataToStepLeftLines(lineData); break; case lsStepRight: *lines = dataToStepRightLines(lineData); break; case lsStepCenter: *lines = dataToStepCenterLines(lineData); break; case lsImpulse: *lines = dataToImpulseLines(lineData); break; } } /*! \internal This method retrieves an optimized set of data points via \ref getOptimizedScatterData and then converts them to pixel coordinates. The resulting points are returned in \a scatters, and can be passed to \ref drawScatterPlot. \a dataRange specifies the beginning and ending data indices that will be taken into account for conversion. In this function, the specified range may exceed the total data bounds without harm: a correspondingly trimmed data range will be used. This takes the burden off the user of this function to check for valid indices in \a dataRange, e.g. when extending ranges coming from \ref getDataSegments. */ void QCPGraph::getScatters(QVector *scatters, const QCPDataRange &dataRange) const { if (!scatters) return; QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; scatters->clear(); return; } QCPGraphDataContainer::const_iterator begin, end; getVisibleDataBounds(begin, end, dataRange); if (begin == end) { scatters->clear(); return; } QVector data; getOptimizedScatterData(&data, begin, end); if (mKeyAxis->rangeReversed() != (mKeyAxis->orientation() == Qt::Vertical)) // make sure key pixels are sorted ascending in data (significantly simplifies following processing) std::reverse(data.begin(), data.end()); scatters->resize(data.size()); if (keyAxis->orientation() == Qt::Vertical) { for (int i=0; icoordToPixel(data.at(i).value)); (*scatters)[i].setY(keyAxis->coordToPixel(data.at(i).key)); } } } else { for (int i=0; icoordToPixel(data.at(i).key)); (*scatters)[i].setY(valueAxis->coordToPixel(data.at(i).value)); } } } } /*! \internal Takes raw data points in plot coordinates as \a data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style \ref lsLine. The source of \a data is usually \ref getOptimizedLineData, and this method is called in \a getLines if the line style is set accordingly. \see dataToStepLeftLines, dataToStepRightLines, dataToStepCenterLines, dataToImpulseLines, getLines, drawLinePlot */ QVector QCPGraph::dataToLines(const QVector &data) const { QVector result; QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return result; } result.resize(data.size()); // transform data points to pixels: if (keyAxis->orientation() == Qt::Vertical) { for (int i=0; icoordToPixel(data.at(i).value)); result[i].setY(keyAxis->coordToPixel(data.at(i).key)); } } else // key axis is horizontal { for (int i=0; icoordToPixel(data.at(i).key)); result[i].setY(valueAxis->coordToPixel(data.at(i).value)); } } return result; } /*! \internal Takes raw data points in plot coordinates as \a data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style \ref lsStepLeft. The source of \a data is usually \ref getOptimizedLineData, and this method is called in \a getLines if the line style is set accordingly. \see dataToLines, dataToStepRightLines, dataToStepCenterLines, dataToImpulseLines, getLines, drawLinePlot */ QVector QCPGraph::dataToStepLeftLines(const QVector &data) const { QVector result; QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return result; } result.resize(data.size()*2); // calculate steps from data and transform to pixel coordinates: if (keyAxis->orientation() == Qt::Vertical) { double lastValue = valueAxis->coordToPixel(data.first().value); for (int i=0; icoordToPixel(data.at(i).key); result[i*2+0].setX(lastValue); result[i*2+0].setY(key); lastValue = valueAxis->coordToPixel(data.at(i).value); result[i*2+1].setX(lastValue); result[i*2+1].setY(key); } } else // key axis is horizontal { double lastValue = valueAxis->coordToPixel(data.first().value); for (int i=0; icoordToPixel(data.at(i).key); result[i*2+0].setX(key); result[i*2+0].setY(lastValue); lastValue = valueAxis->coordToPixel(data.at(i).value); result[i*2+1].setX(key); result[i*2+1].setY(lastValue); } } return result; } /*! \internal Takes raw data points in plot coordinates as \a data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style \ref lsStepRight. The source of \a data is usually \ref getOptimizedLineData, and this method is called in \a getLines if the line style is set accordingly. \see dataToLines, dataToStepLeftLines, dataToStepCenterLines, dataToImpulseLines, getLines, drawLinePlot */ QVector QCPGraph::dataToStepRightLines(const QVector &data) const { QVector result; QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return result; } result.resize(data.size()*2); // calculate steps from data and transform to pixel coordinates: if (keyAxis->orientation() == Qt::Vertical) { double lastKey = keyAxis->coordToPixel(data.first().key); for (int i=0; icoordToPixel(data.at(i).value); result[i*2+0].setX(value); result[i*2+0].setY(lastKey); lastKey = keyAxis->coordToPixel(data.at(i).key); result[i*2+1].setX(value); result[i*2+1].setY(lastKey); } } else // key axis is horizontal { double lastKey = keyAxis->coordToPixel(data.first().key); for (int i=0; icoordToPixel(data.at(i).value); result[i*2+0].setX(lastKey); result[i*2+0].setY(value); lastKey = keyAxis->coordToPixel(data.at(i).key); result[i*2+1].setX(lastKey); result[i*2+1].setY(value); } } return result; } /*! \internal Takes raw data points in plot coordinates as \a data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style \ref lsStepCenter. The source of \a data is usually \ref getOptimizedLineData, and this method is called in \a getLines if the line style is set accordingly. \see dataToLines, dataToStepLeftLines, dataToStepRightLines, dataToImpulseLines, getLines, drawLinePlot */ QVector QCPGraph::dataToStepCenterLines(const QVector &data) const { QVector result; QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return result; } result.resize(data.size()*2); // calculate steps from data and transform to pixel coordinates: if (keyAxis->orientation() == Qt::Vertical) { double lastKey = keyAxis->coordToPixel(data.first().key); double lastValue = valueAxis->coordToPixel(data.first().value); result[0].setX(lastValue); result[0].setY(lastKey); for (int i=1; icoordToPixel(data.at(i).key)+lastKey)*0.5; result[i*2-1].setX(lastValue); result[i*2-1].setY(key); lastValue = valueAxis->coordToPixel(data.at(i).value); lastKey = keyAxis->coordToPixel(data.at(i).key); result[i*2+0].setX(lastValue); result[i*2+0].setY(key); } result[data.size()*2-1].setX(lastValue); result[data.size()*2-1].setY(lastKey); } else // key axis is horizontal { double lastKey = keyAxis->coordToPixel(data.first().key); double lastValue = valueAxis->coordToPixel(data.first().value); result[0].setX(lastKey); result[0].setY(lastValue); for (int i=1; icoordToPixel(data.at(i).key)+lastKey)*0.5; result[i*2-1].setX(key); result[i*2-1].setY(lastValue); lastValue = valueAxis->coordToPixel(data.at(i).value); lastKey = keyAxis->coordToPixel(data.at(i).key); result[i*2+0].setX(key); result[i*2+0].setY(lastValue); } result[data.size()*2-1].setX(lastKey); result[data.size()*2-1].setY(lastValue); } return result; } /*! \internal Takes raw data points in plot coordinates as \a data, and returns a vector containing pixel coordinate points which are suitable for drawing the line style \ref lsImpulse. The source of \a data is usually \ref getOptimizedLineData, and this method is called in \a getLines if the line style is set accordingly. \see dataToLines, dataToStepLeftLines, dataToStepRightLines, dataToStepCenterLines, getLines, drawImpulsePlot */ QVector QCPGraph::dataToImpulseLines(const QVector &data) const { QVector result; QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return result; } result.resize(data.size()*2); // transform data points to pixels: if (keyAxis->orientation() == Qt::Vertical) { for (int i=0; icoordToPixel(data.at(i).key); result[i*2+0].setX(valueAxis->coordToPixel(0)); result[i*2+0].setY(key); result[i*2+1].setX(valueAxis->coordToPixel(data.at(i).value)); result[i*2+1].setY(key); } } else // key axis is horizontal { for (int i=0; icoordToPixel(data.at(i).key); result[i*2+0].setX(key); result[i*2+0].setY(valueAxis->coordToPixel(0)); result[i*2+1].setX(key); result[i*2+1].setY(valueAxis->coordToPixel(data.at(i).value)); } } return result; } /*! \internal Draws the fill of the graph using the specified \a painter, with the currently set brush. Depending on whether a normal fill or a channel fill (\ref setChannelFillGraph) is needed, \ref getFillPolygon or \ref getChannelFillPolygon are used to find the according fill polygons. In order to handle NaN Data points correctly (the fill needs to be split into disjoint areas), this method first determines a list of non-NaN segments with \ref getNonNanSegments, on which to operate. In the channel fill case, \ref getOverlappingSegments is used to consolidate the non-NaN segments of the two involved graphs, before passing the overlapping pairs to \ref getChannelFillPolygon. Pass the points of this graph's line as \a lines, in pixel coordinates. \see drawLinePlot, drawImpulsePlot, drawScatterPlot */ void QCPGraph::drawFill(QCPPainter *painter, QVector *lines) const { if (mLineStyle == lsImpulse) return; // fill doesn't make sense for impulse plot if (painter->brush().style() == Qt::NoBrush || painter->brush().color().alpha() == 0) return; applyFillAntialiasingHint(painter); QVector segments = getNonNanSegments(lines, keyAxis()->orientation()); if (!mChannelFillGraph) { // draw base fill under graph, fill goes all the way to the zero-value-line: for (int i=0; idrawPolygon(getFillPolygon(lines, segments.at(i))); } else { // draw fill between this graph and mChannelFillGraph: QVector otherLines; mChannelFillGraph->getLines(&otherLines, QCPDataRange(0, mChannelFillGraph->dataCount())); if (!otherLines.isEmpty()) { QVector otherSegments = getNonNanSegments(&otherLines, mChannelFillGraph->keyAxis()->orientation()); QVector > segmentPairs = getOverlappingSegments(segments, lines, otherSegments, &otherLines); for (int i=0; idrawPolygon(getChannelFillPolygon(lines, segmentPairs.at(i).first, &otherLines, segmentPairs.at(i).second)); } } } /*! \internal Draws scatter symbols at every point passed in \a scatters, given in pixel coordinates. The scatters will be drawn with \a painter and have the appearance as specified in \a style. \see drawLinePlot, drawImpulsePlot */ void QCPGraph::drawScatterPlot(QCPPainter *painter, const QVector &scatters, const QCPScatterStyle &style) const { applyScattersAntialiasingHint(painter); style.applyTo(painter, mPen); for (int i=0; i &lines) const { if (painter->pen().style() != Qt::NoPen && painter->pen().color().alpha() != 0) { applyDefaultAntialiasingHint(painter); drawPolyline(painter, lines); } } /*! \internal Draws impulses from the provided data, i.e. it connects all line pairs in \a lines, given in pixel coordinates. The \a lines necessary for impulses are generated by \ref dataToImpulseLines from the regular graph data points. \see drawLinePlot, drawScatterPlot */ void QCPGraph::drawImpulsePlot(QCPPainter *painter, const QVector &lines) const { if (painter->pen().style() != Qt::NoPen && painter->pen().color().alpha() != 0) { applyDefaultAntialiasingHint(painter); QPen oldPen = painter->pen(); QPen newPen = painter->pen(); newPen.setCapStyle(Qt::FlatCap); // so impulse line doesn't reach beyond zero-line painter->setPen(newPen); painter->drawLines(lines); painter->setPen(oldPen); } } /*! \internal Returns via \a lineData the data points that need to be visualized for this graph when plotting graph lines, taking into consideration the currently visible axis ranges and, if \ref setAdaptiveSampling is enabled, local point densities. The considered data can be restricted further by \a begin and \a end, e.g. to only plot a certain segment of the data (see \ref getDataSegments). This method is used by \ref getLines to retrieve the basic working set of data. \see getOptimizedScatterData */ void QCPGraph::getOptimizedLineData(QVector *lineData, const QCPGraphDataContainer::const_iterator &begin, const QCPGraphDataContainer::const_iterator &end) const { if (!lineData) return; QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } if (begin == end) return; int dataCount = end-begin; int maxCount = std::numeric_limits::max(); if (mAdaptiveSampling) { double keyPixelSpan = qAbs(keyAxis->coordToPixel(begin->key)-keyAxis->coordToPixel((end-1)->key)); if (2*keyPixelSpan+2 < (double)std::numeric_limits::max()) maxCount = 2*keyPixelSpan+2; } if (mAdaptiveSampling && dataCount >= maxCount) // use adaptive sampling only if there are at least two points per pixel on average { QCPGraphDataContainer::const_iterator it = begin; double minValue = it->value; double maxValue = it->value; QCPGraphDataContainer::const_iterator currentIntervalFirstPoint = it; int reversedFactor = keyAxis->pixelOrientation(); // is used to calculate keyEpsilon pixel into the correct direction int reversedRound = reversedFactor==-1 ? 1 : 0; // is used to switch between floor (normal) and ceil (reversed) rounding of currentIntervalStartKey double currentIntervalStartKey = keyAxis->pixelToCoord((int)(keyAxis->coordToPixel(begin->key)+reversedRound)); double lastIntervalEndKey = currentIntervalStartKey; double keyEpsilon = qAbs(currentIntervalStartKey-keyAxis->pixelToCoord(keyAxis->coordToPixel(currentIntervalStartKey)+1.0*reversedFactor)); // interval of one pixel on screen when mapped to plot key coordinates bool keyEpsilonVariable = keyAxis->scaleType() == QCPAxis::stLogarithmic; // indicates whether keyEpsilon needs to be updated after every interval (for log axes) int intervalDataCount = 1; ++it; // advance iterator to second data point because adaptive sampling works in 1 point retrospect while (it != end) { if (it->key < currentIntervalStartKey+keyEpsilon) // data point is still within same pixel, so skip it and expand value span of this cluster if necessary { if (it->value < minValue) minValue = it->value; else if (it->value > maxValue) maxValue = it->value; ++intervalDataCount; } else // new pixel interval started { if (intervalDataCount >= 2) // last pixel had multiple data points, consolidate them to a cluster { if (lastIntervalEndKey < currentIntervalStartKey-keyEpsilon) // last point is further away, so first point of this cluster must be at a real data point lineData->append(QCPGraphData(currentIntervalStartKey+keyEpsilon*0.2, currentIntervalFirstPoint->value)); lineData->append(QCPGraphData(currentIntervalStartKey+keyEpsilon*0.25, minValue)); lineData->append(QCPGraphData(currentIntervalStartKey+keyEpsilon*0.75, maxValue)); if (it->key > currentIntervalStartKey+keyEpsilon*2) // new pixel started further away from previous cluster, so make sure the last point of the cluster is at a real data point lineData->append(QCPGraphData(currentIntervalStartKey+keyEpsilon*0.8, (it-1)->value)); } else lineData->append(QCPGraphData(currentIntervalFirstPoint->key, currentIntervalFirstPoint->value)); lastIntervalEndKey = (it-1)->key; minValue = it->value; maxValue = it->value; currentIntervalFirstPoint = it; currentIntervalStartKey = keyAxis->pixelToCoord((int)(keyAxis->coordToPixel(it->key)+reversedRound)); if (keyEpsilonVariable) keyEpsilon = qAbs(currentIntervalStartKey-keyAxis->pixelToCoord(keyAxis->coordToPixel(currentIntervalStartKey)+1.0*reversedFactor)); intervalDataCount = 1; } ++it; } // handle last interval: if (intervalDataCount >= 2) // last pixel had multiple data points, consolidate them to a cluster { if (lastIntervalEndKey < currentIntervalStartKey-keyEpsilon) // last point wasn't a cluster, so first point of this cluster must be at a real data point lineData->append(QCPGraphData(currentIntervalStartKey+keyEpsilon*0.2, currentIntervalFirstPoint->value)); lineData->append(QCPGraphData(currentIntervalStartKey+keyEpsilon*0.25, minValue)); lineData->append(QCPGraphData(currentIntervalStartKey+keyEpsilon*0.75, maxValue)); } else lineData->append(QCPGraphData(currentIntervalFirstPoint->key, currentIntervalFirstPoint->value)); } else // don't use adaptive sampling algorithm, transfer points one-to-one from the data container into the output { lineData->resize(dataCount); std::copy(begin, end, lineData->begin()); } } /*! \internal Returns via \a scatterData the data points that need to be visualized for this graph when plotting scatter points, taking into consideration the currently visible axis ranges and, if \ref setAdaptiveSampling is enabled, local point densities. The considered data can be restricted further by \a begin and \a end, e.g. to only plot a certain segment of the data (see \ref getDataSegments). This method is used by \ref getScatters to retrieve the basic working set of data. \see getOptimizedLineData */ void QCPGraph::getOptimizedScatterData(QVector *scatterData, QCPGraphDataContainer::const_iterator begin, QCPGraphDataContainer::const_iterator end) const { if (!scatterData) return; QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } const int scatterModulo = mScatterSkip+1; const bool doScatterSkip = mScatterSkip > 0; int beginIndex = begin-mDataContainer->constBegin(); int endIndex = end-mDataContainer->constBegin(); while (doScatterSkip && begin != end && beginIndex % scatterModulo != 0) // advance begin iterator to first non-skipped scatter { ++beginIndex; ++begin; } if (begin == end) return; int dataCount = end-begin; int maxCount = std::numeric_limits::max(); if (mAdaptiveSampling) { int keyPixelSpan = qAbs(keyAxis->coordToPixel(begin->key)-keyAxis->coordToPixel((end-1)->key)); maxCount = 2*keyPixelSpan+2; } if (mAdaptiveSampling && dataCount >= maxCount) // use adaptive sampling only if there are at least two points per pixel on average { double valueMaxRange = valueAxis->range().upper; double valueMinRange = valueAxis->range().lower; QCPGraphDataContainer::const_iterator it = begin; int itIndex = beginIndex; double minValue = it->value; double maxValue = it->value; QCPGraphDataContainer::const_iterator minValueIt = it; QCPGraphDataContainer::const_iterator maxValueIt = it; QCPGraphDataContainer::const_iterator currentIntervalStart = it; int reversedFactor = keyAxis->pixelOrientation(); // is used to calculate keyEpsilon pixel into the correct direction int reversedRound = reversedFactor==-1 ? 1 : 0; // is used to switch between floor (normal) and ceil (reversed) rounding of currentIntervalStartKey double currentIntervalStartKey = keyAxis->pixelToCoord((int)(keyAxis->coordToPixel(begin->key)+reversedRound)); double keyEpsilon = qAbs(currentIntervalStartKey-keyAxis->pixelToCoord(keyAxis->coordToPixel(currentIntervalStartKey)+1.0*reversedFactor)); // interval of one pixel on screen when mapped to plot key coordinates bool keyEpsilonVariable = keyAxis->scaleType() == QCPAxis::stLogarithmic; // indicates whether keyEpsilon needs to be updated after every interval (for log axes) int intervalDataCount = 1; // advance iterator to second (non-skipped) data point because adaptive sampling works in 1 point retrospect: if (!doScatterSkip) ++it; else { itIndex += scatterModulo; if (itIndex < endIndex) // make sure we didn't jump over end it += scatterModulo; else { it = end; itIndex = endIndex; } } // main loop over data points: while (it != end) { if (it->key < currentIntervalStartKey+keyEpsilon) // data point is still within same pixel, so skip it and expand value span of this pixel if necessary { if (it->value < minValue && it->value > valueMinRange && it->value < valueMaxRange) { minValue = it->value; minValueIt = it; } else if (it->value > maxValue && it->value > valueMinRange && it->value < valueMaxRange) { maxValue = it->value; maxValueIt = it; } ++intervalDataCount; } else // new pixel started { if (intervalDataCount >= 2) // last pixel had multiple data points, consolidate them { // determine value pixel span and add as many points in interval to maintain certain vertical data density (this is specific to scatter plot): double valuePixelSpan = qAbs(valueAxis->coordToPixel(minValue)-valueAxis->coordToPixel(maxValue)); int dataModulo = qMax(1, qRound(intervalDataCount/(valuePixelSpan/4.0))); // approximately every 4 value pixels one data point on average QCPGraphDataContainer::const_iterator intervalIt = currentIntervalStart; int c = 0; while (intervalIt != it) { if ((c % dataModulo == 0 || intervalIt == minValueIt || intervalIt == maxValueIt) && intervalIt->value > valueMinRange && intervalIt->value < valueMaxRange) scatterData->append(*intervalIt); ++c; if (!doScatterSkip) ++intervalIt; else intervalIt += scatterModulo; // since we know indices of "currentIntervalStart", "intervalIt" and "it" are multiples of scatterModulo, we can't accidentally jump over "it" here } } else if (currentIntervalStart->value > valueMinRange && currentIntervalStart->value < valueMaxRange) scatterData->append(*currentIntervalStart); minValue = it->value; maxValue = it->value; currentIntervalStart = it; currentIntervalStartKey = keyAxis->pixelToCoord((int)(keyAxis->coordToPixel(it->key)+reversedRound)); if (keyEpsilonVariable) keyEpsilon = qAbs(currentIntervalStartKey-keyAxis->pixelToCoord(keyAxis->coordToPixel(currentIntervalStartKey)+1.0*reversedFactor)); intervalDataCount = 1; } // advance to next data point: if (!doScatterSkip) ++it; else { itIndex += scatterModulo; if (itIndex < endIndex) // make sure we didn't jump over end it += scatterModulo; else { it = end; itIndex = endIndex; } } } // handle last interval: if (intervalDataCount >= 2) // last pixel had multiple data points, consolidate them { // determine value pixel span and add as many points in interval to maintain certain vertical data density (this is specific to scatter plot): double valuePixelSpan = qAbs(valueAxis->coordToPixel(minValue)-valueAxis->coordToPixel(maxValue)); int dataModulo = qMax(1, qRound(intervalDataCount/(valuePixelSpan/4.0))); // approximately every 4 value pixels one data point on average QCPGraphDataContainer::const_iterator intervalIt = currentIntervalStart; int intervalItIndex = intervalIt-mDataContainer->constBegin(); int c = 0; while (intervalIt != it) { if ((c % dataModulo == 0 || intervalIt == minValueIt || intervalIt == maxValueIt) && intervalIt->value > valueMinRange && intervalIt->value < valueMaxRange) scatterData->append(*intervalIt); ++c; if (!doScatterSkip) ++intervalIt; else // here we can't guarantee that adding scatterModulo doesn't exceed "it" (because "it" is equal to "end" here, and "end" isn't scatterModulo-aligned), so check via index comparison: { intervalItIndex += scatterModulo; if (intervalItIndex < itIndex) intervalIt += scatterModulo; else { intervalIt = it; intervalItIndex = itIndex; } } } } else if (currentIntervalStart->value > valueMinRange && currentIntervalStart->value < valueMaxRange) scatterData->append(*currentIntervalStart); } else // don't use adaptive sampling algorithm, transfer points one-to-one from the data container into the output { QCPGraphDataContainer::const_iterator it = begin; int itIndex = beginIndex; scatterData->reserve(dataCount); while (it != end) { scatterData->append(*it); // advance to next data point: if (!doScatterSkip) ++it; else { itIndex += scatterModulo; if (itIndex < endIndex) it += scatterModulo; else { it = end; itIndex = endIndex; } } } } } /*! This method outputs the currently visible data range via \a begin and \a end. The returned range will also never exceed \a rangeRestriction. This method takes into account that the drawing of data lines at the axis rect border always requires the points just outside the visible axis range. So \a begin and \a end may actually indicate a range that contains one additional data point to the left and right of the visible axis range. */ void QCPGraph::getVisibleDataBounds(QCPGraphDataContainer::const_iterator &begin, QCPGraphDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const { if (rangeRestriction.isEmpty()) { end = mDataContainer->constEnd(); begin = end; } else { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } // get visible data range: begin = mDataContainer->findBegin(keyAxis->range().lower); end = mDataContainer->findEnd(keyAxis->range().upper); // limit lower/upperEnd to rangeRestriction: mDataContainer->limitIteratorsToDataRange(begin, end, rangeRestriction); // this also ensures rangeRestriction outside data bounds doesn't break anything } } /*! \internal This method goes through the passed points in \a lineData and returns a list of the segments which don't contain NaN data points. \a keyOrientation defines whether the \a x or \a y member of the passed QPointF is used to check for NaN. If \a keyOrientation is \c Qt::Horizontal, the \a y member is checked, if it is \c Qt::Vertical, the \a x member is checked. \see getOverlappingSegments, drawFill */ QVector QCPGraph::getNonNanSegments(const QVector *lineData, Qt::Orientation keyOrientation) const { QVector result; const int n = lineData->size(); QCPDataRange currentSegment(-1, -1); int i = 0; if (keyOrientation == Qt::Horizontal) { while (i < n) { while (i < n && qIsNaN(lineData->at(i).y())) // seek next non-NaN data point ++i; if (i == n) break; currentSegment.setBegin(i++); while (i < n && !qIsNaN(lineData->at(i).y())) // seek next NaN data point or end of data ++i; currentSegment.setEnd(i++); result.append(currentSegment); } } else // keyOrientation == Qt::Vertical { while (i < n) { while (i < n && qIsNaN(lineData->at(i).x())) // seek next non-NaN data point ++i; if (i == n) break; currentSegment.setBegin(i++); while (i < n && !qIsNaN(lineData->at(i).x())) // seek next NaN data point or end of data ++i; currentSegment.setEnd(i++); result.append(currentSegment); } } return result; } /*! \internal This method takes two segment lists (e.g. created by \ref getNonNanSegments) \a thisSegments and \a otherSegments, and their associated point data \a thisData and \a otherData. It returns all pairs of segments (the first from \a thisSegments, the second from \a otherSegments), which overlap in plot coordinates. This method is useful in the case of a channel fill between two graphs, when only those non-NaN segments which actually overlap in their key coordinate shall be considered for drawing a channel fill polygon. It is assumed that the passed segments in \a thisSegments are ordered ascending by index, and that the segments don't overlap themselves. The same is assumed for the segments in \a otherSegments. This is fulfilled when the segments are obtained via \ref getNonNanSegments. \see getNonNanSegments, segmentsIntersect, drawFill, getChannelFillPolygon */ QVector > QCPGraph::getOverlappingSegments(QVector thisSegments, const QVector *thisData, QVector otherSegments, const QVector *otherData) const { QVector > result; if (thisData->isEmpty() || otherData->isEmpty() || thisSegments.isEmpty() || otherSegments.isEmpty()) return result; int thisIndex = 0; int otherIndex = 0; const bool verticalKey = mKeyAxis->orientation() == Qt::Vertical; while (thisIndex < thisSegments.size() && otherIndex < otherSegments.size()) { if (thisSegments.at(thisIndex).size() < 2) // segments with fewer than two points won't have a fill anyhow { ++thisIndex; continue; } if (otherSegments.at(otherIndex).size() < 2) // segments with fewer than two points won't have a fill anyhow { ++otherIndex; continue; } double thisLower, thisUpper, otherLower, otherUpper; if (!verticalKey) { thisLower = thisData->at(thisSegments.at(thisIndex).begin()).x(); thisUpper = thisData->at(thisSegments.at(thisIndex).end()-1).x(); otherLower = otherData->at(otherSegments.at(otherIndex).begin()).x(); otherUpper = otherData->at(otherSegments.at(otherIndex).end()-1).x(); } else { thisLower = thisData->at(thisSegments.at(thisIndex).begin()).y(); thisUpper = thisData->at(thisSegments.at(thisIndex).end()-1).y(); otherLower = otherData->at(otherSegments.at(otherIndex).begin()).y(); otherUpper = otherData->at(otherSegments.at(otherIndex).end()-1).y(); } int bPrecedence; if (segmentsIntersect(thisLower, thisUpper, otherLower, otherUpper, bPrecedence)) result.append(QPair(thisSegments.at(thisIndex), otherSegments.at(otherIndex))); if (bPrecedence <= 0) // otherSegment doesn't reach as far as thisSegment, so continue with next otherSegment, keeping current thisSegment ++otherIndex; else // otherSegment reaches further than thisSegment, so continue with next thisSegment, keeping current otherSegment ++thisIndex; } return result; } /*! \internal Returns whether the segments defined by the coordinates (aLower, aUpper) and (bLower, bUpper) have overlap. The output parameter \a bPrecedence indicates whether the \a b segment reaches farther than the \a a segment or not. If \a bPrecedence returns 1, segment \a b reaches the farthest to higher coordinates (i.e. bUpper > aUpper). If it returns -1, segment \a a reaches the farthest. Only if both segment's upper bounds are identical, 0 is returned as \a bPrecedence. It is assumed that the lower bounds always have smaller or equal values than the upper bounds. \see getOverlappingSegments */ bool QCPGraph::segmentsIntersect(double aLower, double aUpper, double bLower, double bUpper, int &bPrecedence) const { bPrecedence = 0; if (aLower > bUpper) { bPrecedence = -1; return false; } else if (bLower > aUpper) { bPrecedence = 1; return false; } else { if (aUpper > bUpper) bPrecedence = -1; else if (aUpper < bUpper) bPrecedence = 1; return true; } } /*! \internal Returns the point which closes the fill polygon on the zero-value-line parallel to the key axis. The logarithmic axis scale case is a bit special, since the zero-value-line in pixel coordinates is in positive or negative infinity. So this case is handled separately by just closing the fill polygon on the axis which lies in the direction towards the zero value. \a matchingDataPoint will provide the key (in pixels) of the returned point. Depending on whether the key axis of this graph is horizontal or vertical, \a matchingDataPoint will provide the x or y value of the returned point, respectively. */ QPointF QCPGraph::getFillBasePoint(QPointF matchingDataPoint) const { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return QPointF(); } QPointF result; if (valueAxis->scaleType() == QCPAxis::stLinear) { if (keyAxis->orientation() == Qt::Horizontal) { result.setX(matchingDataPoint.x()); result.setY(valueAxis->coordToPixel(0)); } else // keyAxis->orientation() == Qt::Vertical { result.setX(valueAxis->coordToPixel(0)); result.setY(matchingDataPoint.y()); } } else // valueAxis->mScaleType == QCPAxis::stLogarithmic { // In logarithmic scaling we can't just draw to value 0 so we just fill all the way // to the axis which is in the direction towards 0 if (keyAxis->orientation() == Qt::Vertical) { if ((valueAxis->range().upper < 0 && !valueAxis->rangeReversed()) || (valueAxis->range().upper > 0 && valueAxis->rangeReversed())) // if range is negative, zero is on opposite side of key axis result.setX(keyAxis->axisRect()->right()); else result.setX(keyAxis->axisRect()->left()); result.setY(matchingDataPoint.y()); } else if (keyAxis->axisType() == QCPAxis::atTop || keyAxis->axisType() == QCPAxis::atBottom) { result.setX(matchingDataPoint.x()); if ((valueAxis->range().upper < 0 && !valueAxis->rangeReversed()) || (valueAxis->range().upper > 0 && valueAxis->rangeReversed())) // if range is negative, zero is on opposite side of key axis result.setY(keyAxis->axisRect()->top()); else result.setY(keyAxis->axisRect()->bottom()); } } return result; } /*! \internal Returns the polygon needed for drawing normal fills between this graph and the key axis. Pass the graph's data points (in pixel coordinates) as \a lineData, and specify the \a segment which shall be used for the fill. The collection of \a lineData points described by \a segment must not contain NaN data points (see \ref getNonNanSegments). The returned fill polygon will be closed at the key axis (the zero-value line) for linear value axes. For logarithmic value axes the polygon will reach just beyond the corresponding axis rect side (see \ref getFillBasePoint). For increased performance (due to implicit sharing), keep the returned QPolygonF const. \see drawFill, getNonNanSegments */ const QPolygonF QCPGraph::getFillPolygon(const QVector *lineData, QCPDataRange segment) const { if (segment.size() < 2) return QPolygonF(); QPolygonF result(segment.size()+2); result[0] = getFillBasePoint(lineData->at(segment.begin())); std::copy(lineData->constBegin()+segment.begin(), lineData->constBegin()+segment.end(), result.begin()+1); result[result.size()-1] = getFillBasePoint(lineData->at(segment.end()-1)); return result; } /*! \internal Returns the polygon needed for drawing (partial) channel fills between this graph and the graph specified by \ref setChannelFillGraph. The data points of this graph are passed as pixel coordinates via \a thisData, the data of the other graph as \a otherData. The returned polygon will be calculated for the specified data segments \a thisSegment and \a otherSegment, pertaining to the respective \a thisData and \a otherData, respectively. The passed \a thisSegment and \a otherSegment should correspond to the segment pairs returned by \ref getOverlappingSegments, to make sure only segments that actually have key coordinate overlap need to be processed here. For increased performance due to implicit sharing, keep the returned QPolygonF const. \see drawFill, getOverlappingSegments, getNonNanSegments */ const QPolygonF QCPGraph::getChannelFillPolygon(const QVector *thisData, QCPDataRange thisSegment, const QVector *otherData, QCPDataRange otherSegment) const { if (!mChannelFillGraph) return QPolygonF(); QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return QPolygonF(); } if (!mChannelFillGraph.data()->mKeyAxis) { qDebug() << Q_FUNC_INFO << "channel fill target key axis invalid"; return QPolygonF(); } if (mChannelFillGraph.data()->mKeyAxis.data()->orientation() != keyAxis->orientation()) return QPolygonF(); // don't have same axis orientation, can't fill that (Note: if keyAxis fits, valueAxis will fit too, because it's always orthogonal to keyAxis) if (thisData->isEmpty()) return QPolygonF(); QVector thisSegmentData(thisSegment.size()); QVector otherSegmentData(otherSegment.size()); std::copy(thisData->constBegin()+thisSegment.begin(), thisData->constBegin()+thisSegment.end(), thisSegmentData.begin()); std::copy(otherData->constBegin()+otherSegment.begin(), otherData->constBegin()+otherSegment.end(), otherSegmentData.begin()); // pointers to be able to swap them, depending which data range needs cropping: QVector *staticData = &thisSegmentData; QVector *croppedData = &otherSegmentData; // crop both vectors to ranges in which the keys overlap (which coord is key, depends on axisType): if (keyAxis->orientation() == Qt::Horizontal) { // x is key // crop lower bound: if (staticData->first().x() < croppedData->first().x()) // other one must be cropped qSwap(staticData, croppedData); const int lowBound = findIndexBelowX(croppedData, staticData->first().x()); if (lowBound == -1) return QPolygonF(); // key ranges have no overlap croppedData->remove(0, lowBound); // set lowest point of cropped data to fit exactly key position of first static data point via linear interpolation: if (croppedData->size() < 2) return QPolygonF(); // need at least two points for interpolation double slope; if (!qFuzzyCompare(croppedData->at(1).x(), croppedData->at(0).x())) slope = (croppedData->at(1).y()-croppedData->at(0).y())/(croppedData->at(1).x()-croppedData->at(0).x()); else slope = 0; (*croppedData)[0].setY(croppedData->at(0).y()+slope*(staticData->first().x()-croppedData->at(0).x())); (*croppedData)[0].setX(staticData->first().x()); // crop upper bound: if (staticData->last().x() > croppedData->last().x()) // other one must be cropped qSwap(staticData, croppedData); int highBound = findIndexAboveX(croppedData, staticData->last().x()); if (highBound == -1) return QPolygonF(); // key ranges have no overlap croppedData->remove(highBound+1, croppedData->size()-(highBound+1)); // set highest point of cropped data to fit exactly key position of last static data point via linear interpolation: if (croppedData->size() < 2) return QPolygonF(); // need at least two points for interpolation const int li = croppedData->size()-1; // last index if (!qFuzzyCompare(croppedData->at(li).x(), croppedData->at(li-1).x())) slope = (croppedData->at(li).y()-croppedData->at(li-1).y())/(croppedData->at(li).x()-croppedData->at(li-1).x()); else slope = 0; (*croppedData)[li].setY(croppedData->at(li-1).y()+slope*(staticData->last().x()-croppedData->at(li-1).x())); (*croppedData)[li].setX(staticData->last().x()); } else // mKeyAxis->orientation() == Qt::Vertical { // y is key // crop lower bound: if (staticData->first().y() < croppedData->first().y()) // other one must be cropped qSwap(staticData, croppedData); int lowBound = findIndexBelowY(croppedData, staticData->first().y()); if (lowBound == -1) return QPolygonF(); // key ranges have no overlap croppedData->remove(0, lowBound); // set lowest point of cropped data to fit exactly key position of first static data point via linear interpolation: if (croppedData->size() < 2) return QPolygonF(); // need at least two points for interpolation double slope; if (!qFuzzyCompare(croppedData->at(1).y(), croppedData->at(0).y())) // avoid division by zero in step plots slope = (croppedData->at(1).x()-croppedData->at(0).x())/(croppedData->at(1).y()-croppedData->at(0).y()); else slope = 0; (*croppedData)[0].setX(croppedData->at(0).x()+slope*(staticData->first().y()-croppedData->at(0).y())); (*croppedData)[0].setY(staticData->first().y()); // crop upper bound: if (staticData->last().y() > croppedData->last().y()) // other one must be cropped qSwap(staticData, croppedData); int highBound = findIndexAboveY(croppedData, staticData->last().y()); if (highBound == -1) return QPolygonF(); // key ranges have no overlap croppedData->remove(highBound+1, croppedData->size()-(highBound+1)); // set highest point of cropped data to fit exactly key position of last static data point via linear interpolation: if (croppedData->size() < 2) return QPolygonF(); // need at least two points for interpolation int li = croppedData->size()-1; // last index if (!qFuzzyCompare(croppedData->at(li).y(), croppedData->at(li-1).y())) // avoid division by zero in step plots slope = (croppedData->at(li).x()-croppedData->at(li-1).x())/(croppedData->at(li).y()-croppedData->at(li-1).y()); else slope = 0; (*croppedData)[li].setX(croppedData->at(li-1).x()+slope*(staticData->last().y()-croppedData->at(li-1).y())); (*croppedData)[li].setY(staticData->last().y()); } // return joined: for (int i=otherSegmentData.size()-1; i>=0; --i) // insert reversed, otherwise the polygon will be twisted thisSegmentData << otherSegmentData.at(i); return QPolygonF(thisSegmentData); } /*! \internal Finds the smallest index of \a data, whose points x value is just above \a x. Assumes x values in \a data points are ordered ascending, as is ensured by \ref getLines/\ref getScatters if the key axis is horizontal. Used to calculate the channel fill polygon, see \ref getChannelFillPolygon. */ int QCPGraph::findIndexAboveX(const QVector *data, double x) const { for (int i=data->size()-1; i>=0; --i) { if (data->at(i).x() < x) { if (isize()-1) return i+1; else return data->size()-1; } } return -1; } /*! \internal Finds the highest index of \a data, whose points x value is just below \a x. Assumes x values in \a data points are ordered ascending, as is ensured by \ref getLines/\ref getScatters if the key axis is horizontal. Used to calculate the channel fill polygon, see \ref getChannelFillPolygon. */ int QCPGraph::findIndexBelowX(const QVector *data, double x) const { for (int i=0; isize(); ++i) { if (data->at(i).x() > x) { if (i>0) return i-1; else return 0; } } return -1; } /*! \internal Finds the smallest index of \a data, whose points y value is just above \a y. Assumes y values in \a data points are ordered ascending, as is ensured by \ref getLines/\ref getScatters if the key axis is vertical. Used to calculate the channel fill polygon, see \ref getChannelFillPolygon. */ int QCPGraph::findIndexAboveY(const QVector *data, double y) const { for (int i=data->size()-1; i>=0; --i) { if (data->at(i).y() < y) { if (isize()-1) return i+1; else return data->size()-1; } } return -1; } /*! \internal Calculates the minimum distance in pixels the graph's representation has from the given \a pixelPoint. This is used to determine whether the graph was clicked or not, e.g. in \ref selectTest. The closest data point to \a pixelPoint is returned in \a closestData. Note that if the graph has a line representation, the returned distance may be smaller than the distance to the \a closestData point, since the distance to the graph line is also taken into account. If either the graph has no data or if the line style is \ref lsNone and the scatter style's shape is \ref QCPScatterStyle::ssNone (i.e. there is no visual representation of the graph), returns -1.0. */ double QCPGraph::pointDistance(const QPointF &pixelPoint, QCPGraphDataContainer::const_iterator &closestData) const { closestData = mDataContainer->constEnd(); if (mDataContainer->isEmpty()) return -1.0; if (mLineStyle == lsNone && mScatterStyle.isNone()) return -1.0; // calculate minimum distances to graph data points and find closestData iterator: double minDistSqr = std::numeric_limits::max(); // determine which key range comes into question, taking selection tolerance around pos into account: double posKeyMin, posKeyMax, dummy; pixelsToCoords(pixelPoint-QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMin, dummy); pixelsToCoords(pixelPoint+QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMax, dummy); if (posKeyMin > posKeyMax) qSwap(posKeyMin, posKeyMax); // iterate over found data points and then choose the one with the shortest distance to pos: QCPGraphDataContainer::const_iterator begin = mDataContainer->findBegin(posKeyMin, true); QCPGraphDataContainer::const_iterator end = mDataContainer->findEnd(posKeyMax, true); for (QCPGraphDataContainer::const_iterator it=begin; it!=end; ++it) { const double currentDistSqr = QCPVector2D(coordsToPixels(it->key, it->value)-pixelPoint).lengthSquared(); if (currentDistSqr < minDistSqr) { minDistSqr = currentDistSqr; closestData = it; } } // calculate distance to graph line if there is one (if so, will probably be smaller than distance to closest data point): if (mLineStyle != lsNone) { // line displayed, calculate distance to line segments: QVector lineData; getLines(&lineData, QCPDataRange(0, dataCount())); QCPVector2D p(pixelPoint); const int step = mLineStyle==lsImpulse ? 2 : 1; // impulse plot differs from other line styles in that the lineData points are only pairwise connected for (int i=0; i *data, double y) const { for (int i=0; isize(); ++i) { if (data->at(i).y() > y) { if (i>0) return i-1; else return 0; } } return -1; } /* end of 'src/plottables/plottable-graph.cpp' */ /* including file 'src/plottables/plottable-curve.cpp', size 63527 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPCurveData //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPCurveData \brief Holds the data of one single data point for QCPCurve. The stored data is: \li \a t: the free ordering parameter of this curve point, like in the mathematical vector (x(t), y(t)). (This is the \a sortKey) \li \a key: coordinate on the key axis of this curve point (this is the \a mainKey) \li \a value: coordinate on the value axis of this curve point (this is the \a mainValue) The container for storing multiple data points is \ref QCPCurveDataContainer. It is a typedef for \ref QCPDataContainer with \ref QCPCurveData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods. \see QCPCurveDataContainer */ /* start documentation of inline functions */ /*! \fn double QCPCurveData::sortKey() const Returns the \a t member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static QCPCurveData QCPCurveData::fromSortKey(double sortKey) Returns a data point with the specified \a sortKey (assigned to the data point's \a t member). All other members are set to zero. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static static bool QCPCurveData::sortKeyIsMainKey() Since the member \a key is the data point key coordinate and the member \a t is the data ordering parameter, this method returns false. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPCurveData::mainKey() const Returns the \a key member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPCurveData::mainValue() const Returns the \a value member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn QCPRange QCPCurveData::valueRange() const Returns a QCPRange with both lower and upper boundary set to \a value of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /* end documentation of inline functions */ /*! Constructs a curve data point with t, key and value set to zero. */ QCPCurveData::QCPCurveData() : t(0), key(0), value(0) { } /*! Constructs a curve data point with the specified \a t, \a key and \a value. */ QCPCurveData::QCPCurveData(double t, double key, double value) : t(t), key(key), value(value) { } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPCurve //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPCurve \brief A plottable representing a parametric curve in a plot. \image html QCPCurve.png Unlike QCPGraph, plottables of this type may have multiple points with the same key coordinate, so their visual representation can have \a loops. This is realized by introducing a third coordinate \a t, which defines the order of the points described by the other two coordinates \a x and \a y. To plot data, assign it with the \ref setData or \ref addData functions. Alternatively, you can also access and modify the curve's data via the \ref data method, which returns a pointer to the internal \ref QCPCurveDataContainer. Gaps in the curve can be created by adding data points with NaN as key and value (qQNaN() or std::numeric_limits::quiet_NaN()) in between the two data points that shall be separated. \section qcpcurve-appearance Changing the appearance The appearance of the curve is determined by the pen and the brush (\ref setPen, \ref setBrush). \section qcpcurve-usage Usage Like all data representing objects in QCustomPlot, the QCPCurve is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::removePlottable, etc.) Usually, you first create an instance: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpcurve-creation-1 which registers it with the QCustomPlot instance of the passed axes. Note that this QCustomPlot instance takes ownership of the plottable, so do not delete it manually but use QCustomPlot::removePlottable() instead. The newly created plottable can be modified, e.g.: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpcurve-creation-2 */ /* start of documentation of inline functions */ /*! \fn QSharedPointer QCPCurve::data() const Returns a shared pointer to the internal data storage of type \ref QCPCurveDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular \ref setData or \ref addData methods. */ /* end of documentation of inline functions */ /*! Constructs a curve which uses \a keyAxis as its key axis ("x") and \a valueAxis as its value axis ("y"). \a keyAxis and \a valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though. The created QCPCurve is automatically registered with the QCustomPlot instance inferred from \a keyAxis. This QCustomPlot instance takes ownership of the QCPCurve, so do not delete it manually but use QCustomPlot::removePlottable() instead. */ QCPCurve::QCPCurve(QCPAxis *keyAxis, QCPAxis *valueAxis) : QCPAbstractPlottable1D(keyAxis, valueAxis) { // modify inherited properties from abstract plottable: setPen(QPen(Qt::blue, 0)); setBrush(Qt::NoBrush); setScatterStyle(QCPScatterStyle()); setLineStyle(lsLine); setScatterSkip(0); } QCPCurve::~QCPCurve() { } /*! \overload Replaces the current data container with the provided \a data container. Since a QSharedPointer is used, multiple QCPCurves may share the same data container safely. Modifying the data in the container will then affect all curves that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpcurve-datasharing-1 If you do not wish to share containers, but create a copy from an existing container, rather use the \ref QCPDataContainer::set method on the curve's data container directly: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpcurve-datasharing-2 \see addData */ void QCPCurve::setData(QSharedPointer data) { mDataContainer = data; } /*! \overload Replaces the current data with the provided points in \a t, \a keys and \a values. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a t in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. \see addData */ void QCPCurve::setData(const QVector &t, const QVector &keys, const QVector &values, bool alreadySorted) { mDataContainer->clear(); addData(t, keys, values, alreadySorted); } /*! \overload Replaces the current data with the provided points in \a keys and \a values. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. The t parameter of each data point will be set to the integer index of the respective key/value pair. \see addData */ void QCPCurve::setData(const QVector &keys, const QVector &values) { mDataContainer->clear(); addData(keys, values); } /*! Sets the visual appearance of single data points in the plot. If set to \ref QCPScatterStyle::ssNone, no scatter points are drawn (e.g. for line-only plots with appropriate line style). \see QCPScatterStyle, setLineStyle */ void QCPCurve::setScatterStyle(const QCPScatterStyle &style) { mScatterStyle = style; } /*! If scatters are displayed (scatter style not \ref QCPScatterStyle::ssNone), \a skip number of scatter points are skipped/not drawn after every drawn scatter point. This can be used to make the data appear sparser while for example still having a smooth line, and to improve performance for very high density plots. If \a skip is set to 0 (default), all scatter points are drawn. \see setScatterStyle */ void QCPCurve::setScatterSkip(int skip) { mScatterSkip = qMax(0, skip); } /*! Sets how the single data points are connected in the plot or how they are represented visually apart from the scatter symbol. For scatter-only plots, set \a style to \ref lsNone and \ref setScatterStyle to the desired scatter style. \see setScatterStyle */ void QCPCurve::setLineStyle(QCPCurve::LineStyle style) { mLineStyle = style; } /*! \overload Adds the provided points in \a t, \a keys and \a values to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a keys in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPCurve::addData(const QVector &t, const QVector &keys, const QVector &values, bool alreadySorted) { if (t.size() != keys.size() || t.size() != values.size()) qDebug() << Q_FUNC_INFO << "ts, keys and values have different sizes:" << t.size() << keys.size() << values.size(); const int n = qMin(qMin(t.size(), keys.size()), values.size()); QVector tempData(n); QVector::iterator it = tempData.begin(); const QVector::iterator itEnd = tempData.end(); int i = 0; while (it != itEnd) { it->t = t[i]; it->key = keys[i]; it->value = values[i]; ++it; ++i; } mDataContainer->add(tempData, alreadySorted); // don't modify tempData beyond this to prevent copy on write } /*! \overload Adds the provided points in \a keys and \a values to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. The t parameter of each data point will be set to the integer index of the respective key/value pair. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPCurve::addData(const QVector &keys, const QVector &values) { if (keys.size() != values.size()) qDebug() << Q_FUNC_INFO << "keys and values have different sizes:" << keys.size() << values.size(); const int n = qMin(keys.size(), values.size()); double tStart; if (!mDataContainer->isEmpty()) tStart = (mDataContainer->constEnd()-1)->t + 1.0; else tStart = 0; QVector tempData(n); QVector::iterator it = tempData.begin(); const QVector::iterator itEnd = tempData.end(); int i = 0; while (it != itEnd) { it->t = tStart + i; it->key = keys[i]; it->value = values[i]; ++it; ++i; } mDataContainer->add(tempData, true); // don't modify tempData beyond this to prevent copy on write } /*! \overload Adds the provided data point as \a t, \a key and \a value to the current data. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPCurve::addData(double t, double key, double value) { mDataContainer->add(QCPCurveData(t, key, value)); } /*! \overload Adds the provided data point as \a key and \a value to the current data. The t parameter is generated automatically by increments of 1 for each point, starting at the highest t of previously existing data or 0, if the curve data is empty. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPCurve::addData(double key, double value) { if (!mDataContainer->isEmpty()) mDataContainer->add(QCPCurveData((mDataContainer->constEnd()-1)->t + 1.0, key, value)); else mDataContainer->add(QCPCurveData(0.0, key, value)); } /* inherits documentation from base class */ double QCPCurve::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return -1; if (!mKeyAxis || !mValueAxis) return -1; if (mKeyAxis.data()->axisRect()->rect().contains(pos.toPoint())) { QCPCurveDataContainer::const_iterator closestDataPoint = mDataContainer->constEnd(); double result = pointDistance(pos, closestDataPoint); if (details) { int pointIndex = closestDataPoint-mDataContainer->constBegin(); details->setValue(QCPDataSelection(QCPDataRange(pointIndex, pointIndex+1))); } return result; } else return -1; } /* inherits documentation from base class */ QCPRange QCPCurve::getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain) const { return mDataContainer->keyRange(foundRange, inSignDomain); } /* inherits documentation from base class */ QCPRange QCPCurve::getValueRange(bool &foundRange, QCP::SignDomain inSignDomain, const QCPRange &inKeyRange) const { return mDataContainer->valueRange(foundRange, inSignDomain, inKeyRange); } /* inherits documentation from base class */ void QCPCurve::draw(QCPPainter *painter) { if (mDataContainer->isEmpty()) return; // allocate line vector: QVector lines, scatters; // loop over and draw segments of unselected/selected data: QList selectedSegments, unselectedSegments, allSegments; getDataSegments(selectedSegments, unselectedSegments); allSegments << unselectedSegments << selectedSegments; for (int i=0; i= unselectedSegments.size(); // fill with curve data: QPen finalCurvePen = mPen; // determine the final pen already here, because the line optimization depends on its stroke width if (isSelectedSegment && mSelectionDecorator) finalCurvePen = mSelectionDecorator->pen(); QCPDataRange lineDataRange = isSelectedSegment ? allSegments.at(i) : allSegments.at(i).adjusted(-1, 1); // unselected segments extend lines to bordering selected data point (safe to exceed total data bounds in first/last segment, getCurveLines takes care) getCurveLines(&lines, lineDataRange, finalCurvePen.widthF()); // check data validity if flag set: #ifdef QCUSTOMPLOT_CHECK_DATA for (QCPCurveDataContainer::const_iterator it = mDataContainer->constBegin(); it != mDataContainer->constEnd(); ++it) { if (QCP::isInvalidData(it->t) || QCP::isInvalidData(it->key, it->value)) qDebug() << Q_FUNC_INFO << "Data point at" << it->key << "invalid." << "Plottable name:" << name(); } #endif // draw curve fill: applyFillAntialiasingHint(painter); if (isSelectedSegment && mSelectionDecorator) mSelectionDecorator->applyBrush(painter); else painter->setBrush(mBrush); painter->setPen(Qt::NoPen); if (painter->brush().style() != Qt::NoBrush && painter->brush().color().alpha() != 0) painter->drawPolygon(QPolygonF(lines)); // draw curve line: if (mLineStyle != lsNone) { painter->setPen(finalCurvePen); painter->setBrush(Qt::NoBrush); drawCurveLine(painter, lines); } // draw scatters: QCPScatterStyle finalScatterStyle = mScatterStyle; if (isSelectedSegment && mSelectionDecorator) finalScatterStyle = mSelectionDecorator->getFinalScatterStyle(mScatterStyle); if (!finalScatterStyle.isNone()) { getScatters(&scatters, allSegments.at(i), finalScatterStyle.size()); drawScatterPlot(painter, scatters, finalScatterStyle); } } // draw other selection decoration that isn't just line/scatter pens and brushes: if (mSelectionDecorator) mSelectionDecorator->drawDecoration(painter, selection()); } /* inherits documentation from base class */ void QCPCurve::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const { // draw fill: if (mBrush.style() != Qt::NoBrush) { applyFillAntialiasingHint(painter); painter->fillRect(QRectF(rect.left(), rect.top()+rect.height()/2.0, rect.width(), rect.height()/3.0), mBrush); } // draw line vertically centered: if (mLineStyle != lsNone) { applyDefaultAntialiasingHint(painter); painter->setPen(mPen); painter->drawLine(QLineF(rect.left(), rect.top()+rect.height()/2.0, rect.right()+5, rect.top()+rect.height()/2.0)); // +5 on x2 else last segment is missing from dashed/dotted pens } // draw scatter symbol: if (!mScatterStyle.isNone()) { applyScattersAntialiasingHint(painter); // scale scatter pixmap if it's too large to fit in legend icon rect: if (mScatterStyle.shape() == QCPScatterStyle::ssPixmap && (mScatterStyle.pixmap().size().width() > rect.width() || mScatterStyle.pixmap().size().height() > rect.height())) { QCPScatterStyle scaledStyle(mScatterStyle); scaledStyle.setPixmap(scaledStyle.pixmap().scaled(rect.size().toSize(), Qt::KeepAspectRatio, Qt::SmoothTransformation)); scaledStyle.applyTo(painter, mPen); scaledStyle.drawShape(painter, QRectF(rect).center()); } else { mScatterStyle.applyTo(painter, mPen); mScatterStyle.drawShape(painter, QRectF(rect).center()); } } } /*! \internal Draws lines between the points in \a lines, given in pixel coordinates. \see drawScatterPlot, getCurveLines */ void QCPCurve::drawCurveLine(QCPPainter *painter, const QVector &lines) const { if (painter->pen().style() != Qt::NoPen && painter->pen().color().alpha() != 0) { applyDefaultAntialiasingHint(painter); drawPolyline(painter, lines); } } /*! \internal Draws scatter symbols at every point passed in \a points, given in pixel coordinates. The scatters will be drawn with \a painter and have the appearance as specified in \a style. \see drawCurveLine, getCurveLines */ void QCPCurve::drawScatterPlot(QCPPainter *painter, const QVector &points, const QCPScatterStyle &style) const { // draw scatter point symbols: applyScattersAntialiasingHint(painter); style.applyTo(painter, mPen); for (int i=0; i *lines, const QCPDataRange &dataRange, double penWidth) const { if (!lines) return; lines->clear(); QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } // add margins to rect to compensate for stroke width const double strokeMargin = qMax(qreal(1.0), qreal(penWidth*0.75)); // stroke radius + 50% safety const double keyMin = keyAxis->pixelToCoord(keyAxis->coordToPixel(keyAxis->range().lower)-strokeMargin*keyAxis->pixelOrientation()); const double keyMax = keyAxis->pixelToCoord(keyAxis->coordToPixel(keyAxis->range().upper)+strokeMargin*keyAxis->pixelOrientation()); const double valueMin = valueAxis->pixelToCoord(valueAxis->coordToPixel(valueAxis->range().lower)-strokeMargin*valueAxis->pixelOrientation()); const double valueMax = valueAxis->pixelToCoord(valueAxis->coordToPixel(valueAxis->range().upper)+strokeMargin*valueAxis->pixelOrientation()); QCPCurveDataContainer::const_iterator itBegin = mDataContainer->constBegin(); QCPCurveDataContainer::const_iterator itEnd = mDataContainer->constEnd(); mDataContainer->limitIteratorsToDataRange(itBegin, itEnd, dataRange); if (itBegin == itEnd) return; QCPCurveDataContainer::const_iterator it = itBegin; QCPCurveDataContainer::const_iterator prevIt = itEnd-1; int prevRegion = getRegion(prevIt->key, prevIt->value, keyMin, valueMax, keyMax, valueMin); QVector trailingPoints; // points that must be applied after all other points (are generated only when handling first point to get virtual segment between last and first point right) while (it != itEnd) { const int currentRegion = getRegion(it->key, it->value, keyMin, valueMax, keyMax, valueMin); if (currentRegion != prevRegion) // changed region, possibly need to add some optimized edge points or original points if entering R { if (currentRegion != 5) // segment doesn't end in R, so it's a candidate for removal { QPointF crossA, crossB; if (prevRegion == 5) // we're coming from R, so add this point optimized { lines->append(getOptimizedPoint(currentRegion, it->key, it->value, prevIt->key, prevIt->value, keyMin, valueMax, keyMax, valueMin)); // in the situations 5->1/7/9/3 the segment may leave R and directly cross through two outer regions. In these cases we need to add an additional corner point *lines << getOptimizedCornerPoints(prevRegion, currentRegion, prevIt->key, prevIt->value, it->key, it->value, keyMin, valueMax, keyMax, valueMin); } else if (mayTraverse(prevRegion, currentRegion) && getTraverse(prevIt->key, prevIt->value, it->key, it->value, keyMin, valueMax, keyMax, valueMin, crossA, crossB)) { // add the two cross points optimized if segment crosses R and if segment isn't virtual zeroth segment between last and first curve point: QVector beforeTraverseCornerPoints, afterTraverseCornerPoints; getTraverseCornerPoints(prevRegion, currentRegion, keyMin, valueMax, keyMax, valueMin, beforeTraverseCornerPoints, afterTraverseCornerPoints); if (it != itBegin) { *lines << beforeTraverseCornerPoints; lines->append(crossA); lines->append(crossB); *lines << afterTraverseCornerPoints; } else { lines->append(crossB); *lines << afterTraverseCornerPoints; trailingPoints << beforeTraverseCornerPoints << crossA ; } } else // doesn't cross R, line is just moving around in outside regions, so only need to add optimized point(s) at the boundary corner(s) { *lines << getOptimizedCornerPoints(prevRegion, currentRegion, prevIt->key, prevIt->value, it->key, it->value, keyMin, valueMax, keyMax, valueMin); } } else // segment does end in R, so we add previous point optimized and this point at original position { if (it == itBegin) // it is first point in curve and prevIt is last one. So save optimized point for adding it to the lineData in the end trailingPoints << getOptimizedPoint(prevRegion, prevIt->key, prevIt->value, it->key, it->value, keyMin, valueMax, keyMax, valueMin); else lines->append(getOptimizedPoint(prevRegion, prevIt->key, prevIt->value, it->key, it->value, keyMin, valueMax, keyMax, valueMin)); lines->append(coordsToPixels(it->key, it->value)); } } else // region didn't change { if (currentRegion == 5) // still in R, keep adding original points { lines->append(coordsToPixels(it->key, it->value)); } else // still outside R, no need to add anything { // see how this is not doing anything? That's the main optimization... } } prevIt = it; prevRegion = currentRegion; ++it; } *lines << trailingPoints; } /*! \internal Called by \ref draw to generate points in pixel coordinates which represent the scatters of the curve. If a scatter skip is configured (\ref setScatterSkip), the returned points are accordingly sparser. Scatters that aren't visible in the current axis rect are optimized away. \a scatters will be filled with points in pixel coordinates, that can be drawn with \ref drawScatterPlot. \a dataRange specifies the beginning and ending data indices that will be taken into account for conversion. \a scatterWidth specifies the scatter width that will be used to later draw the scatters at pixel coordinates generated by this function. This is needed here to calculate an accordingly wider margin around the axis rect when performing the data point reduction. \see draw, drawScatterPlot */ void QCPCurve::getScatters(QVector *scatters, const QCPDataRange &dataRange, double scatterWidth) const { if (!scatters) return; scatters->clear(); QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } QCPCurveDataContainer::const_iterator begin = mDataContainer->constBegin(); QCPCurveDataContainer::const_iterator end = mDataContainer->constEnd(); mDataContainer->limitIteratorsToDataRange(begin, end, dataRange); if (begin == end) return; const int scatterModulo = mScatterSkip+1; const bool doScatterSkip = mScatterSkip > 0; int endIndex = end-mDataContainer->constBegin(); QCPRange keyRange = keyAxis->range(); QCPRange valueRange = valueAxis->range(); // extend range to include width of scatter symbols: keyRange.lower = keyAxis->pixelToCoord(keyAxis->coordToPixel(keyRange.lower)-scatterWidth*keyAxis->pixelOrientation()); keyRange.upper = keyAxis->pixelToCoord(keyAxis->coordToPixel(keyRange.upper)+scatterWidth*keyAxis->pixelOrientation()); valueRange.lower = valueAxis->pixelToCoord(valueAxis->coordToPixel(valueRange.lower)-scatterWidth*valueAxis->pixelOrientation()); valueRange.upper = valueAxis->pixelToCoord(valueAxis->coordToPixel(valueRange.upper)+scatterWidth*valueAxis->pixelOrientation()); QCPCurveDataContainer::const_iterator it = begin; int itIndex = begin-mDataContainer->constBegin(); while (doScatterSkip && it != end && itIndex % scatterModulo != 0) // advance begin iterator to first non-skipped scatter { ++itIndex; ++it; } if (keyAxis->orientation() == Qt::Vertical) { while (it != end) { if (!qIsNaN(it->value) && keyRange.contains(it->key) && valueRange.contains(it->value)) scatters->append(QPointF(valueAxis->coordToPixel(it->value), keyAxis->coordToPixel(it->key))); // advance iterator to next (non-skipped) data point: if (!doScatterSkip) ++it; else { itIndex += scatterModulo; if (itIndex < endIndex) // make sure we didn't jump over end it += scatterModulo; else { it = end; itIndex = endIndex; } } } } else { while (it != end) { if (!qIsNaN(it->value) && keyRange.contains(it->key) && valueRange.contains(it->value)) scatters->append(QPointF(keyAxis->coordToPixel(it->key), valueAxis->coordToPixel(it->value))); // advance iterator to next (non-skipped) data point: if (!doScatterSkip) ++it; else { itIndex += scatterModulo; if (itIndex < endIndex) // make sure we didn't jump over end it += scatterModulo; else { it = end; itIndex = endIndex; } } } } } /*! \internal This function is part of the curve optimization algorithm of \ref getCurveLines. It returns the region of the given point (\a key, \a value) with respect to a rectangle defined by \a keyMin, \a keyMax, \a valueMin, and \a valueMax. The regions are enumerated from top to bottom (\a valueMin to \a valueMax) and left to right (\a keyMin to \a keyMax):
147
258
369
With the rectangle being region 5, and the outer regions extending infinitely outwards. In the curve optimization algorithm, region 5 is considered to be the visible portion of the plot. */ int QCPCurve::getRegion(double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const { if (key < keyMin) // region 123 { if (value > valueMax) return 1; else if (value < valueMin) return 3; else return 2; } else if (key > keyMax) // region 789 { if (value > valueMax) return 7; else if (value < valueMin) return 9; else return 8; } else // region 456 { if (value > valueMax) return 4; else if (value < valueMin) return 6; else return 5; } } /*! \internal This function is part of the curve optimization algorithm of \ref getCurveLines. This method is used in case the current segment passes from inside the visible rect (region 5, see \ref getRegion) to any of the outer regions (\a otherRegion). The current segment is given by the line connecting (\a key, \a value) with (\a otherKey, \a otherValue). It returns the intersection point of the segment with the border of region 5. For this function it doesn't matter whether (\a key, \a value) is the point inside region 5 or whether it's (\a otherKey, \a otherValue), i.e. whether the segment is coming from region 5 or leaving it. It is important though that \a otherRegion correctly identifies the other region not equal to 5. */ QPointF QCPCurve::getOptimizedPoint(int otherRegion, double otherKey, double otherValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const { // The intersection point interpolation here is done in pixel coordinates, so we don't need to // differentiate between different axis scale types. Note that the nomenclature // top/left/bottom/right/min/max is with respect to the rect in plot coordinates, wich may be // different in pixel coordinates (horz/vert key axes, reversed ranges) const double keyMinPx = mKeyAxis->coordToPixel(keyMin); const double keyMaxPx = mKeyAxis->coordToPixel(keyMax); const double valueMinPx = mValueAxis->coordToPixel(valueMin); const double valueMaxPx = mValueAxis->coordToPixel(valueMax); const double otherValuePx = mValueAxis->coordToPixel(otherValue); const double valuePx = mValueAxis->coordToPixel(value); const double otherKeyPx = mKeyAxis->coordToPixel(otherKey); const double keyPx = mKeyAxis->coordToPixel(key); double intersectKeyPx = keyMinPx; // initial key just a fail-safe double intersectValuePx = valueMinPx; // initial value just a fail-safe switch (otherRegion) { case 1: // top and left edge { intersectValuePx = valueMaxPx; intersectKeyPx = otherKeyPx + (keyPx-otherKeyPx)/(valuePx-otherValuePx)*(intersectValuePx-otherValuePx); if (intersectKeyPx < qMin(keyMinPx, keyMaxPx) || intersectKeyPx > qMax(keyMinPx, keyMaxPx)) // check whether top edge is not intersected, then it must be left edge (qMin/qMax necessary since axes may be reversed) { intersectKeyPx = keyMinPx; intersectValuePx = otherValuePx + (valuePx-otherValuePx)/(keyPx-otherKeyPx)*(intersectKeyPx-otherKeyPx); } break; } case 2: // left edge { intersectKeyPx = keyMinPx; intersectValuePx = otherValuePx + (valuePx-otherValuePx)/(keyPx-otherKeyPx)*(intersectKeyPx-otherKeyPx); break; } case 3: // bottom and left edge { intersectValuePx = valueMinPx; intersectKeyPx = otherKeyPx + (keyPx-otherKeyPx)/(valuePx-otherValuePx)*(intersectValuePx-otherValuePx); if (intersectKeyPx < qMin(keyMinPx, keyMaxPx) || intersectKeyPx > qMax(keyMinPx, keyMaxPx)) // check whether bottom edge is not intersected, then it must be left edge (qMin/qMax necessary since axes may be reversed) { intersectKeyPx = keyMinPx; intersectValuePx = otherValuePx + (valuePx-otherValuePx)/(keyPx-otherKeyPx)*(intersectKeyPx-otherKeyPx); } break; } case 4: // top edge { intersectValuePx = valueMaxPx; intersectKeyPx = otherKeyPx + (keyPx-otherKeyPx)/(valuePx-otherValuePx)*(intersectValuePx-otherValuePx); break; } case 5: { break; // case 5 shouldn't happen for this function but we add it anyway to prevent potential discontinuity in branch table } case 6: // bottom edge { intersectValuePx = valueMinPx; intersectKeyPx = otherKeyPx + (keyPx-otherKeyPx)/(valuePx-otherValuePx)*(intersectValuePx-otherValuePx); break; } case 7: // top and right edge { intersectValuePx = valueMaxPx; intersectKeyPx = otherKeyPx + (keyPx-otherKeyPx)/(valuePx-otherValuePx)*(intersectValuePx-otherValuePx); if (intersectKeyPx < qMin(keyMinPx, keyMaxPx) || intersectKeyPx > qMax(keyMinPx, keyMaxPx)) // check whether top edge is not intersected, then it must be right edge (qMin/qMax necessary since axes may be reversed) { intersectKeyPx = keyMaxPx; intersectValuePx = otherValuePx + (valuePx-otherValuePx)/(keyPx-otherKeyPx)*(intersectKeyPx-otherKeyPx); } break; } case 8: // right edge { intersectKeyPx = keyMaxPx; intersectValuePx = otherValuePx + (valuePx-otherValuePx)/(keyPx-otherKeyPx)*(intersectKeyPx-otherKeyPx); break; } case 9: // bottom and right edge { intersectValuePx = valueMinPx; intersectKeyPx = otherKeyPx + (keyPx-otherKeyPx)/(valuePx-otherValuePx)*(intersectValuePx-otherValuePx); if (intersectKeyPx < qMin(keyMinPx, keyMaxPx) || intersectKeyPx > qMax(keyMinPx, keyMaxPx)) // check whether bottom edge is not intersected, then it must be right edge (qMin/qMax necessary since axes may be reversed) { intersectKeyPx = keyMaxPx; intersectValuePx = otherValuePx + (valuePx-otherValuePx)/(keyPx-otherKeyPx)*(intersectKeyPx-otherKeyPx); } break; } } if (mKeyAxis->orientation() == Qt::Horizontal) return QPointF(intersectKeyPx, intersectValuePx); else return QPointF(intersectValuePx, intersectKeyPx); } /*! \internal This function is part of the curve optimization algorithm of \ref getCurveLines. In situations where a single segment skips over multiple regions it might become necessary to add extra points at the corners of region 5 (see \ref getRegion) such that the optimized segment doesn't unintentionally cut through the visible area of the axis rect and create plot artifacts. This method provides these points that must be added, assuming the original segment doesn't start, end, or traverse region 5. (Corner points where region 5 is traversed are calculated by \ref getTraverseCornerPoints.) For example, consider a segment which directly goes from region 4 to 2 but originally is far out to the top left such that it doesn't cross region 5. Naively optimizing these points by projecting them on the top and left borders of region 5 will create a segment that surely crosses 5, creating a visual artifact in the plot. This method prevents this by providing extra points at the top left corner, making the optimized curve correctly pass from region 4 to 1 to 2 without traversing 5. */ QVector QCPCurve::getOptimizedCornerPoints(int prevRegion, int currentRegion, double prevKey, double prevValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const { QVector result; switch (prevRegion) { case 1: { switch (currentRegion) { case 2: { result << coordsToPixels(keyMin, valueMax); break; } case 4: { result << coordsToPixels(keyMin, valueMax); break; } case 3: { result << coordsToPixels(keyMin, valueMax) << coordsToPixels(keyMin, valueMin); break; } case 7: { result << coordsToPixels(keyMin, valueMax) << coordsToPixels(keyMax, valueMax); break; } case 6: { result << coordsToPixels(keyMin, valueMax) << coordsToPixels(keyMin, valueMin); result.append(result.last()); break; } case 8: { result << coordsToPixels(keyMin, valueMax) << coordsToPixels(keyMax, valueMax); result.append(result.last()); break; } case 9: { // in this case we need another distinction of cases: segment may pass below or above rect, requiring either bottom right or top left corner points if ((value-prevValue)/(key-prevKey)*(keyMin-key)+value < valueMin) // segment passes below R { result << coordsToPixels(keyMin, valueMax) << coordsToPixels(keyMin, valueMin); result.append(result.last()); result << coordsToPixels(keyMax, valueMin); } else { result << coordsToPixels(keyMin, valueMax) << coordsToPixels(keyMax, valueMax); result.append(result.last()); result << coordsToPixels(keyMax, valueMin); } break; } } break; } case 2: { switch (currentRegion) { case 1: { result << coordsToPixels(keyMin, valueMax); break; } case 3: { result << coordsToPixels(keyMin, valueMin); break; } case 4: { result << coordsToPixels(keyMin, valueMax); result.append(result.last()); break; } case 6: { result << coordsToPixels(keyMin, valueMin); result.append(result.last()); break; } case 7: { result << coordsToPixels(keyMin, valueMax); result.append(result.last()); result << coordsToPixels(keyMax, valueMax); break; } case 9: { result << coordsToPixels(keyMin, valueMin); result.append(result.last()); result << coordsToPixels(keyMax, valueMin); break; } } break; } case 3: { switch (currentRegion) { case 2: { result << coordsToPixels(keyMin, valueMin); break; } case 6: { result << coordsToPixels(keyMin, valueMin); break; } case 1: { result << coordsToPixels(keyMin, valueMin) << coordsToPixels(keyMin, valueMax); break; } case 9: { result << coordsToPixels(keyMin, valueMin) << coordsToPixels(keyMax, valueMin); break; } case 4: { result << coordsToPixels(keyMin, valueMin) << coordsToPixels(keyMin, valueMax); result.append(result.last()); break; } case 8: { result << coordsToPixels(keyMin, valueMin) << coordsToPixels(keyMax, valueMin); result.append(result.last()); break; } case 7: { // in this case we need another distinction of cases: segment may pass below or above rect, requiring either bottom right or top left corner points if ((value-prevValue)/(key-prevKey)*(keyMax-key)+value < valueMin) // segment passes below R { result << coordsToPixels(keyMin, valueMin) << coordsToPixels(keyMax, valueMin); result.append(result.last()); result << coordsToPixels(keyMax, valueMax); } else { result << coordsToPixels(keyMin, valueMin) << coordsToPixels(keyMin, valueMax); result.append(result.last()); result << coordsToPixels(keyMax, valueMax); } break; } } break; } case 4: { switch (currentRegion) { case 1: { result << coordsToPixels(keyMin, valueMax); break; } case 7: { result << coordsToPixels(keyMax, valueMax); break; } case 2: { result << coordsToPixels(keyMin, valueMax); result.append(result.last()); break; } case 8: { result << coordsToPixels(keyMax, valueMax); result.append(result.last()); break; } case 3: { result << coordsToPixels(keyMin, valueMax); result.append(result.last()); result << coordsToPixels(keyMin, valueMin); break; } case 9: { result << coordsToPixels(keyMax, valueMax); result.append(result.last()); result << coordsToPixels(keyMax, valueMin); break; } } break; } case 5: { switch (currentRegion) { case 1: { result << coordsToPixels(keyMin, valueMax); break; } case 7: { result << coordsToPixels(keyMax, valueMax); break; } case 9: { result << coordsToPixels(keyMax, valueMin); break; } case 3: { result << coordsToPixels(keyMin, valueMin); break; } } break; } case 6: { switch (currentRegion) { case 3: { result << coordsToPixels(keyMin, valueMin); break; } case 9: { result << coordsToPixels(keyMax, valueMin); break; } case 2: { result << coordsToPixels(keyMin, valueMin); result.append(result.last()); break; } case 8: { result << coordsToPixels(keyMax, valueMin); result.append(result.last()); break; } case 1: { result << coordsToPixels(keyMin, valueMin); result.append(result.last()); result << coordsToPixels(keyMin, valueMax); break; } case 7: { result << coordsToPixels(keyMax, valueMin); result.append(result.last()); result << coordsToPixels(keyMax, valueMax); break; } } break; } case 7: { switch (currentRegion) { case 4: { result << coordsToPixels(keyMax, valueMax); break; } case 8: { result << coordsToPixels(keyMax, valueMax); break; } case 1: { result << coordsToPixels(keyMax, valueMax) << coordsToPixels(keyMin, valueMax); break; } case 9: { result << coordsToPixels(keyMax, valueMax) << coordsToPixels(keyMax, valueMin); break; } case 2: { result << coordsToPixels(keyMax, valueMax) << coordsToPixels(keyMin, valueMax); result.append(result.last()); break; } case 6: { result << coordsToPixels(keyMax, valueMax) << coordsToPixels(keyMax, valueMin); result.append(result.last()); break; } case 3: { // in this case we need another distinction of cases: segment may pass below or above rect, requiring either bottom right or top left corner points if ((value-prevValue)/(key-prevKey)*(keyMax-key)+value < valueMin) // segment passes below R { result << coordsToPixels(keyMax, valueMax) << coordsToPixels(keyMax, valueMin); result.append(result.last()); result << coordsToPixels(keyMin, valueMin); } else { result << coordsToPixels(keyMax, valueMax) << coordsToPixels(keyMin, valueMax); result.append(result.last()); result << coordsToPixels(keyMin, valueMin); } break; } } break; } case 8: { switch (currentRegion) { case 7: { result << coordsToPixels(keyMax, valueMax); break; } case 9: { result << coordsToPixels(keyMax, valueMin); break; } case 4: { result << coordsToPixels(keyMax, valueMax); result.append(result.last()); break; } case 6: { result << coordsToPixels(keyMax, valueMin); result.append(result.last()); break; } case 1: { result << coordsToPixels(keyMax, valueMax); result.append(result.last()); result << coordsToPixels(keyMin, valueMax); break; } case 3: { result << coordsToPixels(keyMax, valueMin); result.append(result.last()); result << coordsToPixels(keyMin, valueMin); break; } } break; } case 9: { switch (currentRegion) { case 6: { result << coordsToPixels(keyMax, valueMin); break; } case 8: { result << coordsToPixels(keyMax, valueMin); break; } case 3: { result << coordsToPixels(keyMax, valueMin) << coordsToPixels(keyMin, valueMin); break; } case 7: { result << coordsToPixels(keyMax, valueMin) << coordsToPixels(keyMax, valueMax); break; } case 2: { result << coordsToPixels(keyMax, valueMin) << coordsToPixels(keyMin, valueMin); result.append(result.last()); break; } case 4: { result << coordsToPixels(keyMax, valueMin) << coordsToPixels(keyMax, valueMax); result.append(result.last()); break; } case 1: { // in this case we need another distinction of cases: segment may pass below or above rect, requiring either bottom right or top left corner points if ((value-prevValue)/(key-prevKey)*(keyMin-key)+value < valueMin) // segment passes below R { result << coordsToPixels(keyMax, valueMin) << coordsToPixels(keyMin, valueMin); result.append(result.last()); result << coordsToPixels(keyMin, valueMax); } else { result << coordsToPixels(keyMax, valueMin) << coordsToPixels(keyMax, valueMax); result.append(result.last()); result << coordsToPixels(keyMin, valueMax); } break; } } break; } } return result; } /*! \internal This function is part of the curve optimization algorithm of \ref getCurveLines. This method returns whether a segment going from \a prevRegion to \a currentRegion (see \ref getRegion) may traverse the visible region 5. This function assumes that neither \a prevRegion nor \a currentRegion is 5 itself. If this method returns false, the segment for sure doesn't pass region 5. If it returns true, the segment may or may not pass region 5 and a more fine-grained calculation must be used (\ref getTraverse). */ bool QCPCurve::mayTraverse(int prevRegion, int currentRegion) const { switch (prevRegion) { case 1: { switch (currentRegion) { case 4: case 7: case 2: case 3: return false; default: return true; } } case 2: { switch (currentRegion) { case 1: case 3: return false; default: return true; } } case 3: { switch (currentRegion) { case 1: case 2: case 6: case 9: return false; default: return true; } } case 4: { switch (currentRegion) { case 1: case 7: return false; default: return true; } } case 5: return false; // should never occur case 6: { switch (currentRegion) { case 3: case 9: return false; default: return true; } } case 7: { switch (currentRegion) { case 1: case 4: case 8: case 9: return false; default: return true; } } case 8: { switch (currentRegion) { case 7: case 9: return false; default: return true; } } case 9: { switch (currentRegion) { case 3: case 6: case 8: case 7: return false; default: return true; } } default: return true; } } /*! \internal This function is part of the curve optimization algorithm of \ref getCurveLines. This method assumes that the \ref mayTraverse test has returned true, so there is a chance the segment defined by (\a prevKey, \a prevValue) and (\a key, \a value) goes through the visible region 5. The return value of this method indicates whether the segment actually traverses region 5 or not. If the segment traverses 5, the output parameters \a crossA and \a crossB indicate the entry and exit points of region 5. They will become the optimized points for that segment. */ bool QCPCurve::getTraverse(double prevKey, double prevValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin, QPointF &crossA, QPointF &crossB) const { // The intersection point interpolation here is done in pixel coordinates, so we don't need to // differentiate between different axis scale types. Note that the nomenclature // top/left/bottom/right/min/max is with respect to the rect in plot coordinates, wich may be // different in pixel coordinates (horz/vert key axes, reversed ranges) QList intersections; const double valueMinPx = mValueAxis->coordToPixel(valueMin); const double valueMaxPx = mValueAxis->coordToPixel(valueMax); const double keyMinPx = mKeyAxis->coordToPixel(keyMin); const double keyMaxPx = mKeyAxis->coordToPixel(keyMax); const double keyPx = mKeyAxis->coordToPixel(key); const double valuePx = mValueAxis->coordToPixel(value); const double prevKeyPx = mKeyAxis->coordToPixel(prevKey); const double prevValuePx = mValueAxis->coordToPixel(prevValue); if (qFuzzyIsNull(key-prevKey)) // line is parallel to value axis { // due to region filter in mayTraverse(), if line is parallel to value or key axis, region 5 is traversed here intersections.append(mKeyAxis->orientation() == Qt::Horizontal ? QPointF(keyPx, valueMinPx) : QPointF(valueMinPx, keyPx)); // direction will be taken care of at end of method intersections.append(mKeyAxis->orientation() == Qt::Horizontal ? QPointF(keyPx, valueMaxPx) : QPointF(valueMaxPx, keyPx)); } else if (qFuzzyIsNull(value-prevValue)) // line is parallel to key axis { // due to region filter in mayTraverse(), if line is parallel to value or key axis, region 5 is traversed here intersections.append(mKeyAxis->orientation() == Qt::Horizontal ? QPointF(keyMinPx, valuePx) : QPointF(valuePx, keyMinPx)); // direction will be taken care of at end of method intersections.append(mKeyAxis->orientation() == Qt::Horizontal ? QPointF(keyMaxPx, valuePx) : QPointF(valuePx, keyMaxPx)); } else // line is skewed { double gamma; double keyPerValuePx = (keyPx-prevKeyPx)/(valuePx-prevValuePx); // check top of rect: gamma = prevKeyPx + (valueMaxPx-prevValuePx)*keyPerValuePx; if (gamma >= qMin(keyMinPx, keyMaxPx) && gamma <= qMax(keyMinPx, keyMaxPx)) // qMin/qMax necessary since axes may be reversed intersections.append(mKeyAxis->orientation() == Qt::Horizontal ? QPointF(gamma, valueMaxPx) : QPointF(valueMaxPx, gamma)); // check bottom of rect: gamma = prevKeyPx + (valueMinPx-prevValuePx)*keyPerValuePx; if (gamma >= qMin(keyMinPx, keyMaxPx) && gamma <= qMax(keyMinPx, keyMaxPx)) // qMin/qMax necessary since axes may be reversed intersections.append(mKeyAxis->orientation() == Qt::Horizontal ? QPointF(gamma, valueMinPx) : QPointF(valueMinPx, gamma)); const double valuePerKeyPx = 1.0/keyPerValuePx; // check left of rect: gamma = prevValuePx + (keyMinPx-prevKeyPx)*valuePerKeyPx; if (gamma >= qMin(valueMinPx, valueMaxPx) && gamma <= qMax(valueMinPx, valueMaxPx)) // qMin/qMax necessary since axes may be reversed intersections.append(mKeyAxis->orientation() == Qt::Horizontal ? QPointF(keyMinPx, gamma) : QPointF(gamma, keyMinPx)); // check right of rect: gamma = prevValuePx + (keyMaxPx-prevKeyPx)*valuePerKeyPx; if (gamma >= qMin(valueMinPx, valueMaxPx) && gamma <= qMax(valueMinPx, valueMaxPx)) // qMin/qMax necessary since axes may be reversed intersections.append(mKeyAxis->orientation() == Qt::Horizontal ? QPointF(keyMaxPx, gamma) : QPointF(gamma, keyMaxPx)); } // handle cases where found points isn't exactly 2: if (intersections.size() > 2) { // line probably goes through corner of rect, and we got duplicate points there. single out the point pair with greatest distance in between: double distSqrMax = 0; QPointF pv1, pv2; for (int i=0; i distSqrMax) { pv1 = intersections.at(i); pv2 = intersections.at(k); distSqrMax = distSqr; } } } intersections = QList() << pv1 << pv2; } else if (intersections.size() != 2) { // one or even zero points found (shouldn't happen unless line perfectly tangent to corner), no need to draw segment return false; } // possibly re-sort points so optimized point segment has same direction as original segment: double xDelta = keyPx-prevKeyPx; double yDelta = valuePx-prevValuePx; if (mKeyAxis->orientation() != Qt::Horizontal) qSwap(xDelta, yDelta); if (xDelta*(intersections.at(1).x()-intersections.at(0).x()) + yDelta*(intersections.at(1).y()-intersections.at(0).y()) < 0) // scalar product of both segments < 0 -> opposite direction intersections.move(0, 1); crossA = intersections.at(0); crossB = intersections.at(1); return true; } /*! \internal This function is part of the curve optimization algorithm of \ref getCurveLines. This method assumes that the \ref getTraverse test has returned true, so the segment definitely traverses the visible region 5 when going from \a prevRegion to \a currentRegion. In certain situations it is not sufficient to merely generate the entry and exit points of the segment into/out of region 5, as \ref getTraverse provides. It may happen that a single segment, in addition to traversing region 5, skips another region outside of region 5, which makes it necessary to add an optimized corner point there (very similar to the job \ref getOptimizedCornerPoints does for segments that are completely in outside regions and don't traverse 5). As an example, consider a segment going from region 1 to region 6, traversing the lower left corner of region 5. In this configuration, the segment additionally crosses the border between region 1 and 2 before entering region 5. This makes it necessary to add an additional point in the top left corner, before adding the optimized traverse points. So in this case, the output parameter \a beforeTraverse will contain the top left corner point, and \a afterTraverse will be empty. In some cases, such as when going from region 1 to 9, it may even be necessary to add additional corner points before and after the traverse. Then both \a beforeTraverse and \a afterTraverse return the respective corner points. */ void QCPCurve::getTraverseCornerPoints(int prevRegion, int currentRegion, double keyMin, double valueMax, double keyMax, double valueMin, QVector &beforeTraverse, QVector &afterTraverse) const { switch (prevRegion) { case 1: { switch (currentRegion) { case 6: { beforeTraverse << coordsToPixels(keyMin, valueMax); break; } case 9: { beforeTraverse << coordsToPixels(keyMin, valueMax); afterTraverse << coordsToPixels(keyMax, valueMin); break; } case 8: { beforeTraverse << coordsToPixels(keyMin, valueMax); break; } } break; } case 2: { switch (currentRegion) { case 7: { afterTraverse << coordsToPixels(keyMax, valueMax); break; } case 9: { afterTraverse << coordsToPixels(keyMax, valueMin); break; } } break; } case 3: { switch (currentRegion) { case 4: { beforeTraverse << coordsToPixels(keyMin, valueMin); break; } case 7: { beforeTraverse << coordsToPixels(keyMin, valueMin); afterTraverse << coordsToPixels(keyMax, valueMax); break; } case 8: { beforeTraverse << coordsToPixels(keyMin, valueMin); break; } } break; } case 4: { switch (currentRegion) { case 3: { afterTraverse << coordsToPixels(keyMin, valueMin); break; } case 9: { afterTraverse << coordsToPixels(keyMax, valueMin); break; } } break; } case 5: { break; } // shouldn't happen because this method only handles full traverses case 6: { switch (currentRegion) { case 1: { afterTraverse << coordsToPixels(keyMin, valueMax); break; } case 7: { afterTraverse << coordsToPixels(keyMax, valueMax); break; } } break; } case 7: { switch (currentRegion) { case 2: { beforeTraverse << coordsToPixels(keyMax, valueMax); break; } case 3: { beforeTraverse << coordsToPixels(keyMax, valueMax); afterTraverse << coordsToPixels(keyMin, valueMin); break; } case 6: { beforeTraverse << coordsToPixels(keyMax, valueMax); break; } } break; } case 8: { switch (currentRegion) { case 1: { afterTraverse << coordsToPixels(keyMin, valueMax); break; } case 3: { afterTraverse << coordsToPixels(keyMin, valueMin); break; } } break; } case 9: { switch (currentRegion) { case 2: { beforeTraverse << coordsToPixels(keyMax, valueMin); break; } case 1: { beforeTraverse << coordsToPixels(keyMax, valueMin); afterTraverse << coordsToPixels(keyMin, valueMax); break; } case 4: { beforeTraverse << coordsToPixels(keyMax, valueMin); break; } } break; } } } /*! \internal Calculates the (minimum) distance (in pixels) the curve's representation has from the given \a pixelPoint in pixels. This is used to determine whether the curve was clicked or not, e.g. in \ref selectTest. The closest data point to \a pixelPoint is returned in \a closestData. Note that if the curve has a line representation, the returned distance may be smaller than the distance to the \a closestData point, since the distance to the curve line is also taken into account. If either the curve has no data or if the line style is \ref lsNone and the scatter style's shape is \ref QCPScatterStyle::ssNone (i.e. there is no visual representation of the curve), returns -1.0. */ double QCPCurve::pointDistance(const QPointF &pixelPoint, QCPCurveDataContainer::const_iterator &closestData) const { closestData = mDataContainer->constEnd(); if (mDataContainer->isEmpty()) return -1.0; if (mLineStyle == lsNone && mScatterStyle.isNone()) return -1.0; if (mDataContainer->size() == 1) { QPointF dataPoint = coordsToPixels(mDataContainer->constBegin()->key, mDataContainer->constBegin()->value); closestData = mDataContainer->constBegin(); return QCPVector2D(dataPoint-pixelPoint).length(); } // calculate minimum distances to curve data points and find closestData iterator: double minDistSqr = std::numeric_limits::max(); // iterate over found data points and then choose the one with the shortest distance to pos: QCPCurveDataContainer::const_iterator begin = mDataContainer->constBegin(); QCPCurveDataContainer::const_iterator end = mDataContainer->constEnd(); for (QCPCurveDataContainer::const_iterator it=begin; it!=end; ++it) { const double currentDistSqr = QCPVector2D(coordsToPixels(it->key, it->value)-pixelPoint).lengthSquared(); if (currentDistSqr < minDistSqr) { minDistSqr = currentDistSqr; closestData = it; } } // calculate distance to line if there is one (if so, will probably be smaller than distance to closest data point): if (mLineStyle != lsNone) { QVector lines; getCurveLines(&lines, QCPDataRange(0, dataCount()), mParentPlot->selectionTolerance()*1.2); // optimized lines outside axis rect shouldn't respond to clicks at the edge, so use 1.2*tolerance as pen width for (int i=0; i QCPBarsGroup::bars() const Returns all bars currently in this group. \see bars(int index) */ /*! \fn int QCPBarsGroup::size() const Returns the number of QCPBars plottables that are part of this group. */ /*! \fn bool QCPBarsGroup::isEmpty() const Returns whether this bars group is empty. \see size */ /*! \fn bool QCPBarsGroup::contains(QCPBars *bars) Returns whether the specified \a bars plottable is part of this group. */ /* end of documentation of inline functions */ /*! Constructs a new bars group for the specified QCustomPlot instance. */ QCPBarsGroup::QCPBarsGroup(QCustomPlot *parentPlot) : QObject(parentPlot), mParentPlot(parentPlot), mSpacingType(stAbsolute), mSpacing(4) { } QCPBarsGroup::~QCPBarsGroup() { clear(); } /*! Sets how the spacing between adjacent bars is interpreted. See \ref SpacingType. The actual spacing can then be specified with \ref setSpacing. \see setSpacing */ void QCPBarsGroup::setSpacingType(SpacingType spacingType) { mSpacingType = spacingType; } /*! Sets the spacing between adjacent bars. What the number passed as \a spacing actually means, is defined by the current \ref SpacingType, which can be set with \ref setSpacingType. \see setSpacingType */ void QCPBarsGroup::setSpacing(double spacing) { mSpacing = spacing; } /*! Returns the QCPBars instance with the specified \a index in this group. If no such QCPBars exists, returns 0. \see bars(), size */ QCPBars *QCPBarsGroup::bars(int index) const { if (index >= 0 && index < mBars.size()) { return mBars.at(index); } else { qDebug() << Q_FUNC_INFO << "index out of bounds:" << index; return 0; } } /*! Removes all QCPBars plottables from this group. \see isEmpty */ void QCPBarsGroup::clear() { foreach (QCPBars *bars, mBars) // since foreach takes a copy, removing bars in the loop is okay bars->setBarsGroup(0); // removes itself via removeBars } /*! Adds the specified \a bars plottable to this group. Alternatively, you can also use \ref QCPBars::setBarsGroup on the \a bars instance. \see insert, remove */ void QCPBarsGroup::append(QCPBars *bars) { if (!bars) { qDebug() << Q_FUNC_INFO << "bars is 0"; return; } if (!mBars.contains(bars)) bars->setBarsGroup(this); else qDebug() << Q_FUNC_INFO << "bars plottable is already in this bars group:" << reinterpret_cast(bars); } /*! Inserts the specified \a bars plottable into this group at the specified index position \a i. This gives you full control over the ordering of the bars. \a bars may already be part of this group. In that case, \a bars is just moved to the new index position. \see append, remove */ void QCPBarsGroup::insert(int i, QCPBars *bars) { if (!bars) { qDebug() << Q_FUNC_INFO << "bars is 0"; return; } // first append to bars list normally: if (!mBars.contains(bars)) bars->setBarsGroup(this); // then move to according position: mBars.move(mBars.indexOf(bars), qBound(0, i, mBars.size()-1)); } /*! Removes the specified \a bars plottable from this group. \see contains, clear */ void QCPBarsGroup::remove(QCPBars *bars) { if (!bars) { qDebug() << Q_FUNC_INFO << "bars is 0"; return; } if (mBars.contains(bars)) bars->setBarsGroup(0); else qDebug() << Q_FUNC_INFO << "bars plottable is not in this bars group:" << reinterpret_cast(bars); } /*! \internal Adds the specified \a bars to the internal mBars list of bars. This method does not change the barsGroup property on \a bars. \see unregisterBars */ void QCPBarsGroup::registerBars(QCPBars *bars) { if (!mBars.contains(bars)) mBars.append(bars); } /*! \internal Removes the specified \a bars from the internal mBars list of bars. This method does not change the barsGroup property on \a bars. \see registerBars */ void QCPBarsGroup::unregisterBars(QCPBars *bars) { mBars.removeOne(bars); } /*! \internal Returns the pixel offset in the key dimension the specified \a bars plottable should have at the given key coordinate \a keyCoord. The offset is relative to the pixel position of the key coordinate \a keyCoord. */ double QCPBarsGroup::keyPixelOffset(const QCPBars *bars, double keyCoord) { // find list of all base bars in case some mBars are stacked: QList baseBars; foreach (const QCPBars *b, mBars) { while (b->barBelow()) b = b->barBelow(); if (!baseBars.contains(b)) baseBars.append(b); } // find base bar this "bars" is stacked on: const QCPBars *thisBase = bars; while (thisBase->barBelow()) thisBase = thisBase->barBelow(); // determine key pixel offset of this base bars considering all other base bars in this barsgroup: double result = 0; int index = baseBars.indexOf(thisBase); if (index >= 0) { if (baseBars.size() % 2 == 1 && index == (baseBars.size()-1)/2) // is center bar (int division on purpose) { return result; } else { double lowerPixelWidth, upperPixelWidth; int startIndex; int dir = (index <= (baseBars.size()-1)/2) ? -1 : 1; // if bar is to lower keys of center, dir is negative if (baseBars.size() % 2 == 0) // even number of bars { startIndex = baseBars.size()/2 + (dir < 0 ? -1 : 0); result += getPixelSpacing(baseBars.at(startIndex), keyCoord)*0.5; // half of middle spacing } else // uneven number of bars { startIndex = (baseBars.size()-1)/2+dir; baseBars.at((baseBars.size()-1)/2)->getPixelWidth(keyCoord, lowerPixelWidth, upperPixelWidth); result += qAbs(upperPixelWidth-lowerPixelWidth)*0.5; // half of center bar result += getPixelSpacing(baseBars.at((baseBars.size()-1)/2), keyCoord); // center bar spacing } for (int i = startIndex; i != index; i += dir) // add widths and spacings of bars in between center and our bars { baseBars.at(i)->getPixelWidth(keyCoord, lowerPixelWidth, upperPixelWidth); result += qAbs(upperPixelWidth-lowerPixelWidth); result += getPixelSpacing(baseBars.at(i), keyCoord); } // finally half of our bars width: baseBars.at(index)->getPixelWidth(keyCoord, lowerPixelWidth, upperPixelWidth); result += qAbs(upperPixelWidth-lowerPixelWidth)*0.5; // correct sign of result depending on orientation and direction of key axis: result *= dir*thisBase->keyAxis()->pixelOrientation(); } } return result; } /*! \internal Returns the spacing in pixels which is between this \a bars and the following one, both at the key coordinate \a keyCoord. \note Typically the returned value doesn't depend on \a bars or \a keyCoord. \a bars is only needed to get access to the key axis transformation and axis rect for the modes \ref stAxisRectRatio and \ref stPlotCoords. The \a keyCoord is only relevant for spacings given in \ref stPlotCoords on a logarithmic axis. */ double QCPBarsGroup::getPixelSpacing(const QCPBars *bars, double keyCoord) { switch (mSpacingType) { case stAbsolute: { return mSpacing; } case stAxisRectRatio: { if (bars->keyAxis()->orientation() == Qt::Horizontal) return bars->keyAxis()->axisRect()->width()*mSpacing; else return bars->keyAxis()->axisRect()->height()*mSpacing; } case stPlotCoords: { double keyPixel = bars->keyAxis()->coordToPixel(keyCoord); return qAbs(bars->keyAxis()->coordToPixel(keyCoord+mSpacing)-keyPixel); } } return 0; } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPBarsData //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPBarsData \brief Holds the data of one single data point (one bar) for QCPBars. The stored data is: \li \a key: coordinate on the key axis of this bar (this is the \a mainKey and the \a sortKey) \li \a value: height coordinate on the value axis of this bar (this is the \a mainValue) The container for storing multiple data points is \ref QCPBarsDataContainer. It is a typedef for \ref QCPDataContainer with \ref QCPBarsData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods. \see QCPBarsDataContainer */ /* start documentation of inline functions */ /*! \fn double QCPBarsData::sortKey() const Returns the \a key member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static QCPBarsData QCPBarsData::fromSortKey(double sortKey) Returns a data point with the specified \a sortKey. All other members are set to zero. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static static bool QCPBarsData::sortKeyIsMainKey() Since the member \a key is both the data point key coordinate and the data ordering parameter, this method returns true. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPBarsData::mainKey() const Returns the \a key member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPBarsData::mainValue() const Returns the \a value member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn QCPRange QCPBarsData::valueRange() const Returns a QCPRange with both lower and upper boundary set to \a value of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /* end documentation of inline functions */ /*! Constructs a bar data point with key and value set to zero. */ QCPBarsData::QCPBarsData() : key(0), value(0) { } /*! Constructs a bar data point with the specified \a key and \a value. */ QCPBarsData::QCPBarsData(double key, double value) : key(key), value(value) { } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPBars //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPBars \brief A plottable representing a bar chart in a plot. \image html QCPBars.png To plot data, assign it with the \ref setData or \ref addData functions. \section qcpbars-appearance Changing the appearance The appearance of the bars is determined by the pen and the brush (\ref setPen, \ref setBrush). The width of the individual bars can be controlled with \ref setWidthType and \ref setWidth. Bar charts are stackable. This means, two QCPBars plottables can be placed on top of each other (see \ref QCPBars::moveAbove). So when two bars are at the same key position, they will appear stacked. If you would like to group multiple QCPBars plottables together so they appear side by side as shown below, use QCPBarsGroup. \image html QCPBarsGroup.png \section qcpbars-usage Usage Like all data representing objects in QCustomPlot, the QCPBars is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::removePlottable, etc.) Usually, you first create an instance: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpbars-creation-1 which registers it with the QCustomPlot instance of the passed axes. Note that this QCustomPlot instance takes ownership of the plottable, so do not delete it manually but use QCustomPlot::removePlottable() instead. The newly created plottable can be modified, e.g.: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpbars-creation-2 */ /* start of documentation of inline functions */ /*! \fn QSharedPointer QCPBars::data() const Returns a shared pointer to the internal data storage of type \ref QCPBarsDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular \ref setData or \ref addData methods. */ /*! \fn QCPBars *QCPBars::barBelow() const Returns the bars plottable that is directly below this bars plottable. If there is no such plottable, returns 0. \see barAbove, moveBelow, moveAbove */ /*! \fn QCPBars *QCPBars::barAbove() const Returns the bars plottable that is directly above this bars plottable. If there is no such plottable, returns 0. \see barBelow, moveBelow, moveAbove */ /* end of documentation of inline functions */ /*! Constructs a bar chart which uses \a keyAxis as its key axis ("x") and \a valueAxis as its value axis ("y"). \a keyAxis and \a valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though. The created QCPBars is automatically registered with the QCustomPlot instance inferred from \a keyAxis. This QCustomPlot instance takes ownership of the QCPBars, so do not delete it manually but use QCustomPlot::removePlottable() instead. */ QCPBars::QCPBars(QCPAxis *keyAxis, QCPAxis *valueAxis) : QCPAbstractPlottable1D(keyAxis, valueAxis), mWidth(0.75), mWidthType(wtPlotCoords), mBarsGroup(0), mBaseValue(0), mStackingGap(0) { // modify inherited properties from abstract plottable: mPen.setColor(Qt::blue); mPen.setStyle(Qt::SolidLine); mBrush.setColor(QColor(40, 50, 255, 30)); mBrush.setStyle(Qt::SolidPattern); mSelectionDecorator->setBrush(QBrush(QColor(160, 160, 255))); } QCPBars::~QCPBars() { setBarsGroup(0); if (mBarBelow || mBarAbove) connectBars(mBarBelow.data(), mBarAbove.data()); // take this bar out of any stacking } /*! \overload Replaces the current data container with the provided \a data container. Since a QSharedPointer is used, multiple QCPBars may share the same data container safely. Modifying the data in the container will then affect all bars that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpbars-datasharing-1 If you do not wish to share containers, but create a copy from an existing container, rather use the \ref QCPDataContainer::set method on the bar's data container directly: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpbars-datasharing-2 \see addData */ void QCPBars::setData(QSharedPointer data) { mDataContainer = data; } /*! \overload Replaces the current data with the provided points in \a keys and \a values. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a keys in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. \see addData */ void QCPBars::setData(const QVector &keys, const QVector &values, bool alreadySorted) { mDataContainer->clear(); addData(keys, values, alreadySorted); } /*! Sets the width of the bars. How the number passed as \a width is interpreted (e.g. screen pixels, plot coordinates,...), depends on the currently set width type, see \ref setWidthType and \ref WidthType. */ void QCPBars::setWidth(double width) { mWidth = width; } /*! Sets how the width of the bars is defined. See the documentation of \ref WidthType for an explanation of the possible values for \a widthType. The default value is \ref wtPlotCoords. \see setWidth */ void QCPBars::setWidthType(QCPBars::WidthType widthType) { mWidthType = widthType; } /*! Sets to which QCPBarsGroup this QCPBars instance belongs to. Alternatively, you can also use \ref QCPBarsGroup::append. To remove this QCPBars from any group, set \a barsGroup to 0. */ void QCPBars::setBarsGroup(QCPBarsGroup *barsGroup) { // deregister at old group: if (mBarsGroup) mBarsGroup->unregisterBars(this); mBarsGroup = barsGroup; // register at new group: if (mBarsGroup) mBarsGroup->registerBars(this); } /*! Sets the base value of this bars plottable. The base value defines where on the value coordinate the bars start. How far the bars extend from the base value is given by their individual value data. For example, if the base value is set to 1, a bar with data value 2 will have its lowest point at value coordinate 1 and highest point at 3. For stacked bars, only the base value of the bottom-most QCPBars has meaning. The default base value is 0. */ void QCPBars::setBaseValue(double baseValue) { mBaseValue = baseValue; } /*! If this bars plottable is stacked on top of another bars plottable (\ref moveAbove), this method allows specifying a distance in \a pixels, by which the drawn bar rectangles will be separated by the bars below it. */ void QCPBars::setStackingGap(double pixels) { mStackingGap = pixels; } /*! \overload Adds the provided points in \a keys and \a values to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a keys in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPBars::addData(const QVector &keys, const QVector &values, bool alreadySorted) { if (keys.size() != values.size()) qDebug() << Q_FUNC_INFO << "keys and values have different sizes:" << keys.size() << values.size(); const int n = qMin(keys.size(), values.size()); QVector tempData(n); QVector::iterator it = tempData.begin(); const QVector::iterator itEnd = tempData.end(); int i = 0; while (it != itEnd) { it->key = keys[i]; it->value = values[i]; ++it; ++i; } mDataContainer->add(tempData, alreadySorted); // don't modify tempData beyond this to prevent copy on write } /*! \overload Adds the provided data point as \a key and \a value to the current data. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPBars::addData(double key, double value) { mDataContainer->add(QCPBarsData(key, value)); } /*! Moves this bars plottable below \a bars. In other words, the bars of this plottable will appear below the bars of \a bars. The move target \a bars must use the same key and value axis as this plottable. Inserting into and removing from existing bar stacking is handled gracefully. If \a bars already has a bars object below itself, this bars object is inserted between the two. If this bars object is already between two other bars, the two other bars will be stacked on top of each other after the operation. To remove this bars plottable from any stacking, set \a bars to 0. \see moveBelow, barAbove, barBelow */ void QCPBars::moveBelow(QCPBars *bars) { if (bars == this) return; if (bars && (bars->keyAxis() != mKeyAxis.data() || bars->valueAxis() != mValueAxis.data())) { qDebug() << Q_FUNC_INFO << "passed QCPBars* doesn't have same key and value axis as this QCPBars"; return; } // remove from stacking: connectBars(mBarBelow.data(), mBarAbove.data()); // Note: also works if one (or both) of them is 0 // if new bar given, insert this bar below it: if (bars) { if (bars->mBarBelow) connectBars(bars->mBarBelow.data(), this); connectBars(this, bars); } } /*! Moves this bars plottable above \a bars. In other words, the bars of this plottable will appear above the bars of \a bars. The move target \a bars must use the same key and value axis as this plottable. Inserting into and removing from existing bar stacking is handled gracefully. If \a bars already has a bars object above itself, this bars object is inserted between the two. If this bars object is already between two other bars, the two other bars will be stacked on top of each other after the operation. To remove this bars plottable from any stacking, set \a bars to 0. \see moveBelow, barBelow, barAbove */ void QCPBars::moveAbove(QCPBars *bars) { if (bars == this) return; if (bars && (bars->keyAxis() != mKeyAxis.data() || bars->valueAxis() != mValueAxis.data())) { qDebug() << Q_FUNC_INFO << "passed QCPBars* doesn't have same key and value axis as this QCPBars"; return; } // remove from stacking: connectBars(mBarBelow.data(), mBarAbove.data()); // Note: also works if one (or both) of them is 0 // if new bar given, insert this bar above it: if (bars) { if (bars->mBarAbove) connectBars(this, bars->mBarAbove.data()); connectBars(bars, this); } } /*! \copydoc QCPPlottableInterface1D::selectTestRect */ QCPDataSelection QCPBars::selectTestRect(const QRectF &rect, bool onlySelectable) const { QCPDataSelection result; if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return result; if (!mKeyAxis || !mValueAxis) return result; QCPBarsDataContainer::const_iterator visibleBegin, visibleEnd; getVisibleDataBounds(visibleBegin, visibleEnd); for (QCPBarsDataContainer::const_iterator it=visibleBegin; it!=visibleEnd; ++it) { if (rect.intersects(getBarRect(it->key, it->value))) result.addDataRange(QCPDataRange(it-mDataContainer->constBegin(), it-mDataContainer->constBegin()+1), false); } result.simplify(); return result; } /* inherits documentation from base class */ double QCPBars::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return -1; if (!mKeyAxis || !mValueAxis) return -1; if (mKeyAxis.data()->axisRect()->rect().contains(pos.toPoint())) { // get visible data range: QCPBarsDataContainer::const_iterator visibleBegin, visibleEnd; getVisibleDataBounds(visibleBegin, visibleEnd); for (QCPBarsDataContainer::const_iterator it=visibleBegin; it!=visibleEnd; ++it) { if (getBarRect(it->key, it->value).contains(pos)) { if (details) { int pointIndex = it-mDataContainer->constBegin(); details->setValue(QCPDataSelection(QCPDataRange(pointIndex, pointIndex+1))); } return mParentPlot->selectionTolerance()*0.99; } } } return -1; } /* inherits documentation from base class */ QCPRange QCPBars::getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain) const { /* Note: If this QCPBars uses absolute pixels as width (or is in a QCPBarsGroup with spacing in absolute pixels), using this method to adapt the key axis range to fit the bars into the currently visible axis range will not work perfectly. Because in the moment the axis range is changed to the new range, the fixed pixel widths/spacings will represent different coordinate spans than before, which in turn would require a different key range to perfectly fit, and so on. The only solution would be to iteratively approach the perfect fitting axis range, but the mismatch isn't large enough in most applications, to warrant this here. If a user does need a better fit, he should call the corresponding axis rescale multiple times in a row. */ QCPRange range; range = mDataContainer->keyRange(foundRange, inSignDomain); // determine exact range of bars by including bar width and barsgroup offset: if (foundRange && mKeyAxis) { double lowerPixelWidth, upperPixelWidth, keyPixel; // lower range bound: getPixelWidth(range.lower, lowerPixelWidth, upperPixelWidth); keyPixel = mKeyAxis.data()->coordToPixel(range.lower) + lowerPixelWidth; if (mBarsGroup) keyPixel += mBarsGroup->keyPixelOffset(this, range.lower); const double lowerCorrected = mKeyAxis.data()->pixelToCoord(keyPixel); if (!qIsNaN(lowerCorrected) && qIsFinite(lowerCorrected) && range.lower > lowerCorrected) range.lower = lowerCorrected; // upper range bound: getPixelWidth(range.upper, lowerPixelWidth, upperPixelWidth); keyPixel = mKeyAxis.data()->coordToPixel(range.upper) + upperPixelWidth; if (mBarsGroup) keyPixel += mBarsGroup->keyPixelOffset(this, range.upper); const double upperCorrected = mKeyAxis.data()->pixelToCoord(keyPixel); if (!qIsNaN(upperCorrected) && qIsFinite(upperCorrected) && range.upper < upperCorrected) range.upper = upperCorrected; } return range; } /* inherits documentation from base class */ QCPRange QCPBars::getValueRange(bool &foundRange, QCP::SignDomain inSignDomain, const QCPRange &inKeyRange) const { // Note: can't simply use mDataContainer->valueRange here because we need to // take into account bar base value and possible stacking of multiple bars QCPRange range; range.lower = mBaseValue; range.upper = mBaseValue; bool haveLower = true; // set to true, because baseValue should always be visible in bar charts bool haveUpper = true; // set to true, because baseValue should always be visible in bar charts QCPBarsDataContainer::const_iterator itBegin = mDataContainer->constBegin(); QCPBarsDataContainer::const_iterator itEnd = mDataContainer->constEnd(); if (inKeyRange != QCPRange()) { itBegin = mDataContainer->findBegin(inKeyRange.lower); itEnd = mDataContainer->findEnd(inKeyRange.upper); } for (QCPBarsDataContainer::const_iterator it = itBegin; it != itEnd; ++it) { const double current = it->value + getStackedBaseValue(it->key, it->value >= 0); if (qIsNaN(current)) continue; if (inSignDomain == QCP::sdBoth || (inSignDomain == QCP::sdNegative && current < 0) || (inSignDomain == QCP::sdPositive && current > 0)) { if (current < range.lower || !haveLower) { range.lower = current; haveLower = true; } if (current > range.upper || !haveUpper) { range.upper = current; haveUpper = true; } } } foundRange = true; // return true because bar charts always have the 0-line visible return range; } /* inherits documentation from base class */ QPointF QCPBars::dataPixelPosition(int index) const { if (index >= 0 && index < mDataContainer->size()) { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return QPointF(); } const QCPDataContainer::const_iterator it = mDataContainer->constBegin()+index; const double valuePixel = valueAxis->coordToPixel(getStackedBaseValue(it->key, it->value >= 0) + it->value); const double keyPixel = keyAxis->coordToPixel(it->key) + (mBarsGroup ? mBarsGroup->keyPixelOffset(this, it->key) : 0); if (keyAxis->orientation() == Qt::Horizontal) return QPointF(keyPixel, valuePixel); else return QPointF(valuePixel, keyPixel); } else { qDebug() << Q_FUNC_INFO << "Index out of bounds" << index; return QPointF(); } } /* inherits documentation from base class */ void QCPBars::draw(QCPPainter *painter) { if (!mKeyAxis || !mValueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } if (mDataContainer->isEmpty()) return; QCPBarsDataContainer::const_iterator visibleBegin, visibleEnd; getVisibleDataBounds(visibleBegin, visibleEnd); // loop over and draw segments of unselected/selected data: QList selectedSegments, unselectedSegments, allSegments; getDataSegments(selectedSegments, unselectedSegments); allSegments << unselectedSegments << selectedSegments; for (int i=0; i= unselectedSegments.size(); QCPBarsDataContainer::const_iterator begin = visibleBegin; QCPBarsDataContainer::const_iterator end = visibleEnd; mDataContainer->limitIteratorsToDataRange(begin, end, allSegments.at(i)); if (begin == end) continue; for (QCPBarsDataContainer::const_iterator it=begin; it!=end; ++it) { // check data validity if flag set: #ifdef QCUSTOMPLOT_CHECK_DATA if (QCP::isInvalidData(it->key, it->value)) qDebug() << Q_FUNC_INFO << "Data point at" << it->key << "of drawn range invalid." << "Plottable name:" << name(); #endif // draw bar: if (isSelectedSegment && mSelectionDecorator) { mSelectionDecorator->applyBrush(painter); mSelectionDecorator->applyPen(painter); } else { painter->setBrush(mBrush); painter->setPen(mPen); } applyDefaultAntialiasingHint(painter); painter->drawPolygon(getBarRect(it->key, it->value)); } } // draw other selection decoration that isn't just line/scatter pens and brushes: if (mSelectionDecorator) mSelectionDecorator->drawDecoration(painter, selection()); } /* inherits documentation from base class */ void QCPBars::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const { // draw filled rect: applyDefaultAntialiasingHint(painter); painter->setBrush(mBrush); painter->setPen(mPen); QRectF r = QRectF(0, 0, rect.width()*0.67, rect.height()*0.67); r.moveCenter(rect.center()); painter->drawRect(r); } /*! \internal called by \ref draw to determine which data (key) range is visible at the current key axis range setting, so only that needs to be processed. It also takes into account the bar width. \a begin returns an iterator to the lowest data point that needs to be taken into account when plotting. Note that in order to get a clean plot all the way to the edge of the axis rect, \a lower may still be just outside the visible range. \a end returns an iterator one higher than the highest visible data point. Same as before, \a end may also lie just outside of the visible range. if the plottable contains no data, both \a begin and \a end point to constEnd. */ void QCPBars::getVisibleDataBounds(QCPBarsDataContainer::const_iterator &begin, QCPBarsDataContainer::const_iterator &end) const { if (!mKeyAxis) { qDebug() << Q_FUNC_INFO << "invalid key axis"; begin = mDataContainer->constEnd(); end = mDataContainer->constEnd(); return; } if (mDataContainer->isEmpty()) { begin = mDataContainer->constEnd(); end = mDataContainer->constEnd(); return; } // get visible data range as QMap iterators begin = mDataContainer->findBegin(mKeyAxis.data()->range().lower); end = mDataContainer->findEnd(mKeyAxis.data()->range().upper); double lowerPixelBound = mKeyAxis.data()->coordToPixel(mKeyAxis.data()->range().lower); double upperPixelBound = mKeyAxis.data()->coordToPixel(mKeyAxis.data()->range().upper); bool isVisible = false; // walk left from begin to find lower bar that actually is completely outside visible pixel range: QCPBarsDataContainer::const_iterator it = begin; while (it != mDataContainer->constBegin()) { --it; const QRectF barRect = getBarRect(it->key, it->value); if (mKeyAxis.data()->orientation() == Qt::Horizontal) isVisible = ((!mKeyAxis.data()->rangeReversed() && barRect.right() >= lowerPixelBound) || (mKeyAxis.data()->rangeReversed() && barRect.left() <= lowerPixelBound)); else // keyaxis is vertical isVisible = ((!mKeyAxis.data()->rangeReversed() && barRect.top() <= lowerPixelBound) || (mKeyAxis.data()->rangeReversed() && barRect.bottom() >= lowerPixelBound)); if (isVisible) begin = it; else break; } // walk right from ubound to find upper bar that actually is completely outside visible pixel range: it = end; while (it != mDataContainer->constEnd()) { const QRectF barRect = getBarRect(it->key, it->value); if (mKeyAxis.data()->orientation() == Qt::Horizontal) isVisible = ((!mKeyAxis.data()->rangeReversed() && barRect.left() <= upperPixelBound) || (mKeyAxis.data()->rangeReversed() && barRect.right() >= upperPixelBound)); else // keyaxis is vertical isVisible = ((!mKeyAxis.data()->rangeReversed() && barRect.bottom() >= upperPixelBound) || (mKeyAxis.data()->rangeReversed() && barRect.top() <= upperPixelBound)); if (isVisible) end = it+1; else break; ++it; } } /*! \internal Returns the rect in pixel coordinates of a single bar with the specified \a key and \a value. The rect is shifted according to the bar stacking (see \ref moveAbove) and base value (see \ref setBaseValue), and to have non-overlapping border lines with the bars stacked below. */ QRectF QCPBars::getBarRect(double key, double value) const { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return QRectF(); } double lowerPixelWidth, upperPixelWidth; getPixelWidth(key, lowerPixelWidth, upperPixelWidth); double base = getStackedBaseValue(key, value >= 0); double basePixel = valueAxis->coordToPixel(base); double valuePixel = valueAxis->coordToPixel(base+value); double keyPixel = keyAxis->coordToPixel(key); if (mBarsGroup) keyPixel += mBarsGroup->keyPixelOffset(this, key); double bottomOffset = (mBarBelow && mPen != Qt::NoPen ? 1 : 0)*(mPen.isCosmetic() ? 1 : mPen.widthF()); bottomOffset += mBarBelow ? mStackingGap : 0; bottomOffset *= (value<0 ? -1 : 1)*valueAxis->pixelOrientation(); if (qAbs(valuePixel-basePixel) <= qAbs(bottomOffset)) bottomOffset = valuePixel-basePixel; if (keyAxis->orientation() == Qt::Horizontal) { return QRectF(QPointF(keyPixel+lowerPixelWidth, valuePixel), QPointF(keyPixel+upperPixelWidth, basePixel+bottomOffset)).normalized(); } else { return QRectF(QPointF(basePixel+bottomOffset, keyPixel+lowerPixelWidth), QPointF(valuePixel, keyPixel+upperPixelWidth)).normalized(); } } /*! \internal This function is used to determine the width of the bar at coordinate \a key, according to the specified width (\ref setWidth) and width type (\ref setWidthType). The output parameters \a lower and \a upper return the number of pixels the bar extends to lower and higher keys, relative to the \a key coordinate (so with a non-reversed horizontal axis, \a lower is negative and \a upper positive). */ void QCPBars::getPixelWidth(double key, double &lower, double &upper) const { lower = 0; upper = 0; switch (mWidthType) { case wtAbsolute: { upper = mWidth*0.5*mKeyAxis.data()->pixelOrientation(); lower = -upper; break; } case wtAxisRectRatio: { if (mKeyAxis && mKeyAxis.data()->axisRect()) { if (mKeyAxis.data()->orientation() == Qt::Horizontal) upper = mKeyAxis.data()->axisRect()->width()*mWidth*0.5*mKeyAxis.data()->pixelOrientation(); else upper = mKeyAxis.data()->axisRect()->height()*mWidth*0.5*mKeyAxis.data()->pixelOrientation(); lower = -upper; } else qDebug() << Q_FUNC_INFO << "No key axis or axis rect defined"; break; } case wtPlotCoords: { if (mKeyAxis) { double keyPixel = mKeyAxis.data()->coordToPixel(key); upper = mKeyAxis.data()->coordToPixel(key+mWidth*0.5)-keyPixel; lower = mKeyAxis.data()->coordToPixel(key-mWidth*0.5)-keyPixel; // no need to qSwap(lower, higher) when range reversed, because higher/lower are gained by // coordinate transform which includes range direction } else qDebug() << Q_FUNC_INFO << "No key axis defined"; break; } } } /*! \internal This function is called to find at which value to start drawing the base of a bar at \a key, when it is stacked on top of another QCPBars (e.g. with \ref moveAbove). positive and negative bars are separated per stack (positive are stacked above baseValue upwards, negative are stacked below baseValue downwards). This can be indicated with \a positive. So if the bar for which we need the base value is negative, set \a positive to false. */ double QCPBars::getStackedBaseValue(double key, bool positive) const { if (mBarBelow) { double max = 0; // don't initialize with mBaseValue here because only base value of bottom-most bar has meaning in a bar stack // find bars of mBarBelow that are approximately at key and find largest one: double epsilon = qAbs(key)*(sizeof(key)==4 ? 1e-6 : 1e-14); // should be safe even when changed to use float at some point if (key == 0) epsilon = (sizeof(key)==4 ? 1e-6 : 1e-14); QCPBarsDataContainer::const_iterator it = mBarBelow.data()->mDataContainer->findBegin(key-epsilon); QCPBarsDataContainer::const_iterator itEnd = mBarBelow.data()->mDataContainer->findEnd(key+epsilon); while (it != itEnd) { if (it->key > key-epsilon && it->key < key+epsilon) { if ((positive && it->value > max) || (!positive && it->value < max)) max = it->value; } ++it; } // recurse down the bar-stack to find the total height: return max + mBarBelow.data()->getStackedBaseValue(key, positive); } else return mBaseValue; } /*! \internal Connects \a below and \a above to each other via their mBarAbove/mBarBelow properties. The bar(s) currently above lower and below upper will become disconnected to lower/upper. If lower is zero, upper will be disconnected at the bottom. If upper is zero, lower will be disconnected at the top. */ void QCPBars::connectBars(QCPBars *lower, QCPBars *upper) { if (!lower && !upper) return; if (!lower) // disconnect upper at bottom { // disconnect old bar below upper: if (upper->mBarBelow && upper->mBarBelow.data()->mBarAbove.data() == upper) upper->mBarBelow.data()->mBarAbove = 0; upper->mBarBelow = 0; } else if (!upper) // disconnect lower at top { // disconnect old bar above lower: if (lower->mBarAbove && lower->mBarAbove.data()->mBarBelow.data() == lower) lower->mBarAbove.data()->mBarBelow = 0; lower->mBarAbove = 0; } else // connect lower and upper { // disconnect old bar above lower: if (lower->mBarAbove && lower->mBarAbove.data()->mBarBelow.data() == lower) lower->mBarAbove.data()->mBarBelow = 0; // disconnect old bar below upper: if (upper->mBarBelow && upper->mBarBelow.data()->mBarAbove.data() == upper) upper->mBarBelow.data()->mBarAbove = 0; lower->mBarAbove = upper; upper->mBarBelow = lower; } } /* end of 'src/plottables/plottable-bars.cpp' */ /* including file 'src/plottables/plottable-statisticalbox.cpp', size 28622 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPStatisticalBoxData //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPStatisticalBoxData \brief Holds the data of one single data point for QCPStatisticalBox. The stored data is: \li \a key: coordinate on the key axis of this data point (this is the \a mainKey and the \a sortKey) \li \a minimum: the position of the lower whisker, typically the minimum measurement of the sample that's not considered an outlier. \li \a lowerQuartile: the lower end of the box. The lower and the upper quartiles are the two statistical quartiles around the median of the sample, they should contain 50% of the sample data. \li \a median: the value of the median mark inside the quartile box. The median separates the sample data in half (50% of the sample data is below/above the median). (This is the \a mainValue) \li \a upperQuartile: the upper end of the box. The lower and the upper quartiles are the two statistical quartiles around the median of the sample, they should contain 50% of the sample data. \li \a maximum: the position of the upper whisker, typically the maximum measurement of the sample that's not considered an outlier. \li \a outliers: a QVector of outlier values that will be drawn as scatter points at the \a key coordinate of this data point (see \ref QCPStatisticalBox::setOutlierStyle) The container for storing multiple data points is \ref QCPStatisticalBoxDataContainer. It is a typedef for \ref QCPDataContainer with \ref QCPStatisticalBoxData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods. \see QCPStatisticalBoxDataContainer */ /* start documentation of inline functions */ /*! \fn double QCPStatisticalBoxData::sortKey() const Returns the \a key member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static QCPStatisticalBoxData QCPStatisticalBoxData::fromSortKey(double sortKey) Returns a data point with the specified \a sortKey. All other members are set to zero. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static static bool QCPStatisticalBoxData::sortKeyIsMainKey() Since the member \a key is both the data point key coordinate and the data ordering parameter, this method returns true. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPStatisticalBoxData::mainKey() const Returns the \a key member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPStatisticalBoxData::mainValue() const Returns the \a median member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn QCPRange QCPStatisticalBoxData::valueRange() const Returns a QCPRange spanning from the \a minimum to the \a maximum member of this statistical box data point, possibly further expanded by outliers. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /* end documentation of inline functions */ /*! Constructs a data point with key and all values set to zero. */ QCPStatisticalBoxData::QCPStatisticalBoxData() : key(0), minimum(0), lowerQuartile(0), median(0), upperQuartile(0), maximum(0) { } /*! Constructs a data point with the specified \a key, \a minimum, \a lowerQuartile, \a median, \a upperQuartile, \a maximum and optionally a number of \a outliers. */ QCPStatisticalBoxData::QCPStatisticalBoxData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector &outliers) : key(key), minimum(minimum), lowerQuartile(lowerQuartile), median(median), upperQuartile(upperQuartile), maximum(maximum), outliers(outliers) { } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPStatisticalBox //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPStatisticalBox \brief A plottable representing a single statistical box in a plot. \image html QCPStatisticalBox.png To plot data, assign it with the \ref setData or \ref addData functions. Alternatively, you can also access and modify the data via the \ref data method, which returns a pointer to the internal \ref QCPStatisticalBoxDataContainer. Additionally each data point can itself have a list of outliers, drawn as scatter points at the key coordinate of the respective statistical box data point. They can either be set by using the respective \ref addData(double,double,double,double,double,double,const QVector&) "addData" method or accessing the individual data points through \ref data, and setting the QVector outliers of the data points directly. \section qcpstatisticalbox-appearance Changing the appearance The appearance of each data point box, ranging from the lower to the upper quartile, is controlled via \ref setPen and \ref setBrush. You may change the width of the boxes with \ref setWidth in plot coordinates. Each data point's visual representation also consists of two whiskers. Whiskers are the lines which reach from the upper quartile to the maximum, and from the lower quartile to the minimum. The appearance of the whiskers can be modified with: \ref setWhiskerPen, \ref setWhiskerBarPen, \ref setWhiskerWidth. The whisker width is the width of the bar perpendicular to the whisker at the top (for maximum) and bottom (for minimum). If the whisker pen is changed, make sure to set the \c capStyle to \c Qt::FlatCap. Otherwise the backbone line might exceed the whisker bars by a few pixels due to the pen cap being not perfectly flat. The median indicator line inside the box has its own pen, \ref setMedianPen. The outlier data points are drawn as normal scatter points. Their look can be controlled with \ref setOutlierStyle \section qcpstatisticalbox-usage Usage Like all data representing objects in QCustomPlot, the QCPStatisticalBox is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::removePlottable, etc.) Usually, you first create an instance: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpstatisticalbox-creation-1 which registers it with the QCustomPlot instance of the passed axes. Note that this QCustomPlot instance takes ownership of the plottable, so do not delete it manually but use QCustomPlot::removePlottable() instead. The newly created plottable can be modified, e.g.: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpstatisticalbox-creation-2 */ /* start documentation of inline functions */ /*! \fn QSharedPointer QCPStatisticalBox::data() const Returns a shared pointer to the internal data storage of type \ref QCPStatisticalBoxDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular \ref setData or \ref addData methods. */ /* end documentation of inline functions */ /*! Constructs a statistical box which uses \a keyAxis as its key axis ("x") and \a valueAxis as its value axis ("y"). \a keyAxis and \a valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though. The created QCPStatisticalBox is automatically registered with the QCustomPlot instance inferred from \a keyAxis. This QCustomPlot instance takes ownership of the QCPStatisticalBox, so do not delete it manually but use QCustomPlot::removePlottable() instead. */ QCPStatisticalBox::QCPStatisticalBox(QCPAxis *keyAxis, QCPAxis *valueAxis) : QCPAbstractPlottable1D(keyAxis, valueAxis), mWidth(0.5), mWhiskerWidth(0.2), mWhiskerPen(Qt::black, 0, Qt::DashLine, Qt::FlatCap), mWhiskerBarPen(Qt::black), mWhiskerAntialiased(false), mMedianPen(Qt::black, 3, Qt::SolidLine, Qt::FlatCap), mOutlierStyle(QCPScatterStyle::ssCircle, Qt::blue, 6) { setPen(QPen(Qt::black)); setBrush(Qt::NoBrush); } /*! \overload Replaces the current data container with the provided \a data container. Since a QSharedPointer is used, multiple QCPStatisticalBoxes may share the same data container safely. Modifying the data in the container will then affect all statistical boxes that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpstatisticalbox-datasharing-1 If you do not wish to share containers, but create a copy from an existing container, rather use the \ref QCPDataContainer::set method on the statistical box data container directly: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpstatisticalbox-datasharing-2 \see addData */ void QCPStatisticalBox::setData(QSharedPointer data) { mDataContainer = data; } /*! \overload Replaces the current data with the provided points in \a keys, \a minimum, \a lowerQuartile, \a median, \a upperQuartile and \a maximum. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a keys in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. \see addData */ void QCPStatisticalBox::setData(const QVector &keys, const QVector &minimum, const QVector &lowerQuartile, const QVector &median, const QVector &upperQuartile, const QVector &maximum, bool alreadySorted) { mDataContainer->clear(); addData(keys, minimum, lowerQuartile, median, upperQuartile, maximum, alreadySorted); } /*! Sets the width of the boxes in key coordinates. \see setWhiskerWidth */ void QCPStatisticalBox::setWidth(double width) { mWidth = width; } /*! Sets the width of the whiskers in key coordinates. Whiskers are the lines which reach from the upper quartile to the maximum, and from the lower quartile to the minimum. \see setWidth */ void QCPStatisticalBox::setWhiskerWidth(double width) { mWhiskerWidth = width; } /*! Sets the pen used for drawing the whisker backbone. Whiskers are the lines which reach from the upper quartile to the maximum, and from the lower quartile to the minimum. Make sure to set the \c capStyle of the passed \a pen to \c Qt::FlatCap. Otherwise the backbone line might exceed the whisker bars by a few pixels due to the pen cap being not perfectly flat. \see setWhiskerBarPen */ void QCPStatisticalBox::setWhiskerPen(const QPen &pen) { mWhiskerPen = pen; } /*! Sets the pen used for drawing the whisker bars. Those are the lines parallel to the key axis at each end of the whisker backbone. Whiskers are the lines which reach from the upper quartile to the maximum, and from the lower quartile to the minimum. \see setWhiskerPen */ void QCPStatisticalBox::setWhiskerBarPen(const QPen &pen) { mWhiskerBarPen = pen; } /*! Sets whether the statistical boxes whiskers are drawn with antialiasing or not. Note that antialiasing settings may be overridden by QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements. */ void QCPStatisticalBox::setWhiskerAntialiased(bool enabled) { mWhiskerAntialiased = enabled; } /*! Sets the pen used for drawing the median indicator line inside the statistical boxes. */ void QCPStatisticalBox::setMedianPen(const QPen &pen) { mMedianPen = pen; } /*! Sets the appearance of the outlier data points. Outliers can be specified with the method \ref addData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector &outliers) */ void QCPStatisticalBox::setOutlierStyle(const QCPScatterStyle &style) { mOutlierStyle = style; } /*! \overload Adds the provided points in \a keys, \a minimum, \a lowerQuartile, \a median, \a upperQuartile and \a maximum to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a keys in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPStatisticalBox::addData(const QVector &keys, const QVector &minimum, const QVector &lowerQuartile, const QVector &median, const QVector &upperQuartile, const QVector &maximum, bool alreadySorted) { if (keys.size() != minimum.size() || minimum.size() != lowerQuartile.size() || lowerQuartile.size() != median.size() || median.size() != upperQuartile.size() || upperQuartile.size() != maximum.size() || maximum.size() != keys.size()) qDebug() << Q_FUNC_INFO << "keys, minimum, lowerQuartile, median, upperQuartile, maximum have different sizes:" << keys.size() << minimum.size() << lowerQuartile.size() << median.size() << upperQuartile.size() << maximum.size(); const int n = qMin(keys.size(), qMin(minimum.size(), qMin(lowerQuartile.size(), qMin(median.size(), qMin(upperQuartile.size(), maximum.size()))))); QVector tempData(n); QVector::iterator it = tempData.begin(); const QVector::iterator itEnd = tempData.end(); int i = 0; while (it != itEnd) { it->key = keys[i]; it->minimum = minimum[i]; it->lowerQuartile = lowerQuartile[i]; it->median = median[i]; it->upperQuartile = upperQuartile[i]; it->maximum = maximum[i]; ++it; ++i; } mDataContainer->add(tempData, alreadySorted); // don't modify tempData beyond this to prevent copy on write } /*! \overload Adds the provided data point as \a key, \a minimum, \a lowerQuartile, \a median, \a upperQuartile and \a maximum to the current data. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. */ void QCPStatisticalBox::addData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector &outliers) { mDataContainer->add(QCPStatisticalBoxData(key, minimum, lowerQuartile, median, upperQuartile, maximum, outliers)); } /*! \copydoc QCPPlottableInterface1D::selectTestRect */ QCPDataSelection QCPStatisticalBox::selectTestRect(const QRectF &rect, bool onlySelectable) const { QCPDataSelection result; if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return result; if (!mKeyAxis || !mValueAxis) return result; QCPStatisticalBoxDataContainer::const_iterator visibleBegin, visibleEnd; getVisibleDataBounds(visibleBegin, visibleEnd); for (QCPStatisticalBoxDataContainer::const_iterator it=visibleBegin; it!=visibleEnd; ++it) { if (rect.intersects(getQuartileBox(it))) result.addDataRange(QCPDataRange(it-mDataContainer->constBegin(), it-mDataContainer->constBegin()+1), false); } result.simplify(); return result; } /* inherits documentation from base class */ double QCPStatisticalBox::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return -1; if (!mKeyAxis || !mValueAxis) return -1; if (mKeyAxis->axisRect()->rect().contains(pos.toPoint())) { // get visible data range: QCPStatisticalBoxDataContainer::const_iterator visibleBegin, visibleEnd; QCPStatisticalBoxDataContainer::const_iterator closestDataPoint = mDataContainer->constEnd(); getVisibleDataBounds(visibleBegin, visibleEnd); double minDistSqr = std::numeric_limits::max(); for (QCPStatisticalBoxDataContainer::const_iterator it=visibleBegin; it!=visibleEnd; ++it) { if (getQuartileBox(it).contains(pos)) // quartile box { double currentDistSqr = mParentPlot->selectionTolerance()*0.99 * mParentPlot->selectionTolerance()*0.99; if (currentDistSqr < minDistSqr) { minDistSqr = currentDistSqr; closestDataPoint = it; } } else // whiskers { const QVector whiskerBackbones(getWhiskerBackboneLines(it)); for (int i=0; iconstBegin(); details->setValue(QCPDataSelection(QCPDataRange(pointIndex, pointIndex+1))); } return qSqrt(minDistSqr); } return -1; } /* inherits documentation from base class */ QCPRange QCPStatisticalBox::getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain) const { QCPRange range = mDataContainer->keyRange(foundRange, inSignDomain); // determine exact range by including width of bars/flags: if (foundRange) { if (inSignDomain != QCP::sdPositive || range.lower-mWidth*0.5 > 0) range.lower -= mWidth*0.5; if (inSignDomain != QCP::sdNegative || range.upper+mWidth*0.5 < 0) range.upper += mWidth*0.5; } return range; } /* inherits documentation from base class */ QCPRange QCPStatisticalBox::getValueRange(bool &foundRange, QCP::SignDomain inSignDomain, const QCPRange &inKeyRange) const { return mDataContainer->valueRange(foundRange, inSignDomain, inKeyRange); } /* inherits documentation from base class */ void QCPStatisticalBox::draw(QCPPainter *painter) { if (mDataContainer->isEmpty()) return; QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } QCPStatisticalBoxDataContainer::const_iterator visibleBegin, visibleEnd; getVisibleDataBounds(visibleBegin, visibleEnd); // loop over and draw segments of unselected/selected data: QList selectedSegments, unselectedSegments, allSegments; getDataSegments(selectedSegments, unselectedSegments); allSegments << unselectedSegments << selectedSegments; for (int i=0; i= unselectedSegments.size(); QCPStatisticalBoxDataContainer::const_iterator begin = visibleBegin; QCPStatisticalBoxDataContainer::const_iterator end = visibleEnd; mDataContainer->limitIteratorsToDataRange(begin, end, allSegments.at(i)); if (begin == end) continue; for (QCPStatisticalBoxDataContainer::const_iterator it=begin; it!=end; ++it) { // check data validity if flag set: # ifdef QCUSTOMPLOT_CHECK_DATA if (QCP::isInvalidData(it->key, it->minimum) || QCP::isInvalidData(it->lowerQuartile, it->median) || QCP::isInvalidData(it->upperQuartile, it->maximum)) qDebug() << Q_FUNC_INFO << "Data point at" << it->key << "of drawn range has invalid data." << "Plottable name:" << name(); for (int i=0; ioutliers.size(); ++i) if (QCP::isInvalidData(it->outliers.at(i))) qDebug() << Q_FUNC_INFO << "Data point outlier at" << it->key << "of drawn range invalid." << "Plottable name:" << name(); # endif if (isSelectedSegment && mSelectionDecorator) { mSelectionDecorator->applyPen(painter); mSelectionDecorator->applyBrush(painter); } else { painter->setPen(mPen); painter->setBrush(mBrush); } QCPScatterStyle finalOutlierStyle = mOutlierStyle; if (isSelectedSegment && mSelectionDecorator) finalOutlierStyle = mSelectionDecorator->getFinalScatterStyle(mOutlierStyle); drawStatisticalBox(painter, it, finalOutlierStyle); } } // draw other selection decoration that isn't just line/scatter pens and brushes: if (mSelectionDecorator) mSelectionDecorator->drawDecoration(painter, selection()); } /* inherits documentation from base class */ void QCPStatisticalBox::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const { // draw filled rect: applyDefaultAntialiasingHint(painter); painter->setPen(mPen); painter->setBrush(mBrush); QRectF r = QRectF(0, 0, rect.width()*0.67, rect.height()*0.67); r.moveCenter(rect.center()); painter->drawRect(r); } /*! Draws the graphical representation of a single statistical box with the data given by the iterator \a it with the provided \a painter. If the statistical box has a set of outlier data points, they are drawn with \a outlierStyle. \see getQuartileBox, getWhiskerBackboneLines, getWhiskerBarLines */ void QCPStatisticalBox::drawStatisticalBox(QCPPainter *painter, QCPStatisticalBoxDataContainer::const_iterator it, const QCPScatterStyle &outlierStyle) const { // draw quartile box: applyDefaultAntialiasingHint(painter); const QRectF quartileBox = getQuartileBox(it); painter->drawRect(quartileBox); // draw median line with cliprect set to quartile box: painter->save(); painter->setClipRect(quartileBox, Qt::IntersectClip); painter->setPen(mMedianPen); painter->drawLine(QLineF(coordsToPixels(it->key-mWidth*0.5, it->median), coordsToPixels(it->key+mWidth*0.5, it->median))); painter->restore(); // draw whisker lines: applyAntialiasingHint(painter, mWhiskerAntialiased, QCP::aePlottables); painter->setPen(mWhiskerPen); painter->drawLines(getWhiskerBackboneLines(it)); painter->setPen(mWhiskerBarPen); painter->drawLines(getWhiskerBarLines(it)); // draw outliers: applyScattersAntialiasingHint(painter); outlierStyle.applyTo(painter, mPen); for (int i=0; ioutliers.size(); ++i) outlierStyle.drawShape(painter, coordsToPixels(it->key, it->outliers.at(i))); } /*! \internal called by \ref draw to determine which data (key) range is visible at the current key axis range setting, so only that needs to be processed. It also takes into account the bar width. \a begin returns an iterator to the lowest data point that needs to be taken into account when plotting. Note that in order to get a clean plot all the way to the edge of the axis rect, \a lower may still be just outside the visible range. \a end returns an iterator one higher than the highest visible data point. Same as before, \a end may also lie just outside of the visible range. if the plottable contains no data, both \a begin and \a end point to constEnd. */ void QCPStatisticalBox::getVisibleDataBounds(QCPStatisticalBoxDataContainer::const_iterator &begin, QCPStatisticalBoxDataContainer::const_iterator &end) const { if (!mKeyAxis) { qDebug() << Q_FUNC_INFO << "invalid key axis"; begin = mDataContainer->constEnd(); end = mDataContainer->constEnd(); return; } begin = mDataContainer->findBegin(mKeyAxis.data()->range().lower-mWidth*0.5); // subtract half width of box to include partially visible data points end = mDataContainer->findEnd(mKeyAxis.data()->range().upper+mWidth*0.5); // add half width of box to include partially visible data points } /*! \internal Returns the box in plot coordinates (keys in x, values in y of the returned rect) that covers the value range from the lower to the upper quartile, of the data given by \a it. \see drawStatisticalBox, getWhiskerBackboneLines, getWhiskerBarLines */ QRectF QCPStatisticalBox::getQuartileBox(QCPStatisticalBoxDataContainer::const_iterator it) const { QRectF result; result.setTopLeft(coordsToPixels(it->key-mWidth*0.5, it->upperQuartile)); result.setBottomRight(coordsToPixels(it->key+mWidth*0.5, it->lowerQuartile)); return result; } /*! \internal Returns the whisker backbones (keys in x, values in y of the returned lines) that cover the value range from the minimum to the lower quartile, and from the upper quartile to the maximum of the data given by \a it. \see drawStatisticalBox, getQuartileBox, getWhiskerBarLines */ QVector QCPStatisticalBox::getWhiskerBackboneLines(QCPStatisticalBoxDataContainer::const_iterator it) const { QVector result(2); result[0].setPoints(coordsToPixels(it->key, it->lowerQuartile), coordsToPixels(it->key, it->minimum)); // min backbone result[1].setPoints(coordsToPixels(it->key, it->upperQuartile), coordsToPixels(it->key, it->maximum)); // max backbone return result; } /*! \internal Returns the whisker bars (keys in x, values in y of the returned lines) that are placed at the end of the whisker backbones, at the minimum and maximum of the data given by \a it. \see drawStatisticalBox, getQuartileBox, getWhiskerBackboneLines */ QVector QCPStatisticalBox::getWhiskerBarLines(QCPStatisticalBoxDataContainer::const_iterator it) const { QVector result(2); result[0].setPoints(coordsToPixels(it->key-mWhiskerWidth*0.5, it->minimum), coordsToPixels(it->key+mWhiskerWidth*0.5, it->minimum)); // min bar result[1].setPoints(coordsToPixels(it->key-mWhiskerWidth*0.5, it->maximum), coordsToPixels(it->key+mWhiskerWidth*0.5, it->maximum)); // max bar return result; } /* end of 'src/plottables/plottable-statisticalbox.cpp' */ /* including file 'src/plottables/plottable-colormap.cpp', size 47881 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPColorMapData //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPColorMapData \brief Holds the two-dimensional data of a QCPColorMap plottable. This class is a data storage for \ref QCPColorMap. It holds a two-dimensional array, which \ref QCPColorMap then displays as a 2D image in the plot, where the array values are represented by a color, depending on the value. The size of the array can be controlled via \ref setSize (or \ref setKeySize, \ref setValueSize). Which plot coordinates these cells correspond to can be configured with \ref setRange (or \ref setKeyRange, \ref setValueRange). The data cells can be accessed in two ways: They can be directly addressed by an integer index with \ref setCell. This is the fastest method. Alternatively, they can be addressed by their plot coordinate with \ref setData. plot coordinate to cell index transformations and vice versa are provided by the functions \ref coordToCell and \ref cellToCoord. A \ref QCPColorMapData also holds an on-demand two-dimensional array of alpha values which (if allocated) has the same size as the data map. It can be accessed via \ref setAlpha, \ref fillAlpha and \ref clearAlpha. The memory for the alpha map is only allocated if needed, i.e. on the first call of \ref setAlpha. \ref clearAlpha restores full opacity and frees the alpha map. This class also buffers the minimum and maximum values that are in the data set, to provide QCPColorMap::rescaleDataRange with the necessary information quickly. Setting a cell to a value that is greater than the current maximum increases this maximum to the new value. However, setting the cell that currently holds the maximum value to a smaller value doesn't decrease the maximum again, because finding the true new maximum would require going through the entire data array, which might be time consuming. The same holds for the data minimum. This functionality is given by \ref recalculateDataBounds, such that you can decide when it is sensible to find the true current minimum and maximum. The method QCPColorMap::rescaleDataRange offers a convenience parameter \a recalculateDataBounds which may be set to true to automatically call \ref recalculateDataBounds internally. */ /* start of documentation of inline functions */ /*! \fn bool QCPColorMapData::isEmpty() const Returns whether this instance carries no data. This is equivalent to having a size where at least one of the dimensions is 0 (see \ref setSize). */ /* end of documentation of inline functions */ /*! Constructs a new QCPColorMapData instance. The instance has \a keySize cells in the key direction and \a valueSize cells in the value direction. These cells will be displayed by the \ref QCPColorMap at the coordinates \a keyRange and \a valueRange. \see setSize, setKeySize, setValueSize, setRange, setKeyRange, setValueRange */ QCPColorMapData::QCPColorMapData(int keySize, int valueSize, const QCPRange &keyRange, const QCPRange &valueRange) : mKeySize(0), mValueSize(0), mKeyRange(keyRange), mValueRange(valueRange), mIsEmpty(true), mData(0), mAlpha(0), mDataModified(true) { setSize(keySize, valueSize); fill(0); } QCPColorMapData::~QCPColorMapData() { if (mData) delete[] mData; if (mAlpha) delete[] mAlpha; } /*! Constructs a new QCPColorMapData instance copying the data and range of \a other. */ QCPColorMapData::QCPColorMapData(const QCPColorMapData &other) : mKeySize(0), mValueSize(0), mIsEmpty(true), mData(0), mAlpha(0), mDataModified(true) { *this = other; } /*! Overwrites this color map data instance with the data stored in \a other. The alpha map state is transferred, too. */ QCPColorMapData &QCPColorMapData::operator=(const QCPColorMapData &other) { if (&other != this) { const int keySize = other.keySize(); const int valueSize = other.valueSize(); if (!other.mAlpha && mAlpha) clearAlpha(); setSize(keySize, valueSize); if (other.mAlpha && !mAlpha) createAlpha(false); setRange(other.keyRange(), other.valueRange()); if (!isEmpty()) { memcpy(mData, other.mData, sizeof(mData[0])*keySize*valueSize); if (mAlpha) memcpy(mAlpha, other.mAlpha, sizeof(mAlpha[0])*keySize*valueSize); } mDataBounds = other.mDataBounds; mDataModified = true; } return *this; } /* undocumented getter */ double QCPColorMapData::data(double key, double value) { int keyCell = (key-mKeyRange.lower)/(mKeyRange.upper-mKeyRange.lower)*(mKeySize-1)+0.5; int valueCell = (value-mValueRange.lower)/(mValueRange.upper-mValueRange.lower)*(mValueSize-1)+0.5; if (keyCell >= 0 && keyCell < mKeySize && valueCell >= 0 && valueCell < mValueSize) return mData[valueCell*mKeySize + keyCell]; else return 0; } /* undocumented getter */ double QCPColorMapData::cell(int keyIndex, int valueIndex) { if (keyIndex >= 0 && keyIndex < mKeySize && valueIndex >= 0 && valueIndex < mValueSize) return mData[valueIndex*mKeySize + keyIndex]; else return 0; } /*! Returns the alpha map value of the cell with the indices \a keyIndex and \a valueIndex. If this color map data doesn't have an alpha map (because \ref setAlpha was never called after creation or after a call to \ref clearAlpha), returns 255, which corresponds to full opacity. \see setAlpha */ unsigned char QCPColorMapData::alpha(int keyIndex, int valueIndex) { if (mAlpha && keyIndex >= 0 && keyIndex < mKeySize && valueIndex >= 0 && valueIndex < mValueSize) return mAlpha[valueIndex*mKeySize + keyIndex]; else return 255; } /*! Resizes the data array to have \a keySize cells in the key dimension and \a valueSize cells in the value dimension. The current data is discarded and the map cells are set to 0, unless the map had already the requested size. Setting at least one of \a keySize or \a valueSize to zero frees the internal data array and \ref isEmpty returns true. \see setRange, setKeySize, setValueSize */ void QCPColorMapData::setSize(int keySize, int valueSize) { if (keySize != mKeySize || valueSize != mValueSize) { mKeySize = keySize; mValueSize = valueSize; if (mData) delete[] mData; mIsEmpty = mKeySize == 0 || mValueSize == 0; if (!mIsEmpty) { #ifdef __EXCEPTIONS try { // 2D arrays get memory intensive fast. So if the allocation fails, at least output debug message #endif mData = new double[mKeySize*mValueSize]; #ifdef __EXCEPTIONS } catch (...) { mData = 0; } #endif if (mData) fill(0); else qDebug() << Q_FUNC_INFO << "out of memory for data dimensions "<< mKeySize << "*" << mValueSize; } else mData = 0; if (mAlpha) // if we had an alpha map, recreate it with new size createAlpha(); mDataModified = true; } } /*! Resizes the data array to have \a keySize cells in the key dimension. The current data is discarded and the map cells are set to 0, unless the map had already the requested size. Setting \a keySize to zero frees the internal data array and \ref isEmpty returns true. \see setKeyRange, setSize, setValueSize */ void QCPColorMapData::setKeySize(int keySize) { setSize(keySize, mValueSize); } /*! Resizes the data array to have \a valueSize cells in the value dimension. The current data is discarded and the map cells are set to 0, unless the map had already the requested size. Setting \a valueSize to zero frees the internal data array and \ref isEmpty returns true. \see setValueRange, setSize, setKeySize */ void QCPColorMapData::setValueSize(int valueSize) { setSize(mKeySize, valueSize); } /*! Sets the coordinate ranges the data shall be distributed over. This defines the rectangular area covered by the color map in plot coordinates. The outer cells will be centered on the range boundaries given to this function. For example, if the key size (\ref setKeySize) is 3 and \a keyRange is set to QCPRange(2, 3) there will be cells centered on the key coordinates 2, 2.5 and 3. \see setSize */ void QCPColorMapData::setRange(const QCPRange &keyRange, const QCPRange &valueRange) { setKeyRange(keyRange); setValueRange(valueRange); } /*! Sets the coordinate range the data shall be distributed over in the key dimension. Together with the value range, This defines the rectangular area covered by the color map in plot coordinates. The outer cells will be centered on the range boundaries given to this function. For example, if the key size (\ref setKeySize) is 3 and \a keyRange is set to QCPRange(2, 3) there will be cells centered on the key coordinates 2, 2.5 and 3. \see setRange, setValueRange, setSize */ void QCPColorMapData::setKeyRange(const QCPRange &keyRange) { mKeyRange = keyRange; } /*! Sets the coordinate range the data shall be distributed over in the value dimension. Together with the key range, This defines the rectangular area covered by the color map in plot coordinates. The outer cells will be centered on the range boundaries given to this function. For example, if the value size (\ref setValueSize) is 3 and \a valueRange is set to QCPRange(2, 3) there will be cells centered on the value coordinates 2, 2.5 and 3. \see setRange, setKeyRange, setSize */ void QCPColorMapData::setValueRange(const QCPRange &valueRange) { mValueRange = valueRange; } /*! Sets the data of the cell, which lies at the plot coordinates given by \a key and \a value, to \a z. \note The QCPColorMap always displays the data at equal key/value intervals, even if the key or value axis is set to a logarithmic scaling. If you want to use QCPColorMap with logarithmic axes, you shouldn't use the \ref QCPColorMapData::setData method as it uses a linear transformation to determine the cell index. Rather directly access the cell index with \ref QCPColorMapData::setCell. \see setCell, setRange */ void QCPColorMapData::setData(double key, double value, double z) { int keyCell = (key-mKeyRange.lower)/(mKeyRange.upper-mKeyRange.lower)*(mKeySize-1)+0.5; int valueCell = (value-mValueRange.lower)/(mValueRange.upper-mValueRange.lower)*(mValueSize-1)+0.5; if (keyCell >= 0 && keyCell < mKeySize && valueCell >= 0 && valueCell < mValueSize) { mData[valueCell*mKeySize + keyCell] = z; if (z < mDataBounds.lower) mDataBounds.lower = z; if (z > mDataBounds.upper) mDataBounds.upper = z; mDataModified = true; } } /*! Sets the data of the cell with indices \a keyIndex and \a valueIndex to \a z. The indices enumerate the cells starting from zero, up to the map's size-1 in the respective dimension (see \ref setSize). In the standard plot configuration (horizontal key axis and vertical value axis, both not range-reversed), the cell with indices (0, 0) is in the bottom left corner and the cell with indices (keySize-1, valueSize-1) is in the top right corner of the color map. \see setData, setSize */ void QCPColorMapData::setCell(int keyIndex, int valueIndex, double z) { if (keyIndex >= 0 && keyIndex < mKeySize && valueIndex >= 0 && valueIndex < mValueSize) { mData[valueIndex*mKeySize + keyIndex] = z; if (z < mDataBounds.lower) mDataBounds.lower = z; if (z > mDataBounds.upper) mDataBounds.upper = z; mDataModified = true; } else qDebug() << Q_FUNC_INFO << "index out of bounds:" << keyIndex << valueIndex; } /*! Sets the alpha of the color map cell given by \a keyIndex and \a valueIndex to \a alpha. A value of 0 for \a alpha results in a fully transparent cell, and a value of 255 results in a fully opaque cell. If an alpha map doesn't exist yet for this color map data, it will be created here. If you wish to restore full opacity and free any allocated memory of the alpha map, call \ref clearAlpha. Note that the cell-wise alpha which can be configured here is independent of any alpha configured in the color map's gradient (\ref QCPColorGradient). If a cell is affected both by the cell-wise and gradient alpha, the alpha values will be blended accordingly during rendering of the color map. \see fillAlpha, clearAlpha */ void QCPColorMapData::setAlpha(int keyIndex, int valueIndex, unsigned char alpha) { if (keyIndex >= 0 && keyIndex < mKeySize && valueIndex >= 0 && valueIndex < mValueSize) { if (mAlpha || createAlpha()) { mAlpha[valueIndex*mKeySize + keyIndex] = alpha; mDataModified = true; } } else qDebug() << Q_FUNC_INFO << "index out of bounds:" << keyIndex << valueIndex; } /*! Goes through the data and updates the buffered minimum and maximum data values. Calling this method is only advised if you are about to call \ref QCPColorMap::rescaleDataRange and can not guarantee that the cells holding the maximum or minimum data haven't been overwritten with a smaller or larger value respectively, since the buffered maximum/minimum values have been updated the last time. Why this is the case is explained in the class description (\ref QCPColorMapData). Note that the method \ref QCPColorMap::rescaleDataRange provides a parameter \a recalculateDataBounds for convenience. Setting this to true will call this method for you, before doing the rescale. */ void QCPColorMapData::recalculateDataBounds() { if (mKeySize > 0 && mValueSize > 0) { double minHeight = mData[0]; double maxHeight = mData[0]; const int dataCount = mValueSize*mKeySize; for (int i=0; i maxHeight) maxHeight = mData[i]; if (mData[i] < minHeight) minHeight = mData[i]; } mDataBounds.lower = minHeight; mDataBounds.upper = maxHeight; } } /*! Frees the internal data memory. This is equivalent to calling \ref setSize "setSize(0, 0)". */ void QCPColorMapData::clear() { setSize(0, 0); } /*! Frees the internal alpha map. The color map will have full opacity again. */ void QCPColorMapData::clearAlpha() { if (mAlpha) { delete[] mAlpha; mAlpha = 0; mDataModified = true; } } /*! Sets all cells to the value \a z. */ void QCPColorMapData::fill(double z) { const int dataCount = mValueSize*mKeySize; for (int i=0; i(data); return; } if (copy) { *mMapData = *data; } else { delete mMapData; mMapData = data; } mMapImageInvalidated = true; } /*! Sets the data range of this color map to \a dataRange. The data range defines which data values are mapped to the color gradient. To make the data range span the full range of the data set, use \ref rescaleDataRange. \see QCPColorScale::setDataRange */ void QCPColorMap::setDataRange(const QCPRange &dataRange) { if (!QCPRange::validRange(dataRange)) return; if (mDataRange.lower != dataRange.lower || mDataRange.upper != dataRange.upper) { if (mDataScaleType == QCPAxis::stLogarithmic) mDataRange = dataRange.sanitizedForLogScale(); else mDataRange = dataRange.sanitizedForLinScale(); mMapImageInvalidated = true; emit dataRangeChanged(mDataRange); } } /*! Sets whether the data is correlated with the color gradient linearly or logarithmically. \see QCPColorScale::setDataScaleType */ void QCPColorMap::setDataScaleType(QCPAxis::ScaleType scaleType) { if (mDataScaleType != scaleType) { mDataScaleType = scaleType; mMapImageInvalidated = true; emit dataScaleTypeChanged(mDataScaleType); if (mDataScaleType == QCPAxis::stLogarithmic) setDataRange(mDataRange.sanitizedForLogScale()); } } /*! Sets the color gradient that is used to represent the data. For more details on how to create an own gradient or use one of the preset gradients, see \ref QCPColorGradient. The colors defined by the gradient will be used to represent data values in the currently set data range, see \ref setDataRange. Data points that are outside this data range will either be colored uniformly with the respective gradient boundary color, or the gradient will repeat, depending on \ref QCPColorGradient::setPeriodic. \see QCPColorScale::setGradient */ void QCPColorMap::setGradient(const QCPColorGradient &gradient) { if (mGradient != gradient) { mGradient = gradient; mMapImageInvalidated = true; emit gradientChanged(mGradient); } } /*! Sets whether the color map image shall use bicubic interpolation when displaying the color map shrinked or expanded, and not at a 1:1 pixel-to-data scale. \image html QCPColorMap-interpolate.png "A 10*10 color map, with interpolation and without interpolation enabled" */ void QCPColorMap::setInterpolate(bool enabled) { mInterpolate = enabled; mMapImageInvalidated = true; // because oversampling factors might need to change } /*! Sets whether the outer most data rows and columns are clipped to the specified key and value range (see \ref QCPColorMapData::setKeyRange, \ref QCPColorMapData::setValueRange). if \a enabled is set to false, the data points at the border of the color map are drawn with the same width and height as all other data points. Since the data points are represented by rectangles of one color centered on the data coordinate, this means that the shown color map extends by half a data point over the specified key/value range in each direction. \image html QCPColorMap-tightboundary.png "A color map, with tight boundary enabled and disabled" */ void QCPColorMap::setTightBoundary(bool enabled) { mTightBoundary = enabled; } /*! Associates the color scale \a colorScale with this color map. This means that both the color scale and the color map synchronize their gradient, data range and data scale type (\ref setGradient, \ref setDataRange, \ref setDataScaleType). Multiple color maps can be associated with one single color scale. This causes the color maps to also synchronize those properties, via the mutual color scale. This function causes the color map to adopt the current color gradient, data range and data scale type of \a colorScale. After this call, you may change these properties at either the color map or the color scale, and the setting will be applied to both. Pass 0 as \a colorScale to disconnect the color scale from this color map again. */ void QCPColorMap::setColorScale(QCPColorScale *colorScale) { if (mColorScale) // unconnect signals from old color scale { disconnect(this, SIGNAL(dataRangeChanged(QCPRange)), mColorScale.data(), SLOT(setDataRange(QCPRange))); disconnect(this, SIGNAL(dataScaleTypeChanged(QCPAxis::ScaleType)), mColorScale.data(), SLOT(setDataScaleType(QCPAxis::ScaleType))); disconnect(this, SIGNAL(gradientChanged(QCPColorGradient)), mColorScale.data(), SLOT(setGradient(QCPColorGradient))); disconnect(mColorScale.data(), SIGNAL(dataRangeChanged(QCPRange)), this, SLOT(setDataRange(QCPRange))); disconnect(mColorScale.data(), SIGNAL(gradientChanged(QCPColorGradient)), this, SLOT(setGradient(QCPColorGradient))); disconnect(mColorScale.data(), SIGNAL(dataScaleTypeChanged(QCPAxis::ScaleType)), this, SLOT(setDataScaleType(QCPAxis::ScaleType))); } mColorScale = colorScale; if (mColorScale) // connect signals to new color scale { setGradient(mColorScale.data()->gradient()); setDataRange(mColorScale.data()->dataRange()); setDataScaleType(mColorScale.data()->dataScaleType()); connect(this, SIGNAL(dataRangeChanged(QCPRange)), mColorScale.data(), SLOT(setDataRange(QCPRange))); connect(this, SIGNAL(dataScaleTypeChanged(QCPAxis::ScaleType)), mColorScale.data(), SLOT(setDataScaleType(QCPAxis::ScaleType))); connect(this, SIGNAL(gradientChanged(QCPColorGradient)), mColorScale.data(), SLOT(setGradient(QCPColorGradient))); connect(mColorScale.data(), SIGNAL(dataRangeChanged(QCPRange)), this, SLOT(setDataRange(QCPRange))); connect(mColorScale.data(), SIGNAL(gradientChanged(QCPColorGradient)), this, SLOT(setGradient(QCPColorGradient))); connect(mColorScale.data(), SIGNAL(dataScaleTypeChanged(QCPAxis::ScaleType)), this, SLOT(setDataScaleType(QCPAxis::ScaleType))); } } /*! Sets the data range (\ref setDataRange) to span the minimum and maximum values that occur in the current data set. This corresponds to the \ref rescaleKeyAxis or \ref rescaleValueAxis methods, only for the third data dimension of the color map. The minimum and maximum values of the data set are buffered in the internal QCPColorMapData instance (\ref data). As data is updated via its \ref QCPColorMapData::setCell or \ref QCPColorMapData::setData, the buffered minimum and maximum values are updated, too. For performance reasons, however, they are only updated in an expanding fashion. So the buffered maximum can only increase and the buffered minimum can only decrease. In consequence, changes to the data that actually lower the maximum of the data set (by overwriting the cell holding the current maximum with a smaller value), aren't recognized and the buffered maximum overestimates the true maximum of the data set. The same happens for the buffered minimum. To recalculate the true minimum and maximum by explicitly looking at each cell, the method QCPColorMapData::recalculateDataBounds can be used. For convenience, setting the parameter \a recalculateDataBounds calls this method before setting the data range to the buffered minimum and maximum. \see setDataRange */ void QCPColorMap::rescaleDataRange(bool recalculateDataBounds) { if (recalculateDataBounds) mMapData->recalculateDataBounds(); setDataRange(mMapData->dataBounds()); } /*! Takes the current appearance of the color map and updates the legend icon, which is used to represent this color map in the legend (see \ref QCPLegend). The \a transformMode specifies whether the rescaling is done by a faster, low quality image scaling algorithm (Qt::FastTransformation) or by a slower, higher quality algorithm (Qt::SmoothTransformation). The current color map appearance is scaled down to \a thumbSize. Ideally, this should be equal to the size of the legend icon (see \ref QCPLegend::setIconSize). If it isn't exactly the configured legend icon size, the thumb will be rescaled during drawing of the legend item. \see setDataRange */ void QCPColorMap::updateLegendIcon(Qt::TransformationMode transformMode, const QSize &thumbSize) { if (mMapImage.isNull() && !data()->isEmpty()) updateMapImage(); // try to update map image if it's null (happens if no draw has happened yet) if (!mMapImage.isNull()) // might still be null, e.g. if data is empty, so check here again { bool mirrorX = (keyAxis()->orientation() == Qt::Horizontal ? keyAxis() : valueAxis())->rangeReversed(); bool mirrorY = (valueAxis()->orientation() == Qt::Vertical ? valueAxis() : keyAxis())->rangeReversed(); mLegendIcon = QPixmap::fromImage(mMapImage.mirrored(mirrorX, mirrorY)).scaled(thumbSize, Qt::KeepAspectRatio, transformMode); } } /* inherits documentation from base class */ double QCPColorMap::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if ((onlySelectable && mSelectable == QCP::stNone) || mMapData->isEmpty()) return -1; if (!mKeyAxis || !mValueAxis) return -1; if (mKeyAxis.data()->axisRect()->rect().contains(pos.toPoint())) { double posKey, posValue; pixelsToCoords(pos, posKey, posValue); if (mMapData->keyRange().contains(posKey) && mMapData->valueRange().contains(posValue)) { if (details) details->setValue(QCPDataSelection(QCPDataRange(0, 1))); // temporary solution, to facilitate whole-plottable selection. Replace in future version with segmented 2D selection. return mParentPlot->selectionTolerance()*0.99; } } return -1; } /* inherits documentation from base class */ QCPRange QCPColorMap::getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain) const { foundRange = true; QCPRange result = mMapData->keyRange(); result.normalize(); if (inSignDomain == QCP::sdPositive) { if (result.lower <= 0 && result.upper > 0) result.lower = result.upper*1e-3; else if (result.lower <= 0 && result.upper <= 0) foundRange = false; } else if (inSignDomain == QCP::sdNegative) { if (result.upper >= 0 && result.lower < 0) result.upper = result.lower*1e-3; else if (result.upper >= 0 && result.lower >= 0) foundRange = false; } return result; } /* inherits documentation from base class */ QCPRange QCPColorMap::getValueRange(bool &foundRange, QCP::SignDomain inSignDomain, const QCPRange &inKeyRange) const { if (inKeyRange != QCPRange()) { if (mMapData->keyRange().upper < inKeyRange.lower || mMapData->keyRange().lower > inKeyRange.upper) { foundRange = false; return QCPRange(); } } foundRange = true; QCPRange result = mMapData->valueRange(); result.normalize(); if (inSignDomain == QCP::sdPositive) { if (result.lower <= 0 && result.upper > 0) result.lower = result.upper*1e-3; else if (result.lower <= 0 && result.upper <= 0) foundRange = false; } else if (inSignDomain == QCP::sdNegative) { if (result.upper >= 0 && result.lower < 0) result.upper = result.lower*1e-3; else if (result.upper >= 0 && result.lower >= 0) foundRange = false; } return result; } /*! \internal Updates the internal map image buffer by going through the internal \ref QCPColorMapData and turning the data values into color pixels with \ref QCPColorGradient::colorize. This method is called by \ref QCPColorMap::draw if either the data has been modified or the map image has been invalidated for a different reason (e.g. a change of the data range with \ref setDataRange). If the map cell count is low, the image created will be oversampled in order to avoid a QPainter::drawImage bug which makes inner pixel boundaries jitter when stretch-drawing images without smooth transform enabled. Accordingly, oversampling isn't performed if \ref setInterpolate is true. */ void QCPColorMap::updateMapImage() { QCPAxis *keyAxis = mKeyAxis.data(); if (!keyAxis) return; if (mMapData->isEmpty()) return; const QImage::Format format = QImage::Format_ARGB32_Premultiplied; const int keySize = mMapData->keySize(); const int valueSize = mMapData->valueSize(); int keyOversamplingFactor = mInterpolate ? 1 : (int)(1.0+100.0/(double)keySize); // make mMapImage have at least size 100, factor becomes 1 if size > 200 or interpolation is on int valueOversamplingFactor = mInterpolate ? 1 : (int)(1.0+100.0/(double)valueSize); // make mMapImage have at least size 100, factor becomes 1 if size > 200 or interpolation is on // resize mMapImage to correct dimensions including possible oversampling factors, according to key/value axes orientation: if (keyAxis->orientation() == Qt::Horizontal && (mMapImage.width() != keySize*keyOversamplingFactor || mMapImage.height() != valueSize*valueOversamplingFactor)) mMapImage = QImage(QSize(keySize*keyOversamplingFactor, valueSize*valueOversamplingFactor), format); else if (keyAxis->orientation() == Qt::Vertical && (mMapImage.width() != valueSize*valueOversamplingFactor || mMapImage.height() != keySize*keyOversamplingFactor)) mMapImage = QImage(QSize(valueSize*valueOversamplingFactor, keySize*keyOversamplingFactor), format); if (mMapImage.isNull()) { qDebug() << Q_FUNC_INFO << "Couldn't create map image (possibly too large for memory)"; mMapImage = QImage(QSize(10, 10), format); mMapImage.fill(Qt::black); } else { QImage *localMapImage = &mMapImage; // this is the image on which the colorization operates. Either the final mMapImage, or if we need oversampling, mUndersampledMapImage if (keyOversamplingFactor > 1 || valueOversamplingFactor > 1) { // resize undersampled map image to actual key/value cell sizes: if (keyAxis->orientation() == Qt::Horizontal && (mUndersampledMapImage.width() != keySize || mUndersampledMapImage.height() != valueSize)) mUndersampledMapImage = QImage(QSize(keySize, valueSize), format); else if (keyAxis->orientation() == Qt::Vertical && (mUndersampledMapImage.width() != valueSize || mUndersampledMapImage.height() != keySize)) mUndersampledMapImage = QImage(QSize(valueSize, keySize), format); localMapImage = &mUndersampledMapImage; // make the colorization run on the undersampled image } else if (!mUndersampledMapImage.isNull()) mUndersampledMapImage = QImage(); // don't need oversampling mechanism anymore (map size has changed) but mUndersampledMapImage still has nonzero size, free it const double *rawData = mMapData->mData; const unsigned char *rawAlpha = mMapData->mAlpha; if (keyAxis->orientation() == Qt::Horizontal) { const int lineCount = valueSize; const int rowCount = keySize; for (int line=0; line(localMapImage->scanLine(lineCount-1-line)); // invert scanline index because QImage counts scanlines from top, but our vertical index counts from bottom (mathematical coordinate system) if (rawAlpha) mGradient.colorize(rawData+line*rowCount, rawAlpha+line*rowCount, mDataRange, pixels, rowCount, 1, mDataScaleType==QCPAxis::stLogarithmic); else mGradient.colorize(rawData+line*rowCount, mDataRange, pixels, rowCount, 1, mDataScaleType==QCPAxis::stLogarithmic); } } else // keyAxis->orientation() == Qt::Vertical { const int lineCount = keySize; const int rowCount = valueSize; for (int line=0; line(localMapImage->scanLine(lineCount-1-line)); // invert scanline index because QImage counts scanlines from top, but our vertical index counts from bottom (mathematical coordinate system) if (rawAlpha) mGradient.colorize(rawData+line, rawAlpha+line, mDataRange, pixels, rowCount, lineCount, mDataScaleType==QCPAxis::stLogarithmic); else mGradient.colorize(rawData+line, mDataRange, pixels, rowCount, lineCount, mDataScaleType==QCPAxis::stLogarithmic); } } if (keyOversamplingFactor > 1 || valueOversamplingFactor > 1) { if (keyAxis->orientation() == Qt::Horizontal) mMapImage = mUndersampledMapImage.scaled(keySize*keyOversamplingFactor, valueSize*valueOversamplingFactor, Qt::IgnoreAspectRatio, Qt::FastTransformation); else mMapImage = mUndersampledMapImage.scaled(valueSize*valueOversamplingFactor, keySize*keyOversamplingFactor, Qt::IgnoreAspectRatio, Qt::FastTransformation); } } mMapData->mDataModified = false; mMapImageInvalidated = false; } /* inherits documentation from base class */ void QCPColorMap::draw(QCPPainter *painter) { if (mMapData->isEmpty()) return; if (!mKeyAxis || !mValueAxis) return; applyDefaultAntialiasingHint(painter); if (mMapData->mDataModified || mMapImageInvalidated) updateMapImage(); // use buffer if painting vectorized (PDF): const bool useBuffer = painter->modes().testFlag(QCPPainter::pmVectorized); QCPPainter *localPainter = painter; // will be redirected to paint on mapBuffer if painting vectorized QRectF mapBufferTarget; // the rect in absolute widget coordinates where the visible map portion/buffer will end up in QPixmap mapBuffer; if (useBuffer) { const double mapBufferPixelRatio = 3; // factor by which DPI is increased in embedded bitmaps mapBufferTarget = painter->clipRegion().boundingRect(); mapBuffer = QPixmap((mapBufferTarget.size()*mapBufferPixelRatio).toSize()); mapBuffer.fill(Qt::transparent); localPainter = new QCPPainter(&mapBuffer); localPainter->scale(mapBufferPixelRatio, mapBufferPixelRatio); localPainter->translate(-mapBufferTarget.topLeft()); } QRectF imageRect = QRectF(coordsToPixels(mMapData->keyRange().lower, mMapData->valueRange().lower), coordsToPixels(mMapData->keyRange().upper, mMapData->valueRange().upper)).normalized(); // extend imageRect to contain outer halves/quarters of bordering/cornering pixels (cells are centered on map range boundary): double halfCellWidth = 0; // in pixels double halfCellHeight = 0; // in pixels if (keyAxis()->orientation() == Qt::Horizontal) { if (mMapData->keySize() > 1) halfCellWidth = 0.5*imageRect.width()/(double)(mMapData->keySize()-1); if (mMapData->valueSize() > 1) halfCellHeight = 0.5*imageRect.height()/(double)(mMapData->valueSize()-1); } else // keyAxis orientation is Qt::Vertical { if (mMapData->keySize() > 1) halfCellHeight = 0.5*imageRect.height()/(double)(mMapData->keySize()-1); if (mMapData->valueSize() > 1) halfCellWidth = 0.5*imageRect.width()/(double)(mMapData->valueSize()-1); } imageRect.adjust(-halfCellWidth, -halfCellHeight, halfCellWidth, halfCellHeight); const bool mirrorX = (keyAxis()->orientation() == Qt::Horizontal ? keyAxis() : valueAxis())->rangeReversed(); const bool mirrorY = (valueAxis()->orientation() == Qt::Vertical ? valueAxis() : keyAxis())->rangeReversed(); const bool smoothBackup = localPainter->renderHints().testFlag(QPainter::SmoothPixmapTransform); localPainter->setRenderHint(QPainter::SmoothPixmapTransform, mInterpolate); QRegion clipBackup; if (mTightBoundary) { clipBackup = localPainter->clipRegion(); QRectF tightClipRect = QRectF(coordsToPixels(mMapData->keyRange().lower, mMapData->valueRange().lower), coordsToPixels(mMapData->keyRange().upper, mMapData->valueRange().upper)).normalized(); localPainter->setClipRect(tightClipRect, Qt::IntersectClip); } localPainter->drawImage(imageRect, mMapImage.mirrored(mirrorX, mirrorY)); if (mTightBoundary) localPainter->setClipRegion(clipBackup); localPainter->setRenderHint(QPainter::SmoothPixmapTransform, smoothBackup); if (useBuffer) // localPainter painted to mapBuffer, so now draw buffer with original painter { delete localPainter; painter->drawPixmap(mapBufferTarget.toRect(), mapBuffer); } } /* inherits documentation from base class */ void QCPColorMap::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const { applyDefaultAntialiasingHint(painter); // draw map thumbnail: if (!mLegendIcon.isNull()) { QPixmap scaledIcon = mLegendIcon.scaled(rect.size().toSize(), Qt::KeepAspectRatio, Qt::FastTransformation); QRectF iconRect = QRectF(0, 0, scaledIcon.width(), scaledIcon.height()); iconRect.moveCenter(rect.center()); painter->drawPixmap(iconRect.topLeft(), scaledIcon); } /* // draw frame: painter->setBrush(Qt::NoBrush); painter->setPen(Qt::black); painter->drawRect(rect.adjusted(1, 1, 0, 0)); */ } /* end of 'src/plottables/plottable-colormap.cpp' */ /* including file 'src/plottables/plottable-financial.cpp', size 42610 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPFinancialData //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPFinancialData \brief Holds the data of one single data point for QCPFinancial. The stored data is: \li \a key: coordinate on the key axis of this data point (this is the \a mainKey and the \a sortKey) \li \a open: The opening value at the data point (this is the \a mainValue) \li \a high: The high/maximum value at the data point \li \a low: The low/minimum value at the data point \li \a close: The closing value at the data point The container for storing multiple data points is \ref QCPFinancialDataContainer. It is a typedef for \ref QCPDataContainer with \ref QCPFinancialData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods. \see QCPFinancialDataContainer */ /* start documentation of inline functions */ /*! \fn double QCPFinancialData::sortKey() const Returns the \a key member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static QCPFinancialData QCPFinancialData::fromSortKey(double sortKey) Returns a data point with the specified \a sortKey. All other members are set to zero. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn static static bool QCPFinancialData::sortKeyIsMainKey() Since the member \a key is both the data point key coordinate and the data ordering parameter, this method returns true. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPFinancialData::mainKey() const Returns the \a key member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn double QCPFinancialData::mainValue() const Returns the \a open member of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /*! \fn QCPRange QCPFinancialData::valueRange() const Returns a QCPRange spanning from the \a low to the \a high value of this data point. For a general explanation of what this method is good for in the context of the data container, see the documentation of \ref QCPDataContainer. */ /* end documentation of inline functions */ /*! Constructs a data point with key and all values set to zero. */ QCPFinancialData::QCPFinancialData() : key(0), open(0), high(0), low(0), close(0) { } /*! Constructs a data point with the specified \a key and OHLC values. */ QCPFinancialData::QCPFinancialData(double key, double open, double high, double low, double close) : key(key), open(open), high(high), low(low), close(close) { } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPFinancial //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPFinancial \brief A plottable representing a financial stock chart \image html QCPFinancial.png This plottable represents time series data binned to certain intervals, mainly used for stock charts. The two common representations OHLC (Open-High-Low-Close) bars and Candlesticks can be set via \ref setChartStyle. The data is passed via \ref setData as a set of open/high/low/close values at certain keys (typically times). This means the data must be already binned appropriately. If data is only available as a series of values (e.g. \a price against \a time), you can use the static convenience function \ref timeSeriesToOhlc to generate binned OHLC-data which can then be passed to \ref setData. The width of the OHLC bars/candlesticks can be controlled with \ref setWidth and \ref setWidthType. A typical choice is to set the width type to \ref wtPlotCoords (the default) and the width to (or slightly less than) one time bin interval width. \section qcpfinancial-appearance Changing the appearance Charts can be either single- or two-colored (\ref setTwoColored). If set to be single-colored, lines are drawn with the plottable's pen (\ref setPen) and fills with the brush (\ref setBrush). If set to two-colored, positive changes of the value during an interval (\a close >= \a open) are represented with a different pen and brush than negative changes (\a close < \a open). These can be configured with \ref setPenPositive, \ref setPenNegative, \ref setBrushPositive, and \ref setBrushNegative. In two-colored mode, the normal plottable pen/brush is ignored. Upon selection however, the normal selected pen/brush (provided by the \ref selectionDecorator) is used, irrespective of whether the chart is single- or two-colored. \section qcpfinancial-usage Usage Like all data representing objects in QCustomPlot, the QCPFinancial is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::removePlottable, etc.) Usually, you first create an instance: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpfinancial-creation-1 which registers it with the QCustomPlot instance of the passed axes. Note that this QCustomPlot instance takes ownership of the plottable, so do not delete it manually but use QCustomPlot::removePlottable() instead. The newly created plottable can be modified, e.g.: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpfinancial-creation-2 Here we have used the static helper method \ref timeSeriesToOhlc, to turn a time-price data series into a 24-hour binned open-high-low-close data series as QCPFinancial uses. */ /* start of documentation of inline functions */ /*! \fn QCPFinancialDataContainer *QCPFinancial::data() const Returns a pointer to the internal data storage of type \ref QCPFinancialDataContainer. You may use it to directly manipulate the data, which may be more convenient and faster than using the regular \ref setData or \ref addData methods, in certain situations. */ /* end of documentation of inline functions */ /*! Constructs a financial chart which uses \a keyAxis as its key axis ("x") and \a valueAxis as its value axis ("y"). \a keyAxis and \a valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though. The created QCPFinancial is automatically registered with the QCustomPlot instance inferred from \a keyAxis. This QCustomPlot instance takes ownership of the QCPFinancial, so do not delete it manually but use QCustomPlot::removePlottable() instead. */ QCPFinancial::QCPFinancial(QCPAxis *keyAxis, QCPAxis *valueAxis) : QCPAbstractPlottable1D(keyAxis, valueAxis), mChartStyle(csCandlestick), mWidth(0.5), mWidthType(wtPlotCoords), mTwoColored(true), mBrushPositive(QBrush(QColor(50, 160, 0))), mBrushNegative(QBrush(QColor(180, 0, 15))), mPenPositive(QPen(QColor(40, 150, 0))), mPenNegative(QPen(QColor(170, 5, 5))) { mSelectionDecorator->setBrush(QBrush(QColor(160, 160, 255))); } QCPFinancial::~QCPFinancial() { } /*! \overload Replaces the current data container with the provided \a data container. Since a QSharedPointer is used, multiple QCPFinancials may share the same data container safely. Modifying the data in the container will then affect all financials that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpfinancial-datasharing-1 If you do not wish to share containers, but create a copy from an existing container, rather use the \ref QCPDataContainer::set method on the financial's data container directly: \snippet documentation/doc-code-snippets/mainwindow.cpp qcpfinancial-datasharing-2 \see addData, timeSeriesToOhlc */ void QCPFinancial::setData(QSharedPointer data) { mDataContainer = data; } /*! \overload Replaces the current data with the provided points in \a keys, \a open, \a high, \a low and \a close. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a keys in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. \see addData, timeSeriesToOhlc */ void QCPFinancial::setData(const QVector &keys, const QVector &open, const QVector &high, const QVector &low, const QVector &close, bool alreadySorted) { mDataContainer->clear(); addData(keys, open, high, low, close, alreadySorted); } /*! Sets which representation style shall be used to display the OHLC data. */ void QCPFinancial::setChartStyle(QCPFinancial::ChartStyle style) { mChartStyle = style; } /*! Sets the width of the individual bars/candlesticks to \a width in plot key coordinates. A typical choice is to set it to (or slightly less than) one bin interval width. */ void QCPFinancial::setWidth(double width) { mWidth = width; } /*! Sets how the width of the financial bars is defined. See the documentation of \ref WidthType for an explanation of the possible values for \a widthType. The default value is \ref wtPlotCoords. \see setWidth */ void QCPFinancial::setWidthType(QCPFinancial::WidthType widthType) { mWidthType = widthType; } /*! Sets whether this chart shall contrast positive from negative trends per data point by using two separate colors to draw the respective bars/candlesticks. If \a twoColored is false, the normal plottable's pen and brush are used (\ref setPen, \ref setBrush). \see setPenPositive, setPenNegative, setBrushPositive, setBrushNegative */ void QCPFinancial::setTwoColored(bool twoColored) { mTwoColored = twoColored; } /*! If \ref setTwoColored is set to true, this function controls the brush that is used to draw fills of data points with a positive trend (i.e. bars/candlesticks with close >= open). If \a twoColored is false, the normal plottable's pen and brush are used (\ref setPen, \ref setBrush). \see setBrushNegative, setPenPositive, setPenNegative */ void QCPFinancial::setBrushPositive(const QBrush &brush) { mBrushPositive = brush; } /*! If \ref setTwoColored is set to true, this function controls the brush that is used to draw fills of data points with a negative trend (i.e. bars/candlesticks with close < open). If \a twoColored is false, the normal plottable's pen and brush are used (\ref setPen, \ref setBrush). \see setBrushPositive, setPenNegative, setPenPositive */ void QCPFinancial::setBrushNegative(const QBrush &brush) { mBrushNegative = brush; } /*! If \ref setTwoColored is set to true, this function controls the pen that is used to draw outlines of data points with a positive trend (i.e. bars/candlesticks with close >= open). If \a twoColored is false, the normal plottable's pen and brush are used (\ref setPen, \ref setBrush). \see setPenNegative, setBrushPositive, setBrushNegative */ void QCPFinancial::setPenPositive(const QPen &pen) { mPenPositive = pen; } /*! If \ref setTwoColored is set to true, this function controls the pen that is used to draw outlines of data points with a negative trend (i.e. bars/candlesticks with close < open). If \a twoColored is false, the normal plottable's pen and brush are used (\ref setPen, \ref setBrush). \see setPenPositive, setBrushNegative, setBrushPositive */ void QCPFinancial::setPenNegative(const QPen &pen) { mPenNegative = pen; } /*! \overload Adds the provided points in \a keys, \a open, \a high, \a low and \a close to the current data. The provided vectors should have equal length. Else, the number of added points will be the size of the smallest vector. If you can guarantee that the passed data points are sorted by \a keys in ascending order, you can set \a alreadySorted to true, to improve performance by saving a sorting run. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. \see timeSeriesToOhlc */ void QCPFinancial::addData(const QVector &keys, const QVector &open, const QVector &high, const QVector &low, const QVector &close, bool alreadySorted) { if (keys.size() != open.size() || open.size() != high.size() || high.size() != low.size() || low.size() != close.size() || close.size() != keys.size()) qDebug() << Q_FUNC_INFO << "keys, open, high, low, close have different sizes:" << keys.size() << open.size() << high.size() << low.size() << close.size(); const int n = qMin(keys.size(), qMin(open.size(), qMin(high.size(), qMin(low.size(), close.size())))); QVector tempData(n); QVector::iterator it = tempData.begin(); const QVector::iterator itEnd = tempData.end(); int i = 0; while (it != itEnd) { it->key = keys[i]; it->open = open[i]; it->high = high[i]; it->low = low[i]; it->close = close[i]; ++it; ++i; } mDataContainer->add(tempData, alreadySorted); // don't modify tempData beyond this to prevent copy on write } /*! \overload Adds the provided data point as \a key, \a open, \a high, \a low and \a close to the current data. Alternatively, you can also access and modify the data directly via the \ref data method, which returns a pointer to the internal data container. \see timeSeriesToOhlc */ void QCPFinancial::addData(double key, double open, double high, double low, double close) { mDataContainer->add(QCPFinancialData(key, open, high, low, close)); } /*! \copydoc QCPPlottableInterface1D::selectTestRect */ QCPDataSelection QCPFinancial::selectTestRect(const QRectF &rect, bool onlySelectable) const { QCPDataSelection result; if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return result; if (!mKeyAxis || !mValueAxis) return result; QCPFinancialDataContainer::const_iterator visibleBegin, visibleEnd; getVisibleDataBounds(visibleBegin, visibleEnd); for (QCPFinancialDataContainer::const_iterator it=visibleBegin; it!=visibleEnd; ++it) { if (rect.intersects(selectionHitBox(it))) result.addDataRange(QCPDataRange(it-mDataContainer->constBegin(), it-mDataContainer->constBegin()+1), false); } result.simplify(); return result; } /* inherits documentation from base class */ double QCPFinancial::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return -1; if (!mKeyAxis || !mValueAxis) return -1; if (mKeyAxis.data()->axisRect()->rect().contains(pos.toPoint())) { // get visible data range: QCPFinancialDataContainer::const_iterator visibleBegin, visibleEnd; QCPFinancialDataContainer::const_iterator closestDataPoint = mDataContainer->constEnd(); getVisibleDataBounds(visibleBegin, visibleEnd); // perform select test according to configured style: double result = -1; switch (mChartStyle) { case QCPFinancial::csOhlc: result = ohlcSelectTest(pos, visibleBegin, visibleEnd, closestDataPoint); break; case QCPFinancial::csCandlestick: result = candlestickSelectTest(pos, visibleBegin, visibleEnd, closestDataPoint); break; } if (details) { int pointIndex = closestDataPoint-mDataContainer->constBegin(); details->setValue(QCPDataSelection(QCPDataRange(pointIndex, pointIndex+1))); } return result; } return -1; } /* inherits documentation from base class */ QCPRange QCPFinancial::getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain) const { QCPRange range = mDataContainer->keyRange(foundRange, inSignDomain); // determine exact range by including width of bars/flags: if (foundRange) { if (inSignDomain != QCP::sdPositive || range.lower-mWidth*0.5 > 0) range.lower -= mWidth*0.5; if (inSignDomain != QCP::sdNegative || range.upper+mWidth*0.5 < 0) range.upper += mWidth*0.5; } return range; } /* inherits documentation from base class */ QCPRange QCPFinancial::getValueRange(bool &foundRange, QCP::SignDomain inSignDomain, const QCPRange &inKeyRange) const { return mDataContainer->valueRange(foundRange, inSignDomain, inKeyRange); } /*! A convenience function that converts time series data (\a value against \a time) to OHLC binned data points. The return value can then be passed on to \ref QCPFinancialDataContainer::set(const QCPFinancialDataContainer&). The size of the bins can be controlled with \a timeBinSize in the same units as \a time is given. For example, if the unit of \a time is seconds and single OHLC/Candlesticks should span an hour each, set \a timeBinSize to 3600. \a timeBinOffset allows to control precisely at what \a time coordinate a bin should start. The value passed as \a timeBinOffset doesn't need to be in the range encompassed by the \a time keys. It merely defines the mathematical offset/phase of the bins that will be used to process the data. */ QCPFinancialDataContainer QCPFinancial::timeSeriesToOhlc(const QVector &time, const QVector &value, double timeBinSize, double timeBinOffset) { QCPFinancialDataContainer data; int count = qMin(time.size(), value.size()); if (count == 0) return QCPFinancialDataContainer(); QCPFinancialData currentBinData(0, value.first(), value.first(), value.first(), value.first()); int currentBinIndex = qFloor((time.first()-timeBinOffset)/timeBinSize+0.5); for (int i=0; i currentBinData.high) currentBinData.high = value.at(i); if (i == count-1) // last data point is in current bin, finalize bin: { currentBinData.close = value.at(i); currentBinData.key = timeBinOffset+(index)*timeBinSize; data.add(currentBinData); } } else // data point not anymore in current bin, set close of old and open of new bin, and add old to map: { // finalize current bin: currentBinData.close = value.at(i-1); currentBinData.key = timeBinOffset+(index-1)*timeBinSize; data.add(currentBinData); // start next bin: currentBinIndex = index; currentBinData.open = value.at(i); currentBinData.high = value.at(i); currentBinData.low = value.at(i); } } return data; } /* inherits documentation from base class */ void QCPFinancial::draw(QCPPainter *painter) { // get visible data range: QCPFinancialDataContainer::const_iterator visibleBegin, visibleEnd; getVisibleDataBounds(visibleBegin, visibleEnd); // loop over and draw segments of unselected/selected data: QList selectedSegments, unselectedSegments, allSegments; getDataSegments(selectedSegments, unselectedSegments); allSegments << unselectedSegments << selectedSegments; for (int i=0; i= unselectedSegments.size(); QCPFinancialDataContainer::const_iterator begin = visibleBegin; QCPFinancialDataContainer::const_iterator end = visibleEnd; mDataContainer->limitIteratorsToDataRange(begin, end, allSegments.at(i)); if (begin == end) continue; // draw data segment according to configured style: switch (mChartStyle) { case QCPFinancial::csOhlc: drawOhlcPlot(painter, begin, end, isSelectedSegment); break; case QCPFinancial::csCandlestick: drawCandlestickPlot(painter, begin, end, isSelectedSegment); break; } } // draw other selection decoration that isn't just line/scatter pens and brushes: if (mSelectionDecorator) mSelectionDecorator->drawDecoration(painter, selection()); } /* inherits documentation from base class */ void QCPFinancial::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const { painter->setAntialiasing(false); // legend icon especially of csCandlestick looks better without antialiasing if (mChartStyle == csOhlc) { if (mTwoColored) { // draw upper left half icon with positive color: painter->setBrush(mBrushPositive); painter->setPen(mPenPositive); painter->setClipRegion(QRegion(QPolygon() << rect.bottomLeft().toPoint() << rect.topRight().toPoint() << rect.topLeft().toPoint())); painter->drawLine(QLineF(0, rect.height()*0.5, rect.width(), rect.height()*0.5).translated(rect.topLeft())); painter->drawLine(QLineF(rect.width()*0.2, rect.height()*0.3, rect.width()*0.2, rect.height()*0.5).translated(rect.topLeft())); painter->drawLine(QLineF(rect.width()*0.8, rect.height()*0.5, rect.width()*0.8, rect.height()*0.7).translated(rect.topLeft())); // draw bottom right half icon with negative color: painter->setBrush(mBrushNegative); painter->setPen(mPenNegative); painter->setClipRegion(QRegion(QPolygon() << rect.bottomLeft().toPoint() << rect.topRight().toPoint() << rect.bottomRight().toPoint())); painter->drawLine(QLineF(0, rect.height()*0.5, rect.width(), rect.height()*0.5).translated(rect.topLeft())); painter->drawLine(QLineF(rect.width()*0.2, rect.height()*0.3, rect.width()*0.2, rect.height()*0.5).translated(rect.topLeft())); painter->drawLine(QLineF(rect.width()*0.8, rect.height()*0.5, rect.width()*0.8, rect.height()*0.7).translated(rect.topLeft())); } else { painter->setBrush(mBrush); painter->setPen(mPen); painter->drawLine(QLineF(0, rect.height()*0.5, rect.width(), rect.height()*0.5).translated(rect.topLeft())); painter->drawLine(QLineF(rect.width()*0.2, rect.height()*0.3, rect.width()*0.2, rect.height()*0.5).translated(rect.topLeft())); painter->drawLine(QLineF(rect.width()*0.8, rect.height()*0.5, rect.width()*0.8, rect.height()*0.7).translated(rect.topLeft())); } } else if (mChartStyle == csCandlestick) { if (mTwoColored) { // draw upper left half icon with positive color: painter->setBrush(mBrushPositive); painter->setPen(mPenPositive); painter->setClipRegion(QRegion(QPolygon() << rect.bottomLeft().toPoint() << rect.topRight().toPoint() << rect.topLeft().toPoint())); painter->drawLine(QLineF(0, rect.height()*0.5, rect.width()*0.25, rect.height()*0.5).translated(rect.topLeft())); painter->drawLine(QLineF(rect.width()*0.75, rect.height()*0.5, rect.width(), rect.height()*0.5).translated(rect.topLeft())); painter->drawRect(QRectF(rect.width()*0.25, rect.height()*0.25, rect.width()*0.5, rect.height()*0.5).translated(rect.topLeft())); // draw bottom right half icon with negative color: painter->setBrush(mBrushNegative); painter->setPen(mPenNegative); painter->setClipRegion(QRegion(QPolygon() << rect.bottomLeft().toPoint() << rect.topRight().toPoint() << rect.bottomRight().toPoint())); painter->drawLine(QLineF(0, rect.height()*0.5, rect.width()*0.25, rect.height()*0.5).translated(rect.topLeft())); painter->drawLine(QLineF(rect.width()*0.75, rect.height()*0.5, rect.width(), rect.height()*0.5).translated(rect.topLeft())); painter->drawRect(QRectF(rect.width()*0.25, rect.height()*0.25, rect.width()*0.5, rect.height()*0.5).translated(rect.topLeft())); } else { painter->setBrush(mBrush); painter->setPen(mPen); painter->drawLine(QLineF(0, rect.height()*0.5, rect.width()*0.25, rect.height()*0.5).translated(rect.topLeft())); painter->drawLine(QLineF(rect.width()*0.75, rect.height()*0.5, rect.width(), rect.height()*0.5).translated(rect.topLeft())); painter->drawRect(QRectF(rect.width()*0.25, rect.height()*0.25, rect.width()*0.5, rect.height()*0.5).translated(rect.topLeft())); } } } /*! \internal Draws the data from \a begin to \a end-1 as OHLC bars with the provided \a painter. This method is a helper function for \ref draw. It is used when the chart style is \ref csOhlc. */ void QCPFinancial::drawOhlcPlot(QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected) { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } if (keyAxis->orientation() == Qt::Horizontal) { for (QCPFinancialDataContainer::const_iterator it = begin; it != end; ++it) { if (isSelected && mSelectionDecorator) mSelectionDecorator->applyPen(painter); else if (mTwoColored) painter->setPen(it->close >= it->open ? mPenPositive : mPenNegative); else painter->setPen(mPen); double keyPixel = keyAxis->coordToPixel(it->key); double openPixel = valueAxis->coordToPixel(it->open); double closePixel = valueAxis->coordToPixel(it->close); // draw backbone: painter->drawLine(QPointF(keyPixel, valueAxis->coordToPixel(it->high)), QPointF(keyPixel, valueAxis->coordToPixel(it->low))); // draw open: double pixelWidth = getPixelWidth(it->key, keyPixel); // sign of this makes sure open/close are on correct sides painter->drawLine(QPointF(keyPixel-pixelWidth, openPixel), QPointF(keyPixel, openPixel)); // draw close: painter->drawLine(QPointF(keyPixel, closePixel), QPointF(keyPixel+pixelWidth, closePixel)); } } else { for (QCPFinancialDataContainer::const_iterator it = begin; it != end; ++it) { if (isSelected && mSelectionDecorator) mSelectionDecorator->applyPen(painter); else if (mTwoColored) painter->setPen(it->close >= it->open ? mPenPositive : mPenNegative); else painter->setPen(mPen); double keyPixel = keyAxis->coordToPixel(it->key); double openPixel = valueAxis->coordToPixel(it->open); double closePixel = valueAxis->coordToPixel(it->close); // draw backbone: painter->drawLine(QPointF(valueAxis->coordToPixel(it->high), keyPixel), QPointF(valueAxis->coordToPixel(it->low), keyPixel)); // draw open: double pixelWidth = getPixelWidth(it->key, keyPixel); // sign of this makes sure open/close are on correct sides painter->drawLine(QPointF(openPixel, keyPixel-pixelWidth), QPointF(openPixel, keyPixel)); // draw close: painter->drawLine(QPointF(closePixel, keyPixel), QPointF(closePixel, keyPixel+pixelWidth)); } } } /*! \internal Draws the data from \a begin to \a end-1 as Candlesticks with the provided \a painter. This method is a helper function for \ref draw. It is used when the chart style is \ref csCandlestick. */ void QCPFinancial::drawCandlestickPlot(QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected) { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } if (keyAxis->orientation() == Qt::Horizontal) { for (QCPFinancialDataContainer::const_iterator it = begin; it != end; ++it) { if (isSelected && mSelectionDecorator) { mSelectionDecorator->applyPen(painter); mSelectionDecorator->applyBrush(painter); } else if (mTwoColored) { painter->setPen(it->close >= it->open ? mPenPositive : mPenNegative); painter->setBrush(it->close >= it->open ? mBrushPositive : mBrushNegative); } else { painter->setPen(mPen); painter->setBrush(mBrush); } double keyPixel = keyAxis->coordToPixel(it->key); double openPixel = valueAxis->coordToPixel(it->open); double closePixel = valueAxis->coordToPixel(it->close); // draw high: painter->drawLine(QPointF(keyPixel, valueAxis->coordToPixel(it->high)), QPointF(keyPixel, valueAxis->coordToPixel(qMax(it->open, it->close)))); // draw low: painter->drawLine(QPointF(keyPixel, valueAxis->coordToPixel(it->low)), QPointF(keyPixel, valueAxis->coordToPixel(qMin(it->open, it->close)))); // draw open-close box: double pixelWidth = getPixelWidth(it->key, keyPixel); painter->drawRect(QRectF(QPointF(keyPixel-pixelWidth, closePixel), QPointF(keyPixel+pixelWidth, openPixel))); } } else // keyAxis->orientation() == Qt::Vertical { for (QCPFinancialDataContainer::const_iterator it = begin; it != end; ++it) { if (isSelected && mSelectionDecorator) { mSelectionDecorator->applyPen(painter); mSelectionDecorator->applyBrush(painter); } else if (mTwoColored) { painter->setPen(it->close >= it->open ? mPenPositive : mPenNegative); painter->setBrush(it->close >= it->open ? mBrushPositive : mBrushNegative); } else { painter->setPen(mPen); painter->setBrush(mBrush); } double keyPixel = keyAxis->coordToPixel(it->key); double openPixel = valueAxis->coordToPixel(it->open); double closePixel = valueAxis->coordToPixel(it->close); // draw high: painter->drawLine(QPointF(valueAxis->coordToPixel(it->high), keyPixel), QPointF(valueAxis->coordToPixel(qMax(it->open, it->close)), keyPixel)); // draw low: painter->drawLine(QPointF(valueAxis->coordToPixel(it->low), keyPixel), QPointF(valueAxis->coordToPixel(qMin(it->open, it->close)), keyPixel)); // draw open-close box: double pixelWidth = getPixelWidth(it->key, keyPixel); painter->drawRect(QRectF(QPointF(closePixel, keyPixel-pixelWidth), QPointF(openPixel, keyPixel+pixelWidth))); } } } /*! \internal This function is used to determine the width of the bar at coordinate \a key, according to the specified width (\ref setWidth) and width type (\ref setWidthType). Provide the pixel position of \a key in \a keyPixel (because usually this was already calculated via \ref QCPAxis::coordToPixel when this function is called). It returns the number of pixels the bar extends to higher keys, relative to the \a key coordinate. So with a non-reversed horizontal axis, the return value is positive. With a reversed horizontal axis, the return value is negative. This is important so the open/close flags on the \ref csOhlc bar are drawn to the correct side. */ double QCPFinancial::getPixelWidth(double key, double keyPixel) const { double result = 0; switch (mWidthType) { case wtAbsolute: { if (mKeyAxis) result = mWidth*0.5*mKeyAxis.data()->pixelOrientation(); break; } case wtAxisRectRatio: { if (mKeyAxis && mKeyAxis.data()->axisRect()) { if (mKeyAxis.data()->orientation() == Qt::Horizontal) result = mKeyAxis.data()->axisRect()->width()*mWidth*0.5*mKeyAxis.data()->pixelOrientation(); else result = mKeyAxis.data()->axisRect()->height()*mWidth*0.5*mKeyAxis.data()->pixelOrientation(); } else qDebug() << Q_FUNC_INFO << "No key axis or axis rect defined"; break; } case wtPlotCoords: { if (mKeyAxis) result = mKeyAxis.data()->coordToPixel(key+mWidth*0.5)-keyPixel; else qDebug() << Q_FUNC_INFO << "No key axis defined"; break; } } return result; } /*! \internal This method is a helper function for \ref selectTest. It is used to test for selection when the chart style is \ref csOhlc. It only tests against the data points between \a begin and \a end. Like \ref selectTest, this method returns the shortest distance of \a pos to the graphical representation of the plottable, and \a closestDataPoint will point to the respective data point. */ double QCPFinancial::ohlcSelectTest(const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const { closestDataPoint = mDataContainer->constEnd(); QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return -1; } double minDistSqr = std::numeric_limits::max(); if (keyAxis->orientation() == Qt::Horizontal) { for (QCPFinancialDataContainer::const_iterator it=begin; it!=end; ++it) { double keyPixel = keyAxis->coordToPixel(it->key); // calculate distance to backbone: double currentDistSqr = QCPVector2D(pos).distanceSquaredToLine(QCPVector2D(keyPixel, valueAxis->coordToPixel(it->high)), QCPVector2D(keyPixel, valueAxis->coordToPixel(it->low))); if (currentDistSqr < minDistSqr) { minDistSqr = currentDistSqr; closestDataPoint = it; } } } else // keyAxis->orientation() == Qt::Vertical { for (QCPFinancialDataContainer::const_iterator it=begin; it!=end; ++it) { double keyPixel = keyAxis->coordToPixel(it->key); // calculate distance to backbone: double currentDistSqr = QCPVector2D(pos).distanceSquaredToLine(QCPVector2D(valueAxis->coordToPixel(it->high), keyPixel), QCPVector2D(valueAxis->coordToPixel(it->low), keyPixel)); if (currentDistSqr < minDistSqr) { minDistSqr = currentDistSqr; closestDataPoint = it; } } } return qSqrt(minDistSqr); } /*! \internal This method is a helper function for \ref selectTest. It is used to test for selection when the chart style is \ref csCandlestick. It only tests against the data points between \a begin and \a end. Like \ref selectTest, this method returns the shortest distance of \a pos to the graphical representation of the plottable, and \a closestDataPoint will point to the respective data point. */ double QCPFinancial::candlestickSelectTest(const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const { closestDataPoint = mDataContainer->constEnd(); QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return -1; } double minDistSqr = std::numeric_limits::max(); if (keyAxis->orientation() == Qt::Horizontal) { for (QCPFinancialDataContainer::const_iterator it=begin; it!=end; ++it) { double currentDistSqr; // determine whether pos is in open-close-box: QCPRange boxKeyRange(it->key-mWidth*0.5, it->key+mWidth*0.5); QCPRange boxValueRange(it->close, it->open); double posKey, posValue; pixelsToCoords(pos, posKey, posValue); if (boxKeyRange.contains(posKey) && boxValueRange.contains(posValue)) // is in open-close-box { currentDistSqr = mParentPlot->selectionTolerance()*0.99 * mParentPlot->selectionTolerance()*0.99; } else { // calculate distance to high/low lines: double keyPixel = keyAxis->coordToPixel(it->key); double highLineDistSqr = QCPVector2D(pos).distanceSquaredToLine(QCPVector2D(keyPixel, valueAxis->coordToPixel(it->high)), QCPVector2D(keyPixel, valueAxis->coordToPixel(qMax(it->open, it->close)))); double lowLineDistSqr = QCPVector2D(pos).distanceSquaredToLine(QCPVector2D(keyPixel, valueAxis->coordToPixel(it->low)), QCPVector2D(keyPixel, valueAxis->coordToPixel(qMin(it->open, it->close)))); currentDistSqr = qMin(highLineDistSqr, lowLineDistSqr); } if (currentDistSqr < minDistSqr) { minDistSqr = currentDistSqr; closestDataPoint = it; } } } else // keyAxis->orientation() == Qt::Vertical { for (QCPFinancialDataContainer::const_iterator it=begin; it!=end; ++it) { double currentDistSqr; // determine whether pos is in open-close-box: QCPRange boxKeyRange(it->key-mWidth*0.5, it->key+mWidth*0.5); QCPRange boxValueRange(it->close, it->open); double posKey, posValue; pixelsToCoords(pos, posKey, posValue); if (boxKeyRange.contains(posKey) && boxValueRange.contains(posValue)) // is in open-close-box { currentDistSqr = mParentPlot->selectionTolerance()*0.99 * mParentPlot->selectionTolerance()*0.99; } else { // calculate distance to high/low lines: double keyPixel = keyAxis->coordToPixel(it->key); double highLineDistSqr = QCPVector2D(pos).distanceSquaredToLine(QCPVector2D(valueAxis->coordToPixel(it->high), keyPixel), QCPVector2D(valueAxis->coordToPixel(qMax(it->open, it->close)), keyPixel)); double lowLineDistSqr = QCPVector2D(pos).distanceSquaredToLine(QCPVector2D(valueAxis->coordToPixel(it->low), keyPixel), QCPVector2D(valueAxis->coordToPixel(qMin(it->open, it->close)), keyPixel)); currentDistSqr = qMin(highLineDistSqr, lowLineDistSqr); } if (currentDistSqr < minDistSqr) { minDistSqr = currentDistSqr; closestDataPoint = it; } } } return qSqrt(minDistSqr); } /*! \internal called by the drawing methods to determine which data (key) range is visible at the current key axis range setting, so only that needs to be processed. \a begin returns an iterator to the lowest data point that needs to be taken into account when plotting. Note that in order to get a clean plot all the way to the edge of the axis rect, \a begin may still be just outside the visible range. \a end returns the iterator just above the highest data point that needs to be taken into account. Same as before, \a end may also lie just outside of the visible range if the plottable contains no data, both \a begin and \a end point to \c constEnd. */ void QCPFinancial::getVisibleDataBounds(QCPFinancialDataContainer::const_iterator &begin, QCPFinancialDataContainer::const_iterator &end) const { if (!mKeyAxis) { qDebug() << Q_FUNC_INFO << "invalid key axis"; begin = mDataContainer->constEnd(); end = mDataContainer->constEnd(); return; } begin = mDataContainer->findBegin(mKeyAxis.data()->range().lower-mWidth*0.5); // subtract half width of ohlc/candlestick to include partially visible data points end = mDataContainer->findEnd(mKeyAxis.data()->range().upper+mWidth*0.5); // add half width of ohlc/candlestick to include partially visible data points } /*! \internal Returns the hit box in pixel coordinates that will be used for data selection with the selection rect (\ref selectTestRect), of the data point given by \a it. */ QRectF QCPFinancial::selectionHitBox(QCPFinancialDataContainer::const_iterator it) const { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return QRectF(); } double keyPixel = keyAxis->coordToPixel(it->key); double highPixel = valueAxis->coordToPixel(it->high); double lowPixel = valueAxis->coordToPixel(it->low); double keyWidthPixels = keyPixel-keyAxis->coordToPixel(it->key-mWidth*0.5); if (keyAxis->orientation() == Qt::Horizontal) return QRectF(keyPixel-keyWidthPixels, highPixel, keyWidthPixels*2, lowPixel-highPixel).normalized(); else return QRectF(highPixel, keyPixel-keyWidthPixels, lowPixel-highPixel, keyWidthPixels*2).normalized(); } /* end of 'src/plottables/plottable-financial.cpp' */ /* including file 'src/plottables/plottable-errorbar.cpp', size 37355 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPErrorBarsData //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPErrorBarsData \brief Holds the data of one single error bar for QCPErrorBars. The stored data is: \li \a errorMinus: how much the error bar extends towards negative coordinates from the data point position \li \a errorPlus: how much the error bar extends towards positive coordinates from the data point position The container for storing the error bar information is \ref QCPErrorBarsDataContainer. It is a typedef for QVector<\ref QCPErrorBarsData>. \see QCPErrorBarsDataContainer */ /*! Constructs an error bar with errors set to zero. */ QCPErrorBarsData::QCPErrorBarsData() : errorMinus(0), errorPlus(0) { } /*! Constructs an error bar with equal \a error in both negative and positive direction. */ QCPErrorBarsData::QCPErrorBarsData(double error) : errorMinus(error), errorPlus(error) { } /*! Constructs an error bar with negative and positive errors set to \a errorMinus and \a errorPlus, respectively. */ QCPErrorBarsData::QCPErrorBarsData(double errorMinus, double errorPlus) : errorMinus(errorMinus), errorPlus(errorPlus) { } //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPErrorBars //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPErrorBars \brief A plottable that adds a set of error bars to other plottables. \image html QCPErrorBars.png The \ref QCPErrorBars plottable can be attached to other one-dimensional plottables (e.g. \ref QCPGraph, \ref QCPCurve, \ref QCPBars, etc.) and equips them with error bars. Use \ref setDataPlottable to define for which plottable the \ref QCPErrorBars shall display the error bars. The orientation of the error bars can be controlled with \ref setErrorType. By using \ref setData, you can supply the actual error data, either as symmetric error or plus/minus asymmetric errors. \ref QCPErrorBars only stores the error data. The absolute key/value position of each error bar will be adopted from the configured data plottable. The error data of the \ref QCPErrorBars are associated one-to-one via their index to the data points of the data plottable. You can directly access and manipulate the error bar data via \ref data. Set either of the plus/minus errors to NaN (qQNaN() or std::numeric_limits::quiet_NaN()) to not show the respective error bar on the data point at that index. \section qcperrorbars-appearance Changing the appearance The appearance of the error bars is defined by the pen (\ref setPen), and the width of the whiskers (\ref setWhiskerWidth). Further, the error bar backbones may leave a gap around the data point center to prevent that error bars are drawn too close to or even through scatter points. This gap size can be controlled via \ref setSymbolGap. */ /* start of documentation of inline functions */ /*! \fn QSharedPointer QCPErrorBars::data() const Returns a shared pointer to the internal data storage of type \ref QCPErrorBarsDataContainer. You may use it to directly manipulate the error values, which may be more convenient and faster than using the regular \ref setData methods. */ /* end of documentation of inline functions */ /*! Constructs an error bars plottable which uses \a keyAxis as its key axis ("x") and \a valueAxis as its value axis ("y"). \a keyAxis and \a valueAxis must reside in the same QCustomPlot instance and not have the same orientation. If either of these restrictions is violated, a corresponding message is printed to the debug output (qDebug), the construction is not aborted, though. It is also important that the \a keyAxis and \a valueAxis are the same for the error bars plottable and the data plottable that the error bars shall be drawn on (\ref setDataPlottable). The created \ref QCPErrorBars is automatically registered with the QCustomPlot instance inferred from \a keyAxis. This QCustomPlot instance takes ownership of the \ref QCPErrorBars, so do not delete it manually but use \ref QCustomPlot::removePlottable() instead. */ QCPErrorBars::QCPErrorBars(QCPAxis *keyAxis, QCPAxis *valueAxis) : QCPAbstractPlottable(keyAxis, valueAxis), mDataContainer(new QVector), mErrorType(etValueError), mWhiskerWidth(9), mSymbolGap(10) { setPen(QPen(Qt::black, 0)); setBrush(Qt::NoBrush); } QCPErrorBars::~QCPErrorBars() { } /*! \overload Replaces the current data container with the provided \a data container. Since a QSharedPointer is used, multiple \ref QCPErrorBars instances may share the same data container safely. Modifying the data in the container will then affect all \ref QCPErrorBars instances that share the container. Sharing can be achieved by simply exchanging the data containers wrapped in shared pointers: \snippet documentation/doc-code-snippets/mainwindow.cpp qcperrorbars-datasharing-1 If you do not wish to share containers, but create a copy from an existing container, assign the data containers directly: \snippet documentation/doc-code-snippets/mainwindow.cpp qcperrorbars-datasharing-2 (This uses different notation compared with other plottables, because the \ref QCPErrorBars uses a \c QVector as its data container, instead of a \ref QCPDataContainer.) \see addData */ void QCPErrorBars::setData(QSharedPointer data) { mDataContainer = data; } /*! \overload Sets symmetrical error values as specified in \a error. The errors will be associated one-to-one by the data point index to the associated data plottable (\ref setDataPlottable). You can directly access and manipulate the error bar data via \ref data. \see addData */ void QCPErrorBars::setData(const QVector &error) { mDataContainer->clear(); addData(error); } /*! \overload Sets asymmetrical errors as specified in \a errorMinus and \a errorPlus. The errors will be associated one-to-one by the data point index to the associated data plottable (\ref setDataPlottable). You can directly access and manipulate the error bar data via \ref data. \see addData */ void QCPErrorBars::setData(const QVector &errorMinus, const QVector &errorPlus) { mDataContainer->clear(); addData(errorMinus, errorPlus); } /*! Sets the data plottable to which the error bars will be applied. The error values specified e.g. via \ref setData will be associated one-to-one by the data point index to the data points of \a plottable. This means that the error bars will adopt the key/value coordinates of the data point with the same index. The passed \a plottable must be a one-dimensional plottable, i.e. it must implement the \ref QCPPlottableInterface1D. Further, it must not be a \ref QCPErrorBars instance itself. If either of these restrictions is violated, a corresponding qDebug output is generated, and the data plottable of this \ref QCPErrorBars instance is set to zero. For proper display, care must also be taken that the key and value axes of the \a plottable match those configured for this \ref QCPErrorBars instance. */ void QCPErrorBars::setDataPlottable(QCPAbstractPlottable *plottable) { if (plottable && qobject_cast(plottable)) { mDataPlottable = 0; qDebug() << Q_FUNC_INFO << "can't set another QCPErrorBars instance as data plottable"; return; } if (plottable && !plottable->interface1D()) { mDataPlottable = 0; qDebug() << Q_FUNC_INFO << "passed plottable doesn't implement 1d interface, can't associate with QCPErrorBars"; return; } mDataPlottable = plottable; } /*! Sets in which orientation the error bars shall appear on the data points. If your data needs both error dimensions, create two \ref QCPErrorBars with different \a type. */ void QCPErrorBars::setErrorType(ErrorType type) { mErrorType = type; } /*! Sets the width of the whiskers (the short bars at the end of the actual error bar backbones) to \a pixels. */ void QCPErrorBars::setWhiskerWidth(double pixels) { mWhiskerWidth = pixels; } /*! Sets the gap diameter around the data points that will be left out when drawing the error bar backbones. This gap prevents that error bars are drawn too close to or even through scatter points. */ void QCPErrorBars::setSymbolGap(double pixels) { mSymbolGap = pixels; } /*! \overload Adds symmetrical error values as specified in \a error. The errors will be associated one-to-one by the data point index to the associated data plottable (\ref setDataPlottable). You can directly access and manipulate the error bar data via \ref data. \see setData */ void QCPErrorBars::addData(const QVector &error) { addData(error, error); } /*! \overload Adds asymmetrical errors as specified in \a errorMinus and \a errorPlus. The errors will be associated one-to-one by the data point index to the associated data plottable (\ref setDataPlottable). You can directly access and manipulate the error bar data via \ref data. \see setData */ void QCPErrorBars::addData(const QVector &errorMinus, const QVector &errorPlus) { if (errorMinus.size() != errorPlus.size()) qDebug() << Q_FUNC_INFO << "minus and plus error vectors have different sizes:" << errorMinus.size() << errorPlus.size(); const int n = qMin(errorMinus.size(), errorPlus.size()); mDataContainer->reserve(n); for (int i=0; iappend(QCPErrorBarsData(errorMinus.at(i), errorPlus.at(i))); } /*! \overload Adds a single symmetrical error bar as specified in \a error. The errors will be associated one-to-one by the data point index to the associated data plottable (\ref setDataPlottable). You can directly access and manipulate the error bar data via \ref data. \see setData */ void QCPErrorBars::addData(double error) { mDataContainer->append(QCPErrorBarsData(error)); } /*! \overload Adds a single asymmetrical error bar as specified in \a errorMinus and \a errorPlus. The errors will be associated one-to-one by the data point index to the associated data plottable (\ref setDataPlottable). You can directly access and manipulate the error bar data via \ref data. \see setData */ void QCPErrorBars::addData(double errorMinus, double errorPlus) { mDataContainer->append(QCPErrorBarsData(errorMinus, errorPlus)); } /* inherits documentation from base class */ int QCPErrorBars::dataCount() const { return mDataContainer->size(); } /* inherits documentation from base class */ double QCPErrorBars::dataMainKey(int index) const { if (mDataPlottable) return mDataPlottable->interface1D()->dataMainKey(index); else qDebug() << Q_FUNC_INFO << "no data plottable set"; return 0; } /* inherits documentation from base class */ double QCPErrorBars::dataSortKey(int index) const { if (mDataPlottable) return mDataPlottable->interface1D()->dataSortKey(index); else qDebug() << Q_FUNC_INFO << "no data plottable set"; return 0; } /* inherits documentation from base class */ double QCPErrorBars::dataMainValue(int index) const { if (mDataPlottable) return mDataPlottable->interface1D()->dataMainValue(index); else qDebug() << Q_FUNC_INFO << "no data plottable set"; return 0; } /* inherits documentation from base class */ QCPRange QCPErrorBars::dataValueRange(int index) const { if (mDataPlottable) { const double value = mDataPlottable->interface1D()->dataMainValue(index); if (index >= 0 && index < mDataContainer->size() && mErrorType == etValueError) return QCPRange(value-mDataContainer->at(index).errorMinus, value+mDataContainer->at(index).errorPlus); else return QCPRange(value, value); } else { qDebug() << Q_FUNC_INFO << "no data plottable set"; return QCPRange(); } } /* inherits documentation from base class */ QPointF QCPErrorBars::dataPixelPosition(int index) const { if (mDataPlottable) return mDataPlottable->interface1D()->dataPixelPosition(index); else qDebug() << Q_FUNC_INFO << "no data plottable set"; return QPointF(); } /* inherits documentation from base class */ bool QCPErrorBars::sortKeyIsMainKey() const { if (mDataPlottable) { return mDataPlottable->interface1D()->sortKeyIsMainKey(); } else { qDebug() << Q_FUNC_INFO << "no data plottable set"; return true; } } /*! \copydoc QCPPlottableInterface1D::selectTestRect */ QCPDataSelection QCPErrorBars::selectTestRect(const QRectF &rect, bool onlySelectable) const { QCPDataSelection result; if (!mDataPlottable) return result; if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return result; if (!mKeyAxis || !mValueAxis) return result; QCPErrorBarsDataContainer::const_iterator visibleBegin, visibleEnd; getVisibleDataBounds(visibleBegin, visibleEnd, QCPDataRange(0, dataCount())); QVector backbones, whiskers; for (QCPErrorBarsDataContainer::const_iterator it=visibleBegin; it!=visibleEnd; ++it) { backbones.clear(); whiskers.clear(); getErrorBarLines(it, backbones, whiskers); for (int i=0; iconstBegin(), it-mDataContainer->constBegin()+1), false); break; } } } result.simplify(); return result; } /* inherits documentation from base class */ int QCPErrorBars::findBegin(double sortKey, bool expandedRange) const { if (mDataPlottable) { if (mDataContainer->isEmpty()) return 0; int beginIndex = mDataPlottable->interface1D()->findBegin(sortKey, expandedRange); if (beginIndex >= mDataContainer->size()) beginIndex = mDataContainer->size()-1; return beginIndex; } else qDebug() << Q_FUNC_INFO << "no data plottable set"; return 0; } /* inherits documentation from base class */ int QCPErrorBars::findEnd(double sortKey, bool expandedRange) const { if (mDataPlottable) { if (mDataContainer->isEmpty()) return 0; int endIndex = mDataPlottable->interface1D()->findEnd(sortKey, expandedRange); if (endIndex > mDataContainer->size()) endIndex = mDataContainer->size(); return endIndex; } else qDebug() << Q_FUNC_INFO << "no data plottable set"; return 0; } /* inherits documentation from base class */ double QCPErrorBars::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { if (!mDataPlottable) return -1; if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return -1; if (!mKeyAxis || !mValueAxis) return -1; if (mKeyAxis.data()->axisRect()->rect().contains(pos.toPoint())) { QCPErrorBarsDataContainer::const_iterator closestDataPoint = mDataContainer->constEnd(); double result = pointDistance(pos, closestDataPoint); if (details) { int pointIndex = closestDataPoint-mDataContainer->constBegin(); details->setValue(QCPDataSelection(QCPDataRange(pointIndex, pointIndex+1))); } return result; } else return -1; } /* inherits documentation from base class */ void QCPErrorBars::draw(QCPPainter *painter) { if (!mDataPlottable) return; if (!mKeyAxis || !mValueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return; } if (mKeyAxis.data()->range().size() <= 0 || mDataContainer->isEmpty()) return; // if the sort key isn't the main key, we must check the visibility for each data point/error bar individually // (getVisibleDataBounds applies range restriction, but otherwise can only return full data range): bool checkPointVisibility = !mDataPlottable->interface1D()->sortKeyIsMainKey(); // check data validity if flag set: #ifdef QCUSTOMPLOT_CHECK_DATA QCPErrorBarsDataContainer::const_iterator it; for (it = mDataContainer->constBegin(); it != mDataContainer->constEnd(); ++it) { if (QCP::isInvalidData(it->errorMinus, it->errorPlus)) qDebug() << Q_FUNC_INFO << "Data point at index" << it-mDataContainer->constBegin() << "invalid." << "Plottable name:" << name(); } #endif applyDefaultAntialiasingHint(painter); painter->setBrush(Qt::NoBrush); // loop over and draw segments of unselected/selected data: QList selectedSegments, unselectedSegments, allSegments; getDataSegments(selectedSegments, unselectedSegments); allSegments << unselectedSegments << selectedSegments; QVector backbones, whiskers; for (int i=0; i= unselectedSegments.size(); if (isSelectedSegment && mSelectionDecorator) mSelectionDecorator->applyPen(painter); else painter->setPen(mPen); if (painter->pen().capStyle() == Qt::SquareCap) { QPen capFixPen(painter->pen()); capFixPen.setCapStyle(Qt::FlatCap); painter->setPen(capFixPen); } backbones.clear(); whiskers.clear(); for (QCPErrorBarsDataContainer::const_iterator it=begin; it!=end; ++it) { if (!checkPointVisibility || errorBarVisible(it-mDataContainer->constBegin())) getErrorBarLines(it, backbones, whiskers); } painter->drawLines(backbones); painter->drawLines(whiskers); } // draw other selection decoration that isn't just line/scatter pens and brushes: if (mSelectionDecorator) mSelectionDecorator->drawDecoration(painter, selection()); } /* inherits documentation from base class */ void QCPErrorBars::drawLegendIcon(QCPPainter *painter, const QRectF &rect) const { applyDefaultAntialiasingHint(painter); painter->setPen(mPen); if (mErrorType == etValueError && mValueAxis && mValueAxis->orientation() == Qt::Vertical) { painter->drawLine(QLineF(rect.center().x(), rect.top()+2, rect.center().x(), rect.bottom()-1)); painter->drawLine(QLineF(rect.center().x()-4, rect.top()+2, rect.center().x()+4, rect.top()+2)); painter->drawLine(QLineF(rect.center().x()-4, rect.bottom()-1, rect.center().x()+4, rect.bottom()-1)); } else { painter->drawLine(QLineF(rect.left()+2, rect.center().y(), rect.right()-2, rect.center().y())); painter->drawLine(QLineF(rect.left()+2, rect.center().y()-4, rect.left()+2, rect.center().y()+4)); painter->drawLine(QLineF(rect.right()-2, rect.center().y()-4, rect.right()-2, rect.center().y()+4)); } } /* inherits documentation from base class */ QCPRange QCPErrorBars::getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain) const { if (!mDataPlottable) { foundRange = false; return QCPRange(); } QCPRange range; bool haveLower = false; bool haveUpper = false; QCPErrorBarsDataContainer::const_iterator it; for (it = mDataContainer->constBegin(); it != mDataContainer->constEnd(); ++it) { if (mErrorType == etValueError) { // error bar doesn't extend in key dimension (except whisker but we ignore that here), so only use data point center const double current = mDataPlottable->interface1D()->dataMainKey(it-mDataContainer->constBegin()); if (qIsNaN(current)) continue; if (inSignDomain == QCP::sdBoth || (inSignDomain == QCP::sdNegative && current < 0) || (inSignDomain == QCP::sdPositive && current > 0)) { if (current < range.lower || !haveLower) { range.lower = current; haveLower = true; } if (current > range.upper || !haveUpper) { range.upper = current; haveUpper = true; } } } else // mErrorType == etKeyError { const double dataKey = mDataPlottable->interface1D()->dataMainKey(it-mDataContainer->constBegin()); if (qIsNaN(dataKey)) continue; // plus error: double current = dataKey + (qIsNaN(it->errorPlus) ? 0 : it->errorPlus); if (inSignDomain == QCP::sdBoth || (inSignDomain == QCP::sdNegative && current < 0) || (inSignDomain == QCP::sdPositive && current > 0)) { if (current > range.upper || !haveUpper) { range.upper = current; haveUpper = true; } } // minus error: current = dataKey - (qIsNaN(it->errorMinus) ? 0 : it->errorMinus); if (inSignDomain == QCP::sdBoth || (inSignDomain == QCP::sdNegative && current < 0) || (inSignDomain == QCP::sdPositive && current > 0)) { if (current < range.lower || !haveLower) { range.lower = current; haveLower = true; } } } } if (haveUpper && !haveLower) { range.lower = range.upper; haveLower = true; } else if (haveLower && !haveUpper) { range.upper = range.lower; haveUpper = true; } foundRange = haveLower && haveUpper; return range; } /* inherits documentation from base class */ QCPRange QCPErrorBars::getValueRange(bool &foundRange, QCP::SignDomain inSignDomain, const QCPRange &inKeyRange) const { if (!mDataPlottable) { foundRange = false; return QCPRange(); } QCPRange range; const bool restrictKeyRange = inKeyRange != QCPRange(); bool haveLower = false; bool haveUpper = false; QCPErrorBarsDataContainer::const_iterator itBegin = mDataContainer->constBegin(); QCPErrorBarsDataContainer::const_iterator itEnd = mDataContainer->constEnd(); if (mDataPlottable->interface1D()->sortKeyIsMainKey() && restrictKeyRange) { itBegin = mDataContainer->constBegin()+findBegin(inKeyRange.lower); itEnd = mDataContainer->constBegin()+findEnd(inKeyRange.upper); } for (QCPErrorBarsDataContainer::const_iterator it = itBegin; it != itEnd; ++it) { if (restrictKeyRange) { const double dataKey = mDataPlottable->interface1D()->dataMainKey(it-mDataContainer->constBegin()); if (dataKey < inKeyRange.lower || dataKey > inKeyRange.upper) continue; } if (mErrorType == etValueError) { const double dataValue = mDataPlottable->interface1D()->dataMainValue(it-mDataContainer->constBegin()); if (qIsNaN(dataValue)) continue; // plus error: double current = dataValue + (qIsNaN(it->errorPlus) ? 0 : it->errorPlus); if (inSignDomain == QCP::sdBoth || (inSignDomain == QCP::sdNegative && current < 0) || (inSignDomain == QCP::sdPositive && current > 0)) { if (current > range.upper || !haveUpper) { range.upper = current; haveUpper = true; } } // minus error: current = dataValue - (qIsNaN(it->errorMinus) ? 0 : it->errorMinus); if (inSignDomain == QCP::sdBoth || (inSignDomain == QCP::sdNegative && current < 0) || (inSignDomain == QCP::sdPositive && current > 0)) { if (current < range.lower || !haveLower) { range.lower = current; haveLower = true; } } } else // mErrorType == etKeyError { // error bar doesn't extend in value dimension (except whisker but we ignore that here), so only use data point center const double current = mDataPlottable->interface1D()->dataMainValue(it-mDataContainer->constBegin()); if (qIsNaN(current)) continue; if (inSignDomain == QCP::sdBoth || (inSignDomain == QCP::sdNegative && current < 0) || (inSignDomain == QCP::sdPositive && current > 0)) { if (current < range.lower || !haveLower) { range.lower = current; haveLower = true; } if (current > range.upper || !haveUpper) { range.upper = current; haveUpper = true; } } } } if (haveUpper && !haveLower) { range.lower = range.upper; haveLower = true; } else if (haveLower && !haveUpper) { range.upper = range.lower; haveUpper = true; } foundRange = haveLower && haveUpper; return range; } /*! \internal Calculates the lines that make up the error bar belonging to the data point \a it. The resulting lines are added to \a backbones and \a whiskers. The vectors are not cleared, so calling this method with different \a it but the same \a backbones and \a whiskers allows to accumulate lines for multiple data points. This method assumes that \a it is a valid iterator within the bounds of this \ref QCPErrorBars instance and within the bounds of the associated data plottable. */ void QCPErrorBars::getErrorBarLines(QCPErrorBarsDataContainer::const_iterator it, QVector &backbones, QVector &whiskers) const { if (!mDataPlottable) return; int index = it-mDataContainer->constBegin(); QPointF centerPixel = mDataPlottable->interface1D()->dataPixelPosition(index); if (qIsNaN(centerPixel.x()) || qIsNaN(centerPixel.y())) return; QCPAxis *errorAxis = mErrorType == etValueError ? mValueAxis.data() : mKeyAxis.data(); QCPAxis *orthoAxis = mErrorType == etValueError ? mKeyAxis.data() : mValueAxis.data(); const double centerErrorAxisPixel = errorAxis->orientation() == Qt::Horizontal ? centerPixel.x() : centerPixel.y(); const double centerOrthoAxisPixel = orthoAxis->orientation() == Qt::Horizontal ? centerPixel.x() : centerPixel.y(); const double centerErrorAxisCoord = errorAxis->pixelToCoord(centerErrorAxisPixel); // depending on plottable, this might be different from just mDataPlottable->interface1D()->dataMainKey/Value const double symbolGap = mSymbolGap*0.5*errorAxis->pixelOrientation(); // plus error: double errorStart, errorEnd; if (!qIsNaN(it->errorPlus)) { errorStart = centerErrorAxisPixel+symbolGap; errorEnd = errorAxis->coordToPixel(centerErrorAxisCoord+it->errorPlus); if (errorAxis->orientation() == Qt::Vertical) { if ((errorStart > errorEnd) != errorAxis->rangeReversed()) backbones.append(QLineF(centerOrthoAxisPixel, errorStart, centerOrthoAxisPixel, errorEnd)); whiskers.append(QLineF(centerOrthoAxisPixel-mWhiskerWidth*0.5, errorEnd, centerOrthoAxisPixel+mWhiskerWidth*0.5, errorEnd)); } else { if ((errorStart < errorEnd) != errorAxis->rangeReversed()) backbones.append(QLineF(errorStart, centerOrthoAxisPixel, errorEnd, centerOrthoAxisPixel)); whiskers.append(QLineF(errorEnd, centerOrthoAxisPixel-mWhiskerWidth*0.5, errorEnd, centerOrthoAxisPixel+mWhiskerWidth*0.5)); } } // minus error: if (!qIsNaN(it->errorMinus)) { errorStart = centerErrorAxisPixel-symbolGap; errorEnd = errorAxis->coordToPixel(centerErrorAxisCoord-it->errorMinus); if (errorAxis->orientation() == Qt::Vertical) { if ((errorStart < errorEnd) != errorAxis->rangeReversed()) backbones.append(QLineF(centerOrthoAxisPixel, errorStart, centerOrthoAxisPixel, errorEnd)); whiskers.append(QLineF(centerOrthoAxisPixel-mWhiskerWidth*0.5, errorEnd, centerOrthoAxisPixel+mWhiskerWidth*0.5, errorEnd)); } else { if ((errorStart > errorEnd) != errorAxis->rangeReversed()) backbones.append(QLineF(errorStart, centerOrthoAxisPixel, errorEnd, centerOrthoAxisPixel)); whiskers.append(QLineF(errorEnd, centerOrthoAxisPixel-mWhiskerWidth*0.5, errorEnd, centerOrthoAxisPixel+mWhiskerWidth*0.5)); } } } /*! \internal This method outputs the currently visible data range via \a begin and \a end. The returned range will also never exceed \a rangeRestriction. Since error bars with type \ref etKeyError may extend to arbitrarily positive and negative key coordinates relative to their data point key, this method checks all outer error bars whether they truly don't reach into the visible portion of the axis rect, by calling \ref errorBarVisible. On the other hand error bars with type \ref etValueError that are associated with data plottables whose sort key is equal to the main key (see \ref qcpdatacontainer-datatype "QCPDataContainer DataType") can be handled very efficiently by finding the visible range of error bars through binary search (\ref QCPPlottableInterface1D::findBegin and \ref QCPPlottableInterface1D::findEnd). If the plottable's sort key is not equal to the main key, this method returns the full data range, only restricted by \a rangeRestriction. Drawing optimization then has to be done on a point-by-point basis in the \ref draw method. */ void QCPErrorBars::getVisibleDataBounds(QCPErrorBarsDataContainer::const_iterator &begin, QCPErrorBarsDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const { QCPAxis *keyAxis = mKeyAxis.data(); QCPAxis *valueAxis = mValueAxis.data(); if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; end = mDataContainer->constEnd(); begin = end; return; } if (!mDataPlottable || rangeRestriction.isEmpty()) { end = mDataContainer->constEnd(); begin = end; return; } if (!mDataPlottable->interface1D()->sortKeyIsMainKey()) { // if the sort key isn't the main key, it's not possible to find a contiguous range of visible // data points, so this method then only applies the range restriction and otherwise returns // the full data range. Visibility checks must be done on a per-datapoin-basis during drawing QCPDataRange dataRange(0, mDataContainer->size()); dataRange = dataRange.bounded(rangeRestriction); begin = mDataContainer->constBegin()+dataRange.begin(); end = mDataContainer->constBegin()+dataRange.end(); return; } // get visible data range via interface from data plottable, and then restrict to available error data points: const int n = qMin(mDataContainer->size(), mDataPlottable->interface1D()->dataCount()); int beginIndex = mDataPlottable->interface1D()->findBegin(keyAxis->range().lower); int endIndex = mDataPlottable->interface1D()->findEnd(keyAxis->range().upper); int i = beginIndex; while (i > 0 && i < n && i > rangeRestriction.begin()) { if (errorBarVisible(i)) beginIndex = i; --i; } i = endIndex; while (i >= 0 && i < n && i < rangeRestriction.end()) { if (errorBarVisible(i)) endIndex = i+1; ++i; } QCPDataRange dataRange(beginIndex, endIndex); dataRange = dataRange.bounded(rangeRestriction.bounded(QCPDataRange(0, mDataContainer->size()))); begin = mDataContainer->constBegin()+dataRange.begin(); end = mDataContainer->constBegin()+dataRange.end(); } /*! \internal Calculates the minimum distance in pixels the error bars' representation has from the given \a pixelPoint. This is used to determine whether the error bar was clicked or not, e.g. in \ref selectTest. The closest data point to \a pixelPoint is returned in \a closestData. */ double QCPErrorBars::pointDistance(const QPointF &pixelPoint, QCPErrorBarsDataContainer::const_iterator &closestData) const { closestData = mDataContainer->constEnd(); if (!mDataPlottable || mDataContainer->isEmpty()) return -1.0; if (!mKeyAxis || !mValueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return -1.0; } QCPErrorBarsDataContainer::const_iterator begin, end; getVisibleDataBounds(begin, end, QCPDataRange(0, dataCount())); // calculate minimum distances to error backbones (whiskers are ignored for speed) and find closestData iterator: double minDistSqr = std::numeric_limits::max(); QVector backbones, whiskers; for (QCPErrorBarsDataContainer::const_iterator it=begin; it!=end; ++it) { getErrorBarLines(it, backbones, whiskers); for (int i=0; i &selectedSegments, QList &unselectedSegments) const { selectedSegments.clear(); unselectedSegments.clear(); if (mSelectable == QCP::stWhole) // stWhole selection type draws the entire plottable with selected style if mSelection isn't empty { if (selected()) selectedSegments << QCPDataRange(0, dataCount()); else unselectedSegments << QCPDataRange(0, dataCount()); } else { QCPDataSelection sel(selection()); sel.simplify(); selectedSegments = sel.dataRanges(); unselectedSegments = sel.inverse(QCPDataRange(0, dataCount())).dataRanges(); } } /*! \internal Returns whether the error bar at the specified \a index is visible within the current key axis range. This method assumes for performance reasons without checking that the key axis, the value axis, and the data plottable (\ref setDataPlottable) are not zero and that \a index is within valid bounds of this \ref QCPErrorBars instance and the bounds of the data plottable. */ bool QCPErrorBars::errorBarVisible(int index) const { QPointF centerPixel = mDataPlottable->interface1D()->dataPixelPosition(index); const double centerKeyPixel = mKeyAxis->orientation() == Qt::Horizontal ? centerPixel.x() : centerPixel.y(); if (qIsNaN(centerKeyPixel)) return false; double keyMin, keyMax; if (mErrorType == etKeyError) { const double centerKey = mKeyAxis->pixelToCoord(centerKeyPixel); const double errorPlus = mDataContainer->at(index).errorPlus; const double errorMinus = mDataContainer->at(index).errorMinus; keyMax = centerKey+(qIsNaN(errorPlus) ? 0 : errorPlus); keyMin = centerKey-(qIsNaN(errorMinus) ? 0 : errorMinus); } else // mErrorType == etValueError { keyMax = mKeyAxis->pixelToCoord(centerKeyPixel+mWhiskerWidth*0.5*mKeyAxis->pixelOrientation()); keyMin = mKeyAxis->pixelToCoord(centerKeyPixel-mWhiskerWidth*0.5*mKeyAxis->pixelOrientation()); } return ((keyMax > mKeyAxis->range().lower) && (keyMin < mKeyAxis->range().upper)); } /*! \internal Returns whether \a line intersects (or is contained in) \a pixelRect. \a line is assumed to be either perfectly horizontal or perfectly vertical, as is the case for error bar lines. */ bool QCPErrorBars::rectIntersectsLine(const QRectF &pixelRect, const QLineF &line) const { if (pixelRect.left() > line.x1() && pixelRect.left() > line.x2()) return false; else if (pixelRect.right() < line.x1() && pixelRect.right() < line.x2()) return false; else if (pixelRect.top() > line.y1() && pixelRect.top() > line.y2()) return false; else if (pixelRect.bottom() < line.y1() && pixelRect.bottom() < line.y2()) return false; else return true; } /* end of 'src/plottables/plottable-errorbar.cpp' */ /* including file 'src/items/item-straightline.cpp', size 7592 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemStraightLine //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemStraightLine \brief A straight line that spans infinitely in both directions \image html QCPItemStraightLine.png "Straight line example. Blue dotted circles are anchors, solid blue discs are positions." It has two positions, \a point1 and \a point2, which define the straight line. */ /*! Creates a straight line item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */ QCPItemStraightLine::QCPItemStraightLine(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), point1(createPosition(QLatin1String("point1"))), point2(createPosition(QLatin1String("point2"))) { point1->setCoords(0, 0); point2->setCoords(1, 1); setPen(QPen(Qt::black)); setSelectedPen(QPen(Qt::blue,2)); } QCPItemStraightLine::~QCPItemStraightLine() { } /*! Sets the pen that will be used to draw the line \see setSelectedPen */ void QCPItemStraightLine::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen that will be used to draw the line when selected \see setPen, setSelected */ void QCPItemStraightLine::setSelectedPen(const QPen &pen) { mSelectedPen = pen; } /* inherits documentation from base class */ double QCPItemStraightLine::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; return QCPVector2D(pos).distanceToStraightLine(point1->pixelPosition(), point2->pixelPosition()-point1->pixelPosition()); } /* inherits documentation from base class */ void QCPItemStraightLine::draw(QCPPainter *painter) { QCPVector2D start(point1->pixelPosition()); QCPVector2D end(point2->pixelPosition()); // get visible segment of straight line inside clipRect: double clipPad = mainPen().widthF(); QLineF line = getRectClippedStraightLine(start, end-start, clipRect().adjusted(-clipPad, -clipPad, clipPad, clipPad)); // paint visible segment, if existent: if (!line.isNull()) { painter->setPen(mainPen()); painter->drawLine(line); } } /*! \internal Returns the section of the straight line defined by \a base and direction vector \a vec, that is visible in the specified \a rect. This is a helper function for \ref draw. */ QLineF QCPItemStraightLine::getRectClippedStraightLine(const QCPVector2D &base, const QCPVector2D &vec, const QRect &rect) const { double bx, by; double gamma; QLineF result; if (vec.x() == 0 && vec.y() == 0) return result; if (qFuzzyIsNull(vec.x())) // line is vertical { // check top of rect: bx = rect.left(); by = rect.top(); gamma = base.x()-bx + (by-base.y())*vec.x()/vec.y(); if (gamma >= 0 && gamma <= rect.width()) result.setLine(bx+gamma, rect.top(), bx+gamma, rect.bottom()); // no need to check bottom because we know line is vertical } else if (qFuzzyIsNull(vec.y())) // line is horizontal { // check left of rect: bx = rect.left(); by = rect.top(); gamma = base.y()-by + (bx-base.x())*vec.y()/vec.x(); if (gamma >= 0 && gamma <= rect.height()) result.setLine(rect.left(), by+gamma, rect.right(), by+gamma); // no need to check right because we know line is horizontal } else // line is skewed { QList pointVectors; // check top of rect: bx = rect.left(); by = rect.top(); gamma = base.x()-bx + (by-base.y())*vec.x()/vec.y(); if (gamma >= 0 && gamma <= rect.width()) pointVectors.append(QCPVector2D(bx+gamma, by)); // check bottom of rect: bx = rect.left(); by = rect.bottom(); gamma = base.x()-bx + (by-base.y())*vec.x()/vec.y(); if (gamma >= 0 && gamma <= rect.width()) pointVectors.append(QCPVector2D(bx+gamma, by)); // check left of rect: bx = rect.left(); by = rect.top(); gamma = base.y()-by + (bx-base.x())*vec.y()/vec.x(); if (gamma >= 0 && gamma <= rect.height()) pointVectors.append(QCPVector2D(bx, by+gamma)); // check right of rect: bx = rect.right(); by = rect.top(); gamma = base.y()-by + (bx-base.x())*vec.y()/vec.x(); if (gamma >= 0 && gamma <= rect.height()) pointVectors.append(QCPVector2D(bx, by+gamma)); // evaluate points: if (pointVectors.size() == 2) { result.setPoints(pointVectors.at(0).toPointF(), pointVectors.at(1).toPointF()); } else if (pointVectors.size() > 2) { // line probably goes through corner of rect, and we got two points there. single out the point pair with greatest distance: double distSqrMax = 0; QCPVector2D pv1, pv2; for (int i=0; i distSqrMax) { pv1 = pointVectors.at(i); pv2 = pointVectors.at(k); distSqrMax = distSqr; } } } result.setPoints(pv1.toPointF(), pv2.toPointF()); } } return result; } /*! \internal Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is. */ QPen QCPItemStraightLine::mainPen() const { return mSelected ? mSelectedPen : mPen; } /* end of 'src/items/item-straightline.cpp' */ /* including file 'src/items/item-line.cpp', size 8498 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemLine //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemLine \brief A line from one point to another \image html QCPItemLine.png "Line example. Blue dotted circles are anchors, solid blue discs are positions." It has two positions, \a start and \a end, which define the end points of the line. With \ref setHead and \ref setTail you may set different line ending styles, e.g. to create an arrow. */ /*! Creates a line item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */ QCPItemLine::QCPItemLine(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), start(createPosition(QLatin1String("start"))), end(createPosition(QLatin1String("end"))) { start->setCoords(0, 0); end->setCoords(1, 1); setPen(QPen(Qt::black)); setSelectedPen(QPen(Qt::blue,2)); } QCPItemLine::~QCPItemLine() { } /*! Sets the pen that will be used to draw the line \see setSelectedPen */ void QCPItemLine::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen that will be used to draw the line when selected \see setPen, setSelected */ void QCPItemLine::setSelectedPen(const QPen &pen) { mSelectedPen = pen; } /*! Sets the line ending style of the head. The head corresponds to the \a end position. Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle here, e.g. \code setHead(QCPLineEnding::esSpikeArrow) \endcode \see setTail */ void QCPItemLine::setHead(const QCPLineEnding &head) { mHead = head; } /*! Sets the line ending style of the tail. The tail corresponds to the \a start position. Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle here, e.g. \code setTail(QCPLineEnding::esSpikeArrow) \endcode \see setHead */ void QCPItemLine::setTail(const QCPLineEnding &tail) { mTail = tail; } /* inherits documentation from base class */ double QCPItemLine::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; return qSqrt(QCPVector2D(pos).distanceSquaredToLine(start->pixelPosition(), end->pixelPosition())); } /* inherits documentation from base class */ void QCPItemLine::draw(QCPPainter *painter) { QCPVector2D startVec(start->pixelPosition()); QCPVector2D endVec(end->pixelPosition()); if (qFuzzyIsNull((startVec-endVec).lengthSquared())) return; // get visible segment of straight line inside clipRect: double clipPad = qMax(mHead.boundingDistance(), mTail.boundingDistance()); clipPad = qMax(clipPad, (double)mainPen().widthF()); QLineF line = getRectClippedLine(startVec, endVec, clipRect().adjusted(-clipPad, -clipPad, clipPad, clipPad)); // paint visible segment, if existent: if (!line.isNull()) { painter->setPen(mainPen()); painter->drawLine(line); painter->setBrush(Qt::SolidPattern); if (mTail.style() != QCPLineEnding::esNone) mTail.draw(painter, startVec, startVec-endVec); if (mHead.style() != QCPLineEnding::esNone) mHead.draw(painter, endVec, endVec-startVec); } } /*! \internal Returns the section of the line defined by \a start and \a end, that is visible in the specified \a rect. This is a helper function for \ref draw. */ QLineF QCPItemLine::getRectClippedLine(const QCPVector2D &start, const QCPVector2D &end, const QRect &rect) const { bool containsStart = rect.contains(start.x(), start.y()); bool containsEnd = rect.contains(end.x(), end.y()); if (containsStart && containsEnd) return QLineF(start.toPointF(), end.toPointF()); QCPVector2D base = start; QCPVector2D vec = end-start; double bx, by; double gamma, mu; QLineF result; QList pointVectors; if (!qFuzzyIsNull(vec.y())) // line is not horizontal { // check top of rect: bx = rect.left(); by = rect.top(); mu = (by-base.y())/vec.y(); if (mu >= 0 && mu <= 1) { gamma = base.x()-bx + mu*vec.x(); if (gamma >= 0 && gamma <= rect.width()) pointVectors.append(QCPVector2D(bx+gamma, by)); } // check bottom of rect: bx = rect.left(); by = rect.bottom(); mu = (by-base.y())/vec.y(); if (mu >= 0 && mu <= 1) { gamma = base.x()-bx + mu*vec.x(); if (gamma >= 0 && gamma <= rect.width()) pointVectors.append(QCPVector2D(bx+gamma, by)); } } if (!qFuzzyIsNull(vec.x())) // line is not vertical { // check left of rect: bx = rect.left(); by = rect.top(); mu = (bx-base.x())/vec.x(); if (mu >= 0 && mu <= 1) { gamma = base.y()-by + mu*vec.y(); if (gamma >= 0 && gamma <= rect.height()) pointVectors.append(QCPVector2D(bx, by+gamma)); } // check right of rect: bx = rect.right(); by = rect.top(); mu = (bx-base.x())/vec.x(); if (mu >= 0 && mu <= 1) { gamma = base.y()-by + mu*vec.y(); if (gamma >= 0 && gamma <= rect.height()) pointVectors.append(QCPVector2D(bx, by+gamma)); } } if (containsStart) pointVectors.append(start); if (containsEnd) pointVectors.append(end); // evaluate points: if (pointVectors.size() == 2) { result.setPoints(pointVectors.at(0).toPointF(), pointVectors.at(1).toPointF()); } else if (pointVectors.size() > 2) { // line probably goes through corner of rect, and we got two points there. single out the point pair with greatest distance: double distSqrMax = 0; QCPVector2D pv1, pv2; for (int i=0; i distSqrMax) { pv1 = pointVectors.at(i); pv2 = pointVectors.at(k); distSqrMax = distSqr; } } } result.setPoints(pv1.toPointF(), pv2.toPointF()); } return result; } /*! \internal Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is. */ QPen QCPItemLine::mainPen() const { return mSelected ? mSelectedPen : mPen; } /* end of 'src/items/item-line.cpp' */ /* including file 'src/items/item-curve.cpp', size 7159 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemCurve //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemCurve \brief A curved line from one point to another \image html QCPItemCurve.png "Curve example. Blue dotted circles are anchors, solid blue discs are positions." It has four positions, \a start and \a end, which define the end points of the line, and two control points which define the direction the line exits from the start and the direction from which it approaches the end: \a startDir and \a endDir. With \ref setHead and \ref setTail you may set different line ending styles, e.g. to create an arrow. Often it is desirable for the control points to stay at fixed relative positions to the start/end point. This can be achieved by setting the parent anchor e.g. of \a startDir simply to \a start, and then specify the desired pixel offset with QCPItemPosition::setCoords on \a startDir. */ /*! Creates a curve item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */ QCPItemCurve::QCPItemCurve(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), start(createPosition(QLatin1String("start"))), startDir(createPosition(QLatin1String("startDir"))), endDir(createPosition(QLatin1String("endDir"))), end(createPosition(QLatin1String("end"))) { start->setCoords(0, 0); startDir->setCoords(0.5, 0); endDir->setCoords(0, 0.5); end->setCoords(1, 1); setPen(QPen(Qt::black)); setSelectedPen(QPen(Qt::blue,2)); } QCPItemCurve::~QCPItemCurve() { } /*! Sets the pen that will be used to draw the line \see setSelectedPen */ void QCPItemCurve::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen that will be used to draw the line when selected \see setPen, setSelected */ void QCPItemCurve::setSelectedPen(const QPen &pen) { mSelectedPen = pen; } /*! Sets the line ending style of the head. The head corresponds to the \a end position. Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle here, e.g. \code setHead(QCPLineEnding::esSpikeArrow) \endcode \see setTail */ void QCPItemCurve::setHead(const QCPLineEnding &head) { mHead = head; } /*! Sets the line ending style of the tail. The tail corresponds to the \a start position. Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle here, e.g. \code setTail(QCPLineEnding::esSpikeArrow) \endcode \see setHead */ void QCPItemCurve::setTail(const QCPLineEnding &tail) { mTail = tail; } /* inherits documentation from base class */ double QCPItemCurve::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; QPointF startVec(start->pixelPosition()); QPointF startDirVec(startDir->pixelPosition()); QPointF endDirVec(endDir->pixelPosition()); QPointF endVec(end->pixelPosition()); QPainterPath cubicPath(startVec); cubicPath.cubicTo(startDirVec, endDirVec, endVec); QPolygonF polygon = cubicPath.toSubpathPolygons().first(); QCPVector2D p(pos); double minDistSqr = std::numeric_limits::max(); for (int i=1; ipixelPosition()); QCPVector2D startDirVec(startDir->pixelPosition()); QCPVector2D endDirVec(endDir->pixelPosition()); QCPVector2D endVec(end->pixelPosition()); if ((endVec-startVec).length() > 1e10) // too large curves cause crash return; QPainterPath cubicPath(startVec.toPointF()); cubicPath.cubicTo(startDirVec.toPointF(), endDirVec.toPointF(), endVec.toPointF()); // paint visible segment, if existent: QRect clip = clipRect().adjusted(-mainPen().widthF(), -mainPen().widthF(), mainPen().widthF(), mainPen().widthF()); QRect cubicRect = cubicPath.controlPointRect().toRect(); if (cubicRect.isEmpty()) // may happen when start and end exactly on same x or y position cubicRect.adjust(0, 0, 1, 1); if (clip.intersects(cubicRect)) { painter->setPen(mainPen()); painter->drawPath(cubicPath); painter->setBrush(Qt::SolidPattern); if (mTail.style() != QCPLineEnding::esNone) mTail.draw(painter, startVec, M_PI-cubicPath.angleAtPercent(0)/180.0*M_PI); if (mHead.style() != QCPLineEnding::esNone) mHead.draw(painter, endVec, -cubicPath.angleAtPercent(1)/180.0*M_PI); } } /*! \internal Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is. */ QPen QCPItemCurve::mainPen() const { return mSelected ? mSelectedPen : mPen; } /* end of 'src/items/item-curve.cpp' */ /* including file 'src/items/item-rect.cpp', size 6479 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemRect //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemRect \brief A rectangle \image html QCPItemRect.png "Rectangle example. Blue dotted circles are anchors, solid blue discs are positions." It has two positions, \a topLeft and \a bottomRight, which define the rectangle. */ /*! Creates a rectangle item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */ QCPItemRect::QCPItemRect(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), topLeft(createPosition(QLatin1String("topLeft"))), bottomRight(createPosition(QLatin1String("bottomRight"))), top(createAnchor(QLatin1String("top"), aiTop)), topRight(createAnchor(QLatin1String("topRight"), aiTopRight)), right(createAnchor(QLatin1String("right"), aiRight)), bottom(createAnchor(QLatin1String("bottom"), aiBottom)), bottomLeft(createAnchor(QLatin1String("bottomLeft"), aiBottomLeft)), left(createAnchor(QLatin1String("left"), aiLeft)) { topLeft->setCoords(0, 1); bottomRight->setCoords(1, 0); setPen(QPen(Qt::black)); setSelectedPen(QPen(Qt::blue,2)); setBrush(Qt::NoBrush); setSelectedBrush(Qt::NoBrush); } QCPItemRect::~QCPItemRect() { } /*! Sets the pen that will be used to draw the line of the rectangle \see setSelectedPen, setBrush */ void QCPItemRect::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen that will be used to draw the line of the rectangle when selected \see setPen, setSelected */ void QCPItemRect::setSelectedPen(const QPen &pen) { mSelectedPen = pen; } /*! Sets the brush that will be used to fill the rectangle. To disable filling, set \a brush to Qt::NoBrush. \see setSelectedBrush, setPen */ void QCPItemRect::setBrush(const QBrush &brush) { mBrush = brush; } /*! Sets the brush that will be used to fill the rectangle when selected. To disable filling, set \a brush to Qt::NoBrush. \see setBrush */ void QCPItemRect::setSelectedBrush(const QBrush &brush) { mSelectedBrush = brush; } /* inherits documentation from base class */ double QCPItemRect::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; QRectF rect = QRectF(topLeft->pixelPosition(), bottomRight->pixelPosition()).normalized(); bool filledRect = mBrush.style() != Qt::NoBrush && mBrush.color().alpha() != 0; return rectDistance(rect, pos, filledRect); } /* inherits documentation from base class */ void QCPItemRect::draw(QCPPainter *painter) { QPointF p1 = topLeft->pixelPosition(); QPointF p2 = bottomRight->pixelPosition(); if (p1.toPoint() == p2.toPoint()) return; QRectF rect = QRectF(p1, p2).normalized(); double clipPad = mainPen().widthF(); QRectF boundingRect = rect.adjusted(-clipPad, -clipPad, clipPad, clipPad); if (boundingRect.intersects(clipRect())) // only draw if bounding rect of rect item is visible in cliprect { painter->setPen(mainPen()); painter->setBrush(mainBrush()); painter->drawRect(rect); } } /* inherits documentation from base class */ QPointF QCPItemRect::anchorPixelPosition(int anchorId) const { QRectF rect = QRectF(topLeft->pixelPosition(), bottomRight->pixelPosition()); switch (anchorId) { case aiTop: return (rect.topLeft()+rect.topRight())*0.5; case aiTopRight: return rect.topRight(); case aiRight: return (rect.topRight()+rect.bottomRight())*0.5; case aiBottom: return (rect.bottomLeft()+rect.bottomRight())*0.5; case aiBottomLeft: return rect.bottomLeft(); case aiLeft: return (rect.topLeft()+rect.bottomLeft())*0.5; } qDebug() << Q_FUNC_INFO << "invalid anchorId" << anchorId; return QPointF(); } /*! \internal Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is. */ QPen QCPItemRect::mainPen() const { return mSelected ? mSelectedPen : mPen; } /*! \internal Returns the brush that should be used for drawing fills of the item. Returns mBrush when the item is not selected and mSelectedBrush when it is. */ QBrush QCPItemRect::mainBrush() const { return mSelected ? mSelectedBrush : mBrush; } /* end of 'src/items/item-rect.cpp' */ /* including file 'src/items/item-text.cpp', size 13338 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemText //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemText \brief A text label \image html QCPItemText.png "Text example. Blue dotted circles are anchors, solid blue discs are positions." Its position is defined by the member \a position and the setting of \ref setPositionAlignment. The latter controls which part of the text rect shall be aligned with \a position. The text alignment itself (i.e. left, center, right) can be controlled with \ref setTextAlignment. The text may be rotated around the \a position point with \ref setRotation. */ /*! Creates a text item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */ QCPItemText::QCPItemText(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), position(createPosition(QLatin1String("position"))), topLeft(createAnchor(QLatin1String("topLeft"), aiTopLeft)), top(createAnchor(QLatin1String("top"), aiTop)), topRight(createAnchor(QLatin1String("topRight"), aiTopRight)), right(createAnchor(QLatin1String("right"), aiRight)), bottomRight(createAnchor(QLatin1String("bottomRight"), aiBottomRight)), bottom(createAnchor(QLatin1String("bottom"), aiBottom)), bottomLeft(createAnchor(QLatin1String("bottomLeft"), aiBottomLeft)), left(createAnchor(QLatin1String("left"), aiLeft)), mText(QLatin1String("text")), mPositionAlignment(Qt::AlignCenter), mTextAlignment(Qt::AlignTop|Qt::AlignHCenter), mRotation(0) { position->setCoords(0, 0); setPen(Qt::NoPen); setSelectedPen(Qt::NoPen); setBrush(Qt::NoBrush); setSelectedBrush(Qt::NoBrush); setColor(Qt::black); setSelectedColor(Qt::blue); } QCPItemText::~QCPItemText() { } /*! Sets the color of the text. */ void QCPItemText::setColor(const QColor &color) { mColor = color; } /*! Sets the color of the text that will be used when the item is selected. */ void QCPItemText::setSelectedColor(const QColor &color) { mSelectedColor = color; } /*! Sets the pen that will be used do draw a rectangular border around the text. To disable the border, set \a pen to Qt::NoPen. \see setSelectedPen, setBrush, setPadding */ void QCPItemText::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen that will be used do draw a rectangular border around the text, when the item is selected. To disable the border, set \a pen to Qt::NoPen. \see setPen */ void QCPItemText::setSelectedPen(const QPen &pen) { mSelectedPen = pen; } /*! Sets the brush that will be used do fill the background of the text. To disable the background, set \a brush to Qt::NoBrush. \see setSelectedBrush, setPen, setPadding */ void QCPItemText::setBrush(const QBrush &brush) { mBrush = brush; } /*! Sets the brush that will be used do fill the background of the text, when the item is selected. To disable the background, set \a brush to Qt::NoBrush. \see setBrush */ void QCPItemText::setSelectedBrush(const QBrush &brush) { mSelectedBrush = brush; } /*! Sets the font of the text. \see setSelectedFont, setColor */ void QCPItemText::setFont(const QFont &font) { mFont = font; } /*! Sets the font of the text that will be used when the item is selected. \see setFont */ void QCPItemText::setSelectedFont(const QFont &font) { mSelectedFont = font; } /*! Sets the text that will be displayed. Multi-line texts are supported by inserting a line break character, e.g. '\n'. \see setFont, setColor, setTextAlignment */ void QCPItemText::setText(const QString &text) { mText = text; } /*! Sets which point of the text rect shall be aligned with \a position. Examples: \li If \a alignment is Qt::AlignHCenter | Qt::AlignTop, the text will be positioned such that the top of the text rect will be horizontally centered on \a position. \li If \a alignment is Qt::AlignLeft | Qt::AlignBottom, \a position will indicate the bottom left corner of the text rect. If you want to control the alignment of (multi-lined) text within the text rect, use \ref setTextAlignment. */ void QCPItemText::setPositionAlignment(Qt::Alignment alignment) { mPositionAlignment = alignment; } /*! Controls how (multi-lined) text is aligned inside the text rect (typically Qt::AlignLeft, Qt::AlignCenter or Qt::AlignRight). */ void QCPItemText::setTextAlignment(Qt::Alignment alignment) { mTextAlignment = alignment; } /*! Sets the angle in degrees by which the text (and the text rectangle, if visible) will be rotated around \a position. */ void QCPItemText::setRotation(double degrees) { mRotation = degrees; } /*! Sets the distance between the border of the text rectangle and the text. The appearance (and visibility) of the text rectangle can be controlled with \ref setPen and \ref setBrush. */ void QCPItemText::setPadding(const QMargins &padding) { mPadding = padding; } /* inherits documentation from base class */ double QCPItemText::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; // The rect may be rotated, so we transform the actual clicked pos to the rotated // coordinate system, so we can use the normal rectDistance function for non-rotated rects: QPointF positionPixels(position->pixelPosition()); QTransform inputTransform; inputTransform.translate(positionPixels.x(), positionPixels.y()); inputTransform.rotate(-mRotation); inputTransform.translate(-positionPixels.x(), -positionPixels.y()); QPointF rotatedPos = inputTransform.map(pos); QFontMetrics fontMetrics(mFont); QRect textRect = fontMetrics.boundingRect(0, 0, 0, 0, Qt::TextDontClip|mTextAlignment, mText); QRect textBoxRect = textRect.adjusted(-mPadding.left(), -mPadding.top(), mPadding.right(), mPadding.bottom()); QPointF textPos = getTextDrawPoint(positionPixels, textBoxRect, mPositionAlignment); textBoxRect.moveTopLeft(textPos.toPoint()); return rectDistance(textBoxRect, rotatedPos, true); } /* inherits documentation from base class */ void QCPItemText::draw(QCPPainter *painter) { QPointF pos(position->pixelPosition()); QTransform transform = painter->transform(); transform.translate(pos.x(), pos.y()); if (!qFuzzyIsNull(mRotation)) transform.rotate(mRotation); painter->setFont(mainFont()); QRect textRect = painter->fontMetrics().boundingRect(0, 0, 0, 0, Qt::TextDontClip|mTextAlignment, mText); QRect textBoxRect = textRect.adjusted(-mPadding.left(), -mPadding.top(), mPadding.right(), mPadding.bottom()); QPointF textPos = getTextDrawPoint(QPointF(0, 0), textBoxRect, mPositionAlignment); // 0, 0 because the transform does the translation textRect.moveTopLeft(textPos.toPoint()+QPoint(mPadding.left(), mPadding.top())); textBoxRect.moveTopLeft(textPos.toPoint()); double clipPad = mainPen().widthF(); QRect boundingRect = textBoxRect.adjusted(-clipPad, -clipPad, clipPad, clipPad); if (transform.mapRect(boundingRect).intersects(painter->transform().mapRect(clipRect()))) { painter->setTransform(transform); if ((mainBrush().style() != Qt::NoBrush && mainBrush().color().alpha() != 0) || (mainPen().style() != Qt::NoPen && mainPen().color().alpha() != 0)) { painter->setPen(mainPen()); painter->setBrush(mainBrush()); painter->drawRect(textBoxRect); } painter->setBrush(Qt::NoBrush); painter->setPen(QPen(mainColor())); painter->drawText(textRect, Qt::TextDontClip|mTextAlignment, mText); } } /* inherits documentation from base class */ QPointF QCPItemText::anchorPixelPosition(int anchorId) const { // get actual rect points (pretty much copied from draw function): QPointF pos(position->pixelPosition()); QTransform transform; transform.translate(pos.x(), pos.y()); if (!qFuzzyIsNull(mRotation)) transform.rotate(mRotation); QFontMetrics fontMetrics(mainFont()); QRect textRect = fontMetrics.boundingRect(0, 0, 0, 0, Qt::TextDontClip|mTextAlignment, mText); QRectF textBoxRect = textRect.adjusted(-mPadding.left(), -mPadding.top(), mPadding.right(), mPadding.bottom()); QPointF textPos = getTextDrawPoint(QPointF(0, 0), textBoxRect, mPositionAlignment); // 0, 0 because the transform does the translation textBoxRect.moveTopLeft(textPos.toPoint()); QPolygonF rectPoly = transform.map(QPolygonF(textBoxRect)); switch (anchorId) { case aiTopLeft: return rectPoly.at(0); case aiTop: return (rectPoly.at(0)+rectPoly.at(1))*0.5; case aiTopRight: return rectPoly.at(1); case aiRight: return (rectPoly.at(1)+rectPoly.at(2))*0.5; case aiBottomRight: return rectPoly.at(2); case aiBottom: return (rectPoly.at(2)+rectPoly.at(3))*0.5; case aiBottomLeft: return rectPoly.at(3); case aiLeft: return (rectPoly.at(3)+rectPoly.at(0))*0.5; } qDebug() << Q_FUNC_INFO << "invalid anchorId" << anchorId; return QPointF(); } /*! \internal Returns the point that must be given to the QPainter::drawText function (which expects the top left point of the text rect), according to the position \a pos, the text bounding box \a rect and the requested \a positionAlignment. For example, if \a positionAlignment is Qt::AlignLeft | Qt::AlignBottom the returned point will be shifted upward by the height of \a rect, starting from \a pos. So if the text is finally drawn at that point, the lower left corner of the resulting text rect is at \a pos. */ QPointF QCPItemText::getTextDrawPoint(const QPointF &pos, const QRectF &rect, Qt::Alignment positionAlignment) const { if (positionAlignment == 0 || positionAlignment == (Qt::AlignLeft|Qt::AlignTop)) return pos; QPointF result = pos; // start at top left if (positionAlignment.testFlag(Qt::AlignHCenter)) result.rx() -= rect.width()/2.0; else if (positionAlignment.testFlag(Qt::AlignRight)) result.rx() -= rect.width(); if (positionAlignment.testFlag(Qt::AlignVCenter)) result.ry() -= rect.height()/2.0; else if (positionAlignment.testFlag(Qt::AlignBottom)) result.ry() -= rect.height(); return result; } /*! \internal Returns the font that should be used for drawing text. Returns mFont when the item is not selected and mSelectedFont when it is. */ QFont QCPItemText::mainFont() const { return mSelected ? mSelectedFont : mFont; } /*! \internal Returns the color that should be used for drawing text. Returns mColor when the item is not selected and mSelectedColor when it is. */ QColor QCPItemText::mainColor() const { return mSelected ? mSelectedColor : mColor; } /*! \internal Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is. */ QPen QCPItemText::mainPen() const { return mSelected ? mSelectedPen : mPen; } /*! \internal Returns the brush that should be used for drawing fills of the item. Returns mBrush when the item is not selected and mSelectedBrush when it is. */ QBrush QCPItemText::mainBrush() const { return mSelected ? mSelectedBrush : mBrush; } /* end of 'src/items/item-text.cpp' */ /* including file 'src/items/item-ellipse.cpp', size 7863 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemEllipse //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemEllipse \brief An ellipse \image html QCPItemEllipse.png "Ellipse example. Blue dotted circles are anchors, solid blue discs are positions." It has two positions, \a topLeft and \a bottomRight, which define the rect the ellipse will be drawn in. */ /*! Creates an ellipse item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */ QCPItemEllipse::QCPItemEllipse(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), topLeft(createPosition(QLatin1String("topLeft"))), bottomRight(createPosition(QLatin1String("bottomRight"))), topLeftRim(createAnchor(QLatin1String("topLeftRim"), aiTopLeftRim)), top(createAnchor(QLatin1String("top"), aiTop)), topRightRim(createAnchor(QLatin1String("topRightRim"), aiTopRightRim)), right(createAnchor(QLatin1String("right"), aiRight)), bottomRightRim(createAnchor(QLatin1String("bottomRightRim"), aiBottomRightRim)), bottom(createAnchor(QLatin1String("bottom"), aiBottom)), bottomLeftRim(createAnchor(QLatin1String("bottomLeftRim"), aiBottomLeftRim)), left(createAnchor(QLatin1String("left"), aiLeft)), center(createAnchor(QLatin1String("center"), aiCenter)) { topLeft->setCoords(0, 1); bottomRight->setCoords(1, 0); setPen(QPen(Qt::black)); setSelectedPen(QPen(Qt::blue, 2)); setBrush(Qt::NoBrush); setSelectedBrush(Qt::NoBrush); } QCPItemEllipse::~QCPItemEllipse() { } /*! Sets the pen that will be used to draw the line of the ellipse \see setSelectedPen, setBrush */ void QCPItemEllipse::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen that will be used to draw the line of the ellipse when selected \see setPen, setSelected */ void QCPItemEllipse::setSelectedPen(const QPen &pen) { mSelectedPen = pen; } /*! Sets the brush that will be used to fill the ellipse. To disable filling, set \a brush to Qt::NoBrush. \see setSelectedBrush, setPen */ void QCPItemEllipse::setBrush(const QBrush &brush) { mBrush = brush; } /*! Sets the brush that will be used to fill the ellipse when selected. To disable filling, set \a brush to Qt::NoBrush. \see setBrush */ void QCPItemEllipse::setSelectedBrush(const QBrush &brush) { mSelectedBrush = brush; } /* inherits documentation from base class */ double QCPItemEllipse::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; QPointF p1 = topLeft->pixelPosition(); QPointF p2 = bottomRight->pixelPosition(); QPointF center((p1+p2)/2.0); double a = qAbs(p1.x()-p2.x())/2.0; double b = qAbs(p1.y()-p2.y())/2.0; double x = pos.x()-center.x(); double y = pos.y()-center.y(); // distance to border: double c = 1.0/qSqrt(x*x/(a*a)+y*y/(b*b)); double result = qAbs(c-1)*qSqrt(x*x+y*y); // filled ellipse, allow click inside to count as hit: if (result > mParentPlot->selectionTolerance()*0.99 && mBrush.style() != Qt::NoBrush && mBrush.color().alpha() != 0) { if (x*x/(a*a) + y*y/(b*b) <= 1) result = mParentPlot->selectionTolerance()*0.99; } return result; } /* inherits documentation from base class */ void QCPItemEllipse::draw(QCPPainter *painter) { QPointF p1 = topLeft->pixelPosition(); QPointF p2 = bottomRight->pixelPosition(); if (p1.toPoint() == p2.toPoint()) return; QRectF ellipseRect = QRectF(p1, p2).normalized(); QRect clip = clipRect().adjusted(-mainPen().widthF(), -mainPen().widthF(), mainPen().widthF(), mainPen().widthF()); if (ellipseRect.intersects(clip)) // only draw if bounding rect of ellipse is visible in cliprect { painter->setPen(mainPen()); painter->setBrush(mainBrush()); #ifdef __EXCEPTIONS try // drawEllipse sometimes throws exceptions if ellipse is too big { #endif painter->drawEllipse(ellipseRect); #ifdef __EXCEPTIONS } catch (...) { qDebug() << Q_FUNC_INFO << "Item too large for memory, setting invisible"; setVisible(false); } #endif } } /* inherits documentation from base class */ QPointF QCPItemEllipse::anchorPixelPosition(int anchorId) const { QRectF rect = QRectF(topLeft->pixelPosition(), bottomRight->pixelPosition()); switch (anchorId) { case aiTopLeftRim: return rect.center()+(rect.topLeft()-rect.center())*1/qSqrt(2); case aiTop: return (rect.topLeft()+rect.topRight())*0.5; case aiTopRightRim: return rect.center()+(rect.topRight()-rect.center())*1/qSqrt(2); case aiRight: return (rect.topRight()+rect.bottomRight())*0.5; case aiBottomRightRim: return rect.center()+(rect.bottomRight()-rect.center())*1/qSqrt(2); case aiBottom: return (rect.bottomLeft()+rect.bottomRight())*0.5; case aiBottomLeftRim: return rect.center()+(rect.bottomLeft()-rect.center())*1/qSqrt(2); case aiLeft: return (rect.topLeft()+rect.bottomLeft())*0.5; case aiCenter: return (rect.topLeft()+rect.bottomRight())*0.5; } qDebug() << Q_FUNC_INFO << "invalid anchorId" << anchorId; return QPointF(); } /*! \internal Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is. */ QPen QCPItemEllipse::mainPen() const { return mSelected ? mSelectedPen : mPen; } /*! \internal Returns the brush that should be used for drawing fills of the item. Returns mBrush when the item is not selected and mSelectedBrush when it is. */ QBrush QCPItemEllipse::mainBrush() const { return mSelected ? mSelectedBrush : mBrush; } /* end of 'src/items/item-ellipse.cpp' */ /* including file 'src/items/item-pixmap.cpp', size 10615 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemPixmap //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemPixmap \brief An arbitrary pixmap \image html QCPItemPixmap.png "Pixmap example. Blue dotted circles are anchors, solid blue discs are positions." It has two positions, \a topLeft and \a bottomRight, which define the rectangle the pixmap will be drawn in. Depending on the scale setting (\ref setScaled), the pixmap will be either scaled to fit the rectangle or be drawn aligned to the topLeft position. If scaling is enabled and \a topLeft is further to the bottom/right than \a bottomRight (as shown on the right side of the example image), the pixmap will be flipped in the respective orientations. */ /*! Creates a rectangle item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */ QCPItemPixmap::QCPItemPixmap(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), topLeft(createPosition(QLatin1String("topLeft"))), bottomRight(createPosition(QLatin1String("bottomRight"))), top(createAnchor(QLatin1String("top"), aiTop)), topRight(createAnchor(QLatin1String("topRight"), aiTopRight)), right(createAnchor(QLatin1String("right"), aiRight)), bottom(createAnchor(QLatin1String("bottom"), aiBottom)), bottomLeft(createAnchor(QLatin1String("bottomLeft"), aiBottomLeft)), left(createAnchor(QLatin1String("left"), aiLeft)), mScaled(false), mScaledPixmapInvalidated(true), mAspectRatioMode(Qt::KeepAspectRatio), mTransformationMode(Qt::SmoothTransformation) { topLeft->setCoords(0, 1); bottomRight->setCoords(1, 0); setPen(Qt::NoPen); setSelectedPen(QPen(Qt::blue)); } QCPItemPixmap::~QCPItemPixmap() { } /*! Sets the pixmap that will be displayed. */ void QCPItemPixmap::setPixmap(const QPixmap &pixmap) { mPixmap = pixmap; mScaledPixmapInvalidated = true; if (mPixmap.isNull()) qDebug() << Q_FUNC_INFO << "pixmap is null"; } /*! Sets whether the pixmap will be scaled to fit the rectangle defined by the \a topLeft and \a bottomRight positions. */ void QCPItemPixmap::setScaled(bool scaled, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformationMode) { mScaled = scaled; mAspectRatioMode = aspectRatioMode; mTransformationMode = transformationMode; mScaledPixmapInvalidated = true; } /*! Sets the pen that will be used to draw a border around the pixmap. \see setSelectedPen, setBrush */ void QCPItemPixmap::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen that will be used to draw a border around the pixmap when selected \see setPen, setSelected */ void QCPItemPixmap::setSelectedPen(const QPen &pen) { mSelectedPen = pen; } /* inherits documentation from base class */ double QCPItemPixmap::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; return rectDistance(getFinalRect(), pos, true); } /* inherits documentation from base class */ void QCPItemPixmap::draw(QCPPainter *painter) { bool flipHorz = false; bool flipVert = false; QRect rect = getFinalRect(&flipHorz, &flipVert); double clipPad = mainPen().style() == Qt::NoPen ? 0 : mainPen().widthF(); QRect boundingRect = rect.adjusted(-clipPad, -clipPad, clipPad, clipPad); if (boundingRect.intersects(clipRect())) { updateScaledPixmap(rect, flipHorz, flipVert); painter->drawPixmap(rect.topLeft(), mScaled ? mScaledPixmap : mPixmap); QPen pen = mainPen(); if (pen.style() != Qt::NoPen) { painter->setPen(pen); painter->setBrush(Qt::NoBrush); painter->drawRect(rect); } } } /* inherits documentation from base class */ QPointF QCPItemPixmap::anchorPixelPosition(int anchorId) const { bool flipHorz; bool flipVert; QRect rect = getFinalRect(&flipHorz, &flipVert); // we actually want denormal rects (negative width/height) here, so restore // the flipped state: if (flipHorz) rect.adjust(rect.width(), 0, -rect.width(), 0); if (flipVert) rect.adjust(0, rect.height(), 0, -rect.height()); switch (anchorId) { case aiTop: return (rect.topLeft()+rect.topRight())*0.5; case aiTopRight: return rect.topRight(); case aiRight: return (rect.topRight()+rect.bottomRight())*0.5; case aiBottom: return (rect.bottomLeft()+rect.bottomRight())*0.5; case aiBottomLeft: return rect.bottomLeft(); case aiLeft: return (rect.topLeft()+rect.bottomLeft())*0.5;; } qDebug() << Q_FUNC_INFO << "invalid anchorId" << anchorId; return QPointF(); } /*! \internal Creates the buffered scaled image (\a mScaledPixmap) to fit the specified \a finalRect. The parameters \a flipHorz and \a flipVert control whether the resulting image shall be flipped horizontally or vertically. (This is used when \a topLeft is further to the bottom/right than \a bottomRight.) This function only creates the scaled pixmap when the buffered pixmap has a different size than the expected result, so calling this function repeatedly, e.g. in the \ref draw function, does not cause expensive rescaling every time. If scaling is disabled, sets mScaledPixmap to a null QPixmap. */ void QCPItemPixmap::updateScaledPixmap(QRect finalRect, bool flipHorz, bool flipVert) { if (mPixmap.isNull()) return; if (mScaled) { #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED double devicePixelRatio = mPixmap.devicePixelRatio(); #else double devicePixelRatio = 1.0; #endif if (finalRect.isNull()) finalRect = getFinalRect(&flipHorz, &flipVert); if (mScaledPixmapInvalidated || finalRect.size() != mScaledPixmap.size()/devicePixelRatio) { mScaledPixmap = mPixmap.scaled(finalRect.size()*devicePixelRatio, mAspectRatioMode, mTransformationMode); if (flipHorz || flipVert) mScaledPixmap = QPixmap::fromImage(mScaledPixmap.toImage().mirrored(flipHorz, flipVert)); #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED mScaledPixmap.setDevicePixelRatio(devicePixelRatio); #endif } } else if (!mScaledPixmap.isNull()) mScaledPixmap = QPixmap(); mScaledPixmapInvalidated = false; } /*! \internal Returns the final (tight) rect the pixmap is drawn in, depending on the current item positions and scaling settings. The output parameters \a flippedHorz and \a flippedVert return whether the pixmap should be drawn flipped horizontally or vertically in the returned rect. (The returned rect itself is always normalized, i.e. the top left corner of the rect is actually further to the top/left than the bottom right corner). This is the case when the item position \a topLeft is further to the bottom/right than \a bottomRight. If scaling is disabled, returns a rect with size of the original pixmap and the top left corner aligned with the item position \a topLeft. The position \a bottomRight is ignored. */ QRect QCPItemPixmap::getFinalRect(bool *flippedHorz, bool *flippedVert) const { QRect result; bool flipHorz = false; bool flipVert = false; QPoint p1 = topLeft->pixelPosition().toPoint(); QPoint p2 = bottomRight->pixelPosition().toPoint(); if (p1 == p2) return QRect(p1, QSize(0, 0)); if (mScaled) { QSize newSize = QSize(p2.x()-p1.x(), p2.y()-p1.y()); QPoint topLeft = p1; if (newSize.width() < 0) { flipHorz = true; newSize.rwidth() *= -1; topLeft.setX(p2.x()); } if (newSize.height() < 0) { flipVert = true; newSize.rheight() *= -1; topLeft.setY(p2.y()); } QSize scaledSize = mPixmap.size(); #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED scaledSize /= mPixmap.devicePixelRatio(); scaledSize.scale(newSize*mPixmap.devicePixelRatio(), mAspectRatioMode); #else scaledSize.scale(newSize, mAspectRatioMode); #endif result = QRect(topLeft, scaledSize); } else { #ifdef QCP_DEVICEPIXELRATIO_SUPPORTED result = QRect(p1, mPixmap.size()/mPixmap.devicePixelRatio()); #else result = QRect(p1, mPixmap.size()); #endif } if (flippedHorz) *flippedHorz = flipHorz; if (flippedVert) *flippedVert = flipVert; return result; } /*! \internal Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is. */ QPen QCPItemPixmap::mainPen() const { return mSelected ? mSelectedPen : mPen; } /* end of 'src/items/item-pixmap.cpp' */ /* including file 'src/items/item-tracer.cpp', size 14624 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemTracer //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemTracer \brief Item that sticks to QCPGraph data points \image html QCPItemTracer.png "Tracer example. Blue dotted circles are anchors, solid blue discs are positions." The tracer can be connected with a QCPGraph via \ref setGraph. Then it will automatically adopt the coordinate axes of the graph and update its \a position to be on the graph's data. This means the key stays controllable via \ref setGraphKey, but the value will follow the graph data. If a QCPGraph is connected, note that setting the coordinates of the tracer item directly via \a position will have no effect because they will be overriden in the next redraw (this is when the coordinate update happens). If the specified key in \ref setGraphKey is outside the key bounds of the graph, the tracer will stay at the corresponding end of the graph. With \ref setInterpolating you may specify whether the tracer may only stay exactly on data points or whether it interpolates data points linearly, if given a key that lies between two data points of the graph. The tracer has different visual styles, see \ref setStyle. It is also possible to make the tracer have no own visual appearance (set the style to \ref tsNone), and just connect other item positions to the tracer \a position (used as an anchor) via \ref QCPItemPosition::setParentAnchor. \note The tracer position is only automatically updated upon redraws. So when the data of the graph changes and immediately afterwards (without a redraw) the position coordinates of the tracer are retrieved, they will not reflect the updated data of the graph. In this case \ref updatePosition must be called manually, prior to reading the tracer coordinates. */ /*! Creates a tracer item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */ QCPItemTracer::QCPItemTracer(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), position(createPosition(QLatin1String("position"))), mSize(6), mStyle(tsCrosshair), mGraph(0), mGraphKey(0), mInterpolating(false) { position->setCoords(0, 0); setBrush(Qt::NoBrush); setSelectedBrush(Qt::NoBrush); setPen(QPen(Qt::black)); setSelectedPen(QPen(Qt::blue, 2)); } QCPItemTracer::~QCPItemTracer() { } /*! Sets the pen that will be used to draw the line of the tracer \see setSelectedPen, setBrush */ void QCPItemTracer::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen that will be used to draw the line of the tracer when selected \see setPen, setSelected */ void QCPItemTracer::setSelectedPen(const QPen &pen) { mSelectedPen = pen; } /*! Sets the brush that will be used to draw any fills of the tracer \see setSelectedBrush, setPen */ void QCPItemTracer::setBrush(const QBrush &brush) { mBrush = brush; } /*! Sets the brush that will be used to draw any fills of the tracer, when selected. \see setBrush, setSelected */ void QCPItemTracer::setSelectedBrush(const QBrush &brush) { mSelectedBrush = brush; } /*! Sets the size of the tracer in pixels, if the style supports setting a size (e.g. \ref tsSquare does, \ref tsCrosshair does not). */ void QCPItemTracer::setSize(double size) { mSize = size; } /*! Sets the style/visual appearance of the tracer. If you only want to use the tracer \a position as an anchor for other items, set \a style to \ref tsNone. */ void QCPItemTracer::setStyle(QCPItemTracer::TracerStyle style) { mStyle = style; } /*! Sets the QCPGraph this tracer sticks to. The tracer \a position will be set to type QCPItemPosition::ptPlotCoords and the axes will be set to the axes of \a graph. To free the tracer from any graph, set \a graph to 0. The tracer \a position can then be placed freely like any other item position. This is the state the tracer will assume when its graph gets deleted while still attached to it. \see setGraphKey */ void QCPItemTracer::setGraph(QCPGraph *graph) { if (graph) { if (graph->parentPlot() == mParentPlot) { position->setType(QCPItemPosition::ptPlotCoords); position->setAxes(graph->keyAxis(), graph->valueAxis()); mGraph = graph; updatePosition(); } else qDebug() << Q_FUNC_INFO << "graph isn't in same QCustomPlot instance as this item"; } else { mGraph = 0; } } /*! Sets the key of the graph's data point the tracer will be positioned at. This is the only free coordinate of a tracer when attached to a graph. Depending on \ref setInterpolating, the tracer will be either positioned on the data point closest to \a key, or will stay exactly at \a key and interpolate the value linearly. \see setGraph, setInterpolating */ void QCPItemTracer::setGraphKey(double key) { mGraphKey = key; } /*! Sets whether the value of the graph's data points shall be interpolated, when positioning the tracer. If \a enabled is set to false and a key is given with \ref setGraphKey, the tracer is placed on the data point of the graph which is closest to the key, but which is not necessarily exactly there. If \a enabled is true, the tracer will be positioned exactly at the specified key, and the appropriate value will be interpolated from the graph's data points linearly. \see setGraph, setGraphKey */ void QCPItemTracer::setInterpolating(bool enabled) { mInterpolating = enabled; } /* inherits documentation from base class */ double QCPItemTracer::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; QPointF center(position->pixelPosition()); double w = mSize/2.0; QRect clip = clipRect(); switch (mStyle) { case tsNone: return -1; case tsPlus: { if (clipRect().intersects(QRectF(center-QPointF(w, w), center+QPointF(w, w)).toRect())) return qSqrt(qMin(QCPVector2D(pos).distanceSquaredToLine(center+QPointF(-w, 0), center+QPointF(w, 0)), QCPVector2D(pos).distanceSquaredToLine(center+QPointF(0, -w), center+QPointF(0, w)))); break; } case tsCrosshair: { return qSqrt(qMin(QCPVector2D(pos).distanceSquaredToLine(QCPVector2D(clip.left(), center.y()), QCPVector2D(clip.right(), center.y())), QCPVector2D(pos).distanceSquaredToLine(QCPVector2D(center.x(), clip.top()), QCPVector2D(center.x(), clip.bottom())))); } case tsCircle: { if (clip.intersects(QRectF(center-QPointF(w, w), center+QPointF(w, w)).toRect())) { // distance to border: double centerDist = QCPVector2D(center-pos).length(); double circleLine = w; double result = qAbs(centerDist-circleLine); // filled ellipse, allow click inside to count as hit: if (result > mParentPlot->selectionTolerance()*0.99 && mBrush.style() != Qt::NoBrush && mBrush.color().alpha() != 0) { if (centerDist <= circleLine) result = mParentPlot->selectionTolerance()*0.99; } return result; } break; } case tsSquare: { if (clip.intersects(QRectF(center-QPointF(w, w), center+QPointF(w, w)).toRect())) { QRectF rect = QRectF(center-QPointF(w, w), center+QPointF(w, w)); bool filledRect = mBrush.style() != Qt::NoBrush && mBrush.color().alpha() != 0; return rectDistance(rect, pos, filledRect); } break; } } return -1; } /* inherits documentation from base class */ void QCPItemTracer::draw(QCPPainter *painter) { updatePosition(); if (mStyle == tsNone) return; painter->setPen(mainPen()); painter->setBrush(mainBrush()); QPointF center(position->pixelPosition()); double w = mSize/2.0; QRect clip = clipRect(); switch (mStyle) { case tsNone: return; case tsPlus: { if (clip.intersects(QRectF(center-QPointF(w, w), center+QPointF(w, w)).toRect())) { painter->drawLine(QLineF(center+QPointF(-w, 0), center+QPointF(w, 0))); painter->drawLine(QLineF(center+QPointF(0, -w), center+QPointF(0, w))); } break; } case tsCrosshair: { if (center.y() > clip.top() && center.y() < clip.bottom()) painter->drawLine(QLineF(clip.left(), center.y(), clip.right(), center.y())); if (center.x() > clip.left() && center.x() < clip.right()) painter->drawLine(QLineF(center.x(), clip.top(), center.x(), clip.bottom())); break; } case tsCircle: { if (clip.intersects(QRectF(center-QPointF(w, w), center+QPointF(w, w)).toRect())) painter->drawEllipse(center, w, w); break; } case tsSquare: { if (clip.intersects(QRectF(center-QPointF(w, w), center+QPointF(w, w)).toRect())) painter->drawRect(QRectF(center-QPointF(w, w), center+QPointF(w, w))); break; } } } /*! If the tracer is connected with a graph (\ref setGraph), this function updates the tracer's \a position to reside on the graph data, depending on the configured key (\ref setGraphKey). It is called automatically on every redraw and normally doesn't need to be called manually. One exception is when you want to read the tracer coordinates via \a position and are not sure that the graph's data (or the tracer key with \ref setGraphKey) hasn't changed since the last redraw. In that situation, call this function before accessing \a position, to make sure you don't get out-of-date coordinates. If there is no graph set on this tracer, this function does nothing. */ void QCPItemTracer::updatePosition() { if (mGraph) { if (mParentPlot->hasPlottable(mGraph)) { if (mGraph->data()->size() > 1) { QCPGraphDataContainer::const_iterator first = mGraph->data()->constBegin(); QCPGraphDataContainer::const_iterator last = mGraph->data()->constEnd()-1; if (mGraphKey <= first->key) position->setCoords(first->key, first->value); else if (mGraphKey >= last->key) position->setCoords(last->key, last->value); else { QCPGraphDataContainer::const_iterator it = mGraph->data()->findBegin(mGraphKey); if (it != mGraph->data()->constEnd()) // mGraphKey is not exactly on last iterator, but somewhere between iterators { QCPGraphDataContainer::const_iterator prevIt = it; ++it; // won't advance to constEnd because we handled that case (mGraphKey >= last->key) before if (mInterpolating) { // interpolate between iterators around mGraphKey: double slope = 0; if (!qFuzzyCompare((double)it->key, (double)prevIt->key)) slope = (it->value-prevIt->value)/(it->key-prevIt->key); position->setCoords(mGraphKey, (mGraphKey-prevIt->key)*slope+prevIt->value); } else { // find iterator with key closest to mGraphKey: if (mGraphKey < (prevIt->key+it->key)*0.5) position->setCoords(prevIt->key, prevIt->value); else position->setCoords(it->key, it->value); } } else // mGraphKey is exactly on last iterator (should actually be caught when comparing first/last keys, but this is a failsafe for fp uncertainty) position->setCoords(it->key, it->value); } } else if (mGraph->data()->size() == 1) { QCPGraphDataContainer::const_iterator it = mGraph->data()->constBegin(); position->setCoords(it->key, it->value); } else qDebug() << Q_FUNC_INFO << "graph has no data"; } else qDebug() << Q_FUNC_INFO << "graph not contained in QCustomPlot instance (anymore)"; } } /*! \internal Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is. */ QPen QCPItemTracer::mainPen() const { return mSelected ? mSelectedPen : mPen; } /*! \internal Returns the brush that should be used for drawing fills of the item. Returns mBrush when the item is not selected and mSelectedBrush when it is. */ QBrush QCPItemTracer::mainBrush() const { return mSelected ? mSelectedBrush : mBrush; } /* end of 'src/items/item-tracer.cpp' */ /* including file 'src/items/item-bracket.cpp', size 10687 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPItemBracket //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPItemBracket \brief A bracket for referencing/highlighting certain parts in the plot. \image html QCPItemBracket.png "Bracket example. Blue dotted circles are anchors, solid blue discs are positions." It has two positions, \a left and \a right, which define the span of the bracket. If \a left is actually farther to the left than \a right, the bracket is opened to the bottom, as shown in the example image. The bracket supports multiple styles via \ref setStyle. The length, i.e. how far the bracket stretches away from the embraced span, can be controlled with \ref setLength. \image html QCPItemBracket-length.png
Demonstrating the effect of different values for \ref setLength, for styles \ref bsCalligraphic and \ref bsSquare. Anchors and positions are displayed for reference.
It provides an anchor \a center, to allow connection of other items, e.g. an arrow (QCPItemLine or QCPItemCurve) or a text label (QCPItemText), to the bracket. */ /*! Creates a bracket item and sets default values. The created item is automatically registered with \a parentPlot. This QCustomPlot instance takes ownership of the item, so do not delete it manually but use QCustomPlot::removeItem() instead. */ QCPItemBracket::QCPItemBracket(QCustomPlot *parentPlot) : QCPAbstractItem(parentPlot), left(createPosition(QLatin1String("left"))), right(createPosition(QLatin1String("right"))), center(createAnchor(QLatin1String("center"), aiCenter)), mLength(8), mStyle(bsCalligraphic) { left->setCoords(0, 0); right->setCoords(1, 1); setPen(QPen(Qt::black)); setSelectedPen(QPen(Qt::blue, 2)); } QCPItemBracket::~QCPItemBracket() { } /*! Sets the pen that will be used to draw the bracket. Note that when the style is \ref bsCalligraphic, only the color will be taken from the pen, the stroke and width are ignored. To change the apparent stroke width of a calligraphic bracket, use \ref setLength, which has a similar effect. \see setSelectedPen */ void QCPItemBracket::setPen(const QPen &pen) { mPen = pen; } /*! Sets the pen that will be used to draw the bracket when selected \see setPen, setSelected */ void QCPItemBracket::setSelectedPen(const QPen &pen) { mSelectedPen = pen; } /*! Sets the \a length in pixels how far the bracket extends in the direction towards the embraced span of the bracket (i.e. perpendicular to the left-right-direction) \image html QCPItemBracket-length.png
Demonstrating the effect of different values for \ref setLength, for styles \ref bsCalligraphic and \ref bsSquare. Anchors and positions are displayed for reference.
*/ void QCPItemBracket::setLength(double length) { mLength = length; } /*! Sets the style of the bracket, i.e. the shape/visual appearance. \see setPen */ void QCPItemBracket::setStyle(QCPItemBracket::BracketStyle style) { mStyle = style; } /* inherits documentation from base class */ double QCPItemBracket::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { Q_UNUSED(details) if (onlySelectable && !mSelectable) return -1; QCPVector2D p(pos); QCPVector2D leftVec(left->pixelPosition()); QCPVector2D rightVec(right->pixelPosition()); if (leftVec.toPoint() == rightVec.toPoint()) return -1; QCPVector2D widthVec = (rightVec-leftVec)*0.5; QCPVector2D lengthVec = widthVec.perpendicular().normalized()*mLength; QCPVector2D centerVec = (rightVec+leftVec)*0.5-lengthVec; switch (mStyle) { case QCPItemBracket::bsSquare: case QCPItemBracket::bsRound: { double a = p.distanceSquaredToLine(centerVec-widthVec, centerVec+widthVec); double b = p.distanceSquaredToLine(centerVec-widthVec+lengthVec, centerVec-widthVec); double c = p.distanceSquaredToLine(centerVec+widthVec+lengthVec, centerVec+widthVec); return qSqrt(qMin(qMin(a, b), c)); } case QCPItemBracket::bsCurly: case QCPItemBracket::bsCalligraphic: { double a = p.distanceSquaredToLine(centerVec-widthVec*0.75+lengthVec*0.15, centerVec+lengthVec*0.3); double b = p.distanceSquaredToLine(centerVec-widthVec+lengthVec*0.7, centerVec-widthVec*0.75+lengthVec*0.15); double c = p.distanceSquaredToLine(centerVec+widthVec*0.75+lengthVec*0.15, centerVec+lengthVec*0.3); double d = p.distanceSquaredToLine(centerVec+widthVec+lengthVec*0.7, centerVec+widthVec*0.75+lengthVec*0.15); return qSqrt(qMin(qMin(a, b), qMin(c, d))); } } return -1; } /* inherits documentation from base class */ void QCPItemBracket::draw(QCPPainter *painter) { QCPVector2D leftVec(left->pixelPosition()); QCPVector2D rightVec(right->pixelPosition()); if (leftVec.toPoint() == rightVec.toPoint()) return; QCPVector2D widthVec = (rightVec-leftVec)*0.5; QCPVector2D lengthVec = widthVec.perpendicular().normalized()*mLength; QCPVector2D centerVec = (rightVec+leftVec)*0.5-lengthVec; QPolygon boundingPoly; boundingPoly << leftVec.toPoint() << rightVec.toPoint() << (rightVec-lengthVec).toPoint() << (leftVec-lengthVec).toPoint(); QRect clip = clipRect().adjusted(-mainPen().widthF(), -mainPen().widthF(), mainPen().widthF(), mainPen().widthF()); if (clip.intersects(boundingPoly.boundingRect())) { painter->setPen(mainPen()); switch (mStyle) { case bsSquare: { painter->drawLine((centerVec+widthVec).toPointF(), (centerVec-widthVec).toPointF()); painter->drawLine((centerVec+widthVec).toPointF(), (centerVec+widthVec+lengthVec).toPointF()); painter->drawLine((centerVec-widthVec).toPointF(), (centerVec-widthVec+lengthVec).toPointF()); break; } case bsRound: { painter->setBrush(Qt::NoBrush); QPainterPath path; path.moveTo((centerVec+widthVec+lengthVec).toPointF()); path.cubicTo((centerVec+widthVec).toPointF(), (centerVec+widthVec).toPointF(), centerVec.toPointF()); path.cubicTo((centerVec-widthVec).toPointF(), (centerVec-widthVec).toPointF(), (centerVec-widthVec+lengthVec).toPointF()); painter->drawPath(path); break; } case bsCurly: { painter->setBrush(Qt::NoBrush); QPainterPath path; path.moveTo((centerVec+widthVec+lengthVec).toPointF()); path.cubicTo((centerVec+widthVec-lengthVec*0.8).toPointF(), (centerVec+0.4*widthVec+lengthVec).toPointF(), centerVec.toPointF()); path.cubicTo((centerVec-0.4*widthVec+lengthVec).toPointF(), (centerVec-widthVec-lengthVec*0.8).toPointF(), (centerVec-widthVec+lengthVec).toPointF()); painter->drawPath(path); break; } case bsCalligraphic: { painter->setPen(Qt::NoPen); painter->setBrush(QBrush(mainPen().color())); QPainterPath path; path.moveTo((centerVec+widthVec+lengthVec).toPointF()); path.cubicTo((centerVec+widthVec-lengthVec*0.8).toPointF(), (centerVec+0.4*widthVec+0.8*lengthVec).toPointF(), centerVec.toPointF()); path.cubicTo((centerVec-0.4*widthVec+0.8*lengthVec).toPointF(), (centerVec-widthVec-lengthVec*0.8).toPointF(), (centerVec-widthVec+lengthVec).toPointF()); path.cubicTo((centerVec-widthVec-lengthVec*0.5).toPointF(), (centerVec-0.2*widthVec+1.2*lengthVec).toPointF(), (centerVec+lengthVec*0.2).toPointF()); path.cubicTo((centerVec+0.2*widthVec+1.2*lengthVec).toPointF(), (centerVec+widthVec-lengthVec*0.5).toPointF(), (centerVec+widthVec+lengthVec).toPointF()); painter->drawPath(path); break; } } } } /* inherits documentation from base class */ QPointF QCPItemBracket::anchorPixelPosition(int anchorId) const { QCPVector2D leftVec(left->pixelPosition()); QCPVector2D rightVec(right->pixelPosition()); if (leftVec.toPoint() == rightVec.toPoint()) return leftVec.toPointF(); QCPVector2D widthVec = (rightVec-leftVec)*0.5; QCPVector2D lengthVec = widthVec.perpendicular().normalized()*mLength; QCPVector2D centerVec = (rightVec+leftVec)*0.5-lengthVec; switch (anchorId) { case aiCenter: return centerVec.toPointF(); } qDebug() << Q_FUNC_INFO << "invalid anchorId" << anchorId; return QPointF(); } /*! \internal Returns the pen that should be used for drawing lines. Returns mPen when the item is not selected and mSelectedPen when it is. */ QPen QCPItemBracket::mainPen() const { return mSelected ? mSelectedPen : mPen; } /* end of 'src/items/item-bracket.cpp' */ sqlitebrowser-3.11.2/libs/qcustomplot-source/qcustomplot.h000066400000000000000000010112551345112435200240740ustar00rootroot00000000000000/*************************************************************************** ** ** ** QCustomPlot, an easy to use, modern plotting widget for Qt ** ** Copyright (C) 2011-2017 Emanuel Eichhammer ** ** ** ** 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 3 of the License, or ** ** (at your option) any later version. ** ** ** ** This program is distributed in the hope that it will be useful, ** ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** ** GNU General Public License for more details. ** ** ** ** You should have received a copy of the GNU General Public License ** ** along with this program. If not, see http://www.gnu.org/licenses/. ** ** ** **************************************************************************** ** Author: Emanuel Eichhammer ** ** Website/Contact: http://www.qcustomplot.com/ ** ** Date: 04.09.17 ** ** Version: 2.0.0 ** ****************************************************************************/ #ifndef QCUSTOMPLOT_H #define QCUSTOMPLOT_H #include // some Qt version/configuration dependent macros to include or exclude certain code paths: #ifdef QCUSTOMPLOT_USE_OPENGL # if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) # define QCP_OPENGL_PBUFFER # else # define QCP_OPENGL_FBO # endif # if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0) # define QCP_OPENGL_OFFSCREENSURFACE # endif #endif #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) # define QCP_DEVICEPIXELRATIO_SUPPORTED # if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) # define QCP_DEVICEPIXELRATIO_FLOAT # endif #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef QCP_OPENGL_FBO # include # include # ifdef QCP_OPENGL_OFFSCREENSURFACE # include # else # include # endif #endif #ifdef QCP_OPENGL_PBUFFER # include #endif #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) # include # include # include # include #else # include # include # include #endif class QCPPainter; class QCustomPlot; class QCPLayerable; class QCPLayoutElement; class QCPLayout; class QCPAxis; class QCPAxisRect; class QCPAxisPainterPrivate; class QCPAbstractPlottable; class QCPGraph; class QCPAbstractItem; class QCPPlottableInterface1D; class QCPLegend; class QCPItemPosition; class QCPLayer; class QCPAbstractLegendItem; class QCPSelectionRect; class QCPColorMap; class QCPColorScale; class QCPBars; /* including file 'src/global.h', size 16225 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ // decl definitions for shared library compilation/usage: #if defined(QCUSTOMPLOT_COMPILE_LIBRARY) # define QCP_LIB_DECL Q_DECL_EXPORT #elif defined(QCUSTOMPLOT_USE_LIBRARY) # define QCP_LIB_DECL Q_DECL_IMPORT #else # define QCP_LIB_DECL #endif // define empty macro for Q_DECL_OVERRIDE if it doesn't exist (Qt < 5) #ifndef Q_DECL_OVERRIDE # define Q_DECL_OVERRIDE #endif /*! The QCP Namespace contains general enums, QFlags and functions used throughout the QCustomPlot library. It provides QMetaObject-based reflection of its enums and flags via \a QCP::staticMetaObject. */ #ifndef Q_MOC_RUN namespace QCP { #else class QCP { // when in moc-run, make it look like a class, so we get Q_GADGET, Q_ENUMS/Q_FLAGS features in namespace Q_GADGET Q_ENUMS(ExportPen) Q_ENUMS(ResolutionUnit) Q_ENUMS(SignDomain) Q_ENUMS(MarginSide) Q_FLAGS(MarginSides) Q_ENUMS(AntialiasedElement) Q_FLAGS(AntialiasedElements) Q_ENUMS(PlottingHint) Q_FLAGS(PlottingHints) Q_ENUMS(Interaction) Q_FLAGS(Interactions) Q_ENUMS(SelectionRectMode) Q_ENUMS(SelectionType) public: #endif /*! Defines the different units in which the image resolution can be specified in the export functions. \see QCustomPlot::savePng, QCustomPlot::saveJpg, QCustomPlot::saveBmp, QCustomPlot::saveRastered */ enum ResolutionUnit { ruDotsPerMeter ///< Resolution is given in dots per meter (dpm) ,ruDotsPerCentimeter ///< Resolution is given in dots per centimeter (dpcm) ,ruDotsPerInch ///< Resolution is given in dots per inch (DPI/PPI) }; /*! Defines how cosmetic pens (pens with numerical width 0) are handled during export. \see QCustomPlot::savePdf */ enum ExportPen { epNoCosmetic ///< Cosmetic pens are converted to pens with pixel width 1 when exporting ,epAllowCosmetic ///< Cosmetic pens are exported normally (e.g. in PDF exports, cosmetic pens always appear as 1 pixel on screen, independent of viewer zoom level) }; /*! Represents negative and positive sign domain, e.g. for passing to \ref QCPAbstractPlottable::getKeyRange and \ref QCPAbstractPlottable::getValueRange. This is primarily needed when working with logarithmic axis scales, since only one of the sign domains can be visible at a time. */ enum SignDomain { sdNegative ///< The negative sign domain, i.e. numbers smaller than zero ,sdBoth ///< Both sign domains, including zero, i.e. all numbers ,sdPositive ///< The positive sign domain, i.e. numbers greater than zero }; /*! Defines the sides of a rectangular entity to which margins can be applied. \see QCPLayoutElement::setAutoMargins, QCPAxisRect::setAutoMargins */ enum MarginSide { msLeft = 0x01 ///< 0x01 left margin ,msRight = 0x02 ///< 0x02 right margin ,msTop = 0x04 ///< 0x04 top margin ,msBottom = 0x08 ///< 0x08 bottom margin ,msAll = 0xFF ///< 0xFF all margins ,msNone = 0x00 ///< 0x00 no margin }; Q_DECLARE_FLAGS(MarginSides, MarginSide) /*! Defines what objects of a plot can be forcibly drawn antialiased/not antialiased. If an object is neither forcibly drawn antialiased nor forcibly drawn not antialiased, it is up to the respective element how it is drawn. Typically it provides a \a setAntialiased function for this. \c AntialiasedElements is a flag of or-combined elements of this enum type. \see QCustomPlot::setAntialiasedElements, QCustomPlot::setNotAntialiasedElements */ enum AntialiasedElement { aeAxes = 0x0001 ///< 0x0001 Axis base line and tick marks ,aeGrid = 0x0002 ///< 0x0002 Grid lines ,aeSubGrid = 0x0004 ///< 0x0004 Sub grid lines ,aeLegend = 0x0008 ///< 0x0008 Legend box ,aeLegendItems = 0x0010 ///< 0x0010 Legend items ,aePlottables = 0x0020 ///< 0x0020 Main lines of plottables ,aeItems = 0x0040 ///< 0x0040 Main lines of items ,aeScatters = 0x0080 ///< 0x0080 Scatter symbols of plottables (excluding scatter symbols of type ssPixmap) ,aeFills = 0x0100 ///< 0x0100 Borders of fills (e.g. under or between graphs) ,aeZeroLine = 0x0200 ///< 0x0200 Zero-lines, see \ref QCPGrid::setZeroLinePen ,aeOther = 0x8000 ///< 0x8000 Other elements that don't fit into any of the existing categories ,aeAll = 0xFFFF ///< 0xFFFF All elements ,aeNone = 0x0000 ///< 0x0000 No elements }; Q_DECLARE_FLAGS(AntialiasedElements, AntialiasedElement) /*! Defines plotting hints that control various aspects of the quality and speed of plotting. \see QCustomPlot::setPlottingHints */ enum PlottingHint { phNone = 0x000 ///< 0x000 No hints are set ,phFastPolylines = 0x001 ///< 0x001 Graph/Curve lines are drawn with a faster method. This reduces the quality especially of the line segment ///< joins, thus is most effective for pen sizes larger than 1. It is only used for solid line pens. ,phImmediateRefresh = 0x002 ///< 0x002 causes an immediate repaint() instead of a soft update() when QCustomPlot::replot() is called with parameter \ref QCustomPlot::rpRefreshHint. ///< This is set by default to prevent the plot from freezing on fast consecutive replots (e.g. user drags ranges with mouse). ,phCacheLabels = 0x004 ///< 0x004 axis (tick) labels will be cached as pixmaps, increasing replot performance. }; Q_DECLARE_FLAGS(PlottingHints, PlottingHint) /*! Defines the mouse interactions possible with QCustomPlot. \c Interactions is a flag of or-combined elements of this enum type. \see QCustomPlot::setInteractions */ enum Interaction { iRangeDrag = 0x001 ///< 0x001 Axis ranges are draggable (see \ref QCPAxisRect::setRangeDrag, \ref QCPAxisRect::setRangeDragAxes) ,iRangeZoom = 0x002 ///< 0x002 Axis ranges are zoomable with the mouse wheel (see \ref QCPAxisRect::setRangeZoom, \ref QCPAxisRect::setRangeZoomAxes) ,iMultiSelect = 0x004 ///< 0x004 The user can select multiple objects by holding the modifier set by \ref QCustomPlot::setMultiSelectModifier while clicking ,iSelectPlottables = 0x008 ///< 0x008 Plottables are selectable (e.g. graphs, curves, bars,... see QCPAbstractPlottable) ,iSelectAxes = 0x010 ///< 0x010 Axes are selectable (or parts of them, see QCPAxis::setSelectableParts) ,iSelectLegend = 0x020 ///< 0x020 Legends are selectable (or their child items, see QCPLegend::setSelectableParts) ,iSelectItems = 0x040 ///< 0x040 Items are selectable (Rectangles, Arrows, Textitems, etc. see \ref QCPAbstractItem) ,iSelectOther = 0x080 ///< 0x080 All other objects are selectable (e.g. your own derived layerables, other layout elements,...) }; Q_DECLARE_FLAGS(Interactions, Interaction) /*! Defines the behaviour of the selection rect. \see QCustomPlot::setSelectionRectMode, QCustomPlot::selectionRect, QCPSelectionRect */ enum SelectionRectMode { srmNone ///< The selection rect is disabled, and all mouse events are forwarded to the underlying objects, e.g. for axis range dragging ,srmZoom ///< When dragging the mouse, a selection rect becomes active. Upon releasing, the axes that are currently set as range zoom axes (\ref QCPAxisRect::setRangeZoomAxes) will have their ranges zoomed accordingly. ,srmSelect ///< When dragging the mouse, a selection rect becomes active. Upon releasing, plottable data points that were within the selection rect are selected, if the plottable's selectability setting permits. (See \ref dataselection "data selection mechanism" for details.) ,srmCustom ///< When dragging the mouse, a selection rect becomes active. It is the programmer's responsibility to connect according slots to the selection rect's signals (e.g. \ref QCPSelectionRect::accepted) in order to process the user interaction. }; /*! Defines the different ways a plottable can be selected. These images show the effect of the different selection types, when the indicated selection rect was dragged:
\image html selectiontype-none.png stNone \image html selectiontype-whole.png stWhole \image html selectiontype-singledata.png stSingleData \image html selectiontype-datarange.png stDataRange \image html selectiontype-multipledataranges.png stMultipleDataRanges
\see QCPAbstractPlottable::setSelectable, QCPDataSelection::enforceType */ enum SelectionType { stNone ///< The plottable is not selectable ,stWhole ///< Selection behaves like \ref stMultipleDataRanges, but if there are any data points selected, the entire plottable is drawn as selected. ,stSingleData ///< One individual data point can be selected at a time ,stDataRange ///< Multiple contiguous data points (a data range) can be selected ,stMultipleDataRanges ///< Any combination of data points/ranges can be selected }; /*! \internal Returns whether the specified \a value is considered an invalid data value for plottables (i.e. is \e nan or \e +/-inf). This function is used to check data validity upon replots, when the compiler flag \c QCUSTOMPLOT_CHECK_DATA is set. */ inline bool isInvalidData(double value) { return qIsNaN(value) || qIsInf(value); } /*! \internal \overload Checks two arguments instead of one. */ inline bool isInvalidData(double value1, double value2) { return isInvalidData(value1) || isInvalidData(value2); } /*! \internal Sets the specified \a side of \a margins to \a value \see getMarginValue */ inline void setMarginValue(QMargins &margins, QCP::MarginSide side, int value) { switch (side) { case QCP::msLeft: margins.setLeft(value); break; case QCP::msRight: margins.setRight(value); break; case QCP::msTop: margins.setTop(value); break; case QCP::msBottom: margins.setBottom(value); break; case QCP::msAll: margins = QMargins(value, value, value, value); break; default: break; } } /*! \internal Returns the value of the specified \a side of \a margins. If \a side is \ref QCP::msNone or \ref QCP::msAll, returns 0. \see setMarginValue */ inline int getMarginValue(const QMargins &margins, QCP::MarginSide side) { switch (side) { case QCP::msLeft: return margins.left(); case QCP::msRight: return margins.right(); case QCP::msTop: return margins.top(); case QCP::msBottom: return margins.bottom(); default: break; } return 0; } extern const QMetaObject staticMetaObject; // in moc-run we create a static meta object for QCP "fake" object. This line is the link to it via QCP::staticMetaObject in normal operation as namespace } // end of namespace QCP Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::AntialiasedElements) Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::PlottingHints) Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::MarginSides) Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::Interactions) Q_DECLARE_METATYPE(QCP::ExportPen) Q_DECLARE_METATYPE(QCP::ResolutionUnit) Q_DECLARE_METATYPE(QCP::SignDomain) Q_DECLARE_METATYPE(QCP::MarginSide) Q_DECLARE_METATYPE(QCP::AntialiasedElement) Q_DECLARE_METATYPE(QCP::PlottingHint) Q_DECLARE_METATYPE(QCP::Interaction) Q_DECLARE_METATYPE(QCP::SelectionRectMode) Q_DECLARE_METATYPE(QCP::SelectionType) /* end of 'src/global.h' */ /* including file 'src/vector2d.h', size 4928 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPVector2D { public: QCPVector2D(); QCPVector2D(double x, double y); QCPVector2D(const QPoint &point); QCPVector2D(const QPointF &point); // getters: double x() const { return mX; } double y() const { return mY; } double &rx() { return mX; } double &ry() { return mY; } // setters: void setX(double x) { mX = x; } void setY(double y) { mY = y; } // non-virtual methods: double length() const { return qSqrt(mX*mX+mY*mY); } double lengthSquared() const { return mX*mX+mY*mY; } QPoint toPoint() const { return QPoint(mX, mY); } QPointF toPointF() const { return QPointF(mX, mY); } bool isNull() const { return qIsNull(mX) && qIsNull(mY); } void normalize(); QCPVector2D normalized() const; QCPVector2D perpendicular() const { return QCPVector2D(-mY, mX); } double dot(const QCPVector2D &vec) const { return mX*vec.mX+mY*vec.mY; } double distanceSquaredToLine(const QCPVector2D &start, const QCPVector2D &end) const; double distanceSquaredToLine(const QLineF &line) const; double distanceToStraightLine(const QCPVector2D &base, const QCPVector2D &direction) const; QCPVector2D &operator*=(double factor); QCPVector2D &operator/=(double divisor); QCPVector2D &operator+=(const QCPVector2D &vector); QCPVector2D &operator-=(const QCPVector2D &vector); private: // property members: double mX, mY; friend inline const QCPVector2D operator*(double factor, const QCPVector2D &vec); friend inline const QCPVector2D operator*(const QCPVector2D &vec, double factor); friend inline const QCPVector2D operator/(const QCPVector2D &vec, double divisor); friend inline const QCPVector2D operator+(const QCPVector2D &vec1, const QCPVector2D &vec2); friend inline const QCPVector2D operator-(const QCPVector2D &vec1, const QCPVector2D &vec2); friend inline const QCPVector2D operator-(const QCPVector2D &vec); }; Q_DECLARE_TYPEINFO(QCPVector2D, Q_MOVABLE_TYPE); inline const QCPVector2D operator*(double factor, const QCPVector2D &vec) { return QCPVector2D(vec.mX*factor, vec.mY*factor); } inline const QCPVector2D operator*(const QCPVector2D &vec, double factor) { return QCPVector2D(vec.mX*factor, vec.mY*factor); } inline const QCPVector2D operator/(const QCPVector2D &vec, double divisor) { return QCPVector2D(vec.mX/divisor, vec.mY/divisor); } inline const QCPVector2D operator+(const QCPVector2D &vec1, const QCPVector2D &vec2) { return QCPVector2D(vec1.mX+vec2.mX, vec1.mY+vec2.mY); } inline const QCPVector2D operator-(const QCPVector2D &vec1, const QCPVector2D &vec2) { return QCPVector2D(vec1.mX-vec2.mX, vec1.mY-vec2.mY); } inline const QCPVector2D operator-(const QCPVector2D &vec) { return QCPVector2D(-vec.mX, -vec.mY); } /*! \relates QCPVector2D Prints \a vec in a human readable format to the qDebug output. */ inline QDebug operator<< (QDebug d, const QCPVector2D &vec) { d.nospace() << "QCPVector2D(" << vec.x() << ", " << vec.y() << ")"; return d.space(); } /* end of 'src/vector2d.h' */ /* including file 'src/painter.h', size 4035 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPPainter : public QPainter { Q_GADGET public: /*! Defines special modes the painter can operate in. They disable or enable certain subsets of features/fixes/workarounds, depending on whether they are wanted on the respective output device. */ enum PainterMode { pmDefault = 0x00 ///< 0x00 Default mode for painting on screen devices ,pmVectorized = 0x01 ///< 0x01 Mode for vectorized painting (e.g. PDF export). For example, this prevents some antialiasing fixes. ,pmNoCaching = 0x02 ///< 0x02 Mode for all sorts of exports (e.g. PNG, PDF,...). For example, this prevents using cached pixmap labels ,pmNonCosmetic = 0x04 ///< 0x04 Turns pen widths 0 to 1, i.e. disables cosmetic pens. (A cosmetic pen is always drawn with width 1 pixel in the vector image/pdf viewer, independent of zoom.) }; Q_ENUMS(PainterMode) Q_FLAGS(PainterModes) Q_DECLARE_FLAGS(PainterModes, PainterMode) QCPPainter(); explicit QCPPainter(QPaintDevice *device); // getters: bool antialiasing() const { return testRenderHint(QPainter::Antialiasing); } PainterModes modes() const { return mModes; } // setters: void setAntialiasing(bool enabled); void setMode(PainterMode mode, bool enabled=true); void setModes(PainterModes modes); // methods hiding non-virtual base class functions (QPainter bug workarounds): bool begin(QPaintDevice *device); void setPen(const QPen &pen); void setPen(const QColor &color); void setPen(Qt::PenStyle penStyle); void drawLine(const QLineF &line); void drawLine(const QPointF &p1, const QPointF &p2) {drawLine(QLineF(p1, p2));} void save(); void restore(); // non-virtual methods: void makeNonCosmetic(); protected: // property members: PainterModes mModes; bool mIsAntialiasing; // non-property members: QStack mAntialiasingStack; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QCPPainter::PainterModes) Q_DECLARE_METATYPE(QCPPainter::PainterMode) /* end of 'src/painter.h' */ /* including file 'src/paintbuffer.h', size 4958 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAbstractPaintBuffer { public: explicit QCPAbstractPaintBuffer(const QSize &size, double devicePixelRatio); virtual ~QCPAbstractPaintBuffer(); // getters: QSize size() const { return mSize; } bool invalidated() const { return mInvalidated; } double devicePixelRatio() const { return mDevicePixelRatio; } // setters: void setSize(const QSize &size); void setInvalidated(bool invalidated=true); void setDevicePixelRatio(double ratio); // introduced virtual methods: virtual QCPPainter *startPainting() = 0; virtual void donePainting() {} virtual void draw(QCPPainter *painter) const = 0; virtual void clear(const QColor &color) = 0; protected: // property members: QSize mSize; double mDevicePixelRatio; // non-property members: bool mInvalidated; // introduced virtual methods: virtual void reallocateBuffer() = 0; }; class QCP_LIB_DECL QCPPaintBufferPixmap : public QCPAbstractPaintBuffer { public: explicit QCPPaintBufferPixmap(const QSize &size, double devicePixelRatio); virtual ~QCPPaintBufferPixmap(); // reimplemented virtual methods: virtual QCPPainter *startPainting() Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) const Q_DECL_OVERRIDE; void clear(const QColor &color) Q_DECL_OVERRIDE; protected: // non-property members: QPixmap mBuffer; // reimplemented virtual methods: virtual void reallocateBuffer() Q_DECL_OVERRIDE; }; #ifdef QCP_OPENGL_PBUFFER class QCP_LIB_DECL QCPPaintBufferGlPbuffer : public QCPAbstractPaintBuffer { public: explicit QCPPaintBufferGlPbuffer(const QSize &size, double devicePixelRatio, int multisamples); virtual ~QCPPaintBufferGlPbuffer(); // reimplemented virtual methods: virtual QCPPainter *startPainting() Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) const Q_DECL_OVERRIDE; void clear(const QColor &color) Q_DECL_OVERRIDE; protected: // non-property members: QGLPixelBuffer *mGlPBuffer; int mMultisamples; // reimplemented virtual methods: virtual void reallocateBuffer() Q_DECL_OVERRIDE; }; #endif // QCP_OPENGL_PBUFFER #ifdef QCP_OPENGL_FBO class QCP_LIB_DECL QCPPaintBufferGlFbo : public QCPAbstractPaintBuffer { public: explicit QCPPaintBufferGlFbo(const QSize &size, double devicePixelRatio, QWeakPointer glContext, QWeakPointer glPaintDevice); virtual ~QCPPaintBufferGlFbo(); // reimplemented virtual methods: virtual QCPPainter *startPainting() Q_DECL_OVERRIDE; virtual void donePainting() Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) const Q_DECL_OVERRIDE; void clear(const QColor &color) Q_DECL_OVERRIDE; protected: // non-property members: QWeakPointer mGlContext; QWeakPointer mGlPaintDevice; QOpenGLFramebufferObject *mGlFrameBuffer; // reimplemented virtual methods: virtual void reallocateBuffer() Q_DECL_OVERRIDE; }; #endif // QCP_OPENGL_FBO /* end of 'src/paintbuffer.h' */ /* including file 'src/layer.h', size 6885 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPLayer : public QObject { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QCustomPlot* parentPlot READ parentPlot) Q_PROPERTY(QString name READ name) Q_PROPERTY(int index READ index) Q_PROPERTY(QList children READ children) Q_PROPERTY(bool visible READ visible WRITE setVisible) Q_PROPERTY(LayerMode mode READ mode WRITE setMode) /// \endcond public: /*! Defines the different rendering modes of a layer. Depending on the mode, certain layers can be replotted individually, without the need to replot (possibly complex) layerables on other layers. \see setMode */ enum LayerMode { lmLogical ///< Layer is used only for rendering order, and shares paint buffer with all other adjacent logical layers. ,lmBuffered ///< Layer has its own paint buffer and may be replotted individually (see \ref replot). }; Q_ENUMS(LayerMode) QCPLayer(QCustomPlot* parentPlot, const QString &layerName); virtual ~QCPLayer(); // getters: QCustomPlot *parentPlot() const { return mParentPlot; } QString name() const { return mName; } int index() const { return mIndex; } QList children() const { return mChildren; } bool visible() const { return mVisible; } LayerMode mode() const { return mMode; } // setters: void setVisible(bool visible); void setMode(LayerMode mode); // non-virtual methods: void replot(); protected: // property members: QCustomPlot *mParentPlot; QString mName; int mIndex; QList mChildren; bool mVisible; LayerMode mMode; // non-property members: QWeakPointer mPaintBuffer; // non-virtual methods: void draw(QCPPainter *painter); void drawToPaintBuffer(); void addChild(QCPLayerable *layerable, bool prepend); void removeChild(QCPLayerable *layerable); private: Q_DISABLE_COPY(QCPLayer) friend class QCustomPlot; friend class QCPLayerable; }; Q_DECLARE_METATYPE(QCPLayer::LayerMode) class QCP_LIB_DECL QCPLayerable : public QObject { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(bool visible READ visible WRITE setVisible) Q_PROPERTY(QCustomPlot* parentPlot READ parentPlot) Q_PROPERTY(QCPLayerable* parentLayerable READ parentLayerable) Q_PROPERTY(QCPLayer* layer READ layer WRITE setLayer NOTIFY layerChanged) Q_PROPERTY(bool antialiased READ antialiased WRITE setAntialiased) /// \endcond public: QCPLayerable(QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0); virtual ~QCPLayerable(); // getters: bool visible() const { return mVisible; } QCustomPlot *parentPlot() const { return mParentPlot; } QCPLayerable *parentLayerable() const { return mParentLayerable.data(); } QCPLayer *layer() const { return mLayer; } bool antialiased() const { return mAntialiased; } // setters: void setVisible(bool on); Q_SLOT bool setLayer(QCPLayer *layer); bool setLayer(const QString &layerName); void setAntialiased(bool enabled); // introduced virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const; // non-property methods: bool realVisibility() const; signals: void layerChanged(QCPLayer *newLayer); protected: // property members: bool mVisible; QCustomPlot *mParentPlot; QPointer mParentLayerable; QCPLayer *mLayer; bool mAntialiased; // introduced virtual methods: virtual void parentPlotInitialized(QCustomPlot *parentPlot); virtual QCP::Interaction selectionCategory() const; virtual QRect clipRect() const; virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const = 0; virtual void draw(QCPPainter *painter) = 0; // selection events: virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged); virtual void deselectEvent(bool *selectionStateChanged); // low-level mouse events: virtual void mousePressEvent(QMouseEvent *event, const QVariant &details); virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos); virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos); virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details); virtual void wheelEvent(QWheelEvent *event); // non-property methods: void initializeParentPlot(QCustomPlot *parentPlot); void setParentLayerable(QCPLayerable* parentLayerable); bool moveToLayer(QCPLayer *layer, bool prepend); void applyAntialiasingHint(QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const; private: Q_DISABLE_COPY(QCPLayerable) friend class QCustomPlot; friend class QCPLayer; friend class QCPAxisRect; }; /* end of 'src/layer.h' */ /* including file 'src/axis/range.h', size 5280 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPRange { public: double lower, upper; QCPRange(); QCPRange(double lower, double upper); bool operator==(const QCPRange& other) const { return lower == other.lower && upper == other.upper; } bool operator!=(const QCPRange& other) const { return !(*this == other); } QCPRange &operator+=(const double& value) { lower+=value; upper+=value; return *this; } QCPRange &operator-=(const double& value) { lower-=value; upper-=value; return *this; } QCPRange &operator*=(const double& value) { lower*=value; upper*=value; return *this; } QCPRange &operator/=(const double& value) { lower/=value; upper/=value; return *this; } friend inline const QCPRange operator+(const QCPRange&, double); friend inline const QCPRange operator+(double, const QCPRange&); friend inline const QCPRange operator-(const QCPRange& range, double value); friend inline const QCPRange operator*(const QCPRange& range, double value); friend inline const QCPRange operator*(double value, const QCPRange& range); friend inline const QCPRange operator/(const QCPRange& range, double value); double size() const { return upper-lower; } double center() const { return (upper+lower)*0.5; } void normalize() { if (lower > upper) qSwap(lower, upper); } void expand(const QCPRange &otherRange); void expand(double includeCoord); QCPRange expanded(const QCPRange &otherRange) const; QCPRange expanded(double includeCoord) const; QCPRange bounded(double lowerBound, double upperBound) const; QCPRange sanitizedForLogScale() const; QCPRange sanitizedForLinScale() const; bool contains(double value) const { return value >= lower && value <= upper; } static bool validRange(double lower, double upper); static bool validRange(const QCPRange &range); static const double minRange; static const double maxRange; }; Q_DECLARE_TYPEINFO(QCPRange, Q_MOVABLE_TYPE); /*! \relates QCPRange Prints \a range in a human readable format to the qDebug output. */ inline QDebug operator<< (QDebug d, const QCPRange &range) { d.nospace() << "QCPRange(" << range.lower << ", " << range.upper << ")"; return d.space(); } /*! Adds \a value to both boundaries of the range. */ inline const QCPRange operator+(const QCPRange& range, double value) { QCPRange result(range); result += value; return result; } /*! Adds \a value to both boundaries of the range. */ inline const QCPRange operator+(double value, const QCPRange& range) { QCPRange result(range); result += value; return result; } /*! Subtracts \a value from both boundaries of the range. */ inline const QCPRange operator-(const QCPRange& range, double value) { QCPRange result(range); result -= value; return result; } /*! Multiplies both boundaries of the range by \a value. */ inline const QCPRange operator*(const QCPRange& range, double value) { QCPRange result(range); result *= value; return result; } /*! Multiplies both boundaries of the range by \a value. */ inline const QCPRange operator*(double value, const QCPRange& range) { QCPRange result(range); result *= value; return result; } /*! Divides both boundaries of the range by \a value. */ inline const QCPRange operator/(const QCPRange& range, double value) { QCPRange result(range); result /= value; return result; } /* end of 'src/axis/range.h' */ /* including file 'src/selection.h', size 8579 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPDataRange { public: QCPDataRange(); QCPDataRange(int begin, int end); bool operator==(const QCPDataRange& other) const { return mBegin == other.mBegin && mEnd == other.mEnd; } bool operator!=(const QCPDataRange& other) const { return !(*this == other); } // getters: int begin() const { return mBegin; } int end() const { return mEnd; } int size() const { return mEnd-mBegin; } int length() const { return size(); } // setters: void setBegin(int begin) { mBegin = begin; } void setEnd(int end) { mEnd = end; } // non-property methods: bool isValid() const { return (mEnd >= mBegin) && (mBegin >= 0); } bool isEmpty() const { return length() == 0; } QCPDataRange bounded(const QCPDataRange &other) const; QCPDataRange expanded(const QCPDataRange &other) const; QCPDataRange intersection(const QCPDataRange &other) const; QCPDataRange adjusted(int changeBegin, int changeEnd) const { return QCPDataRange(mBegin+changeBegin, mEnd+changeEnd); } bool intersects(const QCPDataRange &other) const; bool contains(const QCPDataRange &other) const; private: // property members: int mBegin, mEnd; }; Q_DECLARE_TYPEINFO(QCPDataRange, Q_MOVABLE_TYPE); class QCP_LIB_DECL QCPDataSelection { public: explicit QCPDataSelection(); explicit QCPDataSelection(const QCPDataRange &range); bool operator==(const QCPDataSelection& other) const; bool operator!=(const QCPDataSelection& other) const { return !(*this == other); } QCPDataSelection &operator+=(const QCPDataSelection& other); QCPDataSelection &operator+=(const QCPDataRange& other); QCPDataSelection &operator-=(const QCPDataSelection& other); QCPDataSelection &operator-=(const QCPDataRange& other); friend inline const QCPDataSelection operator+(const QCPDataSelection& a, const QCPDataSelection& b); friend inline const QCPDataSelection operator+(const QCPDataRange& a, const QCPDataSelection& b); friend inline const QCPDataSelection operator+(const QCPDataSelection& a, const QCPDataRange& b); friend inline const QCPDataSelection operator+(const QCPDataRange& a, const QCPDataRange& b); friend inline const QCPDataSelection operator-(const QCPDataSelection& a, const QCPDataSelection& b); friend inline const QCPDataSelection operator-(const QCPDataRange& a, const QCPDataSelection& b); friend inline const QCPDataSelection operator-(const QCPDataSelection& a, const QCPDataRange& b); friend inline const QCPDataSelection operator-(const QCPDataRange& a, const QCPDataRange& b); // getters: int dataRangeCount() const { return mDataRanges.size(); } int dataPointCount() const; QCPDataRange dataRange(int index=0) const; QList dataRanges() const { return mDataRanges; } QCPDataRange span() const; // non-property methods: void addDataRange(const QCPDataRange &dataRange, bool simplify=true); void clear(); bool isEmpty() const { return mDataRanges.isEmpty(); } void simplify(); void enforceType(QCP::SelectionType type); bool contains(const QCPDataSelection &other) const; QCPDataSelection intersection(const QCPDataRange &other) const; QCPDataSelection intersection(const QCPDataSelection &other) const; QCPDataSelection inverse(const QCPDataRange &outerRange) const; private: // property members: QList mDataRanges; inline static bool lessThanDataRangeBegin(const QCPDataRange &a, const QCPDataRange &b) { return a.begin() < b.begin(); } }; Q_DECLARE_METATYPE(QCPDataSelection) /*! Return a \ref QCPDataSelection with the data points in \a a joined with the data points in \a b. The resulting data selection is already simplified (see \ref QCPDataSelection::simplify). */ inline const QCPDataSelection operator+(const QCPDataSelection& a, const QCPDataSelection& b) { QCPDataSelection result(a); result += b; return result; } /*! Return a \ref QCPDataSelection with the data points in \a a joined with the data points in \a b. The resulting data selection is already simplified (see \ref QCPDataSelection::simplify). */ inline const QCPDataSelection operator+(const QCPDataRange& a, const QCPDataSelection& b) { QCPDataSelection result(a); result += b; return result; } /*! Return a \ref QCPDataSelection with the data points in \a a joined with the data points in \a b. The resulting data selection is already simplified (see \ref QCPDataSelection::simplify). */ inline const QCPDataSelection operator+(const QCPDataSelection& a, const QCPDataRange& b) { QCPDataSelection result(a); result += b; return result; } /*! Return a \ref QCPDataSelection with the data points in \a a joined with the data points in \a b. The resulting data selection is already simplified (see \ref QCPDataSelection::simplify). */ inline const QCPDataSelection operator+(const QCPDataRange& a, const QCPDataRange& b) { QCPDataSelection result(a); result += b; return result; } /*! Return a \ref QCPDataSelection with the data points which are in \a a but not in \a b. */ inline const QCPDataSelection operator-(const QCPDataSelection& a, const QCPDataSelection& b) { QCPDataSelection result(a); result -= b; return result; } /*! Return a \ref QCPDataSelection with the data points which are in \a a but not in \a b. */ inline const QCPDataSelection operator-(const QCPDataRange& a, const QCPDataSelection& b) { QCPDataSelection result(a); result -= b; return result; } /*! Return a \ref QCPDataSelection with the data points which are in \a a but not in \a b. */ inline const QCPDataSelection operator-(const QCPDataSelection& a, const QCPDataRange& b) { QCPDataSelection result(a); result -= b; return result; } /*! Return a \ref QCPDataSelection with the data points which are in \a a but not in \a b. */ inline const QCPDataSelection operator-(const QCPDataRange& a, const QCPDataRange& b) { QCPDataSelection result(a); result -= b; return result; } /*! \relates QCPDataRange Prints \a dataRange in a human readable format to the qDebug output. */ inline QDebug operator<< (QDebug d, const QCPDataRange &dataRange) { d.nospace() << "[" << dataRange.begin() << ".." << dataRange.end()-1 << "]"; return d.space(); } /*! \relates QCPDataSelection Prints \a selection in a human readable format to the qDebug output. */ inline QDebug operator<< (QDebug d, const QCPDataSelection &selection) { d.nospace() << "QCPDataSelection("; for (int i=0; i elements(QCP::MarginSide side) const { return mChildren.value(side); } bool isEmpty() const; void clear(); protected: // non-property members: QCustomPlot *mParentPlot; QHash > mChildren; // introduced virtual methods: virtual int commonMargin(QCP::MarginSide side) const; // non-virtual methods: void addChild(QCP::MarginSide side, QCPLayoutElement *element); void removeChild(QCP::MarginSide side, QCPLayoutElement *element); private: Q_DISABLE_COPY(QCPMarginGroup) friend class QCPLayoutElement; }; class QCP_LIB_DECL QCPLayoutElement : public QCPLayerable { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QCPLayout* layout READ layout) Q_PROPERTY(QRect rect READ rect) Q_PROPERTY(QRect outerRect READ outerRect WRITE setOuterRect) Q_PROPERTY(QMargins margins READ margins WRITE setMargins) Q_PROPERTY(QMargins minimumMargins READ minimumMargins WRITE setMinimumMargins) Q_PROPERTY(QSize minimumSize READ minimumSize WRITE setMinimumSize) Q_PROPERTY(QSize maximumSize READ maximumSize WRITE setMaximumSize) Q_PROPERTY(SizeConstraintRect sizeConstraintRect READ sizeConstraintRect WRITE setSizeConstraintRect) /// \endcond public: /*! Defines the phases of the update process, that happens just before a replot. At each phase, \ref update is called with the according UpdatePhase value. */ enum UpdatePhase { upPreparation ///< Phase used for any type of preparation that needs to be done before margin calculation and layout ,upMargins ///< Phase in which the margins are calculated and set ,upLayout ///< Final phase in which the layout system places the rects of the elements }; Q_ENUMS(UpdatePhase) /*! Defines to which rect of a layout element the size constraints that can be set via \ref setMinimumSize and \ref setMaximumSize apply. The outer rect (\ref outerRect) includes the margins (e.g. in the case of a QCPAxisRect the axis labels), whereas the inner rect (\ref rect) does not. \see setSizeConstraintRect */ enum SizeConstraintRect { scrInnerRect ///< Minimum/Maximum size constraints apply to inner rect , scrOuterRect ///< Minimum/Maximum size constraints apply to outer rect, thus include layout element margins }; Q_ENUMS(SizeConstraintRect) explicit QCPLayoutElement(QCustomPlot *parentPlot=0); virtual ~QCPLayoutElement(); // getters: QCPLayout *layout() const { return mParentLayout; } QRect rect() const { return mRect; } QRect outerRect() const { return mOuterRect; } QMargins margins() const { return mMargins; } QMargins minimumMargins() const { return mMinimumMargins; } QCP::MarginSides autoMargins() const { return mAutoMargins; } QSize minimumSize() const { return mMinimumSize; } QSize maximumSize() const { return mMaximumSize; } SizeConstraintRect sizeConstraintRect() const { return mSizeConstraintRect; } QCPMarginGroup *marginGroup(QCP::MarginSide side) const { return mMarginGroups.value(side, (QCPMarginGroup*)0); } QHash marginGroups() const { return mMarginGroups; } // setters: void setOuterRect(const QRect &rect); void setMargins(const QMargins &margins); void setMinimumMargins(const QMargins &margins); void setAutoMargins(QCP::MarginSides sides); void setMinimumSize(const QSize &size); void setMinimumSize(int width, int height); void setMaximumSize(const QSize &size); void setMaximumSize(int width, int height); void setSizeConstraintRect(SizeConstraintRect constraintRect); void setMarginGroup(QCP::MarginSides sides, QCPMarginGroup *group); // introduced virtual methods: virtual void update(UpdatePhase phase); virtual QSize minimumOuterSizeHint() const; virtual QSize maximumOuterSizeHint() const; virtual QList elements(bool recursive) const; // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; protected: // property members: QCPLayout *mParentLayout; QSize mMinimumSize, mMaximumSize; SizeConstraintRect mSizeConstraintRect; QRect mRect, mOuterRect; QMargins mMargins, mMinimumMargins; QCP::MarginSides mAutoMargins; QHash mMarginGroups; // introduced virtual methods: virtual int calculateAutoMargin(QCP::MarginSide side); virtual void layoutChanged(); // reimplemented virtual methods: virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE { Q_UNUSED(painter) } virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE { Q_UNUSED(painter) } virtual void parentPlotInitialized(QCustomPlot *parentPlot) Q_DECL_OVERRIDE; private: Q_DISABLE_COPY(QCPLayoutElement) friend class QCustomPlot; friend class QCPLayout; friend class QCPMarginGroup; }; Q_DECLARE_METATYPE(QCPLayoutElement::UpdatePhase) class QCP_LIB_DECL QCPLayout : public QCPLayoutElement { Q_OBJECT public: explicit QCPLayout(); // reimplemented virtual methods: virtual void update(UpdatePhase phase) Q_DECL_OVERRIDE; virtual QList elements(bool recursive) const Q_DECL_OVERRIDE; // introduced virtual methods: virtual int elementCount() const = 0; virtual QCPLayoutElement* elementAt(int index) const = 0; virtual QCPLayoutElement* takeAt(int index) = 0; virtual bool take(QCPLayoutElement* element) = 0; virtual void simplify(); // non-virtual methods: bool removeAt(int index); bool remove(QCPLayoutElement* element); void clear(); protected: // introduced virtual methods: virtual void updateLayout(); // non-virtual methods: void sizeConstraintsChanged() const; void adoptElement(QCPLayoutElement *el); void releaseElement(QCPLayoutElement *el); QVector getSectionSizes(QVector maxSizes, QVector minSizes, QVector stretchFactors, int totalSize) const; static QSize getFinalMinimumOuterSize(const QCPLayoutElement *el); static QSize getFinalMaximumOuterSize(const QCPLayoutElement *el); private: Q_DISABLE_COPY(QCPLayout) friend class QCPLayoutElement; }; class QCP_LIB_DECL QCPLayoutGrid : public QCPLayout { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(int rowCount READ rowCount) Q_PROPERTY(int columnCount READ columnCount) Q_PROPERTY(QList columnStretchFactors READ columnStretchFactors WRITE setColumnStretchFactors) Q_PROPERTY(QList rowStretchFactors READ rowStretchFactors WRITE setRowStretchFactors) Q_PROPERTY(int columnSpacing READ columnSpacing WRITE setColumnSpacing) Q_PROPERTY(int rowSpacing READ rowSpacing WRITE setRowSpacing) Q_PROPERTY(FillOrder fillOrder READ fillOrder WRITE setFillOrder) Q_PROPERTY(int wrap READ wrap WRITE setWrap) /// \endcond public: /*! Defines in which direction the grid is filled when using \ref addElement(QCPLayoutElement*). The column/row at which wrapping into the next row/column occurs can be specified with \ref setWrap. \see setFillOrder */ enum FillOrder { foRowsFirst ///< Rows are filled first, and a new element is wrapped to the next column if the row count would exceed \ref setWrap. ,foColumnsFirst ///< Columns are filled first, and a new element is wrapped to the next row if the column count would exceed \ref setWrap. }; Q_ENUMS(FillOrder) explicit QCPLayoutGrid(); virtual ~QCPLayoutGrid(); // getters: int rowCount() const { return mElements.size(); } int columnCount() const { return mElements.size() > 0 ? mElements.first().size() : 0; } QList columnStretchFactors() const { return mColumnStretchFactors; } QList rowStretchFactors() const { return mRowStretchFactors; } int columnSpacing() const { return mColumnSpacing; } int rowSpacing() const { return mRowSpacing; } int wrap() const { return mWrap; } FillOrder fillOrder() const { return mFillOrder; } // setters: void setColumnStretchFactor(int column, double factor); void setColumnStretchFactors(const QList &factors); void setRowStretchFactor(int row, double factor); void setRowStretchFactors(const QList &factors); void setColumnSpacing(int pixels); void setRowSpacing(int pixels); void setWrap(int count); void setFillOrder(FillOrder order, bool rearrange=true); // reimplemented virtual methods: virtual void updateLayout() Q_DECL_OVERRIDE; virtual int elementCount() const Q_DECL_OVERRIDE { return rowCount()*columnCount(); } virtual QCPLayoutElement* elementAt(int index) const Q_DECL_OVERRIDE; virtual QCPLayoutElement* takeAt(int index) Q_DECL_OVERRIDE; virtual bool take(QCPLayoutElement* element) Q_DECL_OVERRIDE; virtual QList elements(bool recursive) const Q_DECL_OVERRIDE; virtual void simplify() Q_DECL_OVERRIDE; virtual QSize minimumOuterSizeHint() const Q_DECL_OVERRIDE; virtual QSize maximumOuterSizeHint() const Q_DECL_OVERRIDE; // non-virtual methods: QCPLayoutElement *element(int row, int column) const; bool addElement(int row, int column, QCPLayoutElement *element); bool addElement(QCPLayoutElement *element); bool hasElement(int row, int column); void expandTo(int newRowCount, int newColumnCount); void insertRow(int newIndex); void insertColumn(int newIndex); int rowColToIndex(int row, int column) const; void indexToRowCol(int index, int &row, int &column) const; protected: // property members: QList > mElements; QList mColumnStretchFactors; QList mRowStretchFactors; int mColumnSpacing, mRowSpacing; int mWrap; FillOrder mFillOrder; // non-virtual methods: void getMinimumRowColSizes(QVector *minColWidths, QVector *minRowHeights) const; void getMaximumRowColSizes(QVector *maxColWidths, QVector *maxRowHeights) const; private: Q_DISABLE_COPY(QCPLayoutGrid) }; Q_DECLARE_METATYPE(QCPLayoutGrid::FillOrder) class QCP_LIB_DECL QCPLayoutInset : public QCPLayout { Q_OBJECT public: /*! Defines how the placement and sizing is handled for a certain element in a QCPLayoutInset. */ enum InsetPlacement { ipFree ///< The element may be positioned/sized arbitrarily, see \ref setInsetRect ,ipBorderAligned ///< The element is aligned to one of the layout sides, see \ref setInsetAlignment }; Q_ENUMS(InsetPlacement) explicit QCPLayoutInset(); virtual ~QCPLayoutInset(); // getters: InsetPlacement insetPlacement(int index) const; Qt::Alignment insetAlignment(int index) const; QRectF insetRect(int index) const; // setters: void setInsetPlacement(int index, InsetPlacement placement); void setInsetAlignment(int index, Qt::Alignment alignment); void setInsetRect(int index, const QRectF &rect); // reimplemented virtual methods: virtual void updateLayout() Q_DECL_OVERRIDE; virtual int elementCount() const Q_DECL_OVERRIDE; virtual QCPLayoutElement* elementAt(int index) const Q_DECL_OVERRIDE; virtual QCPLayoutElement* takeAt(int index) Q_DECL_OVERRIDE; virtual bool take(QCPLayoutElement* element) Q_DECL_OVERRIDE; virtual void simplify() Q_DECL_OVERRIDE {} virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; // non-virtual methods: void addElement(QCPLayoutElement *element, Qt::Alignment alignment); void addElement(QCPLayoutElement *element, const QRectF &rect); protected: // property members: QList mElements; QList mInsetPlacement; QList mInsetAlignment; QList mInsetRect; private: Q_DISABLE_COPY(QCPLayoutInset) }; Q_DECLARE_METATYPE(QCPLayoutInset::InsetPlacement) /* end of 'src/layout.h' */ /* including file 'src/lineending.h', size 4426 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPLineEnding { Q_GADGET public: /*! Defines the type of ending decoration for line-like items, e.g. an arrow. \image html QCPLineEnding.png The width and length of these decorations can be controlled with the functions \ref setWidth and \ref setLength. Some decorations like \ref esDisc, \ref esSquare, \ref esDiamond and \ref esBar only support a width, the length property is ignored. \see QCPItemLine::setHead, QCPItemLine::setTail, QCPItemCurve::setHead, QCPItemCurve::setTail, QCPAxis::setLowerEnding, QCPAxis::setUpperEnding */ enum EndingStyle { esNone ///< No ending decoration ,esFlatArrow ///< A filled arrow head with a straight/flat back (a triangle) ,esSpikeArrow ///< A filled arrow head with an indented back ,esLineArrow ///< A non-filled arrow head with open back ,esDisc ///< A filled circle ,esSquare ///< A filled square ,esDiamond ///< A filled diamond (45 degrees rotated square) ,esBar ///< A bar perpendicular to the line ,esHalfBar ///< A bar perpendicular to the line, pointing out to only one side (to which side can be changed with \ref setInverted) ,esSkewedBar ///< A bar that is skewed (skew controllable via \ref setLength) }; Q_ENUMS(EndingStyle) QCPLineEnding(); QCPLineEnding(EndingStyle style, double width=8, double length=10, bool inverted=false); // getters: EndingStyle style() const { return mStyle; } double width() const { return mWidth; } double length() const { return mLength; } bool inverted() const { return mInverted; } // setters: void setStyle(EndingStyle style); void setWidth(double width); void setLength(double length); void setInverted(bool inverted); // non-property methods: double boundingDistance() const; double realLength() const; void draw(QCPPainter *painter, const QCPVector2D &pos, const QCPVector2D &dir) const; void draw(QCPPainter *painter, const QCPVector2D &pos, double angle) const; protected: // property members: EndingStyle mStyle; double mWidth, mLength; bool mInverted; }; Q_DECLARE_TYPEINFO(QCPLineEnding, Q_MOVABLE_TYPE); Q_DECLARE_METATYPE(QCPLineEnding::EndingStyle) /* end of 'src/lineending.h' */ /* including file 'src/axis/axisticker.h', size 4177 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAxisTicker { Q_GADGET public: /*! Defines the strategies that the axis ticker may follow when choosing the size of the tick step. \see setTickStepStrategy */ enum TickStepStrategy { tssReadability ///< A nicely readable tick step is prioritized over matching the requested number of ticks (see \ref setTickCount) ,tssMeetTickCount ///< Less readable tick steps are allowed which in turn facilitates getting closer to the requested tick count }; Q_ENUMS(TickStepStrategy) QCPAxisTicker(); virtual ~QCPAxisTicker(); // getters: TickStepStrategy tickStepStrategy() const { return mTickStepStrategy; } int tickCount() const { return mTickCount; } double tickOrigin() const { return mTickOrigin; } // setters: void setTickStepStrategy(TickStepStrategy strategy); void setTickCount(int count); void setTickOrigin(double origin); // introduced virtual methods: virtual void generate(const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector &ticks, QVector *subTicks, QVector *tickLabels); protected: // property members: TickStepStrategy mTickStepStrategy; int mTickCount; double mTickOrigin; // introduced virtual methods: virtual double getTickStep(const QCPRange &range); virtual int getSubTickCount(double tickStep); virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision); virtual QVector createTickVector(double tickStep, const QCPRange &range); virtual QVector createSubTickVector(int subTickCount, const QVector &ticks); virtual QVector createLabelVector(const QVector &ticks, const QLocale &locale, QChar formatChar, int precision); // non-virtual methods: void trimTicks(const QCPRange &range, QVector &ticks, bool keepOneOutlier) const; double pickClosest(double target, const QVector &candidates) const; double getMantissa(double input, double *magnitude=0) const; double cleanMantissa(double input) const; }; Q_DECLARE_METATYPE(QCPAxisTicker::TickStepStrategy) Q_DECLARE_METATYPE(QSharedPointer) /* end of 'src/axis/axisticker.h' */ /* including file 'src/axis/axistickerdatetime.h', size 3289 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAxisTickerDateTime : public QCPAxisTicker { public: QCPAxisTickerDateTime(); // getters: QString dateTimeFormat() const { return mDateTimeFormat; } Qt::TimeSpec dateTimeSpec() const { return mDateTimeSpec; } // setters: void setDateTimeFormat(const QString &format); void setDateTimeSpec(Qt::TimeSpec spec); void setTickOrigin(double origin); // hides base class method but calls baseclass implementation ("using" throws off IDEs and doxygen) void setTickOrigin(const QDateTime &origin); // static methods: static QDateTime keyToDateTime(double key); static double dateTimeToKey(const QDateTime dateTime); static double dateTimeToKey(const QDate date); protected: // property members: QString mDateTimeFormat; Qt::TimeSpec mDateTimeSpec; // non-property members: enum DateStrategy {dsNone, dsUniformTimeInDay, dsUniformDayInMonth} mDateStrategy; // reimplemented virtual methods: virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE; virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE; virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE; virtual QVector createTickVector(double tickStep, const QCPRange &range) Q_DECL_OVERRIDE; }; /* end of 'src/axis/axistickerdatetime.h' */ /* including file 'src/axis/axistickertime.h', size 3542 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAxisTickerTime : public QCPAxisTicker { Q_GADGET public: /*! Defines the logical units in which fractions of time spans can be expressed. \see setFieldWidth, setTimeFormat */ enum TimeUnit { tuMilliseconds ///< Milliseconds, one thousandth of a second (%%z in \ref setTimeFormat) ,tuSeconds ///< Seconds (%%s in \ref setTimeFormat) ,tuMinutes ///< Minutes (%%m in \ref setTimeFormat) ,tuHours ///< Hours (%%h in \ref setTimeFormat) ,tuDays ///< Days (%%d in \ref setTimeFormat) }; Q_ENUMS(TimeUnit) QCPAxisTickerTime(); // getters: QString timeFormat() const { return mTimeFormat; } int fieldWidth(TimeUnit unit) const { return mFieldWidth.value(unit); } // setters: void setTimeFormat(const QString &format); void setFieldWidth(TimeUnit unit, int width); protected: // property members: QString mTimeFormat; QHash mFieldWidth; // non-property members: TimeUnit mSmallestUnit, mBiggestUnit; QHash mFormatPattern; // reimplemented virtual methods: virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE; virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE; virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE; // non-virtual methods: void replaceUnit(QString &text, TimeUnit unit, int value) const; }; Q_DECLARE_METATYPE(QCPAxisTickerTime::TimeUnit) /* end of 'src/axis/axistickertime.h' */ /* including file 'src/axis/axistickerfixed.h', size 3308 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAxisTickerFixed : public QCPAxisTicker { Q_GADGET public: /*! Defines how the axis ticker may modify the specified tick step (\ref setTickStep) in order to control the number of ticks in the axis range. \see setScaleStrategy */ enum ScaleStrategy { ssNone ///< Modifications are not allowed, the specified tick step is absolutely fixed. This might cause a high tick density and overlapping labels if the axis range is zoomed out. ,ssMultiples ///< An integer multiple of the specified tick step is allowed. The used factor follows the base class properties of \ref setTickStepStrategy and \ref setTickCount. ,ssPowers ///< An integer power of the specified tick step is allowed. }; Q_ENUMS(ScaleStrategy) QCPAxisTickerFixed(); // getters: double tickStep() const { return mTickStep; } ScaleStrategy scaleStrategy() const { return mScaleStrategy; } // setters: void setTickStep(double step); void setScaleStrategy(ScaleStrategy strategy); protected: // property members: double mTickStep; ScaleStrategy mScaleStrategy; // reimplemented virtual methods: virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE; }; Q_DECLARE_METATYPE(QCPAxisTickerFixed::ScaleStrategy) /* end of 'src/axis/axistickerfixed.h' */ /* including file 'src/axis/axistickertext.h', size 3085 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAxisTickerText : public QCPAxisTicker { public: QCPAxisTickerText(); // getters: QMap &ticks() { return mTicks; } int subTickCount() const { return mSubTickCount; } // setters: void setTicks(const QMap &ticks); void setTicks(const QVector &positions, const QVector labels); void setSubTickCount(int subTicks); // non-virtual methods: void clear(); void addTick(double position, QString label); void addTicks(const QMap &ticks); void addTicks(const QVector &positions, const QVector &labels); protected: // property members: QMap mTicks; int mSubTickCount; // reimplemented virtual methods: virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE; virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE; virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE; virtual QVector createTickVector(double tickStep, const QCPRange &range) Q_DECL_OVERRIDE; }; /* end of 'src/axis/axistickertext.h' */ /* including file 'src/axis/axistickerpi.h', size 3911 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAxisTickerPi : public QCPAxisTicker { Q_GADGET public: /*! Defines how fractions should be displayed in tick labels. \see setFractionStyle */ enum FractionStyle { fsFloatingPoint ///< Fractions are displayed as regular decimal floating point numbers, e.g. "0.25" or "0.125". ,fsAsciiFractions ///< Fractions are written as rationals using ASCII characters only, e.g. "1/4" or "1/8" ,fsUnicodeFractions ///< Fractions are written using sub- and superscript UTF-8 digits and the fraction symbol. }; Q_ENUMS(FractionStyle) QCPAxisTickerPi(); // getters: QString piSymbol() const { return mPiSymbol; } double piValue() const { return mPiValue; } bool periodicity() const { return mPeriodicity; } FractionStyle fractionStyle() const { return mFractionStyle; } // setters: void setPiSymbol(QString symbol); void setPiValue(double pi); void setPeriodicity(int multiplesOfPi); void setFractionStyle(FractionStyle style); protected: // property members: QString mPiSymbol; double mPiValue; int mPeriodicity; FractionStyle mFractionStyle; // non-property members: double mPiTickStep; // size of one tick step in units of mPiValue // reimplemented virtual methods: virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE; virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE; virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE; // non-virtual methods: void simplifyFraction(int &numerator, int &denominator) const; QString fractionToString(int numerator, int denominator) const; QString unicodeFraction(int numerator, int denominator) const; QString unicodeSuperscript(int number) const; QString unicodeSubscript(int number) const; }; Q_DECLARE_METATYPE(QCPAxisTickerPi::FractionStyle) /* end of 'src/axis/axistickerpi.h' */ /* including file 'src/axis/axistickerlog.h', size 2663 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAxisTickerLog : public QCPAxisTicker { public: QCPAxisTickerLog(); // getters: double logBase() const { return mLogBase; } int subTickCount() const { return mSubTickCount; } // setters: void setLogBase(double base); void setSubTickCount(int subTicks); protected: // property members: double mLogBase; int mSubTickCount; // non-property members: double mLogBaseLnInv; // reimplemented virtual methods: virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE; virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE; virtual QVector createTickVector(double tickStep, const QCPRange &range) Q_DECL_OVERRIDE; }; /* end of 'src/axis/axistickerlog.h' */ /* including file 'src/axis/axis.h', size 20634 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPGrid :public QCPLayerable { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(bool subGridVisible READ subGridVisible WRITE setSubGridVisible) Q_PROPERTY(bool antialiasedSubGrid READ antialiasedSubGrid WRITE setAntialiasedSubGrid) Q_PROPERTY(bool antialiasedZeroLine READ antialiasedZeroLine WRITE setAntialiasedZeroLine) Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen subGridPen READ subGridPen WRITE setSubGridPen) Q_PROPERTY(QPen zeroLinePen READ zeroLinePen WRITE setZeroLinePen) /// \endcond public: explicit QCPGrid(QCPAxis *parentAxis); // getters: bool subGridVisible() const { return mSubGridVisible; } bool antialiasedSubGrid() const { return mAntialiasedSubGrid; } bool antialiasedZeroLine() const { return mAntialiasedZeroLine; } QPen pen() const { return mPen; } QPen subGridPen() const { return mSubGridPen; } QPen zeroLinePen() const { return mZeroLinePen; } // setters: void setSubGridVisible(bool visible); void setAntialiasedSubGrid(bool enabled); void setAntialiasedZeroLine(bool enabled); void setPen(const QPen &pen); void setSubGridPen(const QPen &pen); void setZeroLinePen(const QPen &pen); protected: // property members: bool mSubGridVisible; bool mAntialiasedSubGrid, mAntialiasedZeroLine; QPen mPen, mSubGridPen, mZeroLinePen; // non-property members: QCPAxis *mParentAxis; // reimplemented virtual methods: virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; // non-virtual methods: void drawGridLines(QCPPainter *painter) const; void drawSubGridLines(QCPPainter *painter) const; friend class QCPAxis; }; class QCP_LIB_DECL QCPAxis : public QCPLayerable { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(AxisType axisType READ axisType) Q_PROPERTY(QCPAxisRect* axisRect READ axisRect) Q_PROPERTY(ScaleType scaleType READ scaleType WRITE setScaleType NOTIFY scaleTypeChanged) Q_PROPERTY(QCPRange range READ range WRITE setRange NOTIFY rangeChanged) Q_PROPERTY(bool rangeReversed READ rangeReversed WRITE setRangeReversed) Q_PROPERTY(QSharedPointer ticker READ ticker WRITE setTicker) Q_PROPERTY(bool ticks READ ticks WRITE setTicks) Q_PROPERTY(bool tickLabels READ tickLabels WRITE setTickLabels) Q_PROPERTY(int tickLabelPadding READ tickLabelPadding WRITE setTickLabelPadding) Q_PROPERTY(QFont tickLabelFont READ tickLabelFont WRITE setTickLabelFont) Q_PROPERTY(QColor tickLabelColor READ tickLabelColor WRITE setTickLabelColor) Q_PROPERTY(double tickLabelRotation READ tickLabelRotation WRITE setTickLabelRotation) Q_PROPERTY(LabelSide tickLabelSide READ tickLabelSide WRITE setTickLabelSide) Q_PROPERTY(QString numberFormat READ numberFormat WRITE setNumberFormat) Q_PROPERTY(int numberPrecision READ numberPrecision WRITE setNumberPrecision) Q_PROPERTY(QVector tickVector READ tickVector) Q_PROPERTY(QVector tickVectorLabels READ tickVectorLabels) Q_PROPERTY(int tickLengthIn READ tickLengthIn WRITE setTickLengthIn) Q_PROPERTY(int tickLengthOut READ tickLengthOut WRITE setTickLengthOut) Q_PROPERTY(bool subTicks READ subTicks WRITE setSubTicks) Q_PROPERTY(int subTickLengthIn READ subTickLengthIn WRITE setSubTickLengthIn) Q_PROPERTY(int subTickLengthOut READ subTickLengthOut WRITE setSubTickLengthOut) Q_PROPERTY(QPen basePen READ basePen WRITE setBasePen) Q_PROPERTY(QPen tickPen READ tickPen WRITE setTickPen) Q_PROPERTY(QPen subTickPen READ subTickPen WRITE setSubTickPen) Q_PROPERTY(QFont labelFont READ labelFont WRITE setLabelFont) Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor) Q_PROPERTY(QString label READ label WRITE setLabel) Q_PROPERTY(int labelPadding READ labelPadding WRITE setLabelPadding) Q_PROPERTY(int padding READ padding WRITE setPadding) Q_PROPERTY(int offset READ offset WRITE setOffset) Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE setSelectedParts NOTIFY selectionChanged) Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE setSelectableParts NOTIFY selectableChanged) Q_PROPERTY(QFont selectedTickLabelFont READ selectedTickLabelFont WRITE setSelectedTickLabelFont) Q_PROPERTY(QFont selectedLabelFont READ selectedLabelFont WRITE setSelectedLabelFont) Q_PROPERTY(QColor selectedTickLabelColor READ selectedTickLabelColor WRITE setSelectedTickLabelColor) Q_PROPERTY(QColor selectedLabelColor READ selectedLabelColor WRITE setSelectedLabelColor) Q_PROPERTY(QPen selectedBasePen READ selectedBasePen WRITE setSelectedBasePen) Q_PROPERTY(QPen selectedTickPen READ selectedTickPen WRITE setSelectedTickPen) Q_PROPERTY(QPen selectedSubTickPen READ selectedSubTickPen WRITE setSelectedSubTickPen) Q_PROPERTY(QCPLineEnding lowerEnding READ lowerEnding WRITE setLowerEnding) Q_PROPERTY(QCPLineEnding upperEnding READ upperEnding WRITE setUpperEnding) Q_PROPERTY(QCPGrid* grid READ grid) /// \endcond public: /*! Defines at which side of the axis rect the axis will appear. This also affects how the tick marks are drawn, on which side the labels are placed etc. */ enum AxisType { atLeft = 0x01 ///< 0x01 Axis is vertical and on the left side of the axis rect ,atRight = 0x02 ///< 0x02 Axis is vertical and on the right side of the axis rect ,atTop = 0x04 ///< 0x04 Axis is horizontal and on the top side of the axis rect ,atBottom = 0x08 ///< 0x08 Axis is horizontal and on the bottom side of the axis rect }; Q_ENUMS(AxisType) Q_FLAGS(AxisTypes) Q_DECLARE_FLAGS(AxisTypes, AxisType) /*! Defines on which side of the axis the tick labels (numbers) shall appear. \see setTickLabelSide */ enum LabelSide { lsInside ///< Tick labels will be displayed inside the axis rect and clipped to the inner axis rect ,lsOutside ///< Tick labels will be displayed outside the axis rect }; Q_ENUMS(LabelSide) /*! Defines the scale of an axis. \see setScaleType */ enum ScaleType { stLinear ///< Linear scaling ,stLogarithmic ///< Logarithmic scaling with correspondingly transformed axis coordinates (possibly also \ref setTicker to a \ref QCPAxisTickerLog instance). }; Q_ENUMS(ScaleType) /*! Defines the selectable parts of an axis. \see setSelectableParts, setSelectedParts */ enum SelectablePart { spNone = 0 ///< None of the selectable parts ,spAxis = 0x001 ///< The axis backbone and tick marks ,spTickLabels = 0x002 ///< Tick labels (numbers) of this axis (as a whole, not individually) ,spAxisLabel = 0x004 ///< The axis label }; Q_ENUMS(SelectablePart) Q_FLAGS(SelectableParts) Q_DECLARE_FLAGS(SelectableParts, SelectablePart) explicit QCPAxis(QCPAxisRect *parent, AxisType type); virtual ~QCPAxis(); // getters: AxisType axisType() const { return mAxisType; } QCPAxisRect *axisRect() const { return mAxisRect; } ScaleType scaleType() const { return mScaleType; } const QCPRange range() const { return mRange; } bool rangeReversed() const { return mRangeReversed; } QSharedPointer ticker() const { return mTicker; } bool ticks() const { return mTicks; } bool tickLabels() const { return mTickLabels; } int tickLabelPadding() const; QFont tickLabelFont() const { return mTickLabelFont; } QColor tickLabelColor() const { return mTickLabelColor; } double tickLabelRotation() const; LabelSide tickLabelSide() const; QString numberFormat() const; int numberPrecision() const { return mNumberPrecision; } QVector tickVector() const { return mTickVector; } QVector tickVectorLabels() const { return mTickVectorLabels; } int tickLengthIn() const; int tickLengthOut() const; bool subTicks() const { return mSubTicks; } int subTickLengthIn() const; int subTickLengthOut() const; QPen basePen() const { return mBasePen; } QPen tickPen() const { return mTickPen; } QPen subTickPen() const { return mSubTickPen; } QFont labelFont() const { return mLabelFont; } QColor labelColor() const { return mLabelColor; } QString label() const { return mLabel; } int labelPadding() const; int padding() const { return mPadding; } int offset() const; SelectableParts selectedParts() const { return mSelectedParts; } SelectableParts selectableParts() const { return mSelectableParts; } QFont selectedTickLabelFont() const { return mSelectedTickLabelFont; } QFont selectedLabelFont() const { return mSelectedLabelFont; } QColor selectedTickLabelColor() const { return mSelectedTickLabelColor; } QColor selectedLabelColor() const { return mSelectedLabelColor; } QPen selectedBasePen() const { return mSelectedBasePen; } QPen selectedTickPen() const { return mSelectedTickPen; } QPen selectedSubTickPen() const { return mSelectedSubTickPen; } QCPLineEnding lowerEnding() const; QCPLineEnding upperEnding() const; QCPGrid *grid() const { return mGrid; } // setters: Q_SLOT void setScaleType(QCPAxis::ScaleType type); Q_SLOT void setRange(const QCPRange &range); void setRange(double lower, double upper); void setRange(double position, double size, Qt::AlignmentFlag alignment); void setRangeLower(double lower); void setRangeUpper(double upper); void setRangeReversed(bool reversed); void setTicker(QSharedPointer ticker); void setTicks(bool show); void setTickLabels(bool show); void setTickLabelPadding(int padding); void setTickLabelFont(const QFont &font); void setTickLabelColor(const QColor &color); void setTickLabelRotation(double degrees); void setTickLabelSide(LabelSide side); void setNumberFormat(const QString &formatCode); void setNumberPrecision(int precision); void setTickLength(int inside, int outside=0); void setTickLengthIn(int inside); void setTickLengthOut(int outside); void setSubTicks(bool show); void setSubTickLength(int inside, int outside=0); void setSubTickLengthIn(int inside); void setSubTickLengthOut(int outside); void setBasePen(const QPen &pen); void setTickPen(const QPen &pen); void setSubTickPen(const QPen &pen); void setLabelFont(const QFont &font); void setLabelColor(const QColor &color); void setLabel(const QString &str); void setLabelPadding(int padding); void setPadding(int padding); void setOffset(int offset); void setSelectedTickLabelFont(const QFont &font); void setSelectedLabelFont(const QFont &font); void setSelectedTickLabelColor(const QColor &color); void setSelectedLabelColor(const QColor &color); void setSelectedBasePen(const QPen &pen); void setSelectedTickPen(const QPen &pen); void setSelectedSubTickPen(const QPen &pen); Q_SLOT void setSelectableParts(const QCPAxis::SelectableParts &selectableParts); Q_SLOT void setSelectedParts(const QCPAxis::SelectableParts &selectedParts); void setLowerEnding(const QCPLineEnding &ending); void setUpperEnding(const QCPLineEnding &ending); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; // non-property methods: Qt::Orientation orientation() const { return mOrientation; } int pixelOrientation() const { return rangeReversed() != (orientation()==Qt::Vertical) ? -1 : 1; } void moveRange(double diff); void scaleRange(double factor); void scaleRange(double factor, double center); void setScaleRatio(const QCPAxis *otherAxis, double ratio=1.0); void rescale(bool onlyVisiblePlottables=false); double pixelToCoord(double value) const; double coordToPixel(double value) const; SelectablePart getPartAt(const QPointF &pos) const; QList plottables() const; QList graphs() const; QList items() const; static AxisType marginSideToAxisType(QCP::MarginSide side); static Qt::Orientation orientation(AxisType type) { return type==atBottom||type==atTop ? Qt::Horizontal : Qt::Vertical; } static AxisType opposite(AxisType type); signals: void rangeChanged(const QCPRange &newRange); void rangeChanged(const QCPRange &newRange, const QCPRange &oldRange); void scaleTypeChanged(QCPAxis::ScaleType scaleType); void selectionChanged(const QCPAxis::SelectableParts &parts); void selectableChanged(const QCPAxis::SelectableParts &parts); protected: // property members: // axis base: AxisType mAxisType; QCPAxisRect *mAxisRect; //int mOffset; // in QCPAxisPainter int mPadding; Qt::Orientation mOrientation; SelectableParts mSelectableParts, mSelectedParts; QPen mBasePen, mSelectedBasePen; //QCPLineEnding mLowerEnding, mUpperEnding; // in QCPAxisPainter // axis label: //int mLabelPadding; // in QCPAxisPainter QString mLabel; QFont mLabelFont, mSelectedLabelFont; QColor mLabelColor, mSelectedLabelColor; // tick labels: //int mTickLabelPadding; // in QCPAxisPainter bool mTickLabels; //double mTickLabelRotation; // in QCPAxisPainter QFont mTickLabelFont, mSelectedTickLabelFont; QColor mTickLabelColor, mSelectedTickLabelColor; int mNumberPrecision; QLatin1Char mNumberFormatChar; bool mNumberBeautifulPowers; //bool mNumberMultiplyCross; // QCPAxisPainter // ticks and subticks: bool mTicks; bool mSubTicks; //int mTickLengthIn, mTickLengthOut, mSubTickLengthIn, mSubTickLengthOut; // QCPAxisPainter QPen mTickPen, mSelectedTickPen; QPen mSubTickPen, mSelectedSubTickPen; // scale and range: QCPRange mRange; bool mRangeReversed; ScaleType mScaleType; // non-property members: QCPGrid *mGrid; QCPAxisPainterPrivate *mAxisPainter; QSharedPointer mTicker; QVector mTickVector; QVector mTickVectorLabels; QVector mSubTickVector; bool mCachedMarginValid; int mCachedMargin; bool mDragging; QCPRange mDragStartRange; QCP::AntialiasedElements mAADragBackup, mNotAADragBackup; // introduced virtual methods: virtual int calculateMargin(); // reimplemented virtual methods: virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual QCP::Interaction selectionCategory() const Q_DECL_OVERRIDE; // events: virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE; virtual void deselectEvent(bool *selectionStateChanged) Q_DECL_OVERRIDE; // mouse events: virtual void mousePressEvent(QMouseEvent *event, const QVariant &details); virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos); virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos); virtual void wheelEvent(QWheelEvent *event); // non-virtual methods: void setupTickVectors(); QPen getBasePen() const; QPen getTickPen() const; QPen getSubTickPen() const; QFont getTickLabelFont() const; QFont getLabelFont() const; QColor getTickLabelColor() const; QColor getLabelColor() const; private: Q_DISABLE_COPY(QCPAxis) friend class QCustomPlot; friend class QCPGrid; friend class QCPAxisRect; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QCPAxis::SelectableParts) Q_DECLARE_OPERATORS_FOR_FLAGS(QCPAxis::AxisTypes) Q_DECLARE_METATYPE(QCPAxis::AxisType) Q_DECLARE_METATYPE(QCPAxis::LabelSide) Q_DECLARE_METATYPE(QCPAxis::ScaleType) Q_DECLARE_METATYPE(QCPAxis::SelectablePart) class QCPAxisPainterPrivate { public: explicit QCPAxisPainterPrivate(QCustomPlot *parentPlot); virtual ~QCPAxisPainterPrivate(); virtual void draw(QCPPainter *painter); virtual int size() const; void clearCache(); QRect axisSelectionBox() const { return mAxisSelectionBox; } QRect tickLabelsSelectionBox() const { return mTickLabelsSelectionBox; } QRect labelSelectionBox() const { return mLabelSelectionBox; } // public property members: QCPAxis::AxisType type; QPen basePen; QCPLineEnding lowerEnding, upperEnding; // directly accessed by QCPAxis setters/getters int labelPadding; // directly accessed by QCPAxis setters/getters QFont labelFont; QColor labelColor; QString label; int tickLabelPadding; // directly accessed by QCPAxis setters/getters double tickLabelRotation; // directly accessed by QCPAxis setters/getters QCPAxis::LabelSide tickLabelSide; // directly accessed by QCPAxis setters/getters bool substituteExponent; bool numberMultiplyCross; // directly accessed by QCPAxis setters/getters int tickLengthIn, tickLengthOut, subTickLengthIn, subTickLengthOut; // directly accessed by QCPAxis setters/getters QPen tickPen, subTickPen; QFont tickLabelFont; QColor tickLabelColor; QRect axisRect, viewportRect; double offset; // directly accessed by QCPAxis setters/getters bool abbreviateDecimalPowers; bool reversedEndings; QVector subTickPositions; QVector tickPositions; QVector tickLabels; protected: struct CachedLabel { QPointF offset; QPixmap pixmap; }; struct TickLabelData { QString basePart, expPart, suffixPart; QRect baseBounds, expBounds, suffixBounds, totalBounds, rotatedTotalBounds; QFont baseFont, expFont; }; QCustomPlot *mParentPlot; QByteArray mLabelParameterHash; // to determine whether mLabelCache needs to be cleared due to changed parameters QCache mLabelCache; QRect mAxisSelectionBox, mTickLabelsSelectionBox, mLabelSelectionBox; virtual QByteArray generateLabelParameterHash() const; virtual void placeTickLabel(QCPPainter *painter, double position, int distanceToAxis, const QString &text, QSize *tickLabelsSize); virtual void drawTickLabel(QCPPainter *painter, double x, double y, const TickLabelData &labelData) const; virtual TickLabelData getTickLabelData(const QFont &font, const QString &text) const; virtual QPointF getTickLabelDrawOffset(const TickLabelData &labelData) const; virtual void getMaxTickLabelSize(const QFont &font, const QString &text, QSize *tickLabelsSize) const; }; /* end of 'src/axis/axis.h' */ /* including file 'src/scatterstyle.h', size 7275 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPScatterStyle { Q_GADGET public: /*! Represents the various properties of a scatter style instance. For example, this enum is used to specify which properties of \ref QCPSelectionDecorator::setScatterStyle will be used when highlighting selected data points. Specific scatter properties can be transferred between \ref QCPScatterStyle instances via \ref setFromOther. */ enum ScatterProperty { spNone = 0x00 ///< 0x00 None ,spPen = 0x01 ///< 0x01 The pen property, see \ref setPen ,spBrush = 0x02 ///< 0x02 The brush property, see \ref setBrush ,spSize = 0x04 ///< 0x04 The size property, see \ref setSize ,spShape = 0x08 ///< 0x08 The shape property, see \ref setShape ,spAll = 0xFF ///< 0xFF All properties }; Q_ENUMS(ScatterProperty) Q_FLAGS(ScatterProperties) Q_DECLARE_FLAGS(ScatterProperties, ScatterProperty) /*! Defines the shape used for scatter points. On plottables/items that draw scatters, the sizes of these visualizations (with exception of \ref ssDot and \ref ssPixmap) can be controlled with the \ref setSize function. Scatters are drawn with the pen and brush specified with \ref setPen and \ref setBrush. */ enum ScatterShape { ssNone ///< no scatter symbols are drawn (e.g. in QCPGraph, data only represented with lines) ,ssDot ///< \enumimage{ssDot.png} a single pixel (use \ref ssDisc or \ref ssCircle if you want a round shape with a certain radius) ,ssCross ///< \enumimage{ssCross.png} a cross ,ssPlus ///< \enumimage{ssPlus.png} a plus ,ssCircle ///< \enumimage{ssCircle.png} a circle ,ssDisc ///< \enumimage{ssDisc.png} a circle which is filled with the pen's color (not the brush as with ssCircle) ,ssSquare ///< \enumimage{ssSquare.png} a square ,ssDiamond ///< \enumimage{ssDiamond.png} a diamond ,ssStar ///< \enumimage{ssStar.png} a star with eight arms, i.e. a combination of cross and plus ,ssTriangle ///< \enumimage{ssTriangle.png} an equilateral triangle, standing on baseline ,ssTriangleInverted ///< \enumimage{ssTriangleInverted.png} an equilateral triangle, standing on corner ,ssCrossSquare ///< \enumimage{ssCrossSquare.png} a square with a cross inside ,ssPlusSquare ///< \enumimage{ssPlusSquare.png} a square with a plus inside ,ssCrossCircle ///< \enumimage{ssCrossCircle.png} a circle with a cross inside ,ssPlusCircle ///< \enumimage{ssPlusCircle.png} a circle with a plus inside ,ssPeace ///< \enumimage{ssPeace.png} a circle, with one vertical and two downward diagonal lines ,ssPixmap ///< a custom pixmap specified by \ref setPixmap, centered on the data point coordinates ,ssCustom ///< custom painter operations are performed per scatter (As QPainterPath, see \ref setCustomPath) }; Q_ENUMS(ScatterShape) QCPScatterStyle(); QCPScatterStyle(ScatterShape shape, double size=6); QCPScatterStyle(ScatterShape shape, const QColor &color, double size); QCPScatterStyle(ScatterShape shape, const QColor &color, const QColor &fill, double size); QCPScatterStyle(ScatterShape shape, const QPen &pen, const QBrush &brush, double size); QCPScatterStyle(const QPixmap &pixmap); QCPScatterStyle(const QPainterPath &customPath, const QPen &pen, const QBrush &brush=Qt::NoBrush, double size=6); // getters: double size() const { return mSize; } ScatterShape shape() const { return mShape; } QPen pen() const { return mPen; } QBrush brush() const { return mBrush; } QPixmap pixmap() const { return mPixmap; } QPainterPath customPath() const { return mCustomPath; } // setters: void setFromOther(const QCPScatterStyle &other, ScatterProperties properties); void setSize(double size); void setShape(ScatterShape shape); void setPen(const QPen &pen); void setBrush(const QBrush &brush); void setPixmap(const QPixmap &pixmap); void setCustomPath(const QPainterPath &customPath); // non-property methods: bool isNone() const { return mShape == ssNone; } bool isPenDefined() const { return mPenDefined; } void undefinePen(); void applyTo(QCPPainter *painter, const QPen &defaultPen) const; void drawShape(QCPPainter *painter, const QPointF &pos) const; void drawShape(QCPPainter *painter, double x, double y) const; protected: // property members: double mSize; ScatterShape mShape; QPen mPen; QBrush mBrush; QPixmap mPixmap; QPainterPath mCustomPath; // non-property members: bool mPenDefined; }; Q_DECLARE_TYPEINFO(QCPScatterStyle, Q_MOVABLE_TYPE); Q_DECLARE_OPERATORS_FOR_FLAGS(QCPScatterStyle::ScatterProperties) Q_DECLARE_METATYPE(QCPScatterStyle::ScatterProperty) Q_DECLARE_METATYPE(QCPScatterStyle::ScatterShape) /* end of 'src/scatterstyle.h' */ /* including file 'src/datacontainer.h', size 4596 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ /*! \relates QCPDataContainer Returns whether the sort key of \a a is less than the sort key of \a b. \see QCPDataContainer::sort */ template inline bool qcpLessThanSortKey(const DataType &a, const DataType &b) { return a.sortKey() < b.sortKey(); } template class QCPDataContainer // no QCP_LIB_DECL, template class ends up in header (cpp included below) { public: typedef typename QVector::const_iterator const_iterator; typedef typename QVector::iterator iterator; QCPDataContainer(); // getters: int size() const { return mData.size()-mPreallocSize; } bool isEmpty() const { return size() == 0; } bool autoSqueeze() const { return mAutoSqueeze; } // setters: void setAutoSqueeze(bool enabled); // non-virtual methods: void set(const QCPDataContainer &data); void set(const QVector &data, bool alreadySorted=false); void add(const QCPDataContainer &data); void add(const QVector &data, bool alreadySorted=false); void add(const DataType &data); void removeBefore(double sortKey); void removeAfter(double sortKey); void remove(double sortKeyFrom, double sortKeyTo); void remove(double sortKey); void clear(); void sort(); void squeeze(bool preAllocation=true, bool postAllocation=true); const_iterator constBegin() const { return mData.constBegin()+mPreallocSize; } const_iterator constEnd() const { return mData.constEnd(); } iterator begin() { return mData.begin()+mPreallocSize; } iterator end() { return mData.end(); } const_iterator findBegin(double sortKey, bool expandedRange=true) const; const_iterator findEnd(double sortKey, bool expandedRange=true) const; const_iterator at(int index) const { return constBegin()+qBound(0, index, size()); } QCPRange keyRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth); QCPRange valueRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()); QCPDataRange dataRange() const { return QCPDataRange(0, size()); } void limitIteratorsToDataRange(const_iterator &begin, const_iterator &end, const QCPDataRange &dataRange) const; protected: // property members: bool mAutoSqueeze; // non-property memebers: QVector mData; int mPreallocSize; int mPreallocIteration; // non-virtual methods: void preallocateGrow(int minimumPreallocSize); void performAutoSqueeze(); }; // include implementation in header since it is a class template: /* including file 'src/datacontainer.cpp', size 31349 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPDataContainer //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPDataContainer \brief The generic data container for one-dimensional plottables This class template provides a fast container for data storage of one-dimensional data. The data type is specified as template parameter (called \a DataType in the following) and must provide some methods as described in the \ref qcpdatacontainer-datatype "next section". The data is stored in a sorted fashion, which allows very quick lookups by the sorted key as well as retrieval of ranges (see \ref findBegin, \ref findEnd, \ref keyRange) using binary search. The container uses a preallocation and a postallocation scheme, such that appending and prepending data (with respect to the sort key) is very fast and minimizes reallocations. If data is added which needs to be inserted between existing keys, the merge usually can be done quickly too, using the fact that existing data is always sorted. The user can further improve performance by specifying that added data is already itself sorted by key, if he can guarantee that this is the case (see for example \ref add(const QVector &data, bool alreadySorted)). The data can be accessed with the provided const iterators (\ref constBegin, \ref constEnd). If it is necessary to alter existing data in-place, the non-const iterators can be used (\ref begin, \ref end). Changing data members that are not the sort key (for most data types called \a key) is safe from the container's perspective. Great care must be taken however if the sort key is modified through the non-const iterators. For performance reasons, the iterators don't automatically cause a re-sorting upon their manipulation. It is thus the responsibility of the user to leave the container in a sorted state when finished with the data manipulation, before calling any other methods on the container. A complete re-sort (e.g. after finishing all sort key manipulation) can be done by calling \ref sort. Failing to do so can not be detected by the container efficiently and will cause both rendering artifacts and potential data loss. Implementing one-dimensional plottables that make use of a \ref QCPDataContainer is usually done by subclassing from \ref QCPAbstractPlottable1D "QCPAbstractPlottable1D", which introduces an according \a mDataContainer member and some convenience methods. \section qcpdatacontainer-datatype Requirements for the DataType template parameter The template parameter DataType is the type of the stored data points. It must be trivially copyable and have the following public methods, preferably inline: \li double sortKey() const\n Returns the member variable of this data point that is the sort key, defining the ordering in the container. Often this variable is simply called \a key. \li static DataType fromSortKey(double sortKey)\n Returns a new instance of the data type initialized with its sort key set to \a sortKey. \li static bool sortKeyIsMainKey()\n Returns true if the sort key is equal to the main key (see method \c mainKey below). For most plottables this is the case. It is not the case for example for \ref QCPCurve, which uses \a t as sort key and \a key as main key. This is the reason why QCPCurve unlike QCPGraph can display parametric curves with loops. \li double mainKey() const\n Returns the variable of this data point considered the main key. This is commonly the variable that is used as the coordinate of this data point on the key axis of the plottable. This method is used for example when determining the automatic axis rescaling of key axes (\ref QCPAxis::rescale). \li double mainValue() const\n Returns the variable of this data point considered the main value. This is commonly the variable that is used as the coordinate of this data point on the value axis of the plottable. \li QCPRange valueRange() const\n Returns the range this data point spans in the value axis coordinate. If the data is single-valued (e.g. QCPGraphData), this is simply a range with both lower and upper set to the main data point value. However if the data points can represent multiple values at once (e.g QCPFinancialData with its \a high, \a low, \a open and \a close values at each \a key) this method should return the range those values span. This method is used for example when determining the automatic axis rescaling of value axes (\ref QCPAxis::rescale). */ /* start documentation of inline functions */ /*! \fn int QCPDataContainer::size() const Returns the number of data points in the container. */ /*! \fn bool QCPDataContainer::isEmpty() const Returns whether this container holds no data points. */ /*! \fn QCPDataContainer::const_iterator QCPDataContainer::constBegin() const Returns a const iterator to the first data point in this container. */ /*! \fn QCPDataContainer::const_iterator QCPDataContainer::constEnd() const Returns a const iterator to the element past the last data point in this container. */ /*! \fn QCPDataContainer::iterator QCPDataContainer::begin() const Returns a non-const iterator to the first data point in this container. You can manipulate the data points in-place through the non-const iterators, but great care must be taken when manipulating the sort key of a data point, see \ref sort, or the detailed description of this class. */ /*! \fn QCPDataContainer::iterator QCPDataContainer::end() const Returns a non-const iterator to the element past the last data point in this container. You can manipulate the data points in-place through the non-const iterators, but great care must be taken when manipulating the sort key of a data point, see \ref sort, or the detailed description of this class. */ /*! \fn QCPDataContainer::const_iterator QCPDataContainer::at(int index) const Returns a const iterator to the element with the specified \a index. If \a index points beyond the available elements in this container, returns \ref constEnd, i.e. an iterator past the last valid element. You can use this method to easily obtain iterators from a \ref QCPDataRange, see the \ref dataselection-accessing "data selection page" for an example. */ /*! \fn QCPDataRange QCPDataContainer::dataRange() const Returns a \ref QCPDataRange encompassing the entire data set of this container. This means the begin index of the returned range is 0, and the end index is \ref size. */ /* end documentation of inline functions */ /*! Constructs a QCPDataContainer used for plottable classes that represent a series of key-sorted data */ template QCPDataContainer::QCPDataContainer() : mAutoSqueeze(true), mPreallocSize(0), mPreallocIteration(0) { } /*! Sets whether the container automatically decides when to release memory from its post- and preallocation pools when data points are removed. By default this is enabled and for typical applications shouldn't be changed. If auto squeeze is disabled, you can manually decide when to release pre-/postallocation with \ref squeeze. */ template void QCPDataContainer::setAutoSqueeze(bool enabled) { if (mAutoSqueeze != enabled) { mAutoSqueeze = enabled; if (mAutoSqueeze) performAutoSqueeze(); } } /*! \overload Replaces the current data in this container with the provided \a data. \see add, remove */ template void QCPDataContainer::set(const QCPDataContainer &data) { clear(); add(data); } /*! \overload Replaces the current data in this container with the provided \a data If you can guarantee that the data points in \a data have ascending order with respect to the DataType's sort key, set \a alreadySorted to true to avoid an unnecessary sorting run. \see add, remove */ template void QCPDataContainer::set(const QVector &data, bool alreadySorted) { mData = data; mPreallocSize = 0; mPreallocIteration = 0; if (!alreadySorted) sort(); } /*! \overload Adds the provided \a data to the current data in this container. \see set, remove */ template void QCPDataContainer::add(const QCPDataContainer &data) { if (data.isEmpty()) return; const int n = data.size(); const int oldSize = size(); if (oldSize > 0 && !qcpLessThanSortKey(*constBegin(), *(data.constEnd()-1))) // prepend if new data keys are all smaller than or equal to existing ones { if (mPreallocSize < n) preallocateGrow(n); mPreallocSize -= n; std::copy(data.constBegin(), data.constEnd(), begin()); } else // don't need to prepend, so append and merge if necessary { mData.resize(mData.size()+n); std::copy(data.constBegin(), data.constEnd(), end()-n); if (oldSize > 0 && !qcpLessThanSortKey(*(constEnd()-n-1), *(constEnd()-n))) // if appended range keys aren't all greater than existing ones, merge the two partitions std::inplace_merge(begin(), end()-n, end(), qcpLessThanSortKey); } } /*! Adds the provided data points in \a data to the current data. If you can guarantee that the data points in \a data have ascending order with respect to the DataType's sort key, set \a alreadySorted to true to avoid an unnecessary sorting run. \see set, remove */ template void QCPDataContainer::add(const QVector &data, bool alreadySorted) { if (data.isEmpty()) return; if (isEmpty()) { set(data, alreadySorted); return; } const int n = data.size(); const int oldSize = size(); if (alreadySorted && oldSize > 0 && !qcpLessThanSortKey(*constBegin(), *(data.constEnd()-1))) // prepend if new data is sorted and keys are all smaller than or equal to existing ones { if (mPreallocSize < n) preallocateGrow(n); mPreallocSize -= n; std::copy(data.constBegin(), data.constEnd(), begin()); } else // don't need to prepend, so append and then sort and merge if necessary { mData.resize(mData.size()+n); std::copy(data.constBegin(), data.constEnd(), end()-n); if (!alreadySorted) // sort appended subrange if it wasn't already sorted std::sort(end()-n, end(), qcpLessThanSortKey); if (oldSize > 0 && !qcpLessThanSortKey(*(constEnd()-n-1), *(constEnd()-n))) // if appended range keys aren't all greater than existing ones, merge the two partitions std::inplace_merge(begin(), end()-n, end(), qcpLessThanSortKey); } } /*! \overload Adds the provided single data point to the current data. \see remove */ template void QCPDataContainer::add(const DataType &data) { if (isEmpty() || !qcpLessThanSortKey(data, *(constEnd()-1))) // quickly handle appends if new data key is greater or equal to existing ones { mData.append(data); } else if (qcpLessThanSortKey(data, *constBegin())) // quickly handle prepends using preallocated space { if (mPreallocSize < 1) preallocateGrow(1); --mPreallocSize; *begin() = data; } else // handle inserts, maintaining sorted keys { QCPDataContainer::iterator insertionPoint = std::lower_bound(begin(), end(), data, qcpLessThanSortKey); mData.insert(insertionPoint, data); } } /*! Removes all data points with (sort-)keys smaller than or equal to \a sortKey. \see removeAfter, remove, clear */ template void QCPDataContainer::removeBefore(double sortKey) { QCPDataContainer::iterator it = begin(); QCPDataContainer::iterator itEnd = std::lower_bound(begin(), end(), DataType::fromSortKey(sortKey), qcpLessThanSortKey); mPreallocSize += itEnd-it; // don't actually delete, just add it to the preallocated block (if it gets too large, squeeze will take care of it) if (mAutoSqueeze) performAutoSqueeze(); } /*! Removes all data points with (sort-)keys greater than or equal to \a sortKey. \see removeBefore, remove, clear */ template void QCPDataContainer::removeAfter(double sortKey) { QCPDataContainer::iterator it = std::upper_bound(begin(), end(), DataType::fromSortKey(sortKey), qcpLessThanSortKey); QCPDataContainer::iterator itEnd = end(); mData.erase(it, itEnd); // typically adds it to the postallocated block if (mAutoSqueeze) performAutoSqueeze(); } /*! Removes all data points with (sort-)keys between \a sortKeyFrom and \a sortKeyTo. if \a sortKeyFrom is greater or equal to \a sortKeyTo, the function does nothing. To remove a single data point with known (sort-)key, use \ref remove(double sortKey). \see removeBefore, removeAfter, clear */ template void QCPDataContainer::remove(double sortKeyFrom, double sortKeyTo) { if (sortKeyFrom >= sortKeyTo || isEmpty()) return; QCPDataContainer::iterator it = std::lower_bound(begin(), end(), DataType::fromSortKey(sortKeyFrom), qcpLessThanSortKey); QCPDataContainer::iterator itEnd = std::upper_bound(it, end(), DataType::fromSortKey(sortKeyTo), qcpLessThanSortKey); mData.erase(it, itEnd); if (mAutoSqueeze) performAutoSqueeze(); } /*! \overload Removes a single data point at \a sortKey. If the position is not known with absolute (binary) precision, consider using \ref remove(double sortKeyFrom, double sortKeyTo) with a small fuzziness interval around the suspected position, depeding on the precision with which the (sort-)key is known. \see removeBefore, removeAfter, clear */ template void QCPDataContainer::remove(double sortKey) { QCPDataContainer::iterator it = std::lower_bound(begin(), end(), DataType::fromSortKey(sortKey), qcpLessThanSortKey); if (it != end() && it->sortKey() == sortKey) { if (it == begin()) ++mPreallocSize; // don't actually delete, just add it to the preallocated block (if it gets too large, squeeze will take care of it) else mData.erase(it); } if (mAutoSqueeze) performAutoSqueeze(); } /*! Removes all data points. \see remove, removeAfter, removeBefore */ template void QCPDataContainer::clear() { mData.clear(); mPreallocIteration = 0; mPreallocSize = 0; } /*! Re-sorts all data points in the container by their sort key. When setting, adding or removing points using the QCPDataContainer interface (\ref set, \ref add, \ref remove, etc.), the container makes sure to always stay in a sorted state such that a full resort is never necessary. However, if you choose to directly manipulate the sort key on data points by accessing and modifying it through the non-const iterators (\ref begin, \ref end), it is your responsibility to bring the container back into a sorted state before any other methods are called on it. This can be achieved by calling this method immediately after finishing the sort key manipulation. */ template void QCPDataContainer::sort() { std::sort(begin(), end(), qcpLessThanSortKey); } /*! Frees all unused memory that is currently in the preallocation and postallocation pools. Note that QCPDataContainer automatically decides whether squeezing is necessary, if \ref setAutoSqueeze is left enabled. It should thus not be necessary to use this method for typical applications. The parameters \a preAllocation and \a postAllocation control whether pre- and/or post allocation should be freed, respectively. */ template void QCPDataContainer::squeeze(bool preAllocation, bool postAllocation) { if (preAllocation) { if (mPreallocSize > 0) { std::copy(begin(), end(), mData.begin()); mData.resize(size()); mPreallocSize = 0; } mPreallocIteration = 0; } if (postAllocation) mData.squeeze(); } /*! Returns an iterator to the data point with a (sort-)key that is equal to, just below, or just above \a sortKey. If \a expandedRange is true, the data point just below \a sortKey will be considered, otherwise the one just above. This can be used in conjunction with \ref findEnd to iterate over data points within a given key range, including or excluding the bounding data points that are just beyond the specified range. If \a expandedRange is true but there are no data points below \a sortKey, \ref constBegin is returned. If the container is empty, returns \ref constEnd. \see findEnd, QCPPlottableInterface1D::findBegin */ template typename QCPDataContainer::const_iterator QCPDataContainer::findBegin(double sortKey, bool expandedRange) const { if (isEmpty()) return constEnd(); QCPDataContainer::const_iterator it = std::lower_bound(constBegin(), constEnd(), DataType::fromSortKey(sortKey), qcpLessThanSortKey); if (expandedRange && it != constBegin()) // also covers it == constEnd case, and we know --constEnd is valid because mData isn't empty --it; return it; } /*! Returns an iterator to the element after the data point with a (sort-)key that is equal to, just above or just below \a sortKey. If \a expandedRange is true, the data point just above \a sortKey will be considered, otherwise the one just below. This can be used in conjunction with \ref findBegin to iterate over data points within a given key range, including the bounding data points that are just below and above the specified range. If \a expandedRange is true but there are no data points above \a sortKey, \ref constEnd is returned. If the container is empty, \ref constEnd is returned. \see findBegin, QCPPlottableInterface1D::findEnd */ template typename QCPDataContainer::const_iterator QCPDataContainer::findEnd(double sortKey, bool expandedRange) const { if (isEmpty()) return constEnd(); QCPDataContainer::const_iterator it = std::upper_bound(constBegin(), constEnd(), DataType::fromSortKey(sortKey), qcpLessThanSortKey); if (expandedRange && it != constEnd()) ++it; return it; } /*! Returns the range encompassed by the (main-)key coordinate of all data points. The output parameter \a foundRange indicates whether a sensible range was found. If this is false, you should not use the returned QCPRange (e.g. the data container is empty or all points have the same key). Use \a signDomain to control which sign of the key coordinates should be considered. This is relevant e.g. for logarithmic plots which can mathematically only display one sign domain at a time. If the DataType reports that its main key is equal to the sort key (\a sortKeyIsMainKey), as is the case for most plottables, this method uses this fact and finds the range very quickly. \see valueRange */ template QCPRange QCPDataContainer::keyRange(bool &foundRange, QCP::SignDomain signDomain) { if (isEmpty()) { foundRange = false; return QCPRange(); } QCPRange range; bool haveLower = false; bool haveUpper = false; double current; QCPDataContainer::const_iterator it = constBegin(); QCPDataContainer::const_iterator itEnd = constEnd(); if (signDomain == QCP::sdBoth) // range may be anywhere { if (DataType::sortKeyIsMainKey()) // if DataType is sorted by main key (e.g. QCPGraph, but not QCPCurve), use faster algorithm by finding just first and last key with non-NaN value { while (it != itEnd) // find first non-nan going up from left { if (!qIsNaN(it->mainValue())) { range.lower = it->mainKey(); haveLower = true; break; } ++it; } it = itEnd; while (it != constBegin()) // find first non-nan going down from right { --it; if (!qIsNaN(it->mainValue())) { range.upper = it->mainKey(); haveUpper = true; break; } } } else // DataType is not sorted by main key, go through all data points and accordingly expand range { while (it != itEnd) { if (!qIsNaN(it->mainValue())) { current = it->mainKey(); if (current < range.lower || !haveLower) { range.lower = current; haveLower = true; } if (current > range.upper || !haveUpper) { range.upper = current; haveUpper = true; } } ++it; } } } else if (signDomain == QCP::sdNegative) // range may only be in the negative sign domain { while (it != itEnd) { if (!qIsNaN(it->mainValue())) { current = it->mainKey(); if ((current < range.lower || !haveLower) && current < 0) { range.lower = current; haveLower = true; } if ((current > range.upper || !haveUpper) && current < 0) { range.upper = current; haveUpper = true; } } ++it; } } else if (signDomain == QCP::sdPositive) // range may only be in the positive sign domain { while (it != itEnd) { if (!qIsNaN(it->mainValue())) { current = it->mainKey(); if ((current < range.lower || !haveLower) && current > 0) { range.lower = current; haveLower = true; } if ((current > range.upper || !haveUpper) && current > 0) { range.upper = current; haveUpper = true; } } ++it; } } foundRange = haveLower && haveUpper; return range; } /*! Returns the range encompassed by the value coordinates of the data points in the specified key range (\a inKeyRange), using the full \a DataType::valueRange reported by the data points. The output parameter \a foundRange indicates whether a sensible range was found. If this is false, you should not use the returned QCPRange (e.g. the data container is empty or all points have the same value). If \a inKeyRange has both lower and upper bound set to zero (is equal to QCPRange()), all data points are considered, without any restriction on the keys. Use \a signDomain to control which sign of the value coordinates should be considered. This is relevant e.g. for logarithmic plots which can mathematically only display one sign domain at a time. \see keyRange */ template QCPRange QCPDataContainer::valueRange(bool &foundRange, QCP::SignDomain signDomain, const QCPRange &inKeyRange) { if (isEmpty()) { foundRange = false; return QCPRange(); } QCPRange range; const bool restrictKeyRange = inKeyRange != QCPRange(); bool haveLower = false; bool haveUpper = false; QCPRange current; QCPDataContainer::const_iterator itBegin = constBegin(); QCPDataContainer::const_iterator itEnd = constEnd(); if (DataType::sortKeyIsMainKey() && restrictKeyRange) { itBegin = findBegin(inKeyRange.lower); itEnd = findEnd(inKeyRange.upper); } if (signDomain == QCP::sdBoth) // range may be anywhere { for (QCPDataContainer::const_iterator it = itBegin; it != itEnd; ++it) { if (restrictKeyRange && (it->mainKey() < inKeyRange.lower || it->mainKey() > inKeyRange.upper)) continue; current = it->valueRange(); if ((current.lower < range.lower || !haveLower) && !qIsNaN(current.lower)) { range.lower = current.lower; haveLower = true; } if ((current.upper > range.upper || !haveUpper) && !qIsNaN(current.upper)) { range.upper = current.upper; haveUpper = true; } } } else if (signDomain == QCP::sdNegative) // range may only be in the negative sign domain { for (QCPDataContainer::const_iterator it = itBegin; it != itEnd; ++it) { if (restrictKeyRange && (it->mainKey() < inKeyRange.lower || it->mainKey() > inKeyRange.upper)) continue; current = it->valueRange(); if ((current.lower < range.lower || !haveLower) && current.lower < 0 && !qIsNaN(current.lower)) { range.lower = current.lower; haveLower = true; } if ((current.upper > range.upper || !haveUpper) && current.upper < 0 && !qIsNaN(current.upper)) { range.upper = current.upper; haveUpper = true; } } } else if (signDomain == QCP::sdPositive) // range may only be in the positive sign domain { for (QCPDataContainer::const_iterator it = itBegin; it != itEnd; ++it) { if (restrictKeyRange && (it->mainKey() < inKeyRange.lower || it->mainKey() > inKeyRange.upper)) continue; current = it->valueRange(); if ((current.lower < range.lower || !haveLower) && current.lower > 0 && !qIsNaN(current.lower)) { range.lower = current.lower; haveLower = true; } if ((current.upper > range.upper || !haveUpper) && current.upper > 0 && !qIsNaN(current.upper)) { range.upper = current.upper; haveUpper = true; } } } foundRange = haveLower && haveUpper; return range; } /*! Makes sure \a begin and \a end mark a data range that is both within the bounds of this data container's data, as well as within the specified \a dataRange. The initial range described by the passed iterators \a begin and \a end is never expanded, only contracted if necessary. This function doesn't require for \a dataRange to be within the bounds of this data container's valid range. */ template void QCPDataContainer::limitIteratorsToDataRange(const_iterator &begin, const_iterator &end, const QCPDataRange &dataRange) const { QCPDataRange iteratorRange(begin-constBegin(), end-constBegin()); iteratorRange = iteratorRange.bounded(dataRange.bounded(this->dataRange())); begin = constBegin()+iteratorRange.begin(); end = constBegin()+iteratorRange.end(); } /*! \internal Increases the preallocation pool to have a size of at least \a minimumPreallocSize. Depending on the preallocation history, the container will grow by more than requested, to speed up future consecutive size increases. if \a minimumPreallocSize is smaller than or equal to the current preallocation pool size, this method does nothing. */ template void QCPDataContainer::preallocateGrow(int minimumPreallocSize) { if (minimumPreallocSize <= mPreallocSize) return; int newPreallocSize = minimumPreallocSize; newPreallocSize += (1u< void QCPDataContainer::performAutoSqueeze() { const int totalAlloc = mData.capacity(); const int postAllocSize = totalAlloc-mData.size(); const int usedSize = size(); bool shrinkPostAllocation = false; bool shrinkPreAllocation = false; if (totalAlloc > 650000) // if allocation is larger, shrink earlier with respect to total used size { shrinkPostAllocation = postAllocSize > usedSize*1.5; // QVector grow strategy is 2^n for static data. Watch out not to oscillate! shrinkPreAllocation = mPreallocSize*10 > usedSize; } else if (totalAlloc > 1000) // below 10 MiB raw data be generous with preallocated memory, below 1k points don't even bother { shrinkPostAllocation = postAllocSize > usedSize*5; shrinkPreAllocation = mPreallocSize > usedSize*1.5; // preallocation can grow into postallocation, so can be smaller } if (shrinkPreAllocation || shrinkPostAllocation) squeeze(shrinkPreAllocation, shrinkPostAllocation); } /* end of 'src/datacontainer.cpp' */ /* end of 'src/datacontainer.h' */ /* including file 'src/plottable.h', size 8312 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPSelectionDecorator { Q_GADGET public: QCPSelectionDecorator(); virtual ~QCPSelectionDecorator(); // getters: QPen pen() const { return mPen; } QBrush brush() const { return mBrush; } QCPScatterStyle scatterStyle() const { return mScatterStyle; } QCPScatterStyle::ScatterProperties usedScatterProperties() const { return mUsedScatterProperties; } // setters: void setPen(const QPen &pen); void setBrush(const QBrush &brush); void setScatterStyle(const QCPScatterStyle &scatterStyle, QCPScatterStyle::ScatterProperties usedProperties=QCPScatterStyle::spPen); void setUsedScatterProperties(const QCPScatterStyle::ScatterProperties &properties); // non-virtual methods: void applyPen(QCPPainter *painter) const; void applyBrush(QCPPainter *painter) const; QCPScatterStyle getFinalScatterStyle(const QCPScatterStyle &unselectedStyle) const; // introduced virtual methods: virtual void copyFrom(const QCPSelectionDecorator *other); virtual void drawDecoration(QCPPainter *painter, QCPDataSelection selection); protected: // property members: QPen mPen; QBrush mBrush; QCPScatterStyle mScatterStyle; QCPScatterStyle::ScatterProperties mUsedScatterProperties; // non-property members: QCPAbstractPlottable *mPlottable; // introduced virtual methods: virtual bool registerWithPlottable(QCPAbstractPlottable *plottable); private: Q_DISABLE_COPY(QCPSelectionDecorator) friend class QCPAbstractPlottable; }; Q_DECLARE_METATYPE(QCPSelectionDecorator*) class QCP_LIB_DECL QCPAbstractPlottable : public QCPLayerable { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(bool antialiasedFill READ antialiasedFill WRITE setAntialiasedFill) Q_PROPERTY(bool antialiasedScatters READ antialiasedScatters WRITE setAntialiasedScatters) Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QBrush brush READ brush WRITE setBrush) Q_PROPERTY(QCPAxis* keyAxis READ keyAxis WRITE setKeyAxis) Q_PROPERTY(QCPAxis* valueAxis READ valueAxis WRITE setValueAxis) Q_PROPERTY(QCP::SelectionType selectable READ selectable WRITE setSelectable NOTIFY selectableChanged) Q_PROPERTY(QCPDataSelection selection READ selection WRITE setSelection NOTIFY selectionChanged) Q_PROPERTY(QCPSelectionDecorator* selectionDecorator READ selectionDecorator WRITE setSelectionDecorator) /// \endcond public: QCPAbstractPlottable(QCPAxis *keyAxis, QCPAxis *valueAxis); virtual ~QCPAbstractPlottable(); // getters: QString name() const { return mName; } bool antialiasedFill() const { return mAntialiasedFill; } bool antialiasedScatters() const { return mAntialiasedScatters; } QPen pen() const { return mPen; } QBrush brush() const { return mBrush; } QCPAxis *keyAxis() const { return mKeyAxis.data(); } QCPAxis *valueAxis() const { return mValueAxis.data(); } QCP::SelectionType selectable() const { return mSelectable; } bool selected() const { return !mSelection.isEmpty(); } QCPDataSelection selection() const { return mSelection; } QCPSelectionDecorator *selectionDecorator() const { return mSelectionDecorator; } // setters: void setName(const QString &name); void setAntialiasedFill(bool enabled); void setAntialiasedScatters(bool enabled); void setPen(const QPen &pen); void setBrush(const QBrush &brush); void setKeyAxis(QCPAxis *axis); void setValueAxis(QCPAxis *axis); Q_SLOT void setSelectable(QCP::SelectionType selectable); Q_SLOT void setSelection(QCPDataSelection selection); void setSelectionDecorator(QCPSelectionDecorator *decorator); // introduced virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const = 0; virtual QCPPlottableInterface1D *interface1D() { return 0; } virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const = 0; virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const = 0; // non-property methods: void coordsToPixels(double key, double value, double &x, double &y) const; const QPointF coordsToPixels(double key, double value) const; void pixelsToCoords(double x, double y, double &key, double &value) const; void pixelsToCoords(const QPointF &pixelPos, double &key, double &value) const; void rescaleAxes(bool onlyEnlarge=false) const; void rescaleKeyAxis(bool onlyEnlarge=false) const; void rescaleValueAxis(bool onlyEnlarge=false, bool inKeyRange=false) const; bool addToLegend(QCPLegend *legend); bool addToLegend(); bool removeFromLegend(QCPLegend *legend) const; bool removeFromLegend() const; signals: void selectionChanged(bool selected); void selectionChanged(const QCPDataSelection &selection); void selectableChanged(QCP::SelectionType selectable); protected: // property members: QString mName; bool mAntialiasedFill, mAntialiasedScatters; QPen mPen; QBrush mBrush; QPointer mKeyAxis, mValueAxis; QCP::SelectionType mSelectable; QCPDataSelection mSelection; QCPSelectionDecorator *mSelectionDecorator; // reimplemented virtual methods: virtual QRect clipRect() const Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE = 0; virtual QCP::Interaction selectionCategory() const Q_DECL_OVERRIDE; void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE; // events: virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE; virtual void deselectEvent(bool *selectionStateChanged) Q_DECL_OVERRIDE; // introduced virtual methods: virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const = 0; // non-virtual methods: void applyFillAntialiasingHint(QCPPainter *painter) const; void applyScattersAntialiasingHint(QCPPainter *painter) const; private: Q_DISABLE_COPY(QCPAbstractPlottable) friend class QCustomPlot; friend class QCPAxis; friend class QCPPlottableLegendItem; }; /* end of 'src/plottable.h' */ /* including file 'src/item.h', size 9384 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemAnchor { Q_GADGET public: QCPItemAnchor(QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name, int anchorId=-1); virtual ~QCPItemAnchor(); // getters: QString name() const { return mName; } virtual QPointF pixelPosition() const; protected: // property members: QString mName; // non-property members: QCustomPlot *mParentPlot; QCPAbstractItem *mParentItem; int mAnchorId; QSet mChildrenX, mChildrenY; // introduced virtual methods: virtual QCPItemPosition *toQCPItemPosition() { return 0; } // non-virtual methods: void addChildX(QCPItemPosition* pos); // called from pos when this anchor is set as parent void removeChildX(QCPItemPosition *pos); // called from pos when its parent anchor is reset or pos deleted void addChildY(QCPItemPosition* pos); // called from pos when this anchor is set as parent void removeChildY(QCPItemPosition *pos); // called from pos when its parent anchor is reset or pos deleted private: Q_DISABLE_COPY(QCPItemAnchor) friend class QCPItemPosition; }; class QCP_LIB_DECL QCPItemPosition : public QCPItemAnchor { Q_GADGET public: /*! Defines the ways an item position can be specified. Thus it defines what the numbers passed to \ref setCoords actually mean. \see setType */ enum PositionType { ptAbsolute ///< Static positioning in pixels, starting from the top left corner of the viewport/widget. ,ptViewportRatio ///< Static positioning given by a fraction of the viewport size. For example, if you call setCoords(0, 0), the position will be at the top ///< left corner of the viewport/widget. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and ///< vertically at the top of the viewport/widget, etc. ,ptAxisRectRatio ///< Static positioning given by a fraction of the axis rect size (see \ref setAxisRect). For example, if you call setCoords(0, 0), the position will be at the top ///< left corner of the axis rect. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and ///< vertically at the top of the axis rect, etc. You can also go beyond the axis rect by providing negative coordinates or coordinates larger than 1. ,ptPlotCoords ///< Dynamic positioning at a plot coordinate defined by two axes (see \ref setAxes). }; Q_ENUMS(PositionType) QCPItemPosition(QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name); virtual ~QCPItemPosition(); // getters: PositionType type() const { return typeX(); } PositionType typeX() const { return mPositionTypeX; } PositionType typeY() const { return mPositionTypeY; } QCPItemAnchor *parentAnchor() const { return parentAnchorX(); } QCPItemAnchor *parentAnchorX() const { return mParentAnchorX; } QCPItemAnchor *parentAnchorY() const { return mParentAnchorY; } double key() const { return mKey; } double value() const { return mValue; } QPointF coords() const { return QPointF(mKey, mValue); } QCPAxis *keyAxis() const { return mKeyAxis.data(); } QCPAxis *valueAxis() const { return mValueAxis.data(); } QCPAxisRect *axisRect() const; virtual QPointF pixelPosition() const Q_DECL_OVERRIDE; // setters: void setType(PositionType type); void setTypeX(PositionType type); void setTypeY(PositionType type); bool setParentAnchor(QCPItemAnchor *parentAnchor, bool keepPixelPosition=false); bool setParentAnchorX(QCPItemAnchor *parentAnchor, bool keepPixelPosition=false); bool setParentAnchorY(QCPItemAnchor *parentAnchor, bool keepPixelPosition=false); void setCoords(double key, double value); void setCoords(const QPointF &coords); void setAxes(QCPAxis* keyAxis, QCPAxis* valueAxis); void setAxisRect(QCPAxisRect *axisRect); void setPixelPosition(const QPointF &pixelPosition); protected: // property members: PositionType mPositionTypeX, mPositionTypeY; QPointer mKeyAxis, mValueAxis; QPointer mAxisRect; double mKey, mValue; QCPItemAnchor *mParentAnchorX, *mParentAnchorY; // reimplemented virtual methods: virtual QCPItemPosition *toQCPItemPosition() Q_DECL_OVERRIDE { return this; } private: Q_DISABLE_COPY(QCPItemPosition) }; Q_DECLARE_METATYPE(QCPItemPosition::PositionType) class QCP_LIB_DECL QCPAbstractItem : public QCPLayerable { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(bool clipToAxisRect READ clipToAxisRect WRITE setClipToAxisRect) Q_PROPERTY(QCPAxisRect* clipAxisRect READ clipAxisRect WRITE setClipAxisRect) Q_PROPERTY(bool selectable READ selectable WRITE setSelectable NOTIFY selectableChanged) Q_PROPERTY(bool selected READ selected WRITE setSelected NOTIFY selectionChanged) /// \endcond public: explicit QCPAbstractItem(QCustomPlot *parentPlot); virtual ~QCPAbstractItem(); // getters: bool clipToAxisRect() const { return mClipToAxisRect; } QCPAxisRect *clipAxisRect() const; bool selectable() const { return mSelectable; } bool selected() const { return mSelected; } // setters: void setClipToAxisRect(bool clip); void setClipAxisRect(QCPAxisRect *rect); Q_SLOT void setSelectable(bool selectable); Q_SLOT void setSelected(bool selected); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE = 0; // non-virtual methods: QList positions() const { return mPositions; } QList anchors() const { return mAnchors; } QCPItemPosition *position(const QString &name) const; QCPItemAnchor *anchor(const QString &name) const; bool hasAnchor(const QString &name) const; signals: void selectionChanged(bool selected); void selectableChanged(bool selectable); protected: // property members: bool mClipToAxisRect; QPointer mClipAxisRect; QList mPositions; QList mAnchors; bool mSelectable, mSelected; // reimplemented virtual methods: virtual QCP::Interaction selectionCategory() const Q_DECL_OVERRIDE; virtual QRect clipRect() const Q_DECL_OVERRIDE; virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE = 0; // events: virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE; virtual void deselectEvent(bool *selectionStateChanged) Q_DECL_OVERRIDE; // introduced virtual methods: virtual QPointF anchorPixelPosition(int anchorId) const; // non-virtual methods: double rectDistance(const QRectF &rect, const QPointF &pos, bool filledRect) const; QCPItemPosition *createPosition(const QString &name); QCPItemAnchor *createAnchor(const QString &name, int anchorId); private: Q_DISABLE_COPY(QCPAbstractItem) friend class QCustomPlot; friend class QCPItemAnchor; }; /* end of 'src/item.h' */ /* including file 'src/core.h', size 14886 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCustomPlot : public QWidget { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QRect viewport READ viewport WRITE setViewport) Q_PROPERTY(QPixmap background READ background WRITE setBackground) Q_PROPERTY(bool backgroundScaled READ backgroundScaled WRITE setBackgroundScaled) Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode WRITE setBackgroundScaledMode) Q_PROPERTY(QCPLayoutGrid* plotLayout READ plotLayout) Q_PROPERTY(bool autoAddPlottableToLegend READ autoAddPlottableToLegend WRITE setAutoAddPlottableToLegend) Q_PROPERTY(int selectionTolerance READ selectionTolerance WRITE setSelectionTolerance) Q_PROPERTY(bool noAntialiasingOnDrag READ noAntialiasingOnDrag WRITE setNoAntialiasingOnDrag) Q_PROPERTY(Qt::KeyboardModifier multiSelectModifier READ multiSelectModifier WRITE setMultiSelectModifier) Q_PROPERTY(bool openGl READ openGl WRITE setOpenGl) /// \endcond public: /*! Defines how a layer should be inserted relative to an other layer. \see addLayer, moveLayer */ enum LayerInsertMode { limBelow ///< Layer is inserted below other layer ,limAbove ///< Layer is inserted above other layer }; Q_ENUMS(LayerInsertMode) /*! Defines with what timing the QCustomPlot surface is refreshed after a replot. \see replot */ enum RefreshPriority { rpImmediateRefresh ///< Replots immediately and repaints the widget immediately by calling QWidget::repaint() after the replot ,rpQueuedRefresh ///< Replots immediately, but queues the widget repaint, by calling QWidget::update() after the replot. This way multiple redundant widget repaints can be avoided. ,rpRefreshHint ///< Whether to use immediate or queued refresh depends on whether the plotting hint \ref QCP::phImmediateRefresh is set, see \ref setPlottingHints. ,rpQueuedReplot ///< Queues the entire replot for the next event loop iteration. This way multiple redundant replots can be avoided. The actual replot is then done with \ref rpRefreshHint priority. }; Q_ENUMS(RefreshPriority) explicit QCustomPlot(QWidget *parent = 0); virtual ~QCustomPlot(); // getters: QRect viewport() const { return mViewport; } double bufferDevicePixelRatio() const { return mBufferDevicePixelRatio; } QPixmap background() const { return mBackgroundPixmap; } bool backgroundScaled() const { return mBackgroundScaled; } Qt::AspectRatioMode backgroundScaledMode() const { return mBackgroundScaledMode; } QCPLayoutGrid *plotLayout() const { return mPlotLayout; } QCP::AntialiasedElements antialiasedElements() const { return mAntialiasedElements; } QCP::AntialiasedElements notAntialiasedElements() const { return mNotAntialiasedElements; } bool autoAddPlottableToLegend() const { return mAutoAddPlottableToLegend; } const QCP::Interactions interactions() const { return mInteractions; } int selectionTolerance() const { return mSelectionTolerance; } bool noAntialiasingOnDrag() const { return mNoAntialiasingOnDrag; } QCP::PlottingHints plottingHints() const { return mPlottingHints; } Qt::KeyboardModifier multiSelectModifier() const { return mMultiSelectModifier; } QCP::SelectionRectMode selectionRectMode() const { return mSelectionRectMode; } QCPSelectionRect *selectionRect() const { return mSelectionRect; } bool openGl() const { return mOpenGl; } // setters: void setViewport(const QRect &rect); void setBufferDevicePixelRatio(double ratio); void setBackground(const QPixmap &pm); void setBackground(const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding); void setBackground(const QBrush &brush); void setBackgroundScaled(bool scaled); void setBackgroundScaledMode(Qt::AspectRatioMode mode); void setAntialiasedElements(const QCP::AntialiasedElements &antialiasedElements); void setAntialiasedElement(QCP::AntialiasedElement antialiasedElement, bool enabled=true); void setNotAntialiasedElements(const QCP::AntialiasedElements ¬AntialiasedElements); void setNotAntialiasedElement(QCP::AntialiasedElement notAntialiasedElement, bool enabled=true); void setAutoAddPlottableToLegend(bool on); void setInteractions(const QCP::Interactions &interactions); void setInteraction(const QCP::Interaction &interaction, bool enabled=true); void setSelectionTolerance(int pixels); void setNoAntialiasingOnDrag(bool enabled); void setPlottingHints(const QCP::PlottingHints &hints); void setPlottingHint(QCP::PlottingHint hint, bool enabled=true); void setMultiSelectModifier(Qt::KeyboardModifier modifier); void setSelectionRectMode(QCP::SelectionRectMode mode); void setSelectionRect(QCPSelectionRect *selectionRect); void setOpenGl(bool enabled, int multisampling=16); // non-property methods: // plottable interface: QCPAbstractPlottable *plottable(int index); QCPAbstractPlottable *plottable(); bool removePlottable(QCPAbstractPlottable *plottable); bool removePlottable(int index); int clearPlottables(); int plottableCount() const; QList selectedPlottables() const; QCPAbstractPlottable *plottableAt(const QPointF &pos, bool onlySelectable=false) const; bool hasPlottable(QCPAbstractPlottable *plottable) const; // specialized interface for QCPGraph: QCPGraph *graph(int index) const; QCPGraph *graph() const; QCPGraph *addGraph(QCPAxis *keyAxis=0, QCPAxis *valueAxis=0); bool removeGraph(QCPGraph *graph); bool removeGraph(int index); int clearGraphs(); int graphCount() const; QList selectedGraphs() const; // item interface: QCPAbstractItem *item(int index) const; QCPAbstractItem *item() const; bool removeItem(QCPAbstractItem *item); bool removeItem(int index); int clearItems(); int itemCount() const; QList selectedItems() const; QCPAbstractItem *itemAt(const QPointF &pos, bool onlySelectable=false) const; bool hasItem(QCPAbstractItem *item) const; // layer interface: QCPLayer *layer(const QString &name) const; QCPLayer *layer(int index) const; QCPLayer *currentLayer() const; bool setCurrentLayer(const QString &name); bool setCurrentLayer(QCPLayer *layer); int layerCount() const; bool addLayer(const QString &name, QCPLayer *otherLayer=0, LayerInsertMode insertMode=limAbove); bool removeLayer(QCPLayer *layer); bool moveLayer(QCPLayer *layer, QCPLayer *otherLayer, LayerInsertMode insertMode=limAbove); // axis rect/layout interface: int axisRectCount() const; QCPAxisRect* axisRect(int index=0) const; QList axisRects() const; QCPLayoutElement* layoutElementAt(const QPointF &pos) const; QCPAxisRect* axisRectAt(const QPointF &pos) const; Q_SLOT void rescaleAxes(bool onlyVisiblePlottables=false); QList selectedAxes() const; QList selectedLegends() const; Q_SLOT void deselectAll(); bool savePdf(const QString &fileName, int width=0, int height=0, QCP::ExportPen exportPen=QCP::epAllowCosmetic, const QString &pdfCreator=QString(), const QString &pdfTitle=QString()); bool savePng(const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch); bool saveJpg(const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch); bool saveBmp(const QString &fileName, int width=0, int height=0, double scale=1.0, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch); bool saveRastered(const QString &fileName, int width, int height, double scale, const char *format, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch); QPixmap toPixmap(int width=0, int height=0, double scale=1.0); void toPainter(QCPPainter *painter, int width=0, int height=0); Q_SLOT void replot(QCustomPlot::RefreshPriority refreshPriority=QCustomPlot::rpRefreshHint); QCPAxis *xAxis, *yAxis, *xAxis2, *yAxis2; QCPLegend *legend; signals: void mouseDoubleClick(QMouseEvent *event); void mousePress(QMouseEvent *event); void mouseMove(QMouseEvent *event); void mouseRelease(QMouseEvent *event); void mouseWheel(QWheelEvent *event); void plottableClick(QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event); void plottableDoubleClick(QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event); void itemClick(QCPAbstractItem *item, QMouseEvent *event); void itemDoubleClick(QCPAbstractItem *item, QMouseEvent *event); void axisClick(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event); void axisDoubleClick(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event); void legendClick(QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event); void legendDoubleClick(QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event); void selectionChangedByUser(); void beforeReplot(); void afterReplot(); protected: // property members: QRect mViewport; double mBufferDevicePixelRatio; QCPLayoutGrid *mPlotLayout; bool mAutoAddPlottableToLegend; QList mPlottables; QList mGraphs; // extra list of plottables also in mPlottables that are of type QCPGraph QList mItems; QList mLayers; QCP::AntialiasedElements mAntialiasedElements, mNotAntialiasedElements; QCP::Interactions mInteractions; int mSelectionTolerance; bool mNoAntialiasingOnDrag; QBrush mBackgroundBrush; QPixmap mBackgroundPixmap; QPixmap mScaledBackgroundPixmap; bool mBackgroundScaled; Qt::AspectRatioMode mBackgroundScaledMode; QCPLayer *mCurrentLayer; QCP::PlottingHints mPlottingHints; Qt::KeyboardModifier mMultiSelectModifier; QCP::SelectionRectMode mSelectionRectMode; QCPSelectionRect *mSelectionRect; bool mOpenGl; // non-property members: QList > mPaintBuffers; QPoint mMousePressPos; bool mMouseHasMoved; QPointer mMouseEventLayerable; QPointer mMouseSignalLayerable; QVariant mMouseEventLayerableDetails; QVariant mMouseSignalLayerableDetails; bool mReplotting; bool mReplotQueued; int mOpenGlMultisamples; QCP::AntialiasedElements mOpenGlAntialiasedElementsBackup; bool mOpenGlCacheLabelsBackup; #ifdef QCP_OPENGL_FBO QSharedPointer mGlContext; QSharedPointer mGlSurface; QSharedPointer mGlPaintDevice; #endif // reimplemented virtual methods: virtual QSize minimumSizeHint() const Q_DECL_OVERRIDE; virtual QSize sizeHint() const Q_DECL_OVERRIDE; virtual void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; virtual void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; virtual void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE; virtual void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; virtual void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; virtual void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE; virtual void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; // introduced virtual methods: virtual void draw(QCPPainter *painter); virtual void updateLayout(); virtual void axisRemoved(QCPAxis *axis); virtual void legendRemoved(QCPLegend *legend); Q_SLOT virtual void processRectSelection(QRect rect, QMouseEvent *event); Q_SLOT virtual void processRectZoom(QRect rect, QMouseEvent *event); Q_SLOT virtual void processPointSelection(QMouseEvent *event); // non-virtual methods: bool registerPlottable(QCPAbstractPlottable *plottable); bool registerGraph(QCPGraph *graph); bool registerItem(QCPAbstractItem* item); void updateLayerIndices() const; QCPLayerable *layerableAt(const QPointF &pos, bool onlySelectable, QVariant *selectionDetails=0) const; QList layerableListAt(const QPointF &pos, bool onlySelectable, QList *selectionDetails=0) const; void drawBackground(QCPPainter *painter); void setupPaintBuffers(); QCPAbstractPaintBuffer *createPaintBuffer(); bool hasInvalidatedPaintBuffers(); bool setupOpenGl(); void freeOpenGl(); friend class QCPLegend; friend class QCPAxis; friend class QCPLayer; friend class QCPAxisRect; friend class QCPAbstractPlottable; friend class QCPGraph; friend class QCPAbstractItem; }; Q_DECLARE_METATYPE(QCustomPlot::LayerInsertMode) Q_DECLARE_METATYPE(QCustomPlot::RefreshPriority) /* end of 'src/core.h' */ /* including file 'src/plottable1d.h', size 4544 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCPPlottableInterface1D { public: virtual ~QCPPlottableInterface1D() {} // introduced pure virtual methods: virtual int dataCount() const = 0; virtual double dataMainKey(int index) const = 0; virtual double dataSortKey(int index) const = 0; virtual double dataMainValue(int index) const = 0; virtual QCPRange dataValueRange(int index) const = 0; virtual QPointF dataPixelPosition(int index) const = 0; virtual bool sortKeyIsMainKey() const = 0; virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const = 0; virtual int findBegin(double sortKey, bool expandedRange=true) const = 0; virtual int findEnd(double sortKey, bool expandedRange=true) const = 0; }; template class QCPAbstractPlottable1D : public QCPAbstractPlottable, public QCPPlottableInterface1D // no QCP_LIB_DECL, template class ends up in header (cpp included below) { // No Q_OBJECT macro due to template class public: QCPAbstractPlottable1D(QCPAxis *keyAxis, QCPAxis *valueAxis); virtual ~QCPAbstractPlottable1D(); // virtual methods of 1d plottable interface: virtual int dataCount() const Q_DECL_OVERRIDE; virtual double dataMainKey(int index) const Q_DECL_OVERRIDE; virtual double dataSortKey(int index) const Q_DECL_OVERRIDE; virtual double dataMainValue(int index) const Q_DECL_OVERRIDE; virtual QCPRange dataValueRange(int index) const Q_DECL_OVERRIDE; virtual QPointF dataPixelPosition(int index) const Q_DECL_OVERRIDE; virtual bool sortKeyIsMainKey() const Q_DECL_OVERRIDE; virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE; virtual int findBegin(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE; virtual int findEnd(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE; // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; virtual QCPPlottableInterface1D *interface1D() Q_DECL_OVERRIDE { return this; } protected: // property members: QSharedPointer > mDataContainer; // helpers for subclasses: void getDataSegments(QList &selectedSegments, QList &unselectedSegments) const; void drawPolyline(QCPPainter *painter, const QVector &lineData) const; private: Q_DISABLE_COPY(QCPAbstractPlottable1D) }; // include implementation in header since it is a class template: /* including file 'src/plottable1d.cpp', size 22240 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPPlottableInterface1D //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPPlottableInterface1D \brief Defines an abstract interface for one-dimensional plottables This class contains only pure virtual methods which define a common interface to the data of one-dimensional plottables. For example, it is implemented by the template class \ref QCPAbstractPlottable1D (the preferred base class for one-dimensional plottables). So if you use that template class as base class of your one-dimensional plottable, you won't have to care about implementing the 1d interface yourself. If your plottable doesn't derive from \ref QCPAbstractPlottable1D but still wants to provide a 1d interface (e.g. like \ref QCPErrorBars does), you should inherit from both \ref QCPAbstractPlottable and \ref QCPPlottableInterface1D and accordingly reimplement the pure virtual methods of the 1d interface, matching your data container. Also, reimplement \ref QCPAbstractPlottable::interface1D to return the \c this pointer. If you have a \ref QCPAbstractPlottable pointer, you can check whether it implements this interface by calling \ref QCPAbstractPlottable::interface1D and testing it for a non-zero return value. If it indeed implements this interface, you may use it to access the plottable's data without needing to know the exact type of the plottable or its data point type. */ /* start documentation of pure virtual functions */ /*! \fn virtual int QCPPlottableInterface1D::dataCount() const = 0; Returns the number of data points of the plottable. */ /*! \fn virtual QCPDataSelection QCPPlottableInterface1D::selectTestRect(const QRectF &rect, bool onlySelectable) const = 0; Returns a data selection containing all the data points of this plottable which are contained (or hit by) \a rect. This is used mainly in the selection rect interaction for data selection (\ref dataselection "data selection mechanism"). If \a onlySelectable is true, an empty QCPDataSelection is returned if this plottable is not selectable (i.e. if \ref QCPAbstractPlottable::setSelectable is \ref QCP::stNone). \note \a rect must be a normalized rect (positive or zero width and height). This is especially important when using the rect of \ref QCPSelectionRect::accepted, which is not necessarily normalized. Use QRect::normalized() when passing a rect which might not be normalized. */ /*! \fn virtual double QCPPlottableInterface1D::dataMainKey(int index) const = 0 Returns the main key of the data point at the given \a index. What the main key is, is defined by the plottable's data type. See the \ref qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming convention. */ /*! \fn virtual double QCPPlottableInterface1D::dataSortKey(int index) const = 0 Returns the sort key of the data point at the given \a index. What the sort key is, is defined by the plottable's data type. See the \ref qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming convention. */ /*! \fn virtual double QCPPlottableInterface1D::dataMainValue(int index) const = 0 Returns the main value of the data point at the given \a index. What the main value is, is defined by the plottable's data type. See the \ref qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming convention. */ /*! \fn virtual QCPRange QCPPlottableInterface1D::dataValueRange(int index) const = 0 Returns the value range of the data point at the given \a index. What the value range is, is defined by the plottable's data type. See the \ref qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming convention. */ /*! \fn virtual QPointF QCPPlottableInterface1D::dataPixelPosition(int index) const = 0 Returns the pixel position on the widget surface at which the data point at the given \a index appears. Usually this corresponds to the point of \ref dataMainKey/\ref dataMainValue, in pixel coordinates. However, depending on the plottable, this might be a different apparent position than just a coord-to-pixel transform of those values. For example, \ref QCPBars apparent data values can be shifted depending on their stacking, bar grouping or configured base value. */ /*! \fn virtual bool QCPPlottableInterface1D::sortKeyIsMainKey() const = 0 Returns whether the sort key (\ref dataSortKey) is identical to the main key (\ref dataMainKey). What the sort and main keys are, is defined by the plottable's data type. See the \ref qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming convention. */ /*! \fn virtual int QCPPlottableInterface1D::findBegin(double sortKey, bool expandedRange) const = 0 Returns the index of the data point with a (sort-)key that is equal to, just below, or just above \a sortKey. If \a expandedRange is true, the data point just below \a sortKey will be considered, otherwise the one just above. This can be used in conjunction with \ref findEnd to iterate over data points within a given key range, including or excluding the bounding data points that are just beyond the specified range. If \a expandedRange is true but there are no data points below \a sortKey, 0 is returned. If the container is empty, returns 0 (in that case, \ref findEnd will also return 0, so a loop using these methods will not iterate over the index 0). \see findEnd, QCPDataContainer::findBegin */ /*! \fn virtual int QCPPlottableInterface1D::findEnd(double sortKey, bool expandedRange) const = 0 Returns the index one after the data point with a (sort-)key that is equal to, just above, or just below \a sortKey. If \a expandedRange is true, the data point just above \a sortKey will be considered, otherwise the one just below. This can be used in conjunction with \ref findBegin to iterate over data points within a given key range, including the bounding data points that are just below and above the specified range. If \a expandedRange is true but there are no data points above \a sortKey, the index just above the highest data point is returned. If the container is empty, returns 0. \see findBegin, QCPDataContainer::findEnd */ /* end documentation of pure virtual functions */ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////// QCPAbstractPlottable1D //////////////////////////////////////////////////////////////////////////////////////////////////// /*! \class QCPAbstractPlottable1D \brief A template base class for plottables with one-dimensional data This template class derives from \ref QCPAbstractPlottable and from the abstract interface \ref QCPPlottableInterface1D. It serves as a base class for all one-dimensional data (i.e. data with one key dimension), such as \ref QCPGraph and QCPCurve. The template parameter \a DataType is the type of the data points of this plottable (e.g. \ref QCPGraphData or \ref QCPCurveData). The main purpose of this base class is to provide the member \a mDataContainer (a shared pointer to a \ref QCPDataContainer "QCPDataContainer") and implement the according virtual methods of the \ref QCPPlottableInterface1D, such that most subclassed plottables don't need to worry about this anymore. Further, it provides a convenience method for retrieving selected/unselected data segments via \ref getDataSegments. This is useful when subclasses implement their \ref draw method and need to draw selected segments with a different pen/brush than unselected segments (also see \ref QCPSelectionDecorator). This class implements basic functionality of \ref QCPAbstractPlottable::selectTest and \ref QCPPlottableInterface1D::selectTestRect, assuming point-like data points, based on the 1D data interface. In spite of that, most plottable subclasses will want to reimplement those methods again, to provide a more accurate hit test based on their specific data visualization geometry. */ /* start documentation of inline functions */ /*! \fn QCPPlottableInterface1D *QCPAbstractPlottable1D::interface1D() Returns a \ref QCPPlottableInterface1D pointer to this plottable, providing access to its 1D interface. \seebaseclassmethod */ /* end documentation of inline functions */ /*! Forwards \a keyAxis and \a valueAxis to the \ref QCPAbstractPlottable::QCPAbstractPlottable "QCPAbstractPlottable" constructor and allocates the \a mDataContainer. */ template QCPAbstractPlottable1D::QCPAbstractPlottable1D(QCPAxis *keyAxis, QCPAxis *valueAxis) : QCPAbstractPlottable(keyAxis, valueAxis), mDataContainer(new QCPDataContainer) { } template QCPAbstractPlottable1D::~QCPAbstractPlottable1D() { } /*! \copydoc QCPPlottableInterface1D::dataCount */ template int QCPAbstractPlottable1D::dataCount() const { return mDataContainer->size(); } /*! \copydoc QCPPlottableInterface1D::dataMainKey */ template double QCPAbstractPlottable1D::dataMainKey(int index) const { if (index >= 0 && index < mDataContainer->size()) { return (mDataContainer->constBegin()+index)->mainKey(); } else { qDebug() << Q_FUNC_INFO << "Index out of bounds" << index; return 0; } } /*! \copydoc QCPPlottableInterface1D::dataSortKey */ template double QCPAbstractPlottable1D::dataSortKey(int index) const { if (index >= 0 && index < mDataContainer->size()) { return (mDataContainer->constBegin()+index)->sortKey(); } else { qDebug() << Q_FUNC_INFO << "Index out of bounds" << index; return 0; } } /*! \copydoc QCPPlottableInterface1D::dataMainValue */ template double QCPAbstractPlottable1D::dataMainValue(int index) const { if (index >= 0 && index < mDataContainer->size()) { return (mDataContainer->constBegin()+index)->mainValue(); } else { qDebug() << Q_FUNC_INFO << "Index out of bounds" << index; return 0; } } /*! \copydoc QCPPlottableInterface1D::dataValueRange */ template QCPRange QCPAbstractPlottable1D::dataValueRange(int index) const { if (index >= 0 && index < mDataContainer->size()) { return (mDataContainer->constBegin()+index)->valueRange(); } else { qDebug() << Q_FUNC_INFO << "Index out of bounds" << index; return QCPRange(0, 0); } } /*! \copydoc QCPPlottableInterface1D::dataPixelPosition */ template QPointF QCPAbstractPlottable1D::dataPixelPosition(int index) const { if (index >= 0 && index < mDataContainer->size()) { const typename QCPDataContainer::const_iterator it = mDataContainer->constBegin()+index; return coordsToPixels(it->mainKey(), it->mainValue()); } else { qDebug() << Q_FUNC_INFO << "Index out of bounds" << index; return QPointF(); } } /*! \copydoc QCPPlottableInterface1D::sortKeyIsMainKey */ template bool QCPAbstractPlottable1D::sortKeyIsMainKey() const { return DataType::sortKeyIsMainKey(); } /*! Implements a rect-selection algorithm assuming the data (accessed via the 1D data interface) is point-like. Most subclasses will want to reimplement this method again, to provide a more accurate hit test based on the true data visualization geometry. \seebaseclassmethod */ template QCPDataSelection QCPAbstractPlottable1D::selectTestRect(const QRectF &rect, bool onlySelectable) const { QCPDataSelection result; if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return result; if (!mKeyAxis || !mValueAxis) return result; // convert rect given in pixels to ranges given in plot coordinates: double key1, value1, key2, value2; pixelsToCoords(rect.topLeft(), key1, value1); pixelsToCoords(rect.bottomRight(), key2, value2); QCPRange keyRange(key1, key2); // QCPRange normalizes internally so we don't have to care about whether key1 < key2 QCPRange valueRange(value1, value2); typename QCPDataContainer::const_iterator begin = mDataContainer->constBegin(); typename QCPDataContainer::const_iterator end = mDataContainer->constEnd(); if (DataType::sortKeyIsMainKey()) // we can assume that data is sorted by main key, so can reduce the searched key interval: { begin = mDataContainer->findBegin(keyRange.lower, false); end = mDataContainer->findEnd(keyRange.upper, false); } if (begin == end) return result; int currentSegmentBegin = -1; // -1 means we're currently not in a segment that's contained in rect for (typename QCPDataContainer::const_iterator it=begin; it!=end; ++it) { if (currentSegmentBegin == -1) { if (valueRange.contains(it->mainValue()) && keyRange.contains(it->mainKey())) // start segment currentSegmentBegin = it-mDataContainer->constBegin(); } else if (!valueRange.contains(it->mainValue()) || !keyRange.contains(it->mainKey())) // segment just ended { result.addDataRange(QCPDataRange(currentSegmentBegin, it-mDataContainer->constBegin()), false); currentSegmentBegin = -1; } } // process potential last segment: if (currentSegmentBegin != -1) result.addDataRange(QCPDataRange(currentSegmentBegin, end-mDataContainer->constBegin()), false); result.simplify(); return result; } /*! \copydoc QCPPlottableInterface1D::findBegin */ template int QCPAbstractPlottable1D::findBegin(double sortKey, bool expandedRange) const { return mDataContainer->findBegin(sortKey, expandedRange)-mDataContainer->constBegin(); } /*! \copydoc QCPPlottableInterface1D::findEnd */ template int QCPAbstractPlottable1D::findEnd(double sortKey, bool expandedRange) const { return mDataContainer->findEnd(sortKey, expandedRange)-mDataContainer->constBegin(); } /*! Implements a point-selection algorithm assuming the data (accessed via the 1D data interface) is point-like. Most subclasses will want to reimplement this method again, to provide a more accurate hit test based on the true data visualization geometry. \seebaseclassmethod */ template double QCPAbstractPlottable1D::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const { if ((onlySelectable && mSelectable == QCP::stNone) || mDataContainer->isEmpty()) return -1; if (!mKeyAxis || !mValueAxis) return -1; QCPDataSelection selectionResult; double minDistSqr = std::numeric_limits::max(); int minDistIndex = mDataContainer->size(); typename QCPDataContainer::const_iterator begin = mDataContainer->constBegin(); typename QCPDataContainer::const_iterator end = mDataContainer->constEnd(); if (DataType::sortKeyIsMainKey()) // we can assume that data is sorted by main key, so can reduce the searched key interval: { // determine which key range comes into question, taking selection tolerance around pos into account: double posKeyMin, posKeyMax, dummy; pixelsToCoords(pos-QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMin, dummy); pixelsToCoords(pos+QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMax, dummy); if (posKeyMin > posKeyMax) qSwap(posKeyMin, posKeyMax); begin = mDataContainer->findBegin(posKeyMin, true); end = mDataContainer->findEnd(posKeyMax, true); } if (begin == end) return -1; QCPRange keyRange(mKeyAxis->range()); QCPRange valueRange(mValueAxis->range()); for (typename QCPDataContainer::const_iterator it=begin; it!=end; ++it) { const double mainKey = it->mainKey(); const double mainValue = it->mainValue(); if (keyRange.contains(mainKey) && valueRange.contains(mainValue)) // make sure data point is inside visible range, for speedup in cases where sort key isn't main key and we iterate over all points { const double currentDistSqr = QCPVector2D(coordsToPixels(mainKey, mainValue)-pos).lengthSquared(); if (currentDistSqr < minDistSqr) { minDistSqr = currentDistSqr; minDistIndex = it-mDataContainer->constBegin(); } } } if (minDistIndex != mDataContainer->size()) selectionResult.addDataRange(QCPDataRange(minDistIndex, minDistIndex+1), false); selectionResult.simplify(); if (details) details->setValue(selectionResult); return qSqrt(minDistSqr); } /*! Splits all data into selected and unselected segments and outputs them via \a selectedSegments and \a unselectedSegments, respectively. This is useful when subclasses implement their \ref draw method and need to draw selected segments with a different pen/brush than unselected segments (also see \ref QCPSelectionDecorator). \see setSelection */ template void QCPAbstractPlottable1D::getDataSegments(QList &selectedSegments, QList &unselectedSegments) const { selectedSegments.clear(); unselectedSegments.clear(); if (mSelectable == QCP::stWhole) // stWhole selection type draws the entire plottable with selected style if mSelection isn't empty { if (selected()) selectedSegments << QCPDataRange(0, dataCount()); else unselectedSegments << QCPDataRange(0, dataCount()); } else { QCPDataSelection sel(selection()); sel.simplify(); selectedSegments = sel.dataRanges(); unselectedSegments = sel.inverse(QCPDataRange(0, dataCount())).dataRanges(); } } /*! A helper method which draws a line with the passed \a painter, according to the pixel data in \a lineData. NaN points create gaps in the line, as expected from QCustomPlot's plottables (this is the main difference to QPainter's regular drawPolyline, which handles NaNs by lagging or crashing). Further it uses a faster line drawing technique based on \ref QCPPainter::drawLine rather than \c QPainter::drawPolyline if the configured \ref QCustomPlot::setPlottingHints() and \a painter style allows. */ template void QCPAbstractPlottable1D::drawPolyline(QCPPainter *painter, const QVector &lineData) const { // if drawing solid line and not in PDF, use much faster line drawing instead of polyline: if (mParentPlot->plottingHints().testFlag(QCP::phFastPolylines) && painter->pen().style() == Qt::SolidLine && !painter->modes().testFlag(QCPPainter::pmVectorized) && !painter->modes().testFlag(QCPPainter::pmNoCaching)) { int i = 0; bool lastIsNan = false; const int lineDataSize = lineData.size(); while (i < lineDataSize && (qIsNaN(lineData.at(i).y()) || qIsNaN(lineData.at(i).x()))) // make sure first point is not NaN ++i; ++i; // because drawing works in 1 point retrospect while (i < lineDataSize) { if (!qIsNaN(lineData.at(i).y()) && !qIsNaN(lineData.at(i).x())) // NaNs create a gap in the line { if (!lastIsNan) painter->drawLine(lineData.at(i-1), lineData.at(i)); else lastIsNan = false; } else lastIsNan = true; ++i; } } else { int segmentStart = 0; int i = 0; const int lineDataSize = lineData.size(); while (i < lineDataSize) { if (qIsNaN(lineData.at(i).y()) || qIsNaN(lineData.at(i).x()) || qIsInf(lineData.at(i).y())) // NaNs create a gap in the line. Also filter Infs which make drawPolyline block { painter->drawPolyline(lineData.constData()+segmentStart, i-segmentStart); // i, because we don't want to include the current NaN point segmentStart = i+1; } ++i; } // draw last segment: painter->drawPolyline(lineData.constData()+segmentStart, lineDataSize-segmentStart); } } /* end of 'src/plottable1d.cpp' */ /* end of 'src/plottable1d.h' */ /* including file 'src/colorgradient.h', size 6243 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPColorGradient { Q_GADGET public: /*! Defines the color spaces in which color interpolation between gradient stops can be performed. \see setColorInterpolation */ enum ColorInterpolation { ciRGB ///< Color channels red, green and blue are linearly interpolated ,ciHSV ///< Color channels hue, saturation and value are linearly interpolated (The hue is interpolated over the shortest angle distance) }; Q_ENUMS(ColorInterpolation) /*! Defines the available presets that can be loaded with \ref loadPreset. See the documentation there for an image of the presets. */ enum GradientPreset { gpGrayscale ///< Continuous lightness from black to white (suited for non-biased data representation) ,gpHot ///< Continuous lightness from black over firey colors to white (suited for non-biased data representation) ,gpCold ///< Continuous lightness from black over icey colors to white (suited for non-biased data representation) ,gpNight ///< Continuous lightness from black over weak blueish colors to white (suited for non-biased data representation) ,gpCandy ///< Blue over pink to white ,gpGeography ///< Colors suitable to represent different elevations on geographical maps ,gpIon ///< Half hue spectrum from black over purple to blue and finally green (creates banding illusion but allows more precise magnitude estimates) ,gpThermal ///< Colors suitable for thermal imaging, ranging from dark blue over purple to orange, yellow and white ,gpPolar ///< Colors suitable to emphasize polarity around the center, with blue for negative, black in the middle and red for positive values ,gpSpectrum ///< An approximation of the visible light spectrum (creates banding illusion but allows more precise magnitude estimates) ,gpJet ///< Hue variation similar to a spectrum, often used in numerical visualization (creates banding illusion but allows more precise magnitude estimates) ,gpHues ///< Full hue cycle, with highest and lowest color red (suitable for periodic data, such as angles and phases, see \ref setPeriodic) }; Q_ENUMS(GradientPreset) QCPColorGradient(); QCPColorGradient(GradientPreset preset); bool operator==(const QCPColorGradient &other) const; bool operator!=(const QCPColorGradient &other) const { return !(*this == other); } // getters: int levelCount() const { return mLevelCount; } QMap colorStops() const { return mColorStops; } ColorInterpolation colorInterpolation() const { return mColorInterpolation; } bool periodic() const { return mPeriodic; } // setters: void setLevelCount(int n); void setColorStops(const QMap &colorStops); void setColorStopAt(double position, const QColor &color); void setColorInterpolation(ColorInterpolation interpolation); void setPeriodic(bool enabled); // non-property methods: void colorize(const double *data, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false); void colorize(const double *data, const unsigned char *alpha, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false); QRgb color(double position, const QCPRange &range, bool logarithmic=false); void loadPreset(GradientPreset preset); void clearColorStops(); QCPColorGradient inverted() const; protected: // property members: int mLevelCount; QMap mColorStops; ColorInterpolation mColorInterpolation; bool mPeriodic; // non-property members: QVector mColorBuffer; // have colors premultiplied with alpha (for usage with QImage::Format_ARGB32_Premultiplied) bool mColorBufferInvalidated; // non-virtual methods: bool stopsUseAlpha() const; void updateColorBuffer(); }; Q_DECLARE_METATYPE(QCPColorGradient::ColorInterpolation) Q_DECLARE_METATYPE(QCPColorGradient::GradientPreset) /* end of 'src/colorgradient.h' */ /* including file 'src/selectiondecorator-bracket.h', size 4442 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPSelectionDecoratorBracket : public QCPSelectionDecorator { Q_GADGET public: /*! Defines which shape is drawn at the boundaries of selected data ranges. Some of the bracket styles further allow specifying a height and/or width, see \ref setBracketHeight and \ref setBracketWidth. */ enum BracketStyle { bsSquareBracket ///< A square bracket is drawn. ,bsHalfEllipse ///< A half ellipse is drawn. The size of the ellipse is given by the bracket width/height properties. ,bsEllipse ///< An ellipse is drawn. The size of the ellipse is given by the bracket width/height properties. ,bsPlus ///< A plus is drawn. ,bsUserStyle ///< Start custom bracket styles at this index when subclassing and reimplementing \ref drawBracket. }; Q_ENUMS(BracketStyle) QCPSelectionDecoratorBracket(); virtual ~QCPSelectionDecoratorBracket(); // getters: QPen bracketPen() const { return mBracketPen; } QBrush bracketBrush() const { return mBracketBrush; } int bracketWidth() const { return mBracketWidth; } int bracketHeight() const { return mBracketHeight; } BracketStyle bracketStyle() const { return mBracketStyle; } bool tangentToData() const { return mTangentToData; } int tangentAverage() const { return mTangentAverage; } // setters: void setBracketPen(const QPen &pen); void setBracketBrush(const QBrush &brush); void setBracketWidth(int width); void setBracketHeight(int height); void setBracketStyle(BracketStyle style); void setTangentToData(bool enabled); void setTangentAverage(int pointCount); // introduced virtual methods: virtual void drawBracket(QCPPainter *painter, int direction) const; // virtual methods: virtual void drawDecoration(QCPPainter *painter, QCPDataSelection selection) Q_DECL_OVERRIDE; protected: // property members: QPen mBracketPen; QBrush mBracketBrush; int mBracketWidth; int mBracketHeight; BracketStyle mBracketStyle; bool mTangentToData; int mTangentAverage; // non-virtual methods: double getTangentAngle(const QCPPlottableInterface1D *interface1d, int dataIndex, int direction) const; QPointF getPixelCoordinates(const QCPPlottableInterface1D *interface1d, int dataIndex) const; }; Q_DECLARE_METATYPE(QCPSelectionDecoratorBracket::BracketStyle) /* end of 'src/selectiondecorator-bracket.h' */ /* including file 'src/layoutelements/layoutelement-axisrect.h', size 7507 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAxisRect : public QCPLayoutElement { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPixmap background READ background WRITE setBackground) Q_PROPERTY(bool backgroundScaled READ backgroundScaled WRITE setBackgroundScaled) Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode WRITE setBackgroundScaledMode) Q_PROPERTY(Qt::Orientations rangeDrag READ rangeDrag WRITE setRangeDrag) Q_PROPERTY(Qt::Orientations rangeZoom READ rangeZoom WRITE setRangeZoom) /// \endcond public: explicit QCPAxisRect(QCustomPlot *parentPlot, bool setupDefaultAxes=true); virtual ~QCPAxisRect(); // getters: QPixmap background() const { return mBackgroundPixmap; } QBrush backgroundBrush() const { return mBackgroundBrush; } bool backgroundScaled() const { return mBackgroundScaled; } Qt::AspectRatioMode backgroundScaledMode() const { return mBackgroundScaledMode; } Qt::Orientations rangeDrag() const { return mRangeDrag; } Qt::Orientations rangeZoom() const { return mRangeZoom; } QCPAxis *rangeDragAxis(Qt::Orientation orientation); QCPAxis *rangeZoomAxis(Qt::Orientation orientation); QList rangeDragAxes(Qt::Orientation orientation); QList rangeZoomAxes(Qt::Orientation orientation); double rangeZoomFactor(Qt::Orientation orientation); // setters: void setBackground(const QPixmap &pm); void setBackground(const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding); void setBackground(const QBrush &brush); void setBackgroundScaled(bool scaled); void setBackgroundScaledMode(Qt::AspectRatioMode mode); void setRangeDrag(Qt::Orientations orientations); void setRangeZoom(Qt::Orientations orientations); void setRangeDragAxes(QCPAxis *horizontal, QCPAxis *vertical); void setRangeDragAxes(QList axes); void setRangeDragAxes(QList horizontal, QList vertical); void setRangeZoomAxes(QCPAxis *horizontal, QCPAxis *vertical); void setRangeZoomAxes(QList axes); void setRangeZoomAxes(QList horizontal, QList vertical); void setRangeZoomFactor(double horizontalFactor, double verticalFactor); void setRangeZoomFactor(double factor); // non-property methods: int axisCount(QCPAxis::AxisType type) const; QCPAxis *axis(QCPAxis::AxisType type, int index=0) const; QList axes(QCPAxis::AxisTypes types) const; QList axes() const; QCPAxis *addAxis(QCPAxis::AxisType type, QCPAxis *axis=0); QList addAxes(QCPAxis::AxisTypes types); bool removeAxis(QCPAxis *axis); QCPLayoutInset *insetLayout() const { return mInsetLayout; } void zoom(const QRectF &pixelRect); void zoom(const QRectF &pixelRect, const QList &affectedAxes); void setupFullAxesBox(bool connectRanges=false); QList plottables() const; QList graphs() const; QList items() const; // read-only interface imitating a QRect: int left() const { return mRect.left(); } int right() const { return mRect.right(); } int top() const { return mRect.top(); } int bottom() const { return mRect.bottom(); } int width() const { return mRect.width(); } int height() const { return mRect.height(); } QSize size() const { return mRect.size(); } QPoint topLeft() const { return mRect.topLeft(); } QPoint topRight() const { return mRect.topRight(); } QPoint bottomLeft() const { return mRect.bottomLeft(); } QPoint bottomRight() const { return mRect.bottomRight(); } QPoint center() const { return mRect.center(); } // reimplemented virtual methods: virtual void update(UpdatePhase phase) Q_DECL_OVERRIDE; virtual QList elements(bool recursive) const Q_DECL_OVERRIDE; protected: // property members: QBrush mBackgroundBrush; QPixmap mBackgroundPixmap; QPixmap mScaledBackgroundPixmap; bool mBackgroundScaled; Qt::AspectRatioMode mBackgroundScaledMode; QCPLayoutInset *mInsetLayout; Qt::Orientations mRangeDrag, mRangeZoom; QList > mRangeDragHorzAxis, mRangeDragVertAxis; QList > mRangeZoomHorzAxis, mRangeZoomVertAxis; double mRangeZoomFactorHorz, mRangeZoomFactorVert; // non-property members: QList mDragStartHorzRange, mDragStartVertRange; QCP::AntialiasedElements mAADragBackup, mNotAADragBackup; bool mDragging; QHash > mAxes; // reimplemented virtual methods: virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual int calculateAutoMargin(QCP::MarginSide side) Q_DECL_OVERRIDE; virtual void layoutChanged() Q_DECL_OVERRIDE; // events: virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE; virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE; virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE; virtual void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; // non-property methods: void drawBackground(QCPPainter *painter); void updateAxesOffset(QCPAxis::AxisType type); private: Q_DISABLE_COPY(QCPAxisRect) friend class QCustomPlot; }; /* end of 'src/layoutelements/layoutelement-axisrect.h' */ /* including file 'src/layoutelements/layoutelement-legend.h', size 10397 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPAbstractLegendItem : public QCPLayoutElement { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QCPLegend* parentLegend READ parentLegend) Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor) Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont) Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor) Q_PROPERTY(bool selectable READ selectable WRITE setSelectable NOTIFY selectionChanged) Q_PROPERTY(bool selected READ selected WRITE setSelected NOTIFY selectableChanged) /// \endcond public: explicit QCPAbstractLegendItem(QCPLegend *parent); // getters: QCPLegend *parentLegend() const { return mParentLegend; } QFont font() const { return mFont; } QColor textColor() const { return mTextColor; } QFont selectedFont() const { return mSelectedFont; } QColor selectedTextColor() const { return mSelectedTextColor; } bool selectable() const { return mSelectable; } bool selected() const { return mSelected; } // setters: void setFont(const QFont &font); void setTextColor(const QColor &color); void setSelectedFont(const QFont &font); void setSelectedTextColor(const QColor &color); Q_SLOT void setSelectable(bool selectable); Q_SLOT void setSelected(bool selected); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; signals: void selectionChanged(bool selected); void selectableChanged(bool selectable); protected: // property members: QCPLegend *mParentLegend; QFont mFont; QColor mTextColor; QFont mSelectedFont; QColor mSelectedTextColor; bool mSelectable, mSelected; // reimplemented virtual methods: virtual QCP::Interaction selectionCategory() const Q_DECL_OVERRIDE; virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE; virtual QRect clipRect() const Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE = 0; // events: virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE; virtual void deselectEvent(bool *selectionStateChanged) Q_DECL_OVERRIDE; private: Q_DISABLE_COPY(QCPAbstractLegendItem) friend class QCPLegend; }; class QCP_LIB_DECL QCPPlottableLegendItem : public QCPAbstractLegendItem { Q_OBJECT public: QCPPlottableLegendItem(QCPLegend *parent, QCPAbstractPlottable *plottable); // getters: QCPAbstractPlottable *plottable() { return mPlottable; } protected: // property members: QCPAbstractPlottable *mPlottable; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual QSize minimumOuterSizeHint() const Q_DECL_OVERRIDE; // non-virtual methods: QPen getIconBorderPen() const; QColor getTextColor() const; QFont getFont() const; }; class QCP_LIB_DECL QCPLegend : public QCPLayoutGrid { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPen borderPen READ borderPen WRITE setBorderPen) Q_PROPERTY(QBrush brush READ brush WRITE setBrush) Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor) Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize) Q_PROPERTY(int iconTextPadding READ iconTextPadding WRITE setIconTextPadding) Q_PROPERTY(QPen iconBorderPen READ iconBorderPen WRITE setIconBorderPen) Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE setSelectableParts NOTIFY selectionChanged) Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE setSelectedParts NOTIFY selectableChanged) Q_PROPERTY(QPen selectedBorderPen READ selectedBorderPen WRITE setSelectedBorderPen) Q_PROPERTY(QPen selectedIconBorderPen READ selectedIconBorderPen WRITE setSelectedIconBorderPen) Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush) Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont) Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor) /// \endcond public: /*! Defines the selectable parts of a legend \see setSelectedParts, setSelectableParts */ enum SelectablePart { spNone = 0x000 ///< 0x000 None ,spLegendBox = 0x001 ///< 0x001 The legend box (frame) ,spItems = 0x002 ///< 0x002 Legend items individually (see \ref selectedItems) }; Q_ENUMS(SelectablePart) Q_FLAGS(SelectableParts) Q_DECLARE_FLAGS(SelectableParts, SelectablePart) explicit QCPLegend(); virtual ~QCPLegend(); // getters: QPen borderPen() const { return mBorderPen; } QBrush brush() const { return mBrush; } QFont font() const { return mFont; } QColor textColor() const { return mTextColor; } QSize iconSize() const { return mIconSize; } int iconTextPadding() const { return mIconTextPadding; } QPen iconBorderPen() const { return mIconBorderPen; } SelectableParts selectableParts() const { return mSelectableParts; } SelectableParts selectedParts() const; QPen selectedBorderPen() const { return mSelectedBorderPen; } QPen selectedIconBorderPen() const { return mSelectedIconBorderPen; } QBrush selectedBrush() const { return mSelectedBrush; } QFont selectedFont() const { return mSelectedFont; } QColor selectedTextColor() const { return mSelectedTextColor; } // setters: void setBorderPen(const QPen &pen); void setBrush(const QBrush &brush); void setFont(const QFont &font); void setTextColor(const QColor &color); void setIconSize(const QSize &size); void setIconSize(int width, int height); void setIconTextPadding(int padding); void setIconBorderPen(const QPen &pen); Q_SLOT void setSelectableParts(const SelectableParts &selectableParts); Q_SLOT void setSelectedParts(const SelectableParts &selectedParts); void setSelectedBorderPen(const QPen &pen); void setSelectedIconBorderPen(const QPen &pen); void setSelectedBrush(const QBrush &brush); void setSelectedFont(const QFont &font); void setSelectedTextColor(const QColor &color); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; // non-virtual methods: QCPAbstractLegendItem *item(int index) const; QCPPlottableLegendItem *itemWithPlottable(const QCPAbstractPlottable *plottable) const; int itemCount() const; bool hasItem(QCPAbstractLegendItem *item) const; bool hasItemWithPlottable(const QCPAbstractPlottable *plottable) const; bool addItem(QCPAbstractLegendItem *item); bool removeItem(int index); bool removeItem(QCPAbstractLegendItem *item); void clearItems(); QList selectedItems() const; signals: void selectionChanged(QCPLegend::SelectableParts parts); void selectableChanged(QCPLegend::SelectableParts parts); protected: // property members: QPen mBorderPen, mIconBorderPen; QBrush mBrush; QFont mFont; QColor mTextColor; QSize mIconSize; int mIconTextPadding; SelectableParts mSelectedParts, mSelectableParts; QPen mSelectedBorderPen, mSelectedIconBorderPen; QBrush mSelectedBrush; QFont mSelectedFont; QColor mSelectedTextColor; // reimplemented virtual methods: virtual void parentPlotInitialized(QCustomPlot *parentPlot) Q_DECL_OVERRIDE; virtual QCP::Interaction selectionCategory() const Q_DECL_OVERRIDE; virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; // events: virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE; virtual void deselectEvent(bool *selectionStateChanged) Q_DECL_OVERRIDE; // non-virtual methods: QPen getBorderPen() const; QBrush getBrush() const; private: Q_DISABLE_COPY(QCPLegend) friend class QCustomPlot; friend class QCPAbstractLegendItem; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QCPLegend::SelectableParts) Q_DECLARE_METATYPE(QCPLegend::SelectablePart) /* end of 'src/layoutelements/layoutelement-legend.h' */ /* including file 'src/layoutelements/layoutelement-textelement.h', size 5353 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPTextElement : public QCPLayoutElement { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QString text READ text WRITE setText) Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor) Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont) Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor) Q_PROPERTY(bool selectable READ selectable WRITE setSelectable NOTIFY selectableChanged) Q_PROPERTY(bool selected READ selected WRITE setSelected NOTIFY selectionChanged) /// \endcond public: explicit QCPTextElement(QCustomPlot *parentPlot); QCPTextElement(QCustomPlot *parentPlot, const QString &text); QCPTextElement(QCustomPlot *parentPlot, const QString &text, double pointSize); QCPTextElement(QCustomPlot *parentPlot, const QString &text, const QString &fontFamily, double pointSize); QCPTextElement(QCustomPlot *parentPlot, const QString &text, const QFont &font); // getters: QString text() const { return mText; } int textFlags() const { return mTextFlags; } QFont font() const { return mFont; } QColor textColor() const { return mTextColor; } QFont selectedFont() const { return mSelectedFont; } QColor selectedTextColor() const { return mSelectedTextColor; } bool selectable() const { return mSelectable; } bool selected() const { return mSelected; } // setters: void setText(const QString &text); void setTextFlags(int flags); void setFont(const QFont &font); void setTextColor(const QColor &color); void setSelectedFont(const QFont &font); void setSelectedTextColor(const QColor &color); Q_SLOT void setSelectable(bool selectable); Q_SLOT void setSelected(bool selected); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE; virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE; virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE; signals: void selectionChanged(bool selected); void selectableChanged(bool selectable); void clicked(QMouseEvent *event); void doubleClicked(QMouseEvent *event); protected: // property members: QString mText; int mTextFlags; QFont mFont; QColor mTextColor; QFont mSelectedFont; QColor mSelectedTextColor; QRect mTextBoundingRect; bool mSelectable, mSelected; // reimplemented virtual methods: virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE; virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual QSize minimumOuterSizeHint() const Q_DECL_OVERRIDE; virtual QSize maximumOuterSizeHint() const Q_DECL_OVERRIDE; // events: virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE; virtual void deselectEvent(bool *selectionStateChanged) Q_DECL_OVERRIDE; // non-virtual methods: QFont mainFont() const; QColor mainTextColor() const; private: Q_DISABLE_COPY(QCPTextElement) }; /* end of 'src/layoutelements/layoutelement-textelement.h' */ /* including file 'src/layoutelements/layoutelement-colorscale.h', size 5923 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCPColorScaleAxisRectPrivate : public QCPAxisRect { Q_OBJECT public: explicit QCPColorScaleAxisRectPrivate(QCPColorScale *parentColorScale); protected: QCPColorScale *mParentColorScale; QImage mGradientImage; bool mGradientImageInvalidated; // re-using some methods of QCPAxisRect to make them available to friend class QCPColorScale using QCPAxisRect::calculateAutoMargin; using QCPAxisRect::mousePressEvent; using QCPAxisRect::mouseMoveEvent; using QCPAxisRect::mouseReleaseEvent; using QCPAxisRect::wheelEvent; using QCPAxisRect::update; virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; void updateGradientImage(); Q_SLOT void axisSelectionChanged(QCPAxis::SelectableParts selectedParts); Q_SLOT void axisSelectableChanged(QCPAxis::SelectableParts selectableParts); friend class QCPColorScale; }; class QCP_LIB_DECL QCPColorScale : public QCPLayoutElement { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QCPAxis::AxisType type READ type WRITE setType) Q_PROPERTY(QCPRange dataRange READ dataRange WRITE setDataRange NOTIFY dataRangeChanged) Q_PROPERTY(QCPAxis::ScaleType dataScaleType READ dataScaleType WRITE setDataScaleType NOTIFY dataScaleTypeChanged) Q_PROPERTY(QCPColorGradient gradient READ gradient WRITE setGradient NOTIFY gradientChanged) Q_PROPERTY(QString label READ label WRITE setLabel) Q_PROPERTY(int barWidth READ barWidth WRITE setBarWidth) Q_PROPERTY(bool rangeDrag READ rangeDrag WRITE setRangeDrag) Q_PROPERTY(bool rangeZoom READ rangeZoom WRITE setRangeZoom) /// \endcond public: explicit QCPColorScale(QCustomPlot *parentPlot); virtual ~QCPColorScale(); // getters: QCPAxis *axis() const { return mColorAxis.data(); } QCPAxis::AxisType type() const { return mType; } QCPRange dataRange() const { return mDataRange; } QCPAxis::ScaleType dataScaleType() const { return mDataScaleType; } QCPColorGradient gradient() const { return mGradient; } QString label() const; int barWidth () const { return mBarWidth; } bool rangeDrag() const; bool rangeZoom() const; // setters: void setType(QCPAxis::AxisType type); Q_SLOT void setDataRange(const QCPRange &dataRange); Q_SLOT void setDataScaleType(QCPAxis::ScaleType scaleType); Q_SLOT void setGradient(const QCPColorGradient &gradient); void setLabel(const QString &str); void setBarWidth(int width); void setRangeDrag(bool enabled); void setRangeZoom(bool enabled); // non-property methods: QList colorMaps() const; void rescaleDataRange(bool onlyVisibleMaps); // reimplemented virtual methods: virtual void update(UpdatePhase phase) Q_DECL_OVERRIDE; signals: void dataRangeChanged(const QCPRange &newRange); void dataScaleTypeChanged(QCPAxis::ScaleType scaleType); void gradientChanged(const QCPColorGradient &newGradient); protected: // property members: QCPAxis::AxisType mType; QCPRange mDataRange; QCPAxis::ScaleType mDataScaleType; QCPColorGradient mGradient; int mBarWidth; // non-property members: QPointer mAxisRect; QPointer mColorAxis; // reimplemented virtual methods: virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE; // events: virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE; virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE; virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE; virtual void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; private: Q_DISABLE_COPY(QCPColorScale) friend class QCPColorScaleAxisRectPrivate; }; /* end of 'src/layoutelements/layoutelement-colorscale.h' */ /* including file 'src/plottables/plottable-graph.h', size 9294 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPGraphData { public: QCPGraphData(); QCPGraphData(double key, double value); inline double sortKey() const { return key; } inline static QCPGraphData fromSortKey(double sortKey) { return QCPGraphData(sortKey, 0); } inline static bool sortKeyIsMainKey() { return true; } inline double mainKey() const { return key; } inline double mainValue() const { return value; } inline QCPRange valueRange() const { return QCPRange(value, value); } double key, value; }; Q_DECLARE_TYPEINFO(QCPGraphData, Q_PRIMITIVE_TYPE); /*! \typedef QCPGraphDataContainer Container for storing \ref QCPGraphData points. The data is stored sorted by \a key. This template instantiation is the container in which QCPGraph holds its data. For details about the generic container, see the documentation of the class template \ref QCPDataContainer. \see QCPGraphData, QCPGraph::setData */ typedef QCPDataContainer QCPGraphDataContainer; class QCP_LIB_DECL QCPGraph : public QCPAbstractPlottable1D { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(LineStyle lineStyle READ lineStyle WRITE setLineStyle) Q_PROPERTY(QCPScatterStyle scatterStyle READ scatterStyle WRITE setScatterStyle) Q_PROPERTY(int scatterSkip READ scatterSkip WRITE setScatterSkip) Q_PROPERTY(QCPGraph* channelFillGraph READ channelFillGraph WRITE setChannelFillGraph) Q_PROPERTY(bool adaptiveSampling READ adaptiveSampling WRITE setAdaptiveSampling) /// \endcond public: /*! Defines how the graph's line is represented visually in the plot. The line is drawn with the current pen of the graph (\ref setPen). \see setLineStyle */ enum LineStyle { lsNone ///< data points are not connected with any lines (e.g. data only represented ///< with symbols according to the scatter style, see \ref setScatterStyle) ,lsLine ///< data points are connected by a straight line ,lsStepLeft ///< line is drawn as steps where the step height is the value of the left data point ,lsStepRight ///< line is drawn as steps where the step height is the value of the right data point ,lsStepCenter ///< line is drawn as steps where the step is in between two data points ,lsImpulse ///< each data point is represented by a line parallel to the value axis, which reaches from the data point to the zero-value-line }; Q_ENUMS(LineStyle) explicit QCPGraph(QCPAxis *keyAxis, QCPAxis *valueAxis); virtual ~QCPGraph(); // getters: QSharedPointer data() const { return mDataContainer; } LineStyle lineStyle() const { return mLineStyle; } QCPScatterStyle scatterStyle() const { return mScatterStyle; } int scatterSkip() const { return mScatterSkip; } QCPGraph *channelFillGraph() const { return mChannelFillGraph.data(); } bool adaptiveSampling() const { return mAdaptiveSampling; } // setters: void setData(QSharedPointer data); void setData(const QVector &keys, const QVector &values, bool alreadySorted=false); void setLineStyle(LineStyle ls); void setScatterStyle(const QCPScatterStyle &style); void setScatterSkip(int skip); void setChannelFillGraph(QCPGraph *targetGraph); void setAdaptiveSampling(bool enabled); // non-property methods: void addData(const QVector &keys, const QVector &values, bool alreadySorted=false); void addData(double key, double value); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE; virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE; protected: // property members: LineStyle mLineStyle; QCPScatterStyle mScatterStyle; int mScatterSkip; QPointer mChannelFillGraph; bool mAdaptiveSampling; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE; // introduced virtual methods: virtual void drawFill(QCPPainter *painter, QVector *lines) const; virtual void drawScatterPlot(QCPPainter *painter, const QVector &scatters, const QCPScatterStyle &style) const; virtual void drawLinePlot(QCPPainter *painter, const QVector &lines) const; virtual void drawImpulsePlot(QCPPainter *painter, const QVector &lines) const; virtual void getOptimizedLineData(QVector *lineData, const QCPGraphDataContainer::const_iterator &begin, const QCPGraphDataContainer::const_iterator &end) const; virtual void getOptimizedScatterData(QVector *scatterData, QCPGraphDataContainer::const_iterator begin, QCPGraphDataContainer::const_iterator end) const; // non-virtual methods: void getVisibleDataBounds(QCPGraphDataContainer::const_iterator &begin, QCPGraphDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const; void getLines(QVector *lines, const QCPDataRange &dataRange) const; void getScatters(QVector *scatters, const QCPDataRange &dataRange) const; QVector dataToLines(const QVector &data) const; QVector dataToStepLeftLines(const QVector &data) const; QVector dataToStepRightLines(const QVector &data) const; QVector dataToStepCenterLines(const QVector &data) const; QVector dataToImpulseLines(const QVector &data) const; QVector getNonNanSegments(const QVector *lineData, Qt::Orientation keyOrientation) const; QVector > getOverlappingSegments(QVector thisSegments, const QVector *thisData, QVector otherSegments, const QVector *otherData) const; bool segmentsIntersect(double aLower, double aUpper, double bLower, double bUpper, int &bPrecedence) const; QPointF getFillBasePoint(QPointF matchingDataPoint) const; const QPolygonF getFillPolygon(const QVector *lineData, QCPDataRange segment) const; const QPolygonF getChannelFillPolygon(const QVector *lineData, QCPDataRange thisSegment, const QVector *otherData, QCPDataRange otherSegment) const; int findIndexBelowX(const QVector *data, double x) const; int findIndexAboveX(const QVector *data, double x) const; int findIndexBelowY(const QVector *data, double y) const; int findIndexAboveY(const QVector *data, double y) const; double pointDistance(const QPointF &pixelPoint, QCPGraphDataContainer::const_iterator &closestData) const; friend class QCustomPlot; friend class QCPLegend; }; Q_DECLARE_METATYPE(QCPGraph::LineStyle) /* end of 'src/plottables/plottable-graph.h' */ /* including file 'src/plottables/plottable-curve.h', size 7409 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPCurveData { public: QCPCurveData(); QCPCurveData(double t, double key, double value); inline double sortKey() const { return t; } inline static QCPCurveData fromSortKey(double sortKey) { return QCPCurveData(sortKey, 0, 0); } inline static bool sortKeyIsMainKey() { return false; } inline double mainKey() const { return key; } inline double mainValue() const { return value; } inline QCPRange valueRange() const { return QCPRange(value, value); } double t, key, value; }; Q_DECLARE_TYPEINFO(QCPCurveData, Q_PRIMITIVE_TYPE); /*! \typedef QCPCurveDataContainer Container for storing \ref QCPCurveData points. The data is stored sorted by \a t, so the \a sortKey() (returning \a t) is different from \a mainKey() (returning \a key). This template instantiation is the container in which QCPCurve holds its data. For details about the generic container, see the documentation of the class template \ref QCPDataContainer. \see QCPCurveData, QCPCurve::setData */ typedef QCPDataContainer QCPCurveDataContainer; class QCP_LIB_DECL QCPCurve : public QCPAbstractPlottable1D { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QCPScatterStyle scatterStyle READ scatterStyle WRITE setScatterStyle) Q_PROPERTY(int scatterSkip READ scatterSkip WRITE setScatterSkip) Q_PROPERTY(LineStyle lineStyle READ lineStyle WRITE setLineStyle) /// \endcond public: /*! Defines how the curve's line is represented visually in the plot. The line is drawn with the current pen of the curve (\ref setPen). \see setLineStyle */ enum LineStyle { lsNone ///< No line is drawn between data points (e.g. only scatters) ,lsLine ///< Data points are connected with a straight line }; Q_ENUMS(LineStyle) explicit QCPCurve(QCPAxis *keyAxis, QCPAxis *valueAxis); virtual ~QCPCurve(); // getters: QSharedPointer data() const { return mDataContainer; } QCPScatterStyle scatterStyle() const { return mScatterStyle; } int scatterSkip() const { return mScatterSkip; } LineStyle lineStyle() const { return mLineStyle; } // setters: void setData(QSharedPointer data); void setData(const QVector &t, const QVector &keys, const QVector &values, bool alreadySorted=false); void setData(const QVector &keys, const QVector &values); void setScatterStyle(const QCPScatterStyle &style); void setScatterSkip(int skip); void setLineStyle(LineStyle style); // non-property methods: void addData(const QVector &t, const QVector &keys, const QVector &values, bool alreadySorted=false); void addData(const QVector &keys, const QVector &values); void addData(double t, double key, double value); void addData(double key, double value); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE; virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE; protected: // property members: QCPScatterStyle mScatterStyle; int mScatterSkip; LineStyle mLineStyle; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE; // introduced virtual methods: virtual void drawCurveLine(QCPPainter *painter, const QVector &lines) const; virtual void drawScatterPlot(QCPPainter *painter, const QVector &points, const QCPScatterStyle &style) const; // non-virtual methods: void getCurveLines(QVector *lines, const QCPDataRange &dataRange, double penWidth) const; void getScatters(QVector *scatters, const QCPDataRange &dataRange, double scatterWidth) const; int getRegion(double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const; QPointF getOptimizedPoint(int prevRegion, double prevKey, double prevValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const; QVector getOptimizedCornerPoints(int prevRegion, int currentRegion, double prevKey, double prevValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const; bool mayTraverse(int prevRegion, int currentRegion) const; bool getTraverse(double prevKey, double prevValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin, QPointF &crossA, QPointF &crossB) const; void getTraverseCornerPoints(int prevRegion, int currentRegion, double keyMin, double valueMax, double keyMax, double valueMin, QVector &beforeTraverse, QVector &afterTraverse) const; double pointDistance(const QPointF &pixelPoint, QCPCurveDataContainer::const_iterator &closestData) const; friend class QCustomPlot; friend class QCPLegend; }; Q_DECLARE_METATYPE(QCPCurve::LineStyle) /* end of 'src/plottables/plottable-curve.h' */ /* including file 'src/plottables/plottable-bars.h', size 8924 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPBarsGroup : public QObject { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(SpacingType spacingType READ spacingType WRITE setSpacingType) Q_PROPERTY(double spacing READ spacing WRITE setSpacing) /// \endcond public: /*! Defines the ways the spacing between bars in the group can be specified. Thus it defines what the number passed to \ref setSpacing actually means. \see setSpacingType, setSpacing */ enum SpacingType { stAbsolute ///< Bar spacing is in absolute pixels ,stAxisRectRatio ///< Bar spacing is given by a fraction of the axis rect size ,stPlotCoords ///< Bar spacing is in key coordinates and thus scales with the key axis range }; Q_ENUMS(SpacingType) QCPBarsGroup(QCustomPlot *parentPlot); virtual ~QCPBarsGroup(); // getters: SpacingType spacingType() const { return mSpacingType; } double spacing() const { return mSpacing; } // setters: void setSpacingType(SpacingType spacingType); void setSpacing(double spacing); // non-virtual methods: QList bars() const { return mBars; } QCPBars* bars(int index) const; int size() const { return mBars.size(); } bool isEmpty() const { return mBars.isEmpty(); } void clear(); bool contains(QCPBars *bars) const { return mBars.contains(bars); } void append(QCPBars *bars); void insert(int i, QCPBars *bars); void remove(QCPBars *bars); protected: // non-property members: QCustomPlot *mParentPlot; SpacingType mSpacingType; double mSpacing; QList mBars; // non-virtual methods: void registerBars(QCPBars *bars); void unregisterBars(QCPBars *bars); // virtual methods: double keyPixelOffset(const QCPBars *bars, double keyCoord); double getPixelSpacing(const QCPBars *bars, double keyCoord); private: Q_DISABLE_COPY(QCPBarsGroup) friend class QCPBars; }; Q_DECLARE_METATYPE(QCPBarsGroup::SpacingType) class QCP_LIB_DECL QCPBarsData { public: QCPBarsData(); QCPBarsData(double key, double value); inline double sortKey() const { return key; } inline static QCPBarsData fromSortKey(double sortKey) { return QCPBarsData(sortKey, 0); } inline static bool sortKeyIsMainKey() { return true; } inline double mainKey() const { return key; } inline double mainValue() const { return value; } inline QCPRange valueRange() const { return QCPRange(value, value); } // note that bar base value isn't held in each QCPBarsData and thus can't/shouldn't be returned here double key, value; }; Q_DECLARE_TYPEINFO(QCPBarsData, Q_PRIMITIVE_TYPE); /*! \typedef QCPBarsDataContainer Container for storing \ref QCPBarsData points. The data is stored sorted by \a key. This template instantiation is the container in which QCPBars holds its data. For details about the generic container, see the documentation of the class template \ref QCPDataContainer. \see QCPBarsData, QCPBars::setData */ typedef QCPDataContainer QCPBarsDataContainer; class QCP_LIB_DECL QCPBars : public QCPAbstractPlottable1D { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(double width READ width WRITE setWidth) Q_PROPERTY(WidthType widthType READ widthType WRITE setWidthType) Q_PROPERTY(QCPBarsGroup* barsGroup READ barsGroup WRITE setBarsGroup) Q_PROPERTY(double baseValue READ baseValue WRITE setBaseValue) Q_PROPERTY(double stackingGap READ stackingGap WRITE setStackingGap) Q_PROPERTY(QCPBars* barBelow READ barBelow) Q_PROPERTY(QCPBars* barAbove READ barAbove) /// \endcond public: /*! Defines the ways the width of the bar can be specified. Thus it defines what the number passed to \ref setWidth actually means. \see setWidthType, setWidth */ enum WidthType { wtAbsolute ///< Bar width is in absolute pixels ,wtAxisRectRatio ///< Bar width is given by a fraction of the axis rect size ,wtPlotCoords ///< Bar width is in key coordinates and thus scales with the key axis range }; Q_ENUMS(WidthType) explicit QCPBars(QCPAxis *keyAxis, QCPAxis *valueAxis); virtual ~QCPBars(); // getters: double width() const { return mWidth; } WidthType widthType() const { return mWidthType; } QCPBarsGroup *barsGroup() const { return mBarsGroup; } double baseValue() const { return mBaseValue; } double stackingGap() const { return mStackingGap; } QCPBars *barBelow() const { return mBarBelow.data(); } QCPBars *barAbove() const { return mBarAbove.data(); } QSharedPointer data() const { return mDataContainer; } // setters: void setData(QSharedPointer data); void setData(const QVector &keys, const QVector &values, bool alreadySorted=false); void setWidth(double width); void setWidthType(WidthType widthType); void setBarsGroup(QCPBarsGroup *barsGroup); void setBaseValue(double baseValue); void setStackingGap(double pixels); // non-property methods: void addData(const QVector &keys, const QVector &values, bool alreadySorted=false); void addData(double key, double value); void moveBelow(QCPBars *bars); void moveAbove(QCPBars *bars); // reimplemented virtual methods: virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE; virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE; virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE; virtual QPointF dataPixelPosition(int index) const Q_DECL_OVERRIDE; protected: // property members: double mWidth; WidthType mWidthType; QCPBarsGroup *mBarsGroup; double mBaseValue; double mStackingGap; QPointer mBarBelow, mBarAbove; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE; // non-virtual methods: void getVisibleDataBounds(QCPBarsDataContainer::const_iterator &begin, QCPBarsDataContainer::const_iterator &end) const; QRectF getBarRect(double key, double value) const; void getPixelWidth(double key, double &lower, double &upper) const; double getStackedBaseValue(double key, bool positive) const; static void connectBars(QCPBars* lower, QCPBars* upper); friend class QCustomPlot; friend class QCPLegend; friend class QCPBarsGroup; }; Q_DECLARE_METATYPE(QCPBars::WidthType) /* end of 'src/plottables/plottable-bars.h' */ /* including file 'src/plottables/plottable-statisticalbox.h', size 7516 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPStatisticalBoxData { public: QCPStatisticalBoxData(); QCPStatisticalBoxData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector& outliers=QVector()); inline double sortKey() const { return key; } inline static QCPStatisticalBoxData fromSortKey(double sortKey) { return QCPStatisticalBoxData(sortKey, 0, 0, 0, 0, 0); } inline static bool sortKeyIsMainKey() { return true; } inline double mainKey() const { return key; } inline double mainValue() const { return median; } inline QCPRange valueRange() const { QCPRange result(minimum, maximum); for (QVector::const_iterator it = outliers.constBegin(); it != outliers.constEnd(); ++it) result.expand(*it); return result; } double key, minimum, lowerQuartile, median, upperQuartile, maximum; QVector outliers; }; Q_DECLARE_TYPEINFO(QCPStatisticalBoxData, Q_MOVABLE_TYPE); /*! \typedef QCPStatisticalBoxDataContainer Container for storing \ref QCPStatisticalBoxData points. The data is stored sorted by \a key. This template instantiation is the container in which QCPStatisticalBox holds its data. For details about the generic container, see the documentation of the class template \ref QCPDataContainer. \see QCPStatisticalBoxData, QCPStatisticalBox::setData */ typedef QCPDataContainer QCPStatisticalBoxDataContainer; class QCP_LIB_DECL QCPStatisticalBox : public QCPAbstractPlottable1D { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(double width READ width WRITE setWidth) Q_PROPERTY(double whiskerWidth READ whiskerWidth WRITE setWhiskerWidth) Q_PROPERTY(QPen whiskerPen READ whiskerPen WRITE setWhiskerPen) Q_PROPERTY(QPen whiskerBarPen READ whiskerBarPen WRITE setWhiskerBarPen) Q_PROPERTY(bool whiskerAntialiased READ whiskerAntialiased WRITE setWhiskerAntialiased) Q_PROPERTY(QPen medianPen READ medianPen WRITE setMedianPen) Q_PROPERTY(QCPScatterStyle outlierStyle READ outlierStyle WRITE setOutlierStyle) /// \endcond public: explicit QCPStatisticalBox(QCPAxis *keyAxis, QCPAxis *valueAxis); // getters: QSharedPointer data() const { return mDataContainer; } double width() const { return mWidth; } double whiskerWidth() const { return mWhiskerWidth; } QPen whiskerPen() const { return mWhiskerPen; } QPen whiskerBarPen() const { return mWhiskerBarPen; } bool whiskerAntialiased() const { return mWhiskerAntialiased; } QPen medianPen() const { return mMedianPen; } QCPScatterStyle outlierStyle() const { return mOutlierStyle; } // setters: void setData(QSharedPointer data); void setData(const QVector &keys, const QVector &minimum, const QVector &lowerQuartile, const QVector &median, const QVector &upperQuartile, const QVector &maximum, bool alreadySorted=false); void setWidth(double width); void setWhiskerWidth(double width); void setWhiskerPen(const QPen &pen); void setWhiskerBarPen(const QPen &pen); void setWhiskerAntialiased(bool enabled); void setMedianPen(const QPen &pen); void setOutlierStyle(const QCPScatterStyle &style); // non-property methods: void addData(const QVector &keys, const QVector &minimum, const QVector &lowerQuartile, const QVector &median, const QVector &upperQuartile, const QVector &maximum, bool alreadySorted=false); void addData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector &outliers=QVector()); // reimplemented virtual methods: virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE; virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE; virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE; protected: // property members: double mWidth; double mWhiskerWidth; QPen mWhiskerPen, mWhiskerBarPen; bool mWhiskerAntialiased; QPen mMedianPen; QCPScatterStyle mOutlierStyle; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE; // introduced virtual methods: virtual void drawStatisticalBox(QCPPainter *painter, QCPStatisticalBoxDataContainer::const_iterator it, const QCPScatterStyle &outlierStyle) const; // non-virtual methods: void getVisibleDataBounds(QCPStatisticalBoxDataContainer::const_iterator &begin, QCPStatisticalBoxDataContainer::const_iterator &end) const; QRectF getQuartileBox(QCPStatisticalBoxDataContainer::const_iterator it) const; QVector getWhiskerBackboneLines(QCPStatisticalBoxDataContainer::const_iterator it) const; QVector getWhiskerBarLines(QCPStatisticalBoxDataContainer::const_iterator it) const; friend class QCustomPlot; friend class QCPLegend; }; /* end of 'src/plottables/plottable-statisticalbox.h' */ /* including file 'src/plottables/plottable-colormap.h', size 7070 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPColorMapData { public: QCPColorMapData(int keySize, int valueSize, const QCPRange &keyRange, const QCPRange &valueRange); ~QCPColorMapData(); QCPColorMapData(const QCPColorMapData &other); QCPColorMapData &operator=(const QCPColorMapData &other); // getters: int keySize() const { return mKeySize; } int valueSize() const { return mValueSize; } QCPRange keyRange() const { return mKeyRange; } QCPRange valueRange() const { return mValueRange; } QCPRange dataBounds() const { return mDataBounds; } double data(double key, double value); double cell(int keyIndex, int valueIndex); unsigned char alpha(int keyIndex, int valueIndex); // setters: void setSize(int keySize, int valueSize); void setKeySize(int keySize); void setValueSize(int valueSize); void setRange(const QCPRange &keyRange, const QCPRange &valueRange); void setKeyRange(const QCPRange &keyRange); void setValueRange(const QCPRange &valueRange); void setData(double key, double value, double z); void setCell(int keyIndex, int valueIndex, double z); void setAlpha(int keyIndex, int valueIndex, unsigned char alpha); // non-property methods: void recalculateDataBounds(); void clear(); void clearAlpha(); void fill(double z); void fillAlpha(unsigned char alpha); bool isEmpty() const { return mIsEmpty; } void coordToCell(double key, double value, int *keyIndex, int *valueIndex) const; void cellToCoord(int keyIndex, int valueIndex, double *key, double *value) const; protected: // property members: int mKeySize, mValueSize; QCPRange mKeyRange, mValueRange; bool mIsEmpty; // non-property members: double *mData; unsigned char *mAlpha; QCPRange mDataBounds; bool mDataModified; bool createAlpha(bool initializeOpaque=true); friend class QCPColorMap; }; class QCP_LIB_DECL QCPColorMap : public QCPAbstractPlottable { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QCPRange dataRange READ dataRange WRITE setDataRange NOTIFY dataRangeChanged) Q_PROPERTY(QCPAxis::ScaleType dataScaleType READ dataScaleType WRITE setDataScaleType NOTIFY dataScaleTypeChanged) Q_PROPERTY(QCPColorGradient gradient READ gradient WRITE setGradient NOTIFY gradientChanged) Q_PROPERTY(bool interpolate READ interpolate WRITE setInterpolate) Q_PROPERTY(bool tightBoundary READ tightBoundary WRITE setTightBoundary) Q_PROPERTY(QCPColorScale* colorScale READ colorScale WRITE setColorScale) /// \endcond public: explicit QCPColorMap(QCPAxis *keyAxis, QCPAxis *valueAxis); virtual ~QCPColorMap(); // getters: QCPColorMapData *data() const { return mMapData; } QCPRange dataRange() const { return mDataRange; } QCPAxis::ScaleType dataScaleType() const { return mDataScaleType; } bool interpolate() const { return mInterpolate; } bool tightBoundary() const { return mTightBoundary; } QCPColorGradient gradient() const { return mGradient; } QCPColorScale *colorScale() const { return mColorScale.data(); } // setters: void setData(QCPColorMapData *data, bool copy=false); Q_SLOT void setDataRange(const QCPRange &dataRange); Q_SLOT void setDataScaleType(QCPAxis::ScaleType scaleType); Q_SLOT void setGradient(const QCPColorGradient &gradient); void setInterpolate(bool enabled); void setTightBoundary(bool enabled); void setColorScale(QCPColorScale *colorScale); // non-property methods: void rescaleDataRange(bool recalculateDataBounds=false); Q_SLOT void updateLegendIcon(Qt::TransformationMode transformMode=Qt::SmoothTransformation, const QSize &thumbSize=QSize(32, 18)); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE; virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE; signals: void dataRangeChanged(const QCPRange &newRange); void dataScaleTypeChanged(QCPAxis::ScaleType scaleType); void gradientChanged(const QCPColorGradient &newGradient); protected: // property members: QCPRange mDataRange; QCPAxis::ScaleType mDataScaleType; QCPColorMapData *mMapData; QCPColorGradient mGradient; bool mInterpolate; bool mTightBoundary; QPointer mColorScale; // non-property members: QImage mMapImage, mUndersampledMapImage; QPixmap mLegendIcon; bool mMapImageInvalidated; // introduced virtual methods: virtual void updateMapImage(); // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE; friend class QCustomPlot; friend class QCPLegend; }; /* end of 'src/plottables/plottable-colormap.h' */ /* including file 'src/plottables/plottable-financial.h', size 8622 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPFinancialData { public: QCPFinancialData(); QCPFinancialData(double key, double open, double high, double low, double close); inline double sortKey() const { return key; } inline static QCPFinancialData fromSortKey(double sortKey) { return QCPFinancialData(sortKey, 0, 0, 0, 0); } inline static bool sortKeyIsMainKey() { return true; } inline double mainKey() const { return key; } inline double mainValue() const { return open; } inline QCPRange valueRange() const { return QCPRange(low, high); } // open and close must lie between low and high, so we don't need to check them double key, open, high, low, close; }; Q_DECLARE_TYPEINFO(QCPFinancialData, Q_PRIMITIVE_TYPE); /*! \typedef QCPFinancialDataContainer Container for storing \ref QCPFinancialData points. The data is stored sorted by \a key. This template instantiation is the container in which QCPFinancial holds its data. For details about the generic container, see the documentation of the class template \ref QCPDataContainer. \see QCPFinancialData, QCPFinancial::setData */ typedef QCPDataContainer QCPFinancialDataContainer; class QCP_LIB_DECL QCPFinancial : public QCPAbstractPlottable1D { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(ChartStyle chartStyle READ chartStyle WRITE setChartStyle) Q_PROPERTY(double width READ width WRITE setWidth) Q_PROPERTY(WidthType widthType READ widthType WRITE setWidthType) Q_PROPERTY(bool twoColored READ twoColored WRITE setTwoColored) Q_PROPERTY(QBrush brushPositive READ brushPositive WRITE setBrushPositive) Q_PROPERTY(QBrush brushNegative READ brushNegative WRITE setBrushNegative) Q_PROPERTY(QPen penPositive READ penPositive WRITE setPenPositive) Q_PROPERTY(QPen penNegative READ penNegative WRITE setPenNegative) /// \endcond public: /*! Defines the ways the width of the financial bar can be specified. Thus it defines what the number passed to \ref setWidth actually means. \see setWidthType, setWidth */ enum WidthType { wtAbsolute ///< width is in absolute pixels ,wtAxisRectRatio ///< width is given by a fraction of the axis rect size ,wtPlotCoords ///< width is in key coordinates and thus scales with the key axis range }; Q_ENUMS(WidthType) /*! Defines the possible representations of OHLC data in the plot. \see setChartStyle */ enum ChartStyle { csOhlc ///< Open-High-Low-Close bar representation ,csCandlestick ///< Candlestick representation }; Q_ENUMS(ChartStyle) explicit QCPFinancial(QCPAxis *keyAxis, QCPAxis *valueAxis); virtual ~QCPFinancial(); // getters: QSharedPointer data() const { return mDataContainer; } ChartStyle chartStyle() const { return mChartStyle; } double width() const { return mWidth; } WidthType widthType() const { return mWidthType; } bool twoColored() const { return mTwoColored; } QBrush brushPositive() const { return mBrushPositive; } QBrush brushNegative() const { return mBrushNegative; } QPen penPositive() const { return mPenPositive; } QPen penNegative() const { return mPenNegative; } // setters: void setData(QSharedPointer data); void setData(const QVector &keys, const QVector &open, const QVector &high, const QVector &low, const QVector &close, bool alreadySorted=false); void setChartStyle(ChartStyle style); void setWidth(double width); void setWidthType(WidthType widthType); void setTwoColored(bool twoColored); void setBrushPositive(const QBrush &brush); void setBrushNegative(const QBrush &brush); void setPenPositive(const QPen &pen); void setPenNegative(const QPen &pen); // non-property methods: void addData(const QVector &keys, const QVector &open, const QVector &high, const QVector &low, const QVector &close, bool alreadySorted=false); void addData(double key, double open, double high, double low, double close); // reimplemented virtual methods: virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE; virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE; virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE; // static methods: static QCPFinancialDataContainer timeSeriesToOhlc(const QVector &time, const QVector &value, double timeBinSize, double timeBinOffset = 0); protected: // property members: ChartStyle mChartStyle; double mWidth; WidthType mWidthType; bool mTwoColored; QBrush mBrushPositive, mBrushNegative; QPen mPenPositive, mPenNegative; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE; // non-virtual methods: void drawOhlcPlot(QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected); void drawCandlestickPlot(QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected); double getPixelWidth(double key, double keyPixel) const; double ohlcSelectTest(const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const; double candlestickSelectTest(const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const; void getVisibleDataBounds(QCPFinancialDataContainer::const_iterator &begin, QCPFinancialDataContainer::const_iterator &end) const; QRectF selectionHitBox(QCPFinancialDataContainer::const_iterator it) const; friend class QCustomPlot; friend class QCPLegend; }; Q_DECLARE_METATYPE(QCPFinancial::ChartStyle) /* end of 'src/plottables/plottable-financial.h' */ /* including file 'src/plottables/plottable-errorbar.h', size 7727 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPErrorBarsData { public: QCPErrorBarsData(); explicit QCPErrorBarsData(double error); QCPErrorBarsData(double errorMinus, double errorPlus); double errorMinus, errorPlus; }; Q_DECLARE_TYPEINFO(QCPErrorBarsData, Q_PRIMITIVE_TYPE); /*! \typedef QCPErrorBarsDataContainer Container for storing \ref QCPErrorBarsData points. It is a typedef for QVector<\ref QCPErrorBarsData>. This is the container in which \ref QCPErrorBars holds its data. Unlike most other data containers for plottables, it is not based on \ref QCPDataContainer. This is because the error bars plottable is special in that it doesn't store its own key and value coordinate per error bar. It adopts the key and value from the plottable to which the error bars shall be applied (\ref QCPErrorBars::setDataPlottable). So the stored \ref QCPErrorBarsData doesn't need a sortable key, but merely an index (as \c QVector provides), which maps one-to-one to the indices of the other plottable's data. \see QCPErrorBarsData, QCPErrorBars::setData */ typedef QVector QCPErrorBarsDataContainer; class QCP_LIB_DECL QCPErrorBars : public QCPAbstractPlottable, public QCPPlottableInterface1D { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QSharedPointer data READ data WRITE setData) Q_PROPERTY(QCPAbstractPlottable* dataPlottable READ dataPlottable WRITE setDataPlottable) Q_PROPERTY(ErrorType errorType READ errorType WRITE setErrorType) Q_PROPERTY(double whiskerWidth READ whiskerWidth WRITE setWhiskerWidth) Q_PROPERTY(double symbolGap READ symbolGap WRITE setSymbolGap) /// \endcond public: /*! Defines in which orientation the error bars shall appear. If your data needs both error dimensions, create two \ref QCPErrorBars with different \ref ErrorType. \see setErrorType */ enum ErrorType { etKeyError ///< The errors are for the key dimension (bars appear parallel to the key axis) ,etValueError ///< The errors are for the value dimension (bars appear parallel to the value axis) }; Q_ENUMS(ErrorType) explicit QCPErrorBars(QCPAxis *keyAxis, QCPAxis *valueAxis); virtual ~QCPErrorBars(); // getters: QSharedPointer data() const { return mDataContainer; } QCPAbstractPlottable *dataPlottable() const { return mDataPlottable.data(); } ErrorType errorType() const { return mErrorType; } double whiskerWidth() const { return mWhiskerWidth; } double symbolGap() const { return mSymbolGap; } // setters: void setData(QSharedPointer data); void setData(const QVector &error); void setData(const QVector &errorMinus, const QVector &errorPlus); void setDataPlottable(QCPAbstractPlottable* plottable); void setErrorType(ErrorType type); void setWhiskerWidth(double pixels); void setSymbolGap(double pixels); // non-property methods: void addData(const QVector &error); void addData(const QVector &errorMinus, const QVector &errorPlus); void addData(double error); void addData(double errorMinus, double errorPlus); // virtual methods of 1d plottable interface: virtual int dataCount() const Q_DECL_OVERRIDE; virtual double dataMainKey(int index) const Q_DECL_OVERRIDE; virtual double dataSortKey(int index) const Q_DECL_OVERRIDE; virtual double dataMainValue(int index) const Q_DECL_OVERRIDE; virtual QCPRange dataValueRange(int index) const Q_DECL_OVERRIDE; virtual QPointF dataPixelPosition(int index) const Q_DECL_OVERRIDE; virtual bool sortKeyIsMainKey() const Q_DECL_OVERRIDE; virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE; virtual int findBegin(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE; virtual int findEnd(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE; // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; virtual QCPPlottableInterface1D *interface1D() Q_DECL_OVERRIDE { return this; } protected: // property members: QSharedPointer mDataContainer; QPointer mDataPlottable; ErrorType mErrorType; double mWhiskerWidth; double mSymbolGap; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE; virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE; virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE; // non-virtual methods: void getErrorBarLines(QCPErrorBarsDataContainer::const_iterator it, QVector &backbones, QVector &whiskers) const; void getVisibleDataBounds(QCPErrorBarsDataContainer::const_iterator &begin, QCPErrorBarsDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const; double pointDistance(const QPointF &pixelPoint, QCPErrorBarsDataContainer::const_iterator &closestData) const; // helpers: void getDataSegments(QList &selectedSegments, QList &unselectedSegments) const; bool errorBarVisible(int index) const; bool rectIntersectsLine(const QRectF &pixelRect, const QLineF &line) const; friend class QCustomPlot; friend class QCPLegend; }; /* end of 'src/plottables/plottable-errorbar.h' */ /* including file 'src/items/item-straightline.h', size 3117 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemStraightLine : public QCPAbstractItem { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen) /// \endcond public: explicit QCPItemStraightLine(QCustomPlot *parentPlot); virtual ~QCPItemStraightLine(); // getters: QPen pen() const { return mPen; } QPen selectedPen() const { return mSelectedPen; } // setters; void setPen(const QPen &pen); void setSelectedPen(const QPen &pen); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; QCPItemPosition * const point1; QCPItemPosition * const point2; protected: // property members: QPen mPen, mSelectedPen; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; // non-virtual methods: QLineF getRectClippedStraightLine(const QCPVector2D &point1, const QCPVector2D &vec, const QRect &rect) const; QPen mainPen() const; }; /* end of 'src/items/item-straightline.h' */ /* including file 'src/items/item-line.h', size 3407 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemLine : public QCPAbstractItem { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen) Q_PROPERTY(QCPLineEnding head READ head WRITE setHead) Q_PROPERTY(QCPLineEnding tail READ tail WRITE setTail) /// \endcond public: explicit QCPItemLine(QCustomPlot *parentPlot); virtual ~QCPItemLine(); // getters: QPen pen() const { return mPen; } QPen selectedPen() const { return mSelectedPen; } QCPLineEnding head() const { return mHead; } QCPLineEnding tail() const { return mTail; } // setters; void setPen(const QPen &pen); void setSelectedPen(const QPen &pen); void setHead(const QCPLineEnding &head); void setTail(const QCPLineEnding &tail); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; QCPItemPosition * const start; QCPItemPosition * const end; protected: // property members: QPen mPen, mSelectedPen; QCPLineEnding mHead, mTail; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; // non-virtual methods: QLineF getRectClippedLine(const QCPVector2D &start, const QCPVector2D &end, const QRect &rect) const; QPen mainPen() const; }; /* end of 'src/items/item-line.h' */ /* including file 'src/items/item-curve.h', size 3379 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemCurve : public QCPAbstractItem { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen) Q_PROPERTY(QCPLineEnding head READ head WRITE setHead) Q_PROPERTY(QCPLineEnding tail READ tail WRITE setTail) /// \endcond public: explicit QCPItemCurve(QCustomPlot *parentPlot); virtual ~QCPItemCurve(); // getters: QPen pen() const { return mPen; } QPen selectedPen() const { return mSelectedPen; } QCPLineEnding head() const { return mHead; } QCPLineEnding tail() const { return mTail; } // setters; void setPen(const QPen &pen); void setSelectedPen(const QPen &pen); void setHead(const QCPLineEnding &head); void setTail(const QCPLineEnding &tail); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; QCPItemPosition * const start; QCPItemPosition * const startDir; QCPItemPosition * const endDir; QCPItemPosition * const end; protected: // property members: QPen mPen, mSelectedPen; QCPLineEnding mHead, mTail; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; // non-virtual methods: QPen mainPen() const; }; /* end of 'src/items/item-curve.h' */ /* including file 'src/items/item-rect.h', size 3688 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemRect : public QCPAbstractItem { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen) Q_PROPERTY(QBrush brush READ brush WRITE setBrush) Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush) /// \endcond public: explicit QCPItemRect(QCustomPlot *parentPlot); virtual ~QCPItemRect(); // getters: QPen pen() const { return mPen; } QPen selectedPen() const { return mSelectedPen; } QBrush brush() const { return mBrush; } QBrush selectedBrush() const { return mSelectedBrush; } // setters; void setPen(const QPen &pen); void setSelectedPen(const QPen &pen); void setBrush(const QBrush &brush); void setSelectedBrush(const QBrush &brush); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; QCPItemPosition * const topLeft; QCPItemPosition * const bottomRight; QCPItemAnchor * const top; QCPItemAnchor * const topRight; QCPItemAnchor * const right; QCPItemAnchor * const bottom; QCPItemAnchor * const bottomLeft; QCPItemAnchor * const left; protected: enum AnchorIndex {aiTop, aiTopRight, aiRight, aiBottom, aiBottomLeft, aiLeft}; // property members: QPen mPen, mSelectedPen; QBrush mBrush, mSelectedBrush; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE; // non-virtual methods: QPen mainPen() const; QBrush mainBrush() const; }; /* end of 'src/items/item-rect.h' */ /* including file 'src/items/item-text.h', size 5554 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemText : public QCPAbstractItem { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QColor color READ color WRITE setColor) Q_PROPERTY(QColor selectedColor READ selectedColor WRITE setSelectedColor) Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen) Q_PROPERTY(QBrush brush READ brush WRITE setBrush) Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush) Q_PROPERTY(QFont font READ font WRITE setFont) Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont) Q_PROPERTY(QString text READ text WRITE setText) Q_PROPERTY(Qt::Alignment positionAlignment READ positionAlignment WRITE setPositionAlignment) Q_PROPERTY(Qt::Alignment textAlignment READ textAlignment WRITE setTextAlignment) Q_PROPERTY(double rotation READ rotation WRITE setRotation) Q_PROPERTY(QMargins padding READ padding WRITE setPadding) /// \endcond public: explicit QCPItemText(QCustomPlot *parentPlot); virtual ~QCPItemText(); // getters: QColor color() const { return mColor; } QColor selectedColor() const { return mSelectedColor; } QPen pen() const { return mPen; } QPen selectedPen() const { return mSelectedPen; } QBrush brush() const { return mBrush; } QBrush selectedBrush() const { return mSelectedBrush; } QFont font() const { return mFont; } QFont selectedFont() const { return mSelectedFont; } QString text() const { return mText; } Qt::Alignment positionAlignment() const { return mPositionAlignment; } Qt::Alignment textAlignment() const { return mTextAlignment; } double rotation() const { return mRotation; } QMargins padding() const { return mPadding; } // setters; void setColor(const QColor &color); void setSelectedColor(const QColor &color); void setPen(const QPen &pen); void setSelectedPen(const QPen &pen); void setBrush(const QBrush &brush); void setSelectedBrush(const QBrush &brush); void setFont(const QFont &font); void setSelectedFont(const QFont &font); void setText(const QString &text); void setPositionAlignment(Qt::Alignment alignment); void setTextAlignment(Qt::Alignment alignment); void setRotation(double degrees); void setPadding(const QMargins &padding); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; QCPItemPosition * const position; QCPItemAnchor * const topLeft; QCPItemAnchor * const top; QCPItemAnchor * const topRight; QCPItemAnchor * const right; QCPItemAnchor * const bottomRight; QCPItemAnchor * const bottom; QCPItemAnchor * const bottomLeft; QCPItemAnchor * const left; protected: enum AnchorIndex {aiTopLeft, aiTop, aiTopRight, aiRight, aiBottomRight, aiBottom, aiBottomLeft, aiLeft}; // property members: QColor mColor, mSelectedColor; QPen mPen, mSelectedPen; QBrush mBrush, mSelectedBrush; QFont mFont, mSelectedFont; QString mText; Qt::Alignment mPositionAlignment; Qt::Alignment mTextAlignment; double mRotation; QMargins mPadding; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE; // non-virtual methods: QPointF getTextDrawPoint(const QPointF &pos, const QRectF &rect, Qt::Alignment positionAlignment) const; QFont mainFont() const; QColor mainColor() const; QPen mainPen() const; QBrush mainBrush() const; }; /* end of 'src/items/item-text.h' */ /* including file 'src/items/item-ellipse.h', size 3868 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemEllipse : public QCPAbstractItem { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen) Q_PROPERTY(QBrush brush READ brush WRITE setBrush) Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush) /// \endcond public: explicit QCPItemEllipse(QCustomPlot *parentPlot); virtual ~QCPItemEllipse(); // getters: QPen pen() const { return mPen; } QPen selectedPen() const { return mSelectedPen; } QBrush brush() const { return mBrush; } QBrush selectedBrush() const { return mSelectedBrush; } // setters; void setPen(const QPen &pen); void setSelectedPen(const QPen &pen); void setBrush(const QBrush &brush); void setSelectedBrush(const QBrush &brush); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; QCPItemPosition * const topLeft; QCPItemPosition * const bottomRight; QCPItemAnchor * const topLeftRim; QCPItemAnchor * const top; QCPItemAnchor * const topRightRim; QCPItemAnchor * const right; QCPItemAnchor * const bottomRightRim; QCPItemAnchor * const bottom; QCPItemAnchor * const bottomLeftRim; QCPItemAnchor * const left; QCPItemAnchor * const center; protected: enum AnchorIndex {aiTopLeftRim, aiTop, aiTopRightRim, aiRight, aiBottomRightRim, aiBottom, aiBottomLeftRim, aiLeft, aiCenter}; // property members: QPen mPen, mSelectedPen; QBrush mBrush, mSelectedBrush; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE; // non-virtual methods: QPen mainPen() const; QBrush mainBrush() const; }; /* end of 'src/items/item-ellipse.h' */ /* including file 'src/items/item-pixmap.h', size 4373 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemPixmap : public QCPAbstractItem { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap) Q_PROPERTY(bool scaled READ scaled WRITE setScaled) Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode) Q_PROPERTY(Qt::TransformationMode transformationMode READ transformationMode) Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen) /// \endcond public: explicit QCPItemPixmap(QCustomPlot *parentPlot); virtual ~QCPItemPixmap(); // getters: QPixmap pixmap() const { return mPixmap; } bool scaled() const { return mScaled; } Qt::AspectRatioMode aspectRatioMode() const { return mAspectRatioMode; } Qt::TransformationMode transformationMode() const { return mTransformationMode; } QPen pen() const { return mPen; } QPen selectedPen() const { return mSelectedPen; } // setters; void setPixmap(const QPixmap &pixmap); void setScaled(bool scaled, Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio, Qt::TransformationMode transformationMode=Qt::SmoothTransformation); void setPen(const QPen &pen); void setSelectedPen(const QPen &pen); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; QCPItemPosition * const topLeft; QCPItemPosition * const bottomRight; QCPItemAnchor * const top; QCPItemAnchor * const topRight; QCPItemAnchor * const right; QCPItemAnchor * const bottom; QCPItemAnchor * const bottomLeft; QCPItemAnchor * const left; protected: enum AnchorIndex {aiTop, aiTopRight, aiRight, aiBottom, aiBottomLeft, aiLeft}; // property members: QPixmap mPixmap; QPixmap mScaledPixmap; bool mScaled; bool mScaledPixmapInvalidated; Qt::AspectRatioMode mAspectRatioMode; Qt::TransformationMode mTransformationMode; QPen mPen, mSelectedPen; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE; // non-virtual methods: void updateScaledPixmap(QRect finalRect=QRect(), bool flipHorz=false, bool flipVert=false); QRect getFinalRect(bool *flippedHorz=0, bool *flippedVert=0) const; QPen mainPen() const; }; /* end of 'src/items/item-pixmap.h' */ /* including file 'src/items/item-tracer.h', size 4762 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemTracer : public QCPAbstractItem { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen) Q_PROPERTY(QBrush brush READ brush WRITE setBrush) Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush) Q_PROPERTY(double size READ size WRITE setSize) Q_PROPERTY(TracerStyle style READ style WRITE setStyle) Q_PROPERTY(QCPGraph* graph READ graph WRITE setGraph) Q_PROPERTY(double graphKey READ graphKey WRITE setGraphKey) Q_PROPERTY(bool interpolating READ interpolating WRITE setInterpolating) /// \endcond public: /*! The different visual appearances a tracer item can have. Some styles size may be controlled with \ref setSize. \see setStyle */ enum TracerStyle { tsNone ///< The tracer is not visible ,tsPlus ///< A plus shaped crosshair with limited size ,tsCrosshair ///< A plus shaped crosshair which spans the complete axis rect ,tsCircle ///< A circle ,tsSquare ///< A square }; Q_ENUMS(TracerStyle) explicit QCPItemTracer(QCustomPlot *parentPlot); virtual ~QCPItemTracer(); // getters: QPen pen() const { return mPen; } QPen selectedPen() const { return mSelectedPen; } QBrush brush() const { return mBrush; } QBrush selectedBrush() const { return mSelectedBrush; } double size() const { return mSize; } TracerStyle style() const { return mStyle; } QCPGraph *graph() const { return mGraph; } double graphKey() const { return mGraphKey; } bool interpolating() const { return mInterpolating; } // setters; void setPen(const QPen &pen); void setSelectedPen(const QPen &pen); void setBrush(const QBrush &brush); void setSelectedBrush(const QBrush &brush); void setSize(double size); void setStyle(TracerStyle style); void setGraph(QCPGraph *graph); void setGraphKey(double key); void setInterpolating(bool enabled); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; // non-virtual methods: void updatePosition(); QCPItemPosition * const position; protected: // property members: QPen mPen, mSelectedPen; QBrush mBrush, mSelectedBrush; double mSize; TracerStyle mStyle; QCPGraph *mGraph; double mGraphKey; bool mInterpolating; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; // non-virtual methods: QPen mainPen() const; QBrush mainBrush() const; }; Q_DECLARE_METATYPE(QCPItemTracer::TracerStyle) /* end of 'src/items/item-tracer.h' */ /* including file 'src/items/item-bracket.h', size 3969 */ /* commit 9868e55d3b412f2f89766bb482fcf299e93a0988 2017-09-04 01:56:22 +0200 */ class QCP_LIB_DECL QCPItemBracket : public QCPAbstractItem { Q_OBJECT /// \cond INCLUDE_QPROPERTIES Q_PROPERTY(QPen pen READ pen WRITE setPen) Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen) Q_PROPERTY(double length READ length WRITE setLength) Q_PROPERTY(BracketStyle style READ style WRITE setStyle) /// \endcond public: /*! Defines the various visual shapes of the bracket item. The appearance can be further modified by \ref setLength and \ref setPen. \see setStyle */ enum BracketStyle { bsSquare ///< A brace with angled edges ,bsRound ///< A brace with round edges ,bsCurly ///< A curly brace ,bsCalligraphic ///< A curly brace with varying stroke width giving a calligraphic impression }; Q_ENUMS(BracketStyle) explicit QCPItemBracket(QCustomPlot *parentPlot); virtual ~QCPItemBracket(); // getters: QPen pen() const { return mPen; } QPen selectedPen() const { return mSelectedPen; } double length() const { return mLength; } BracketStyle style() const { return mStyle; } // setters; void setPen(const QPen &pen); void setSelectedPen(const QPen &pen); void setLength(double length); void setStyle(BracketStyle style); // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; QCPItemPosition * const left; QCPItemPosition * const right; QCPItemAnchor * const center; protected: // property members: enum AnchorIndex {aiCenter}; QPen mPen, mSelectedPen; double mLength; BracketStyle mStyle; // reimplemented virtual methods: virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE; virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE; // non-virtual methods: QPen mainPen() const; }; Q_DECLARE_METATYPE(QCPItemBracket::BracketStyle) /* end of 'src/items/item-bracket.h' */ #endif // QCUSTOMPLOT_H sqlitebrowser-3.11.2/libs/qcustomplot-source/qcustomplot.pro000066400000000000000000000003271345112435200244420ustar00rootroot00000000000000TEMPLATE = lib QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport CONFIG += staticlib CONFIG += debug_and_release HEADERS += \ qcustomplot.h SOURCES += \ qcustomplot.cpp sqlitebrowser-3.11.2/libs/qhexedit/000077500000000000000000000000001345112435200172475ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qhexedit/CMakeLists.txt000066400000000000000000000007071345112435200220130ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(Qt5 REQUIRED COMPONENTS Widgets) set(QHEXEDIT_SRC src/qhexedit.cpp src/chunks.cpp src/commands.cpp ) set(QHEXEDIT_HDR src/chunks.h src/commands.h ) set(QHEXEDIT_MOC_HDR src/qhexedit.h src/commands.h ) add_library(qhexedit ${QHEXEDIT_SRC} ${QHEXEDIT_HDR} ${QHEXEDIT_MOC}) target_link_libraries(qhexedit Qt5::Widgets) sqlitebrowser-3.11.2/libs/qhexedit/qhexedit.pro000066400000000000000000000003601345112435200216030ustar00rootroot00000000000000TEMPLATE = lib QT += core gui widgets CONFIG += staticlib CONFIG += debug_and_release HEADERS += \ src/qhexedit.h \ src/chunks.h \ src/commands.h SOURCES += \ src/qhexedit.cpp \ src/chunks.cpp \ src/commands.cpp sqlitebrowser-3.11.2/libs/qhexedit/src/000077500000000000000000000000001345112435200200365ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qhexedit/src/chunks.cpp000066400000000000000000000204441345112435200220410ustar00rootroot00000000000000#include "chunks.h" #include #define NORMAL 0 #define HIGHLIGHTED 1 #define BUFFER_SIZE 0x10000 #define CHUNK_SIZE 0x1000 #define READ_CHUNK_MASK Q_INT64_C(0xfffffffffffff000) // ***************************************** Constructors and file settings Chunks::Chunks(QObject *parent): QObject(parent) { QBuffer *buf = new QBuffer(this); setIODevice(*buf); } Chunks::Chunks(QIODevice &ioDevice, QObject *parent): QObject(parent) { setIODevice(ioDevice); } bool Chunks::setIODevice(QIODevice &ioDevice) { _ioDevice = &ioDevice; bool ok = _ioDevice->open(QIODevice::ReadOnly); if (ok) // Try to open IODevice { _size = _ioDevice->size(); _ioDevice->close(); } else // Fallback is an empty buffer { QBuffer *buf = new QBuffer(this); _ioDevice = buf; _size = 0; } _chunks.clear(); _pos = 0; return ok; } // ***************************************** Getting data out of Chunks QByteArray Chunks::data(qint64 pos, qint64 maxSize, QByteArray *highlighted) { qint64 ioDelta = 0; int chunkIdx = 0; Chunk chunk; QByteArray buffer; // Do some checks and some arrangements if (highlighted) highlighted->clear(); if (pos >= _size) return buffer; if (maxSize < 0) maxSize = _size; else if ((pos + maxSize) > _size) maxSize = _size - pos; _ioDevice->open(QIODevice::ReadOnly); while (maxSize > 0) { chunk.absPos = LLONG_MAX; bool chunksLoopOngoing = true; while ((chunkIdx < _chunks.count()) && chunksLoopOngoing) { // In this section, we track changes before our required data and // we take the editdet data, if availible. ioDelta is a difference // counter to justify the read pointer to the original data, if // data in between was deleted or inserted. chunk = _chunks[chunkIdx]; if (chunk.absPos > pos) chunksLoopOngoing = false; else { chunkIdx += 1; qint64 count; qint64 chunkOfs = pos - chunk.absPos; if (maxSize > ((qint64)chunk.data.size() - chunkOfs)) { count = (qint64)chunk.data.size() - chunkOfs; ioDelta += CHUNK_SIZE - chunk.data.size(); } else count = maxSize; if (count > 0) { buffer += chunk.data.mid(chunkOfs, (int)count); maxSize -= count; pos += count; if (highlighted) *highlighted += chunk.dataChanged.mid(chunkOfs, (int)count); } } } if ((maxSize > 0) && (pos < chunk.absPos)) { // In this section, we read data from the original source. This only will // happen, whe no copied data is available qint64 byteCount; QByteArray readBuffer; if ((chunk.absPos - pos) > maxSize) byteCount = maxSize; else byteCount = chunk.absPos - pos; maxSize -= byteCount; _ioDevice->seek(pos + ioDelta); readBuffer = _ioDevice->read(byteCount); buffer += readBuffer; if (highlighted) *highlighted += QByteArray(readBuffer.size(), NORMAL); pos += readBuffer.size(); } } _ioDevice->close(); return buffer; } bool Chunks::write(QIODevice &iODevice, qint64 pos, qint64 count) { if (count == -1) count = _size; bool ok = iODevice.open(QIODevice::WriteOnly); if (ok) { for (qint64 idx=pos; idx < count; idx += BUFFER_SIZE) { QByteArray ba = data(idx, BUFFER_SIZE); iODevice.write(ba); } iODevice.close(); } return ok; } // ***************************************** Set and get highlighting infos void Chunks::setDataChanged(qint64 pos, bool dataChanged) { if ((pos < 0) || (pos >= _size)) return; int chunkIdx = getChunkIndex(pos); qint64 posInBa = pos - _chunks[chunkIdx].absPos; _chunks[chunkIdx].dataChanged[(int)posInBa] = char(dataChanged); } bool Chunks::dataChanged(qint64 pos) { QByteArray highlighted; data(pos, 1, &highlighted); return bool(highlighted.at(0)); } // ***************************************** Search API qint64 Chunks::indexOf(const QByteArray &ba, qint64 from) { qint64 result = -1; QByteArray buffer; for (qint64 pos=from; (pos < _size) && (result < 0); pos += BUFFER_SIZE) { buffer = data(pos, BUFFER_SIZE + ba.size() - 1); int findPos = buffer.indexOf(ba); if (findPos >= 0) result = pos + (qint64)findPos; } return result; } qint64 Chunks::lastIndexOf(const QByteArray &ba, qint64 from) { qint64 result = -1; QByteArray buffer; for (qint64 pos=from; (pos > 0) && (result < 0); pos -= BUFFER_SIZE) { qint64 sPos = pos - BUFFER_SIZE - (qint64)ba.size() + 1; if (sPos < 0) sPos = 0; buffer = data(sPos, pos - sPos); int findPos = buffer.lastIndexOf(ba); if (findPos >= 0) result = sPos + (qint64)findPos; } return result; } // ***************************************** Char manipulations bool Chunks::insert(qint64 pos, char b) { if ((pos < 0) || (pos > _size)) return false; int chunkIdx; if (pos == _size) chunkIdx = getChunkIndex(pos-1); else chunkIdx = getChunkIndex(pos); qint64 posInBa = pos - _chunks[chunkIdx].absPos; _chunks[chunkIdx].data.insert(posInBa, b); _chunks[chunkIdx].dataChanged.insert(posInBa, char(1)); for (int idx=chunkIdx+1; idx < _chunks.size(); idx++) _chunks[idx].absPos += 1; _size += 1; _pos = pos; return true; } bool Chunks::overwrite(qint64 pos, char b) { if ((pos < 0) || (pos >= _size)) return false; int chunkIdx = getChunkIndex(pos); qint64 posInBa = pos - _chunks[chunkIdx].absPos; _chunks[chunkIdx].data[(int)posInBa] = b; _chunks[chunkIdx].dataChanged[(int)posInBa] = char(1); _pos = pos; return true; } bool Chunks::removeAt(qint64 pos) { if ((pos < 0) || (pos >= _size)) return false; int chunkIdx = getChunkIndex(pos); qint64 posInBa = pos - _chunks[chunkIdx].absPos; _chunks[chunkIdx].data.remove(posInBa, 1); _chunks[chunkIdx].dataChanged.remove(posInBa, 1); for (int idx=chunkIdx+1; idx < _chunks.size(); idx++) _chunks[idx].absPos -= 1; _size -= 1; _pos = pos; return true; } // ***************************************** Utility functions char Chunks::operator[](qint64 pos) { return data(pos, 1)[0]; } qint64 Chunks::pos() { return _pos; } qint64 Chunks::size() { return _size; } int Chunks::getChunkIndex(qint64 absPos) { // This routine checks, if there is already a copied chunk available. If os, it // returns a reference to it. If there is no copied chunk available, original // data will be copied into a new chunk. int foundIdx = -1; int insertIdx = 0; qint64 ioDelta = 0; for (int idx=0; idx < _chunks.size(); idx++) { Chunk chunk = _chunks[idx]; if ((absPos >= chunk.absPos) && (absPos < (chunk.absPos + chunk.data.size()))) { foundIdx = idx; break; } if (absPos < chunk.absPos) { insertIdx = idx; break; } ioDelta += chunk.data.size() - CHUNK_SIZE; insertIdx = idx + 1; } if (foundIdx == -1) { Chunk newChunk; qint64 readAbsPos = absPos - ioDelta; qint64 readPos = (readAbsPos & READ_CHUNK_MASK); _ioDevice->open(QIODevice::ReadOnly); _ioDevice->seek(readPos); newChunk.data = _ioDevice->read(CHUNK_SIZE); _ioDevice->close(); newChunk.absPos = absPos - (readAbsPos - readPos); newChunk.dataChanged = QByteArray(newChunk.data.size(), char(0)); _chunks.insert(insertIdx, newChunk); foundIdx = insertIdx; } return foundIdx; } #ifdef MODUL_TEST int Chunks::chunkSize() { return _chunks.size(); } #endif sqlitebrowser-3.11.2/libs/qhexedit/src/chunks.h000066400000000000000000000037451345112435200215130ustar00rootroot00000000000000#ifndef CHUNKS_H #define CHUNKS_H /** \cond docNever */ /*! The Chunks class is the storage backend for QHexEdit. * * When QHexEdit loads data, Chunks access them using a QIODevice interface. When the app uses * a QByteArray interface, QBuffer is used to provide again a QIODevice like interface. No data * will be changed, therefore Chunks opens the QIODevice in QIODevice::ReadOnly mode. After every * access Chunks closes the QIODevice, that's why external applications can overwrite files while * QHexEdit shows them. * * When the the user starts to edit the data, Chunks creates a local copy of a chunk of data (4 * kilobytes) and notes all changes there. Parallel to that chunk, there is a second chunk, * which keep track of which bytes are changed and which not. * */ #include struct Chunk { QByteArray data; QByteArray dataChanged; qint64 absPos; }; class Chunks: public QObject { Q_OBJECT public: // Constructors and file settings Chunks(QObject *parent); Chunks(QIODevice &ioDevice, QObject *parent); bool setIODevice(QIODevice &ioDevice); // Getting data out of Chunks QByteArray data(qint64 pos=0, qint64 count=-1, QByteArray *highlighted=0); bool write(QIODevice &iODevice, qint64 pos=0, qint64 count=-1); // Set and get highlighting infos void setDataChanged(qint64 pos, bool dataChanged); bool dataChanged(qint64 pos); // Search API qint64 indexOf(const QByteArray &ba, qint64 from); qint64 lastIndexOf(const QByteArray &ba, qint64 from); // Char manipulations bool insert(qint64 pos, char b); bool overwrite(qint64 pos, char b); bool removeAt(qint64 pos); // Utility functions char operator[](qint64 pos); qint64 pos(); qint64 size(); private: int getChunkIndex(qint64 absPos); QIODevice * _ioDevice; qint64 _pos; qint64 _size; QList _chunks; #ifdef MODUL_TEST public: int chunkSize(); #endif }; /** \endcond docNever */ #endif // CHUNKS_H sqlitebrowser-3.11.2/libs/qhexedit/src/commands.cpp000066400000000000000000000100411345112435200223370ustar00rootroot00000000000000#include "commands.h" #include // Helper class to store single byte commands class CharCommand : public QUndoCommand { public: enum CCmd {insert, removeAt, overwrite}; CharCommand(Chunks * chunks, CCmd cmd, qint64 charPos, char newChar, QUndoCommand *parent=0); void undo(); void redo(); bool mergeWith(const QUndoCommand *command); int id() const { return 1234; } private: Chunks * _chunks; qint64 _charPos; bool _wasChanged; char _newChar; char _oldChar; CCmd _cmd; }; CharCommand::CharCommand(Chunks * chunks, CCmd cmd, qint64 charPos, char newChar, QUndoCommand *parent) : QUndoCommand(parent) { _chunks = chunks; _charPos = charPos; _newChar = newChar; _cmd = cmd; } bool CharCommand::mergeWith(const QUndoCommand *command) { const CharCommand *nextCommand = static_cast(command); bool result = false; if (_cmd != CharCommand::removeAt) { if (nextCommand->_cmd == overwrite) if (nextCommand->_charPos == _charPos) { _newChar = nextCommand->_newChar; result = true; } } return result; } void CharCommand::undo() { switch (_cmd) { case insert: _chunks->removeAt(_charPos); break; case overwrite: _chunks->overwrite(_charPos, _oldChar); _chunks->setDataChanged(_charPos, _wasChanged); break; case removeAt: _chunks->insert(_charPos, _oldChar); _chunks->setDataChanged(_charPos, _wasChanged); break; } } void CharCommand::redo() { switch (_cmd) { case insert: _chunks->insert(_charPos, _newChar); break; case overwrite: _oldChar = (*_chunks)[_charPos]; _wasChanged = _chunks->dataChanged(_charPos); _chunks->overwrite(_charPos, _newChar); break; case removeAt: _oldChar = (*_chunks)[_charPos]; _wasChanged = _chunks->dataChanged(_charPos); _chunks->removeAt(_charPos); break; } } UndoStack::UndoStack(Chunks * chunks, QObject * parent) : QUndoStack(parent) { _chunks = chunks; _parent = parent; } void UndoStack::insert(qint64 pos, char c) { if ((pos >= 0) && (pos <= _chunks->size())) { QUndoCommand *cc = new CharCommand(_chunks, CharCommand::insert, pos, c); this->push(cc); } } void UndoStack::insert(qint64 pos, const QByteArray &ba) { if ((pos >= 0) && (pos <= _chunks->size())) { QString txt = QString(tr("Inserting %1 bytes")).arg(ba.size()); beginMacro(txt); for (int idx=0; idx < ba.size(); idx++) { QUndoCommand *cc = new CharCommand(_chunks, CharCommand::insert, pos + idx, ba.at(idx)); this->push(cc); } endMacro(); } } void UndoStack::removeAt(qint64 pos, qint64 len) { if ((pos >= 0) && (pos < _chunks->size())) { if (len==1) { QUndoCommand *cc = new CharCommand(_chunks, CharCommand::removeAt, pos, char(0)); this->push(cc); } else { QString txt = QString(tr("Delete %1 chars")).arg(len); beginMacro(txt); for (qint64 cnt=0; cnt= 0) && (pos < _chunks->size())) { QUndoCommand *cc = new CharCommand(_chunks, CharCommand::overwrite, pos, c); this->push(cc); } } void UndoStack::overwrite(qint64 pos, int len, const QByteArray &ba) { if ((pos >= 0) && (pos < _chunks->size())) { QString txt = QString(tr("Overwrite %1 chars")).arg(len); beginMacro(txt); removeAt(pos, len); insert(pos, ba); endMacro(); } } sqlitebrowser-3.11.2/libs/qhexedit/src/commands.h000066400000000000000000000026431345112435200220150ustar00rootroot00000000000000#ifndef COMMANDS_H #define COMMANDS_H /** \cond docNever */ #include #include "chunks.h" /*! CharCommand is a class to provid undo/redo functionality in QHexEdit. A QUndoCommand represents a single editing action on a document. CharCommand is responsable for manipulations on single chars. It can insert. overwrite and remove characters. A manipulation stores allways two actions 1. redo (or do) action 2. undo action. CharCommand also supports command compression via mergeWidht(). This allows the user to execute a undo command contation e.g. 3 steps in a single command. If you for example insert a new byt "34" this means for the editor doing 3 steps: insert a "00", overwrite it with "03" and the overwrite it with "34". These 3 steps are combined into a single step, insert a "34". The byte array oriented commands are just put into a set of single byte commands, which are pooled together with the macroBegin() and macroEnd() functionality of Qt's QUndoStack. */ class UndoStack : public QUndoStack { Q_OBJECT public: UndoStack(Chunks *chunks, QObject * parent=0); void insert(qint64 pos, char c); void insert(qint64 pos, const QByteArray &ba); void removeAt(qint64 pos, qint64 len=1); void overwrite(qint64 pos, char c); void overwrite(qint64 pos, int len, const QByteArray &ba); private: Chunks * _chunks; QObject * _parent; }; /** \endcond docNever */ #endif // COMMANDS_H sqlitebrowser-3.11.2/libs/qhexedit/src/license.txt000066400000000000000000000636411345112435200222330ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it!sqlitebrowser-3.11.2/libs/qhexedit/src/qhexedit.cpp000066400000000000000000001002161345112435200223550ustar00rootroot00000000000000#include #include #include #include #include #include "qhexedit.h" #include // ********************************************************************** Constructor, destructor QHexEdit::QHexEdit(QWidget *parent) : QAbstractScrollArea(parent) { _addressArea = true; _addressWidth = 4; _asciiArea = true; _overwriteMode = true; _highlighting = true; _readOnly = false; _cursorPosition = 0; _lastEventSize = 0; _hexCharsInLine = 47; _bytesPerLine = 16; _editAreaIsAscii = false; _hexCaps = false; _dynamicBytesPerLine = false; _chunks = new Chunks(this); _undoStack = new UndoStack(_chunks, this); #ifdef Q_OS_WIN32 setFont(QFont("Courier", 10)); #else setFont(QFont("Monospace", 10)); #endif setAddressAreaColor(this->palette().alternateBase().color()); setHighlightingColor(QColor(0xff, 0xff, 0x99, 0xff)); setSelectionColor(this->palette().highlight().color()); connect(&_cursorTimer, SIGNAL(timeout()), this, SLOT(updateCursor())); connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(adjust())); connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(adjust())); connect(_undoStack, SIGNAL(indexChanged(int)), this, SLOT(dataChangedPrivate(int))); _cursorTimer.setInterval(500); _cursorTimer.start(); setAddressWidth(4); setAddressArea(true); setAsciiArea(true); setOverwriteMode(true); setHighlighting(true); setReadOnly(false); init(); } QHexEdit::~QHexEdit() { } // ********************************************************************** Properties void QHexEdit::setAddressArea(bool addressArea) { _addressArea = addressArea; adjust(); setCursorPosition(_cursorPosition); viewport()->update(); } bool QHexEdit::addressArea() { return _addressArea; } void QHexEdit::setAddressAreaColor(const QColor &color) { _addressAreaColor = color; viewport()->update(); } QColor QHexEdit::addressAreaColor() { return _addressAreaColor; } void QHexEdit::setAddressOffset(qint64 addressOffset) { _addressOffset = addressOffset; adjust(); setCursorPosition(_cursorPosition); viewport()->update(); } qint64 QHexEdit::addressOffset() { return _addressOffset; } void QHexEdit::setAddressWidth(int addressWidth) { _addressWidth = addressWidth; adjust(); setCursorPosition(_cursorPosition); viewport()->update(); } int QHexEdit::addressWidth() { qint64 size = _chunks->size(); int n = 1; if (size > Q_INT64_C(0x100000000)){ n += 8; size /= Q_INT64_C(0x100000000);} if (size > 0x10000){ n += 4; size /= 0x10000;} if (size > 0x100){ n += 2; size /= 0x100;} if (size > 0x10){ n += 1; size /= 0x10;} if (n > _addressWidth) return n; else return _addressWidth; } void QHexEdit::setAsciiArea(bool asciiArea) { if (!asciiArea) _editAreaIsAscii = false; _asciiArea = asciiArea; adjust(); setCursorPosition(_cursorPosition); viewport()->update(); } bool QHexEdit::asciiArea() { return _asciiArea; } void QHexEdit::setBytesPerLine(int count) { _bytesPerLine = count; _hexCharsInLine = count * 3 - 1; adjust(); setCursorPosition(_cursorPosition); viewport()->update(); } int QHexEdit::bytesPerLine() { return _bytesPerLine; } void QHexEdit::setCursorPosition(qint64 position) { // 1. delete old cursor _blink = false; viewport()->update(_cursorRect); // 2. Check, if cursor in range? if (position > (_chunks->size() * 2 - 1)) position = _chunks->size() * 2 - (_overwriteMode ? 1 : 0); if (position < 0) position = 0; // 3. Calc new position of cursor _bPosCurrent = position / 2; _pxCursorY = ((position / 2 - _bPosFirst) / _bytesPerLine + 1) * _pxCharHeight; int x = (position % (2 * _bytesPerLine)); if (_editAreaIsAscii) { _pxCursorX = x / 2 * _pxCharWidth + _pxPosAsciiX; _cursorPosition = position & 0xFFFFFFFFFFFFFFFE; } else { _pxCursorX = (((x / 2) * 3) + (x % 2)) * _pxCharWidth + _pxPosHexX; _cursorPosition = position; } if (_overwriteMode) _cursorRect = QRect(_pxCursorX - horizontalScrollBar()->value(), _pxCursorY + _pxCursorWidth, _pxCharWidth, _pxCursorWidth); else _cursorRect = QRect(_pxCursorX - horizontalScrollBar()->value(), _pxCursorY - _pxCharHeight + 4, _pxCursorWidth, _pxCharHeight); // 4. Immediately draw new cursor _blink = true; viewport()->update(_cursorRect); emit currentAddressChanged(_bPosCurrent); } qint64 QHexEdit::cursorPosition(QPoint pos) { // Calc cursor position depending on a graphical position qint64 result = -1; int posX = pos.x() + horizontalScrollBar()->value(); int posY = pos.y() - 3; if ((posX >= _pxPosHexX) && (posX < (_pxPosHexX + (1 + _hexCharsInLine) * _pxCharWidth))) { _editAreaIsAscii = false; int x = (posX - _pxPosHexX) / _pxCharWidth; x = (x / 3) * 2 + x % 3; int y = (posY / _pxCharHeight) * 2 * _bytesPerLine; result = _bPosFirst * 2 + x + y; } else if (_asciiArea && (posX >= _pxPosAsciiX) && (posX < (_pxPosAsciiX + (1 + _bytesPerLine) * _pxCharWidth))) { _editAreaIsAscii = true; int x = 2 * (posX - _pxPosAsciiX) / _pxCharWidth; int y = (posY / _pxCharHeight) * 2 * _bytesPerLine; result = _bPosFirst * 2 + x + y; } return result; } qint64 QHexEdit::cursorPosition() { return _cursorPosition; } void QHexEdit::setData(const QByteArray &ba) { _data = ba; _bData.setData(_data); setData(_bData); } QByteArray QHexEdit::data() { return _chunks->data(0, -1); } void QHexEdit::setHighlighting(bool highlighting) { _highlighting = highlighting; viewport()->update(); } bool QHexEdit::highlighting() { return _highlighting; } void QHexEdit::setHighlightingColor(const QColor &color) { _brushHighlighted = QBrush(color); _penHighlighted = QPen(viewport()->palette().color(QPalette::WindowText)); viewport()->update(); } QColor QHexEdit::highlightingColor() { return _brushHighlighted.color(); } void QHexEdit::setOverwriteMode(bool overwriteMode) { _overwriteMode = overwriteMode; emit overwriteModeChanged(overwriteMode); } bool QHexEdit::overwriteMode() { return _overwriteMode; } void QHexEdit::setSelectionColor(const QColor &color) { _brushSelection = QBrush(color); _penSelection = QPen(Qt::white); viewport()->update(); } QColor QHexEdit::selectionColor() { return _brushSelection.color(); } bool QHexEdit::isReadOnly() { return _readOnly; } void QHexEdit::setReadOnly(bool readOnly) { _readOnly = readOnly; } void QHexEdit::setHexCaps(const bool isCaps) { if (_hexCaps != isCaps) { _hexCaps = isCaps; viewport()->update(); } } bool QHexEdit::hexCaps() { return _hexCaps; } void QHexEdit::setDynamicBytesPerLine(const bool isDynamic) { _dynamicBytesPerLine = isDynamic; resizeEvent(NULL); } bool QHexEdit::dynamicBytesPerLine() { return _dynamicBytesPerLine; } // ********************************************************************** Access to data of qhexedit bool QHexEdit::setData(QIODevice &iODevice) { bool ok = _chunks->setIODevice(iODevice); init(); dataChangedPrivate(); return ok; } QByteArray QHexEdit::dataAt(qint64 pos, qint64 count) { return _chunks->data(pos, count); } bool QHexEdit::write(QIODevice &iODevice, qint64 pos, qint64 count) { return _chunks->write(iODevice, pos, count); } // ********************************************************************** Char handling void QHexEdit::insert(qint64 index, char ch) { _undoStack->insert(index, ch); refresh(); } void QHexEdit::remove(qint64 index, qint64 len) { _undoStack->removeAt(index, len); refresh(); } void QHexEdit::replace(qint64 index, char ch) { _undoStack->overwrite(index, ch); refresh(); } // ********************************************************************** ByteArray handling void QHexEdit::insert(qint64 pos, const QByteArray &ba) { _undoStack->insert(pos, ba); refresh(); } void QHexEdit::replace(qint64 pos, qint64 len, const QByteArray &ba) { _undoStack->overwrite(pos, len, ba); refresh(); } // ********************************************************************** Utility functions void QHexEdit::ensureVisible() { if (_cursorPosition < (_bPosFirst * 2)) verticalScrollBar()->setValue((int)(_cursorPosition / 2 / _bytesPerLine)); if (_cursorPosition > ((_bPosFirst + (_rowsShown - 1)*_bytesPerLine) * 2)) verticalScrollBar()->setValue((int)(_cursorPosition / 2 / _bytesPerLine) - _rowsShown + 1); if (_pxCursorX < horizontalScrollBar()->value()) horizontalScrollBar()->setValue(_pxCursorX); if ((_pxCursorX + _pxCharWidth) > (horizontalScrollBar()->value() + viewport()->width())) horizontalScrollBar()->setValue(_pxCursorX + _pxCharWidth - viewport()->width()); viewport()->update(); } qint64 QHexEdit::indexOf(const QByteArray &ba, qint64 from) { qint64 pos = _chunks->indexOf(ba, from); if (pos > -1) { qint64 curPos = pos*2; setCursorPosition(curPos + ba.length()*2); resetSelection(curPos); setSelection(curPos + ba.length()*2); ensureVisible(); } return pos; } bool QHexEdit::isModified() { return _modified; } qint64 QHexEdit::lastIndexOf(const QByteArray &ba, qint64 from) { qint64 pos = _chunks->lastIndexOf(ba, from); if (pos > -1) { qint64 curPos = pos*2; setCursorPosition(curPos - 1); resetSelection(curPos); setSelection(curPos + ba.length()*2); ensureVisible(); } return pos; } void QHexEdit::redo() { _undoStack->redo(); setCursorPosition(_chunks->pos()*(_editAreaIsAscii ? 1 : 2)); refresh(); } QString QHexEdit::selectionToReadableString() { QByteArray ba = _chunks->data(getSelectionBegin(), getSelectionEnd() - getSelectionBegin()); return toReadable(ba); } void QHexEdit::setFont(const QFont &font) { QWidget::setFont(font); _pxCharWidth = fontMetrics().width(QLatin1Char('2')); _pxCharHeight = fontMetrics().height(); _pxGapAdr = _pxCharWidth / 2; _pxGapAdrHex = _pxCharWidth; _pxGapHexAscii = 2 * _pxCharWidth; _pxCursorWidth = _pxCharHeight / 7; _pxSelectionSub = _pxCharHeight / 5; viewport()->update(); } QString QHexEdit::toReadableString() { QByteArray ba = _chunks->data(); return toReadable(ba); } void QHexEdit::undo() { _undoStack->undo(); setCursorPosition(_chunks->pos()*(_editAreaIsAscii ? 1 : 2)); refresh(); } // ********************************************************************** Handle events void QHexEdit::keyPressEvent(QKeyEvent *event) { // Cursor movements if (event->matches(QKeySequence::MoveToNextChar)) { qint64 pos = _cursorPosition + 1; if (_editAreaIsAscii) pos += 1; setCursorPosition(pos); resetSelection(pos); } if (event->matches(QKeySequence::MoveToPreviousChar)) { qint64 pos = _cursorPosition - 1; if (_editAreaIsAscii) pos -= 1; setCursorPosition(pos); resetSelection(pos); } if (event->matches(QKeySequence::MoveToEndOfLine)) { qint64 pos = _cursorPosition - (_cursorPosition % (2 * _bytesPerLine)) + (2 * _bytesPerLine) - 1; setCursorPosition(pos); resetSelection(_cursorPosition); } if (event->matches(QKeySequence::MoveToStartOfLine)) { qint64 pos = _cursorPosition - (_cursorPosition % (2 * _bytesPerLine)); setCursorPosition(pos); resetSelection(_cursorPosition); } if (event->matches(QKeySequence::MoveToPreviousLine)) { setCursorPosition(_cursorPosition - (2 * _bytesPerLine)); resetSelection(_cursorPosition); } if (event->matches(QKeySequence::MoveToNextLine)) { setCursorPosition(_cursorPosition + (2 * _bytesPerLine)); resetSelection(_cursorPosition); } if (event->matches(QKeySequence::MoveToNextPage)) { setCursorPosition(_cursorPosition + (((_rowsShown - 1) * 2 * _bytesPerLine))); resetSelection(_cursorPosition); } if (event->matches(QKeySequence::MoveToPreviousPage)) { setCursorPosition(_cursorPosition - (((_rowsShown - 1) * 2 * _bytesPerLine))); resetSelection(_cursorPosition); } if (event->matches(QKeySequence::MoveToEndOfDocument)) { setCursorPosition(_chunks->size() * 2 ); resetSelection(_cursorPosition); } if (event->matches(QKeySequence::MoveToStartOfDocument)) { setCursorPosition(0); resetSelection(_cursorPosition); } // Select commands if (event->matches(QKeySequence::SelectAll)) { resetSelection(0); setSelection(2 * _chunks->size() + 1); } if (event->matches(QKeySequence::SelectNextChar)) { qint64 pos = _cursorPosition + 1; if (_editAreaIsAscii) pos += 1; setCursorPosition(pos); setSelection(pos); } if (event->matches(QKeySequence::SelectPreviousChar)) { qint64 pos = _cursorPosition - 1; if (_editAreaIsAscii) pos -= 1; setSelection(pos); setCursorPosition(pos); } if (event->matches(QKeySequence::SelectEndOfLine)) { qint64 pos = _cursorPosition - (_cursorPosition % (2 * _bytesPerLine)) + (2 * _bytesPerLine) - 1; setCursorPosition(pos); setSelection(pos); } if (event->matches(QKeySequence::SelectStartOfLine)) { qint64 pos = _cursorPosition - (_cursorPosition % (2 * _bytesPerLine)); setCursorPosition(pos); setSelection(pos); } if (event->matches(QKeySequence::SelectPreviousLine)) { qint64 pos = _cursorPosition - (2 * _bytesPerLine); setCursorPosition(pos); setSelection(pos); } if (event->matches(QKeySequence::SelectNextLine)) { qint64 pos = _cursorPosition + (2 * _bytesPerLine); setCursorPosition(pos); setSelection(pos); } if (event->matches(QKeySequence::SelectNextPage)) { qint64 pos = _cursorPosition + (((viewport()->height() / _pxCharHeight) - 1) * 2 * _bytesPerLine); setCursorPosition(pos); setSelection(pos); } if (event->matches(QKeySequence::SelectPreviousPage)) { qint64 pos = _cursorPosition - (((viewport()->height() / _pxCharHeight) - 1) * 2 * _bytesPerLine); setCursorPosition(pos); setSelection(pos); } if (event->matches(QKeySequence::SelectEndOfDocument)) { qint64 pos = _chunks->size() * 2; setCursorPosition(pos); setSelection(pos); } if (event->matches(QKeySequence::SelectStartOfDocument)) { qint64 pos = 0; setCursorPosition(pos); setSelection(pos); } // Edit Commands if (!_readOnly) { /* Cut */ if (event->matches(QKeySequence::Cut)) { QByteArray ba = _chunks->data(getSelectionBegin(), getSelectionEnd() - getSelectionBegin()).toHex(); for (qint64 idx = 32; idx < ba.size(); idx +=33) ba.insert(idx, "\n"); QClipboard *clipboard = QApplication::clipboard(); clipboard->setText(ba); if (_overwriteMode) { qint64 len = getSelectionEnd() - getSelectionBegin(); replace(getSelectionBegin(), (int)len, QByteArray((int)len, char(0))); } else { remove(getSelectionBegin(), getSelectionEnd() - getSelectionBegin()); } setCursorPosition(2 * getSelectionBegin()); resetSelection(2 * getSelectionBegin()); } else /* Paste */ if (event->matches(QKeySequence::Paste)) { QClipboard *clipboard = QApplication::clipboard(); QByteArray ba = QByteArray().fromHex(clipboard->text().toLatin1()); if (_overwriteMode) { ba = ba.left(std::min(ba.size(), (_chunks->size() - _bPosCurrent))); replace(_bPosCurrent, ba.size(), ba); } else insert(_bPosCurrent, ba); setCursorPosition(_cursorPosition + 2 * ba.size()); resetSelection(getSelectionBegin()); } else /* Delete char */ if (event->matches(QKeySequence::Delete)) { if (getSelectionBegin() != getSelectionEnd()) { _bPosCurrent = getSelectionBegin(); if (_overwriteMode) { QByteArray ba = QByteArray(getSelectionEnd() - getSelectionBegin(), char(0)); replace(_bPosCurrent, ba.size(), ba); } else { remove(_bPosCurrent, getSelectionEnd() - getSelectionBegin()); } } else { if (_overwriteMode) replace(_bPosCurrent, char(0)); else remove(_bPosCurrent, 1); } setCursorPosition(2 * _bPosCurrent); resetSelection(2 * _bPosCurrent); } else /* Backspace */ if ((event->key() == Qt::Key_Backspace) && (event->modifiers() == Qt::NoModifier)) { if (getSelectionBegin() != getSelectionEnd()) { _bPosCurrent = getSelectionBegin(); setCursorPosition(2 * _bPosCurrent); if (_overwriteMode) { QByteArray ba = QByteArray(getSelectionEnd() - getSelectionBegin(), char(0)); replace(_bPosCurrent, ba.size(), ba); } else { remove(_bPosCurrent, getSelectionEnd() - getSelectionBegin()); } resetSelection(2 * _bPosCurrent); } else { bool behindLastByte = false; if ((_cursorPosition / 2) == _chunks->size()) behindLastByte = true; _bPosCurrent -= 1; if (_overwriteMode) replace(_bPosCurrent, char(0)); else remove(_bPosCurrent, 1); if (!behindLastByte) _bPosCurrent -= 1; setCursorPosition(2 * _bPosCurrent); resetSelection(2 * _bPosCurrent); } } else /* undo */ if (event->matches(QKeySequence::Undo)) { undo(); } else /* redo */ if (event->matches(QKeySequence::Redo)) { redo(); } else if ((QApplication::keyboardModifiers() == Qt::NoModifier) || (QApplication::keyboardModifiers() == Qt::KeypadModifier) || (QApplication::keyboardModifiers() == Qt::ShiftModifier) || (QApplication::keyboardModifiers() == (Qt::AltModifier | Qt::ControlModifier)) || (QApplication::keyboardModifiers() == Qt::GroupSwitchModifier)) { /* Hex and ascii input */ int key; if (_editAreaIsAscii) key = (uchar)event->text()[0].toLatin1(); else key = int(event->text()[0].toLower().toLatin1()); if ((((key >= '0' && key <= '9') || (key >= 'a' && key <= 'f')) && _editAreaIsAscii == false) || (key >= ' ' && _editAreaIsAscii)) { if (getSelectionBegin() != getSelectionEnd()) { if (_overwriteMode) { qint64 len = getSelectionEnd() - getSelectionBegin(); replace(getSelectionBegin(), (int)len, QByteArray((int)len, char(0))); } else { remove(getSelectionBegin(), getSelectionEnd() - getSelectionBegin()); _bPosCurrent = getSelectionBegin(); } setCursorPosition(2 * _bPosCurrent); resetSelection(2 * _bPosCurrent); } // If insert mode, then insert a byte if (_overwriteMode == false) if ((_cursorPosition % 2) == 0) insert(_bPosCurrent, char(0)); // Change content if (_chunks->size() > 0) { char ch = key; if (!_editAreaIsAscii){ QByteArray hexValue = _chunks->data(_bPosCurrent, 1).toHex(); if ((_cursorPosition % 2) == 0) hexValue[0] = key; else hexValue[1] = key; ch = QByteArray().fromHex(hexValue)[0]; } replace(_bPosCurrent, ch); if (_editAreaIsAscii) setCursorPosition(_cursorPosition + 2); else setCursorPosition(_cursorPosition + 1); resetSelection(_cursorPosition); } } } } /* Copy */ if (event->matches(QKeySequence::Copy)) { QByteArray ba = _chunks->data(getSelectionBegin(), getSelectionEnd() - getSelectionBegin()).toHex(); for (qint64 idx = 32; idx < ba.size(); idx +=33) ba.insert(idx, "\n"); QClipboard *clipboard = QApplication::clipboard(); clipboard->setText(ba); } // Switch between insert/overwrite mode if ((event->key() == Qt::Key_Insert) && (event->modifiers() == Qt::NoModifier)) { setOverwriteMode(!overwriteMode()); setCursorPosition(_cursorPosition); } // switch from hex to ascii edit if (event->key() == Qt::Key_Tab && !_editAreaIsAscii){ _editAreaIsAscii = true; setCursorPosition(_cursorPosition); } // switch from ascii to hex edit if (event->key() == Qt::Key_Backtab && _editAreaIsAscii){ _editAreaIsAscii = false; setCursorPosition(_cursorPosition); } refresh(); } void QHexEdit::mouseMoveEvent(QMouseEvent * event) { _blink = false; viewport()->update(); qint64 actPos = cursorPosition(event->pos()); if (actPos >= 0) { setCursorPosition(actPos); setSelection(actPos); } } void QHexEdit::mousePressEvent(QMouseEvent * event) { if (event->button() != Qt::RightButton) { _blink = false; viewport()->update(); qint64 cPos = cursorPosition(event->pos()); if (cPos >= 0) { resetSelection(cPos); setCursorPosition(cPos); } } } void QHexEdit::paintEvent(QPaintEvent *event) { QPainter painter(viewport()); int pxOfsX = horizontalScrollBar()->value(); if (event->rect() != _cursorRect) { int pxPosStartY = _pxCharHeight; // draw some patterns if needed painter.fillRect(event->rect(), viewport()->palette().color(QPalette::Base)); if (_addressArea) painter.fillRect(QRect(-pxOfsX, event->rect().top(), _pxPosHexX - _pxGapAdrHex/2, height()), _addressAreaColor); if (_asciiArea) { int linePos = _pxPosAsciiX - (_pxGapHexAscii / 2); painter.setPen(Qt::gray); painter.drawLine(linePos - pxOfsX, event->rect().top(), linePos - pxOfsX, height()); } painter.setPen(viewport()->palette().color(QPalette::WindowText)); // paint address area if (_addressArea) { QString address; for (int row=0, pxPosY = _pxCharHeight; row <= (_dataShown.size()/_bytesPerLine); row++, pxPosY +=_pxCharHeight) { address = QString("%1").arg(_bPosFirst + row*_bytesPerLine + _addressOffset, _addrDigits, 16, QChar('0')); painter.drawText(_pxPosAdrX - pxOfsX, pxPosY, address); } } // paint hex and ascii area QPen colStandard = QPen(viewport()->palette().color(QPalette::WindowText)); painter.setBackgroundMode(Qt::TransparentMode); for (int row = 0, pxPosY = pxPosStartY; row <= _rowsShown; row++, pxPosY +=_pxCharHeight) { QByteArray hex; int pxPosX = _pxPosHexX - pxOfsX; int pxPosAsciiX2 = _pxPosAsciiX - pxOfsX; qint64 bPosLine = row * _bytesPerLine; for (int colIdx = 0; ((bPosLine + colIdx) < _dataShown.size() && (colIdx < _bytesPerLine)); colIdx++) { QColor c = viewport()->palette().color(QPalette::Base); painter.setPen(colStandard); qint64 posBa = _bPosFirst + bPosLine + colIdx; if ((getSelectionBegin() <= posBa) && (getSelectionEnd() > posBa)) { c = _brushSelection.color(); painter.setPen(_penSelection); } else { if (_highlighting) if (_markedShown.at((int)(posBa - _bPosFirst))) { c = _brushHighlighted.color(); painter.setPen(_penHighlighted); } } // render hex value QRect r; if (colIdx == 0) r.setRect(pxPosX, pxPosY - _pxCharHeight + _pxSelectionSub, 2*_pxCharWidth, _pxCharHeight); else r.setRect(pxPosX - _pxCharWidth, pxPosY - _pxCharHeight + _pxSelectionSub, 3*_pxCharWidth, _pxCharHeight); painter.fillRect(r, c); hex = _hexDataShown.mid((bPosLine + colIdx) * 2, 2); painter.drawText(pxPosX, pxPosY, hexCaps()?hex.toUpper():hex); pxPosX += 3*_pxCharWidth; // render ascii value if (_asciiArea) { int ch = (uchar)_dataShown.at(bPosLine + colIdx); if ( ch < 0x20 ) ch = '.'; r.setRect(pxPosAsciiX2, pxPosY - _pxCharHeight + _pxSelectionSub, _pxCharWidth, _pxCharHeight); painter.fillRect(r, c); painter.drawText(pxPosAsciiX2, pxPosY, QChar(ch)); pxPosAsciiX2 += _pxCharWidth; } } } painter.setBackgroundMode(Qt::TransparentMode); painter.setPen(viewport()->palette().color(QPalette::WindowText)); } // paint cursor if (_blink && !_readOnly && hasFocus()) painter.fillRect(_cursorRect, this->palette().color(QPalette::WindowText)); else { painter.fillRect(QRect(_pxCursorX - pxOfsX, _pxCursorY - _pxCharHeight, _pxCharWidth, _pxCharHeight), viewport()->palette().color(QPalette::Base)); if (_editAreaIsAscii) { QByteArray ba = _dataShown.mid((_cursorPosition - _bPosFirst) / 2, 1); if (ba != "") { if (ba.at(0) <= ' ') ba[0] = '.'; painter.drawText(_pxCursorX - pxOfsX, _pxCursorY, ba); } } else { painter.drawText(_pxCursorX - pxOfsX, _pxCursorY, _hexDataShown.mid(_cursorPosition - _bPosFirst, 1)); } } // emit event, if size has changed if (_lastEventSize != _chunks->size()) { _lastEventSize = _chunks->size(); emit currentSizeChanged(_lastEventSize); } } void QHexEdit::resizeEvent(QResizeEvent *) { if (_dynamicBytesPerLine) { int pxFixGaps = 0; if (_addressArea) pxFixGaps = addressWidth() * _pxCharWidth + _pxGapAdr; pxFixGaps += _pxGapAdrHex; if (_asciiArea) pxFixGaps += _pxGapHexAscii; // +1 because the last hex value do not have space. so it is effective one char more int charWidth = (viewport()->width() - pxFixGaps ) / _pxCharWidth + 1; // 2 hex alfa-digits 1 space 1 ascii per byte = 4; if ascii is disabled then 3 // to prevent devision by zero use the min value 1 setBytesPerLine(std::max(charWidth / (_asciiArea ? 4 : 3),1)); } adjust(); } bool QHexEdit::focusNextPrevChild(bool next) { if (_addressArea) { if ( (next && _editAreaIsAscii) || (!next && !_editAreaIsAscii )) return QWidget::focusNextPrevChild(next); else return false; } else { return QWidget::focusNextPrevChild(next); } } // ********************************************************************** Handle selections void QHexEdit::resetSelection() { _bSelectionBegin = _bSelectionInit; _bSelectionEnd = _bSelectionInit; } void QHexEdit::resetSelection(qint64 pos) { pos = pos / 2 ; if (pos < 0) pos = 0; if (pos > _chunks->size()) pos = _chunks->size(); _bSelectionInit = pos; _bSelectionBegin = pos; _bSelectionEnd = pos; } void QHexEdit::setSelection(qint64 pos) { pos = pos / 2; if (pos < 0) pos = 0; if (pos > _chunks->size()) pos = _chunks->size(); if (pos >= _bSelectionInit) { _bSelectionEnd = pos; _bSelectionBegin = _bSelectionInit; } else { _bSelectionBegin = pos; _bSelectionEnd = _bSelectionInit; } } int QHexEdit::getSelectionBegin() { return _bSelectionBegin; } int QHexEdit::getSelectionEnd() { return _bSelectionEnd; } // ********************************************************************** Private utility functions void QHexEdit::init() { _undoStack->clear(); setAddressOffset(0); resetSelection(0); setCursorPosition(0); verticalScrollBar()->setValue(0); _modified = false; } void QHexEdit::adjust() { // recalc Graphics if (_addressArea) { _addrDigits = addressWidth(); _pxPosHexX = _pxGapAdr + _addrDigits*_pxCharWidth + _pxGapAdrHex; } else _pxPosHexX = _pxGapAdrHex; _pxPosAdrX = _pxGapAdr; _pxPosAsciiX = _pxPosHexX + _hexCharsInLine * _pxCharWidth + _pxGapHexAscii; // set horizontalScrollBar() int pxWidth = _pxPosAsciiX; if (_asciiArea) pxWidth += _bytesPerLine*_pxCharWidth; horizontalScrollBar()->setRange(0, pxWidth - viewport()->width()); horizontalScrollBar()->setPageStep(viewport()->width()); // set verticalScrollbar() _rowsShown = ((viewport()->height()-4)/_pxCharHeight); int lineCount = (int)(_chunks->size() / (qint64)_bytesPerLine) + 1; verticalScrollBar()->setRange(0, lineCount - _rowsShown); verticalScrollBar()->setPageStep(_rowsShown); int value = verticalScrollBar()->value(); _bPosFirst = (qint64)value * _bytesPerLine; _bPosLast = _bPosFirst + (qint64)(_rowsShown * _bytesPerLine) - 1; if (_bPosLast >= _chunks->size()) _bPosLast = _chunks->size() - 1; readBuffers(); setCursorPosition(_cursorPosition); } void QHexEdit::dataChangedPrivate(int) { _modified = _undoStack->index() != 0; adjust(); emit dataChanged(); } void QHexEdit::refresh() { ensureVisible(); readBuffers(); } void QHexEdit::readBuffers() { _dataShown = _chunks->data(_bPosFirst, _bPosLast - _bPosFirst + _bytesPerLine + 1, &_markedShown); _hexDataShown = QByteArray(_dataShown.toHex()); } QString QHexEdit::toReadable(const QByteArray &ba) { QString result; for (int i=0; i < ba.size(); i += 16) { QString addrStr = QString("%1").arg(_addressOffset + i, addressWidth(), 16, QChar('0')); QString hexStr; QString ascStr; for (int j=0; j<16; j++) { if ((i + j) < ba.size()) { hexStr.append(" ").append(ba.mid(i+j, 1).toHex()); char ch = ba[i + j]; if ((ch < 0x20) || (ch > 0x7e)) ch = '.'; ascStr.append(QChar(ch)); } } result += addrStr + " " + QString("%1").arg(hexStr, -48) + " " + QString("%1").arg(ascStr, -17) + "\n"; } return result; } void QHexEdit::updateCursor() { if (_blink) _blink = false; else _blink = true; viewport()->update(_cursorRect); } sqlitebrowser-3.11.2/libs/qhexedit/src/qhexedit.h000066400000000000000000000370641345112435200220340ustar00rootroot00000000000000#ifndef QHEXEDIT_H #define QHEXEDIT_H #include #include #include #include "chunks.h" #include "commands.h" #ifdef QHEXEDIT_EXPORTS #define QHEXEDIT_API Q_DECL_EXPORT #elif QHEXEDIT_IMPORTS #define QHEXEDIT_API Q_DECL_IMPORT #else #define QHEXEDIT_API #endif /** \mainpage QHexEdit is a binary editor widget for Qt. \version Version 0.8.3 \image html qhexedit.png */ /** QHexEdit is a hex editor widget written in C++ for the Qt (Qt4, Qt5) framework. It is a simple editor for binary data, just like QPlainTextEdit is for text data. There are sip configuration files included, so it is easy to create bindings for PyQt and you can use this widget also in python 2 and 3. QHexEdit takes the data of a QByteArray (setData()) and shows it. You can use the mouse or the keyboard to navigate inside the widget. If you hit the keys (0..9, a..f) you will change the data. Changed data is highlighted and can be accessed via data(). Normaly QHexEdit works in the overwrite Mode. You can set overwriteMode(false) and insert data. In this case the size of data() increases. It is also possible to delete bytes (del or backspace), here the size of data decreases. You can select data with keyboard hits or mouse movements. The copy-key will copy the selected data into the clipboard. The cut-key copies also but delets it afterwards. In overwrite mode, the paste function overwrites the content of the (does not change the length) data. In insert mode, clipboard data will be inserted. The clipboard content is expected in ASCII Hex notation. Unknown characters will be ignored. QHexEdit comes with undo/redo functionality. All changes can be undone, by pressing the undo-key (usually ctr-z). They can also be redone afterwards. The undo/redo framework is cleared, when setData() sets up a new content for the editor. You can search data inside the content with indexOf() and lastIndexOf(). The replace() function is to change located subdata. This 'replaced' data can also be undone by the undo/redo framework. QHexEdit is based on QIODevice, that's why QHexEdit can handle big amounts of data. The size of edited data can be more then two gigabytes without any restrictions. */ class QHEXEDIT_API QHexEdit : public QAbstractScrollArea { Q_OBJECT /*! Property address area switch the address area on or off. Set addressArea true (show it), false (hide it). */ Q_PROPERTY(bool addressArea READ addressArea WRITE setAddressArea) /*! Property address area color sets (setAddressAreaColor()) the backgorund color of address areas. You can also read the color (addressaAreaColor()). */ Q_PROPERTY(QColor addressAreaColor READ addressAreaColor WRITE setAddressAreaColor) /*! Property addressOffset is added to the Numbers of the Address Area. A offset in the address area (left side) is sometimes usefull, whe you show only a segment of a complete memory picture. With setAddressOffset() you set this property - with addressOffset() you get the current value. */ Q_PROPERTY(qint64 addressOffset READ addressOffset WRITE setAddressOffset) /*! Set and get the minimum width of the address area, width in characters. */ Q_PROPERTY(int addressWidth READ addressWidth WRITE setAddressWidth) /*! Switch the ascii area on (true, show it) or off (false, hide it). */ Q_PROPERTY(bool asciiArea READ asciiArea WRITE setAsciiArea) /*! Set and get bytes number per line.*/ Q_PROPERTY(int bytesPerLine READ bytesPerLine WRITE setBytesPerLine) /*! Porperty cursorPosition sets or gets the position of the editor cursor in QHexEdit. Every byte in data has to cursor positions: the lower and upper Nibble. Maximum cursor position is factor two of data.size(). */ Q_PROPERTY(qint64 cursorPosition READ cursorPosition WRITE setCursorPosition) /*! Property data holds the content of QHexEdit. Call setData() to set the content of QHexEdit, data() returns the actual content. When calling setData() with a QByteArray as argument, QHexEdit creates a internal copy of the data If you want to edit big files please use setData(), based on QIODevice. */ Q_PROPERTY(QByteArray data READ data WRITE setData NOTIFY dataChanged) /*! That property defines if the hex values looks as a-f if the value is false(default) or A-F if value is true. */ Q_PROPERTY(bool hexCaps READ hexCaps WRITE setHexCaps) /*! Property defines the dynamic calculation of bytesPerLine parameter depends of width of widget. set this property true to avoid horizontal scrollbars and show the maximal possible data. defalut value is false*/ Q_PROPERTY(bool dynamicBytesPerLine READ dynamicBytesPerLine WRITE setDynamicBytesPerLine) /*! Switch the highlighting feature on or of: true (show it), false (hide it). */ Q_PROPERTY(bool highlighting READ highlighting WRITE setHighlighting) /*! Property highlighting color sets (setHighlightingColor()) the backgorund color of highlighted text areas. You can also read the color (highlightingColor()). */ Q_PROPERTY(QColor highlightingColor READ highlightingColor WRITE setHighlightingColor) /*! Porperty overwrite mode sets (setOverwriteMode()) or gets (overwriteMode()) the mode in which the editor works. In overwrite mode the user will overwrite existing data. The size of data will be constant. In insert mode the size will grow, when inserting new data. */ Q_PROPERTY(bool overwriteMode READ overwriteMode WRITE setOverwriteMode) /*! Property selection color sets (setSelectionColor()) the backgorund color of selected text areas. You can also read the color (selectionColor()). */ Q_PROPERTY(QColor selectionColor READ selectionColor WRITE setSelectionColor) /*! Porperty readOnly sets (setReadOnly()) or gets (isReadOnly) the mode in which the editor works. In readonly mode the the user can only navigate through the data and select data; modifying is not possible. This property's default is false. */ Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly) /*! Set the font of the widget. Please use fixed width fonts like Mono or Courier.*/ Q_PROPERTY(QFont font READ font WRITE setFont) public: /*! Creates an instance of QHexEdit. \param parent Parent widget of QHexEdit. */ QHexEdit(QWidget *parent=0); // Access to data of qhexedit /*! Sets the data of QHexEdit. The QIODevice will be opend just before reading and closed immediately afterwards. This is to allow other programs to rewrite the file while editing it. */ bool setData(QIODevice &iODevice); /*! Givs back the data as a QByteArray starting at position \param pos and delivering \param count bytes. */ QByteArray dataAt(qint64 pos, qint64 count=-1); /*! Givs back the data into a \param iODevice starting at position \param pos and delivering \param count bytes. */ bool write(QIODevice &iODevice, qint64 pos=0, qint64 count=-1); // Char handling /*! Inserts a char. \param pos Index position, where to insert \param ch Char, which is to insert The char will be inserted and size of data grows. */ void insert(qint64 pos, char ch); /*! Removes len bytes from the content. \param pos Index position, where to remove \param len Amount of bytes to remove */ void remove(qint64 pos, qint64 len=1); /*! Replaces a char. \param pos Index position, where to overwrite \param ch Char, which is to insert The char will be overwritten and size remains constant. */ void replace(qint64 pos, char ch); // ByteArray handling /*! Inserts a byte array. \param pos Index position, where to insert \param ba QByteArray, which is to insert The QByteArray will be inserted and size of data grows. */ void insert(qint64 pos, const QByteArray &ba); /*! Replaces \param len bytes with a byte array \param ba \param pos Index position, where to overwrite \param ba QByteArray, which is inserted \param len count of bytes to overwrite The data is overwritten and size of data may change. */ void replace(qint64 pos, qint64 len, const QByteArray &ba); // Utility functioins /*! Calc cursor position from graphics position * \param point from where the cursor position should be calculated * \return Cursor postioin */ qint64 cursorPosition(QPoint point); /*! Ensure the cursor to be visble */ void ensureVisible(); /*! Find first occurence of ba in QHexEdit data * \param ba Data to find * \param from Point where the search starts * \return pos if fond, else -1 */ qint64 indexOf(const QByteArray &ba, qint64 from); /*! Returns if any changes where done on document * \return true when document is modified else false */ bool isModified(); /*! Find last occurence of ba in QHexEdit data * \param ba Data to find * \param from Point where the search starts * \return pos if fond, else -1 */ qint64 lastIndexOf(const QByteArray &ba, qint64 from); /*! Gives back a formatted image of the selected content of QHexEdit */ QString selectionToReadableString(); /*! Set Font of QHexEdit * \param font */ void setFont(const QFont &font); /*! Gives back a formatted image of the content of QHexEdit */ QString toReadableString(); public slots: /*! Redoes the last operation. If there is no operation to redo, i.e. there is no redo step in the undo/redo history, nothing happens. */ void redo(); /*! Undoes the last operation. If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens. */ void undo(); signals: /*! Contains the address, where the cursor is located. */ void currentAddressChanged(qint64 address); /*! Contains the size of the data to edit. */ void currentSizeChanged(qint64 size); /*! The signal is emitted every time, the data is changed. */ void dataChanged(); /*! The signal is emitted every time, the overwrite mode is changed. */ void overwriteModeChanged(bool state); /*! \cond docNever */ public: ~QHexEdit(); // Properties bool addressArea(); void setAddressArea(bool addressArea); QColor addressAreaColor(); void setAddressAreaColor(const QColor &color); qint64 addressOffset(); void setAddressOffset(qint64 addressArea); int addressWidth(); void setAddressWidth(int addressWidth); bool asciiArea(); void setAsciiArea(bool asciiArea); int bytesPerLine(); void setBytesPerLine(int count); qint64 cursorPosition(); void setCursorPosition(qint64 position); QByteArray data(); void setData(const QByteArray &ba); void setHexCaps(const bool isCaps); bool hexCaps(); void setDynamicBytesPerLine(const bool isDynamic); bool dynamicBytesPerLine(); bool highlighting(); void setHighlighting(bool mode); QColor highlightingColor(); void setHighlightingColor(const QColor &color); bool overwriteMode(); void setOverwriteMode(bool overwriteMode); bool isReadOnly(); void setReadOnly(bool readOnly); QColor selectionColor(); void setSelectionColor(const QColor &color); protected: // Handle events void keyPressEvent(QKeyEvent *event); void mouseMoveEvent(QMouseEvent * event); void mousePressEvent(QMouseEvent * event); void paintEvent(QPaintEvent *event); void resizeEvent(QResizeEvent *); virtual bool focusNextPrevChild(bool next); private: // Handle selections void resetSelection(qint64 pos); // set selectionStart and selectionEnd to pos void resetSelection(); // set selectionEnd to selectionStart void setSelection(qint64 pos); // set min (if below init) or max (if greater init) int getSelectionBegin(); int getSelectionEnd(); // Private utility functions void init(); void readBuffers(); QString toReadable(const QByteArray &ba); private slots: void adjust(); // recalc pixel positions void dataChangedPrivate(int idx=0); // emit dataChanged() signal void refresh(); // ensureVisible() and readBuffers() void updateCursor(); // update blinking cursor private: // Name convention: pixel positions start with _px int _pxCharWidth, _pxCharHeight; // char dimensions (dpendend on font) int _pxPosHexX; // X-Pos of HeaxArea int _pxPosAdrX; // X-Pos of Address Area int _pxPosAsciiX; // X-Pos of Ascii Area int _pxGapAdr; // gap left from AddressArea int _pxGapAdrHex; // gap between AddressArea and HexAerea int _pxGapHexAscii; // gap between HexArea and AsciiArea int _pxCursorWidth; // cursor width int _pxSelectionSub; // offset selection rect int _pxCursorX; // current cursor pos int _pxCursorY; // current cursor pos // Name convention: absolute byte positions in chunks start with _b qint64 _bSelectionBegin; // first position of Selection qint64 _bSelectionEnd; // end of Selection qint64 _bSelectionInit; // memory position of Selection qint64 _bPosFirst; // position of first byte shown qint64 _bPosLast; // position of last byte shown qint64 _bPosCurrent; // current position // variables to store the property values bool _addressArea; // left area of QHexEdit QColor _addressAreaColor; int _addressWidth; bool _asciiArea; qint64 _addressOffset; int _bytesPerLine; int _hexCharsInLine; bool _highlighting; bool _overwriteMode; QBrush _brushSelection; QPen _penSelection; QBrush _brushHighlighted; QPen _penHighlighted; bool _readOnly; bool _hexCaps; bool _dynamicBytesPerLine; // other variables bool _editAreaIsAscii; // flag about the ascii mode edited int _addrDigits; // real no of addressdigits, may be > addressWidth bool _blink; // help get cursor blinking QBuffer _bData; // buffer, when setup with QByteArray Chunks *_chunks; // IODevice based access to data QTimer _cursorTimer; // for blinking cursor qint64 _cursorPosition; // absolute positioin of cursor, 1 Byte == 2 tics QRect _cursorRect; // physical dimensions of cursor QByteArray _data; // QHexEdit's data, when setup with QByteArray QByteArray _dataShown; // data in the current View QByteArray _hexDataShown; // data in view, transformed to hex qint64 _lastEventSize; // size, which was emitted last time QByteArray _markedShown; // marked data in view bool _modified; // Is any data in editor modified? int _rowsShown; // lines of text shown UndoStack * _undoStack; // Stack to store edit actions for undo/redo /*! \endcond docNever */ }; #endif // QHEXEDIT_H sqlitebrowser-3.11.2/libs/qhexedit/src/qhexedit.pro000066400000000000000000000004631345112435200223760ustar00rootroot00000000000000 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TEMPLATE = lib VERSION = 2.1.0 CONFIG += qt warn_on release HEADERS = \ src/qhexedit.h \ src/chunks.h \ src/commands.h SOURCES = \ src/qhexedit.cpp \ src/chunks.cpp \ src/commands.cpp TARGET = qhexedit sqlitebrowser-3.11.2/libs/qscintilla/000077500000000000000000000000001345112435200175775ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qscintilla/ChangeLog000066400000000000000000006007431345112435200213630ustar00rootroot000000000000002017-02-20 Phil Thompson * NEWS: Released as v2.10. [6c07847b2835] [2.10] * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_es.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm: Updated the .qm files. [3b3c5924e746] * qt/qscintilla_fr.ts: Partial updated French translations from Alan Garny. [ca2d6917015e] 2017-02-17 Phil Thompson * Python/sip/qsciscintillabase.sip: Added /Transfer/ to the scroll bar replacement functions. [49cf7181402a] 2017-02-15 Phil Thompson * qt/qscintilla_de.ts: Updated German translations from Detlev. [51cca6073075] 2017-02-14 Phil Thompson * qt/qscintilla_es.ts: Updated Spanish translations from Jaime Seuma. [0e30abdd0907] 2017-02-13 Phil Thompson * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, qt/qscintilla.pro: Removed the 'release' option from all CONFIG lines. [0901267a8e49] * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added replaceHorizontalScrollBar() and replaceVerticalScrollBar() to QsciScintillaBase. [bb7efd26b8b3] * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: Updated the translation files. [76c23d751930] 2017-01-21 Phil Thompson * Python/sip/qscilexermarkdown.sip, qt/qscilexerjson.cpp, qt/qscilexermarkdown.cpp, qt/qscilexermarkdown.h: Updated the Markdown lexer with the latest settings from Detlev. [9e9992a4e9f7] 2017-01-17 Phil Thompson * qt/qsciapis.cpp: Fixed problems with auto-completion lists where contexts and image identifiers were getting lost. [039599ba1b85] 2017-01-16 Phil Thompson * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro: Fixed the example and designer plugin .pro files for the change library name. [d6c564089958] * lib/README.doc: Updated website links to https. [18a7013d4f8b] * qt/qsciabstractapis.h, qt/qsciapis.h, qt/qscicommand.h, qt/qscicommandset.h, qt/qscidocument.h, qt/qsciglobal.h, qt/qscilexer.h, qt/qscilexeravs.h, qt/qscilexerbash.h, qt/qscilexerbatch.h, qt/qscilexercmake.h, qt/qscilexercoffeescript.h, qt/qscilexercpp.h, qt/qscilexercsharp.h, qt/qscilexercss.h, qt/qscilexercustom.h, qt/qscilexerd.h, qt/qscilexerdiff.h, qt/qscilexerfortran.h, qt/qscilexerfortran77.h, qt/qscilexerhtml.h, qt/qscilexeridl.h, qt/qscilexerjava.h, qt/qscilexerjavascript.h, qt/qscilexerjson.h, qt/qscilexerlua.h, qt/qscilexermakefile.h, qt/qscilexermarkdown.h, qt/qscilexermatlab.h, qt/qscilexeroctave.h, qt/qscilexerpascal.h, qt/qscilexerperl.h, qt/qscilexerpo.h, qt/qscilexerpostscript.h, qt/qscilexerpov.h, qt/qscilexerproperties.h, qt/qscilexerpython.h, qt/qscilexerruby.h, qt/qscilexerspice.h, qt/qscilexersql.h, qt/qscilexertcl.h, qt/qscilexertex.h, qt/qscilexerverilog.h, qt/qscilexervhdl.h, qt/qscilexerxml.h, qt/qscilexeryaml.h, qt/qscimacro.h, qt/qsciprinter.h, qt/qsciscintilla.h, qt/qsciscintillabase.h, qt/qscistyle.h, qt/qscistyledtext.h: Removed all the __APPLE__ C++ linkages. [ecd39912cb9b] * NEWS, Python/sip/qscilexer.sip, qt/qscilexer.h: The previously internal methods of QsciLexer are now part of the public API and are exposed to Python. [4791eae227c6] * NEWS, Python/configure.py, qt/features/qscintilla2.prf, qt/features_staticlib/qscintilla2.prf, qt/qscintilla.pro: The name of the library now embeds the major version of Qt so that Qt4 and Qt5 libraries can be installed in the same directory. [b501dcc67049] * NEWS, Python/sip/qsciscintilla.sip, qt/qscilexercustom.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Implemented QscScintilla::bytes() and a corresponding text() overload mainly for the use of QsciLexerCustom::styleText() implementations. [ed7a5a072695] 2017-01-15 Phil Thompson * Python/sip/qsciscintillabase.sip: Updated the sub-class convertor code. [ee4e6efa0576] * NEWS, Python/sip/qscilexermarkdown.sip, Python/sip/qscimodcommon.sip, qt/qscilexermarkdown.cpp, qt/qscilexermarkdown.h, qt/qscintilla.pro: Added the QsciLexerMarkdown class. [0b5e03e0b64f] 2017-01-11 Phil Thompson * NEWS, Python/sip/qscilexerjson.sip, Python/sip/qscimodcommon.sip, qt/qscilexerjson.cpp, qt/qscilexerjson.h, qt/qscintilla.pro: Implemented QsciLexerJSON. [bb5118a2b0cb] 2017-01-05 Phil Thompson * NEWS, Python/sip/qscilexercoffeescript.sip, qt/qscilexercoffeescript.cpp, qt/qscilexercoffeescript.h: Added InstanceProperty to QsciLexerCoffeeScript. [2a6987f4c3c3] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Implemented the new notifications. [12ba81979751] 2017-01-04 Phil Thompson * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added the low-level popup options. [6a6fccaf8adf] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added support for multiple edge columns. [761b940d39c6] 2017-01-03 Phil Thompson * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added the low-level idle styling support. [fe8c747abb81] * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added the low-level support for fold text. [3afaaf7830c6] * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Updates to the low-level target support. [709bfb578a28] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added support for the additional indicators. [fb7bcbfc6c96] * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added some more low-level constants. [d19d12e79c31] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added support for setting the margin background colour. Added support for setting the number of margins. [407db46c80a6] * qt/qscilexercustom.cpp, qt/qscilexercustom.h: Fixed QsciLexerCustom::startStyling() now that the 2nd argument isn't used. [2d4cc3cdb123] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added support for visible whitespace in indentations only. Added support for tab drawing modes. [1ef385e510b8] * qt/InputMethod.cpp: Updated the inputMethodEvent() implementation. [f0060458bd73] 2017-01-02 Phil Thompson * qt/InputMethod.cpp, qt/ScintillaQt.cpp, qt/ScintillaQt.h: Fixed compilation bugs with SCI_NAMESPACE defined. [ef072ff5da5e] * lib/README.doc: Minor documentation updates. [f89ceb95b9c5] * qt/qsciscintillabase.cpp: Fixed compilation bugs. [8fdfb9bca00d] * CONTRIBUTING, Python/configure-old.py, Python/configure.py, README, cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, cocoa/ScintillaCocoa.h, cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/Info.plist, cocoa/ ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj, coc oa/ScintillaFramework/ScintillaFramework.xcodeproj/project.xcworkspa ce/contents.xcworkspacedata, cocoa/ScintillaFramework/ScintillaFrame work.xcodeproj/xcshareddata/xcschemes/Scintilla.xcscheme, cocoa/ScintillaFramework/module.modulemap, cocoa/ScintillaTest/AppController.h, cocoa/ScintillaTest/AppController.mm, cocoa/ScintillaTest/English.lproj/MainMenu.xib, cocoa/ScintillaTest/Info.plist, cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, cocoa/S cintillaTest/ScintillaTest.xcodeproj/project.xcworkspace/contents.xc workspacedata, cocoa/ScintillaView.h, cocoa/ScintillaView.mm, cocoa/checkbuildosx.sh, cppcheck.suppress, delcvs.bat, designer- Qt4Qt5/designer.pro, doc/Design.html, doc/Icons.html, doc/Lexer.txt, doc/Privacy.html, doc/SciCoding.html, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/ScintillaToDo.html, doc/ScintillaUsage.html, doc/index.html, example- Qt4Qt5/application.pro, gtk/Converter.h, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/ScintillaGTK.h, gtk/ScintillaGTKAccessible.cxx, gtk/ScintillaGTKAccessible.h, gtk/deps.mak, gtk/makefile, gtk/scintilla-marshal.c, gtk/scintilla- marshal.h, gtk/scintilla-marshal.list, include/ILexer.h, include/Platform.h, include/SciLexer.h, include/Sci_Position.h, include/Scintilla.h, include/Scintilla.iface, include/ScintillaWidget.h, lexers/LexA68k.cxx, lexers/LexAPDL.cxx, lexers/LexASY.cxx, lexers/LexAU3.cxx, lexers/LexAVE.cxx, lexers/LexAVS.cxx, lexers/LexAbaqus.cxx, lexers/LexAda.cxx, lexers/LexAsm.cxx, lexers/LexAsn1.cxx, lexers/LexBaan.cxx, lexers/LexBash.cxx, lexers/LexBasic.cxx, lexers/LexBatch.cxx, lexers/LexBibTeX.cxx, lexers/LexBullant.cxx, lexers/LexCLW.cxx, lexers/LexCOBOL.cxx, lexers/LexCPP.cxx, lexers/LexCSS.cxx, lexers/LexCaml.cxx, lexers/LexCmake.cxx, lexers/LexCoffeeScript.cxx, lexers/LexConf.cxx, lexers/LexCrontab.cxx, lexers/LexCsound.cxx, lexers/LexD.cxx, lexers/LexDMAP.cxx, lexers/LexDMIS.cxx, lexers/LexDiff.cxx, lexers/LexECL.cxx, lexers/LexEDIFACT.cxx, lexers/LexEScript.cxx, lexers/LexEiffel.cxx, lexers/LexErlang.cxx, lexers/LexErrorList.cxx, lexers/LexFlagship.cxx, lexers/LexForth.cxx, lexers/LexFortran.cxx, lexers/LexGAP.cxx, lexers/LexGui4Cli.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, lexers/LexHex.cxx, lexers/LexInno.cxx, lexers/LexJSON.cxx, lexers/LexKVIrc.cxx, lexers/LexKix.cxx, lexers/LexLaTeX.cxx, lexers/LexLisp.cxx, lexers/LexLout.cxx, lexers/LexLua.cxx, lexers/LexMMIXAL.cxx, lexers/LexMPT.cxx, lexers/LexMSSQL.cxx, lexers/LexMagik.cxx, lexers/LexMake.cxx, lexers/LexMarkdown.cxx, lexers/LexMatlab.cxx, lexers/LexMetapost.cxx, lexers/LexModula.cxx, lexers/LexMySQL.cxx, lexers/LexNimrod.cxx, lexers/LexNsis.cxx, lexers/LexNull.cxx, lexers/LexOScript.cxx, lexers/LexOpal.cxx, lexers/LexOthers.cxx, lexers/LexPB.cxx, lexers/LexPLM.cxx, lexers/LexPO.cxx, lexers/LexPOV.cxx, lexers/LexPS.cxx, lexers/LexPascal.cxx, lexers/LexPerl.cxx, lexers/LexPowerPro.cxx, lexers/LexPowerShell.cxx, lexers/LexProgress.cxx, lexers/LexProps.cxx, lexers/LexPython.cxx, lexers/LexR.cxx, lexers/LexRebol.cxx, lexers/LexRegistry.cxx, lexers/LexRuby.cxx, lexers/LexRust.cxx, lexers/LexSML.cxx, lexers/LexSQL.cxx, lexers/LexSTTXT.cxx, lexers/LexScriptol.cxx, lexers/LexSmalltalk.cxx, lexers/LexSorcus.cxx, lexers/LexSpecman.cxx, lexers/LexSpice.cxx, lexers/LexTACL.cxx, lexers/LexTADS3.cxx, lexers/LexTAL.cxx, lexers/LexTCL.cxx, lexers/LexTCMD.cxx, lexers/LexTeX.cxx, lexers/LexTxt2tags.cxx, lexers/LexVB.cxx, lexers/LexVHDL.cxx, lexers/LexVerilog.cxx, lexers/LexVisualProlog.cxx, lexers/LexYAML.cxx, lexlib/Accessor.cxx, lexlib/Accessor.h, lexlib/CharacterSet.cxx, lexlib/CharacterSet.h, lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerBase.h, lexlib/LexerModule.cxx, lexlib/LexerModule.h, lexlib/LexerNoExceptions.cxx, lexlib/LexerNoExceptions.h, lexlib/LexerSimple.cxx, lexlib/LexerSimple.h, lexlib/StyleContext.cxx, lexlib/StyleContext.h, lexlib/SubStyles.h, lexlib/WordList.cxx, lexlib/WordList.h, qt/qscintilla.pro, scripts/Face.py, scripts/FileGenerator.py, scripts/GenerateCaseConvert.py, scripts/HeaderCheck.py, scripts/HeaderOrder.txt, scripts/LexGen.py, scripts/ScintillaData.py, src/AutoComplete.cxx, src/CallTip.cxx, src/CaseConvert.cxx, src/CaseConvert.h, src/CaseFolder.cxx, src/Catalogue.cxx, src/CellBuffer.cxx, src/CellBuffer.h, src/CharClassify.cxx, src/CharClassify.h, src/ContractionState.cxx, src/ContractionState.h, src/Decoration.cxx, src/Document.cxx, src/Document.h, src/EditModel.cxx, src/EditModel.h, src/EditView.cxx, src/EditView.h, src/Editor.cxx, src/Editor.h, src/ExternalLexer.cxx, src/Indicator.cxx, src/Indicator.h, src/KeyMap.cxx, src/KeyMap.h, src/LineMarker.cxx, src/MarginView.cxx, src/PerLine.cxx, src/Position.h, src/PositionCache.cxx, src/PositionCache.h, src/RESearch.cxx, src/RESearch.h, src/RunStyles.cxx, src/ScintillaBase.cxx, src/ScintillaBase.h, src/Selection.cxx, src/Selection.h, src/SparseVector.h, src/SplitVector.h, src/Style.cxx, src/Style.h, src/UniConversion.cxx, src/UniConversion.h, src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, test/ScintillaCallable.py, test/XiteQt.py, test/XiteWin.py, test/examples/perl-test- 5220delta.pl, test/examples/perl-test-5220delta.pl.styled, test/examples/perl-test-sub-prototypes.pl, test/examples/perl-test- sub-prototypes.pl.styled, test/gi/Scintilla-0.1.gir.good, test/gi /Scintilla-filtered.h, test/gi/filter-scintilla-h.py, test/gi/gi- test.py, test/gi/makefile, test/lexTests.py, test/simpleTests.py, test/unit/Sci.natvis, test/unit/UnitTester.cxx, test/unit/UnitTester.vcxproj, test/unit/makefile, test/unit/test.mak, test/unit/testCellBuffer.cxx, test/unit/testContractionState.cxx, test/unit/testDecoration.cxx, test/unit/testPartitioning.cxx, test/unit/testRunStyles.cxx, test/unit/testSparseState.cxx, test/unit/testSparseVector.cxx, test/unit/testSplitVector.cxx, test/unit/testWordList.cxx, version.txt, win32/HanjaDic.cxx, win32/HanjaDic.h, win32/PlatWin.cxx, win32/SciLexer.vcxproj, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/deps.mak, win32/makefile, win32/scintilla.mak: Initial merge of Scintilla v3.7.2. [abbfc844caaa] * lib/LICENSE.commercial.short, lib/LICENSE.gpl, lib/LICENSE.gpl.short: Updated the copyright notices. [10d2ba70b9d0] * Makefile, build.py: Merged the v2.9 maintenance branch. [8c0c0a19a3c8] 2016-12-25 Phil Thompson * .hgtags: Added tag 2.9.4 for changeset 06e486532f86 [a0e7ce41b57a] <2.9-maint> * NEWS: Released as v2.9.4. [06e486532f86] [2.9.4] <2.9-maint> 2016-12-24 Phil Thompson * qsci/api/python/Python-3.6.api: Added the .api file for Python v3.6. [4af5841ab5d2] <2.9-maint> 2016-11-07 Phil Thompson * qt/qsciscintillabase.cpp: Updated a comment to explain why setting custom scrollbars doesn't work. [757ca3bbc419] <2.9-maint> 2016-10-25 Phil Thompson * Python/configure.py: Fixed configure.py for Python v2. [6d784269a812] <2.9-maint> 2016-10-23 Phil Thompson * Python/sip/qscimod4.sip, Python/sip/qscimod5.sip: Explicitly %Import the QtCore module so that it is imported in the .pyi file. [fec61f546e2b] <2.9-maint> 2016-09-26 Phil Thompson * lib/README.doc: Removed some (possibly out of date) information about installation on macOS. [c793591a8192] <2.9-maint> * qt/InputMethod.cpp: Disable the hack for handling null input method method events on Windows as there are reports that this breaks character composition. [42977285ae81] <2.9-maint> 2016-09-25 Phil Thompson * qt/qsciscintilla.cpp: Fixed a Qt warning about a too large red value in a QColor. [f9af82c24301] <2.9-maint> 2016-09-23 Phil Thompson * rb-product: Added the minimum PyQt5 wheel version to the product file. [11d2fb4dc51a] <2.9-maint> 2016-09-10 Phil Thompson * Python/configure.py, rb-product: Updated the handling of the minimum SIP version. [1e50ffa9dac1] <2.9-maint> 2016-09-09 Phil Thompson * Python/sip/qscimod5.sip: The limited API is now used for the Python bindings. [a2b8118a4483] <2.9-maint> 2016-08-08 Phil Thompson * Makefile, build.py: Removed the old internal build system. [522e8b386eef] <2.9-maint> 2016-07-25 Phil Thompson * METADATA.in: Removed the Obsoletes tag from METADATA. [fbf9aa05d0b4] <2.9-maint> * .hgtags: Added tag 2.9.3 for changeset 19c9752958b7 [fb5cd006685f] <2.9-maint> * NEWS: Released as v2.9.3. [19c9752958b7] [2.9.3] <2.9-maint> 2016-07-19 Phil Thompson * METADATA.in: Updated METADATA. [aa51b27d9baf] <2.9-maint> 2016-06-21 Phil Thompson * build.py, lib/qscintilla.dxy: Simplify the generation of the doxygen documentation. [12575460cd55] <2.9-maint> * rb-product, rbproduct.py: Replaced the product plugin with a product file. [846ad54d791e] <2.9-maint> 2016-06-10 Phil Thompson * qt/ScintillaQt.cpp, qt/qscintilla.pro: Fixed a flicker problem on OS X. [c1482a759dc0] <2.9-maint> 2016-05-12 Phil Thompson * METADATA.in, rbproduct.py: Try to prevent the GPL and commercial versions being installed at the same time. (Although it doesn't seem to work.) [826424d291a2] <2.9-maint> * METADATA.in, rbproduct.py: Configure the PKG-INFO meta-data according to the license. [e3243207aa15] <2.9-maint> 2016-05-10 Phil Thompson * rbproduct.py: More changes to the product plugin required by rbtools. [437e6032e4df] <2.9-maint> 2016-05-09 Phil Thompson * rbproduct.py: Updated the product plugin for the latest rbtools changes. [393cae59af91] <2.9-maint> 2016-04-22 Phil Thompson * METADATA.in: Updated the meta-data now that Linux wheels are available from PyPI. [40f18e066c6f] <2.9-maint> 2016-04-18 Phil Thompson * .hgtags: Added tag 2.9.2 for changeset 15888f3e91ce [5cd132938309] <2.9-maint> * NEWS: Released as v2.9.2. [15888f3e91ce] [2.9.2] <2.9-maint> * Python/sip/qsciscintillabase.sip: Remove all deprecated /DocType/ annotations. [b9d570ab642a] <2.9-maint> 2016-04-17 Phil Thompson * rbproduct.py: Locate the static library on Windows. [dd8c14dace83] <2.9-maint> * rbproduct.py: Fixed a typo. [baf5c942f528] <2.9-maint> * rbproduct.py: Add any pre-installed .api files to the wheel. [cf7b6302ae83] <2.9-maint> * rbproduct.py: Exploit verbose mode in the product plugin. [da743c037880] <2.9-maint> * rbproduct.py: Fixed permissions of the product plugin. [6fac075e0b88] <2.9-maint> 2016-04-16 Phil Thompson * Makefile: Updated the clean target. [692b14f48ade] <2.9-maint> * rbproduct.py: The wheel now includes translations and API files. [bf911094e537] <2.9-maint> * METADATA.in, Makefile, Python/configure.py, build.py, rbproduct.py: Added the initial support for creating wheels. [da0a5d22e864] <2.9-maint> * Makefile, build.py: Added the --omit-license-tag option to build.py. Added the dist- wheel-gpl target to the master Makefile. [a63c245de735] <2.9-maint> 2016-04-15 Phil Thompson * Python/configure-old.py, Python/configure.py, build.py, qt/features/qscintilla2.prf, qt/features_staticlib/qscintilla2.prf, qt/qsciglobal.h, qt/qscintilla.pro: Symbols are now hidden if possible on all platforms. Improved the handling of QSCINTILLA_DLL so it should be completely automatic. Removed the --no-dll option to configure.py. [e35caca29dd6] <2.9-maint> 2016-03-25 Phil Thompson * Python/configure-old.py, build.py: Use the new naming standards for development versions. [21d2f882320a] <2.9-maint> 2016-03-14 Phil Thompson * Python/configure.py, build.py: The configure.py boilerplate code is applied automatically. [848f3fca41c0] <2.9-maint> 2016-03-13 Phil Thompson * Python/configure.py: Updated the configure.py boilerplate. [b3fd404a1134] <2.9-maint> 2016-03-07 Phil Thompson * Python/configure.py: Added support for PEP 484 stub files to configure.py. [9316fed27503] <2.9-maint> 2015-12-15 Phil Thompson * Makefile: Switched the internal build system to Python v3.5. [5215e7f3116e] <2.9-maint> 2015-10-28 Phil Thompson * Python/configure.py: Handle PATH components that are enclosed in quotes. [d0f19b69ce26] <2.9-maint> 2015-10-24 Phil Thompson * .hgtags: Added tag 2.9.1 for changeset 9bd39be91ef8 [c71bd22d6ccf] <2.9-maint> * NEWS: Released as v2.9.1. [9bd39be91ef8] [2.9.1] <2.9-maint> 2015-10-17 Phil Thompson * qt/qsciscintilla.cpp: Fixed the handling of the keypad modifier. [e363cc2c347f] <2.9-maint> 2015-09-18 Phil Thompson * qsci/api/python/Python-3.5.api: Added the .api file for Python v3.5. [5b4e58de4663] <2.9-maint> 2015-09-10 Phil Thompson * Python/sip/qsciabstractapis.sip, Python/sip/qsciapis.sip: Fixed the Python binding for QsciAbstractAPIs::updateAutoCompletionList(). [53f2939a3b29] <2.9-maint> 2015-09-08 Phil Thompson * Python/configure.py: Use win32-msvc2015 for Python v3.5 and later. [2f264662e2c7] <2.9-maint> 2015-09-01 Phil Thompson * qt/qsciscintilla.cpp: Fixed the restyling of a document displayed in multiple editors. [9309f264ab57] <2.9-maint> 2015-08-24 Phil Thompson * qt/qscintilla.pro, qt/qsciscintilla.cpp: Fixed a problem starting a call tip when the auto-completion list is displayed. Bumped the library version. [2ec2115ea4d2] <2.9-maint> 2015-07-12 Phil Thompson * designer-Qt4Qt5/qscintillaplugin.h: Fixed a warning message when compiling against Qt v5.5.0. [3ff05a0ef88d] <2.9-maint> 2015-07-09 Phil Thompson * Python/configure.py: Update QMAKE_RPATHDIR rather than set it. [045c64a7e65c] <2.9-maint> 2015-06-24 Phil Thompson * Python/configure.py: Set QMAKE_RPATHDIR for Qt v5.5 on OS X. [b83394e4a676] <2.9-maint> 2015-05-26 Phil Thompson * Python/configure.py: Fixed the backstop handling in the Python bindings configuration script and bumped the version number. [1ab1dd7ea495] <2.9-maint> 2015-05-02 Phil Thompson * qt/qscintilla.pro: Use QT_HOST_DATA for the .prf destination with Qt v5. Removed all Qt v3 support from the .pro file. [63c0391624a8] <2.9-maint> 2015-04-20 Phil Thompson * .hgtags: Added tag 2.9 for changeset 41ee8162fa81 [9817b0a7a4f7] * NEWS: Released as v2.9. [41ee8162fa81] [2.9] 2015-04-14 Phil Thompson * qt/qsciscintillabase.cpp: Fixed a problem notifying when focus is lost to another application widget. [41734678234e] 2015-04-06 Phil Thompson * qt/qsciscintillabase.cpp: Fixed a crash when deleting an instance. [eb936ad1f826] 2015-04-05 Phil Thompson * qt/qsciscintilla.cpp: Fixed a problem applying a lexer's styles that manifested itself by the wrong style being applied to line numbers when using a custom lexer. [c91009909b8e] 2015-04-04 Phil Thompson * qt/qscintilla_es.qm, qt/qscintilla_es.ts: Updated Spanish translations from Jaime. [d94218e7d47d] * qt/ScintillaQt.h: Fixed some header file dependencies. [f246e863957f] * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_es.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm: Updated German translations from Detlev. [01f3be277e14] 2015-04-03 Phil Thompson * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts: Updated the .ts translation files. [659fb035d1c4] 2015-04-02 Phil Thompson * qt/qsciapis.cpp: Fixed a problem displaying call-tips when auto-completion is enabled. [82ec45421a3d] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, qt/qsciscintillabase.h: Exposed the remaining new features. [6e84b61268c5] 2015-04-01 Phil Thompson * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Exposing new Scintilla functionality. [e0965dc46693] 2015-03-31 Phil Thompson * qt/qscilexerverilog.cpp, qt/qscilexerverilog.h: Enabled the new styling features of QsciLexerVerilog. [5be65189b15f] * NEWS, Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, qt/qscilexercpp.h: Completed the updates to QsciLexerCPP. [a8e24b727d82] * NEWS, Python/sip/qscilexercpp.sip, Python/sip/qscilexersql.sip, Python/sip/qscilexerverilog.sip, Python/sip/qscilexervhdl.sip, Python/sip/qsciscintillabase.sip, qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexerverilog.cpp, qt/qscilexerverilog.h, qt/qscilexervhdl.cpp, qt/qscilexervhdl.h, qt/qsciscintillabase.h: Updated existing lexers with new styles. [768f8ff280e1] 2015-03-30 Phil Thompson * qt/qsciapis.cpp: Make sure call tips don't include image types. [d0830816cda4] * qt/ScintillaQt.cpp, qt/ScintillaQt.h: Fixed the horizontal scrollbar issues, particularly with long lines. [db8501c0803f] 2015-03-29 Phil Thompson * qt/ScintillaQt.cpp: Updated the paste support. [42ad3657d52e] * qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp: Added support for idle processing. [ff277e910df7] 2015-03-27 Phil Thompson * NEWS: Updated the NEWS file. [64766fb4c800] * qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Add support for fine tickers. [3e9b89430dc0] 2015-03-26 Phil Thompson * Makefile, Python/sip/qsciabstractapis.sip, Python/sip/qsciapis.sip, Python/sip/qscicommandset.sip, Python/sip/qscilexer.sip, Python/sip/qscilexeravs.sip, Python/sip/qscilexerbash.sip, Python/sip/qscilexerbatch.sip, Python/sip/qscilexercmake.sip, Python/sip/qscilexercoffeescript.sip, Python/sip/qscilexercpp.sip, Python/sip/qscilexercsharp.sip, Python/sip/qscilexercss.sip, Python/sip/qscilexercustom.sip, Python/sip/qscilexerd.sip, Python/sip/qscilexerdiff.sip, Python/sip/qscilexerfortran.sip, Python/sip/qscilexerfortran77.sip, Python/sip/qscilexerhtml.sip, Python/sip/qscilexeridl.sip, Python/sip/qscilexerjava.sip, Python/sip/qscilexerjavascript.sip, Python/sip/qscilexerlua.sip, Python/sip/qscilexermakefile.sip, Python/sip/qscilexermatlab.sip, Python/sip/qscilexeroctave.sip, Python/sip/qscilexerpascal.sip, Python/sip/qscilexerperl.sip, Python/sip/qscilexerpo.sip, Python/sip/qscilexerpostscript.sip, Python/sip/qscilexerpov.sip, Python/sip/qscilexerproperties.sip, Python/sip/qscilexerpython.sip, Python/sip/qscilexerruby.sip, Python/sip/qscilexerspice.sip, Python/sip/qscilexersql.sip, Python/sip/qscilexertcl.sip, Python/sip/qscilexertex.sip, Python/sip/qscilexerverilog.sip, Python/sip/qscilexervhdl.sip, Python/sip/qscilexerxml.sip, Python/sip/qscilexeryaml.sip, Python/sip/qscimacro.sip, Python/sip/qscimod3.sip, Python/sip/qscimod4.sip, Python/sip/qscimod5.sip, Python/sip/qscimodcommon.sip, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, build.py, designer-Qt3/designer.pro, designer- Qt3/qscintillaplugin.cpp, example-Qt3/application.cpp, example- Qt3/application.h, example-Qt3/application.pro, example- Qt3/fileopen.xpm, example-Qt3/fileprint.xpm, example- Qt3/filesave.xpm, example-Qt3/main.cpp, lib/README, lib/README.doc, lib/qscintilla.dxy, qt/InputMethod.cpp, qt/ListBoxQt.cpp, qt/PlatQt.cpp, qt/SciClasses.cpp, qt/SciClasses.h, qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciabstractapis.cpp, qt/qsciabstractapis.h, qt/qsciapis.cpp, qt/qsciapis.h, qt/qscicommandset.cpp, qt/qscicommandset.h, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexeravs.cpp, qt/qscilexeravs.h, qt/qscilexerbash.cpp, qt/qscilexerbash.h, qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, qt/qscilexercmake.cpp, qt/qscilexercmake.h, qt/qscilexercoffeescript.cpp, qt/qscilexercoffeescript.h, qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexercsharp.cpp, qt/qscilexercsharp.h, qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexercustom.cpp, qt/qscilexercustom.h, qt/qscilexerd.cpp, qt/qscilexerd.h, qt/qscilexerdiff.cpp, qt/qscilexerdiff.h, qt/qscilexerfortran.cpp, qt/qscilexerfortran.h, qt/qscilexerfortran77.cpp, qt/qscilexerfortran77.h, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, qt/qscilexeridl.cpp, qt/qscilexeridl.h, qt/qscilexerjava.cpp, qt/qscilexerjava.h, qt/qscilexerjavascript.cpp, qt/qscilexerjavascript.h, qt/qscilexerlua.cpp, qt/qscilexerlua.h, qt/qscilexermakefile.cpp, qt/qscilexermakefile.h, qt/qscilexermatlab.cpp, qt/qscilexermatlab.h, qt/qscilexeroctave.cpp, qt/qscilexeroctave.h, qt/qscilexerpascal.cpp, qt/qscilexerpascal.h, qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpo.cpp, qt/qscilexerpo.h, qt/qscilexerpostscript.cpp, qt/qscilexerpostscript.h, qt/qscilexerpov.cpp, qt/qscilexerpov.h, qt/qscilexerproperties.cpp, qt/qscilexerproperties.h, qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, qt/qscilexerspice.cpp, qt/qscilexerspice.h, qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexertcl.cpp, qt/qscilexertcl.h, qt/qscilexertex.cpp, qt/qscilexertex.h, qt/qscilexerverilog.cpp, qt/qscilexerverilog.h, qt/qscilexervhdl.cpp, qt/qscilexervhdl.h, qt/qscilexerxml.cpp, qt/qscilexerxml.h, qt/qscilexeryaml.cpp, qt/qscilexeryaml.h, qt/qscimacro.cpp, qt/qscimacro.h, qt/qsciprinter.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h, qt/qscistyle.cpp, qt/qscistyledtext.h: Removed all support for Qt3 and PyQt3. [b33b2f06716e] * Python/configure-old.py, Python/configure.py, designer- Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qscintilla.pro: The updated code now compiles. [35d05076c62f] * cocoa/InfoBar.h, cocoa/InfoBar.mm, cocoa/InfoBarCommunicator.h, cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, cocoa/QuartzTextLayout.h, cocoa/QuartzTextStyle.h, cocoa/ScintillaCocoa.h, cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework .xcodeproj/project.pbxproj, cocoa/ScintillaTest/AppController.h, cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, cocoa/ScintillaView.h, cocoa/ScintillaView.mm, cocoa/checkbuildosx.sh, cppcheck.suppress, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/index.html, gtk/Converter.h, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, include/Platform.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, lexers/LexAbaqus.cxx, lexers/LexAsm.cxx, lexers/LexBash.cxx, lexers/LexBasic.cxx, lexers/LexBibTeX.cxx, lexers/LexCPP.cxx, lexers/LexCmake.cxx, lexers/LexCoffeeScript.cxx, lexers/LexDMAP.cxx, lexers/LexDMIS.cxx, lexers/LexECL.cxx, lexers/LexEScript.cxx, lexers/LexForth.cxx, lexers/LexFortran.cxx, lexers/LexGui4Cli.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, lexers/LexHex.cxx, lexers/LexKix.cxx, lexers/LexLua.cxx, lexers/LexMarkdown.cxx, lexers/LexMatlab.cxx, lexers/LexModula.cxx, lexers/LexMySQL.cxx, lexers/LexOthers.cxx, lexers/LexPS.cxx, lexers/LexPerl.cxx, lexers/LexRegistry.cxx, lexers/LexRuby.cxx, lexers/LexRust.cxx, lexers/LexSQL.cxx, lexers/LexScriptol.cxx, lexers/LexSpecman.cxx, lexers/LexTCL.cxx, lexers/LexTCMD.cxx, lexers/LexTxt2tags.cxx, lexers/LexVHDL.cxx, lexers/LexVerilog.cxx, lexers/LexVisualProlog.cxx, lexlib/Accessor.cxx, lexlib/Accessor.h, lexlib/CharacterCategory.cxx, lexlib/CharacterSet.cxx, lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerModule.cxx, lexlib/LexerModule.h, lexlib/LexerNoExceptions.cxx, lexlib/LexerSimple.cxx, lexlib/LexerSimple.h, lexlib/PropSetSimple.cxx, lexlib/SparseState.h, lexlib/StringCopy.h, lexlib/StyleContext.cxx, lexlib/StyleContext.h, lexlib/SubStyles.h, lexlib/WordList.cxx, lexlib/WordList.h, lib/README.doc, qt/qscintilla.pro, scripts/GenerateCaseConvert.py, scripts/GenerateCharacterCategory.py, scripts/HFacer.py, scripts/HeaderOrder.txt, scripts/LexGen.py, scripts/ScintillaData.py, src/AutoComplete.cxx, src/AutoComplete.h, src/CallTip.cxx, src/CaseConvert.cxx, src/CaseFolder.cxx, src/Catalogue.cxx, src/CellBuffer.cxx, src/CellBuffer.h, src/CharClassify.cxx, src/ContractionState.cxx, src/ContractionState.h, src/Decoration.cxx, src/Decoration.h, src/Document.cxx, src/Document.h, src/EditModel.cxx, src/EditModel.h, src/EditView.cxx, src/EditView.h, src/Editor.cxx, src/Editor.h, src/ExternalLexer.cxx, src/ExternalLexer.h, src/FontQuality.h, src/Indicator.cxx, src/Indicator.h, src/KeyMap.cxx, src/KeyMap.h, src/LineMarker.cxx, src/LineMarker.h, src/MarginView.cxx, src/MarginView.h, src/Partitioning.h, src/PerLine.cxx, src/PerLine.h, src/PositionCache.cxx, src/PositionCache.h, src/RESearch.cxx, src/RESearch.h, src/ScintillaBase.cxx, src/ScintillaBase.h, src/Selection.cxx, src/Selection.h, src/SplitVector.h, src/Style.cxx, src/Style.h, src/UniConversion.cxx, src/UniConversion.h, src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, src/XPM.h, test/XiteQt.py, test/XiteWin.py, test/lexTests.py, test/simpleTests.py, test/unit/LICENSE_1_0.txt, test/unit/README, test/unit/SciTE.properties, test/unit/catch.hpp, test/unit/makefile, test/unit/test.mak, test/unit/testCellBuffer.cxx, test/unit/testCharClassify.cxx, test/unit/testContractionState.cxx, test/unit/testDecoration.cxx, test/unit/testPartitioning.cxx, test/unit/testRunStyles.cxx, test/unit/testSparseState.cxx, test/unit/testSplitVector.cxx, test/unit/testUnicodeFromUTF8.cxx, test/unit/unitTest.cxx, version.txt, win32/HanjaDic.cxx, win32/HanjaDic.h, win32/PlatWin.cxx, win32/PlatWin.h, win32/SciLexer.vcxproj, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/deps.mak, win32/makefile, win32/scintilla.mak: Added the initial import of Scintilla v3.5.4. [025db9484942] * lib/GPL_EXCEPTION.TXT, lib/GPL_EXCEPTION_ADDENDUM.TXT, lib/LICENSE.GPL2, lib/LICENSE.GPL3, lib/OPENSOURCE-NOTICE.TXT, qt/qscintilla_ru.qm, qt/qscintilla_ru.ts: Merged the 2.8-maint branch into the default. [efe1067a091a] 2015-03-19 Phil Thompson * qt/qsciscintilla.cpp: Fixed QsciScintilla::clearMarginText(). [885b972e38df] <2.8-maint> 2015-02-14 Phil Thompson * Makefile, Python/configure.py: Installing into a virtual env should now work. The internal build system supports sip5. [62d128cc92de] <2.8-maint> 2015-02-08 Phil Thompson * Python/configure.py: Use sip5 if available. [6f5e4b0dae8f] <2.8-maint> 2015-01-02 Phil Thompson * Python/configure.py, lib/LICENSE.commercial.short, lib/LICENSE.gpl, lib/LICENSE.gpl.short, qt/InputMethod.cpp: Updated the copyright notices. [50b9b459dc48] <2.8-maint> * Python/configure-old.py: Fixed configure-old.py for previews. [7ff9140391e4] <2.8-maint> 2014-12-22 Phil Thompson * build.py, lib/LICENSE.GPL3, lib/LICENSE.commercial.short, lib/LICENSE.gpl, lib/LICENSE.gpl.short: More license tweaks. [f3e84d697877] <2.8-maint> * build.py, lib/GPL_EXCEPTION.TXT, lib/GPL_EXCEPTION_ADDENDUM.TXT, lib/LICENSE.GPL2, lib/LICENSE.gpl.short, lib/OPENSOURCE-NOTICE.TXT, lib/README.doc: Aligned the GPL licensing with Qt. [aa58ba575cac] <2.8-maint> 2014-12-21 Phil Thompson * lib/LICENSE.commercial: Updated the commercial license to v4.0. [fd91beaa78dd] <2.8-maint> 2014-11-16 Phil Thompson * build.py: A source package now includes a full ChangeLog. [ba92c1d5c839] <2.8-maint> 2014-09-11 Phil Thompson * .hgtags: Added tag 2.8.4 for changeset e18756e8cf86 [e7f7a594518d] <2.8-maint> * .hgignore, NEWS: Released as v2.8.4. [e18756e8cf86] [2.8.4] <2.8-maint> 2014-09-04 Phil Thompson * NEWS: Updated the NEWS file. [e4e3562b54cb] <2.8-maint> 2014-09-03 Phil Thompson * Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added the missing SCI_SETHOTSPOTSINGLELINE to QsciScintillaBase. Added resetHotspotForegroundColor(), resetHotspotBackgroundColor(), setHotspotForegroundColor(), setHotspotBackgroundColor(), setHotspotUnderline() and setHotspotWrap() to QsciScintilla. [2da018f7e48c] <2.8-maint> 2014-07-31 Phil Thompson * qt/qsciscintilla.cpp: Attempted to improve the auto-indentation behaviour so that the indentation of a line is maintained if a new line has been inserted above by pressing enter at the start of the line. [aafc4a7247fb] <2.8-maint> 2014-07-11 Phil Thompson * Python/configure.py: Fixed the installation of the .api file. [aae8494847ff] <2.8-maint> 2014-07-10 Phil Thompson * Python/configure.py, designer-Qt4Qt5/designer.pro, qt/qscintilla.pro: Fixes to work around QTBUG-39300. Fix when building with a configuration file. [1051e8c260fd] <2.8-maint> 2014-07-03 Phil Thompson * .hgtags: Added tag 2.8.3 for changeset e9cb8530f97f [bb531051c8f3] <2.8-maint> * NEWS: Released as v2.8.3. [e9cb8530f97f] [2.8.3] <2.8-maint> 2014-07-01 Phil Thompson * Python/configure.py: Fixed a cut-and-paste bug in configure.py. [5f7c4c6c9a29] <2.8-maint> * Python/configure.py: Updated to the latest build system boilerplate. [ee0b9a647e7a] <2.8-maint> 2014-06-30 Phil Thompson * Makefile, Python/configure.py: Updates to the build system and the latest boilerplate configure.py. [8485111172c7] <2.8-maint> 2014-06-19 Phil Thompson * qt/qscilexercoffeescript.cpp, qt/qscintilla.pro, qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_es.qm, qt/qscintilla_es.ts, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm, qt/qscintilla_ru.ts: Updated CoffeeScript keywords and German translations from Detlev. Updated Spanish translations from Jaime. Removed the Russian translations as none were current. [978fe16935c4] <2.8-maint> 2014-06-15 Phil Thompson * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the translation source files. [440ab56f1863] <2.8-maint> 2014-06-09 Phil Thompson * Python/sip/qscilexercoffeescript.sip, Python/sip/qscimodcommon.sip, Python/sip/qsciscintillabase.sip: Added QsciLexerCoffeeScript to the Python bindings. [36a6e2123a69] <2.8-maint> * qt/qscilexercoffeescript.h: QsciLexerCoffeeScript property setters are no longer virtual slots. [eef97550eb16] <2.8-maint> * qt/qscilexercoffeescript.cpp, qt/qscilexercoffeescript.h, qt/qscintilla.pro: Added the QsciLexerCoffeeScript class. [0cf56e9cd32a] <2.8-maint> 2014-06-03 Phil Thompson * Python/configure.py: Fixes for Python v2.6. [9b7b5393f228] <2.8-maint> 2014-06-01 Phil Thompson * Python/configure.py: Fixed a regression in configure.py when using the -n or -o options. [f7b1c9821894] <2.8-maint> 2014-05-29 Phil Thompson * qt/PlatQt.cpp, qt/qsciscintillabase.cpp: Fixes for Qt3. [4d0a54024b52] <2.8-maint> * qt/PlatQt.cpp, qt/qscilexer.cpp, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qscistyle.cpp: Font sizes are now handled as floating point values rather than integers. [ea017cc2b198] <2.8-maint> 2014-05-26 Phil Thompson * .hgtags: Added tag 2.8.2 for changeset 5aab3ae01e0e [6cc6eec7c440] <2.8-maint> * NEWS: Released as v2.8.2. [5aab3ae01e0e] [2.8.2] <2.8-maint> * Python/sip/qsciscintillabase.sip: Updated the sub-class converter code. [9b276dae576d] <2.8-maint> * Makefile: Internal build system fixes. [b29b24829b0b] <2.8-maint> 2014-05-24 Phil Thompson * Makefile, Python/configure.py: Fixed some build regressions with PyQt4. [175b657ad031] <2.8-maint> 2014-05-18 Phil Thompson * Makefile: Updates to the top-level Makefile for the latest Android tools. [405fb3eb5473] <2.8-maint> 2014-05-17 Phil Thompson * Makefile: Added the PyQt4 against Qt5 on the iPhone simulator build target. [c31ae5795eec] <2.8-maint> 2014-05-16 Phil Thompson * Makefile, Python/configure.py: Use the PyQt .sip files in sysroot when cross-compiling. [5d8e8b8ddfe5] <2.8-maint> * Makefile, Python/configure.py: Replaced pyqt_sip_flags with pyqt_disabled_features in the configuration file. [f209403c183b] <2.8-maint> 2014-05-15 Phil Thompson * Makefile, Python/sip/qscimod5.sip: The PyQt5 bindings now run on the iOS simulator. [056871b18335] <2.8-maint> * Makefile, Python/configure.py: Building the Python bindings for the iOS simulator now works. [9dfcea4447b8] <2.8-maint> * Makefile: Updated the main Makefile for the Qt v5.2 iOS support. [a619fd411878] <2.8-maint> 2014-05-14 Phil Thompson * Python/configure.py: Don't create the .api file if it isn't going to be installed. [79db1145e882] <2.8-maint> 2014-05-12 Phil Thompson * Python/configure.py: Added the --sysroot, --no-sip-files and --no-qsci-api options to configure.py. [10642d7deba9] <2.8-maint> 2014-05-05 Phil Thompson * Makefile: Updated the internal build system for the combined iOS/Android Qt installation. [9097d3096b70] <2.8-maint> 2014-05-04 Phil Thompson * qt/qscintilla_de.qm, qt/qscintilla_de.ts: Updated German translations from Detlev. [d4f631ee3aaf] <2.8-maint> * qt/qscintilla_es.qm, qt/qscintilla_es.ts: Updated Spanish translations from Jaime Seuma. [51350008c8a4] <2.8-maint> 2014-04-30 Phil Thompson * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the .ts files. [4c5f88b22952] <2.8-maint> 2014-04-29 Phil Thompson * Python/sip/qscilexerpo.sip, Python/sip/qscimodcommon.sip, qt/qscilexerpo.cpp, qt/qscilexerpo.h, qt/qscintilla.pro: Added the QsciLexerPO class. [d42e44550d80] <2.8-maint> * Python/sip/qscilexeravs.sip, Python/sip/qscimodcommon.sip, qt/qscilexeravs.cpp, qt/qscilexeravs.h, qt/qscintilla.pro: Added the QsciLexerAVS class. [ed6edb6ec205] <2.8-maint> 2014-04-27 Phil Thompson * Python/configure.py: Fixes for the refactored configure.py. [21b9fa66338e] <2.8-maint> * Python/configure.py: Initial refactoring of configure.py so that it is implemented as configurable (and reusable) boilerplate. [615d75a88db9] <2.8-maint> 2014-04-24 Phil Thompson * Python/sip/qsciscintilla.sip, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h: setEnabled() now implements the expected visual effects. [3e4254394b08] <2.8-maint> 2014-03-22 Phil Thompson * Python/configure.py: Fixed the handling of the --pyqt-sip-flags option. Restored the specification of the Python library directory for Windows. [3ea496d62b9f] <2.8-maint> * Python/configure.py, qt/features/qscintilla2.prf, qt/qscintilla.pro: Added the --pyqt-sip-flags to configure.py to avoid having to introspect PyQt. Fixed the .prf file for OS/X. Tweaks to configure.py so that a configuration file will use the same names as PyQt5. [77ff3a21d00a] <2.8-maint> 2014-03-21 Phil Thompson * Makefile, lib/README.doc, qt/qscintilla.pro: Changes to the .pro file to build a static library without having to edit it. [f82637449276] <2.8-maint> 2014-03-17 Phil Thompson * qt/PlatQt.cpp, qt/qsciscintillabase.cpp: Fixed building against Qt v5.0.x. [d68e28068b67] <2.8-maint> 2014-03-14 Phil Thompson * .hgtags: Added tag 2.8.1 for changeset 6bb7ab27c958 [dfd473e8336b] <2.8-maint> * NEWS: Released as v2.8.1. [6bb7ab27c958] [2.8.1] <2.8-maint> * qt/SciClasses.cpp: Fixed the display of UTF-8 call tips. [3f0ca7ba60a0] <2.8-maint> 2014-03-12 Phil Thompson * qsci/api/python/Python-3.4.api: Added the .api file for Python v3.4. [3db067b6dcec] <2.8-maint> 2014-03-05 Phil Thompson * qt/PlatQt.cpp: Revised attempt at the outline of alpha rectangles in case Qt ignore the alpha of the pen. [86ab8898503e] <2.8-maint> * qt/PlatQt.cpp: Fixed the setting of the pen when drawing alpha rectangles. [3f4ff2e8aca3] <2.8-maint> 2014-02-09 Phil Thompson * Python/configure.py: The Python module now has the correct install name on OS/X. [eec8c704418a] <2.8-maint> 2014-02-04 Phil Thompson * qt/qscicommand.cpp, qt/qscicommand.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Fixed a problem entering non-ASCII characters that clashed with Scintilla's SCK_* values. Key_Enter, Key_Backtab, Key_Super_L, Key_Super_R and Key_Menu are now valid QsciCommand keys. [94aec4f075df] <2.8-maint> 2014-01-31 Phil Thompson * qt/qsciscintilla.cpp: Make sure the editor is active after a selection of a user list entry. [e0f2106777d0] <2.8-maint> 2014-01-23 Phil Thompson * qt/SciClasses.cpp: On Linux, single clicking on an item in an auto-completion list now just selects the itemm (rather than inserting the item) to be consistent with other platforms. [d916bbbf6517] <2.8-maint> * qt/qsciscintillabase.cpp: Fix the handling of the auto-completion list when losing focus. [a67b51ac8611] <2.8-maint> 2014-01-22 Phil Thompson * qt/InputMethod.cpp, qt/qsciscintillabase.cpp: Fixed building against Qt4. [bf0a5f984fc1] <2.8-maint> 2014-01-19 Phil Thompson * NEWS: Updated the NEWS file. [da2a76da712e] <2.8-maint> 2014-01-18 Phil Thompson * qt/InputMethod.cpp: Another attempt to fix input events on losing focus. [6de3ab62fade] <2.8-maint> * lib/README.doc: Added the qmake integration section to the docs. [2918e4760c36] <2.8-maint> 2014-01-07 Phil Thompson * Makefile: Added Android to the internal build system. [3be74b3e89e9] <2.8-maint> 2014-01-06 Phil Thompson * qt/InputMethod.cpp, qt/qsciscintillabase.cpp: Newlines can now be entered on iOS. [8d23447dbd4d] <2.8-maint> 2014-01-05 Phil Thompson * qt/InputMethod.cpp: See if we can detect a input methdo event generated when losing focus and not to clear the selection. [8e4216289efe] <2.8-maint> 2014-01-04 Phil Thompson * Python/sip/qsciprinter.sip: The Python bindings now respect the PyQt_Printer feature. [c3106f715803] <2.8-maint> 2014-01-03 Phil Thompson * qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added support for software input panels with Qt v5. [d4499b61ff04] <2.8-maint> * qt/qsciscintilla.cpp: Disable input methods when read-only (rather than non-UTF8) to be consistent with Qt. [f8817d4a47e3] <2.8-maint> * qt/qscintilla.pro, qt/qsciprinter.h: Fixed the .pro file so that QT_NO_PRINTER is set properly and removed the workaround. [b5a6709d814a] <2.8-maint> 2014-01-02 Phil Thompson * qt/PlatQt.cpp: Finally fixed buffered drawing on retina displays. [f8d23103df70] <2.8-maint> * qt/PlatQt.cpp, qt/qsciscintillabase.cpp: Fixes for buffered drawing on retina displays. (Not yet correct, but close.) [a3b36be44112] <2.8-maint> * Makefile: Changed the build system for the example on the iOS simulator so that qmake is only used to generate the .xcodeproj file. [179dbf5ba385] <2.8-maint> * Makefile: Added the building of the example to the main Makefile. [aec2ac3ac591] <2.8-maint> * Makefile: Added iOS simulator targets to the build system. [72af8241b261] <2.8-maint> * Makefile, build.py, lib/LICENSE.GPL2, lib/LICENSE.GPL3, lib/LICENSE.commercial.short, lib/LICENSE.gpl.short, qt/InputMethod.cpp: Updated copyright notices. [f21e016499fe] <2.8-maint> * qt/MacPasteboardMime.cpp, qt/qsciprinter.cpp, qt/qsciprinter.h, qt/qsciscintillabase.cpp: Fixes for building for iOS. [46d25e648b4a] <2.8-maint> 2013-12-31 Phil Thompson * Python/configure.py, build.py, designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, lib/README.doc, qt/features/qscintilla2.prf, qt/qscintilla.pro: Implemented the qscintilla2.prf feature file and updated everything to use it. [c3bfef1a55ad] <2.8-maint> 2013-12-29 Phil Thompson * qt/ScintillaQt.h: Added some additional header file dependencies. [7ec67eced9de] <2.8-maint> 2013-12-21 Phil Thompson * qt/MacPasteboardMime.cpp, qt/ScintillaQt.cpp: Fixes for building against Qt3. [f25cbda736fd] <2.8-maint> 2013-12-16 Phil Thompson * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro: Updated the plugin and example .pro files to work around the qmake incompatibilities introduced in Qt v5.2.0. [a14729b2702d] <2.8-maint> 2013-12-15 Phil Thompson * qt/qsciscintillabase.cpp: Fixed the previous fix. [6c322fa1b20f] <2.8-maint> 2013-12-14 Phil Thompson * qt/PlatQt.cpp, qt/qsciscintillabase.cpp: Backed out the attempted fix for retina displays at it needs more work. As a workaround buffered writes are disabled if a retina display is detected. [a1f648d1025e] <2.8-maint> 2013-12-13 Phil Thompson * qt/qscintilla.pro: Enabled exceptions in the .pro file. [6e07131f6741] <2.8-maint> 2013-12-12 Phil Thompson * qt/PlatQt.cpp: Create pixmaps for buffered drawing using the same pixel ratio as the actual device. [f4f706006071] <2.8-maint> 2013-12-09 Phil Thompson * qt/qscilexeroctave.cpp: Updated the keywords defined for the Octave lexer. [9ccf1c74f266] <2.8-maint> 2013-12-06 Phil Thompson * qt/ScintillaQt.cpp: More scrollbar fixes. [194a2142c9b6] <2.8-maint> 2013-12-05 Phil Thompson * qt/ScintillaQt.cpp, qt/qscintilla.pro: Fixes to the scrollbar visibility handling. [5e8a96258ab0] <2.8-maint> 2013-12-04 Phil Thompson * qt/PlatQt.cpp: Fixed the implementation of SurfaceImpl::LogPixelsY() (even though it is never called). [9ef0387cfc08] <2.8-maint> 2013-11-08 Phil Thompson * .hgtags: Added tag 2.8 for changeset 562785a5f685 [fc52bfaa75c4] * NEWS: Released as v2.8. [562785a5f685] [2.8] 2013-11-05 Phil Thompson * qt/qscintilla_es.qm, qt/qscintilla_es.ts: Updated Spanish translations from Jaime Seuma. [e7a128a28157] 2013-11-04 Phil Thompson * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, qt/qscilexerpascal.cpp, qt/qsciscintillabase.h: Added support for the new v3.3.6 features to the low-level API. [e553c1263387] * Makefile, NEWS, cocoa/Framework.mk, cocoa/InfoBar.mm, cocoa/PlatCocoa.mm, cocoa/SciTest.mk, cocoa/ScintillaCocoa.h, cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework .xcodeproj/project.pbxproj, cocoa/ScintillaView.h, cocoa/ScintillaView.mm, cocoa/checkbuildosx.sh, cocoa/common.mk, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/index.html, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/makefile, include/ILexer.h, include/Platform.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, lexers/LexCPP.cxx, lexers/LexCoffeeScript.cxx, lexers/LexOthers.cxx, lexers/LexPascal.cxx, lexers/LexPerl.cxx, lexers/LexRust.cxx, lexers/LexSQL.cxx, lexers/LexVisualProlog.cxx, lexlib/StyleContext.h, lexlib/SubStyles.h, lexlib/WordList.cxx, lib/README.doc, qt/qscintilla.pro, src/Catalogue.cxx, src/Document.cxx, src/Editor.cxx, src/ScintillaBase.cxx, src/ScintillaBase.h, src/ViewStyle.cxx, src/ViewStyle.h, test/XiteQt.py, test/simpleTests.py, version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/makefile, win32/scintilla.mak: Merged Scintilla v3.3.6. [ada0941dec52] 2013-10-07 Phil Thompson * qt/qscintilla_de.qm, qt/qscintilla_de.ts: Updated German translations from Detlev. [6c0af6af651c] * Makefile, build.py, qt/MacPasteboardMime.cpp, qt/qscintilla.pro, qt/qsciscintillabase.cpp: Reinstated support for rectangular selections on OS/X for Qt v5.2 and later. [dbfdf7be4793] 2013-10-04 Phil Thompson * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the translation source files. [7ed4bf7ed4e7] * qt/qscilexercpp.cpp: Added missing descriptions to the C++ lexer settings. [55d7627bb129] 2013-10-01 Phil Thompson * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro: Fixed the building of the Designer plugin and the example for OS/X. [a67f71b06d3c] * NEWS, Python/sip/qsciscintillabase.sip, qt/InputMethod.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added the remaining non-provisional Scintilla v3.3.5 features to the low-level API. [4e8d0b46ebc0] * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the translation source files. [4beefc0d95ec] * NEWS, Python/sip/qscilexercpp.sip, Python/sip/qsciscintillabase.sip, qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qsciscintillabase.h: Updated the lexers for Scintilla v3.3.5. [fc901a2a491f] 2013-09-30 Phil Thompson * Python/configure-old.py, Python/configure.py, README, cocoa/InfoBar.mm, cocoa/PlatCocoa.mm, cocoa/ScintillaCocoa.h, cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework .xcodeproj/project.pbxproj, cocoa/ScintillaTest/AppController.mm, cocoa/ScintillaTest/English.lproj/MainMenu.xib, cocoa/ScintillaView.h, cocoa/ScintillaView.mm, cppcheck.suppress, delbin.bat, designer-Qt4Qt5/designer.pro, doc/Lexer.txt, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/ScintillaToDo.html, doc/index.html, example- Qt4Qt5/application.pro, gtk/Converter.h, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, include/Face.py, include/HFacer.py, include/ILexer.h, include/Platform.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, lexers/LexA68k.cxx, lexers/LexAU3.cxx, lexers/LexAVE.cxx, lexers/LexAda.cxx, lexers/LexAsm.cxx, lexers/LexAsn1.cxx, lexers/LexBash.cxx, lexers/LexBullant.cxx, lexers/LexCOBOL.cxx, lexers/LexCPP.cxx, lexers/LexCoffeeScript.cxx, lexers/LexConf.cxx, lexers/LexCrontab.cxx, lexers/LexCsound.cxx, lexers/LexD.cxx, lexers/LexECL.cxx, lexers/LexForth.cxx, lexers/LexGAP.cxx, lexers/LexGui4Cli.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, lexers/LexInno.cxx, lexers/LexKVIrc.cxx, lexers/LexLaTeX.cxx, lexers/LexLisp.cxx, lexers/LexLout.cxx, lexers/LexLua.cxx, lexers/LexMMIXAL.cxx, lexers/LexMPT.cxx, lexers/LexMSSQL.cxx, lexers/LexMatlab.cxx, lexers/LexModula.cxx, lexers/LexMySQL.cxx, lexers/LexNsis.cxx, lexers/LexOpal.cxx, lexers/LexOthers.cxx, lexers/LexPO.cxx, lexers/LexPerl.cxx, lexers/LexPowerShell.cxx, lexers/LexPython.cxx, lexers/LexR.cxx, lexers/LexRuby.cxx, lexers/LexSTTXT.cxx, lexers/LexScriptol.cxx, lexers/LexSpice.cxx, lexers/LexTCMD.cxx, lexers/LexYAML.cxx, lexlib/Accessor.cxx, lexlib/Accessor.h, lexlib/CharacterCategory.cxx, lexlib/CharacterCategory.h, lexlib/CharacterSet.cxx, lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerModule.cxx, lexlib/LexerNoExceptions.cxx, lexlib/LexerNoExceptions.h, lexlib/LexerSimple.cxx, lexlib/OptionSet.h, lexlib/PropSetSimple.cxx, lexlib/PropSetSimple.h, lexlib/StyleContext.cxx, lexlib/StyleContext.h, lexlib/SubStyles.h, lexlib/WordList.cxx, lexlib/WordList.h, lib/README.doc, qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qscintilla.pro, qt/qsciscintillabase.cpp, scripts/Face.py, scripts/FileGenerator.py, scripts/GenerateCaseConvert.py, scripts/GenerateCharacterCategory.py, scripts/HFacer.py, scripts/LexGen.py, scripts/ScintillaData.py, src/AutoComplete.cxx, src/AutoComplete.h, src/CallTip.cxx, src/CallTip.h, src/CaseConvert.cxx, src/CaseConvert.h, src/CaseFolder.cxx, src/CaseFolder.h, src/Catalogue.cxx, src/CellBuffer.cxx, src/CellBuffer.h, src/ContractionState.cxx, src/Decoration.cxx, src/Decoration.h, src/Document.cxx, src/Document.h, src/Editor.cxx, src/Editor.h, src/ExternalLexer.cxx, src/FontQuality.h, src/Indicator.cxx, src/KeyMap.cxx, src/KeyMap.h, src/LexGen.py, src/LineMarker.cxx, src/LineMarker.h, src/Partitioning.h, src/PerLine.cxx, src/PerLine.h, src/PositionCache.cxx, src/PositionCache.h, src/RESearch.cxx, src/RESearch.h, src/RunStyles.cxx, src/RunStyles.h, src/SVector.h, src/ScintillaBase.cxx, src/ScintillaBase.h, src/Selection.cxx, src/SplitVector.h, src/Style.cxx, src/Style.h, src/UniConversion.cxx, src/UniConversion.h, src/UnicodeFromUTF8.h, src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, src/XPM.h, test/README, test/ScintillaCallable.py, test/XiteQt.py, test/XiteWin.py, test/examples/x.lua, test/examples/x.lua.styled, test/examples/x.pl, test/examples/x.pl.styled, test/examples/x.rb, test/examples/x.rb.styled, test/lexTests.py, test/performanceTests.py, test/simpleTests.py, test/unit/testCharClassify.cxx, test/unit/testContractionState.cxx, test/unit/testPartitioning.cxx, test/unit/testRunStyles.cxx, test/unit/testSplitVector.cxx, version.txt, win32/PlatWin.cxx, win32/PlatWin.h, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/deps.mak, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: Initial merge of Scintilla v3.3.5. [40933b62f5ed] 2013-09-14 Phil Thompson * Python/configure-ng.py, Python/configure.py, designer- Qt4/designer.pro, designer-Qt4/qscintillaplugin.cpp, designer- Qt4/qscintillaplugin.h: Merged the 2.7-maint branch with the trunk. [7288d97c54b0] 2013-08-17 Phil Thompson * Python/sip/qsciscintillabase.sip: Fixed a missing const in the .sip files. [8b0425b87953] <2.7-maint> 2013-06-27 Phil Thompson * NEWS, Python/configure-old.py, Python/configure.py, Python/sip/qsciscintillabase.sip, designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, qt/InputMethod.cpp, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added support for input methods. [b97af619044b] <2.7-maint> 2013-06-16 Phil Thompson * .hgtags: Added tag 2.7.2 for changeset 9ecd14550589 [2b1f187f29c6] <2.7-maint> * NEWS: Released as v2.7.2. [9ecd14550589] [2.7.2] <2.7-maint> 2013-06-12 Phil Thompson * Python/configure.py: Fixed a configure.py bug. [cb062c6f9189] <2.7-maint> 2013-05-07 Phil Thompson * Makefile, Python/configure.py: Fixes for the PyQt5 support. [0714ef531ead] <2.7-maint> * Makefile, NEWS, Python/configure.py, Python/sip/qscimod5.sip, lib/README.doc: Added support for building against PyQt5. [c982ff1b86f7] <2.7-maint> 2013-05-05 Phil Thompson * build.py: Changed the format of the name of a snapshot to match other packages. [d1f87bbc8377] <2.7-maint> 2013-05-04 Phil Thompson * qt/PlatQt.cpp: Significantly improved the performance of measuring the width of text so that very long lines (100,000 characters) can be handled. [5c88dc344f69] <2.7-maint> 2013-04-08 Phil Thompson * Python/configure.py: configure.py now issues a more explicit error message if QtCore cannot be imported. [4d0097b1ff05] <2.7-maint> * Python/configure.py: Fixed a qmake warning message from configure.py. [2363c96edeb0] <2.7-maint> 2013-04-02 Phil Thompson * qt/qsciscintilla.cpp, qt/qsciscintilla.h: The default EOL mode on OS/X is now EolUnix. Clarified the documentation for EolMode. [a436460d0300] <2.7-maint> 2013-03-15 Phil Thompson * Python/configure.py: Further fixes for configure.py. [78fa6fef2c76] <2.7-maint> 2013-03-13 Phil Thompson * qt/qscilexer.h: Clarified the description of QSciLexer::description(). [688b482379e3] <2.7-maint> * Python/configure.py: Fixed the last (trivial) change. [0a3494ba669a] <2.7-maint> 2013-03-12 Phil Thompson * Python/configure.py: configure.py now gives the user more information about the copy of sip being used. [5c3be581d62b] <2.7-maint> 2013-03-07 Phil Thompson * Python/configure.py: On OS/X configure.py will explicitly set the qmake spec to macx-g++ (Qt4) or macx-clang (Qt5) if the default might be macx-xcode. Added the --spec option to configure.py. [36a9bf2fbebd] <2.7-maint> 2013-03-05 Phil Thompson * Python/configure.py: Minor cosmetic tweaks to configure.py. [296cd10747b7] <2.7-maint> * qt/PlatQt.cpp, qt/SciClasses.cpp, qt/qscicommandset.cpp, qt/qscintilla.pro, qt/qsciscintillabase.cpp: Removed the remaining uses of Q_WS_* for Qt v5. [7fafd5c09eea] <2.7-maint> 2013-03-01 Phil Thompson * .hgtags: Added tag 2.7.1 for changeset 2583dc3dbc8d [0674c291eab4] <2.7-maint> * NEWS: Released as v2.7.1. [2583dc3dbc8d] [2.7.1] <2.7-maint> 2013-02-28 Phil Thompson * lexlib/CharacterSet.h: Re-applied a fix to the underlying code thay got lost when Scintilla v3.23 was merged. [ee9eeec7d796] <2.7-maint> 2013-02-26 Phil Thompson * qt/qsciapis.cpp: A fix for the regression introduced with the previous fix. [154428cebb5e] <2.7-maint> 2013-02-19 Phil Thompson * NEWS, qt/qsciapis.cpp, qt/qscintilla.pro: Fixed an autocompletion bug where there are entries Foo.* and FooBar. [620d72d86980] <2.7-maint> 2013-02-06 Phil Thompson * Python/configure.py: configure.py fixes for Linux. [031b5b767926] <2.7-maint> * Python/configure.py: Added the --sip-incdir and --pyqt-sipdir options to configure.py and other fixes for building on Windows. [517a3d0243fd] <2.7-maint> * Makefile, NEWS: Updated the NEWS file. [eb00e08e1950] <2.7-maint> * Makefile, Python/configure.py: Fixed configure.py for Qt5. [7ddb5bf2030c] <2.7-maint> * Python/configure-ng.py, Python/configure-old.py, Python/configure.py, build.py, lib/README.doc: Completed configure-ng.py and renamed it configure.py. The old configure.py is now called configure-old.py. [8d58b2899080] <2.7-maint> 2013-02-05 Phil Thompson * Python/configure-ng.py: configure-ng.py now uses -fno-exceptions on Linux and OS/X. configure-ng.py now hides unneeded symbols on Linux. [391e4f56b009] <2.7-maint> * Python/configure-ng.py: configure-ng.py will now install the .sip and .api files. [e228d58a670c] <2.7-maint> * Python/configure-ng.py: configure-ng.py will now create a Makefile that will build the Python module. [cb47ace62a70] <2.7-maint> 2013-02-02 Phil Thompson * qt/qsciglobal.h: Use Q_OS_WIN for compatibility for Qt5. [da752cf4510a] <2.7-maint> 2013-01-29 Phil Thompson * designer-Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro: Use macx rather than mac in the .pro files. [ee818a367df7] <2.7-maint> 2012-12-21 Phil Thompson * Python/configure-ng.py, Python/configure.py, designer- Qt4Qt5/designer.pro, example-Qt4Qt5/application.pro, lib/README.doc, qt/qscintilla.pro: Various OS/X fixes so that setting DYLD_LIBRARY_PATH isn't necessary. [e7854b8b01e3] <2.7-maint> 2012-12-19 Phil Thompson * build.py, designer-Qt4/designer.pro, designer- Qt4/qscintillaplugin.cpp, designer-Qt4/qscintillaplugin.h, designer- Qt4Qt5/designer.pro, designer-Qt4Qt5/qscintillaplugin.cpp, designer- Qt4Qt5/qscintillaplugin.h, lib/README.doc: Updated the Designer plugin for Qt5. [77f575c87ebb] <2.7-maint> 2012-12-08 Phil Thompson * .hgtags: Added tag 2.7 for changeset 9bab1e7b02e3 [5600138109ce] * NEWS: Released as v2.7. [9bab1e7b02e3] [2.7] 2012-12-07 Phil Thompson * qt/qscintilla_es.qm, qt/qscintilla_es.ts: Updated Spanish translations from Jaime. [b188c942422c] * NEWS: Updated the NEWS file regarding Qt v5-rc1. [be9e6b928921] 2012-12-02 Phil Thompson * qt/qsciscintilla.cpp: A final(?) fix for scroll bars and annotations. [378f28e5b4b2] * Python/configure-ng.py: More build system changes. [f53fc8743ff1] 2012-11-29 Phil Thompson * Python/configure-ng.py: More configure script changes. [434c9b3185a5] * Python/configure-ng.py: More work on the new configure script. [3a044732b799] * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_es.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm: Updated German translations from Detlev. [9dab221845ca] 2012-11-28 Phil Thompson * Python/configure-ng.py, build.py: Added the start of the SIP v5 compatible build script. [781d2af60cfc] 2012-11-27 Phil Thompson * Python/configure.py: Fixed the handling of the 'linux' platform in the Python bindings. [835d5e3be69e] 2012-11-26 Phil Thompson * qt/qsciscintilla.cpp, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Worked around Scintilla bugs related to scroll bars and annotations. [edc190ecc6fc] * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the translation files. [ec754f87a735] * NEWS, Python/sip/qscilexercss.sip, qt/qscilexercss.cpp, qt/qscilexercss.h: Updated the CSS lexer for Scintilla v3.23. [011fba6d668d] * qt/qscilexercpp.h: Fixed a couple of documentation typos. [7c2d04c76bd6] * NEWS, Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, qt/qscilexercpp.h: Updated the C++ lexer for Scintilla v3.23. [ad93ee355639] 2012-11-24 Phil Thompson * Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, qt/qscilexercpp.h: Updated the styles for the C++ lexer. [153429503998] 2012-11-23 Phil Thompson * NEWS, Python/sip/qsciscintilla.sip, qt/PlatQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added CallTipsPosition, callTipsPosition() and setCallTipsPosition(). [7e5602869fee] * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.h: Added SquigglePixmapIndicator to QsciScintilla::IndicatorStyle. [ad98a5396151] * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added WrapFlagInMargin to QsciScintilla::WrapVisualFlag. [a38c75c45fb3] * NEWS, qt/PlatQt.cpp, qt/qsciscintilla.cpp, qt/qscistyle.cpp: Created a back door to pass the Qt weight of a font avoiding lossy conversions between Qt weights and Scintilla weights. The default behaviour is now SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE which is a change but reflects what people really expect. [78ce86e97ad3] 2012-11-21 Phil Thompson * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Updated the constants from Scintilla v3.23. [a3a0768af999] * NEWS, Python/configure.py, include/Platform.h, lib/README.doc, qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/PlatQt.cpp, qt/SciClasses.cpp, qt/ScintillaQt.cpp, qt/qscintilla.pro, src/ExternalLexer.h, src/XPM.cxx, src/XPM.h: Updated the platform support so that it compiles (but untested). [abae8e56a6ea] 2012-11-20 Phil Thompson * cocoa/InfoBar.h, cocoa/InfoBar.mm, cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, cocoa/QuartzTextStyle.h, cocoa/QuartzTextStyleAttribute.h, cocoa/ScintillaCocoa.h, cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/English.lproj/InfoPlist.strings, cocoa/Scin tillaFramework/ScintillaFramework.xcodeproj/project.pbxproj, cocoa/ScintillaTest/AppController.mm, cocoa/ScintillaTest/English.lproj/InfoPlist.strings, cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, cocoa/ScintillaView.h, cocoa/ScintillaView.mm, cocoa/checkbuildosx.sh, delbin.bat, delcvs.bat, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/ScintillaToDo.html, doc/annotations.png, doc/index.html, doc/styledmargin.png, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/makefile, include/Face.py, include/ILexer.h, include/Platform.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, include/ScintillaWidget.h, lexers/LexAVS.cxx, lexers/LexAda.cxx, lexers/LexAsm.cxx, lexers/LexBash.cxx, lexers/LexBasic.cxx, lexers/LexCPP.cxx, lexers/LexCSS.cxx, lexers/LexCoffeeScript.cxx, lexers/LexD.cxx, lexers/LexECL.cxx, lexers/LexFortran.cxx, lexers/LexHTML.cxx, lexers/LexLua.cxx, lexers/LexMMIXAL.cxx, lexers/LexMPT.cxx, lexers/LexNsis.cxx, lexers/LexOScript.cxx, lexers/LexOthers.cxx, lexers/LexPO.cxx, lexers/LexPascal.cxx, lexers/LexPerl.cxx, lexers/LexRuby.cxx, lexers/LexSQL.cxx, lexers/LexScriptol.cxx, lexers/LexSpice.cxx, lexers/LexTADS3.cxx, lexers/LexTCL.cxx, lexers/LexTCMD.cxx, lexers/LexVHDL.cxx, lexers/LexVisualProlog.cxx, lexers/LexYAML.cxx, lexlib/CharacterSet.h, lexlib/LexAccessor.h, lexlib/PropSetSimple.cxx, macosx/ExtInput.cxx, macosx/ExtInput.h, macosx/PlatMacOSX.cxx, macosx/PlatMacOSX.h, macosx/QuartzTextLayout.h, macosx/QuartzTextStyle.h, macosx/QuartzTextStyleAttribute.h, macosx/SciTest/English.lproj/InfoPlist.strings, macosx/SciTest/English.lproj/main.xib, macosx/SciTest/Info.plist, macosx/SciTest/SciTest.xcode/project.pbxproj, macosx/SciTest/SciTest_Prefix.pch, macosx/SciTest/main.cpp, macosx/SciTest/version.plist, macosx/ScintillaCallTip.cxx, macosx/ScintillaCallTip.h, macosx/ScintillaListBox.cxx, macosx/ScintillaListBox.h, macosx/ScintillaMacOSX.cxx, macosx/ScintillaMacOSX.h, macosx/TCarbonEvent.cxx, macosx/TCarbonEvent.h, macosx/TRect.h, macosx/TView.cxx, macosx/TView.h, macosx/deps.mak, macosx/makefile, src/AutoComplete.cxx, src/AutoComplete.h, src/CallTip.cxx, src/CallTip.h, src/Catalogue.cxx, src/CellBuffer.cxx, src/CellBuffer.h, src/CharClassify.cxx, src/CharClassify.h, src/Decoration.cxx, src/Document.cxx, src/Document.h, src/Editor.cxx, src/Editor.h, src/ExternalLexer.h, src/FontQuality.h, src/Indicator.cxx, src/Indicator.h, src/LexGen.py, src/LineMarker.cxx, src/LineMarker.h, src/PerLine.cxx, src/PerLine.h, src/PositionCache.cxx, src/PositionCache.h, src/RESearch.cxx, src/RunStyles.cxx, src/SciTE.properties, src/ScintillaBase.cxx, src/ScintillaBase.h, src/SplitVector.h, src/Style.cxx, src/Style.h, src/UniConversion.cxx, src/UniConversion.h, src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, src/XPM.h, test/README, test/examples/x.cxx, test/examples/x.cxx.styled, test/lexTests.py, test/simpleTests.py, test/unit/makefile, test/unit/testCharClassify.cxx, test/unit/testRunStyles.cxx, tgzsrc, version.txt, win32/CheckD2D.cxx, win32/PlatWin.cxx, win32/PlatWin.h, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak, zipsrc.bat: Initial merge of Scintilla v3.23. [b116f361ac01] * example-Qt4/application.pro, example-Qt4/application.qrc, example- Qt4/images/copy.png, example-Qt4/images/cut.png, example- Qt4/images/new.png, example-Qt4/images/open.png, example- Qt4/images/paste.png, example-Qt4/images/save.png, example- Qt4/main.cpp, example-Qt4/mainwindow.cpp, example-Qt4/mainwindow.h: Merged the 2.6 maintenance branch with the trunk. [0bf4f7453c68] 2012-11-14 Phil Thompson * Makefile, example-Qt4Qt5/application.pro, qt/qsciscintillabase.cpp: Fixed the linking of the example on OS/X. [e1d1f43fae71] <2.6-maint> 2012-11-12 Phil Thompson * Makefile, qt/PlatQt.cpp, qt/qscimacro.cpp, qt/qsciscintilla.cpp, qt/qscistyle.cpp: Removed all calls that are deprecated in Qt5. The build system now supports cross-compilation to the Raspberry Pi. [afef9d2b3ab1] <2.6-maint> 2012-11-02 Phil Thompson * qt/qscilexersql.h: Added comments to the QsciLexerSQL documentation stating that additional keywords must be defined using lower case. [79a9274b77c3] <2.6-maint> 2012-10-09 Phil Thompson * NEWS, lib/ed.py, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added a replace option to the test editor's find commands. Finished implementing findFirstInSelection(). [80df6cc89bae] <2.6-maint> * lib/ed.py: Added the Find, Find in Selection and Find Next actions to the test editor. [4aad56aedbea] <2.6-maint> 2012-10-03 Phil Thompson * lib/ed.py: Added an internal copy of the hackable Python test editor. [a67a6fe99937] <2.6-maint> 2012-09-27 Phil Thompson * lib/gen_python3_api.py, qsci/api/python/Python-3.3.api: Fixed the gen_python3_api.py script to be able to exclude module hierachies. Added the API file for Python v3.3. [06bbb2d1c227] <2.6-maint> 2012-09-22 Phil Thompson * qt/ListBoxQt.cpp: Fixed a problem building against versions of Qt4 prior to v4.7. [7bf93d60a50b] <2.6-maint> 2012-09-18 Phil Thompson * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added setOverwriteMode() and overwriteMode() to QsciScintilla. [1affc53d2d88] <2.6-maint> 2012-09-14 Phil Thompson * qt/qsciscintillabase.cpp: Disable the use of QMacPasteboardMime for Qt v5-beta1. [a6625d5928c6] <2.6-maint> 2012-08-24 Phil Thompson * qt/qscilexerperl.cpp, qt/qscilexerperl.h: Fixed auto-indentation for Perl. [5eb1d97f95d6] <2.6-maint> 2012-08-13 Phil Thompson * lexlib/CharacterSet.h: Removed an incorrect assert() in the main Scintilla code. [1aaf5e09d4b2] <2.6-maint> 2012-08-09 Phil Thompson * NEWS, Python/sip/qsciscintilla.sip, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added QsciScintilla::wordAtLineIndex(). [0c5d77aef4f7] <2.6-maint> 2012-07-19 Phil Thompson * qt/qscintilla.pro, qt/qsciscintillabase.cpp: Fixed key handling on Linux with US international layout which generates non-ASCII sequences for quote characters. [061ab2c5bea3] <2.6-maint> 2012-06-20 Phil Thompson * .hgtags: Added tag 2.6.2 for changeset f9d3d982c20f [a5bb033cd9e0] <2.6-maint> * NEWS: Released as v2.6.2. [f9d3d982c20f] [2.6.2] <2.6-maint> 2012-06-19 Phil Thompson * qt/qsciscintillabase.cpp: Fixed pasting of text in UTF8 mode (and hopefully Latin1 mode as well). [6df653daef18] <2.6-maint> * qt/qsciscintillabase.cpp: Rectangular selections are now always encoded as plain/text with an explicit, and separate, marker to indicate that it is rectangular. [012a0b2ca89f] <2.6-maint> 2012-06-09 Phil Thompson * qt/qsciscintillabase.cpp: Used the Mac method of marking rectangular selections as the '\0' Scintilla hack just doesn't work with Qt. [75020a35b5eb] <2.6-maint> * qt/qscintilla.pro: Bumped the library version number. [12f21729e254] <2.6-maint> 2012-06-07 Phil Thompson * qt/qsciscintillabase.cpp: Improved the support for rectangular selections and the interoperability with other Scintilla based editors. [a42942b57fb7] <2.6-maint> * qt/qsciscintillabase.cpp: Fixed the middle button pasting of rectangular selections. [db58aa6c6d7d] <2.6-maint> * qt/qscidocument.cpp: Fixed a bug that seemed to mean the initial EOL mode was always UNIX. [88561cd29a60] <2.6-maint> * qt/qsciscintillabase.cpp: Line endings are properly translated when dropping text. [d21994584e87] <2.6-maint> 2012-06-04 Phil Thompson * Makefile, qt/qsciprinter.h: The Python bindings now build against Qt5. [ff2a74e5aec2] <2.6-maint> 2012-04-04 Phil Thompson * Makefile, NEWS, build.py, example-Qt4/application.pro, example- Qt4/application.qrc, example-Qt4/images/copy.png, example- Qt4/images/cut.png, example-Qt4/images/new.png, example- Qt4/images/open.png, example-Qt4/images/paste.png, example- Qt4/images/save.png, example-Qt4/main.cpp, example- Qt4/mainwindow.cpp, example-Qt4/mainwindow.h, example- Qt4Qt5/application.pro, example-Qt4Qt5/application.qrc, example- Qt4Qt5/images/copy.png, example-Qt4Qt5/images/cut.png, example- Qt4Qt5/images/new.png, example-Qt4Qt5/images/open.png, example- Qt4Qt5/images/paste.png, example-Qt4Qt5/images/save.png, example- Qt4Qt5/main.cpp, example-Qt4Qt5/mainwindow.cpp, example- Qt4Qt5/mainwindow.h, lib/LICENSE.GPL2, lib/LICENSE.GPL3, lib/LICENSE.commercial.short, lib/LICENSE.gpl.short, lib/README, lib/README.doc, lib/qscintilla.dxy, qt/PlatQt.cpp, qt/qscintilla.pro: Ported to Qt v5. [ff3710487c3e] <2.6-maint> 2012-04-02 Phil Thompson * qt/qsciapis.cpp: Worked around an obscure Qt (or compiler) bug when handling call tips. [e6c7edcfdfb9] <2.6-maint> 2012-03-04 Phil Thompson * Python/sip/qscilexer.sip, Python/sip/qscilexerbash.sip, Python/sip/qscilexerbatch.sip, Python/sip/qscilexercpp.sip, Python/sip/qscilexercss.sip, Python/sip/qscilexerd.sip, Python/sip/qscilexerdiff.sip, Python/sip/qscilexerhtml.sip, Python/sip/qscilexermakefile.sip, Python/sip/qscilexerperl.sip, Python/sip/qscilexerpov.sip, Python/sip/qscilexerproperties.sip, Python/sip/qscilexertex.sip, Python/sip/qscilexerverilog.sip, qt/qscilexer.h, qt/qscilexerbash.h, qt/qscilexerbatch.h, qt/qscilexercpp.h, qt/qscilexercss.h, qt/qscilexerd.h, qt/qscilexerdiff.h, qt/qscilexerhtml.h, qt/qscilexermakefile.h, qt/qscilexerperl.h, qt/qscilexerpov.h, qt/qscilexerproperties.h, qt/qscilexertex.h, qt/qscilexerverilog.h: QSciLexer::wordCharacters() is now part of the public API. [933ef6a11ee6] <2.6-maint> 2012-02-23 Phil Thompson * qt/qscilexercpp.h: Updated the documentation for QsciLexerCpp::keywords() so that it describes which sets are supported. [4e0cb0250dad] <2.6-maint> 2012-02-21 Phil Thompson * qt/qscintilla.pro, src/Document.cxx: Some Scintilla fixes for the SCI_NAMESPACE support. [611ffd016585] <2.6-maint> 2012-02-10 Phil Thompson * .hgtags: Added tag 2.6.1 for changeset 47d8fdf44946 [aa843f471972] <2.6-maint> * NEWS: Updated the NEWS file. Released as v2.6.1. [47d8fdf44946] [2.6.1] <2.6-maint> 2012-01-26 Phil Thompson * qt/qsciscintilla.cpp: Don't implement shortcut overrides for the standard context menu shortcuts. Instead leave it to the check against bound keys. [e8ccaf398640] <2.6-maint> 2012-01-19 Phil Thompson * qt/qsciapis.cpp: APIs now allow for whitespace between the end of a word and the opening parenthesis of the argument list. [b09b25f38411] <2.6-maint> 2012-01-11 Phil Thompson * qt/SciClasses.cpp: Fixed the handling of auto-completion lists on Windows. [131138b43c85] <2.6-maint> 2011-12-07 Phil Thompson * Python/sip/qscicommandset.sip, qt/qscicommandset.cpp, qt/qscicommandset.h, qt/qscintilla.pro: Improved the Qt v3 port so that the signatures don't need to be changed. Bumped the .so version number. [3171bb05b1d8] <2.6-maint> 2011-12-06 Phil Thompson * Makefile, NEWS, Python/sip/qscicommandset.sip, include/Platform.h, qt/ListBoxQt.cpp, qt/qscicommandset.cpp, qt/qscicommandset.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h, src/XPM.cxx: Fixed building against Qt v3. [74df75a62f5c] <2.6-maint> 2011-11-21 Phil Thompson * NEWS, include/Platform.h, qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/PlatQt.cpp, qt/SciClasses.cpp, qt/SciClasses.h, qt/SciNamespace.h, qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qscintilla.pro, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added support for SCI_NAMESPACE to allow all internal Scintilla classes to be placed in the Scintilla namespace. [ab7857131e35] <2.6-maint> 2011-11-11 Phil Thompson * .hgtags: Added tag 2.6 for changeset 8b119c4f69d0 [1a5dd31e773e] * NEWS, lib/README.doc: Updated the NEWS file. Updated the introductory documentation. Released as v2.6. [8b119c4f69d0] [2.6] 2011-11-07 Phil Thompson * NEWS, Python/sip/qscicommandset.sip, Python/sip/qsciscintilla.sip, qt/qscicommandset.cpp, qt/qscicommandset.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added QsciCommandSet::boundTo(). Ordinary keys and those bound to commands now override any shortcuts. [ba98bc555aca] 2011-10-28 Phil Thompson * qt/qscintilla_de.qm, qt/qscintilla_de.ts: More updated German translations from Detlev. [9ff20df1997b] 2011-10-27 Phil Thompson * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_es.qm, qt/qscintilla_es.ts, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm: Updated Spanish translations from Jaime. Updated German translations from Detlev. [4903315d96b1] 2011-10-23 Phil Thompson * Python/sip/qscicommand.sip: Fixed SelectAll in the Python bindings. [b6f0a46e0eac] * qt/ScintillaQt.cpp, qt/qsciscintillabase.cpp: Fixed drag and drop (specifically so that copying works on OS/X again). [6ab90cb63b2b] 2011-10-22 Phil Thompson * qt/PlatQt.cpp: Fixed a display bug with kerned fonts. [a746e319d9cd] * qt/qsciscintilla.cpp: The foreground and background colours of selected text are now taken from the application palette. [7f6c34ad8d27] * NEWS: Updated the NEWS file. [1717c6d59b12] * Python/sip/qsciscintilla.sip, qt/qscicommand.h, qt/qscicommandset.cpp, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Renamed QsciCommand::SelectDocument to SelectAll. Added QsciScintilla::createStandardContextMenu(). [c42fa7e83b07] 2011-10-21 Phil Thompson * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the .ts files. [92d0b6ddf371] * qt/qscicommandset.cpp: Completed the OS/X specific key bindings. [964fa889b807] 2011-10-20 Phil Thompson * qt/qscicommandset.cpp, qt/qsciscintillabase.cpp: Fixed the support for SCMOD_META. Started to add the correct OS/X key bindings as the default. [0073fa86a5a0] * Python/sip/qscicommand.sip, qt/qscicommand.h, qt/qscicommandset.cpp: All available commands are now defined in the standard command set. [7c7b81b55f0e] * Python/sip/qscicommand.sip, qt/qscicommand.h: Completed the QsciCommand::Command documentation. Added the members to QsciCommand.Command in the Python bindings. [0ca6ff576c21] 2011-10-18 Phil Thompson * NEWS, Python/sip/qscicommandset.sip, qt/qscicommand.h, qt/qscicommandset.cpp, qt/qscicommandset.h: Added QsciCommandSet::find(). [e75565018b90] * NEWS, Python/sip/qscicommand.sip, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qscicommand.cpp, qt/qscicommand.h, qt/qscicommandset.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added Command, command() and execute() to QsciCommand. Backed out the high level support for moving the selection up and down. [4852ee57353e] 2011-10-17 Phil Thompson * qt/qscilexersql.cpp: Fix for the changed fold at else property in the SQL lexer. [e65a458cd9d8] * NEWS, Python/sip/qscilexerpython.sip, qt/qscilexerpython.cpp, qt/qscilexerpython.h: Added highlightSubidentifiers() and setHighlightSubidentifiers() to the Python lexer. [b397695bc2ab] * NEWS, Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, qt/qscilexercpp.h: Added support for triple quoted strings to the C++ lexer. [687d04948c5d] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added low level support for identifiers, scrolling to the start and end. Added low and hight level support for moving the selection up and down. [3ac1ccfad039] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added low and high level support for margin options. [f3cd3244cecd] 2011-10-14 Phil Thompson * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Updated the brace matching support to handle indicators. [7e4a4d3529a8] * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added SCI_SETEMPTYSELECTION. [879b97c676a4] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Updated the support for indicators. [b3643569a827] * NEWS, Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added SCI_MARKERSETBACKSELECTED and SCI_MARKERENABLEHIGHLIGHT. [7127ee82d128] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added low and high-level support for RGBA images (ie. QImage). [7707052913ef] 2011-10-13 Phil Thompson * NEWS, Python/sip/qscilexerlua.sip, qt/qscilexerlua.cpp, qt/qscilexerlua.h: Updated the Lua lexer. [710e50d5692c] * NEWS, Python/sip/qscilexerperl.sip, qt/qscilexerperl.cpp, qt/qscilexerperl.h: Updated the Perl lexer. [6d16e2e9354b] 2011-10-11 Phil Thompson * Python/configure.py, cocoa/ScintillaCallTip.h, cocoa/ScintillaCallTip.mm, cocoa/ScintillaListBox.h, cocoa/ScintillaListBox.mm, cocoa/res/info_bar_bg.png, cocoa/res/mac_cursor_busy.png, cocoa/res/mac_cursor_flipped.png, macosx/SciTest/English.lproj/InfoPlist.strings, macosx/SciTest/English.lproj/main.nib/classes.nib, macosx/SciTest/English.lproj/main.nib/info.nib, macosx/SciTest/English.lproj/main.nib/objects.xib, macosx/SciTest/English.lproj/main.xib, qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/PlatQt.cpp, qt/qscintilla.pro, src/XPM.cxx, src/XPM.h: Some fixes left over from the merge of v2.29. Added support for RGBA images so that the merged version compiles. [16c6831c337f] * cocoa/InfoBar.mm, cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, cocoa/QuartzTextLayout.h, cocoa/QuartzTextStyle.h, cocoa/QuartzTextStyleAttribute.h, cocoa/ScintillaCocoa.h, cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework .xcodeproj/project.pbxproj, cocoa/ScintillaTest/AppController.mm, cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, cocoa/ScintillaView.h, cocoa/ScintillaView.mm, doc/SciCoding.html, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/ScintillaToDo.html, doc/index.html, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/makefile, include/Platform.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, lexers/LexAU3.cxx, lexers/LexCOBOL.cxx, lexers/LexCPP.cxx, lexers/LexConf.cxx, lexers/LexHTML.cxx, lexers/LexInno.cxx, lexers/LexLua.cxx, lexers/LexMagik.cxx, lexers/LexMarkdown.cxx, lexers/LexMatlab.cxx, lexers/LexModula.cxx, lexers/LexOthers.cxx, lexers/LexPerl.cxx, lexers/LexPowerPro.cxx, lexers/LexPython.cxx, lexers/LexSQL.cxx, lexers/LexTeX.cxx, lexers/LexVHDL.cxx, lexers/LexVerilog.cxx, lexlib/Accessor.cxx, lexlib/CharacterSet.h, lexlib/PropSetSimple.cxx, lexlib/SparseState.h, lexlib/StyleContext.h, lexlib/WordList.cxx, macosx/PlatMacOSX.cxx, macosx/PlatMacOSX.h, macosx/SciTest/SciTest.xcode/project.pbxproj, macosx/ScintillaMacOSX.h, macosx/makefile, src/CallTip.cxx, src/ContractionState.cxx, src/ContractionState.h, src/Decoration.cxx, src/Document.cxx, src/Document.h, src/Editor.cxx, src/Editor.h, src/Indicator.cxx, src/Indicator.h, src/KeyMap.cxx, src/KeyMap.h, src/LexGen.py, src/LineMarker.cxx, src/LineMarker.h, src/PerLine.cxx, src/PositionCache.cxx, src/PositionCache.h, src/RESearch.cxx, src/RunStyles.cxx, src/RunStyles.h, src/ScintillaBase.cxx, src/Style.cxx, src/Style.h, src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, src/XPM.h, test/XiteMenu.py, test/XiteWin.py, test/examples/x.html, test/examples/x.html.styled, test/performanceTests.py, test/simpleTests.py, test/unit/testContractionState.cxx, test/unit/testRunStyles.cxx, version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/scintilla.mak: Merged Scintilla v2.29. [750c2c3cef72] * Merged the v2.5 maintenance branch back into the trunk. [eab39863675f] 2011-06-24 Phil Thompson * qt/qscilexer.cpp, qt/qscilexerbash.cpp, qt/qscilexerbatch.cpp, qt/qscilexercmake.cpp, qt/qscilexercpp.cpp, qt/qscilexercsharp.cpp, qt/qscilexercss.cpp, qt/qscilexerd.cpp, qt/qscilexerfortran77.cpp, qt/qscilexerhtml.cpp, qt/qscilexerjavascript.cpp, qt/qscilexerlua.cpp, qt/qscilexermakefile.cpp, qt/qscilexermatlab.cpp, qt/qscilexerpascal.cpp, qt/qscilexerperl.cpp, qt/qscilexerpostscript.cpp, qt/qscilexerpov.cpp, qt/qscilexerproperties.cpp, qt/qscilexerpython.cpp, qt/qscilexerruby.cpp, qt/qscilexerspice.cpp, qt/qscilexersql.cpp, qt/qscilexertcl.cpp, qt/qscilexerverilog.cpp, qt/qscilexervhdl.cpp, qt/qscilexerxml.cpp, qt/qscilexeryaml.cpp: Changed the default fonts for MacOS so that they are larger and similar to the Windows defaults. [9c37c180ba8d] <2.5-maint> * build.py: Fixed the build system for MacOS as the development platform. [3352479980c5] <2.5-maint> 2011-05-13 Phil Thompson * lib/README.doc: Updated the licensing information in the main documentation. [d31c561e0b7c] <2.5-maint> * lib/LICENSE.GPL2, lib/LICENSE.GPL3, lib/LICENSE.gpl.short: Removed some out of date links from the license information. Updated the dates of some copyright notices. [a84451464396] <2.5-maint> 2011-05-10 Phil Thompson * Makefile, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added the optional posix flag to QsciScintilla::findFirst(). [ad6064227d06] <2.5-maint> 2011-04-29 Phil Thompson * Python/configure.py, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qscistyle.cpp, qt/qscistyle.h, qt/qscistyledtext.cpp, qt/qscistyledtext.h: Fixed problems with QsciStyle and QsciStyledText when used with more than one QsciScintilla instance. [8bac389fb7ae] <2.5-maint> 2011-04-22 Phil Thompson * qt/qsciglobal.h: Changed the handling of QT_BEGIN_NAMESPACE etc. as it isn't defined in early versions of Qt v4. [595c8c6cdfd2] <2.5-maint> 2011-04-17 Phil Thompson * .hgtags: Added tag 2.5.1 for changeset c8648c2c0c7f [298153b3d40e] <2.5-maint> * NEWS: Released as v2.5.1. [c8648c2c0c7f] [2.5.1] <2.5-maint> 2011-04-16 Phil Thompson * qt/qscintilla_de.ts, qt/qscintilla_es.ts: Updated translations from Detlev and Jaime. [9436bea546c9] <2.5-maint> 2011-04-14 Phil Thompson * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_es.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm: Updated the compiled translation files. [c5d39aca8f51] <2.5-maint> 2011-04-13 Phil Thompson * Python/sip/qscilexermatlab.sip, Python/sip/qscilexeroctave.sip, Python/sip/qscimodcommon.sip: Added Python bindings for QsciLexerMatlab abd QsciLexerOctave. [22d0ed0fab2a] <2.5-maint> * NEWS, qt/qscilexermatlab.cpp, qt/qscilexermatlab.h, qt/qscilexeroctave.cpp, qt/qscilexeroctave.h, qt/qscintilla.pro, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Added QsciLexerMatlab and QsciLexerOctave. [40d3053334de] <2.5-maint> 2011-04-09 Phil Thompson * Merged the font strategy fix from the trunk. [d270e1b107d2] <2.5-maint> * NEWS: Updated the NEWS file. [8f32ff4cdd1f] <2.5-maint> 2011-04-07 Phil Thompson * qt/PlatQt.cpp, qt/qscintilla.pro: Fixed the handling of the font quality setting so that the default behavior (particularly on Windows) is the same as earlier versions. [87ae98d2674b] 2011-03-29 Phil Thompson * .hgtags: Added tag 2.5 for changeset 9d94a76f783e [e4807fd91f6c] * NEWS: Released as v2.5. [9d94a76f783e] [2.5] 2011-03-28 Phil Thompson * NEWS, Python/configure.py: Added support for the protected-is-public hack to configure.py. [beee52b8e10a] 2011-03-27 Phil Thompson * qt/PlatQt.cpp: Fixed an OS/X build problem. [ac7f1d3c9abe] 2011-03-26 Phil Thompson * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added replaceSelectedText() to QsciScintilla. [3c00a19d6571] 2011-03-25 Phil Thompson * Python/configure.py, Python/sip/qsciapis.sip, Python/sip/qscilexer.sip, Python/sip/qscilexercustom.sip, Python/sip/qscimod4.sip, Python/sip/qsciprinter.sip, Python/sip/qsciscintilla.sip, Python/sip/qscistyle.sip, qt/qsciapis.cpp, qt/qsciapis.h, qt/qscilexercustom.cpp, qt/qscilexercustom.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qscistyle.cpp, qt/qscistyle.h: Went through the API making sure all optional arguments had consistent and meaningful names. Enabled keyword support in the Python bindings. [d60fa45e40b7] 2011-03-23 Phil Thompson * qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_es.qm, qt/qscintilla_es.ts: Updated German translations from Detlev. Updated Spanish translations from Jaime. [f64c97749375] 2011-03-21 Phil Thompson * lexers/LexModula.cxx, lexlib/SparseState.h, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts, test/unit/testSparseState.cxx, vcbuild/SciLexer.dsp: Updated the translation files. Updated the repository for the new and removed Scintilla v2.25 files. [6eb77ba7c57c] * NEWS, Python/sip/qscilexercpp.sip, Python/sip/qsciscintillabase.sip, qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscintilla.pro, qt/qsciscintillabase.h: Added support for raw string to the C++ lexer. [f83112ced877] * NEWS, cocoa/Framework.mk, cocoa/PlatCocoa.mm, cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/ScintillaFramework .xcodeproj/project.pbxproj, cocoa/ScintillaTest/AppController.mm, cocoa/ScintillaView.h, cocoa/ScintillaView.mm, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/index.html, gtk/PlatGTK.cxx, gtk/makefile, include/Platform.h, include/SciLexer.h, include/Scintilla.iface, lexers/LexAsm.cxx, lexers/LexBasic.cxx, lexers/LexCPP.cxx, lexers/LexD.cxx, lexers/LexFortran.cxx, lexers/LexOthers.cxx, lexlib/CharacterSet.h, lib/README.doc, macosx/SciTest/main.cpp, src/AutoComplete.cxx, src/Catalogue.cxx, src/Document.cxx, src/Editor.cxx, src/LexGen.py, test/unit/makefile, version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, win32/scintilla.mak, win32/scintilla_vc6.mak: Merged Scintilla v2.25. [e01dec109182] 2011-03-14 Phil Thompson * qt/qscintilla_es.qm, qt/qscintilla_es.ts: Updated Spanish translations from Jaime Seuma. [b83a3ca4f3e6] 2011-03-12 Phil Thompson * qt/qscintilla_de.qm, qt/qscintilla_de.ts: Updated German translations from Detlev. [e5729134a47b] 2011-03-11 Phil Thompson * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the translation source files. [51e8ee8b1ba9] * NEWS, Python/sip/qscilexercpp.sip, qt/qscilexercpp.cpp, qt/qscilexercpp.h: Added support for the inactive styles of QsciLexerCPP. [59b566d322af] * qt/qscilexercpp.cpp, qt/qscilexercpp.h: Inlined all existing property getters in QsciLexerCPP. [1117e5105e5e] 2011-03-10 Phil Thompson * qt/qsciscintilla.cpp: Fixed QsciScintilla::setContractedFolds() so that it actually updates the display to show the new state. [5079f59a0103] * NEWS, Python/sip/qscilexerhtml.sip, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h: Updated QsciLexerHTML. [0707f4bc7855] * NEWS, Python/sip/qscilexerproperties.sip, qt/qscilexerproperties.cpp, qt/qscilexerproperties.h: Updated QsciLexerProperties. [1dfe5e2d4913] * NEWS, Python/sip/qscilexerpython.sip, Python/sip/qscilexerruby.sip, Python/sip/qscilexersql.sip, Python/sip/qscilexertcl.sip, Python/sip/qscilexertex.sip, qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscilexerruby.h, qt/qscilexersql.h, qt/qscilexertcl.h, qt/qscilexertex.cpp, qt/qscilexertex.h: Updated QsciLexerPython. [bc96868a1a6f] * NEWS, Python/sip/qscilexerruby.sip, Python/sip/qscilexersql.sip, Python/sip/qscilexertcl.sip, Python/sip/qscilexertex.sip, qt/qscilexerruby.cpp, qt/qscilexerruby.h, qt/qscilexersql.h, qt/qscilexertcl.h, qt/qscilexertex.h: The new lexer property setters are no longer virtual slots. [c3e88383e8d3] * qt/qscilexersql.cpp, qt/qscilexersql.h: Restored the default behaviour of setFoldCompact() for QsciLexerSQL. [c74aef0f7eb4] * NEWS, Python/sip/qscilexertcl.sip, qt/qscilexersql.h, qt/qscilexertcl.cpp, qt/qscilexertcl.h: Updated QsciLexerTCL. [43a150bb40d5] * NEWS, Python/sip/qscilexertex.sip, qt/qscilexertex.cpp, qt/qscilexertex.h: Updated QsciLexerTeX. [1457935cee44] * qt/qscintilla_cs.qm, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_es.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm: Updated German translations from Detlev. [ad4a4bd4855b] 2011-03-08 Phil Thompson * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the .ts translation files. [8d70033d07e2] * NEWS, Python/sip/qscilexersql.sip, qt/qscilexersql.cpp, qt/qscilexersql.h: Updated QsciLexerSQL. [8bc79d109c88] * NEWS, Python/sip/qscilexercss.sip, qt/qscilexercss.cpp, qt/qscilexercss.h: Updated QsciLexerCSS. [f3adcb31b1a9] * NEWS, Python/sip/qscilexerd.sip, qt/qscilexerd.cpp, qt/qscilexerd.h: Updated QsciLexerD. [82d8a6561943] * Python/sip/qscilexerlua.sip, qt/qscilexerlua.cpp, qt/qscilexerlua.h: Updated QsciLexerLua. [103f5881c642] * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, qt/qsciscintillabase.h: Added support for the QsciScintillaBase::SCN_HOTSPOTRELEASECLICK() signal. [1edd56e105cd] * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added low-level support for SCLEX_MARKDOWN, SCLEX_TXT2TAGS and SCLEX_A68K. [de92a613cea7] * Python/sip/qsciscintillabase.sip, qt/qscicommand.cpp, qt/qsciscintilla.cpp, qt/qsciscintillabase.h: Added support for SCMOD_SUPER as the Qt Meta key modifier. [24e745cddeea] * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Updated the QsciScintillaBase::SCN_UPDATEUI() signal. Added low- level support for SC_MOD_LEXERSTATE. [0a341fcb0545] * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added low-level support for the updated property functions. [f33d9c271992] * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added low-level support for SCI_GETLEXERLANGUAGE and SCI_PRIVATELEXERCALL. [ac69f8c2ef3b] * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added low-level support for the new stick caret options. [693ac6c68e6f] * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added low-level support for SCI_AUTOCGETCURRENTTEXT. [2634827cdb4e] * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added low-level support for SC_SEL_THIN. [4225a944dc14] * qt/qsciscintilla.cpp: Folding now works again. [3972053c646e] 2011-03-07 Phil Thompson * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added low-level support for SCI_VERTICALCENTRECARET. [92d5ecb154d1] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added setContractedFolds() and contractedFolds() to QsciScintilla. [46eb254c6200] * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added low-level support for SCI_CHANGELEXERSTATE. [edd899d77aa7] * Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added low-level support for SCI_CHARPOSITIONFROMPOINT and SCI_CHARPOSITIONFROMPOINTCLOSE. [5a000cf4bfba] * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added low-level support for multiple selections. [dedda8cbf413] * Python/sip/qsciscintillabase.sip, qt/qsciscintillabase.h: Added SCI_GETTAG. [775d0058f00e] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added QsciScintilla::setFirstVisibleLine(). [8b662ffe3fb6] * Python/sip/qsciscintillabase.sip, qt/PlatQt.cpp, qt/qsciscintillabase.h: Added low-level support for setting the font quality. [933e8b01eda6] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added high-level support for line wrap indentation modes. [1faa3b2fa31e] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added high-level support for extra ascent and descent space. Added high-level support for whitespace size, foreground and background. [537c551a79ef] * Python/sip/qsciscintillabase.sip, qt/PlatQt.cpp, qt/qsciscintillabase.h: Updated the low level support for cursors. [2ce685a89697] * NEWS, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.h, qt/qsciscintillabase.h: Updated the support for markers and added FullRectangle, LeftRectangle and Underline to the MarkerSymbol enum. [4c626f8189bf] 2011-03-06 Phil Thompson * NEWS, Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Rectangular selections are now fully supported. The signatures of toMimeData() and fromMimeData() have changed. [397948f42b2e] * NEWS: Updated the NEWS file. [bc75b98210f2] * .hgignore: Added the .hgignore file. [77312a36220e] * qt/qsciscintilla.cpp: Removed the workaround for the broken annotations in Scintilla v1.78. [70ab4c4b7c66] * qt/ListBoxQt.cpp: Fixed a regression when displaying an auto-completion list. [c38d4b97a1ca] 2011-03-04 Phil Thompson * qt/ListBoxQt.cpp, qt/PlatQt.cpp, qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp: Completed the merge of Scintilla v2.24. [6890939e2da6] * build.py, qt/qscintilla.pro: More build system changes. [3e9deec76c02] * qt/qscintilla.pro, qt/qsciscintilla.cpp: Updated the .pro file for the changed files and directory structure in v2.24. [274cb7017857] * License.txt, README, bin/empty.txt, cocoa/Framework.mk, cocoa/InfoBar.h, cocoa/InfoBar.mm, cocoa/InfoBarCommunicator.h, cocoa/PlatCocoa.h, cocoa/PlatCocoa.mm, cocoa/QuartzTextLayout.h, cocoa/QuartzTextStyle.h, cocoa/QuartzTextStyleAttribute.h, cocoa/SciTest.mk, cocoa/ScintillaCallTip.h, cocoa/ScintillaCallTip.mm, cocoa/ScintillaCocoa.h, cocoa/ScintillaCocoa.mm, cocoa/ScintillaFramework/Info.plist, cocoa/ ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj, cocoa/ScintillaFramework/Scintilla_Prefix.pch, cocoa/ScintillaListBox.h, cocoa/ScintillaListBox.mm, cocoa/ScintillaTest/AppController.h, cocoa/ScintillaTest/AppController.mm, cocoa/ScintillaTest/English.lproj/MainMenu.xib, cocoa/ScintillaTest/Info.plist, cocoa/ScintillaTest/Scintilla- Info.plist, cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj, cocoa/ScintillaTest/ScintillaTest_Prefix.pch, cocoa/ScintillaTest/TestData.sql, cocoa/ScintillaTest/main.m, cocoa/ScintillaView.h, cocoa/ScintillaView.mm, cocoa/common.mk, delbin.bat, delcvs.bat, doc/Design.html, doc/Lexer.txt, doc/SciBreak.jpg, doc/SciCoding.html, doc/SciRest.jpg, doc/SciTEIco.png, doc/SciWord.jpg, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/ScintillaToDo.html, doc/ScintillaUsage.html, doc/Steps.html, doc/index.html, gtk/Converter.h, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, gtk/scintilla-marshal.c, gtk/scintilla- marshal.h, gtk/scintilla-marshal.list, gtk/scintilla.mak, include/Accessor.h, include/Face.py, include/HFacer.py, include/ILexer.h, include/KeyWords.h, include/Platform.h, include/PropSet.h, include/SString.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, include/ScintillaWidget.h, include/WindowAccessor.h, lexers/LexA68k.cxx, lexers/LexAPDL.cxx, lexers/LexASY.cxx, lexers/LexAU3.cxx, lexers/LexAVE.cxx, lexers/LexAbaqus.cxx, lexers/LexAda.cxx, lexers/LexAsm.cxx, lexers/LexAsn1.cxx, lexers/LexBaan.cxx, lexers/LexBash.cxx, lexers/LexBasic.cxx, lexers/LexBullant.cxx, lexers/LexCLW.cxx, lexers/LexCOBOL.cxx, lexers/LexCPP.cxx, lexers/LexCSS.cxx, lexers/LexCaml.cxx, lexers/LexCmake.cxx, lexers/LexConf.cxx, lexers/LexCrontab.cxx, lexers/LexCsound.cxx, lexers/LexD.cxx, lexers/LexEScript.cxx, lexers/LexEiffel.cxx, lexers/LexErlang.cxx, lexers/LexFlagship.cxx, lexers/LexForth.cxx, lexers/LexFortran.cxx, lexers/LexGAP.cxx, lexers/LexGui4Cli.cxx, lexers/LexHTML.cxx, lexers/LexHaskell.cxx, lexers/LexInno.cxx, lexers/LexKix.cxx, lexers/LexLisp.cxx, lexers/LexLout.cxx, lexers/LexLua.cxx, lexers/LexMMIXAL.cxx, lexers/LexMPT.cxx, lexers/LexMSSQL.cxx, lexers/LexMagik.cxx, lexers/LexMarkdown.cxx, lexers/LexMatlab.cxx, lexers/LexMetapost.cxx, lexers/LexMySQL.cxx, lexers/LexNimrod.cxx, lexers/LexNsis.cxx, lexers/LexOpal.cxx, lexers/LexOthers.cxx, lexers/LexPB.cxx, lexers/LexPLM.cxx, lexers/LexPOV.cxx, lexers/LexPS.cxx, lexers/LexPascal.cxx, lexers/LexPerl.cxx, lexers/LexPowerPro.cxx, lexers/LexPowerShell.cxx, lexers/LexProgress.cxx, lexers/LexPython.cxx, lexers/LexR.cxx, lexers/LexRebol.cxx, lexers/LexRuby.cxx, lexers/LexSML.cxx, lexers/LexSQL.cxx, lexers/LexScriptol.cxx, lexers/LexSmalltalk.cxx, lexers/LexSorcus.cxx, lexers/LexSpecman.cxx, lexers/LexSpice.cxx, lexers/LexTACL.cxx, lexers/LexTADS3.cxx, lexers/LexTAL.cxx, lexers/LexTCL.cxx, lexers/LexTeX.cxx, lexers/LexTxt2tags.cxx, lexers/LexVB.cxx, lexers/LexVHDL.cxx, lexers/LexVerilog.cxx, lexers/LexYAML.cxx, lexlib/Accessor.cxx, lexlib/Accessor.h, lexlib/CharacterSet.cxx, lexlib/CharacterSet.h, lexlib/LexAccessor.h, lexlib/LexerBase.cxx, lexlib/LexerBase.h, lexlib/LexerModule.cxx, lexlib/LexerModule.h, lexlib/LexerNoExceptions.cxx, lexlib/LexerNoExceptions.h, lexlib/LexerSimple.cxx, lexlib/LexerSimple.h, lexlib/OptionSet.h, lexlib/PropSetSimple.cxx, lexlib/PropSetSimple.h, lexlib/StyleContext.cxx, lexlib/StyleContext.h, lexlib/WordList.cxx, lexlib/WordList.h, lib/README.doc, macosx/PlatMacOSX.cxx, macosx/SciTest/SciTest.xcode/project.pbxproj, macosx/ScintillaMacOSX.cxx, macosx/ScintillaMacOSX.h, macosx/deps.mak, macosx/makefile, src/AutoComplete.cxx, src/AutoComplete.h, src/CallTip.cxx, src/CallTip.h, src/Catalogue.cxx, src/Catalogue.h, src/CellBuffer.cxx, src/CellBuffer.h, src/CharClassify.cxx, src/CharClassify.h, src/CharacterSet.h, src/ContractionState.cxx, src/ContractionState.h, src/Decoration.h, src/Document.cxx, src/Document.h, src/DocumentAccessor.cxx, src/DocumentAccessor.h, src/Editor.cxx, src/Editor.h, src/ExternalLexer.cxx, src/ExternalLexer.h, src/FontQuality.h, src/Indicator.cxx, src/Indicator.h, src/KeyMap.cxx, src/KeyMap.h, src/KeyWords.cxx, src/LexAPDL.cxx, src/LexASY.cxx, src/LexAU3.cxx, src/LexAVE.cxx, src/LexAbaqus.cxx, src/LexAda.cxx, src/LexAsm.cxx, src/LexAsn1.cxx, src/LexBaan.cxx, src/LexBash.cxx, src/LexBasic.cxx, src/LexBullant.cxx, src/LexCLW.cxx, src/LexCOBOL.cxx, src/LexCPP.cxx, src/LexCSS.cxx, src/LexCaml.cxx, src/LexCmake.cxx, src/LexConf.cxx, src/LexCrontab.cxx, src/LexCsound.cxx, src/LexD.cxx, src/LexEScript.cxx, src/LexEiffel.cxx, src/LexErlang.cxx, src/LexFlagship.cxx, src/LexForth.cxx, src/LexFortran.cxx, src/LexGAP.cxx, src/LexGen.py, src/LexGui4Cli.cxx, src/LexHTML.cxx, src/LexHaskell.cxx, src/LexInno.cxx, src/LexKix.cxx, src/LexLisp.cxx, src/LexLout.cxx, src/LexLua.cxx, src/LexMMIXAL.cxx, src/LexMPT.cxx, src/LexMSSQL.cxx, src/LexMagik.cxx, src/LexMatlab.cxx, src/LexMetapost.cxx, src/LexMySQL.cxx, src/LexNimrod.cxx, src/LexNsis.cxx, src/LexOpal.cxx, src/LexOthers.cxx, src/LexPB.cxx, src/LexPLM.cxx, src/LexPOV.cxx, src/LexPS.cxx, src/LexPascal.cxx, src/LexPerl.cxx, src/LexPowerPro.cxx, src/LexPowerShell.cxx, src/LexProgress.cxx, src/LexPython.cxx, src/LexR.cxx, src/LexRebol.cxx, src/LexRuby.cxx, src/LexSML.cxx, src/LexSQL.cxx, src/LexScriptol.cxx, src/LexSmalltalk.cxx, src/LexSorcus.cxx, src/LexSpecman.cxx, src/LexSpice.cxx, src/LexTACL.cxx, src/LexTADS3.cxx, src/LexTAL.cxx, src/LexTCL.cxx, src/LexTeX.cxx, src/LexVB.cxx, src/LexVHDL.cxx, src/LexVerilog.cxx, src/LexYAML.cxx, src/LineMarker.cxx, src/LineMarker.h, src/Partitioning.h, src/PerLine.cxx, src/PerLine.h, src/PositionCache.cxx, src/PositionCache.h, src/PropSet.cxx, src/RESearch.cxx, src/RESearch.h, src/RunStyles.cxx, src/SVector.h, src/SciTE.properties, src/ScintillaBase.cxx, src/ScintillaBase.h, src/Selection.cxx, src/Selection.h, src/SplitVector.h, src/Style.cxx, src/Style.h, src/StyleContext.cxx, src/StyleContext.h, src/UniConversion.cxx, src/UniConversion.h, src/ViewStyle.cxx, src/ViewStyle.h, src/WindowAccessor.cxx, src/XPM.cxx, src/XPM.h, test/MessageNumbers.py, test/README, test/XiteMenu.py, test/XiteWin.py, test/examples/x.asp, test/examples/x.asp.styled, test/examples/x.cxx, test/examples/x.cxx.styled, test/examples/x.d, test/examples/x.d.styled, test/examples/x.html, test/examples/x.html.styled, test/examples/x.php, test/examples/x.php.styled, test/examples/x.py, test/examples/x.py.styled, test/examples/x.vb, test/examples/x.vb.styled, test/lexTests.py, test/performanceTests.py, test/simpleTests.py, test/unit/README, test/unit/SciTE.properties, test/unit/makefile, test/unit/testContractionState.cxx, test/unit/testPartitioning.cxx, test/unit/testRunStyles.cxx, test/unit/testSplitVector.cxx, test/unit/unitTest.cxx, test/xite.py, vcbuild/SciLexer.dsp, version.txt, win32/Margin.cur, win32/PlatWin.cxx, win32/PlatformRes.h, win32/SciTE.properties, win32/ScintRes.rc, win32/Scintilla.def, win32/ScintillaWin.cxx, win32/deps.mak, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak, zipsrc.bat: Merged Scintilla v2.24. [59ca27407fd9] 2011-03-03 Phil Thompson * Python/configure.py, qt/qscintilla.pro: Updated the .so version number to 6.0.0. [8ebe3f1fccd4] * Makefile: Switched the build system to Qt v4.7.2. [47f653394ef0] * .hgtags, lib/README.svn: Merged the v2.4 maintenance branch. [d00b7d9115d1] * qsci/api/python/Python-3.2.api: Added an API file for Python v3.2. [8cc94408b710] <2.4-maint> 2011-02-23 Phil Thompson * qt/qsciscintillabase.cpp: On X11 the control modifier is now used (instead of alt) to trigger a rectangular selection. [4bea3b8b8271] <2.4-maint> 2011-02-22 Phil Thompson * qt/qscimacro.cpp: Fixed a bug with Qt4 when loading a macro that meant that a macro may not have a terminating '\0'. [bbec6ef96cd2] <2.4-maint> 2011-02-06 Phil Thompson * lib/LICENSE.commercial.short, lib/LICENSE.gpl.short: Updated the copyright notices. [f386964f3853] <2.4-maint> * Python/sip/qsciscintilla.sip, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Deprecated setAutoCompletionShowSingle(), added setAutoCompletionUseSingle(). Deprecated autoCompletionShowSingle(), added autoCompletionUseSingle(). [7dae1a33b74b] <2.4-maint> * qt/qsciscintilla.cpp, qt/qsciscintilla.h: QsciScintilla::setAutoCompletionCaseSensitivity() is no longer ignored if a lexer has been set. [92d3c5f7b825] <2.4-maint> * qt/qscintilla.pro, qt/qsciscintillabase.cpp: Translate Key_Backtab to Shift-Key_Tab before passing to Scintilla. [fc2d75b26ef8] <2.4-maint> 2011-01-06 Phil Thompson * qt/qscintilla_es.ts: Updated Spanish translations from Jaime Seuma. [8921e85723a1] <2.4-maint> 2010-12-24 Phil Thompson * qt/qsciscintilla.h: Fixed a documentation typo. [1b951cf8838a] <2.4-maint> 2010-12-23 Phil Thompson * .hgtags: Added tag 2.4.6 for changeset 1884d76f35b0 [696037b84e26] <2.4-maint> * NEWS: Released as v2.4.6. [1884d76f35b0] [2.4.6] <2.4-maint> 2010-12-21 Phil Thompson * qt/qsciscintilla.cpp: Auto-completion words from documents are now ignored if they are already included from APIs. [db48fbf19e7c] <2.4-maint> * qt/SciClasses.cpp: Make sure call tips are redrawn afer being clicked on. [497ad4605ae3] <2.4-maint> 2010-11-23 Phil Thompson * NEWS, Python/sip/qsciscintilla.sip, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added support for indicators to the high-level API. See the NEWS file for the details. [8673b7890874] <2.4-maint> 2010-11-15 Phil Thompson * Python/configure.py: Added the --no-timestamp option to configure.py. [61d1b5d28e21] <2.4-maint> * qsci/api/python/Python-2.7.api: Added the API file for Python v2.7. [5b2c77e7150a] <2.4-maint> 2010-11-09 Phil Thompson * Makefile, qt/PlatQt.cpp: Applied a fix for calculating character widths under OS/X. Switched the build system to Qt v4.7.1. [47a4eff86efa] <2.4-maint> 2010-11-08 Phil Thompson * qt/qscilexercpp.h: Fixed a bug in the documentation of QsciLexerCPP.GlobalClass. [3cada289b329] <2.4-maint> 2010-10-24 Phil Thompson * qt/SciClasses.h, qt/ScintillaQt.h, qt/qscicommandset.h, qt/qsciglobal.h, qt/qscilexer.h, qt/qsciprinter.h, qt/qsciscintilla.h, qt/qsciscintillabase.h: Added support for QT_BEGIN_NAMESPACE and QT_END_NAMESPACE. [a80f0df49f6c] <2.4-maint> 2010-10-23 Phil Thompson * qt/qscintilla_de.qm, qt/qscintilla_de.ts: Updated German translations from Detlev. [693d3adf3c3f] <2.4-maint> 2010-10-21 Phil Thompson * Makefile, Python/sip/qscilexerproperties.sip, qt/qscilexerproperties.cpp, qt/qscilexerproperties.h, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Added support for the Key style to QsciLexerProperties. [0b2e86015862] <2.4-maint> 2010-08-31 Phil Thompson * .hgtags: Added tag 2.4.5 for changeset f3f3936e5b86 [84bb1b0d0674] <2.4-maint> * NEWS: Released as v2.4.5. [f3f3936e5b86] [2.4.5] <2.4-maint> 2010-08-21 Phil Thompson * NEWS: Updated the NEWS file. [80afe6b1504a] <2.4-maint> 2010-08-20 Phil Thompson * Python/sip/qsciscintillabase.sip: With Python v3, the QsciScintillaBase.SendScintilla() overloads that take char * arguments now require them to be bytes objects and no longer allow them to be str objects. [afa9ac3c487d] <2.4-maint> 2010-08-14 Phil Thompson * Python/sip/qsciscintillabase.sip: Reverted the addition of the /Encoding/ annotations to SendScintilla() as it is (probably) not the right solution. [4cb625284e4f] <2.4-maint> * qt/qsciscintilla.cpp: The entries in user and auto-completion lists should now support UTF-8. [112d71cec57a] <2.4-maint> * Python/sip/qsciscintillabase.sip: The QsciScintillaBase.SendScintilla() Python overloads will now accept unicode strings that can be encoded to UTF-8. [2f21b97985f2] <2.4-maint> 2010-07-22 Phil Thompson * qt/qscilexerhtml.cpp, qt/qscilexerhtml.h: Implemented QsciLexerHTML::autoCompletionFillups() to change the fillups to "/>". [8d9c1aad1349] <2.4-maint> * qt/qsciscintilla.cpp: Fixed a regression, and the original bug, in QsciScintilla::clearAnnotations(). [fd8746ae2198] <2.4-maint> * qt/qscistyle.cpp: QsciStyle now auto-allocates style numbers from 63 rather than STYLE_MAX because Scintilla only initially creates enough storage for that number of styles. [7c69b0a4ee5b] <2.4-maint> 2010-07-15 Phil Thompson * qt/qscilexerverilog.cpp, qt/qscintilla.pro: Fixed a bug in QsciLexerVerilog that meant that the Keyword style was being completely ignored. [09e28404476a] <2.4-maint> 2010-07-12 Phil Thompson * .hgtags: Added tag 2.4.4 for changeset c61a49005995 [4c98368d9bea] <2.4-maint> * NEWS: Released as v2.4.4. [c61a49005995] [2.4.4] <2.4-maint> 2010-06-08 Phil Thompson * Makefile, qt/qsciscintillabase.cpp: Pop-lists now get removed when the main widget loses focus. [169fa07f52ab] <2.4-maint> 2010-06-05 Phil Thompson * qt/ScintillaQt.cpp: Changed SCN_MODIFIED to deal with text being NULL. [68148fa857ab] <2.4-maint> 2010-06-03 Phil Thompson * qt/ScintillaQt.cpp: The SCN_MODIFIED signal now tries to make sure that the text passed is valid. [90e3461f410f] <2.4-maint> 2010-04-22 Phil Thompson * qt/qsciscintilla.cpp, qt/qsciscintilla.h: QsciScintilla::markerDefine() now allows existing markers to be redefined if an explicit marker number is given. [63f1a7a1d8e2] <2.4-maint> * qt/ScintillaQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Fixed the drag and drop behaviour so that a move automatically turns into a copy when the mouse leaves the widget. [4dab09799716] <2.4-maint> 2010-04-21 Phil Thompson * qt/PlatQt.cpp, qt/ScintillaQt.cpp: Fixed build problems against Qt v3. [71168072ac9b] <2.4-maint> * Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added QsciScintillaBase::fromMimeData(). [b86a15672079] <2.4-maint> * Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Renamed QsciScintillaBase::createMimeData() to toMimeData(). [6f5837334dde] <2.4-maint> 2010-04-20 Phil Thompson * Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added QsciScintillaBase::canInsertFromMimeData(). [bbba2c1799ef] <2.4-maint> * Python/sip/qsciscintillabase.sip, qt/ScintillaQt.cpp, qt/qscintilla.pro, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added QsciScintillaBase::createMimeData(). [b2c3e3a9b43d] <2.4-maint> 2010-03-17 Phil Thompson * .hgtags: Added tag 2.4.3 for changeset 786429e0227d [1931843aec48] <2.4-maint> * NEWS, build.py: Fixed the generation of the change log after tagging a release. Updated the NEWS file. Released as v2.4.3. [786429e0227d] [2.4.3] <2.4-maint> 2010-02-23 Phil Thompson * qt/qsciscintilla.cpp, qt/qsciscintilla.h: Reverted the setting of the alpha component in setMarkerForegroundColor() (at least until SC_MARK_UNDERLINE is supported). [111da2e01c5e] <2.4-maint> * qt/PlatQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Fixed the very broken support for the alpha component with Qt4. [b1d73c7f447b] <2.4-maint> * Python/sip/qsciscintilla.sip, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added QsciScintilla::clearFolds() to clear all current folds (typically prior to disabling folding). [4f4266da1962] <2.4-maint> 2010-02-15 Phil Thompson * Makefile: Switched the build system to Qt v4.6.2. [f023013b79e4] <2.4-maint> 2010-02-07 Phil Thompson * qt/qscidocument.cpp: Fixed a bug in the handling of multiple views of a document. [8b4aa000df1c] <2.4-maint> 2010-01-31 Phil Thompson * Makefile, build.py: Minor tidy ups for the internal build system. [c3a41d195b8a] <2.4-maint> 2010-01-30 Phil Thompson * Makefile, Python/configure.py, build.py, lib/README.doc, lib/README.svn, lib/qscintilla.dxy, qt/qsciglobal.h: Changes to the internal build system required by the migration to Mercurial. [607e474dfd28] <2.4-maint> 2010-01-29 phil * .hgtags: Import from SVN. [49d5a0d80211] 2010-01-20 phil * Makefile, NEWS: Updated the build system to Qt v4.6.1. Released as v2.4.2. [73732e5bae08] [2.4.2] <2.4-maint> 2010-01-18 phil * qt/qscintilla_es.qm, qt/qscintilla_es.ts: Updated Spanish translations from Jaime Seuma. [3b911e69696d] <2.4-maint> 2010-01-15 phil * Python/configure.py: The Python bindings now check for SIP v4.10. [8d5f4957a07c] <2.4-maint> * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_es.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the .ts files. [15c647ac0c42] <2.4-maint> * NEWS, build.py: Fixed the build system for Qt v3 and v4 prior to v4.5. [1b5bea85a3bf] <2.4-maint> 2010-01-14 phil * NEWS, lib/LICENSE.commercial.short, lib/LICENSE.gpl.short: Released as v2.4.1. [a04b69746aa6] [2.4.1] <2.4-maint> 2009-12-22 phil * lib/gen_python3_api.py, qsci/api/python/Python-3.1.api: Added the API file for Python v3.1. [116c24ab58b2] <2.4-maint> * NEWS, Python/configure.py: Added support for automatically generated docstrings. [3d316b4f222b] <2.4-maint> 2009-12-11 phil * Makefile, qt/PlatQt.cpp: Fixed a performance problem when displaying very long lines. [d3fe67ad2eb5] <2.4-maint> 2009-11-01 phil * qt/qsciapis.cpp: Fixed a possible crash in the handling of call tips. [6248caa24fec] <2.4-maint> * qt/SciClasses.cpp: Applied the workaround for the autocomplete focus bug under Gnome's window manager which (appears) to work with current versions of Qt across all platforms. [f709f1518e70] <2.4-maint> * Makefile, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Make sure a lexer is fully detached when a QScintilla instance is destroyed. [db47764231d2] <2.4-maint> 2009-08-19 phil * lib/LICENSE.gpl.short, qt/qscintilla_de.qm, qt/qscintilla_de.ts: Updated German translations from Detlev. [458b60ec031e] <2.4-maint> 2009-08-09 phil * Python/sip/qscilexerverilog.sip, Python/sip/qscimodcommon.sip, qt/qscilexerverilog.cpp, qt/qscilexerverilog.h, qt/qscintilla.pro: Added the QsciLexerVerilog class. [86b2aceac88c] <2.4-maint> * Makefile, Python/sip/qscilexerspice.sip, Python/sip/qscimodcommon.sip, lib/LICENSE.commercial, lib /OPENSOURCE-NOTICE.TXT, lib/README.doc, qt/qscilexerspice.cpp, qt/qscilexerspice.h, qt/qscintilla.pro: Added the QsciLexerSpice class. [56532ec00839] <2.4-maint> 2009-06-05 phil * NEWS, lib/LICENSE.commercial: Released as v2.4. [612b1bcb8223] [2.4] 2009-06-03 phil * NEWS, qt/qscistyledtext.h: Fixed a bug building on Qt v3. [88ebc67fdff4] 2009-05-30 phil * qt/ScintillaQt.cpp: Applied a fix for copying UTF-8 text to the X clipboard from Lars Reichelt. [e59fa72c2e2d] 2009-05-27 phil * qt/qscilexercustom.h: Fixed a missing forward declaration in qscilexercustom.h. [0018449ee6aa] 2009-05-25 phil * qt/qscilexercustom.cpp: Don't ask the custom lexer to style zero characters. [6ae021232f4f] 2009-05-19 phil * NEWS, qt/qscintilla.pro, qt/qscintilla_cs.qm, qt/qscintilla_es.qm, qt/qscintilla_es.ts, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm: Added Spanish translations from Jaime Seuma. [0cdbee8db9af] * qt/qsciscintilla.cpp: A minor fix for ancient C++ compilers. [0523c3a0e0aa] 2009-05-18 phil * NEWS, Python/sip/qscilexer.sip, Python/sip/qscilexercustom.sip, Python/sip/qscimodcommon.sip, Python/sip/qsciscintilla.sip, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexercustom.cpp, qt/qscilexercustom.h, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added QsciScintilla::annotation(). Added QsciLexerCustom (completely untested) and supporting changes to QsciLexer. [382d5b86f600] 2009-05-17 phil * qt/qscintilla_cs.ts, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated translations from Detlev. [0b8c8438e464] 2009-05-09 phil * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added support for text margins. [be9db7d41b50] * qt/PlatQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qscistyledtext.cpp, qt/qscistyledtext.h: Debugged the support for annotations. Tidied up the QString to Scintilla string conversions. [573199665222] 2009-05-08 phil * NEWS, Python/sip/qscimodcommon.sip, Python/sip/qsciscintilla.sip, Python/sip/qscistyle.sip, Python/sip/qscistyledtext.sip, qt/qscicommand.h, qt/qscimacro.h, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qscistyle.cpp, qt/qscistyle.h, qt/qscistyledtext.cpp, qt/qscistyledtext.h: Implemented the rest of the annotation API - still needs debugging. [7f23400d2416] 2009-05-07 phil * NEWS, qt/qscintilla.pro, qt/qscistyle.cpp, qt/qscistyle.h: Added the QsciStyle class. [bf8e3e02071e] 2009-05-06 phil * qt/qsciscintillabase.cpp: Fixed the key event handling when the text() is empty and the key() should be used - only seems to happen with OS/X. [868a146b019f] 2009-05-03 phil * Makefile, NEWS, Python/configure.py, Python/sip/qscicommand.sip, Python/sip/qscicommandset.sip, Python/sip/qscilexer.sip, Python/sip/qscilexercpp.sip, Python/sip/qscilexercss.sip, Python/sip/qscilexerdiff.sip, Python/sip/qscilexerhtml.sip, Python/sip/qscilexerpascal.sip, Python/sip/qscilexerperl.sip, Python/sip/qscilexerpython.sip, Python/sip/qscilexerxml.sip, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, README, UTF-8-demo.txt, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/ScintillaToDo.html, doc/annotations.png, doc/index.html, doc/styledmargin.png, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, gtk/scintilla.mak, include/Face.py, include/HFacer.py, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, include/ScintillaWidget.h, lib/LICENSE.commercial, macosx/PlatMacOSX.cxx, macosx/makefile, qt/PlatQt.cpp, qt/ScintillaQt.cpp, qt/qsciapis.cpp, qt/qscidocument.cpp, qt/qscidocument.h, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexerdiff.cpp, qt/qscilexerdiff.h, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, qt/qscilexerpascal.cpp, qt/qscilexerpascal.h, qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscilexerxml.cpp, qt/qscilexerxml.h, qt/qscintilla.pro, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h, src/CellBuffer.cxx, src/CellBuffer.h, src/Document.cxx, src/Document.h, src/Editor.cxx, src/Editor.h, src/ExternalLexer.cxx, src/Indicator.cxx, src/Indicator.h, src/KeyWords.cxx, src/LexAU3.cxx, src/LexAbaqus.cxx, src/LexAsm.cxx, src/LexBash.cxx, src/LexCOBOL.cxx, src/LexCPP.cxx, src/LexCSS.cxx, src/LexD.cxx, src/LexFortran.cxx, src/LexGen.py, src/LexHTML.cxx, src/LexHaskell.cxx, src/LexInno.cxx, src/LexLua.cxx, src/LexMySQL.cxx, src/LexNimrod.cxx, src/LexNsis.cxx, src/LexOthers.cxx, src/LexPascal.cxx, src/LexPerl.cxx, src/LexPowerPro.cxx, src/LexProgress.cxx, src/LexPython.cxx, src/LexRuby.cxx, src/LexSML.cxx, src/LexSQL.cxx, src/LexSorcus.cxx, src/LexTACL.cxx, src/LexTADS3.cxx, src/LexTAL.cxx, src/LexTeX.cxx, src/LexVerilog.cxx, src/LexYAML.cxx, src/PerLine.cxx, src/PerLine.h, src/PositionCache.cxx, src/RESearch.cxx, src/RESearch.h, src/RunStyles.h, src/SciTE.properties, src/ScintillaBase.cxx, src/SplitVector.h, src/UniConversion.cxx, src/ViewStyle.cxx, src/ViewStyle.h, vcbuild/SciLexer.dsp, version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: Merged the v2.3 branch onto the trunk. [1bb3d2b01123] 2008-09-20 phil * Makefile, NEWS, lib/README.doc: Released as v2.3. [8fd73a9a9d66] [2.3] 2008-09-17 phil * NEWS, Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added QsciScintilla::apiContext() for further open up the auto- completion and call tips support. [a6291ea6dd37] 2008-09-16 phil * Python/configure.py, lib/gen_python_api.py, qsci/api/python/Python-2.6.api, qt/qsciapis.h: Added the API file for Python v2.6rc1. Fixed a typo in the help for the Python bindings configure.py. [ac10be3cc7fb] 2008-09-03 phil * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the i18n .ts files. [b73beac06e0f] 2008-09-01 phil * lib/README.doc: Updated the Windows installation notes to cover the need to manually install the DLL when using Qt3. [17019ebfab36] * lib/README.doc, qt/qsciscintilla.cpp: Fixed a regression in the highlighting of call tip arguments. Updated the Windows installation notes to say that any header files installed from a previous build should first be removed. [cb3f27b93323] 2008-08-31 phil * NEWS, Python/configure.py, Python/sip/qsciabstractapis.sip, Python/sip/qsciapis.sip, Python/sip/qscilexer.sip, Python/sip/qscimodcommon.sip, Python/sip/qsciscintillabase.sip, qt/qsciabstractapis.cpp, qt/qsciabstractapis.h, qt/qsciapis.cpp, qt/qsciapis.h, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added the QsciAbstractAPIs class to allow applications to provide their own implementation of APIs. [eb5a8a602e5d] * Makefile, Python/configure.py, Python/sip/qscilexerfortran.sip, Python/sip/qscilexerfortran77.sip, Python/sip/qscilexerpascal.sip, Python/sip/qscilexerpostscript.sip, Python/sip/qscilexertcl.sip, Python/sip/qscilexerxml.sip, Python/sip/qscilexeryaml.sip, Python/sip/qscimodcommon.sip, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, build.py, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/index.html, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/makefile, gtk/scintilla.mak, include/Platform.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, lib/LICENSE.commercial, lib/README.doc, lib/qscintilla.dxy, macosx/ExtInput.cxx, macosx/ExtInput.h, macosx/PlatMacOSX.cxx, macosx/PlatMacOSX.h, macosx/QuartzTextLayout.h, macosx/QuartzTextStyle.h, macosx/QuartzTextStyleAttribute.h, macosx/ScintillaMacOSX.cxx, macosx/ScintillaMacOSX.h, macosx/TView.cxx, macosx/makefile, qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/qscilexerfortran.cpp, qt/qscilexerfortran.h, qt/qscilexerfortran77.cpp, qt/qscilexerfortran77.h, qt/qscilexerhtml.cpp, qt/qscilexerlua.cpp, qt/qscilexerlua.h, qt/qscilexerpascal.cpp, qt/qscilexerpascal.h, qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpostscript.cpp, qt/qscilexerpostscript.h, qt/qscilexertcl.cpp, qt/qscilexertcl.h, qt/qscilexerxml.cpp, qt/qscilexerxml.h, qt/qscilexeryaml.cpp, qt/qscilexeryaml.h, qt/qscimacro.cpp, qt/qscimacro.h, qt/qscintilla.pro, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.h, src/CellBuffer.cxx, src/Editor.cxx, src/Editor.h, src/KeyWords.cxx, src/LexCPP.cxx, src/LexGen.py, src/LexMagik.cxx, src/LexMatlab.cxx, src/LexPerl.cxx, src/LexPowerShell.cxx, src/LineMarker.cxx, src/RunStyles.cxx, src/RunStyles.h, vcbuild/SciLexer.dsp, version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: Merged the v2.2 maintenance branch. [cd784c60bcc7] 2008-02-27 phil * NEWS, build.py, lib/GPL_EXCEPTION.TXT, lib/LICENSE.GPL2, lib/LICENSE.GPL3, lib/LICENSE.commercial, lib/LICENSE.commercial.short, lib/LICENSE.gpl, lib/LICENSE.gpl.short, lib/OPENSOURCE-NOTICE.TXT: Updated the licenses to be in line with the the current Qt licenses, including GPL v3. Released as v2.2. [a039ca791129] [2.2] 2008-02-23 phil * Makefile, qt/PlatQt.cpp: Switched to Qt v4.3.4. Further tweaks for Windows64 support. [3ae9686f38e6] 2008-02-22 phil * Makefile, NEWS, Python/sip/qsciscintillabase.sip, qt/PlatQt.cpp, qt/ScintillaQt.cpp, qt/qscidocument.cpp, qt/qscimacro.cpp, qt/qscintilla.pro, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Several fixes for Windows64 support based on a patch from Randall Frank. [2c753ee01c42] 2008-02-09 phil * Python/configure.py, lib/README.doc, qt/qscintilla.pro: It's no longer necessary to set DYLD_LIBRARY_PATH when using the Python bindings. [d1098424aed1] 2008-02-03 phil * Python/sip/qscilexerruby.sip: Added the missing QsciLexerRuby.Error to the Python bindings. [0b4f06a30251] 2008-01-20 phil * designer-Qt4/qscintillaplugin.cpp, designer-Qt4/qscintillaplugin.h: Fixed a problem with the Qt4 Designer plugin on Leopard. [5450a1bc62df] 2008-01-11 phil * qt/SciClasses.cpp, qt/qsciscintillabase.cpp: Hopefully fixed shortcuts and accelerators when the autocompletion list is displayed. [8304a1f4e36b] 2008-01-06 phil * qt/SciClasses.cpp: Hopefully fixed a bug stopping normal typing when the autocompletion list is being displayed. [2db0cc8fa158] 2008-01-03 phil * lib/LICENSE.commercial.short, lib/LICENSE.gpl, lib/LICENSE.gpl.short, lib/README.doc, qt/qsciscintillabase.cpp: Fixed a Qt3 compilation bug. Updated the copyright notices. [cf238f41fb54] 2007-12-30 phil * qt/SciClasses.cpp, qt/SciClasses.h, qt/qsciscintillabase.cpp: Hopefully fixed the problems with the auto-completion popup on all platforms (not tested on Mac). [585aa7e4e59f] 2007-12-29 phil * qt/SciClasses.cpp: Remove the use of the internal Tooltip widget flag so that the X11 auto-completion list now has the same problems as the Windows version. (Prior to fixing the problem properly.) [93d584d099db] 2007-12-23 phil * qt/ScintillaQt.cpp: Fixed DND problems with Qt4. [23f8c1a7c4c7] * qt/qsciscintilla.cpp: Fix from Detlev for an infinite loop caused by calling getCursorPosition() when Scintilla reports a position past the end of the text. [dd99ade93fa6] 2007-12-05 phil * qt/qscilexerperl.cpp, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Fixed a silly typo in the updated Perl lexer. [0e290eb71572] * qt/qscintilla_de.qm: Updated German translations from Detlev. [e820d3c167f5] * Makefile: Switched the internal build system to Qt v4.3.3. [df2d877e2422] 2007-12-04 phil * qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the translation source files. [1fb11f16d750] * Python/sip/qscilexerperl.sip, Python/sip/qsciscintillabase.sip, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/index.html, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/makefile, gtk/scintilla.mak, include/Platform.h, include/PropSet.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, lib/README.svn, macosx/PlatMacOSX.cxx, macosx/ScintillaMacOSX.h, macosx/makefile, qt/PlatQt.cpp, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintillabase.h, src/CellBuffer.cxx, src/CellBuffer.h, src/ContractionState.cxx, src/ContractionState.h, src/Document.cxx, src/Document.h, src/DocumentAccessor.cxx, src/Editor.cxx, src/Editor.h, src/KeyWords.cxx, src/LexAPDL.cxx, src/LexASY.cxx, src/LexAU3.cxx, src/LexAbaqus.cxx, src/LexBash.cxx, src/LexCPP.cxx, src/LexGen.py, src/LexHTML.cxx, src/LexHaskell.cxx, src/LexMetapost.cxx, src/LexOthers.cxx, src/LexPerl.cxx, src/LexPython.cxx, src/LexR.cxx, src/LexSQL.cxx, src/LexTeX.cxx, src/LexYAML.cxx, src/Partitioning.h, src/PositionCache.cxx, src/PositionCache.h, src/PropSet.cxx, src/RunStyles.cxx, src/RunStyles.h, src/ScintillaBase.cxx, src/SplitVector.h, src/ViewStyle.cxx, src/ViewStyle.h, vcbuild/SciLexer.dsp, version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: Merged Scintilla v1.75. [8009a4d7275a] 2007-11-17 phil * qt/SciClasses.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Bug fixes for selectAll() and getCursorPosition() from Baz Walter. [80eecca239b4] 2007-10-24 phil * qt/qsciscintilla.cpp: Fixed folding for HTML. [bb6fb6065e30] 2007-10-14 phil * build.py, lib/GPL_EXCEPTION.TXT, lib/GPL_EXCEPTION_ADDENDUM.TXT, lib/LICENSE.gpl, lib/OPENSOURCE-NOTICE.TXT, qt/qscicommandset.cpp: Control characters that are not bound to commands (or shortcuts) now default to doing nothing (rather than inserting the character into the text). Aligned the GPL license with Trolltech's exceptions. [148432c68762] 2007-10-12 phil * src/LexHTML.cxx: Fixed the Scintilla HTML lexer's handling of characters >= 0x80. [c4e271ce8e96] 2007-10-05 phil * qt/qsciscintillabase.cpp: Used NoSystemBackground rather than OpaquePaintEvent to eliminate flicker. [01a22c66304d] 2007-10-04 phil * Makefile, qt/qsciscintillabase.cpp: Fixed a flashing effect visible with a non-standard background. Switched to Qt v4.3.2. [781c58fcba96] 2007-09-23 phil * qt/qsciapis.h, qt/qscicommand.h, qt/qscicommandset.h, qt/qscidocument.h, qt/qsciglobal.h, qt/qscilexer.h, qt/qscilexerbash.h, qt/qscilexerbatch.h, qt/qscilexercmake.h, qt/qscilexercpp.h, qt/qscilexercsharp.h, qt/qscilexercss.h, qt/qscilexerd.h, qt/qscilexerdiff.h, qt/qscilexerhtml.h, qt/qscilexeridl.h, qt/qscilexerjava.h, qt/qscilexerjavascript.h, qt/qscilexerlua.h, qt/qscilexermakefile.h, qt/qscilexerperl.h, qt/qscilexerpov.h, qt/qscilexerproperties.h, qt/qscilexerpython.h, qt/qscilexerruby.h, qt/qscilexersql.h, qt/qscilexertex.h, qt/qscilexervhdl.h, qt/qscimacro.h, qt/qsciprinter.h, qt/qsciscintilla.h, qt/qsciscintillabase.h: Made the recent portabilty changes Mac specific as AIX has a problem with them. [0de605d4079f] 2007-09-16 phil * qt/qscilexer.cpp: A lexer's default colour, paper and font are now written to and read from the settings. [45277fc76ace] 2007-09-15 phil * lib/README.doc, qt/qsciapis.h, qt/qscicommand.h, qt/qscicommandset.h, qt/qscidocument.h, qt/qsciglobal.h, qt/qscilexer.h, qt/qscilexerbash.h, qt/qscilexerbatch.h, qt/qscilexercmake.h, qt/qscilexercpp.h, qt/qscilexercsharp.h, qt/qscilexercss.h, qt/qscilexerd.h, qt/qscilexerdiff.h, qt/qscilexerhtml.h, qt/qscilexeridl.h, qt/qscilexerjava.h, qt/qscilexerjavascript.h, qt/qscilexerlua.h, qt/qscilexermakefile.h, qt/qscilexerperl.h, qt/qscilexerpov.h, qt/qscilexerproperties.h, qt/qscilexerpython.h, qt/qscilexerruby.h, qt/qscilexersql.h, qt/qscilexertex.h, qt/qscilexervhdl.h, qt/qscimacro.h, qt/qsciprinter.h, qt/qsciscintilla.h, qt/qsciscintillabase.h: Fixed the MacOS build problems when using the binary installer version of Qt. [e059a923a447] * lib/LICENSE.commercial.short, qt/PlatQt.cpp: Added the missing WaitMouseMoved() implementation on MacOS. [78d1c8fc37c0] 2007-09-10 phil * qt/qsciscintilla.cpp, qt/qsciscintilla.h: QsciScintilla::setFont() now calls QWidget::setFont() so that font() returns the expected value. [fd4f577c60ea] 2007-09-02 phil * qt/qsciscintilla.cpp: Fixed problems which the font size of STYLE_DEFAULT not being updated when the font of style 0 was changed. Hopefully this fixes the problems with edge columns and indentation guides. [ddeccb6f64a0] 2007-08-12 phil * Makefile, lib/LICENSE.commercial.short, lib/LICENSE.gpl.short, qt/qscintilla.pro: Applied .pro file fix from Dirk Mueller to add a proper install rule. [a3a2e49f1042] 2007-07-22 phil * qt/qscilexer.cpp: Made sure that the backgound colour of areas of the widget with no text is updated when QsciLexer.setDefaultPaper() is called. [065558d2430b] 2007-07-09 phil * qt/qsciscintilla.cpp, qt/qsciscintilla.h: Explicitly set the style for STYLE_DEFAULT when setting a lexer. [a95fc3357771] 2007-06-30 phil * Python/sip/qsciscintillabase.sip, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/index.html, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, gtk/scintilla.mak, include/Accessor.h, include/HFacer.py, include/KeyWords.h, include/Platform.h, include/PropSet.h, include/SString.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, include/WindowAccessor.h, macosx/PlatMacOSX.cxx, macosx/PlatMacOSX.h, macosx/QuartzTextLayout.h, macosx/QuartzTextStyle.h, macosx/QuartzTextStyleAttribute.h, macosx/SciTest/English.lproj/InfoPlist.strings, macosx/SciTest/English.lproj/main.nib/classes.nib, macosx/SciTest/English.lproj/main.nib/info.nib, macosx/SciTest/English.lproj/main.nib/objects.xib, macosx/SciTest/Info.plist, macosx/SciTest/SciTest.xcode/project.pbxproj, macosx/SciTest/SciTest_Prefix.pch, macosx/SciTest/main.cpp, macosx/SciTest/version.plist, macosx/ScintillaCallTip.cxx, macosx/ScintillaCallTip.h, macosx/ScintillaListBox.cxx, macosx/ScintillaListBox.h, macosx/ScintillaMacOSX.cxx, macosx/ScintillaMacOSX.h, macosx/TCarbonEvent.cxx, macosx/TCarbonEvent.h, macosx/TRect.h, macosx/TView.cxx, macosx/TView.h, macosx/deps.mak, macosx/makefile, qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qscintilla.pro, qt/qsciscintillabase.h, src/AutoComplete.cxx, src/AutoComplete.h, src/CallTip.cxx, src/CallTip.h, src/CellBuffer.cxx, src/CellBuffer.h, src/CharacterSet.h, src/ContractionState.cxx, src/ContractionState.h, src/Decoration.cxx, src/Decoration.h, src/Document.cxx, src/Document.h, src/DocumentAccessor.cxx, src/DocumentAccessor.h, src/Editor.cxx, src/Editor.h, src/ExternalLexer.cxx, src/ExternalLexer.h, src/Indicator.cxx, src/Indicator.h, src/KeyMap.cxx, src/KeyMap.h, src/KeyWords.cxx, src/LexAPDL.cxx, src/LexAU3.cxx, src/LexAVE.cxx, src/LexAda.cxx, src/LexAsm.cxx, src/LexAsn1.cxx, src/LexBaan.cxx, src/LexBash.cxx, src/LexBasic.cxx, src/LexBullant.cxx, src/LexCLW.cxx, src/LexCPP.cxx, src/LexCSS.cxx, src/LexCaml.cxx, src/LexCmake.cxx, src/LexConf.cxx, src/LexCrontab.cxx, src/LexCsound.cxx, src/LexD.cxx, src/LexEScript.cxx, src/LexEiffel.cxx, src/LexErlang.cxx, src/LexFlagship.cxx, src/LexForth.cxx, src/LexFortran.cxx, src/LexGAP.cxx, src/LexGen.py, src/LexGui4Cli.cxx, src/LexHTML.cxx, src/LexHaskell.cxx, src/LexInno.cxx, src/LexKix.cxx, src/LexLisp.cxx, src/LexLout.cxx, src/LexLua.cxx, src/LexMMIXAL.cxx, src/LexMPT.cxx, src/LexMSSQL.cxx, src/LexMatlab.cxx, src/LexMetapost.cxx, src/LexNsis.cxx, src/LexOpal.cxx, src/LexOthers.cxx, src/LexPB.cxx, src/LexPLM.cxx, src/LexPOV.cxx, src/LexPS.cxx, src/LexPascal.cxx, src/LexPerl.cxx, src/LexProgress.cxx, src/LexPython.cxx, src/LexRebol.cxx, src/LexRuby.cxx, src/LexSQL.cxx, src/LexScriptol.cxx, src/LexSmalltalk.cxx, src/LexSpecman.cxx, src/LexSpice.cxx, src/LexTADS3.cxx, src/LexTCL.cxx, src/LexTeX.cxx, src/LexVB.cxx, src/LexVHDL.cxx, src/LexVerilog.cxx, src/LexYAML.cxx, src/LineMarker.cxx, src/LineMarker.h, src/Partitioning.h, src/PositionCache.cxx, src/PositionCache.h, src/PropSet.cxx, src/RESearch.cxx, src/RESearch.h, src/RunStyles.cxx, src/RunStyles.h, src/SVector.h, src/ScintillaBase.cxx, src/ScintillaBase.h, src/SplitVector.h, src/Style.cxx, src/Style.h, src/StyleContext.cxx, src/StyleContext.h, src/UniConversion.cxx, src/UniConversion.h, src/ViewStyle.cxx, src/ViewStyle.h, src/WindowAccessor.cxx, src/XPM.cxx, src/XPM.h, vcbuild/SciLexer.dsp, version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/deps.mak, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak, zipsrc.bat: Merged Scintilla v1.74. [04dee9c2424f] * Python/sip/qscilexerpython.sip, build.py, qt/qscilexer.cpp, qt/qscilexerbash.cpp, qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscintilla.pro: Fixed comment folding in the Bash lexer. A style is properly restored when read from QSettings. Removed ./Qsci from the qmake INCLUDEPATH. Removed the Scintilla version number from generated filenames. Used fully qualified enum names in the Python lexer so that the QMetaObject is correct. [6b27a5b211e0] 2007-06-01 phil * NEWS: Released as v2.1. [9976edafc5c1] [2.1] 2007-05-30 phil * Makefile: Switched the internal build system to Qt v4.3.0. [49284aa376ef] * NEWS, Python/configure.py, Python/sip/qscilexer.sip, Python/sip/qscilexerbash.sip, Python/sip/qscilexerbatch.sip, Python/sip/qscilexercmake.sip, Python/sip/qscilexercpp.sip, Python/sip/qscilexercsharp.sip, Python/sip/qscilexercss.sip, Python/sip/qscilexerd.sip, Python/sip/qscilexerdiff.sip, Python/sip/qscilexerhtml.sip, Python/sip/qscilexeridl.sip, Python/sip/qscilexerjavascript.sip, Python/sip/qscilexerlua.sip, Python/sip/qscilexermakefile.sip, Python/sip/qscilexerperl.sip, Python/sip/qscilexerpov.sip, Python/sip/qscilexerproperties.sip, Python/sip/qscilexerpython.sip, Python/sip/qscilexerruby.sip, Python/sip/qscilexersql.sip, Python/sip/qscilexertex.sip, Python/sip/qscilexervhdl.sip, Python/sip/qscimodcommon.sip, build.py, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexerbash.cpp, qt/qscilexerbash.h, qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, qt/qscilexercmake.cpp, qt/qscilexercmake.h, qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexercsharp.cpp, qt/qscilexercsharp.h, qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexerd.cpp, qt/qscilexerd.h, qt/qscilexerdiff.cpp, qt/qscilexerdiff.h, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, qt/qscilexeridl.cpp, qt/qscilexeridl.h, qt/qscilexerjavascript.cpp, qt/qscilexerjavascript.h, qt/qscilexerlua.cpp, qt/qscilexerlua.h, qt/qscilexermakefile.cpp, qt/qscilexermakefile.h, qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpov.cpp, qt/qscilexerpov.h, qt/qscilexerproperties.cpp, qt/qscilexerproperties.h, qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexertex.cpp, qt/qscilexertex.h, qt/qscilexervhdl.cpp, qt/qscilexervhdl.h, qt/qscintilla.pro: Lexers now remember their style settings. A lexer no longer has to be the current lexer when changing a style's color, end-of-line fill, font or paper. The color(), eolFill(), font() and paper() methods of QsciLexer now return the current values for a style rather than the default values. The setDefaultColor(), setDefaultFont() and setDefaultPaper() methods of QsciLexer are no longer slots and no longer virtual. The defaultColor(), defaultFont() and defaultPaper() methods of QsciLexer are no longer virtual. The color(), eolFill(), font() and paper() methods of all QsciLexer derived classes (except for QsciLexer itself) have been renamed defaultColor(), defaultEolFill(), defaultFont() and defaultPaper() respectively. [38aeee2a5a36] 2007-05-28 phil * qt/qsciscintilla.cpp: Set the number of style bits after we've set the lexer. [84cda9af5b00] * Python/configure.py: Fixed the handling of the %Timeline in the Python bindings. [4b3146d1a236] 2007-05-27 phil * Python/sip/qsciscintillabase.sip: Updated the sub-class convertor code in the Python bindings for the Cmake and VHDL lexers. [6ab6570728a2] 2007-05-26 phil * NEWS: Updated the NEWS file. Released as v2.0. [eec9914d8211] [2.0] 2007-05-19 phil * Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added basic input method support for Qt4 so that accented characters now work. (Although there is still a font problem - at least a text colour problem.) [6b41f3694999] * qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintillabase.cpp: Fixed building against Qt v3. [9e9ba05de0fb] 2007-05-17 phil * qt/qsciscintilla.cpp: Fixed an autocompletion problem where an empty list was being displayed. [c7214274017c] 2007-05-16 phil * qt/qsciscintilla.cpp: Fixed a bug where autocompleting from the document was looking for preceeding non-word characters as well. [3ee6fd746d49] * qt/qsciscintilla.cpp: Fixed silly typo that broke call tips. [05213a8933c2] 2007-05-09 phil * qt/qsciscintilla.cpp: Fiex an autocompletion bug for words that only had preceding whitespace. [a8f3339e02c6] * Python/configure.py, lib/gen_python_api.py, qsci/api/python/Python-2.4.api, qsci/api/python/Python-2.5.api, qt/qsciapis.cpp, qt/qsciapis.h: Call tips shouldn't now get confused with commas in the text after the argument list. The included API files for Python should now be complete and properly exclude anything beginning with an underscore. The Python bindings configure.py can now install the API file in a user supplied directory. [c7e93dc918de] * qt/qscintilla_cs.qm, qt/qscintilla_fr.qm, qt/qscintilla_pt_br.qm, qt/qscintilla_ru.qm: Ran lrelease on the project. [c3ce60078221] * Makefile, qt/qscintilla_cs.ts, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Updated the internal build system to Qt v4.3.0rc1. Ran lupdate on the project. [6a86e71a4e26] 2007-05-08 phil * Python/sip/qsciscintilla.sip, qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Call tips will now show all the tips for a function (in all scopes) if the current context/scope isn't known. [cbebccc205c7] * Python/sip/qsciscintilla.sip, qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added callTipsStyle() and setCallTipsStyle() to QsciScintilla. [59d453b5da8c] 2007-05-07 phil * qt/qsciscintilla.cpp, qt/qsciscintilla.h: Autocompletion from documents should now work the same as QScintilla v1. The only difference is that the list does not contain the preceding context so it is consistent with autocompletion from APIs. [46de719d325e] * qt/qscintilla.pro, qt/qscintilla_cs.qm, qt/qscintilla_cs.ts: Added the Czech translations from Zdenek Bohm. [139fd9aee405] 2007-04-30 phil * Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added QsciScintilla::wordCharacters(). [d6e56986a031] 2007-04-29 phil * Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Added lots of consts to QsciScintilla getter methods. [4aaffa8611ba] * Python/configure.py, Python/sip/qsciscintilla.sip, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added caseSensitive() and isWordCharacter() to QsciScintilla. Updated translations from Detlev. [64223bf97266] 2007-04-10 phil * Python/sip/qscilexercmake.sip, Python/sip/qscilexervhdl.sip, Python/sip/qscimodcommon.sip, qt/qscilexercmake.cpp, qt/qscilexercmake.h, qt/qscilexervhdl.cpp, qt/qscilexervhdl.h, qt/qscintilla.pro: Added the QsciLexerVHDL class. [10029339786f] * Python/sip/qscilexercmake.sip, Python/sip/qscimodcommon.sip, qt/qscilexercmake.cpp, qt/qscilexercmake.h, qt/qscintilla.pro: Added the QsciLexerCmake class. [c1c911246f75] 2007-04-09 phil * qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Finished call tip support. [b8c717297392] 2007-04-07 phil * qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Some refactoring in preparation for getting call tips working. [6cb925653a80] 2007-04-06 phil * qt/qsciscintilla.cpp: Fixed autoindenting. [8d7b93ee4d9e] 2007-04-05 phil * qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp: Fixed autocompletion so that it works with lexers that don't define word separators, and lexers that are case insensitive. [66634cf13685] 2007-04-04 phil * qt/ScintillaQt.cpp, qt/qsciscintilla.cpp: Fixed the horizontal scrollbar when word wrapping. [021ea1fe8468] 2007-04-03 phil * Python/configure.py, Python/sip/qsciscintillabase.sip, delcvs.bat, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/index.html, gtk/makefile, gtk/scintilla.mak, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, qt/ScintillaQt.cpp, qt/qscintilla.pro, qt/qsciscintillabase.h, src/Document.cxx, src/Document.h, src/DocumentAccessor.cxx, src/Editor.cxx, src/Editor.h, src/ExternalLexer.h, src/KeyWords.cxx, src/LexAU3.cxx, src/LexBash.cxx, src/LexCmake.cxx, src/LexHTML.cxx, src/LexLua.cxx, src/LexMSSQL.cxx, src/LexOthers.cxx, src/LexTADS3.cxx, src/PropSet.cxx, src/RESearch.cxx, src/RESearch.h, src/SplitVector.h, vcbuild/SciLexer.dsp, version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: Merged Scintilla v1.73. [2936af6fc62d] 2007-03-18 phil * Makefile, Python/sip/qscilexerd.sip, Python/sip/qscimodcommon.sip, Python/sip/qsciscintillabase.sip, qt/qscilexerd.cpp, qt/qscilexerd.h, qt/qscintilla.pro, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_pt_br.ts, qt/qscintilla_ru.ts: Switched the internal build system to Qt v4.2.3. Added the D lexer support from Detlev. [667e9b81ab4f] 2007-03-04 phil * Makefile, example-Qt4/mainwindow.cpp, qt/PlatQt.cpp, qt/qsciscintilla.cpp: Fixed a bug in default font handling. Removed use of QIODevice::Text in the example as it is unnecessary and a performance hog. Moved the internal Qt3 build system to Qt v3.3.8. Auto-indentation should now work (as badly) as it did with QScintilla v1. [4d3ad4d1f295] 2007-01-17 phil * Python/sip/qsciapis.sip, qt/qsciapis.cpp, qt/qsciapis.h: Added defaultPreparedName() to QsciAPIs. [2a3c872122dd] * designer-Qt4/qscintillaplugin.cpp: Fixed the Qt4 Designer plugin include file value. [ea7cb8634ad2] 2007-01-16 phil * Python/sip/qsciapis.sip, qt/qsciapis.cpp, qt/qsciapis.h: Added cancelPreparation() and apiPreparationCancelled() to QsciAPIs. [2d7dd00e3bc0] * Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, build.py, lib/LICENSE.commercial.short, lib/LICENSE.gpl.short, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Updated the copyright notices. Added selectionToEol() and setSelectionToEol() to QsciScintilla. Added the other 1.72 changes to the low level API. [ddcf2d43cf31] * doc/SciBreak.jpg, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/index.html, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/makefile, gtk/scintilla.mak, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, qt/ScintillaQt.h, src/CellBuffer.cxx, src/CellBuffer.h, src/ContractionState.cxx, src/Document.cxx, src/Document.h, src/DocumentAccessor.cxx, src/Editor.cxx, src/Editor.h, src/KeyWords.cxx, src/LexCPP.cxx, src/LexD.cxx, src/LexGen.py, src/LexHTML.cxx, src/LexInno.cxx, src/LexLua.cxx, src/LexMatlab.cxx, src/LexNsis.cxx, src/LexOthers.cxx, src/LexRuby.cxx, src/LexTADS3.cxx, src/Partitioning.h, src/ScintillaBase.cxx, src/SplitVector.h, src/StyleContext.h, src/ViewStyle.cxx, src/ViewStyle.h, vcbuild/SciLexer.dsp, version.txt, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: Merged Scintilla v1.72, but any new features are not yet exploited. [dcdfde9050a2] 2007-01-09 phil * Python/configure.py: Fixed bug in configure.py when the -p flag wasn't specified. [50dc69f2b20d] 2007-01-04 phil * Python/configure.py, Python/sip/qscilexer.sip, qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp: Backported to Qt v3. Note that this will probably break again in the future when call tips are redone. [3bcc4826fc73] 2007-01-02 phil * Python/configure.py, lib/gen_python_api.py, qsci/api/python/Python-2.4.api, qsci/api/python/Python-2.5.api, qt/qsciapis.cpp: Added the Python v2.4 and v2.5 API files. Added the generation of the QScintilla2.api file. [49beb92ca721] 2007-01-01 phil * Python/sip/qsciscintilla.sip, qt/qscilexer.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added autoCompletionFillupsEnabled() and setAutoCompletionFillupsEnabled() to QsciScintilla. Updated the Python bindings. [7aa946010e9d] * Python/sip/qsciapis.sip, qt/qsciapis.cpp, qt/qsciapis.h: Implemented loadPrepared() and savePrepared() in QsciAPIs. Added isPrepared() to QsciAPIs. Updated the Python bindings. [4c5e3d80fec7] * Python/sip/qsciapis.sip, qt/qsciapis.cpp, qt/qsciapis.h: Added installAPIFiles() and stubs for loadPrepared() and savePrepared() to QsciAPIs. [93f4dd7222a1] * Python/sip/qsciapis.sip: Added the missing qsciapis.sip file. [064b524acc93] * Python/sip/qscilexer.sip, Python/sip/qscimodcommon.sip, lib/qscintilla.dxy, qt/qsciapis.cpp, qt/qsciapis.h, qt/qscilexer.cpp, qt/qscilexer.h: Fixed the generation of the API documentation. Added apis() and setAPIs() to QsciLexer. Removed apiAdd(), apiClear(), apiLoad(), apiRemove(), apiProcessingStarted() and apiProcessingFinished() from QsciLexer. Added apiPreparationStarted() and apiPreparationFinished() to QsciAPIs. Made QsciAPIs part of the API again. Updated the Python bindings. [851d133b12ff] 2006-12-20 phil * Makefile, qt/qsciapis.cpp, qt/qsciapis.h: Updated the internal build system to Qt v4.2.2. More work on auto- completion. [d4542220e7a2] 2006-11-26 phil * qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: More work on the auto-completion code. [37b2d0d2b154] 2006-11-22 phil * qt/qsciapis.cpp, qt/qsciapis.h, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Changed the handling of case sensitivity in auto-completion lists. Lexers now say if they are case sensitive. [b1932fba61ec] 2006-11-17 phil * Makefile, Python/configure.py, Python/sip/qscicommand.sip, Python/sip/qscicommandset.sip, Python/sip/qscidocument.sip, Python/sip/qscilexer.sip, Python/sip/qscilexerbash.sip, Python/sip/qscilexerbatch.sip, Python/sip/qscilexercpp.sip, Python/sip/qscilexercsharp.sip, Python/sip/qscilexercss.sip, Python/sip/qscilexerdiff.sip, Python/sip/qscilexerhtml.sip, Python/sip/qscilexeridl.sip, Python/sip/qscilexerjava.sip, Python/sip/qscilexerjavascript.sip, Python/sip/qscilexerlua.sip, Python/sip/qscilexermakefile.sip, Python/sip/qscilexerperl.sip, Python/sip/qscilexerpov.sip, Python/sip/qscilexerproperties.sip, Python/sip/qscilexerpython.sip, Python/sip/qscilexerruby.sip, Python/sip/qscilexersql.sip, Python/sip/qscilexertex.sip, Python/sip/qscimacro.sip, Python/sip/qsciprinter.sip, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase.sip, TODO, build.py, designer-Qt3/qscintillaplugin.cpp, designer- Qt4/qscintillaplugin.cpp, example-Qt3/application.cpp, example- Qt4/mainwindow.cpp, qt/PlatQt.cpp, qt/ScintillaQt.cpp, qt/qsciapis.cpp, qt/qsciapis.h, qt/qscicommand.cpp, qt/qscicommand.h, qt/qscicommandset.cpp, qt/qscicommandset.h, qt/qscidocument.cpp, qt/qscidocument.h, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexerbash.cpp, qt/qscilexerbash.h, qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexercsharp.cpp, qt/qscilexercsharp.h, qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexerdiff.cpp, qt/qscilexerdiff.h, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, qt/qscilexeridl.cpp, qt/qscilexeridl.h, qt/qscilexerjava.cpp, qt/qscilexerjava.h, qt/qscilexerjavascript.cpp, qt/qscilexerjavascript.h, qt/qscilexerlua.cpp, qt/qscilexerlua.h, qt/qscilexermakefile.cpp, qt/qscilexermakefile.h, qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpov.cpp, qt/qscilexerpov.h, qt/qscilexerproperties.cpp, qt/qscilexerproperties.h, qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexertex.cpp, qt/qscilexertex.h, qt/qscimacro.cpp, qt/qscimacro.h, qt/qscintilla.pro, qt/qsciprinter.cpp, qt/qsciprinter.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Fixed the name of the generated source packages. Reorganised so that the header files are in a separate sub-directory. Updated the designer plugins and examples for the changing in header file structure. More work on autocompletion. Basic functionality is there, but no support for the "current context" yet. [312e74140bb8] 2006-11-04 phil * designer-Qt4/qscintillaplugin.cpp: Designer plugin fixes for Qt4 from DavidB. [920f7af8bec6] 2006-11-03 phil * qt/qscilexer.cpp: Fixed QsciLexer::setPaper() so that it also sets the background colour of the default style. [fcab00732d97] 2006-10-21 phil * Makefile, qt/qsciapis.cpp, qt/qsciapis.h, qt/qsciscintilla.cpp: Switched the internal build system to Qt v3.3.7 and v4.2.1. Portability fixes for Qt3. [512b57958ea4] 2006-10-20 phil * Makefile, build.py, include/Platform.h, lib/README.doc, qt/PlatQt.cpp, qt/qscimacro.cpp, qt/qscintilla.pro, qt/qsciscintilla.cpp: Renamed the base package QScintilla2. Platform portability fixes from Ulli. The qsci data directory is now installed (where API files will be kept). [2a61d65842fb] 2006-10-13 phil * Python/sip/qsciscintilla.sip, qt/qscintilla.pro, qt/qscintilla_pt_br.qm, qt/qscintilla_pt_br.ts, qt/qscintilla_ptbr.qm, qt/qscintilla_ptbr.ts, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added QsciScintilla::linesChanged() from Detlev. Removed QsciScintilla::markerChanged(). Renamed the Brazilian Portugese translation files. [5b23de72e063] * Makefile, Python/sip/qscilexer.sip, qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/ScintillaQt.cpp, qt/qsciapis.cpp, qt/qsciapis.h, qt/qscilexer.cpp, qt/qscilexer.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added apiRemove(), apiProcessingStarted() and apiProcessingFinished() to QsciLexer. [ef2cb95b868a] 2006-10-08 phil * qt/qsciscintilla.cpp, qt/qsciscintilla.h: Reset the text and paper colours and font when removing a lexer. [08ac85b34d80] * qt/qsciscintilla.cpp: Fixed Qt3 specific problem with most recent changes. [e4ba06e01a1e] 2006-10-06 phil * Python/sip/qsciapis.sip, Python/sip/qscilexer.sip, Python/sip/qscimodcommon.sip, Python/sip/qsciscintilla.sip, qt/ListBoxQt.cpp, qt/SciClasses.cpp, qt/qsciapis.cpp, qt/qsciapis.h, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscilexerbash.cpp, qt/qscilexerbash.h, qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexercsharp.h, qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexerdiff.cpp, qt/qscilexerdiff.h, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, qt/qscilexeridl.h, qt/qscilexerjavascript.h, qt/qscilexerlua.cpp, qt/qscilexerlua.h, qt/qscilexermakefile.cpp, qt/qscilexermakefile.h, qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpov.cpp, qt/qscilexerpov.h, qt/qscilexerproperties.cpp, qt/qscilexerproperties.h, qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexertex.cpp, qt/qscilexertex.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Made QsciAPIs an internal class and instead added apiAdd(), apiClear() and apiLoad() to QsciLexer. Replaced setAutoCompletionStartCharacters() with setAutoCompletionWordSeparators() in QsciScintilla. Removed autoCompletionFillupsEnabled(), setAutoCompletionFillupsEnabled(), setAutoCompletionAPIs() and setCallTipsAPIs() from QsciScintilla. Added AcsNone to QsciScintilla::AutoCompletionSource. Horizontal scrollbars are displayed as needed in autocompletion lists. Added QsciScintilla::lexer(). Fixed setFont(), setColor(), setEolFill() and setPaper() in QsciLexer so that they handle all styles as documented. Removed all occurences of QString::null. Fixed the problem with indentation guides not changing when the size of a space changed. Added the QsciScintilla::markerChanged() signal. Updated the Python bindings. [9ae22e152365] 2006-10-01 phil * qt/PlatQt.cpp: Fixed a silly line drawing bug. [0f9f5c22421a] 2006-09-30 phil * qt/qscintilla.pro: Fixes for building on Windows and MacOS/X. [c16bc6aeba20] 2006-09-29 phil * example-Qt4/application.pro, qt/PlatQt.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp: Fixed the documentation bug in QsciScintilla::insert(). Fixed the mouse shape changing properly. Fixed the drawing of fold markers. [08af64d93094] 2006-09-23 phil * lib/README: Improved the README for the pedants amongst us. [683bdb9a84fc] * designer-Qt4/designer.pro, designer-Qt4/qscintillaplugin.cpp, designer-Qt4/qscintillaplugin.h: The Qt4 Designer plugin now loads - thanks to DavidB. [feb5a3618df6] 2006-09-16 phil * build.py, designer-Qt3/designer.pro, designer- Qt3/qscintillaplugin.cpp, designer-Qt4/designer.pro, designer- Qt4/qscintillaplugin.cpp, designer/designer.pro, designer/qscintillaplugin.cpp, lib/README.doc, qt/qsciscintilla.h: Fixed the Qt3 designer plugin. Added the Qt4 designer plugin based on Andrius Ozelis's work. (But it doesn't load for me - does anybody else have a problem?) [3a0873ed5ff0] 2006-09-09 phil * Python/sip/qsciscintilla.sip, qt/qsciscintilla.cpp, qt/qsciscintilla.h: QsciScintilla's setFont(), setColor() and setPaper() now work as expected when there is no lexer (and have no effect if there is a lexer). [65cc713d9ecb] 2006-08-28 phil * qt/ListBoxQt.cpp, qt/PlatQt.cpp: Fixed a crash when double-clicking on an auto-completion list entry. [d8eecfc59ca2] 2006-08-27 phil * Python/sip/qsciscintillabase.sip, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/index.html, gtk/Converter.h, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, qt/ScintillaQt.cpp, qt/qsciscintillabase.h, src/Editor.cxx, src/LexCPP.cxx, src/LexPerl.cxx, src/LexVB.cxx, src/StyleContext.h, version.txt, win32/ScintRes.rc, win32/ScintillaWin.cxx: Merged Scintilla v1.71. The SCN_DOUBLECLICK() signal now passes the line and position of the click. [81c852fed943] 2006-08-17 phil * Python/sip/qsciscintilla.sip, qt/ScintillaQt.cpp: Fixed pasting when Unicode mode is set. [9d4a7ccef6f4] * build.py: Fixed the internal build system leaving SVN remnants around. [96c36a0e94ac] 2006-07-30 phil * NEWS, Python/sip/qsciscintilla.sip, qt/qscicommand.h, qt/qscicommandset.h, qt/qsciscintilla.cpp, qt/qsciscintilla.h: Added autoCompletionFillupsEnabled() and setAutoCompletionFillupsEnabled() to QsciScintilla. Don't auto- complete numbers. Removed QsciCommandList. [e9886e5da7c3] 2006-07-29 phil * lib/README.doc, qt/PlatQt.cpp: Debugged the Qt3 backport - all seems to work. [1e743e050599] * Python/configure.py, Python/sip/qscimod3.sip, Python/sip/qsciscintillabase.sip, Python/sip/qsciscintillabase4.sip, build.py, lib/README, lib/README.doc, lib/qscintilla.dxy, qt/qsciscintillabase.h: The PyQt3 bindings now work. Updated the documentation and build system for both Qt3 and Qt4. [f4fa8a9a35c0] 2006-07-28 phil * Python/sip/qscimodcommon.sip, Python/sip/qsciscintillabase4.sip, Python/sip/qscitypes.sip, example-Qt3/application.cpp, example- Qt3/application.h, example-Qt3/application.pro, qt/qscicommand.cpp, qt/qscicommandset.cpp, qt/qscidocument.cpp, qt/qscimacro.cpp, qt/qscintilla.pro, qt/qsciprinter.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h, qt/qscitypes.h: Backed out the QscoTypes namespace now that the Qt3/4 source code has been consolidated. [372c37fa8b9c] * qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_ptbr.ts, qt/qscintilla_ru.ts, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h, qt/qsciscintillabase3.cpp, qt/qsciscintillabase3.h, qt/qsciscintillabase4.cpp, qt/qsciscintillabase4.h: Integated the Qt3 and Qt4 source files. [4ee1fcf04cd9] * Makefile, build.py, lib/README.doc, lib/qscintilla.dxy, qt/qscintilla.pro, qt/qsciscintillabase.h, qt/qsciscintillabase3.cpp, qt/qsciscintillabase3.h, qt/qsciscintillabase4.cpp, qt/qsciscintillabase4.h: The Qt3 port now compiles, but otherwise untested. [da227e07e729] * Python/sip/qscimacro.sip, lib/README.doc, lib/qscintilla.dxy, qt/PlatQt.cpp, qt/qscilexermakefile.cpp, qt/qscimacro.cpp, qt/qscimacro.h, qt/qscintilla.pro, qt/qsciscintillabase.h, qt/qsciscintillabase3.cpp, qt/qsciscintillabase3.h, qt/qsciscintillabase4.cpp, qt/qsciscintillabase4.h: Changes to QsciMacro so that it has a more consistent API across Qt3 and Qt4. Backported to Qt3 - doesn't yet build because Qt3 qmake doesn't understand the preprocessor. [910b415ec4a8] 2006-07-27 phil * build.py, designer/qscintillaplugin.cpp, example-Qt3/README, example-Qt4/README, lib/README, lib/README.doc, lib/qscintilla.dxy, qt/qscintilla.pro: Updated the documentation. [7774f3e87003] 2006-07-26 phil * Makefile, Python/configure.py, Python/qsciapis.sip, Python/qscicommand.sip, Python/qscicommandset.sip, Python/qscidocument.sip, Python/qscilexer.sip, Python/qscilexerbash.sip, Python/qscilexerbatch.sip, Python/qscilexercpp.sip, Python/qscilexercsharp.sip, Python/qscilexercss.sip, Python/qscilexerdiff.sip, Python/qscilexerhtml.sip, Python/qscilexeridl.sip, Python/qscilexerjava.sip, Python/qscilexerjavascript.sip, Python/qscilexerlua.sip, Python/qscilexermakefile.sip, Python/qscilexerperl.sip, Python/qscilexerpov.sip, Python/qscilexerproperties.sip, Python/qscilexerpython.sip, Python/qscilexerruby.sip, Python/qscilexersql.sip, Python/qscilexertex.sip, Python/qscimacro.sip, Python/qscimod4.sip, Python/qscimodcommon.sip, Python/qsciprinter.sip, Python/qsciscintilla.sip, Python/qsciscintillabase4.sip, Python/qscitypes.sip, Python/sip/qsciapis.sip, Python/sip/qscicommand.sip, Python/sip/qscicommandset.sip, Python/sip/qscidocument.sip, Python/sip/qscilexer.sip, Python/sip/qscilexerbash.sip, Python/sip/qscilexerbatch.sip, Python/sip/qscilexercpp.sip, Python/sip/qscilexercsharp.sip, Python/sip/qscilexercss.sip, Python/sip/qscilexerdiff.sip, Python/sip/qscilexerhtml.sip, Python/sip/qscilexeridl.sip, Python/sip/qscilexerjava.sip, Python/sip/qscilexerjavascript.sip, Python/sip/qscilexerlua.sip, Python/sip/qscilexermakefile.sip, Python/sip/qscilexerperl.sip, Python/sip/qscilexerpov.sip, Python/sip/qscilexerproperties.sip, Python/sip/qscilexerpython.sip, Python/sip/qscilexerruby.sip, Python/sip/qscilexersql.sip, Python/sip/qscilexertex.sip, Python/sip/qscimacro.sip, Python/sip/qscimod4.sip, Python/sip/qscimodcommon.sip, Python/sip/qsciprinter.sip, Python/sip/qsciscintilla.sip, Python/sip/qsciscintillabase4.sip, Python/sip/qscitypes.sip, build.py, lib/LICENSE.edu, lib/LICENSE.edu.short, lib/README.MacOS: Changed the build system to add the Python bindings. [8a56c38c418b] * Python/configure.py, Python/qscicommandset.sip, Python/qscilexerruby.sip, Python/qscilexertex.sip, Python/qscimod4.sip, Python/qsciscintilla.sip, Python/qsciscintillabase4.sip, Python/qscitypes.sip: Debugged the Python bindings - not yet part of the snapshots. [8e348d9c7d38] 2006-07-25 phil * Python/qsciapis.sip, Python/qscicommand.sip, Python/qscicommandset.sip, Python/qscidocument.sip, Python/qscilexer.sip, Python/qscilexerbash.sip, Python/qscilexerbatch.sip, Python/qscilexercpp.sip, Python/qscilexercsharp.sip, Python/qscilexercss.sip, Python/qscilexerdiff.sip, Python/qscilexerhtml.sip, Python/qscilexeridl.sip, Python/qscilexerjava.sip, Python/qscilexerjavascript.sip, Python/qscilexerlua.sip, Python/qscilexermakefile.sip, Python/qscilexerperl.sip, Python/qscilexerpov.sip, Python/qscilexerproperties.sip, Python/qscilexerpython.sip, Python/qscilexerruby.sip, Python/qscilexersql.sip, Python/qscilexertex.sip, Python/qscimacro.sip, Python/qscimod4.sip, Python/qscimodcommon.sip, Python/qsciprinter.sip, Python/qsciscintilla.sip, Python/qsciscintillabase4.sip, Python/qscitypes.sip, qt/qsciapis.h, qt/qsciglobal.h, qt/qscilexer.h, qt/qscilexerbash.h, qt/qscilexercpp.h, qt/qscilexerperl.h, qt/qscilexerpython.h, qt/qscilexersql.h, qt/qsciprinter.h, qt/qsciscintilla.h: Ported the .sip files from v1. (Not yet part of the snapshot.) [c03807f9fbab] * Makefile, qt/qscintilla-Qt4.pro, qt/qscintilla.pro: The .pro file should now work with both Qt v3 and v4. [c99aec4ce73d] * Makefile, qt/qscintilla-Qt4.pro, qt/qscintilla.pro, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h, qt/qsciscintillabase4.cpp, qt/qsciscintillabase4.h: Some file reorganisation for when the backport to Qt3 is done. [c97fb1bdc0e5] * qt/qscicommand.cpp, qt/qscicommandset.cpp, qt/qscidocument.cpp, qt/qscimacro.cpp, qt/qscintilla.pro, qt/qsciprinter.cpp, qt/qsciscintilla.cpp, qt/qsciscintilla.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h, qt/qscitypes.h: Moved the Scintilla API enums out of QsciScintillaBase and into the new QsciTypes namespace. [6de0ac19e4df] * qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Triple clicking now works. [8ef632d89147] 2006-07-23 phil * qt/qsciscintillabase.cpp: Fixed incorrect selection after dropping text. [4c62275c39f4] * qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp: Dropping text seems (mostly) to work. [7acc97948229] 2006-07-22 phil * qt/PlatQt.cpp, qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Scrollbars now work. The context menu now works. The clipboard and mouse selection now works. Dragging to external windows now works (but not dropping). [73995ec258cd] 2006-07-18 phil * example-Qt4/mainwindow.cpp, example-Qt4/mainwindow.h, qt/PlatQt.cpp, qt/qextscintillalexerbash.cxx, qt/qextscintillalexerbash.h, qt/qextscintillalexerbatch.cxx, qt/qextscintillalexerbatch.h, qt/qextscintillalexercpp.cxx, qt/qextscintillalexercpp.h, qt/qextscintillalexercsharp.cxx, qt/qextscintillalexercsharp.h, qt/qextscintillalexercss.cxx, qt/qextscintillalexercss.h, qt/qextscintillalexerdiff.cxx, qt/qextscintillalexerdiff.h, qt/qextscintillalexerhtml.cxx, qt/qextscintillalexerhtml.h, qt/qextscintillalexeridl.cxx, qt/qextscintillalexeridl.h, qt/qextscintillalexerjava.cxx, qt/qextscintillalexerjava.h, qt/qextscintillalexerjavascript.cxx, qt/qextscintillalexerjavascript.h, qt/qextscintillalexerlua.cxx, qt/qextscintillalexerlua.h, qt/qextscintillalexermakefile.cxx, qt/qextscintillalexermakefile.h, qt/qextscintillalexerperl.cxx, qt/qextscintillalexerperl.h, qt/qextscintillalexerpov.cxx, qt/qextscintillalexerpov.h, qt/qextscintillalexerproperties.cxx, qt/qextscintillalexerproperties.h, qt/qextscintillalexerpython.cxx, qt/qextscintillalexerpython.h, qt/qextscintillalexerruby.cxx, qt/qextscintillalexerruby.h, qt/qextscintillalexersql.cxx, qt/qextscintillalexersql.h, qt/qextscintillalexertex.cxx, qt/qextscintillalexertex.h, qt/qextscintillamacro.cxx, qt/qextscintillamacro.h, qt/qextscintillaprinter.cxx, qt/qextscintillaprinter.h, qt/qsciapis.h, qt/qscicommand.h, qt/qscilexer.h, qt/qscilexerbash.cpp, qt/qscilexerbash.h, qt/qscilexerbatch.cpp, qt/qscilexerbatch.h, qt/qscilexercpp.cpp, qt/qscilexercpp.h, qt/qscilexercsharp.cpp, qt/qscilexercsharp.h, qt/qscilexercss.cpp, qt/qscilexercss.h, qt/qscilexerdiff.cpp, qt/qscilexerdiff.h, qt/qscilexerhtml.cpp, qt/qscilexerhtml.h, qt/qscilexeridl.cpp, qt/qscilexeridl.h, qt/qscilexerjava.cpp, qt/qscilexerjava.h, qt/qscilexerjavascript.cpp, qt/qscilexerjavascript.h, qt/qscilexerlua.cpp, qt/qscilexerlua.h, qt/qscilexermakefile.cpp, qt/qscilexermakefile.h, qt/qscilexerperl.cpp, qt/qscilexerperl.h, qt/qscilexerpov.cpp, qt/qscilexerpov.h, qt/qscilexerproperties.cpp, qt/qscilexerproperties.h, qt/qscilexerpython.cpp, qt/qscilexerpython.h, qt/qscilexerruby.cpp, qt/qscilexerruby.h, qt/qscilexersql.cpp, qt/qscilexersql.h, qt/qscilexertex.cpp, qt/qscilexertex.h, qt/qscimacro.cpp, qt/qscimacro.h, qt/qscintilla.pro, qt/qsciprinter.cpp, qt/qsciprinter.h, qt/qsciscintilla.h: Ported the rest of the API to Qt4. Finished porting the example to Qt4. [de0ede6bbcf5] 2006-07-17 phil * qt/qextscintilla.cxx, qt/qextscintilla.h, qt/qextscintillaapis.cxx, qt/qextscintillaapis.h, qt/qextscintillacommand.cxx, qt/qextscintillacommand.h, qt/qextscintillacommandset.cxx, qt/qextscintillacommandset.h, qt/qextscintilladocument.cxx, qt/qextscintilladocument.h, qt/qextscintillalexer.cxx, qt/qextscintillalexer.h, qt/qsciapis.cpp, qt/qsciapis.h, qt/qscicommand.cpp, qt/qscicommand.h, qt/qscicommandset.cpp, qt/qscicommandset.h, qt/qscidocument.cpp, qt/qscidocument.h, qt/qscilexer.cpp, qt/qscilexer.h, qt/qscintilla.pro, qt/qsciscintilla.cpp, qt/qsciscintilla.h: More porting to Qt4 - just the lexers remaining. [07158797bcf2] * qt/ListBoxQt.cpp, qt/PlatQt.cpp, qt/SciClasses.cpp, qt/ScintillaQt.cpp, qt/qscintilla.pro, qt/qsciscintillabase.cpp: Further Qt4 changes so that Q3Support is no longer needed. [cb3ca2aee49e] * qt/ListBoxQt.cpp, qt/ListBoxQt.h, qt/PlatQt.cpp, qt/SciClasses.cpp, qt/SciClasses.h, qt/SciListBox.cxx, qt/SciListBox.h, qt/ScintillaQt.cpp, qt/ScintillaQt.h, qt/qscintilla.pro, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Ported the auto-completion list implementation to Qt4. [1d0d07f7ba3b] 2006-07-16 phil * qt/PlatQt.cpp, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Drawing now seems Ok. Keyboard support now seems Ok. Start of the mouse support. [20a223c3f57e] 2006-07-12 phil * include/Platform.h, qt/PlatQt.cpp, qt/ScintillaQt.cpp: Painting now seems to happen only within paint events - but incorrectly. [a60a10298391] * qt/PlatQt.cpp, qt/PlatQt.cxx, qt/ScintillaQt.cpp, qt/ScintillaQt.cxx, qt/ScintillaQt.h, qt/qscintilla.pro: Recoded the implementation of surfaces so that painters are only active during paint events. Not yet debugged. [d0d91ae8e514] * build.py, qt/PlatQt.cxx, qt/ScintillaQt.cxx, qt/ScintillaQt.h, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Recoded the handling of key presses so that it doesn't use any Qt3 specific features and should be backported to QScintilla v1. It also should work better in Unicode mode. [c2b96d686ee6] 2006-07-11 phil * Makefile, build.py, example-Qt3/README, example-Qt3/application.cpp, example-Qt3/application.h, example-Qt3/application.pro, example- Qt3/fileopen.xpm, example-Qt3/fileprint.xpm, example- Qt3/filesave.xpm, example-Qt3/main.cpp, example-Qt4/README, example- Qt4/application.pro, example-Qt4/application.qrc, example- Qt4/images/copy.png, example-Qt4/images/cut.png, example- Qt4/images/new.png, example-Qt4/images/open.png, example- Qt4/images/paste.png, example-Qt4/images/save.png, example- Qt4/main.cpp, example-Qt4/mainwindow.cpp, example-Qt4/mainwindow.h, example/README, example/application.cpp, example/application.h, example/application.pro, example/fileopen.xpm, example/fileprint.xpm, example/filesave.xpm, example/main.cpp, qt/PlatQt.cxx, qt/SciListBox.cxx, qt/SciListBox.h, qt/ScintillaQt.cxx, qt/ScintillaQt.h, qt/qextscintilla.cxx, qt/qextscintillabase.cxx, qt/qextscintillabase.h, qt/qextscintillaglobal.h, qt/qsciglobal.h, qt/qscintilla.pro, qt/qsciscintillabase.cpp, qt/qsciscintillabase.h: Whole raft of changes starting QScintilla2. [7f0bd20f2f83] 2006-07-09 phil * qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_fr.ts, qt/qscintilla_ptbr.ts, qt/qscintilla_ru.ts: Updated translations from Detlev. [c04c167d802e] 2006-07-08 phil * NEWS, qt/qextscintilla.cxx, qt/qextscintilla.h: Added QextScintilla::isCallTipActive(). [1f7dcb40db25] * lib/LICENSE.commercial.short, lib/LICENSE.edu.short, lib/LICENSE.gpl.short, qt/qextscintilla.cxx: Changed the autoindentation to be slightly cleverer when handling Python. If a lexer does not define block end words then a block start word is ignored unless it is the last significant word in a line. [d5813c13f5da] 2006-07-02 phil * qt/PlatQt.cxx: Possibly fixed a possible problem with double clicking under Windows. [271141bb2b43] * NEWS, qt/ScintillaQt.cxx, qt/qextscintilla.cxx, qt/qextscintilla.h: Added setWrapVisualFlags(), WrapMode::WrapCharacter, WrapVisualFlag to QextScintilla. The layout cache is now set according to the wrap mode. Setting a wrap mode now disables the horizontal scrollbar. [a498b86e7999] 2006-07-01 phil * NEWS, qt/qextscintilla.cxx, qt/qextscintilla.h: Added cancelList(), firstVisibleLine(), isListActive(), showUserList(), textHeight() and userListActivated() to QextScintilla. [058c7be4bdfe] * qt/qextscintilla.cxx: Auto-completion changed so that subsequent start characters cause the list to be re-created (containing a subset of the previous one). [5b534658e638] 2006-06-28 phil * NEWS, qt/SciListBox.cxx, qt/qextscintilla.cxx, qt/qextscintilla.h, qt/qextscintillaapis.cxx, qt/qextscintillaapis.h, qt/qextscintillalexer.cxx, qt/qextscintillalexer.h, qt/qextscintillalexerpython.cxx, qt/qextscintillalexerpython.h: Handle Key_Enter the same as Key_Return. QextScintilla::foldAll() can now optionally fold all child fold points. Added autoCompleteFromAll() and setAutoCompletionStartCharacters() to QextScintilla. Vastly improved the way auto-completion and call tips work. [8b0472aaed61] 2006-06-25 phil * qt/qextscintilla.cxx, qt/qextscintillabase.cxx, qt/qextscintillalexer.cxx: The default fore and background colours now default to the application palette rather than being hardcoded to black and white. [6cb6b5bef5fc] * NEWS, qt/qextscintilla.cxx, qt/qextscintilla.h, qt/qextscintillalexer.cxx, qt/qextscintillalexer.h: Added defaultColor() and setDefaultColor() to QextScintillaLexer. Added color() and setColor() to QextScintilla. Renamed eraseColor() and setEraseColor() to paper() and setPaper() in QextScintilla. [c1fbfc192235] * NEWS, qt/SciListBox.cxx, qt/qextscintilla.cxx, qt/qextscintilla.h, qt/qextscintillaapis.cxx, qt/qextscintillaapis.h, qt/qextscintillabase.h, qt/qextscintillalexer.cxx, qt/qextscintillalexer.h: Added a couple of extra SendScintilla overloads. One is needed for PyQt because of the change in SIP's handling of unsigned values. The other is needed to solve C++ problems caused by the first. Autocompletion list entries from APIs may now contain spaces. Added defaultPaper() and setDefaultPaper() to QextScintillaLexer. Added eraseColor() and setEraseColor() to QextScintilla. [34f527ca0f99] 2006-06-21 phil * qt/qextscintilla.cxx, qt/qextscintillalexer.cxx, qt/qextscintillalexer.h, qt/qextscintillalexerhtml.cxx, qt/qextscintillalexerhtml.h: Removed QextScintillaLexer::styleBits() now that SCI_GETSTYLEBITSNEEDED is available. [1c6837500560] * NEWS, qt/PlatQt.cxx, qt/qextscintilla.cxx, qt/qextscintilla.h: QextScintilla::setSelectionBackgroundColor(), QextScintilla::setMarkerBackgroundColor() and QextScintilla::setCaretLineBackgroundColor() now respect the alpha component. [48bae1fffe85] 2006-06-20 phil * NEWS, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/index.html, gtk/Converter.h, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, include/Scintilla.h, include/Scintilla.iface, qt/qextscintillabase.h, qt/qextscintillalexerpython.h, src/Editor.cxx, src/Editor.h, src/ViewStyle.cxx, src/ViewStyle.h, version.txt, win32/ScintRes.rc, win32/ScintillaWin.cxx: Merged Scintilla v1.70. [03ac3edd5dd2] 2006-06-19 phil * qt/qextscintillabase.h, qt/qextscintillalexerlua.h, qt/qextscintillalexerruby.cxx, qt/qextscintillalexerruby.h, qt/qextscintillalexersql.h: Significant, and incompatible, updates to the QextScintillaLexerRuby class. [0484fe132d0c] * src/PropSet.cxx: Fix for qsort helpers linkage from Ulli. (Patch sent upstream.) [2307adf67045] 2006-06-18 phil * qt/qextscintillalexerpython.cxx, qt/qextscintillalexerpython.h: Ctrl-D is now duplicate selection rather than duplicate line. Updated the Python lexer to add support for hightlighted identifiers and decorators. [52ca24a722ac] * qt/qextscintillabase.h, qt/qextscintillacommandset.cxx, qt/qextscintillalexer.h, qt/qextscintillalexerbash.h, qt/qextscintillalexerbatch.h, qt/qextscintillalexercpp.h, qt/qextscintillalexercsharp.h, qt/qextscintillalexercss.h, qt/qextscintillalexerhtml.h, qt/qextscintillalexeridl.h, qt/qextscintillalexerjava.h, qt/qextscintillalexerjavascript.h, qt/qextscintillalexerlua.h, qt/qextscintillalexerperl.h, qt/qextscintillalexerpov.h, qt/qextscintillalexerpython.h, qt/qextscintillalexerruby.h, qt/qextscintillalexersql.h, qt/qextscintillalexertex.h, qt/qscintilla.pro: Added the Scintilla 1.69 extensions to the low level API. [e89b98aaaa33] * .repoman, build.py, doc/Icons.html, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/ScintillaToDo.html, doc/index.html, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, gtk/scintilla.mak, include/HFacer.py, include/KeyWords.h, include/Platform.h, include/PropSet.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, include/ScintillaWidget.h, qt/PlatQt.cxx, qt/ScintillaQt.h, qt/qscintilla.pro, src/CallTip.cxx, src/CallTip.h, src/CellBuffer.cxx, src/CellBuffer.h, src/CharClassify.cxx, src/CharClassify.h, src/ContractionState.cxx, src/Document.cxx, src/Document.h, src/DocumentAccessor.cxx, src/Editor.cxx, src/Editor.h, src/ExternalLexer.cxx, src/Indicator.cxx, src/KeyMap.cxx, src/KeyWords.cxx, src/LexAU3.cxx, src/LexBash.cxx, src/LexBasic.cxx, src/LexCPP.cxx, src/LexCaml.cxx, src/LexCsound.cxx, src/LexEiffel.cxx, src/LexGen.py, src/LexGui4Cli.cxx, src/LexHTML.cxx, src/LexInno.cxx, src/LexLua.cxx, src/LexMSSQL.cxx, src/LexOpal.cxx, src/LexOthers.cxx, src/LexPOV.cxx, src/LexPython.cxx, src/LexRuby.cxx, src/LexSQL.cxx, src/LexSpice.cxx, src/LexTCL.cxx, src/LexVB.cxx, src/LineMarker.h, src/PropSet.cxx, src/RESearch.cxx, src/RESearch.h, src/ScintillaBase.cxx, src/StyleContext.h, src/ViewStyle.cxx, src/ViewStyle.h, src/XPM.cxx, vcbuild/SciLexer.dsp, version.txt, win32/PlatWin.cxx, win32/ScintRes.rc, win32/ScintillaWin.cxx, win32/deps.mak, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak: Removed the redundant .repoman file. Synced with Scintilla v1.69 with only the minimal changes needed to compile it. [6774f137c5a1] 2006-06-17 phil * .repoman, License.txt, Makefile, NEWS, README, TODO, bin/empty.txt, build.py, delbin.bat, delcvs.bat, designer/designer.pro, designer/qscintillaplugin.cpp, doc/Design.html, doc/Lexer.txt, doc/SciBreak.jpg, doc/SciCoding.html, doc/SciRest.jpg, doc/SciTEIco.png, doc/SciWord.jpg, doc/ScintillaDoc.html, doc/ScintillaDownload.html, doc/ScintillaHistory.html, doc/ScintillaRelated.html, doc/ScintillaToDo.html, doc/ScintillaUsage.html, doc/Steps.html, doc/index.html, example/README, example/application.cpp, example/application.h, example/application.pro, example/fileopen.xpm, example/fileprint.xpm, example/filesave.xpm, example/main.cpp, gtk/Converter.h, gtk/PlatGTK.cxx, gtk/ScintillaGTK.cxx, gtk/deps.mak, gtk/makefile, gtk/scintilla-marshal.c, gtk/scintilla- marshal.h, gtk/scintilla-marshal.list, gtk/scintilla.mak, include/Accessor.h, include/Face.py, include/HFacer.py, include/KeyWords.h, include/Platform.h, include/PropSet.h, include/SString.h, include/SciLexer.h, include/Scintilla.h, include/Scintilla.iface, include/ScintillaWidget.h, include/WindowAccessor.h, lib/LICENSE.commercial, lib/LICENSE.commercial.short, lib/LICENSE.edu, lib/LICENSE.edu.short, lib/LICENSE.gpl, lib/LICENSE.gpl.short, lib/README, lib/README.MacOS, lib/qscintilla.dxy, qt/PlatQt.cxx, qt/SciListBox.cxx, qt/SciListBox.h, qt/ScintillaQt.cxx, qt/ScintillaQt.h, qt/qextscintilla.cxx, qt/qextscintilla.h, qt/qextscintillaapis.cxx, qt/qextscintillaapis.h, qt/qextscintillabase.cxx, qt/qextscintillabase.h, qt/qextscintillacommand.cxx, qt/qextscintillacommand.h, qt/qextscintillacommandset.cxx, qt/qextscintillacommandset.h, qt/qextscintilladocument.cxx, qt/qextscintilladocument.h, qt/qextscintillaglobal.h, qt/qextscintillalexer.cxx, qt/qextscintillalexer.h, qt/qextscintillalexerbash.cxx, qt/qextscintillalexerbash.h, qt/qextscintillalexerbatch.cxx, qt/qextscintillalexerbatch.h, qt/qextscintillalexercpp.cxx, qt/qextscintillalexercpp.h, qt/qextscintillalexercsharp.cxx, qt/qextscintillalexercsharp.h, qt/qextscintillalexercss.cxx, qt/qextscintillalexercss.h, qt/qextscintillalexerdiff.cxx, qt/qextscintillalexerdiff.h, qt/qextscintillalexerhtml.cxx, qt/qextscintillalexerhtml.h, qt/qextscintillalexeridl.cxx, qt/qextscintillalexeridl.h, qt/qextscintillalexerjava.cxx, qt/qextscintillalexerjava.h, qt/qextscintillalexerjavascript.cxx, qt/qextscintillalexerjavascript.h, qt/qextscintillalexerlua.cxx, qt/qextscintillalexerlua.h, qt/qextscintillalexermakefile.cxx, qt/qextscintillalexermakefile.h, qt/qextscintillalexerperl.cxx, qt/qextscintillalexerperl.h, qt/qextscintillalexerpov.cxx, qt/qextscintillalexerpov.h, qt/qextscintillalexerproperties.cxx, qt/qextscintillalexerproperties.h, qt/qextscintillalexerpython.cxx, qt/qextscintillalexerpython.h, qt/qextscintillalexerruby.cxx, qt/qextscintillalexerruby.h, qt/qextscintillalexersql.cxx, qt/qextscintillalexersql.h, qt/qextscintillalexertex.cxx, qt/qextscintillalexertex.h, qt/qextscintillamacro.cxx, qt/qextscintillamacro.h, qt/qextscintillaprinter.cxx, qt/qextscintillaprinter.h, qt/qscintilla.pro, qt/qscintilla_de.qm, qt/qscintilla_de.ts, qt/qscintilla_fr.qm, qt/qscintilla_fr.ts, qt/qscintilla_ptbr.qm, qt/qscintilla_ptbr.ts, qt/qscintilla_ru.qm, qt/qscintilla_ru.ts, src/AutoComplete.cxx, src/AutoComplete.h, src/CallTip.cxx, src/CallTip.h, src/CellBuffer.cxx, src/CellBuffer.h, src/ContractionState.cxx, src/ContractionState.h, src/Document.cxx, src/Document.h, src/DocumentAccessor.cxx, src/DocumentAccessor.h, src/Editor.cxx, src/Editor.h, src/ExternalLexer.cxx, src/ExternalLexer.h, src/Indicator.cxx, src/Indicator.h, src/KeyMap.cxx, src/KeyMap.h, src/KeyWords.cxx, src/LexAPDL.cxx, src/LexAU3.cxx, src/LexAVE.cxx, src/LexAda.cxx, src/LexAsm.cxx, src/LexAsn1.cxx, src/LexBaan.cxx, src/LexBash.cxx, src/LexBasic.cxx, src/LexBullant.cxx, src/LexCLW.cxx, src/LexCPP.cxx, src/LexCSS.cxx, src/LexCaml.cxx, src/LexConf.cxx, src/LexCrontab.cxx, src/LexCsound.cxx, src/LexEScript.cxx, src/LexEiffel.cxx, src/LexErlang.cxx, src/LexFlagship.cxx, src/LexForth.cxx, src/LexFortran.cxx, src/LexGen.py, src/LexGui4Cli.cxx, src/LexHTML.cxx, src/LexHaskell.cxx, src/LexKix.cxx, src/LexLisp.cxx, src/LexLout.cxx, src/LexLua.cxx, src/LexMMIXAL.cxx, src/LexMPT.cxx, src/LexMSSQL.cxx, src/LexMatlab.cxx, src/LexMetapost.cxx, src/LexNsis.cxx, src/LexOthers.cxx, src/LexPB.cxx, src/LexPOV.cxx, src/LexPS.cxx, src/LexPascal.cxx, src/LexPerl.cxx, src/LexPython.cxx, src/LexRebol.cxx, src/LexRuby.cxx, src/LexSQL.cxx, src/LexScriptol.cxx, src/LexSmalltalk.cxx, src/LexSpecman.cxx, src/LexTADS3.cxx, src/LexTeX.cxx, src/LexVB.cxx, src/LexVHDL.cxx, src/LexVerilog.cxx, src/LexYAML.cxx, src/LineMarker.cxx, src/LineMarker.h, src/PropSet.cxx, src/RESearch.cxx, src/RESearch.h, src/SVector.h, src/SciTE.properties, src/ScintillaBase.cxx, src/ScintillaBase.h, src/Style.cxx, src/Style.h, src/StyleContext.cxx, src/StyleContext.h, src/UniConversion.cxx, src/UniConversion.h, src/ViewStyle.cxx, src/ViewStyle.h, src/WindowAccessor.cxx, src/XPM.cxx, src/XPM.h, tgzsrc, vcbuild/SciLexer.dsp, version.txt, win32/Margin.cur, win32/PlatWin.cxx, win32/PlatformRes.h, win32/SciTE.properties, win32/ScintRes.rc, win32/Scintilla.def, win32/ScintillaWin.cxx, win32/deps.mak, win32/makefile, win32/scintilla.mak, win32/scintilla_vc6.mak, zipsrc.bat: First import of QScintilla [0521804cd44a] sqlitebrowser-3.11.2/libs/qscintilla/LICENSE000066400000000000000000001045131345112435200206100ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . sqlitebrowser-3.11.2/libs/qscintilla/NEWS000066400000000000000000000546661345112435200203170ustar00rootroot00000000000000v2.10 20th February 2017 - Based on Scintilla v3.7.2. - Added the QsciLexerJSON class. - Added the QsciLexerMarkdown class. - Added replaceHorizontalScrollBar() and replaceVerticalScrollBar() to QsciScintillaBase. - Added bytes() and a corresponding text() overload to QsciScintilla. - Added EdgeMultipleLines to QsciScintilla::EdgeMode. - Added addEdgeColumn() and clearEdgeColumns() to QsciScintilla. - Added the marginRightClicked() signal to QsciScintilla. - Added SymbolMarginColor to QsciScintilla::MarginType. - Added setMarginBackgroundColor() and marginBackgroundColor() to QsciScintilla. - Added setMargins() and margins() to QsciScintilla. - Added TriangleIndicator and TriangleCharacterIndicator to QsciScintilla::IndicatorStyle. - Added WsVisibleOnlyInIndent to QsciScintilla::WhitespaceVisibility. - Added TabDrawMode, setTabDrawMode() and tabDrawMode() to QsciScintilla. - Added InstanceProperty to QsciLexerCoffeeScript. - Added EDGE_MULTILINE to QsciScintillaBase. - Added INDIC_POINT and INDIC_POINTCHARACTER to QsciScintillaBase. - Added SC_AC_FILLUP, SC_AC_DOUBLECLICK, SC_AC_TAB, SC_AC_NEWLINE and SC_AC_COMMAND to QsciScintillaBase. - Added SC_CASE_CAMEL to QsciScintillaBase. - Added SC_CHARSET_CYRILLIC and SC_CHARSET_OEM866 to QsciScintillaBase. - Added SC_FOLDDISPLAYTEXT_HIDDEN, SC_FOLDDISPLAYTEXT_STANDARD and SC_FOLDDISPLAYTEXT_BOXED to QsciScintillaBase. - Added SC_IDLESTYLING_NONE, SC_IDLESTYLING_TOVISIBLE, SC_IDLESTYLING_AFTERVISIBLE and SC_IDLESTYLING_ALL to QsciScintillaBase. - Added SC_MARGIN_COLOUR to QsciScintillaBase. - Added SC_POPUP_NEVER, SC_POPUP_ALL and SC_POPUP_TEXT to QsciScintillaBase. - Added SCI_FOLDDISPLAYTEXTSETSTYLE and SCI_TOGGLEFOLDSHOWTEXT to QsciScintillaBase. - Added SCI_GETIDLESTYLING and SCI_SETIDLESTYLING to QsciScintillaBase. - Added SCI_GETMARGINBACKN and SCI_SETMARGINBACKN to QsciScintillaBase. - Added SCI_GETMARGINS and SCI_SETMARGINS to QsciScintillaBase. - Added SCI_GETMOUSEWHEELCAPTURES and SCI_SETMOUSEWHEELCAPTURES to QsciScintillaBase. - Added SCI_GETTABDRAWMODE and SCI_SETTABDRAWMODE to QsciScintillaBase. - Added SCI_ISRANGEWORD to QsciScintillaBase. - Added SCI_MULTIEDGEADDLINE and SCI_MULTIEDGECLEARALL to QsciScintillaBase. - Added SCI_MULTIPLESELECTADDNEXT and SCI_MULTIPLESELECTADDEACH to QsciScintillaBase. - Added SCI_TARGETWHOLEDOCUMENT to QsciScintillaBase. - Added SCLEX_JSON and SCLEX_EDIFACT to QsciScintillaBase. - Added SCTD_LONGARROW and SCTD_STRIKEOUT to QsciScintillaBase. - Added SCVS_NOWRAPLINESTART to QsciScintillaBase. - Added SCWS_VISIBLEONLYININDENT to QsciScintillaBase. - Added STYLE_FOLDDISPLAYTEXT to QsciScintillaBase. - Added the SCN_AUTOCCOMPLETED() signal to QsciScintillaBase. - Added the overloaded SCN_AUTOCSELECTION() and SCN_USERLISTSELECTION() signals to QsciScintillaBase. - Added the SCN_MARGINRIGHTCLICK() signal to QsciScintillaBase. - Renamed SCI_GETTARGETRANGE to SCI_GETTARGETTEXT in QsciScintillaBase. - Removed SCI_GETKEYSUNICODE and SCI_SETKEYSUNICODE to QsciScintillaBase. - The autoCompletionFillups(), autoCompletionWordSeparators(), blockEnd(), blockLookback(), blockStart(), blockStartKeyword(), braceStyle(), caseSensitive(), indentationGuideView() and defaultStyle() methods of QsciLexer are no longer marked as internal and are exposed to Python so that they may be used by QsciLexerCustom sub-classes. - The name of the library has been changed to include the major version number of the version of Qt it is built against (ie. 4 or 5). v2.9.4 25th December 2016 - Added the .api file for Python v3.6. - Bug fixes. v2.9.3 25th July 2016 - Bug fixes. v2.9.2 18th April 2016 - Added support for a PEP 484 stub file for the Python extension module. v2.9.1 24th October 2015 - Added the .api file for Python v3.5. - Bug fixes. v2.9 20th April 2015 - Based on Scintilla v3.5.4. - Added UserLiteral, InactiveUserLiteral, TaskMarker, InactiveTaskMarker, EscapeSequence, InactiveEscapeSequence, setHighlightBackQuotedStrings(), highlightBackQuotedStrings(), setHighlightEscapeSequences(), highlightEscapeSequences(), setVerbatimStringEscapeSequencesAllowed() and verbatimStringEscapeSequencesAllowed() to QsciLexerCPP. - Added CommentKeyword, DeclareInputPort, DeclareOutputPort, DeclareInputOutputPort, PortConnection and the inactive versions of all styles to QsciLexerVerilog. - Added CommentBlock to QsciLexerVHDL. - Added AnnotationIndented to QsciScintilla::AnnotationDisplay. - Added FullBoxIndicator, ThickCompositionIndicator, ThinCompositionIndicator and TextColorIndicator to QsciScintilla::IndicatorStyle. - Added setIndicatorHoverForegroundColor() and setIndicatorHoverStyle() to QsciScintilla. - Added Bookmark to QsciScintilla::MarkerSymbol. - Added WrapWhitespace to QsciScintilla::WrapMode. - Added SCLEX_AS, SCLEX_BIBTEX, SCLEX_DMAP, SCLEX_DMIS, SCLEX_IHEX, SCLEX_REGISTRY, SCLEX_SREC and SCLEX_TEHEX to QsciScintillaBase. - Added SCI_CHANGEINSERTION to QsciScintillaBase. - Added SCI_CLEARTABSTOPS, SCI_ADDTABSTOP and SCI_GETNEXTTABSTOP to QsciScintillaBase. - Added SCI_GETIMEINTERACTION, SCI_SETIMEINTERACTION, SC_IME_WINDOWED and SC_IME_INLINE to QsciScintillaBase. - Added SC_MARK_BOOKMARK to QsciScintillaBase. - Added INDIC_COMPOSITIONTHIN, INDIC_FULLBOX, INDIC_TEXTFORE, INDIC_IME, INDIC_IME_MAX, SC_INDICVALUEBIT, SC_INDICVALUEMASK, SC_INDICFLAG_VALUEBEFORE, SCI_INDICSETHOVERSTYLE, SCI_INDICGETHOVERSTYLE, SCI_INDICSETHOVERFORE, SCI_INDICGETHOVERFORE, SCI_INDICSETFLAGS and SCI_INDICGETFLAGS to QsciScintillaBase. - Added SCI_SETTARGETRANGE and SCI_GETTARGETRANGE to QsciScintillaBase. - Added SCFIND_CXX11REGEX to QsciScintillaBase. - Added SCI_CALLTIPSETPOSSTART to QsciScintillaBase. - Added SC_FOLDFLAG_LINESTATE to QsciScintillaBase. - Added SC_WRAP_WHITESPACE to QsciScintillaBase. - Added SC_PHASES_ONE, SC_PHASES_TWO, SC_PHASES_MULTIPLE, SCI_GETPHASESDRAW and SCI_SETPHASESDRAW to QsciScintillaBase. - Added SC_STATUS_OK, SC_STATUS_FAILURE, SC_STATUS_BADALLOC, SC_STATUS_WARN_START and SC_STATUS_WARNREGEX to QsciScintillaBase. - Added SC_MULTIAUTOC_ONCE, SC_MULTIAUTOC_EACH, SCI_AUTOCSETMULTI and SCI_AUTOCGETMULTI to QsciScintillaBase. - Added ANNOTATION_INDENTED to QsciScintillaBase. - Added SCI_DROPSELECTIONN to QsciScintillaBase. - Added SC_TECHNOLOGY_DIRECTWRITERETAIN and SC_TECHNOLOGY_DIRECTWRITEDC to QsciScintillaBase. - Added SC_LINE_END_TYPE_DEFAULT, SC_LINE_END_TYPE_UNICODE, SCI_GETLINEENDTYPESSUPPORTED, SCI_SETLINEENDTYPESALLOWED, SCI_GETLINEENDTYPESALLOWED and SCI_GETLINEENDTYPESACTIVE to QsciScintillaBase. - Added SCI_ALLOCATESUBSTYLES, SCI_GETSUBSTYLESSTART, SCI_GETSUBSTYLESLENGTH, SCI_GETSTYLEFROMSUBSTYLE, SCI_GETPRIMARYSTYLEFROMSTYLE, SCI_FREESUBSTYLES, SCI_SETIDENTIFIERS, SCI_DISTANCETOSECONDARYSTYLES and SCI_GETSUBSTYLEBASES to QsciScintillaBase. - Added SC_MOD_INSERTCHECK and SC_MOD_CHANGETABSTOPS to QsciScintillaBase. - Qt v3 and PyQt v3 are no longer supported. v2.8.4 11th September 2014 - Added setHotspotForegroundColor(), resetHotspotForegroundColor(), setHotspotBackgroundColor(), resetHotspotBackgroundColor(), setHotspotUnderline() and setHotspotWrap() to QsciScintilla. - Added SCI_SETHOTSPOTSINGLELINE to QsciScintillaBase. - Bug fixes. v2.8.3 3rd July 2014 - Added the QsciLexerCoffeeScript class. - Font sizes are now handled as floating point values rather than integers. - Bug fixes. v2.8.2 26th May 2014 - Added the QsciLexerAVS class. - Added the QsciLexerPO class. - Added the --sysroot, --no-sip-files and --no-qsci-api options to the Python bindings' configure.py. - Cross-compilation (specifically to iOS and Android) is now supported. - configure.py has been refactored and relicensed so that it can be used as a template for wrapping other bindings. - Bug fixes. v2.8.1 14th March 2014 - Added support for iOS and Android. - Added support for retina displays. - A qscintilla2.prf file is installed so that application .pro files only need to add CONFIG += qscintilla2. - Updated the keywords recognised by the Octave lexer. - Bug fixes. v2.8 9th November 2013 - Based on Scintilla v3.3.6. - Added the SCN_FOCUSIN() and SCN_FOCUSOUT() signals to QsciScintillaBase. - Added PreProcessorCommentLineDoc and InactivePreProcessorCommentLineDoc to QsciLexerCPP. - Added SCLEX_LITERATEHASKELL, SCLEX_KVIRC, SCLEX_RUST and SCLEX_STTXT to QsciScintillaBase. - Added ThickCompositionIndicator to QsciScintilla::IndicatorStyle. - Added INDIC_COMPOSITIONTHICK to QsciScintillaBase. - Added SC_FOLDACTION_CONTRACT, SC_FOLDACTION_EXPAND and SC_FOLDACTION_TOGGLE to QsciScintillaBase. - Added SCI_FOLDLINE, SCI_FOLDCHILDREN, SCI_EXPANDCHILDREN and SCI_FOLDALL to QsciScintillaBase. - Added SC_AUTOMATICFOLD_SHOW, SC_AUTOMATICFOLD_CLICK and SC_AUTOMATICFOLD_CHANGE to QsciScintillaBase. - Added SCI_SETAUTOMATICFOLD and SCI_GETAUTOMATICFOLD to QsciScintillaBase. - Added SC_ORDER_PRESORTED, SC_ORDER_PERFORMSORT and SC_ORDER_CUSTOM to QsciScintillaBase. - Added SCI_AUTOCSETORDER and SCI_AUTOCGETORDER to QsciScintillaBase. - Added SCI_POSITIONRELATIVE to QsciScintillaBase. - Added SCI_RELEASEALLEXTENDEDSTYLES and SCI_ALLOCATEEXTENDEDSTYLES to QsciScintillaBase. - Added SCI_SCROLLRANGE to QsciScintillaBase. - Added SCI_SETCARETLINEVISIBLEALWAYS and SCI_GETCARETLINEVISIBLEALWAYS to QsciScintillaBase. - Added SCI_SETMOUSESELECTIONRECTANGULARSWITCH and SCI_GETMOUSESELECTIONRECTANGULARSWITCH to QsciScintillaBase. - Added SCI_SETREPRESENTATION, SCI_GETREPRESENTATION and SCI_CLEARREPRESENTATION to QsciScintillaBase. - Input methods are now properly supported. v2.7.2 16th June 2013 - The build script for the Python bindings now has a --pyqt argument for specifying PyQt4 or PyQt5. - The default EOL mode on OS/X is now EolUnix. - Bug fixes. v2.7.1 1st March 2013 - Added support for the final release of Qt v5. - The build script for the Python bindings should now work with SIP v5. - Bug fixes. v2.7 8th December 2012 - Based on Scintilla v3.2.3. - Added support for Qt v5-rc1. - Added HashQuotedString, InactiveHashQuotedString, PreProcessorComment, InactivePreProcessorComment, setHighlightHashQuotedStrings() and highlightHashQuotedStrings() to QsciLexerCpp. - Added Variable, setHSSLanguage(), HSSLanguage(), setLessLanguage(), LessLanguage(), setSCCSLanguage() and SCCSLanguage() to QsciLexerCSS. - Added setOverwriteMode() and overwriteMode() to QsciScintilla. - Added wordAtLineIndex() to QsciScintilla. - Added findFirstInSelection() to QsciScintilla. - Added CallTipsPosition, callTipsPosition() and setCallTipsPosition() to QsciScintilla. - Added WrapFlagInMargin to QsciScintilla::WrapVisualFlag. - Added SquigglePixmapIndicator to QsciScintilla::IndicatorStyle. - The weight of a font (rather than whether it is just bold or not) is now respected. - Added SCLEX_AVS, SCLEX_COFFEESCRIPT, SCLEX_ECL, SCLEX_OSCRIPT, SCLEX_TCMD and SCLEX_VISUALPROLOG to QsciScintillaBase. - Added SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE and SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE to QsciScintillaBase. - Added SC_FONT_SIZE_MULTIPLIER to QsciScintillaBase. - Added SC_WEIGHT_NORMAL, SC_WEIGHT_SEMIBOLD and SC_WEIGHT_BOLD to QsciScintillaBase. - Added SC_WRAPVISUALFLAG_MARGIN to QsciScintillaBase. - Added INDIC_SQUIGGLEPIXMAP to QsciScintillaBase. - Added SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR, SCI_CALLTIPSETPOSITION, SCI_COUNTCHARACTERS, SCI_CREATELOADER, SCI_DELETERANGE, SCI_FINDINDICATORFLASH, SCI_FINDINDICATORHIDE, SCI_FINDINDICATORSHOW, SCI_GETALLLINESVISIBLE, SCI_GETGAPPOSITION, SCI_GETPUNCTUATIONCHARS, SCI_GETRANGEPOINTER, SCI_GETSELECTIONEMPTY, SCI_GETTECHNOLOGY, SCI_GETWHITESPACECHARS, SCI_GETWORDCHARS, SCI_RGBAIMAGESETSCALE, SCI_SETPUNCTUATIONCHARS, SCI_SETTECHNOLOGY, SCI_STYLESETSIZEFRACTIONAL, SCI_STYLEGETSIZEFRACTIONAL, SCI_STYLESETWEIGHT and SCI_STYLEGETWEIGHT to QsciScintillaBase. - Removed SCI_GETUSEPALETTE and SCI_SETUSEPALETTE from QsciScintillaBase. - Bug fixes. v2.6.2 20th June 2012 - Added support for Qt v5-alpha. - QsciLexer::wordCharacters() is now part of the public API. - Bug fixes. v2.6.1 10th February 2012 - Support SCI_NAMESPACE to enable all internal Scintilla classes to be put into the Scintilla namespace. - APIs now allow for spaces between the end of a word and the opening parenthesis. - Building against Qt v3 is fixed. v2.6 11th November 2011 - Based on Scintilla v2.29. - Added Command, command() and execute() to QsciCommand. - Added boundTo() and find() to QsciCommandSet. - Added createStandardContextMenu() to QsciScintilla. - Added StraightBoxIndicator, DashesIndicator, DotsIndicator, SquiggleLowIndicator and DotBoxIndicator to QsciScintilla::IndicatorStyle. - Added markerDefine() to QsciScintilla. - Added MoNone, MoSublineSelect, marginOptions() and setMarginOptions() to QsciScintilla. - Added registerImage() to QsciScintilla. - Added setIndicatorOutlineColor() to QsciScintilla. - Added setMatchedBraceIndicator(), resetMatchedBraceIndicator(), setUnmatchedBraceIndicator() and resetUnmatchedBraceIndicator() to QsciScintilla. - Added highlightTripleQuotedStrings() and setHighlightTripleQuotedStrings() to QsciLexerCpp. - Added Label to QsciLexerLua. - Added DoubleQuotedStringVar, Translation, RegexVar, SubstitutionVar, BackticksVar, DoubleQuotedHereDocumentVar, BacktickHereDocumentVar, QuotedStringQQVar, QuotedStringQXVar, QuotedStringQRVar, setFoldAtElse() and foldAtElse() to QsciLexerPerl. - Added highlightSubidentifiers() and setHighlightSubidentifiers() to QsciLexerPython. - Added INDIC_STRAIGHTBOX, INDIC_DASH, INDIC_DOTS, INDIC_SQUIGGLELOW and INDIC_DOTBOX to QsciScintillaBase. - Added SC_MARGINOPTION_NONE and SC_MARGINOPTION_SUBLINESELECT to QsciScintillaBase. - Added SC_MARK_RGBAIMAGE to QsciScintillaBase. - Added SCI_BRACEBADLIGHTINDICATOR, SCI_BRACEHIGHLIGHTINDICATOR, SCI_GETIDENTIFIER, SCI_GETMARGINOPTIONS, SCI_INDICGETOUTLINEALPHA, SCI_INDICSETOUTLINEALPHA, SCI_MARKERDEFINERGBAIMAGE, SCI_MARKERENABLEHIGHLIGHT, SCI_MARKERSETBACKSELECTED, SCI_MOVESELECTEDLINESDOWN, SCI_MOVESELECTEDLINESUP, SCI_REGISTERRGBAIMAGE, SCI_RGBAIMAGESETHEIGHT, SCI_RGBAIMAGESETWIDTH, SCI_SCROLLTOEND, SCI_SCROLLTOSTART, SCI_SETEMPTYSELECTION, SCI_SETIDENTIFIER and SCI_SETMARGINOPTIONS to QsciScintillaBase. v2.5.1 17th April 2011 - Added QsciLexerMatlab and QsciLexerOctave. v2.5 29th March 2011 - Based on Scintilla v2.25. - Rectangular selections are now fully supported and compatible with SciTE. - The signature of the fromMimeData() and toMimeData() methods of QsciScintillaBase have changed incompatibly in order to support rectangular selections. - Added QsciScintilla::setAutoCompletionUseSingle() to replace the now deprecated setAutoCompletionShowSingle(). - Added QsciScintilla::autoCompletionUseSingle() to replace the now deprecated autoCompletionShowSingle(). - QsciScintilla::setAutoCompletionCaseSensitivity() is no longer ignored if a lexer has been set. - Added FullRectangle, LeftRectangle and Underline to the QsciScintilla::MarkerSymbol enum. - Added setExtraAscent(), extraAscent(), setExtraDescent() and extraDescent() to QsciScintilla. - Added setWhitespaceSize() and whitespaceSize() to QsciScintilla. - Added replaceSelectedText() to QsciScintilla. - Added setWhitespaceBackgroundColor() and setWhitespaceForegroundColor() to QsciScintilla. - Added setWrapIndentMode() and wrapIndentMode() to QsciScintilla. - Added setFirstVisibleLine() to QsciScintilla. - Added setContractedFolds() and contractedFolds() to QsciScintilla. - Added the SCN_HOTSPOTRELEASECLICK() signal to QsciScintillaBase. - The signature of the QsciScintillaBase::SCN_UPDATEUI() signal has changed. - Added the RawString and inactive styles to QsciLexerCPP. - Added MediaRule to QsciLexerCSS. - Added BackquoteString, RawString, KeywordSet5, KeywordSet6 and KeywordSet7 to QsciLexerD. - Added setDjangoTemplates(), djangoTemplates(), setMakoTemplates() and makoTemplates() to QsciLexerHTML. - Added KeywordSet5, KeywordSet6, KeywordSet7 and KeywordSet8 to QsciLexerLua. - Added setInitialSpaces() and initialSpaces() to QsciLexerProperties. - Added setFoldCompact(), foldCompact(), setStringsOverNewlineAllowed() and stringsOverNewlineAllowed() to QsciLexerPython. - Added setFoldComments(), foldComments(), setFoldCompact() and foldCompact() to QsciLexerRuby. - Added setFoldComments() and foldComments(), and removed setFoldCompact() and foldCompact() from QsciLexerTCL. - Added setFoldComments(), foldComments(), setFoldCompact(), foldCompact(), setProcessComments(), processComments(), setProcessIf(), and processIf() to QsciLexerTeX. - Added QuotedIdentifier, setDottedWords(), dottedWords(), setFoldAtElse(), foldAtElse(), setFoldOnlyBegin(), foldOnlyBegin(), setHashComments(), hashComments(), setQuotedIdentifiers() and quotedIdentifiers() to QsciLexerSQL. - The Python bindings now allow optional arguments to be specified as keyword arguments. - The Python bindings will now build using the protected-is-public hack if possible. v2.4.6 23rd December 2010 - Added support for indicators to the high-level API, i.e. added the IndicatorStyle enum, the clearIndicatorRange(), fillIndicatorRange(), indicatorDefine(), indicatorDrawUnder(), setIndicatorDrawUnder() and setIndicatorForegroundColor methods, and the indicatorClicked() and indicatorReleased() signals to QsciScintilla. - Added support for the Key style in QsciLexerProperties. - Added an API file for Python v2.7. - Added the --no-timestamp command line option to the Python bindings' configure.py. v2.4.5 31st August 2010 - A bug fix release. v2.4.4 12th July 2010 - Added the canInsertFromMimeData(), fromMimeData() and toMimeData() methods to QsciScintillaBase. - QsciScintilla::markerDefine() now allows existing markers to be redefined. v2.4.3 17th March 2010 - Added clearFolds() to QsciScintilla. v2.4.2 20th January 2010 - Updated Spanish translations from Jaime Seuma. - Fixed compilation problems with Qt v3 and Qt v4 prior to v4.5. v2.4.1 14th January 2010 - Added the QsciLexerSpice and QsciLexerVerilog classes. - Significant performance improvements when handling long lines. - The Python bindings include automatically generated docstrings by default. - Added an API file for Python v3. v2.4 5th June 2009 - Based on Scintilla v1.78. - Added the QsciLexerCustom, QsciStyle and QsciStyledText classes. - Added annotate(), annotation(), clearAnnotations(), setAnnotationDisplay() and annotationDisplay() to QsciScintilla. - Added setMarginText(), clearMarginText(), setMarginType() and marginType() to QsciScintilla. - Added QsciLexer::lexerId() so that container lexers can be implemented. - Added editor() and styleBitsNeeded() to QsciLexer. - Added setDollarsAllowed() and dollarsAllowed() to QsciLexerCPP. - Added setFoldScriptComments(), foldScriptComments(), setFoldScriptHeredocs() and foldScriptHeredocs() to QsciLexerHTML. - Added setSmartHighlighting() and smartHighlighting() to QsciLexerPascal. (Note that the Scintilla Pascal lexer has changed so that any saved colour and font settings will not be properly restored.) - Added setFoldPackages(), foldPackages(), setFoldPODBlocks() and foldPODBlocks() to QsciLexerPerl. - Added setV2UnicodeAllowed(), v2UnicodeAllowed(), setV3BinaryOctalAllowed(), v3BinaryOctalAllowed(), setV3BytesAllowed and v3BytesAllowed() to QsciLexerPython. - Added setScriptsStyled() and scriptsStyled() to QsciLexerXML. - Added Spanish translations from Jaime Seuma. v2.3.2 17th November 2008 - A bug fix release. v2.3.1 6th November 2008 - Based on Scintilla v1.77. - Added the read() and write() methods to QsciScintilla to allow a file to be read and written while minimising the conversions. - Added the positionFromLineIndex() and lineIndexFromPosition() methods to QsciScintilla to convert between a Scintilla character address and a QScintilla character address. - Added QsciScintilla::wordAtPoint() to return the word at the given screen coordinates. - QSciScintilla::setSelection() now allows the carat to be left at either the start or the end of the selection. - 'with' is now treated as a keyword by the Python lexer. v2.3 20th September 2008 - Based on Scintilla v1.76. - The new QsciAbstractAPIs class allows applications to replace the default implementation of the language APIs used for auto-completion lists and call tips. - Added QsciScintilla::apiContext() to allow applications to determine the context used for auto-completion and call tips. - Added the QsciLexerFortran, QsciLexerFortran77, QsciLexerPascal, QsciLexerPostScript, QsciLexerTCL, QsciLexerXML and QsciLexerYAML classes. - QsciScintilla::setFolding() will now accept an optional margin number. v2.2 27th February 2008 - Based on Scintilla v1.75. - A lexer's default colour, paper and font are now written to and read from the settings. - Windows64 is now supported. - The signature of the QsciScintillaBase::SCN_MACRORECORD() signal has changed slightly. - Changed the licensing to match the current Qt licenses, including GPL v3. v2.1 1st June 2007 - A slightly revised API, incompatible with QScintilla v2.0. - Lexers now remember their style settings. A lexer no longer has to be the current lexer when changing a style's color, end-of-line fill, font or paper. - The color(), eolFill(), font() and paper() methods of QsciLexer now return the current values for a style rather than the default values. - The setDefaultColor(), setDefaultFont() and setDefaultPaper() methods of QsciLexer are no longer slots and no longer virtual. - The defaultColor(), defaultFont() and defaultPaper() methods of QsciLexer are no longer virtual. - The color(), eolFill(), font() and paper() methods of all QsciLexer derived classes (except for QsciLexer itself) have been renamed defaultColor(), defaultEolFill(), defaultFont() and defaultPaper() respectively. v2.0 26th May 2007 - A revised API, incompatible with QScintilla v1. - Hugely improved autocompletion and call tips support. - Supports both Qt v3 and Qt v4. - Includes Python bindings. sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/000077500000000000000000000000001345112435200206415ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/CMakeLists.txt000066400000000000000000000075411345112435200234100ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.12.2) # Disable AUTOMOC because it cannot be made to work with QScintilla set(CMAKE_AUTOMOC OFF) set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(Qt5 REQUIRED COMPONENTS PrintSupport Widgets) if(APPLE) find_package(Qt5 REQUIRED COMPONENTS MacExtras) endif() add_definitions(-DSCINTILLA_QT) add_definitions(-DSCI_LEXER) set(QSCINTILLA_SRC qsciscintilla.cpp qsciscintillabase.cpp qsciabstractapis.cpp qsciapis.cpp qscicommand.cpp qscicommandset.cpp qscidocument.cpp qscilexer.cpp qscilexercustom.cpp qscilexersql.cpp qscilexerjson.cpp qscilexerhtml.cpp qscilexerxml.cpp qscilexerjavascript.cpp qscilexercpp.cpp qscilexerpython.cpp qscimacro.cpp qsciprinter.cpp qscistyle.cpp qscistyledtext.cpp MacPasteboardMime.cpp InputMethod.cpp SciClasses.cpp ListBoxQt.cpp PlatQt.cpp ScintillaQt.cpp ../lexers/LexSQL.cpp ../lexers/LexJSON.cpp ../lexers/LexHTML.cpp ../lexlib/Accessor.cpp ../lexlib/CharacterCategory.cpp ../lexlib/CharacterSet.cpp ../lexlib/LexerBase.cpp ../lexlib/LexerModule.cpp ../lexlib/LexerNoExceptions.cpp ../lexlib/LexerSimple.cpp ../lexlib/PropSetSimple.cpp ../lexlib/StyleContext.cpp ../lexlib/WordList.cpp ../src/AutoComplete.cpp ../src/CallTip.cpp ../src/CaseConvert.cpp ../src/CaseFolder.cpp ../src/Catalogue.cpp ../src/CellBuffer.cpp ../src/CharClassify.cpp ../src/ContractionState.cpp ../src/Decoration.cpp ../src/Document.cpp ../src/Editor.cpp ../src/EditModel.cpp ../src/EditView.cpp ../src/ExternalLexer.cpp ../src/Indicator.cpp ../src/KeyMap.cpp ../src/LineMarker.cpp ../src/MarginView.cpp ../src/PerLine.cpp ../src/PositionCache.cpp ../src/RESearch.cpp ../src/RunStyles.cpp ../src/ScintillaBase.cpp ../src/Selection.cpp ../src/Style.cpp ../src/UniConversion.cpp ../src/ViewStyle.cpp ../src/XPM.cpp ) set(QSCINTILLA_HDR ./Qsci/qsciglobal.h ./Qsci/qscicommand.h ./Qsci/qscicommandset.h ./Qsci/qscidocument.h ./Qsci/qsciprinter.h ./Qsci/qscistyle.h ./Qsci/qscistyledtext.h ListBoxQt.h SciNamespace.h ../include/ILexer.h ../include/Platform.h ../include/SciLexer.h ../include/Scintilla.h ../include/ScintillaWidget.h ../include/Sci_Position.h ../lexlib/Accessor.h ../lexlib/CharacterCategory.h ../lexlib/CharacterSet.h ../lexlib/LexAccessor.h ../lexlib/LexerBase.h ../lexlib/LexerModule.h ../lexlib/LexerNoExceptions.h ../lexlib/LexerSimple.h ../lexlib/OptionSet.h ../lexlib/PropSetSimple.h ../lexlib/StyleContext.h ../lexlib/SubStyles.h ../lexlib/WordList.h ../src/AutoComplete.h ../src/CallTip.h ../src/CaseConvert.h ../src/CaseFolder.h ../src/Catalogue.h ../src/CellBuffer.h ../src/CharClassify.h ../src/ContractionState.h ../src/Decoration.h ../src/Document.h ../src/Editor.h ../src/ExternalLexer.h ../src/FontQuality.h ../src/Indicator.h ../src/KeyMap.h ../src/LineMarker.h ../src/Partitioning.h ../src/PerLine.h ../src/PositionCache.h ../src/RESearch.h ../src/RunStyles.h ../src/ScintillaBase.h ../src/Selection.h ../src/SplitVector.h ../src/Style.h ../src/UnicodeFromUTF8.h ../src/UniConversion.h ../src/ViewStyle.h ../src/XPM.h ../src/Position.h ../src/SparseVector.h ) set(QSCINTILLA_MOC_HDR ./Qsci/qsciscintilla.h ./Qsci/qsciscintillabase.h ./Qsci/qsciabstractapis.h ./Qsci/qsciapis.h ./Qsci/qscilexer.h ./Qsci/qscilexercustom.h ./Qsci/qscilexersql.h ./Qsci/qscilexerjson.h ./Qsci/qscilexerhtml.h ./Qsci/qscilexerxml.h ./Qsci/qscilexerjavascript.h ./Qsci/qscilexercpp.h ./Qsci/qscilexerpython.h ./Qsci/qscimacro.h SciClasses.h ScintillaQt.h ) QT5_WRAP_CPP(QSCINTILLA_WRAP_MOC_HDR ${QSCINTILLA_MOC_HDR}) include_directories(. ../include ../lexlib ../src) add_library(qscintilla2 ${QSCINTILLA_SRC} ${QSCINTILLA_HDR} ${QSCINTILLA_MOC_HDR} ${QSCINTILLA_MOC} ${QSCINTILLA_WRAP_MOC_HDR}) target_link_libraries(qscintilla2 Qt5::Widgets Qt5::PrintSupport) if (APPLE) target_link_libraries(qscintilla2 Qt5::MacExtras) endif() sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/InputMethod.cpp000066400000000000000000000235511345112435200236130ustar00rootroot00000000000000// Copyright (c) 2017 Riverbank Computing Limited // Copyright (c) 2011 Archaeopteryx Software, Inc. // Copyright (c) 1990-2011, Scientific Toolworks, Inc. // // The License.txt file describes the conditions under which this software may // be distributed. #include #include #include #include #include #include #include #include #include #include "SciNamespace.h" #include "Qsci/qsciscintillabase.h" #include "ScintillaQt.h" #define INDIC_INPUTMETHOD 24 #define MAXLENINPUTIME 200 #define SC_INDICATOR_INPUT INDIC_IME #define SC_INDICATOR_TARGET INDIC_IME+1 #define SC_INDICATOR_CONVERTED INDIC_IME+2 #define SC_INDICATOR_UNKNOWN INDIC_IME_MAX static bool IsHangul(const QChar qchar) { int unicode = (int)qchar.unicode(); // Korean character ranges used for preedit chars. // http://www.programminginkorean.com/programming/hangul-in-unicode/ const bool HangulJamo = (0x1100 <= unicode && unicode <= 0x11FF); const bool HangulCompatibleJamo = (0x3130 <= unicode && unicode <= 0x318F); const bool HangulJamoExtendedA = (0xA960 <= unicode && unicode <= 0xA97F); const bool HangulJamoExtendedB = (0xD7B0 <= unicode && unicode <= 0xD7FF); const bool HangulSyllable = (0xAC00 <= unicode && unicode <= 0xD7A3); return HangulJamo || HangulCompatibleJamo || HangulSyllable || HangulJamoExtendedA || HangulJamoExtendedB; } static void MoveImeCarets(QsciScintillaQt *sqt, int offset) { // Move carets relatively by bytes for (size_t r=0; r < sqt->sel.Count(); r++) { int positionInsert = sqt->sel.Range(r).Start().Position(); sqt->sel.Range(r).caret.SetPosition(positionInsert + offset); sqt->sel.Range(r).anchor.SetPosition(positionInsert + offset); } } static void DrawImeIndicator(QsciScintillaQt *sqt, int indicator, int len) { // Emulate the visual style of IME characters with indicators. // Draw an indicator on the character before caret by the character bytes of len // so it should be called after AddCharUTF(). // It does not affect caret positions. if (indicator < 8 || indicator > INDIC_MAX) { return; } sqt->pdoc->decorations.SetCurrentIndicator(indicator); for (size_t r=0; r< sqt-> sel.Count(); r++) { int positionInsert = sqt->sel.Range(r).Start().Position(); sqt->pdoc->DecorationFillRange(positionInsert - len, 1, len); } } static int GetImeCaretPos(QInputMethodEvent *event) { foreach (QInputMethodEvent::Attribute attr, event->attributes()) { if (attr.type == QInputMethodEvent::Cursor) return attr.start; } return 0; } static std::vector MapImeIndicators(QInputMethodEvent *event) { std::vector imeIndicator(event->preeditString().size(), SC_INDICATOR_UNKNOWN); foreach (QInputMethodEvent::Attribute attr, event->attributes()) { if (attr.type == QInputMethodEvent::TextFormat) { QTextFormat format = attr.value.value(); QTextCharFormat charFormat = format.toCharFormat(); int indicator = SC_INDICATOR_UNKNOWN; switch (charFormat.underlineStyle()) { case QTextCharFormat::NoUnderline: // win32, linux indicator = SC_INDICATOR_TARGET; break; case QTextCharFormat::SingleUnderline: // osx case QTextCharFormat::DashUnderline: // win32, linux indicator = SC_INDICATOR_INPUT; break; case QTextCharFormat::DotLine: case QTextCharFormat::DashDotLine: case QTextCharFormat::WaveUnderline: case QTextCharFormat::SpellCheckUnderline: indicator = SC_INDICATOR_CONVERTED; break; default: indicator = SC_INDICATOR_UNKNOWN; } if (format.hasProperty(QTextFormat::BackgroundBrush)) // win32, linux indicator = SC_INDICATOR_TARGET; #ifdef Q_OS_OSX if (charFormat.underlineStyle() == QTextCharFormat::SingleUnderline) { QColor uc = charFormat.underlineColor(); if (uc.lightness() < 2) { // osx indicator = SC_INDICATOR_TARGET; } } #endif for (int i = attr.start; i < attr.start+attr.length; i++) { imeIndicator[i] = indicator; } } } return imeIndicator; } void QsciScintillaBase::inputMethodEvent(QInputMethodEvent *event) { // Copy & paste by johnsonj with a lot of helps of Neil // Great thanks for my forerunners, jiniya and BLUEnLIVE if (sci->pdoc->IsReadOnly() || sci->SelectionContainsProtected()) { // Here, a canceling and/or completing composition function is needed. return; } if (sci->pdoc->TentativeActive()) { sci->pdoc->TentativeUndo(); } else { // No tentative undo means start of this composition so // Fill in any virtual spaces. sci->ClearBeforeTentativeStart(); } sci->view.imeCaretBlockOverride = false; if (!event->commitString().isEmpty()) { const QString commitStr = event->commitString(); const unsigned int commitStrLen = commitStr.length(); for (unsigned int i = 0; i < commitStrLen;) { const unsigned int ucWidth = commitStr.at(i).isHighSurrogate() ? 2 : 1; const QString oneCharUTF16 = commitStr.mid(i, ucWidth); const QByteArray oneChar = textAsBytes(oneCharUTF16); const int oneCharLen = oneChar.length(); sci->AddCharUTF(oneChar.data(), oneCharLen); i += ucWidth; } } else if (!event->preeditString().isEmpty()) { const QString preeditStr = event->preeditString(); const unsigned int preeditStrLen = preeditStr.length(); if ((preeditStrLen == 0) || (preeditStrLen > MAXLENINPUTIME)) { sci->ShowCaretAtCurrentPosition(); return; } sci->pdoc->TentativeStart(); // TentativeActive() from now on. std::vector imeIndicator = MapImeIndicators(event); const bool recording = sci->recordingMacro; sci->recordingMacro = false; for (unsigned int i = 0; i < preeditStrLen;) { const unsigned int ucWidth = preeditStr.at(i).isHighSurrogate() ? 2 : 1; const QString oneCharUTF16 = preeditStr.mid(i, ucWidth); const QByteArray oneChar = textAsBytes(oneCharUTF16); const int oneCharLen = oneChar.length(); sci->AddCharUTF(oneChar.data(), oneCharLen); DrawImeIndicator(sci, imeIndicator[i], oneCharLen); i += ucWidth; } sci->recordingMacro = recording; // Move IME carets. int imeCaretPos = GetImeCaretPos(event); int imeEndToImeCaretU16 = imeCaretPos - preeditStrLen; int imeCaretPosDoc = sci->pdoc->GetRelativePositionUTF16(sci->CurrentPosition(), imeEndToImeCaretU16); MoveImeCarets(sci, - sci->CurrentPosition() + imeCaretPosDoc); if (IsHangul(preeditStr.at(0))) { #ifndef Q_OS_WIN if (imeCaretPos > 0) { int oneCharBefore = sci->pdoc->GetRelativePosition(sci->CurrentPosition(), -1); MoveImeCarets(sci, - sci->CurrentPosition() + oneCharBefore); } #endif sci->view.imeCaretBlockOverride = true; } // Set candidate box position for Qt::ImMicroFocus. preeditPos = sci->CurrentPosition(); sci->EnsureCaretVisible(); updateMicroFocus(); } sci->ShowCaretAtCurrentPosition(); } QVariant QsciScintillaBase::inputMethodQuery(Qt::InputMethodQuery query) const { int pos = SendScintilla(SCI_GETCURRENTPOS); int line = SendScintilla(SCI_LINEFROMPOSITION, pos); switch (query) { #if QT_VERSION >= 0x050000 case Qt::ImHints: return QWidget::inputMethodQuery(query); #endif case Qt::ImMicroFocus: { int startPos = (preeditPos >= 0) ? preeditPos : pos; QSCI_SCI_NAMESPACE(Point) pt = sci->LocationFromPosition(startPos); int width = SendScintilla(SCI_GETCARETWIDTH); int height = SendScintilla(SCI_TEXTHEIGHT, line); return QRect(pt.x, pt.y, width, height); } case Qt::ImFont: { char fontName[64]; int style = SendScintilla(SCI_GETSTYLEAT, pos); int len = SendScintilla(SCI_STYLEGETFONT, style, (sptr_t)fontName); int size = SendScintilla(SCI_STYLEGETSIZE, style); bool italic = SendScintilla(SCI_STYLEGETITALIC, style); int weight = SendScintilla(SCI_STYLEGETBOLD, style) ? QFont::Bold : -1; return QFont(QString::fromUtf8(fontName, len), size, weight, italic); } case Qt::ImCursorPosition: { int paraStart = sci->pdoc->ParaUp(pos); return pos - paraStart; } case Qt::ImSurroundingText: { int paraStart = sci->pdoc->ParaUp(pos); int paraEnd = sci->pdoc->ParaDown(pos); QVarLengthArray buffer(paraEnd - paraStart + 1); Sci_CharacterRange charRange; charRange.cpMin = paraStart; charRange.cpMax = paraEnd; Sci_TextRange textRange; textRange.chrg = charRange; textRange.lpstrText = buffer.data(); SendScintilla(SCI_GETTEXTRANGE, 0, (sptr_t)&textRange); return bytesAsText(buffer.constData()); } case Qt::ImCurrentSelection: { QVarLengthArray buffer(SendScintilla(SCI_GETSELTEXT)); SendScintilla(SCI_GETSELTEXT, 0, (sptr_t)buffer.data()); return bytesAsText(buffer.constData()); } default: return QVariant(); } } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/ListBoxQt.cpp000066400000000000000000000145551345112435200232500ustar00rootroot00000000000000// This module implements the specialisation of QListBox that handles the // Scintilla double-click callback. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "ListBoxQt.h" #include #include "SciClasses.h" #include "Qsci/qsciscintilla.h" QsciListBoxQt::QsciListBoxQt() : cb_action(0), cb_data(0), slb(0), visible_rows(5), utf8(false) { } void QsciListBoxQt::SetFont(QSCI_SCI_NAMESPACE(Font) &font) { QFont *f = reinterpret_cast(font.GetID()); if (f) slb->setFont(*f); } void QsciListBoxQt::Create(QSCI_SCI_NAMESPACE(Window) &parent, int, QSCI_SCI_NAMESPACE(Point), int, bool unicodeMode, int) { utf8 = unicodeMode; // The parent we want is the QsciScintillaBase, not the text area. wid = slb = new QsciSciListBox(reinterpret_cast(parent.GetID())->parentWidget(), this); } void QsciListBoxQt::SetAverageCharWidth(int) { // We rely on sizeHint() for the size of the list box rather than make // calculations based on the average character width and the number of // visible rows. } void QsciListBoxQt::SetVisibleRows(int vrows) { // We only pretend to implement this. visible_rows = vrows; } int QsciListBoxQt::GetVisibleRows() const { return visible_rows; } QSCI_SCI_NAMESPACE(PRectangle) QsciListBoxQt::GetDesiredRect() { QSCI_SCI_NAMESPACE(PRectangle) rc(0, 0, 100, 100); if (slb) { QSize sh = slb->sizeHint(); rc.right = sh.width(); rc.bottom = sh.height(); } return rc; } int QsciListBoxQt::CaretFromEdge() { int dist = 0; // Find the width of the biggest image. for (xpmMap::const_iterator it = xset.begin(); it != xset.end(); ++it) { int w = it.value().width(); if (dist < w) dist = w; } if (slb) dist += slb->frameWidth(); // Fudge factor - adjust if required. dist += 3; return dist; } void QsciListBoxQt::Clear() { Q_ASSERT(slb); slb->clear(); } void QsciListBoxQt::Append(char *s, int type) { Q_ASSERT(slb); QString qs; if (utf8) qs = QString::fromUtf8(s); else qs = QString::fromLatin1(s); xpmMap::const_iterator it; if (type < 0 || (it = xset.find(type)) == xset.end()) slb->addItem(qs); else slb->addItemPixmap(it.value(), qs); } int QsciListBoxQt::Length() { Q_ASSERT(slb); return slb->count(); } void QsciListBoxQt::Select(int n) { Q_ASSERT(slb); slb->setCurrentRow(n); } int QsciListBoxQt::GetSelection() { Q_ASSERT(slb); return slb->currentRow(); } int QsciListBoxQt::Find(const char *prefix) { Q_ASSERT(slb); return slb->find(prefix); } void QsciListBoxQt::GetValue(int n, char *value, int len) { Q_ASSERT(slb); QString selection = slb->text(n); bool trim_selection = false; QObject *sci_obj = slb->parent(); if (sci_obj->inherits("QsciScintilla")) { QsciScintilla *sci = static_cast(sci_obj); if (sci->isAutoCompletionList()) { // Save the full selection and trim the value we return. sci->acSelection = selection; trim_selection = true; } } if (selection.isEmpty() || len <= 0) value[0] = '\0'; else { const char *s; int slen; QByteArray bytes; if (utf8) bytes = selection.toUtf8(); else bytes = selection.toLatin1(); s = bytes.data(); slen = bytes.length(); while (slen-- && len--) { if (trim_selection && *s == ' ') break; *value++ = *s++; } *value = '\0'; } } void QsciListBoxQt::Sort() { Q_ASSERT(slb); slb->sortItems(); } void QsciListBoxQt::RegisterImage(int type, const char *xpm_data) { xset.insert(type, *reinterpret_cast(xpm_data)); } void QsciListBoxQt::RegisterRGBAImage(int type, int, int, const unsigned char *pixelsImage) { QPixmap pm; #if QT_VERSION >= 0x040700 pm.convertFromImage(*reinterpret_cast(pixelsImage)); #else pm = QPixmap::fromImage(*reinterpret_cast(pixelsImage)); #endif xset.insert(type, pm); } void QsciListBoxQt::ClearRegisteredImages() { xset.clear(); } void QsciListBoxQt::SetDoubleClickAction( QSCI_SCI_NAMESPACE(CallBackAction) action, void *data) { cb_action = action; cb_data = data; } void QsciListBoxQt::SetList(const char *list, char separator, char typesep) { char *words; Clear(); if ((words = qstrdup(list)) != NULL) { char *startword = words; char *numword = NULL; for (int i = 0; words[i] != '\0'; i++) { if (words[i] == separator) { words[i] = '\0'; if (numword) *numword = '\0'; Append(startword, numword ? atoi(numword + 1) : -1); startword = words + i + 1; numword = NULL; } else if (words[i] == typesep) { numword = words + i; } } if (startword) { if (numword) *numword = '\0'; Append(startword, numword ? atoi(numword + 1) : -1); } delete[] words; } } // The ListBox methods that need to be implemented explicitly. QSCI_SCI_NAMESPACE(ListBox)::ListBox() { } QSCI_SCI_NAMESPACE(ListBox)::~ListBox() { } QSCI_SCI_NAMESPACE(ListBox) *QSCI_SCI_NAMESPACE(ListBox)::Allocate() { return new QsciListBoxQt(); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/ListBoxQt.h000066400000000000000000000051761345112435200227140ustar00rootroot00000000000000// This defines the specialisation of QListBox that handles the Scintilla // double-click callback. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include #include #include #include "SciNamespace.h" #include "Platform.h" class QsciSciListBox; // This is an internal class but it is referenced by a public class so it has // to have a Qsci prefix rather than being put in the Scintilla namespace // which would mean exposing the SCI_NAMESPACE mechanism). class QsciListBoxQt : public QSCI_SCI_NAMESPACE(ListBox) { public: QsciListBoxQt(); QSCI_SCI_NAMESPACE(CallBackAction) cb_action; void *cb_data; virtual void SetFont(QSCI_SCI_NAMESPACE(Font) &font); virtual void Create(QSCI_SCI_NAMESPACE(Window) &parent, int, QSCI_SCI_NAMESPACE(Point), int, bool unicodeMode, int); virtual void SetAverageCharWidth(int); virtual void SetVisibleRows(int); virtual int GetVisibleRows() const; virtual QSCI_SCI_NAMESPACE(PRectangle) GetDesiredRect(); virtual int CaretFromEdge(); virtual void Clear(); virtual void Append(char *s, int type = -1); virtual int Length(); virtual void Select(int n); virtual int GetSelection(); virtual int Find(const char *prefix); virtual void GetValue(int n, char *value, int len); virtual void Sort(); virtual void RegisterImage(int type, const char *xpm_data); virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage); virtual void ClearRegisteredImages(); virtual void SetDoubleClickAction( QSCI_SCI_NAMESPACE(CallBackAction) action, void *data); virtual void SetList(const char *list, char separator, char typesep); private: QsciSciListBox *slb; int visible_rows; bool utf8; typedef QMap xpmMap; xpmMap xset; }; sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/MacPasteboardMime.cpp000066400000000000000000000055721345112435200246730ustar00rootroot00000000000000// This module implements part of the support for rectangular selections on // OS/X. It is a separate file to avoid clashes between OS/X and Scintilla // data types. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include #if (QT_VERSION >= 0x040200 && QT_VERSION < 0x050000 && defined(Q_OS_MAC)) || (QT_VERSION >= 0x050200 && defined(Q_OS_OSX)) #include #include #include #include #include #include #include static const QLatin1String mimeRectangular("text/x-qscintilla-rectangular"); static const QLatin1String utiRectangularMac("com.scintilla.utf16-plain-text.rectangular"); class RectangularPasteboardMime : public QMacPasteboardMime { public: RectangularPasteboardMime() : QMacPasteboardMime(MIME_ALL) { } bool canConvert(const QString &mime, QString flav) { return mime == mimeRectangular && flav == utiRectangularMac; } QList convertFromMime(const QString &, QVariant data, QString) { QList converted; converted.append(data.toByteArray()); return converted; } QVariant convertToMime(const QString &, QList data, QString) { QByteArray converted; foreach (QByteArray i, data) { converted += i; } return QVariant(converted); } QString convertorName() { return QString("QScintillaRectangular"); } QString flavorFor(const QString &mime) { if (mime == mimeRectangular) return QString(utiRectangularMac); return QString(); } QString mimeFor(QString flav) { if (flav == utiRectangularMac) return QString(mimeRectangular); return QString(); } }; // Initialise the singleton instance. void initialiseRectangularPasteboardMime() { static RectangularPasteboardMime *instance = 0; if (!instance) { instance = new RectangularPasteboardMime(); qRegisterDraggedTypes(QStringList(utiRectangularMac)); } } #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/PlatQt.cpp000066400000000000000000000606101345112435200225550ustar00rootroot00000000000000// This module implements the portability layer for the Qt port of Scintilla. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "SciNamespace.h" #include "Platform.h" #include "XPM.h" #include "Qsci/qsciscintillabase.h" #include "SciClasses.h" #include "FontQuality.h" QSCI_BEGIN_SCI_NAMESPACE // Type convertors. static QFont *PFont(FontID fid) { return reinterpret_cast(fid); } static QWidget *PWindow(WindowID wid) { return reinterpret_cast(wid); } static QsciSciPopup *PMenu(MenuID mid) { return reinterpret_cast(mid); } // Create a Point instance from a long value. Point Point::FromLong(long lpoint) { return Point(Platform::LowShortFromLong(lpoint), Platform::HighShortFromLong(lpoint)); } // Font management. Font::Font() : fid(0) { } Font::~Font() { } void Font::Create(const FontParameters &fp) { Release(); QFont *f = new QFont(); QFont::StyleStrategy strategy; switch (fp.extraFontFlag & SC_EFF_QUALITY_MASK) { case SC_EFF_QUALITY_NON_ANTIALIASED: strategy = QFont::NoAntialias; break; case SC_EFF_QUALITY_ANTIALIASED: strategy = QFont::PreferAntialias; break; default: strategy = QFont::PreferDefault; } #if defined(Q_OS_MAC) #if QT_VERSION >= 0x040700 strategy = static_cast(strategy | QFont::ForceIntegerMetrics); #else #warning "Correct handling of QFont metrics requires Qt v4.7.0 or later" #endif #endif f->setStyleStrategy(strategy); // If name of the font begins with a '-', assume, that it is an XLFD. if (fp.faceName[0] == '-') { f->setRawName(fp.faceName); } else { f->setFamily(fp.faceName); f->setPointSizeF(fp.size); // See if the Qt weight has been passed via the back door. Otherwise // map Scintilla weights to Qt weights ensuring that the SC_WEIGHT_* // values get mapped to the correct QFont::Weight values. int qt_weight; if (fp.weight < 0) qt_weight = -fp.weight; else if (fp.weight <= 200) qt_weight = QFont::Light; else if (fp.weight <= QsciScintillaBase::SC_WEIGHT_NORMAL) qt_weight = QFont::Normal; else if (fp.weight <= 600) qt_weight = QFont::DemiBold; else if (fp.weight <= 850) qt_weight = QFont::Bold; else qt_weight = QFont::Black; f->setWeight(qt_weight); f->setItalic(fp.italic); } fid = f; } void Font::Release() { if (fid) { delete PFont(fid); fid = 0; } } // A surface abstracts a place to draw. class SurfaceImpl : public Surface { public: SurfaceImpl(); virtual ~SurfaceImpl(); void Init(WindowID wid); void Init(SurfaceID sid, WindowID); void Init(QPainter *p); void InitPixMap(int width, int height, Surface *, WindowID wid); void Release(); bool Initialised() {return painter;} void PenColour(ColourDesired fore); int LogPixelsY() {return pd->logicalDpiY();} int DeviceHeightFont(int points) {return points;} void MoveTo(int x_,int y_); void LineTo(int x_,int y_); void Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back); void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back); void FillRectangle(PRectangle rc, ColourDesired back); void FillRectangle(PRectangle rc, Surface &surfacePattern); void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back); void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill, ColourDesired outline, int alphaOutline, int flags); void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage); void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back); void Copy(PRectangle rc, Point from, Surface &surfaceSource); void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back); void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back); void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore); void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions); XYPOSITION WidthText(Font &font_, const char *s, int len); XYPOSITION WidthChar(Font &font_, char ch); XYPOSITION Ascent(Font &font_); XYPOSITION Descent(Font &font_); XYPOSITION InternalLeading(Font &font_) {return 0;} XYPOSITION ExternalLeading(Font &font_); XYPOSITION Height(Font &font_); XYPOSITION AverageCharWidth(Font &font_); void SetClip(PRectangle rc); void FlushCachedState(); void SetUnicodeMode(bool unicodeMode_) {unicodeMode = unicodeMode_;} void SetDBCSMode(int codePage) {} void DrawXPM(PRectangle rc, const XPM *xpm); private: void drawRect(const PRectangle &rc); void drawText(const PRectangle &rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore); static QFont convertQFont(Font &font); QFontMetricsF metrics(Font &font_); QString convertText(const char *s, int len); static QColor convertQColor(const ColourDesired &col, unsigned alpha = 255); bool unicodeMode; QPaintDevice *pd; QPainter *painter; bool my_resources; int pen_x, pen_y; }; Surface *Surface::Allocate(int) { return new SurfaceImpl; } SurfaceImpl::SurfaceImpl() : unicodeMode(false), pd(0), painter(0), my_resources(false), pen_x(0), pen_y(0) { } SurfaceImpl::~SurfaceImpl() { Release(); } void SurfaceImpl::Init(WindowID wid) { Release(); pd = reinterpret_cast(wid); } void SurfaceImpl::Init(SurfaceID sid, WindowID) { Release(); // This method, and the SurfaceID type, is only used when printing. As it // is actually a void * we pass (when using SCI_FORMATRANGE) a pointer to a // QPainter rather than a pointer to a SurfaceImpl as might be expected. QPainter *p = reinterpret_cast(sid); pd = p->device(); painter = p; } void SurfaceImpl::Init(QPainter *p) { Release(); pd = p->device(); painter = p; } void SurfaceImpl::InitPixMap(int width, int height, Surface *, WindowID wid) { Release(); #if QT_VERSION >= 0x050100 int dpr = PWindow(wid)->devicePixelRatio(); QPixmap *pixmap = new QPixmap(width * dpr, height * dpr); pixmap->setDevicePixelRatio(dpr); #else QPixmap *pixmap = new QPixmap(width, height); Q_UNUSED(wid); #endif pd = pixmap; painter = new QPainter(pd); my_resources = true; } void SurfaceImpl::Release() { if (my_resources) { if (painter) delete painter; if (pd) delete pd; my_resources = false; } painter = 0; pd = 0; } void SurfaceImpl::MoveTo(int x_, int y_) { Q_ASSERT(painter); pen_x = x_; pen_y = y_; } void SurfaceImpl::LineTo(int x_, int y_) { Q_ASSERT(painter); painter->drawLine(pen_x, pen_y, x_, y_); pen_x = x_; pen_y = y_; } void SurfaceImpl::PenColour(ColourDesired fore) { Q_ASSERT(painter); painter->setPen(convertQColor(fore)); } void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) { Q_ASSERT(painter); QPolygonF qpts(npts); for (int i = 0; i < npts; ++i) qpts[i] = QPointF(pts[i].x, pts[i].y); painter->setPen(convertQColor(fore)); painter->setBrush(convertQColor(back)); painter->drawPolygon(qpts); } void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) { Q_ASSERT(painter); painter->setPen(convertQColor(fore)); painter->setBrush(convertQColor(back)); drawRect(rc); } void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) { Q_ASSERT(painter); painter->setPen(Qt::NoPen); painter->setBrush(convertQColor(back)); drawRect(rc); } void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) { Q_ASSERT(painter); SurfaceImpl &si = static_cast(surfacePattern); QPixmap *pm = static_cast(si.pd); if (pm) { QBrush brsh(Qt::black, *pm); painter->setPen(Qt::NoPen); painter->setBrush(brsh); drawRect(rc); } else { FillRectangle(rc, ColourDesired(0)); } } void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back) { Q_ASSERT(painter); painter->setPen(convertQColor(fore)); painter->setBrush(convertQColor(back)); painter->drawRoundRect( QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top)); } void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill, ColourDesired outline, int alphaOutline, int) { Q_ASSERT(painter); QColor outline_colour = convertQColor(outline, alphaOutline); QColor fill_colour = convertQColor(fill, alphaFill); // There was a report of Qt seeming to ignore the alpha value of the pen so // so we disable the pen if the outline and fill colours are the same. if (outline_colour == fill_colour) painter->setPen(Qt::NoPen); else painter->setPen(outline_colour); painter->setBrush(fill_colour); const int radius = (cornerSize ? 25 : 0); painter->drawRoundRect( QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top), radius, radius); } void SurfaceImpl::drawRect(const PRectangle &rc) { painter->drawRect( QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top)); } void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) { Q_ASSERT(painter); painter->setPen(convertQColor(fore)); painter->setBrush(convertQColor(back)); painter->drawEllipse( QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top)); } void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) { Q_ASSERT(painter); SurfaceImpl &si = static_cast(surfaceSource); if (si.pd) { QPixmap *pm = static_cast(si.pd); qreal x = from.x; qreal y = from.y; qreal width = rc.right - rc.left; qreal height = rc.bottom - rc.top; #if QT_VERSION >= 0x050100 qreal dpr = pm->devicePixelRatio(); x *= dpr; y *= dpr; width *= dpr; height *= dpr; #endif painter->drawPixmap(QPointF(rc.left, rc.top), *pm, QRectF(x, y, width, height)); } } void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back) { Q_ASSERT(painter); FillRectangle(rc, back); drawText(rc, font_, ybase, s, len, fore); } void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back) { Q_ASSERT(painter); SetClip(rc); DrawTextNoClip(rc, font_, ybase, s, len, fore, back); painter->setClipping(false); } void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore) { // Only draw if there is a non-space. for (int i = 0; i < len; ++i) if (s[i] != ' ') { drawText(rc, font_, ybase, s, len, fore); return; } } void SurfaceImpl::drawText(const PRectangle &rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore) { QString qs = convertText(s, len); QFont *f = PFont(font_.GetID()); if (f) painter->setFont(*f); painter->setPen(convertQColor(fore)); painter->drawText(QPointF(rc.left, ybase), qs); } void SurfaceImpl::DrawXPM(PRectangle rc, const XPM *xpm) { Q_ASSERT(painter); XYPOSITION x, y; const QPixmap &qpm = xpm->Pixmap(); x = rc.left + (rc.Width() - qpm.width()) / 2.0; y = rc.top + (rc.Height() - qpm.height()) / 2.0; painter->drawPixmap(QPointF(x, y), qpm); } void SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) { Q_ASSERT(painter); const QImage *qim = reinterpret_cast(pixelsImage); painter->drawImage(QPointF(rc.left, rc.top), *qim); } void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions) { QString qs = convertText(s, len); QTextLayout text_layout(qs, convertQFont(font_), pd); text_layout.beginLayout(); QTextLine text_line = text_layout.createLine(); text_layout.endLayout(); if (unicodeMode) { int i_char = 0, i_byte = 0;; while (i_char < qs.size()) { unsigned char byte = s[i_byte]; int nbytes, code_units; // Work out character sizes by looking at the byte stream. if (byte >= 0xf0) { nbytes = 4; code_units = 2; } else { if (byte >= 0xe0) nbytes = 3; else if (byte >= 0x80) nbytes = 2; else nbytes = 1; code_units = 1; } XYPOSITION position = text_line.cursorToX(i_char + code_units); // Set the same position for each byte of the character. for (int i = 0; i < nbytes && i_byte < len; ++i) positions[i_byte++] = position; i_char += code_units; } // This shouldn't be necessary... XYPOSITION last_position = ((i_byte > 0) ? positions[i_byte - 1] : 0); while (i_byte < len) positions[i_byte++] = last_position; } else { for (int i = 0; i < len; ++i) positions[i] = text_line.cursorToX(i + 1); } } XYPOSITION SurfaceImpl::WidthText(Font &font_, const char *s, int len) { return metrics(font_).width(convertText(s, len)); } XYPOSITION SurfaceImpl::WidthChar(Font &font_, char ch) { return metrics(font_).width(ch); } XYPOSITION SurfaceImpl::Ascent(Font &font_) { return metrics(font_).ascent(); } XYPOSITION SurfaceImpl::Descent(Font &font_) { // Qt doesn't include the baseline in the descent, so add it. Note that // a descent from Qt4 always seems to be 2 pixels larger (irrespective of // font or size) than the same descent from Qt3. This means that text is a // little more spaced out with Qt4 - and will be more noticeable with // smaller fonts. return metrics(font_).descent() + 1; } XYPOSITION SurfaceImpl::ExternalLeading(Font &font_) { // Scintilla doesn't use this at the moment, which is good because Qt4 can // return a negative value. return metrics(font_).leading(); } XYPOSITION SurfaceImpl::Height(Font &font_) { return metrics(font_).height(); } XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) { #if QT_VERSION >= 0x040200 return metrics(font_).averageCharWidth(); #else return WidthChar(font_, 'n'); #endif } void SurfaceImpl::SetClip(PRectangle rc) { Q_ASSERT(painter); painter->setClipRect( QRectF(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top)); } void SurfaceImpl::FlushCachedState() { } // Return the QFont for a Font. QFont SurfaceImpl::convertQFont(Font &font) { QFont *f = PFont(font.GetID()); if (f) return *f; return QApplication::font(); } // Get the metrics for a font. QFontMetricsF SurfaceImpl::metrics(Font &font_) { QFont fnt = convertQFont(font_); return QFontMetricsF(fnt, pd); } // Convert a Scintilla string to a Qt Unicode string. QString SurfaceImpl::convertText(const char *s, int len) { if (unicodeMode) return QString::fromUtf8(s, len); return QString::fromLatin1(s, len); } // Convert a Scintilla colour, and alpha component, to a Qt QColor. QColor SurfaceImpl::convertQColor(const ColourDesired &col, unsigned alpha) { long c = col.AsLong(); unsigned r = c & 0xff; unsigned g = (c >> 8) & 0xff; unsigned b = (c >> 16) & 0xff; return QColor(r, g, b, alpha); } // Window (widget) management. Window::~Window() { } void Window::Destroy() { QWidget *w = PWindow(wid); if (w) { // Delete the widget next time round the event loop rather than // straight away. This gets round a problem when auto-completion lists // are cancelled after an entry has been double-clicked, ie. the list's // dtor is called from one of the list's slots. There are other ways // around the problem but this is the simplest and doesn't seem to // cause problems of its own. w->deleteLater(); wid = 0; } } bool Window::HasFocus() { return PWindow(wid)->hasFocus(); } PRectangle Window::GetPosition() { QWidget *w = PWindow(wid); // Before any size allocated pretend its big enough not to be scrolled. PRectangle rc(0,0,5000,5000); if (w) { const QRect &r = w->geometry(); rc.right = r.right() - r.left() + 1; rc.bottom = r.bottom() - r.top() + 1; } return rc; } void Window::SetPosition(PRectangle rc) { PWindow(wid)->setGeometry(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); } void Window::SetPositionRelative(PRectangle rc, Window relativeTo) { QWidget *rel = PWindow(relativeTo.wid); QPoint pos = rel->mapToGlobal(rel->pos()); int x = pos.x() + rc.left; int y = pos.y() + rc.top; PWindow(wid)->setGeometry(x, y, rc.right - rc.left, rc.bottom - rc.top); } PRectangle Window::GetClientPosition() { return GetPosition(); } void Window::Show(bool show) { QWidget *w = PWindow(wid); if (show) w->show(); else w->hide(); } void Window::InvalidateAll() { QWidget *w = PWindow(wid); if (w) w->update(); } void Window::InvalidateRectangle(PRectangle rc) { QWidget *w = PWindow(wid); if (w) w->update(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); } void Window::SetFont(Font &font) { PWindow(wid)->setFont(*PFont(font.GetID())); } void Window::SetCursor(Cursor curs) { Qt::CursorShape qc; switch (curs) { case cursorText: qc = Qt::IBeamCursor; break; case cursorUp: qc = Qt::UpArrowCursor; break; case cursorWait: qc = Qt::WaitCursor; break; case cursorHoriz: qc = Qt::SizeHorCursor; break; case cursorVert: qc = Qt::SizeVerCursor; break; case cursorHand: qc = Qt::PointingHandCursor; break; default: // Note that Qt doesn't have a standard cursor that could be used to // implement cursorReverseArrow. qc = Qt::ArrowCursor; } PWindow(wid)->setCursor(qc); } void Window::SetTitle(const char *s) { PWindow(wid)->setWindowTitle(s); } PRectangle Window::GetMonitorRect(Point pt) { QPoint qpt = PWindow(wid)->mapToGlobal(QPoint(pt.x, pt.y)); QRect qr = QApplication::desktop()->availableGeometry(qpt); qpt = PWindow(wid)->mapFromGlobal(qr.topLeft()); return PRectangle(qpt.x(), qpt.y(), qpt.x() + qr.width(), qpt.y() + qr.height()); } // Menu management. Menu::Menu() : mid(0) { } void Menu::CreatePopUp() { Destroy(); mid = new QsciSciPopup(); } void Menu::Destroy() { QsciSciPopup *m = PMenu(mid); if (m) { delete m; mid = 0; } } void Menu::Show(Point pt, Window &) { PMenu(mid)->popup(QPoint(pt.x, pt.y)); } class DynamicLibraryImpl : public DynamicLibrary { public: DynamicLibraryImpl(const char *modulePath) { m = new QLibrary(modulePath); m->load(); } virtual ~DynamicLibraryImpl() { if (m) delete m; } virtual Function FindFunction(const char *name) { if (m) return (Function)m->resolve(name); return 0; } virtual bool IsValid() { return m && m->isLoaded(); } private: QLibrary* m; }; DynamicLibrary *DynamicLibrary::Load(const char *modulePath) { return new DynamicLibraryImpl(modulePath); } // Elapsed time. This implementation assumes that the maximum elapsed time is // less than 48 hours. ElapsedTime::ElapsedTime() { QTime now = QTime::currentTime(); bigBit = now.hour() * 60 * 60 + now.minute() * 60 + now.second(); littleBit = now.msec(); } double ElapsedTime::Duration(bool reset) { long endBigBit, endLittleBit; QTime now = QTime::currentTime(); endBigBit = now.hour() * 60 * 60 + now.minute() * 60 + now.second(); endLittleBit = now.msec(); double duration = endBigBit - bigBit; if (duration < 0 || (duration == 0 && endLittleBit < littleBit)) duration += 24 * 60 * 60; duration += (endLittleBit - littleBit) / 1000.0; if (reset) { bigBit = endBigBit; littleBit = endLittleBit; } return duration; } // Manage system wide parameters. ColourDesired Platform::Chrome() { return ColourDesired(0xe0,0xe0,0xe0); } ColourDesired Platform::ChromeHighlight() { return ColourDesired(0xff,0xff,0xff); } const char *Platform::DefaultFont() { static QByteArray def_font; def_font = QApplication::font().family().toLatin1(); return def_font.constData(); } int Platform::DefaultFontSize() { return QApplication::font().pointSize(); } unsigned int Platform::DoubleClickTime() { return QApplication::doubleClickInterval(); } bool Platform::MouseButtonBounce() { return true; } void Platform::DebugDisplay(const char *s) { qDebug("%s", s); } bool Platform::IsKeyDown(int) { return false; } long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) { // This is never called. return 0; } long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam) { // This is never called. return 0; } bool Platform::IsDBCSLeadByte(int, char) { // We don't support DBCS. return false; } int Platform::DBCSCharLength(int, const char *) { // We don't support DBCS. return 1; } int Platform::DBCSCharMaxLength() { // We don't support DBCS. return 2; } int Platform::Minimum(int a, int b) { return (a < b) ? a : b; } int Platform::Maximum(int a, int b) { return (a > b) ? a : b; } int Platform::Clamp(int val, int minVal, int maxVal) { if (val > maxVal) val = maxVal; if (val < minVal) val = minVal; return val; } //#define TRACE #ifdef TRACE void Platform::DebugPrintf(const char *format, ...) { char buffer[2000]; va_list pArguments; va_start(pArguments, format); vsprintf(buffer, format, pArguments); va_end(pArguments); DebugDisplay(buffer); } #else void Platform::DebugPrintf(const char *, ...) { } #endif static bool assertionPopUps = true; bool Platform::ShowAssertionPopUps(bool assertionPopUps_) { bool ret = assertionPopUps; assertionPopUps = assertionPopUps_; return ret; } void Platform::Assert(const char *c, const char *file, int line) { qFatal("Assertion [%s] failed at %s %d\n", c, file, line); } QSCI_END_SCI_NAMESPACE sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/000077500000000000000000000000001345112435200215405ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qsciabstractapis.h000066400000000000000000000070531345112435200252560ustar00rootroot00000000000000// This module defines interface to the QsciAbstractAPIs class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCIABSTRACTAPIS_H #define QSCIABSTRACTAPIS_H #include #include #include #include #include class QsciLexer; //! \brief The QsciAbstractAPIs class represents the interface to the textual //! API information used in call tips and for auto-completion. A sub-class //! will provide the actual implementation of the interface. //! //! API information is specific to a particular language lexer but can be //! shared by multiple instances of the lexer. class QSCINTILLA_EXPORT QsciAbstractAPIs : public QObject { Q_OBJECT public: //! Constructs a QsciAbstractAPIs instance attached to lexer \a lexer. \a //! lexer becomes the instance's parent object although the instance can //! also be subsequently attached to other lexers. QsciAbstractAPIs(QsciLexer *lexer); //! Destroy the QsciAbstractAPIs instance. virtual ~QsciAbstractAPIs(); //! Return the lexer that the instance is attached to. QsciLexer *lexer() const; //! Update the list \a list with API entries derived from \a context. \a //! context is the list of words in the text preceding the cursor position. //! The characters that make up a word and the characters that separate //! words are defined by the lexer. The last word is a partial word and //! may be empty if the user has just entered a word separator. virtual void updateAutoCompletionList(const QStringList &context, QStringList &list) = 0; //! This is called when the user selects the entry \a selection from the //! auto-completion list. A sub-class can use this as a hint to provide //! more specific API entries in future calls to //! updateAutoCompletionList(). The default implementation does nothing. virtual void autoCompletionSelected(const QString &selection); //! Return the call tips valid for the context \a context. (Note that the //! last word of the context will always be empty.) \a commas is the number //! of commas the user has typed after the context and before the cursor //! position. The exact position of the list of call tips can be adjusted //! by specifying a corresponding left character shift in \a shifts. This //! is normally done to correct for any displayed context according to \a //! style. //! //! \sa updateAutoCompletionList() virtual QStringList callTips(const QStringList &context, int commas, QsciScintilla::CallTipsStyle style, QList &shifts) = 0; private: QsciLexer *lex; QsciAbstractAPIs(const QsciAbstractAPIs &); QsciAbstractAPIs &operator=(const QsciAbstractAPIs &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qsciapis.h000066400000000000000000000201561345112435200235310ustar00rootroot00000000000000// This module defines interface to the QsciAPIs class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCIAPIS_H #define QSCIAPIS_H #include #include #include #include #include #include #include class QsciAPIsPrepared; class QsciAPIsWorker; class QsciLexer; //! \brief The QsciAPIs class provies an implementation of the textual API //! information used in call tips and for auto-completion. //! //! Raw API information is read from one or more files. Each API function is //! described by a single line of text comprising the function's name, followed //! by the function's optional comma separated parameters enclosed in //! parenthesis, and finally followed by optional explanatory text. //! //! A function name may be followed by a `?' and a number. The number is used //! by auto-completion to display a registered QPixmap with the function name. //! //! All function names are used by auto-completion, but only those that include //! function parameters are used in call tips. //! //! QScintilla only deals with prepared API information and not the raw //! information described above. This is done so that large APIs can be //! handled while still being responsive to user input. The conversion of raw //! information to prepared information is time consuming (think tens of //! seconds) and implemented in a separate thread. Prepared information can //! be quickly saved to and loaded from files. Such files are portable between //! different architectures. //! //! QScintilla based applications that want to support large APIs would //! normally provide the user with the ability to specify a set of, possibly //! project specific, raw API files and convert them to prepared files that are //! loaded quickly when the application is invoked. class QSCINTILLA_EXPORT QsciAPIs : public QsciAbstractAPIs { Q_OBJECT public: //! Constructs a QsciAPIs instance attached to lexer \a lexer. \a lexer //! becomes the instance's parent object although the instance can also be //! subsequently attached to other lexers. QsciAPIs(QsciLexer *lexer); //! Destroy the QsciAPIs instance. virtual ~QsciAPIs(); //! Add the single raw API entry \a entry to the current set. //! //! \sa clear(), load(), remove() void add(const QString &entry); //! Deletes all raw API information. //! //! \sa add(), load(), remove() void clear(); //! Load the API information from the file named \a filename, adding it to //! the current set. Returns true if successful, otherwise false. bool load(const QString &filename); //! Remove the single raw API entry \a entry from the current set. //! //! \sa add(), clear(), load() void remove(const QString &entry); //! Convert the current raw API information to prepared API information. //! This is implemented by a separate thread. //! //! \sa cancelPreparation() void prepare(); //! Cancel the conversion of the current raw API information to prepared //! API information. //! //! \sa prepare() void cancelPreparation(); //! Return the default name of the prepared API information file. It is //! based on the name of the associated lexer and in the directory defined //! by the QSCIDIR environment variable. If the environment variable isn't //! set then $HOME/.qsci is used. QString defaultPreparedName() const; //! Check to see is a prepared API information file named \a filename //! exists. If \a filename is empty then the value returned by //! defaultPreparedName() is used. Returns true if successful, otherwise //! false. //! //! \sa defaultPreparedName() bool isPrepared(const QString &filename = QString()) const; //! Load the prepared API information from the file named \a filename. If //! \a filename is empty then a name is constructed based on the name of //! the associated lexer and saved in the directory defined by the QSCIDIR //! environment variable. If the environment variable isn't set then //! $HOME/.qsci is used. Returns true if successful, otherwise false. bool loadPrepared(const QString &filename = QString()); //! Save the prepared API information to the file named \a filename. If //! \a filename is empty then a name is constructed based on the name of //! the associated lexer and saved in the directory defined by the QSCIDIR //! environment variable. If the environment variable isn't set then //! $HOME/.qsci is used. Returns true if successful, otherwise false. bool savePrepared(const QString &filename = QString()) const; //! \reimp virtual void updateAutoCompletionList(const QStringList &context, QStringList &list); //! \reimp virtual void autoCompletionSelected(const QString &sel); //! \reimp virtual QStringList callTips(const QStringList &context, int commas, QsciScintilla::CallTipsStyle style, QList &shifts); //! \internal Reimplemented to receive termination events from the worker //! thread. virtual bool event(QEvent *e); //! Return a list of the installed raw API file names for the associated //! lexer. QStringList installedAPIFiles() const; signals: //! This signal is emitted when the conversion of raw API information to //! prepared API information has been cancelled. //! //! \sa apiPreparationFinished(), apiPreparationStarted() void apiPreparationCancelled(); //! This signal is emitted when the conversion of raw API information to //! prepared API information starts and can be used to give some visual //! feedback to the user. //! //! \sa apiPreparationCancelled(), apiPreparationFinished() void apiPreparationStarted(); //! This signal is emitted when the conversion of raw API information to //! prepared API information has finished. //! //! \sa apiPreparationCancelled(), apiPreparationStarted() void apiPreparationFinished(); private: friend class QsciAPIsPrepared; friend class QsciAPIsWorker; // This indexes a word in a set of raw APIs. The first part indexes the // entry in the set, the second part indexes the word within the entry. typedef QPair WordIndex; // This is a list of word indexes. typedef QList WordIndexList; QsciAPIsWorker *worker; QStringList old_context; QStringList::const_iterator origin; int origin_len; QString unambiguous_context; QStringList apis; QsciAPIsPrepared *prep; static bool enoughCommas(const QString &s, int commas); QStringList positionOrigin(const QStringList &context, QString &path); bool originStartsWith(const QString &path, const QString &wsep); const WordIndexList *wordIndexOf(const QString &word) const; void lastCompleteWord(const QString &word, QStringList &with_context, bool &unambig); void lastPartialWord(const QString &word, QStringList &with_context, bool &unambig); void addAPIEntries(const WordIndexList &wl, bool complete, QStringList &with_context, bool &unambig); QString prepName(const QString &filename, bool mkpath = false) const; void deleteWorker(); QsciAPIs(const QsciAPIs &); QsciAPIs &operator=(const QsciAPIs &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscicommand.h000066400000000000000000000346771345112435200242300ustar00rootroot00000000000000// This defines the interface to the QsciCommand class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCICOMMAND_H #define QSCICOMMAND_H #include #include #include class QsciScintilla; //! \brief The QsciCommand class represents an internal editor command that may //! have one or two keys bound to it. //! //! Methods are provided to change the keys bound to the command and to remove //! a key binding. Each command has a user friendly description of the command //! for use in key mapping dialogs. class QSCINTILLA_EXPORT QsciCommand { public: //! This enum defines the different commands that can be assigned to a key. enum Command { //! Move down one line. LineDown = QsciScintillaBase::SCI_LINEDOWN, //! Extend the selection down one line. LineDownExtend = QsciScintillaBase::SCI_LINEDOWNEXTEND, //! Extend the rectangular selection down one line. LineDownRectExtend = QsciScintillaBase::SCI_LINEDOWNRECTEXTEND, //! Scroll the view down one line. LineScrollDown = QsciScintillaBase::SCI_LINESCROLLDOWN, //! Move up one line. LineUp = QsciScintillaBase::SCI_LINEUP, //! Extend the selection up one line. LineUpExtend = QsciScintillaBase::SCI_LINEUPEXTEND, //! Extend the rectangular selection up one line. LineUpRectExtend = QsciScintillaBase::SCI_LINEUPRECTEXTEND, //! Scroll the view up one line. LineScrollUp = QsciScintillaBase::SCI_LINESCROLLUP, //! Scroll to the start of the document. ScrollToStart = QsciScintillaBase::SCI_SCROLLTOSTART, //! Scroll to the end of the document. ScrollToEnd = QsciScintillaBase::SCI_SCROLLTOEND, //! Scroll vertically to centre the current line. VerticalCentreCaret = QsciScintillaBase::SCI_VERTICALCENTRECARET, //! Move down one paragraph. ParaDown = QsciScintillaBase::SCI_PARADOWN, //! Extend the selection down one paragraph. ParaDownExtend = QsciScintillaBase::SCI_PARADOWNEXTEND, //! Move up one paragraph. ParaUp = QsciScintillaBase::SCI_PARAUP, //! Extend the selection up one paragraph. ParaUpExtend = QsciScintillaBase::SCI_PARAUPEXTEND, //! Move left one character. CharLeft = QsciScintillaBase::SCI_CHARLEFT, //! Extend the selection left one character. CharLeftExtend = QsciScintillaBase::SCI_CHARLEFTEXTEND, //! Extend the rectangular selection left one character. CharLeftRectExtend = QsciScintillaBase::SCI_CHARLEFTRECTEXTEND, //! Move right one character. CharRight = QsciScintillaBase::SCI_CHARRIGHT, //! Extend the selection right one character. CharRightExtend = QsciScintillaBase::SCI_CHARRIGHTEXTEND, //! Extend the rectangular selection right one character. CharRightRectExtend = QsciScintillaBase::SCI_CHARRIGHTRECTEXTEND, //! Move left one word. WordLeft = QsciScintillaBase::SCI_WORDLEFT, //! Extend the selection left one word. WordLeftExtend = QsciScintillaBase::SCI_WORDLEFTEXTEND, //! Move right one word. WordRight = QsciScintillaBase::SCI_WORDRIGHT, //! Extend the selection right one word. WordRightExtend = QsciScintillaBase::SCI_WORDRIGHTEXTEND, //! Move to the end of the previous word. WordLeftEnd = QsciScintillaBase::SCI_WORDLEFTEND, //! Extend the selection to the end of the previous word. WordLeftEndExtend = QsciScintillaBase::SCI_WORDLEFTENDEXTEND, //! Move to the end of the next word. WordRightEnd = QsciScintillaBase::SCI_WORDRIGHTEND, //! Extend the selection to the end of the next word. WordRightEndExtend = QsciScintillaBase::SCI_WORDRIGHTENDEXTEND, //! Move left one word part. WordPartLeft = QsciScintillaBase::SCI_WORDPARTLEFT, //! Extend the selection left one word part. WordPartLeftExtend = QsciScintillaBase::SCI_WORDPARTLEFTEXTEND, //! Move right one word part. WordPartRight = QsciScintillaBase::SCI_WORDPARTRIGHT, //! Extend the selection right one word part. WordPartRightExtend = QsciScintillaBase::SCI_WORDPARTRIGHTEXTEND, //! Move to the start of the document line. Home = QsciScintillaBase::SCI_HOME, //! Extend the selection to the start of the document line. HomeExtend = QsciScintillaBase::SCI_HOMEEXTEND, //! Extend the rectangular selection to the start of the document line. HomeRectExtend = QsciScintillaBase::SCI_HOMERECTEXTEND, //! Move to the start of the displayed line. HomeDisplay = QsciScintillaBase::SCI_HOMEDISPLAY, //! Extend the selection to the start of the displayed line. HomeDisplayExtend = QsciScintillaBase::SCI_HOMEDISPLAYEXTEND, //! Move to the start of the displayed or document line. HomeWrap = QsciScintillaBase::SCI_HOMEWRAP, //! Extend the selection to the start of the displayed or document //! line. HomeWrapExtend = QsciScintillaBase::SCI_HOMEWRAPEXTEND, //! Move to the first visible character in the document line. VCHome = QsciScintillaBase::SCI_VCHOME, //! Extend the selection to the first visible character in the document //! line. VCHomeExtend = QsciScintillaBase::SCI_VCHOMEEXTEND, //! Extend the rectangular selection to the first visible character in //! the document line. VCHomeRectExtend = QsciScintillaBase::SCI_VCHOMERECTEXTEND, //! Move to the first visible character of the displayed or document //! line. VCHomeWrap = QsciScintillaBase::SCI_VCHOMEWRAP, //! Extend the selection to the first visible character of the //! displayed or document line. VCHomeWrapExtend = QsciScintillaBase::SCI_VCHOMEWRAPEXTEND, //! Move to the end of the document line. LineEnd = QsciScintillaBase::SCI_LINEEND, //! Extend the selection to the end of the document line. LineEndExtend = QsciScintillaBase::SCI_LINEENDEXTEND, //! Extend the rectangular selection to the end of the document line. LineEndRectExtend = QsciScintillaBase::SCI_LINEENDRECTEXTEND, //! Move to the end of the displayed line. LineEndDisplay = QsciScintillaBase::SCI_LINEENDDISPLAY, //! Extend the selection to the end of the displayed line. LineEndDisplayExtend = QsciScintillaBase::SCI_LINEENDDISPLAYEXTEND, //! Move to the end of the displayed or document line. LineEndWrap = QsciScintillaBase::SCI_LINEENDWRAP, //! Extend the selection to the end of the displayed or document line. LineEndWrapExtend = QsciScintillaBase::SCI_LINEENDWRAPEXTEND, //! Move to the start of the document. DocumentStart = QsciScintillaBase::SCI_DOCUMENTSTART, //! Extend the selection to the start of the document. DocumentStartExtend = QsciScintillaBase::SCI_DOCUMENTSTARTEXTEND, //! Move to the end of the document. DocumentEnd = QsciScintillaBase::SCI_DOCUMENTEND, //! Extend the selection to the end of the document. DocumentEndExtend = QsciScintillaBase::SCI_DOCUMENTENDEXTEND, //! Move up one page. PageUp = QsciScintillaBase::SCI_PAGEUP, //! Extend the selection up one page. PageUpExtend = QsciScintillaBase::SCI_PAGEUPEXTEND, //! Extend the rectangular selection up one page. PageUpRectExtend = QsciScintillaBase::SCI_PAGEUPRECTEXTEND, //! Move down one page. PageDown = QsciScintillaBase::SCI_PAGEDOWN, //! Extend the selection down one page. PageDownExtend = QsciScintillaBase::SCI_PAGEDOWNEXTEND, //! Extend the rectangular selection down one page. PageDownRectExtend = QsciScintillaBase::SCI_PAGEDOWNRECTEXTEND, //! Stuttered move up one page. StutteredPageUp = QsciScintillaBase::SCI_STUTTEREDPAGEUP, //! Stuttered extend the selection up one page. StutteredPageUpExtend = QsciScintillaBase::SCI_STUTTEREDPAGEUPEXTEND, //! Stuttered move down one page. StutteredPageDown = QsciScintillaBase::SCI_STUTTEREDPAGEDOWN, //! Stuttered extend the selection down one page. StutteredPageDownExtend = QsciScintillaBase::SCI_STUTTEREDPAGEDOWNEXTEND, //! Delete the current character. Delete = QsciScintillaBase::SCI_CLEAR, //! Delete the previous character. DeleteBack = QsciScintillaBase::SCI_DELETEBACK, //! Delete the previous character if not at start of line. DeleteBackNotLine = QsciScintillaBase::SCI_DELETEBACKNOTLINE, //! Delete the word to the left. DeleteWordLeft = QsciScintillaBase::SCI_DELWORDLEFT, //! Delete the word to the right. DeleteWordRight = QsciScintillaBase::SCI_DELWORDRIGHT, //! Delete right to the end of the next word. DeleteWordRightEnd = QsciScintillaBase::SCI_DELWORDRIGHTEND, //! Delete the line to the left. DeleteLineLeft = QsciScintillaBase::SCI_DELLINELEFT, //! Delete the line to the right. DeleteLineRight = QsciScintillaBase::SCI_DELLINERIGHT, //! Delete the current line. LineDelete = QsciScintillaBase::SCI_LINEDELETE, //! Cut the current line to the clipboard. LineCut = QsciScintillaBase::SCI_LINECUT, //! Copy the current line to the clipboard. LineCopy = QsciScintillaBase::SCI_LINECOPY, //! Transpose the current and previous lines. LineTranspose = QsciScintillaBase::SCI_LINETRANSPOSE, //! Duplicate the current line. LineDuplicate = QsciScintillaBase::SCI_LINEDUPLICATE, //! Select the whole document. SelectAll = QsciScintillaBase::SCI_SELECTALL, //! Move the selected lines up one line. MoveSelectedLinesUp = QsciScintillaBase::SCI_MOVESELECTEDLINESUP, //! Move the selected lines down one line. MoveSelectedLinesDown = QsciScintillaBase::SCI_MOVESELECTEDLINESDOWN, //! Duplicate the selection. SelectionDuplicate = QsciScintillaBase::SCI_SELECTIONDUPLICATE, //! Convert the selection to lower case. SelectionLowerCase = QsciScintillaBase::SCI_LOWERCASE, //! Convert the selection to upper case. SelectionUpperCase = QsciScintillaBase::SCI_UPPERCASE, //! Cut the selection to the clipboard. SelectionCut = QsciScintillaBase::SCI_CUT, //! Copy the selection to the clipboard. SelectionCopy = QsciScintillaBase::SCI_COPY, //! Paste from the clipboard. Paste = QsciScintillaBase::SCI_PASTE, //! Toggle insert/overtype. EditToggleOvertype = QsciScintillaBase::SCI_EDITTOGGLEOVERTYPE, //! Insert a platform dependent newline. Newline = QsciScintillaBase::SCI_NEWLINE, //! Insert a formfeed. Formfeed = QsciScintillaBase::SCI_FORMFEED, //! Indent one level. Tab = QsciScintillaBase::SCI_TAB, //! De-indent one level. Backtab = QsciScintillaBase::SCI_BACKTAB, //! Cancel any current operation. Cancel = QsciScintillaBase::SCI_CANCEL, //! Undo the last command. Undo = QsciScintillaBase::SCI_UNDO, //! Redo the last command. Redo = QsciScintillaBase::SCI_REDO, //! Zoom in. ZoomIn = QsciScintillaBase::SCI_ZOOMIN, //! Zoom out. ZoomOut = QsciScintillaBase::SCI_ZOOMOUT, }; //! Return the command that will be executed by this instance. Command command() const {return scicmd;} //! Execute the command. void execute(); //! Binds the key \a key to the command. If \a key is 0 then the key //! binding is removed. If \a key is invalid then the key binding is //! unchanged. Valid keys are any visible or control character or any //! of \c Qt::Key_Down, \c Qt::Key_Up, \c Qt::Key_Left, \c Qt::Key_Right, //! \c Qt::Key_Home, \c Qt::Key_End, \c Qt::Key_PageUp, //! \c Qt::Key_PageDown, \c Qt::Key_Delete, \c Qt::Key_Insert, //! \c Qt::Key_Escape, \c Qt::Key_Backspace, \c Qt::Key_Tab, //! \c Qt::Key_Backtab, \c Qt::Key_Return, \c Qt::Key_Enter, //! \c Qt::Key_Super_L, \c Qt::Key_Super_R or \c Qt::Key_Menu. Keys may be //! modified with any combination of \c Qt::ShiftModifier, //! \c Qt::ControlModifier, \c Qt::AltModifier and \c Qt::MetaModifier. //! //! \sa key(), setAlternateKey(), validKey() void setKey(int key); //! Binds the alternate key \a altkey to the command. If \a key is 0 //! then the alternate key binding is removed. //! //! \sa alternateKey(), setKey(), validKey() void setAlternateKey(int altkey); //! The key that is currently bound to the command is returned. //! //! \sa setKey(), alternateKey() int key() const {return qkey;} //! The alternate key that is currently bound to the command is //! returned. //! //! \sa setAlternateKey(), key() int alternateKey() const {return qaltkey;} //! If the key \a key is valid then true is returned. static bool validKey(int key); //! The user friendly description of the command is returned. QString description() const; private: friend class QsciCommandSet; QsciCommand(QsciScintilla *qs, Command cmd, int key, int altkey, const char *desc); void bindKey(int key,int &qk,int &scik); QsciScintilla *qsCmd; Command scicmd; int qkey, scikey, qaltkey, scialtkey; const char *descCmd; QsciCommand(const QsciCommand &); QsciCommand &operator=(const QsciCommand &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscicommandset.h000066400000000000000000000053731345112435200247330ustar00rootroot00000000000000// This defines the interface to the QsciCommandSet class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCICOMMANDSET_H #define QSCICOMMANDSET_H #include #include #include #include QT_BEGIN_NAMESPACE class QSettings; QT_END_NAMESPACE class QsciScintilla; //! \brief The QsciCommandSet class represents the set of all internal editor //! commands that may have keys bound. //! //! Methods are provided to access the individual commands and to read and //! write the current bindings from and to settings files. class QSCINTILLA_EXPORT QsciCommandSet { public: //! The key bindings for each command in the set are read from the //! settings \a qs. \a prefix is prepended to the key of each entry. //! true is returned if there was no error. //! //! \sa writeSettings() bool readSettings(QSettings &qs, const char *prefix = "/Scintilla"); //! The key bindings for each command in the set are written to the //! settings \a qs. \a prefix is prepended to the key of each entry. //! true is returned if there was no error. //! //! \sa readSettings() bool writeSettings(QSettings &qs, const char *prefix = "/Scintilla"); //! The commands in the set are returned as a list. QList &commands() {return cmds;} //! The primary keys bindings for all commands are removed. void clearKeys(); //! The alternate keys bindings for all commands are removed. void clearAlternateKeys(); // Find the command that is bound to \a key. QsciCommand *boundTo(int key) const; // Find a specific command \a command. QsciCommand *find(QsciCommand::Command command) const; private: friend class QsciScintilla; QsciCommandSet(QsciScintilla *qs); ~QsciCommandSet(); QsciScintilla *qsci; QList cmds; QsciCommandSet(const QsciCommandSet &); QsciCommandSet &operator=(const QsciCommandSet &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscidocument.h000066400000000000000000000035551345112435200244170ustar00rootroot00000000000000// This defines the interface to the QsciDocument class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCIDOCUMENT_H #define QSCIDOCUMENT_H #include class QsciScintillaBase; class QsciDocumentP; //! \brief The QsciDocument class represents a document to be edited. //! //! It is an opaque class that can be attached to multiple instances of //! QsciScintilla to create different simultaneous views of the same document. //! QsciDocument uses implicit sharing so that copying class instances is a //! cheap operation. class QSCINTILLA_EXPORT QsciDocument { public: //! Create a new unattached document. QsciDocument(); virtual ~QsciDocument(); QsciDocument(const QsciDocument &); QsciDocument &operator=(const QsciDocument &); private: friend class QsciScintilla; void attach(const QsciDocument &that); void detach(); void display(QsciScintillaBase *qsb, const QsciDocument *from); void undisplay(QsciScintillaBase *qsb); bool isModified() const; void setModified(bool m); QsciDocumentP *pdoc; }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qsciglobal.h000066400000000000000000000030761345112435200240370ustar00rootroot00000000000000// This module defines various things common to all of the Scintilla Qt port. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCIGLOBAL_H #define QSCIGLOBAL_H #include #define QSCINTILLA_VERSION 0x020a00 #define QSCINTILLA_VERSION_STR "2.10" // Define QSCINTILLA_MAKE_DLL to create a QScintilla shared library, or // define QSCINTILLA_DLL to link against a QScintilla shared library, or define // neither to either build or link against a static QScintilla library. #if defined(QSCINTILLA_DLL) #define QSCINTILLA_EXPORT Q_DECL_IMPORT #elif defined(QSCINTILLA_MAKE_DLL) #define QSCINTILLA_EXPORT Q_DECL_EXPORT #else #define QSCINTILLA_EXPORT #endif #if !defined(QT_BEGIN_NAMESPACE) #define QT_BEGIN_NAMESPACE #define QT_END_NAMESPACE #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscilexer.h000066400000000000000000000312541345112435200237150ustar00rootroot00000000000000// This defines the interface to the QsciLexer class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCILEXER_H #define QSCILEXER_H #include #include #include #include #include #include QT_BEGIN_NAMESPACE class QSettings; QT_END_NAMESPACE class QsciAbstractAPIs; class QsciScintilla; //! \brief The QsciLexer class is an abstract class used as a base for language //! lexers. //! //! A lexer scans the text breaking it up into separate language objects, e.g. //! keywords, strings, operators. The lexer then uses a different style to //! draw each object. A style is identified by a style number and has a number //! of attributes, including colour and font. A specific language lexer will //! implement appropriate default styles which can be overriden by an //! application by further sub-classing the specific language lexer. //! //! A lexer may provide one or more sets of words to be recognised as keywords. //! Most lexers only provide one set, but some may support languages embedded //! in other languages and provide several sets. //! //! QsciLexer provides convenience methods for saving and restoring user //! preferences for fonts and colours. //! //! If you want to write a lexer for a new language then you can add it to the //! underlying Scintilla code and implement a corresponding QsciLexer sub-class //! to manage the different styles used. Alternatively you can implement a //! sub-class of QsciLexerCustom. class QSCINTILLA_EXPORT QsciLexer : public QObject { Q_OBJECT public: //! Construct a QsciLexer with parent \a parent. \a parent is typically //! the QsciScintilla instance. QsciLexer(QObject *parent = 0); //! Destroy the QSciLexer. virtual ~QsciLexer(); //! Returns the name of the language. It must be re-implemented by a //! sub-class. virtual const char *language() const = 0; //! Returns the name of the lexer. If 0 is returned then the lexer's //! numeric identifier is used. The default implementation returns 0. //! //! \sa lexerId() virtual const char *lexer() const; //! Returns the identifier (i.e. a QsciScintillaBase::SCLEX_* value) of the //! lexer. This is only used if lexer() returns 0. The default //! implementation returns QsciScintillaBase::SCLEX_CONTAINER. //! //! \sa lexer() virtual int lexerId() const; //! Returns the current API set or 0 if there isn't one. //! //! \sa setAPIs() QsciAbstractAPIs *apis() const; //! Returns the characters that can fill up auto-completion. virtual const char *autoCompletionFillups() const; //! Returns the list of character sequences that can separate //! auto-completion words. The first in the list is assumed to be the //! sequence used to separate words in the lexer's API files. virtual QStringList autoCompletionWordSeparators() const; //! Returns the auto-indentation style. The default is 0 if the //! language is block structured, or QsciScintilla::AiMaintain if not. //! //! \sa setAutoIndentStyle(), QsciScintilla::AiMaintain, //! QsciScintilla::AiOpening, QsciScintilla::AiClosing int autoIndentStyle(); //! Returns a space separated list of words or characters in a particular //! style that define the end of a block for auto-indentation. The style //! is returned via \a style. virtual const char *blockEnd(int *style = 0) const; //! Returns the number of lines prior to the current one when determining //! the scope of a block when auto-indenting. virtual int blockLookback() const; //! Returns a space separated list of words or characters in a particular //! style that define the start of a block for auto-indentation. The style //! is returned via \a style. virtual const char *blockStart(int *style = 0) const; //! Returns a space separated list of keywords in a particular style that //! define the start of a block for auto-indentation. The style is //! returned via \a style. virtual const char *blockStartKeyword(int *style = 0) const; //! Returns the style used for braces for brace matching. virtual int braceStyle() const; //! Returns true if the language is case sensitive. The default is true. virtual bool caseSensitive() const; //! Returns the foreground colour of the text for style number \a style. //! The default colour is that returned by defaultColor(). //! //! \sa defaultColor(), paper() virtual QColor color(int style) const; //! Returns the end-of-line for style number \a style. The default is //! false. virtual bool eolFill(int style) const; //! Returns the font for style number \a style. The default font is //! that returned by defaultFont(). //! //! \sa defaultFont() virtual QFont font(int style) const; //! Returns the view used for indentation guides. virtual int indentationGuideView() const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. 0 is returned if there //! is no such set. virtual const char *keywords(int set) const; //! Returns the number of the style used for whitespace. The default //! implementation returns 0 which is the convention adopted by most //! lexers. virtual int defaultStyle() const; //! Returns the descriptive name for style number \a style. For a valid //! style number for this language a non-empty QString must be returned. //! If the style number is invalid then an empty QString must be returned. //! This is intended to be used in user preference dialogs. virtual QString description(int style) const = 0; //! Returns the background colour of the text for style number //! \a style. //! //! \sa defaultPaper(), color() virtual QColor paper(int style) const; //! Returns the default text colour. //! //! \sa setDefaultColor() QColor defaultColor() const; //! Returns the default text colour for style number \a style. virtual QColor defaultColor(int style) const; //! Returns the default end-of-line for style number \a style. The default //! is false. virtual bool defaultEolFill(int style) const; //! Returns the default font. //! //! \sa setDefaultFont() QFont defaultFont() const; //! Returns the default font for style number \a style. virtual QFont defaultFont(int style) const; //! Returns the default paper colour. //! //! \sa setDefaultPaper() QColor defaultPaper() const; //! Returns the default paper colour for style number \a style. virtual QColor defaultPaper(int style) const; //! Returns the QsciScintilla instance that the lexer is currently attached //! to or 0 if it is unattached. QsciScintilla *editor() const {return attached_editor;} //! The current set of APIs is set to \a apis. If \a apis is 0 then any //! existing APIs for this lexer are removed. //! //! \sa apis() void setAPIs(QsciAbstractAPIs *apis); //! The default text colour is set to \a c. //! //! \sa defaultColor(), color() void setDefaultColor(const QColor &c); //! The default font is set to \a f. //! //! \sa defaultFont(), font() void setDefaultFont(const QFont &f); //! The default paper colour is set to \a c. //! //! \sa defaultPaper(), paper() void setDefaultPaper(const QColor &c); //! \internal Set the QsciScintilla instance that the lexer is attached to. virtual void setEditor(QsciScintilla *editor); //! The colour, paper, font and end-of-line for each style number, and //! all lexer specific properties are read from the settings \a qs. //! \a prefix is prepended to the key of each entry. true is returned //! if there was no error. //! //! \sa writeSettings(), QsciScintilla::setLexer() bool readSettings(QSettings &qs,const char *prefix = "/Scintilla"); //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. virtual void refreshProperties(); //! Returns the number of style bits needed by the lexer. Normally this //! should only be re-implemented by custom lexers. virtual int styleBitsNeeded() const; //! Returns the string of characters that comprise a word. The default is //! 0 which implies the upper and lower case alphabetic characters and //! underscore. virtual const char *wordCharacters() const; //! The colour, paper, font and end-of-line for each style number, and //! all lexer specific properties are written to the settings \a qs. //! \a prefix is prepended to the key of each entry. true is returned //! if there was no error. //! //! \sa readSettings() bool writeSettings(QSettings &qs, const char *prefix = "/Scintilla") const; public slots: //! The auto-indentation style is set to \a autoindentstyle. //! //! \sa autoIndentStyle(), QsciScintilla::AiMaintain, //! QsciScintilla::AiOpening, QsciScintilla::AiClosing virtual void setAutoIndentStyle(int autoindentstyle); //! The foreground colour for style number \a style is set to \a c. If //! \a style is -1 then the colour is set for all styles. virtual void setColor(const QColor &c,int style = -1); //! The end-of-line fill for style number \a style is set to //! \a eoffill. If \a style is -1 then the fill is set for all styles. virtual void setEolFill(bool eoffill,int style = -1); //! The font for style number \a style is set to \a f. If \a style is //! -1 then the font is set for all styles. virtual void setFont(const QFont &f,int style = -1); //! The background colour for style number \a style is set to \a c. If //! \a style is -1 then the colour is set for all styles. virtual void setPaper(const QColor &c,int style = -1); signals: //! This signal is emitted when the foreground colour of style number //! \a style has changed. The new colour is \a c. void colorChanged(const QColor &c,int style); //! This signal is emitted when the end-of-file fill of style number //! \a style has changed. The new fill is \a eolfilled. void eolFillChanged(bool eolfilled,int style); //! This signal is emitted when the font of style number \a style has //! changed. The new font is \a f. void fontChanged(const QFont &f,int style); //! This signal is emitted when the background colour of style number //! \a style has changed. The new colour is \a c. void paperChanged(const QColor &c,int style); //! This signal is emitted when the value of the lexer property \a prop //! needs to be changed. The new value is \a val. void propertyChanged(const char *prop, const char *val); protected: //! The lexer's properties are read from the settings \a qs. \a prefix //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. true is returned if there is no error. //! virtual bool readProperties(QSettings &qs,const QString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. true is returned if there is no error. //! virtual bool writeProperties(QSettings &qs,const QString &prefix) const; private: struct StyleData { QFont font; QColor color; QColor paper; bool eol_fill; }; struct StyleDataMap { bool style_data_set; QMap style_data; }; StyleDataMap *style_map; int autoIndStyle; QFont defFont; QColor defColor; QColor defPaper; QsciAbstractAPIs *apiSet; QsciScintilla *attached_editor; void setStyleDefaults() const; StyleData &styleData(int style) const; QsciLexer(const QsciLexer &); QsciLexer &operator=(const QsciLexer &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscilexercpp.h000066400000000000000000000321631345112435200244200ustar00rootroot00000000000000// This defines the interface to the QsciLexerCPP class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCILEXERCPP_H #define QSCILEXERCPP_H #include #include #include //! \brief The QsciLexerCPP class encapsulates the Scintilla C++ //! lexer. class QSCINTILLA_EXPORT QsciLexerCPP : public QsciLexer { Q_OBJECT public: //! This enum defines the meanings of the different styles used by the //! C++ lexer. enum { //! The default. Default = 0, InactiveDefault = Default + 64, //! A C comment. Comment = 1, InactiveComment = Comment + 64, //! A C++ comment line. CommentLine = 2, InactiveCommentLine = CommentLine + 64, //! A JavaDoc/Doxygen style C comment. CommentDoc = 3, InactiveCommentDoc = CommentDoc + 64, //! A number. Number = 4, InactiveNumber = Number + 64, //! A keyword. Keyword = 5, InactiveKeyword = Keyword + 64, //! A double-quoted string. DoubleQuotedString = 6, InactiveDoubleQuotedString = DoubleQuotedString + 64, //! A single-quoted string. SingleQuotedString = 7, InactiveSingleQuotedString = SingleQuotedString + 64, //! An IDL UUID. UUID = 8, InactiveUUID = UUID + 64, //! A pre-processor block. PreProcessor = 9, InactivePreProcessor = PreProcessor + 64, //! An operator. Operator = 10, InactiveOperator = Operator + 64, //! An identifier Identifier = 11, InactiveIdentifier = Identifier + 64, //! The end of a line where a string is not closed. UnclosedString = 12, InactiveUnclosedString = UnclosedString + 64, //! A C# verbatim string. VerbatimString = 13, InactiveVerbatimString = VerbatimString + 64, //! A JavaScript regular expression. Regex = 14, InactiveRegex = Regex + 64, //! A JavaDoc/Doxygen style C++ comment line. CommentLineDoc = 15, InactiveCommentLineDoc = CommentLineDoc + 64, //! A keyword defined in keyword set number 2. The class must be //! sub-classed and re-implement keywords() to make use of this style. KeywordSet2 = 16, InactiveKeywordSet2 = KeywordSet2 + 64, //! A JavaDoc/Doxygen keyword. CommentDocKeyword = 17, InactiveCommentDocKeyword = CommentDocKeyword + 64, //! A JavaDoc/Doxygen keyword error. CommentDocKeywordError = 18, InactiveCommentDocKeywordError = CommentDocKeywordError + 64, //! A global class or typedef defined in keyword set number 5. The //! class must be sub-classed and re-implement keywords() to make use //! of this style. GlobalClass = 19, InactiveGlobalClass = GlobalClass + 64, //! A C++ raw string. RawString = 20, InactiveRawString = RawString + 64, //! A Vala triple-quoted verbatim string. TripleQuotedVerbatimString = 21, InactiveTripleQuotedVerbatimString = TripleQuotedVerbatimString + 64, //! A Pike hash-quoted string. HashQuotedString = 22, InactiveHashQuotedString = HashQuotedString + 64, //! A pre-processor stream comment. PreProcessorComment = 23, InactivePreProcessorComment = PreProcessorComment + 64, //! A JavaDoc/Doxygen style pre-processor comment. PreProcessorCommentLineDoc = 24, InactivePreProcessorCommentLineDoc = PreProcessorCommentLineDoc + 64, //! A user-defined literal. UserLiteral = 25, InactiveUserLiteral = UserLiteral + 64, //! A task marker. TaskMarker = 26, InactiveTaskMarker = TaskMarker + 64, //! An escape sequence. EscapeSequence = 27, InactiveEscapeSequence = EscapeSequence + 64, }; //! Construct a QsciLexerCPP with parent \a parent. \a parent is typically //! the QsciScintilla instance. \a caseInsensitiveKeywords is true if the //! lexer ignores the case of keywords. QsciLexerCPP(QObject *parent = 0, bool caseInsensitiveKeywords = false); //! Destroys the QsciLexerCPP instance. virtual ~QsciLexerCPP(); //! Returns the name of the language. const char *language() const; //! Returns the name of the lexer. Some lexers support a number of //! languages. const char *lexer() const; //! \internal Returns the character sequences that can separate //! auto-completion words. QStringList autoCompletionWordSeparators() const; //! \internal Returns a space separated list of words or characters in //! a particular style that define the end of a block for //! auto-indentation. The styles is returned via \a style. const char *blockEnd(int *style = 0) const; //! \internal Returns a space separated list of words or characters in //! a particular style that define the start of a block for //! auto-indentation. The styles is returned via \a style. const char *blockStart(int *style = 0) const; //! \internal Returns a space separated list of keywords in a //! particular style that define the start of a block for //! auto-indentation. The styles is returned via \a style. const char *blockStartKeyword(int *style = 0) const; //! \internal Returns the style used for braces for brace matching. int braceStyle() const; //! Returns the string of characters that comprise a word. const char *wordCharacters() const; //! Returns the foreground colour of the text for style number \a style. //! //! \sa defaultPaper() QColor defaultColor(int style) const; //! Returns the end-of-line fill for style number \a style. bool defaultEolFill(int style) const; //! Returns the font for style number \a style. QFont defaultFont(int style) const; //! Returns the background colour of the text for style number \a style. //! //! \sa defaultColor() QColor defaultPaper(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. Set 1 is normally used for //! primary keywords and identifiers. Set 2 is normally used for secondary //! keywords and identifiers. Set 3 is normally used for documentation //! comment keywords. Set 4 is normally used for global classes and //! typedefs. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the //! style is invalid for this language then an empty QString is returned. //! This is intended to be used in user preference dialogs. QString description(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. void refreshProperties(); //! Returns true if "} else {" lines can be folded. //! //! \sa setFoldAtElse() bool foldAtElse() const {return fold_atelse;} //! Returns true if multi-line comment blocks can be folded. //! //! \sa setFoldComments() bool foldComments() const {return fold_comments;} //! Returns true if trailing blank lines are included in a fold block. //! //! \sa setFoldCompact() bool foldCompact() const {return fold_compact;} //! Returns true if preprocessor blocks can be folded. //! //! \sa setFoldPreprocessor() bool foldPreprocessor() const {return fold_preproc;} //! Returns true if preprocessor lines (after the preprocessor //! directive) are styled. //! //! \sa setStylePreprocessor() bool stylePreprocessor() const {return style_preproc;} //! If \a allowed is true then '$' characters are allowed in identifier //! names. The default is true. //! //! \sa dollarsAllowed() void setDollarsAllowed(bool allowed); //! Returns true if '$' characters are allowed in identifier names. //! //! \sa setDollarsAllowed() bool dollarsAllowed() const {return dollars;} //! If \a enabled is true then triple quoted strings are highlighted. The //! default is false. //! //! \sa highlightTripleQuotedStrings() void setHighlightTripleQuotedStrings(bool enabled); //! Returns true if triple quoted strings should be highlighted. //! //! \sa setHighlightTripleQuotedStrings() bool highlightTripleQuotedStrings() const {return highlight_triple;} //! If \a enabled is true then hash quoted strings are highlighted. The //! default is false. //! //! \sa highlightHashQuotedStrings() void setHighlightHashQuotedStrings(bool enabled); //! Returns true if hash quoted strings should be highlighted. //! //! \sa setHighlightHashQuotedStrings() bool highlightHashQuotedStrings() const {return highlight_hash;} //! If \a enabled is true then back-quoted raw strings are highlighted. //! The default is false. //! //! \sa highlightBackQuotedStrings() void setHighlightBackQuotedStrings(bool enabled); //! Returns true if back-quoted raw strings should be highlighted. //! //! \sa setHighlightBackQuotedStrings() bool highlightBackQuotedStrings() const {return highlight_back;} //! If \a enabled is true then escape sequences in strings are highlighted. //! The default is false. //! //! \sa highlightEscapeSequences() void setHighlightEscapeSequences(bool enabled); //! Returns true if escape sequences in strings should be highlighted. //! //! \sa setHighlightEscapeSequences() bool highlightEscapeSequences() const {return highlight_escape;} //! If \a allowed is true then escape sequences are allowed in verbatim //! strings. The default is false. //! //! \sa verbatimStringEscapeSequencesAllowed() void setVerbatimStringEscapeSequencesAllowed(bool allowed); //! Returns true if hash quoted strings should be highlighted. //! //! \sa setVerbatimStringEscapeSequencesAllowed() bool verbatimStringEscapeSequencesAllowed() const {return vs_escape;} public slots: //! If \a fold is true then "} else {" lines can be folded. The //! default is false. //! //! \sa foldAtElse() virtual void setFoldAtElse(bool fold); //! If \a fold is true then multi-line comment blocks can be folded. //! The default is false. //! //! \sa foldComments() virtual void setFoldComments(bool fold); //! If \a fold is true then trailing blank lines are included in a fold //! block. The default is true. //! //! \sa foldCompact() virtual void setFoldCompact(bool fold); //! If \a fold is true then preprocessor blocks can be folded. The //! default is true. //! //! \sa foldPreprocessor() virtual void setFoldPreprocessor(bool fold); //! If \a style is true then preprocessor lines (after the preprocessor //! directive) are styled. The default is false. //! //! \sa stylePreprocessor() virtual void setStylePreprocessor(bool style); protected: //! The lexer's properties are read from the settings \a qs. \a prefix //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. true is returned if there is no error. //! //! \sa writeProperties() bool readProperties(QSettings &qs,const QString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. true is returned if there is no error. //! //! \sa readProperties() bool writeProperties(QSettings &qs,const QString &prefix) const; private: void setAtElseProp(); void setCommentProp(); void setCompactProp(); void setPreprocProp(); void setStylePreprocProp(); void setDollarsProp(); void setHighlightTripleProp(); void setHighlightHashProp(); void setHighlightBackProp(); void setHighlightEscapeProp(); void setVerbatimStringEscapeProp(); bool fold_atelse; bool fold_comments; bool fold_compact; bool fold_preproc; bool style_preproc; bool dollars; bool highlight_triple; bool highlight_hash; bool highlight_back; bool highlight_escape; bool vs_escape; bool nocase; QsciLexerCPP(const QsciLexerCPP &); QsciLexerCPP &operator=(const QsciLexerCPP &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscilexercustom.h000066400000000000000000000071071345112435200251500ustar00rootroot00000000000000// This defines the interface to the QsciLexerCustom class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCILEXERCUSTOM_H #define QSCILEXERCUSTOM_H #include #include class QsciScintilla; class QsciStyle; //! \brief The QsciLexerCustom class is an abstract class used as a base for //! new language lexers. //! //! The advantage of implementing a new lexer this way (as opposed to adding //! the lexer to the underlying Scintilla code) is that it does not require the //! QScintilla library to be re-compiled. It also makes it possible to //! integrate external lexers. //! //! All that is necessary to implement a new lexer is to define appropriate //! styles and to re-implement the styleText() method. class QSCINTILLA_EXPORT QsciLexerCustom : public QsciLexer { Q_OBJECT public: //! Construct a QsciLexerCustom with parent \a parent. \a parent is //! typically the QsciScintilla instance. QsciLexerCustom(QObject *parent = 0); //! Destroy the QSciLexerCustom. virtual ~QsciLexerCustom(); //! The next \a length characters starting from the current styling //! position have their style set to style number \a style. The current //! styling position is moved. The styling position is initially set by //! calling startStyling(). //! //! \sa startStyling(), styleText() void setStyling(int length, int style); //! The next \a length characters starting from the current styling //! position have their style set to style \a style. The current styling //! position is moved. The styling position is initially set by calling //! startStyling(). //! //! \sa startStyling(), styleText() void setStyling(int length, const QsciStyle &style); //! The styling position is set to \a start. \a styleBits is unused. //! //! \sa setStyling(), styleBitsNeeded(), styleText() void startStyling(int pos, int styleBits = 0); //! This is called when the section of text beginning at position \a start //! and up to position \a end needs to be styled. \a start will always be //! at the start of a line. The text is styled by calling startStyling() //! followed by one or more calls to setStyling(). It must be //! re-implemented by a sub-class. //! //! \sa setStyling(), startStyling(), QsciScintilla::bytes(), //! QsciScintilla::text() virtual void styleText(int start, int end) = 0; //! \reimp virtual void setEditor(QsciScintilla *editor); //! \reimp This re-implementation returns 5 as the number of style bits //! needed. virtual int styleBitsNeeded() const; private slots: void handleStyleNeeded(int pos); private: QsciLexerCustom(const QsciLexerCustom &); QsciLexerCustom &operator=(const QsciLexerCustom &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscilexerhtml.h000066400000000000000000000343071345112435200246040ustar00rootroot00000000000000// This defines the interface to the QsciLexerHTML class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCILEXERHTML_H #define QSCILEXERHTML_H #include #include #include //! \brief The QsciLexerHTML class encapsulates the Scintilla HTML lexer. class QSCINTILLA_EXPORT QsciLexerHTML : public QsciLexer { Q_OBJECT public: //! This enum defines the meanings of the different styles used by the //! HTML lexer. enum { //! The default. Default = 0, //! A tag. Tag = 1, //! An unknown tag. UnknownTag = 2, //! An attribute. Attribute = 3, //! An unknown attribute. UnknownAttribute = 4, //! An HTML number. HTMLNumber = 5, //! An HTML double-quoted string. HTMLDoubleQuotedString = 6, //! An HTML single-quoted string. HTMLSingleQuotedString = 7, //! Other text within a tag. OtherInTag = 8, //! An HTML comment. HTMLComment = 9, //! An entity. Entity = 10, //! The end of an XML style tag. XMLTagEnd = 11, //! The start of an XML fragment. XMLStart = 12, //! The end of an XML fragment. XMLEnd = 13, //! A script tag. Script = 14, //! The start of an ASP fragment with @. ASPAtStart = 15, //! The start of an ASP fragment. ASPStart = 16, //! CDATA. CDATA = 17, //! The start of a PHP fragment. PHPStart = 18, //! An unquoted HTML value. HTMLValue = 19, //! An ASP X-Code comment. ASPXCComment = 20, //! The default for SGML. SGMLDefault = 21, //! An SGML command. SGMLCommand = 22, //! The first parameter of an SGML command. SGMLParameter = 23, //! An SGML double-quoted string. SGMLDoubleQuotedString = 24, //! An SGML single-quoted string. SGMLSingleQuotedString = 25, //! An SGML error. SGMLError = 26, //! An SGML special entity. SGMLSpecial = 27, //! An SGML entity. SGMLEntity = 28, //! An SGML comment. SGMLComment = 29, //! A comment with the first parameter of an SGML command. SGMLParameterComment = 30, //! The default for an SGML block. SGMLBlockDefault = 31, //! The start of a JavaScript fragment. JavaScriptStart = 40, //! The default for JavaScript. JavaScriptDefault = 41, //! A JavaScript comment. JavaScriptComment = 42, //! A JavaScript line comment. JavaScriptCommentLine = 43, //! A JavaDoc style JavaScript comment. JavaScriptCommentDoc = 44, //! A JavaScript number. JavaScriptNumber = 45, //! A JavaScript word. JavaScriptWord = 46, //! A JavaScript keyword. JavaScriptKeyword = 47, //! A JavaScript double-quoted string. JavaScriptDoubleQuotedString = 48, //! A JavaScript single-quoted string. JavaScriptSingleQuotedString = 49, //! A JavaScript symbol. JavaScriptSymbol = 50, //! The end of a JavaScript line where a string is not closed. JavaScriptUnclosedString = 51, //! A JavaScript regular expression. JavaScriptRegex = 52, //! The start of an ASP JavaScript fragment. ASPJavaScriptStart = 55, //! The default for ASP JavaScript. ASPJavaScriptDefault = 56, //! An ASP JavaScript comment. ASPJavaScriptComment = 57, //! An ASP JavaScript line comment. ASPJavaScriptCommentLine = 58, //! An ASP JavaDoc style JavaScript comment. ASPJavaScriptCommentDoc = 59, //! An ASP JavaScript number. ASPJavaScriptNumber = 60, //! An ASP JavaScript word. ASPJavaScriptWord = 61, //! An ASP JavaScript keyword. ASPJavaScriptKeyword = 62, //! An ASP JavaScript double-quoted string. ASPJavaScriptDoubleQuotedString = 63, //! An ASP JavaScript single-quoted string. ASPJavaScriptSingleQuotedString = 64, //! An ASP JavaScript symbol. ASPJavaScriptSymbol = 65, //! The end of an ASP JavaScript line where a string is not //! closed. ASPJavaScriptUnclosedString = 66, //! An ASP JavaScript regular expression. ASPJavaScriptRegex = 67, //! The start of a VBScript fragment. VBScriptStart = 70, //! The default for VBScript. VBScriptDefault = 71, //! A VBScript comment. VBScriptComment = 72, //! A VBScript number. VBScriptNumber = 73, //! A VBScript keyword. VBScriptKeyword = 74, //! A VBScript string. VBScriptString = 75, //! A VBScript identifier. VBScriptIdentifier = 76, //! The end of a VBScript line where a string is not closed. VBScriptUnclosedString = 77, //! The start of an ASP VBScript fragment. ASPVBScriptStart = 80, //! The default for ASP VBScript. ASPVBScriptDefault = 81, //! An ASP VBScript comment. ASPVBScriptComment = 82, //! An ASP VBScript number. ASPVBScriptNumber = 83, //! An ASP VBScript keyword. ASPVBScriptKeyword = 84, //! An ASP VBScript string. ASPVBScriptString = 85, //! An ASP VBScript identifier. ASPVBScriptIdentifier = 86, //! The end of an ASP VBScript line where a string is not //! closed. ASPVBScriptUnclosedString = 87, //! The start of a Python fragment. PythonStart = 90, //! The default for Python. PythonDefault = 91, //! A Python comment. PythonComment = 92, //! A Python number. PythonNumber = 93, //! A Python double-quoted string. PythonDoubleQuotedString = 94, //! A Python single-quoted string. PythonSingleQuotedString = 95, //! A Python keyword. PythonKeyword = 96, //! A Python triple single-quoted string. PythonTripleSingleQuotedString = 97, //! A Python triple double-quoted string. PythonTripleDoubleQuotedString = 98, //! The name of a Python class. PythonClassName = 99, //! The name of a Python function or method. PythonFunctionMethodName = 100, //! A Python operator. PythonOperator = 101, //! A Python identifier. PythonIdentifier = 102, //! The start of an ASP Python fragment. ASPPythonStart = 105, //! The default for ASP Python. ASPPythonDefault = 106, //! An ASP Python comment. ASPPythonComment = 107, //! An ASP Python number. ASPPythonNumber = 108, //! An ASP Python double-quoted string. ASPPythonDoubleQuotedString = 109, //! An ASP Python single-quoted string. ASPPythonSingleQuotedString = 110, //! An ASP Python keyword. ASPPythonKeyword = 111, //! An ASP Python triple single-quoted string. ASPPythonTripleSingleQuotedString = 112, //! An ASP Python triple double-quoted string. ASPPythonTripleDoubleQuotedString = 113, //! The name of an ASP Python class. ASPPythonClassName = 114, //! The name of an ASP Python function or method. ASPPythonFunctionMethodName = 115, //! An ASP Python operator. ASPPythonOperator = 116, //! An ASP Python identifier ASPPythonIdentifier = 117, //! The default for PHP. PHPDefault = 118, //! A PHP double-quoted string. PHPDoubleQuotedString = 119, //! A PHP single-quoted string. PHPSingleQuotedString = 120, //! A PHP keyword. PHPKeyword = 121, //! A PHP number. PHPNumber = 122, //! A PHP variable. PHPVariable = 123, //! A PHP comment. PHPComment = 124, //! A PHP line comment. PHPCommentLine = 125, //! A PHP double-quoted variable. PHPDoubleQuotedVariable = 126, //! A PHP operator. PHPOperator = 127 }; //! Construct a QsciLexerHTML with parent \a parent. \a parent is //! typically the QsciScintilla instance. QsciLexerHTML(QObject *parent = 0); //! Destroys the QsciLexerHTML instance. virtual ~QsciLexerHTML(); //! Returns the name of the language. const char *language() const; //! Returns the name of the lexer. Some lexers support a number of //! languages. const char *lexer() const; //! \internal Returns the auto-completion fillup characters. const char *autoCompletionFillups() const; //! Returns the string of characters that comprise a word. const char *wordCharacters() const; //! Returns the foreground colour of the text for style number \a style. //! //! \sa defaultPaper() QColor defaultColor(int style) const; //! Returns the end-of-line fill for style number \a style. bool defaultEolFill(int style) const; //! Returns the font for style number \a style. QFont defaultFont(int style) const; //! Returns the background colour of the text for style number \a style. //! //! \sa defaultColor() QColor defaultPaper(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the //! style is invalid for this language then an empty QString is returned. //! This is intended to be used in user preference dialogs. QString description(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. void refreshProperties(); //! Returns true if tags are case sensitive. //! //! \sa setCaseSensitiveTags() bool caseSensitiveTags() const {return case_sens_tags;} //! If \a enabled is true then Django templates are enabled. The default //! is false. //! //! \sa djangoTemplates() void setDjangoTemplates(bool enabled); //! Returns true if support for Django templates is enabled. //! //! \sa setDjangoTemplates() bool djangoTemplates() const {return django_templates;} //! Returns true if trailing blank lines are included in a fold block. //! //! \sa setFoldCompact() bool foldCompact() const {return fold_compact;} //! Returns true if preprocessor blocks can be folded. //! //! \sa setFoldPreprocessor() bool foldPreprocessor() const {return fold_preproc;} //! If \a fold is true then script comments can be folded. The default is //! false. //! //! \sa foldScriptComments() void setFoldScriptComments(bool fold); //! Returns true if script comments can be folded. //! //! \sa setFoldScriptComments() bool foldScriptComments() const {return fold_script_comments;} //! If \a fold is true then script heredocs can be folded. The default is //! false. //! //! \sa foldScriptHeredocs() void setFoldScriptHeredocs(bool fold); //! Returns true if script heredocs can be folded. //! //! \sa setFoldScriptHeredocs() bool foldScriptHeredocs() const {return fold_script_heredocs;} //! If \a enabled is true then Mako templates are enabled. The default is //! false. //! //! \sa makoTemplates() void setMakoTemplates(bool enabled); //! Returns true if support for Mako templates is enabled. //! //! \sa setMakoTemplates() bool makoTemplates() const {return mako_templates;} public slots: //! If \a fold is true then trailing blank lines are included in a fold //! block. The default is true. //! //! \sa foldCompact() virtual void setFoldCompact(bool fold); //! If \a fold is true then preprocessor blocks can be folded. The //! default is false. //! //! \sa foldPreprocessor() virtual void setFoldPreprocessor(bool fold); //! If \a sens is true then tags are case sensitive. The default is false. //! //! \sa caseSensitiveTags() virtual void setCaseSensitiveTags(bool sens); protected: //! The lexer's properties are read from the settings \a qs. \a prefix //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. true is returned if there is no error. //! bool readProperties(QSettings &qs,const QString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. true is returned if there is no error. //! bool writeProperties(QSettings &qs,const QString &prefix) const; private: void setCompactProp(); void setPreprocProp(); void setCaseSensTagsProp(); void setScriptCommentsProp(); void setScriptHeredocsProp(); void setDjangoProp(); void setMakoProp(); bool fold_compact; bool fold_preproc; bool case_sens_tags; bool fold_script_comments; bool fold_script_heredocs; bool django_templates; bool mako_templates; QsciLexerHTML(const QsciLexerHTML &); QsciLexerHTML &operator=(const QsciLexerHTML &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscilexerjavascript.h000066400000000000000000000052271345112435200260050ustar00rootroot00000000000000// This defines the interface to the QsciLexerJavaScript class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCILEXERJSCRIPT_H #define QSCILEXERJSCRIPT_H #include #include #include //! \brief The QsciLexerJavaScript class encapsulates the Scintilla JavaScript //! lexer. class QSCINTILLA_EXPORT QsciLexerJavaScript : public QsciLexerCPP { Q_OBJECT public: //! Construct a QsciLexerJavaScript with parent \a parent. \a parent is //! typically the QsciScintilla instance. QsciLexerJavaScript(QObject *parent = 0); //! Destroys the QsciLexerJavaScript instance. virtual ~QsciLexerJavaScript(); //! Returns the name of the language. const char *language() const; //! Returns the foreground colour of the text for style number \a style. //! //! \sa defaultPaper() QColor defaultColor(int style) const; //! Returns the end-of-line fill for style number \a style. bool defaultEolFill(int style) const; //! Returns the font for style number \a style. QFont defaultFont(int style) const; //! Returns the background colour of the text for style number \a style. //! //! \sa defaultColor() QColor defaultPaper(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the //! style is invalid for this language then an empty QString is returned. //! This is intended to be used in user preference dialogs. QString description(int style) const; private: friend class QsciLexerHTML; static const char *keywordClass; QsciLexerJavaScript(const QsciLexerJavaScript &); QsciLexerJavaScript &operator=(const QsciLexerJavaScript &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscilexerjson.h000066400000000000000000000126471345112435200246140ustar00rootroot00000000000000// This defines the interface to the QsciLexerJSON class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCILEXERJSON_H #define QSCILEXERJSON_H #include #include #include //! \brief The QsciLexerJSON class encapsulates the Scintilla JSON lexer. class QSCINTILLA_EXPORT QsciLexerJSON : public QsciLexer { Q_OBJECT public: //! This enum defines the meanings of the different styles used by the //! JSON lexer. enum { //! The default. Default = 0, //! A number. Number = 1, //! A string. String = 2, //! An unclosed string. UnclosedString = 3, //! A property. Property = 4, //! An escape sequence. EscapeSequence = 5, //! A line comment. CommentLine = 6, //! A block comment. CommentBlock = 7, //! An operator. Operator = 8, //! An Internationalised Resource Identifier (IRI). IRI = 9, //! A JSON-LD compact IRI. IRICompact = 10, //! A JSON keyword. Keyword = 11, //! A JSON-LD keyword. KeywordLD = 12, //! A parsing error. Error = 13, }; //! Construct a QsciLexerJSON with parent \a parent. \a parent is //! typically the QsciScintilla instance. QsciLexerJSON(QObject *parent = 0); //! Destroys the QsciLexerJSON instance. virtual ~QsciLexerJSON(); //! Returns the name of the language. const char *language() const; //! Returns the name of the lexer. Some lexers support a number of //! languages. const char *lexer() const; //! Returns the foreground colour of the text for style number \a style. //! //! \sa defaultPaper() QColor defaultColor(int style) const; //! Returns the end-of-line fill for style number \a style. bool defaultEolFill(int style) const; //! Returns the font for style number \a style. QFont defaultFont(int style) const; //! Returns the background colour of the text for style number \a style. //! //! \sa defaultColor() QColor defaultPaper(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the //! style is invalid for this language then an empty QString is returned. //! This is intended to be used in user preference dialogs. QString description(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. void refreshProperties(); //! If \a highlight is true then line and block comments will be //! highlighted. The default is true. //! //! \sa hightlightComments() void setHighlightComments(bool highlight); //! Returns true if line and block comments are highlighted //! //! \sa setHightlightComments() bool highlightComments() const {return allow_comments;} //! If \a highlight is true then escape sequences in strings are //! highlighted. The default is true. //! //! \sa highlightEscapeSequences() void setHighlightEscapeSequences(bool highlight); //! Returns true if escape sequences in strings are highlighted. //! //! \sa setHighlightEscapeSequences() bool highlightEscapeSequences() const {return escape_sequence;} //! If \a fold is true then trailing blank lines are included in a fold //! block. The default is true. //! //! \sa foldCompact() void setFoldCompact(bool fold); //! Returns true if trailing blank lines are included in a fold block. //! //! \sa setFoldCompact() bool foldCompact() const {return fold_compact;} protected: //! The lexer's properties are read from the settings \a qs. \a prefix //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. true is returned if there is no error. //! bool readProperties(QSettings &qs,const QString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. true is returned if there is no error. //! bool writeProperties(QSettings &qs,const QString &prefix) const; private: void setAllowCommentsProp(); void setEscapeSequenceProp(); void setCompactProp(); bool allow_comments; bool escape_sequence; bool fold_compact; QsciLexerJSON(const QsciLexerJSON &); QsciLexerJSON &operator=(const QsciLexerJSON &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscilexerpython.h000066400000000000000000000241701345112435200251560ustar00rootroot00000000000000// This defines the interface to the QsciLexerPython class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCILEXERPYTHON_H #define QSCILEXERPYTHON_H #include #include #include #include "Qsci/qsciscintillabase.h" //! \brief The QsciLexerPython class encapsulates the Scintilla Python lexer. class QSCINTILLA_EXPORT QsciLexerPython : public QsciLexer { Q_OBJECT public: //! This enum defines the meanings of the different styles used by the //! Python lexer. enum { //! The default. Default = 0, //! A comment. Comment = 1, //! A number. Number = 2, //! A double-quoted string. DoubleQuotedString = 3, //! A single-quoted string. SingleQuotedString = 4, //! A keyword. Keyword = 5, //! A triple single-quoted string. TripleSingleQuotedString = 6, //! A triple double-quoted string. TripleDoubleQuotedString = 7, //! The name of a class. ClassName = 8, //! The name of a function or method. FunctionMethodName = 9, //! An operator. Operator = 10, //! An identifier Identifier = 11, //! A comment block. CommentBlock = 12, //! The end of a line where a string is not closed. UnclosedString = 13, //! A highlighted identifier. These are defined by keyword set //! 2. Reimplement keywords() to define keyword set 2. HighlightedIdentifier = 14, //! A decorator. Decorator = 15 }; //! This enum defines the different conditions that can cause //! indentations to be displayed as being bad. enum IndentationWarning { //! Bad indentation is not displayed differently. NoWarning = 0, //! The indentation is inconsistent when compared to the //! previous line, ie. it is made up of a different combination //! of tabs and/or spaces. Inconsistent = 1, //! The indentation is made up of spaces followed by tabs. TabsAfterSpaces = 2, //! The indentation contains spaces. Spaces = 3, //! The indentation contains tabs. Tabs = 4 }; //! Construct a QsciLexerPython with parent \a parent. \a parent is //! typically the QsciScintilla instance. QsciLexerPython(QObject *parent = 0); //! Destroys the QsciLexerPython instance. virtual ~QsciLexerPython(); //! Returns the name of the language. const char *language() const; //! Returns the name of the lexer. Some lexers support a number of //! languages. const char *lexer() const; //! \internal Returns the character sequences that can separate //! auto-completion words. QStringList autoCompletionWordSeparators() const; //! \internal Returns the number of lines prior to the current one when //! determining the scope of a block when auto-indenting. int blockLookback() const; //! \internal Returns a space separated list of words or characters in //! a particular style that define the start of a block for //! auto-indentation. The styles is returned via \a style. const char *blockStart(int *style = 0) const; //! \internal Returns the style used for braces for brace matching. int braceStyle() const; //! Returns the foreground colour of the text for style number \a style. //! //! \sa defaultPaper() QColor defaultColor(int style) const; //! Returns the end-of-line fill for style number \a style. bool defaultEolFill(int style) const; //! Returns the font for style number \a style. QFont defaultFont(int style) const; //! Returns the background colour of the text for style number \a style. //! //! \sa defaultColor() QColor defaultPaper(int style) const; //! \internal Returns the view used for indentation guides. virtual int indentationGuideView() const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the //! style is invalid for this language then an empty QString is returned. //! This is intended to be used in user preference dialogs. QString description(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. void refreshProperties(); //! Returns true if indented comment blocks can be folded. //! //! \sa setFoldComments() bool foldComments() const {return fold_comments;} //! If \a fold is true then trailing blank lines are included in a fold //! block. The default is true. //! //! \sa foldCompact() void setFoldCompact(bool fold); //! Returns true if trailing blank lines are included in a fold block. //! //! \sa setFoldCompact() bool foldCompact() const {return fold_compact;} //! Returns true if triple quoted strings can be folded. //! //! \sa setFoldQuotes() bool foldQuotes() const {return fold_quotes;} //! Returns the condition that will cause bad indentations to be //! displayed. //! //! \sa setIndentationWarning() QsciLexerPython::IndentationWarning indentationWarning() const {return indent_warn;} //! If \a enabled is true then sub-identifiers defined in keyword set 2 //! will be highlighted. For example, if it is false and "open" is defined //! in keyword set 2 then "foo.open" will not be highlighted. The default //! is true. //! //! \sa highlightSubidentifiers() void setHighlightSubidentifiers(bool enabled); //! Returns true if string literals are allowed to span newline characters. //! //! \sa setHighlightSubidentifiers() bool highlightSubidentifiers() const {return highlight_subids;} //! If \a allowed is true then string literals are allowed to span newline //! characters. The default is false. //! //! \sa stringsOverNewlineAllowed() void setStringsOverNewlineAllowed(bool allowed); //! Returns true if string literals are allowed to span newline characters. //! //! \sa setStringsOverNewlineAllowed() bool stringsOverNewlineAllowed() const {return strings_over_newline;} //! If \a allowed is true then Python v2 unicode string literals (e.g. //! u"utf8") are allowed. The default is true. //! //! \sa v2UnicodeAllowed() void setV2UnicodeAllowed(bool allowed); //! Returns true if Python v2 unicode string literals (e.g. u"utf8") are //! allowed. //! //! \sa setV2UnicodeAllowed() bool v2UnicodeAllowed() const {return v2_unicode;} //! If \a allowed is true then Python v3 binary and octal literals (e.g. //! 0b1011, 0o712) are allowed. The default is true. //! //! \sa v3BinaryOctalAllowed() void setV3BinaryOctalAllowed(bool allowed); //! Returns true if Python v3 binary and octal literals (e.g. 0b1011, //! 0o712) are allowed. //! //! \sa setV3BinaryOctalAllowed() bool v3BinaryOctalAllowed() const {return v3_binary_octal;} //! If \a allowed is true then Python v3 bytes string literals (e.g. //! b"bytes") are allowed. The default is true. //! //! \sa v3BytesAllowed() void setV3BytesAllowed(bool allowed); //! Returns true if Python v3 bytes string literals (e.g. b"bytes") are //! allowed. //! //! \sa setV3BytesAllowed() bool v3BytesAllowed() const {return v3_bytes;} public slots: //! If \a fold is true then indented comment blocks can be folded. The //! default is false. //! //! \sa foldComments() virtual void setFoldComments(bool fold); //! If \a fold is true then triple quoted strings can be folded. The //! default is false. //! //! \sa foldQuotes() virtual void setFoldQuotes(bool fold); //! Sets the condition that will cause bad indentations to be //! displayed. //! //! \sa indentationWarning() virtual void setIndentationWarning(QsciLexerPython::IndentationWarning warn); protected: //! The lexer's properties are read from the settings \a qs. \a prefix //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. true is returned if there is no error. //! bool readProperties(QSettings &qs,const QString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. true is returned if there is no error. //! bool writeProperties(QSettings &qs,const QString &prefix) const; private: void setCommentProp(); void setCompactProp(); void setQuotesProp(); void setTabWhingeProp(); void setStringsOverNewlineProp(); void setV2UnicodeProp(); void setV3BinaryOctalProp(); void setV3BytesProp(); void setHighlightSubidsProp(); bool fold_comments; bool fold_compact; bool fold_quotes; IndentationWarning indent_warn; bool strings_over_newline; bool v2_unicode; bool v3_binary_octal; bool v3_bytes; bool highlight_subids; friend class QsciLexerHTML; static const char *keywordClass; QsciLexerPython(const QsciLexerPython &); QsciLexerPython &operator=(const QsciLexerPython &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscilexersql.h000066400000000000000000000212751345112435200244370ustar00rootroot00000000000000// This defines the interface to the QsciLexerSQL class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCILEXERSQL_H #define QSCILEXERSQL_H #include #include #include //! \brief The QsciLexerSQL class encapsulates the Scintilla SQL lexer. class QSCINTILLA_EXPORT QsciLexerSQL : public QsciLexer { Q_OBJECT public: //! This enum defines the meanings of the different styles used by the //! SQL lexer. enum { //! The default. Default = 0, //! A comment. Comment = 1, //! A line comment. CommentLine = 2, //! A JavaDoc/Doxygen style comment. CommentDoc = 3, //! A number. Number = 4, //! A keyword. Keyword = 5, //! A double-quoted string. DoubleQuotedString = 6, //! A single-quoted string. SingleQuotedString = 7, //! An SQL*Plus keyword. PlusKeyword = 8, //! An SQL*Plus prompt. PlusPrompt = 9, //! An operator. Operator = 10, //! An identifier Identifier = 11, //! An SQL*Plus comment. PlusComment = 13, //! A '#' line comment. CommentLineHash = 15, //! A JavaDoc/Doxygen keyword. CommentDocKeyword = 17, //! A JavaDoc/Doxygen keyword error. CommentDocKeywordError = 18, //! A keyword defined in keyword set number 5. The class must be //! sub-classed and re-implement keywords() to make use of this style. //! Note that keywords must be defined using lower case. KeywordSet5 = 19, //! A keyword defined in keyword set number 6. The class must be //! sub-classed and re-implement keywords() to make use of this style. //! Note that keywords must be defined using lower case. KeywordSet6 = 20, //! A keyword defined in keyword set number 7. The class must be //! sub-classed and re-implement keywords() to make use of this style. //! Note that keywords must be defined using lower case. KeywordSet7 = 21, //! A keyword defined in keyword set number 8. The class must be //! sub-classed and re-implement keywords() to make use of this style. //! Note that keywords must be defined using lower case. KeywordSet8 = 22, //! A quoted identifier. QuotedIdentifier = 23, //! A quoted operator. QuotedOperator = 24, }; //! Construct a QsciLexerSQL with parent \a parent. \a parent is typically //! the QsciScintilla instance. QsciLexerSQL(QObject *parent = 0); //! Destroys the QsciLexerSQL instance. virtual ~QsciLexerSQL(); //! Returns the name of the language. const char *language() const; //! Returns the name of the lexer. Some lexers support a number of //! languages. const char *lexer() const; //! \internal Returns the style used for braces for brace matching. int braceStyle() const; //! Returns the foreground colour of the text for style number \a style. //! //! \sa defaultPaper() QColor defaultColor(int style) const; //! Returns the end-of-line fill for style number \a style. bool defaultEolFill(int style) const; //! Returns the font for style number \a style. QFont defaultFont(int style) const; //! Returns the background colour of the text for style number \a style. //! //! \sa defaultColor() QColor defaultPaper(int style) const; //! Returns the set of keywords for the keyword set \a set recognised by //! the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the style //! is invalid for this language then an empty QString is returned. This //! is intended to be used in user preference dialogs. QString description(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. void refreshProperties(); //! Returns true if backslash escapes are enabled. //! //! \sa setBackslashEscapes() bool backslashEscapes() const {return backslash_escapes;} //! If \a enable is true then words may contain dots (i.e. periods or full //! stops). The default is false. //! //! \sa dottedWords() void setDottedWords(bool enable); //! Returns true if words may contain dots (i.e. periods or full stops). //! //! \sa setDottedWords() bool dottedWords() const {return allow_dotted_word;} //! If \a fold is true then ELSE blocks can be folded. The default is //! false. //! //! \sa foldAtElse() void setFoldAtElse(bool fold); //! Returns true if ELSE blocks can be folded. //! //! \sa setFoldAtElse() bool foldAtElse() const {return at_else;} //! Returns true if multi-line comment blocks can be folded. //! //! \sa setFoldComments() bool foldComments() const {return fold_comments;} //! Returns true if trailing blank lines are included in a fold block. //! //! \sa setFoldCompact() bool foldCompact() const {return fold_compact;} //! If \a fold is true then only BEGIN blocks can be folded. The default //! is false. //! //! \sa foldOnlyBegin() void setFoldOnlyBegin(bool fold); //! Returns true if BEGIN blocks only can be folded. //! //! \sa setFoldOnlyBegin() bool foldOnlyBegin() const {return only_begin;} //! If \a enable is true then '#' is used as a comment character. It is //! typically enabled for MySQL and disabled for Oracle. The default is //! false. //! //! \sa hashComments() void setHashComments(bool enable); //! Returns true if '#' is used as a comment character. //! //! \sa setHashComments() bool hashComments() const {return numbersign_comment;} //! If \a enable is true then quoted identifiers are enabled. The default //! is false. //! //! \sa quotedIdentifiers() void setQuotedIdentifiers(bool enable); //! Returns true if quoted identifiers are enabled. //! //! \sa setQuotedIdentifiers() bool quotedIdentifiers() const {return backticks_identifier;} public slots: //! If \a enable is true then backslash escapes are enabled. The //! default is false. //! //! \sa backslashEscapes() virtual void setBackslashEscapes(bool enable); //! If \a fold is true then multi-line comment blocks can be folded. The //! default is false. //! //! \sa foldComments() virtual void setFoldComments(bool fold); //! If \a fold is true then trailing blank lines are included in a fold //! block. The default is true. //! //! \sa foldCompact() virtual void setFoldCompact(bool fold); protected: //! The lexer's properties are read from the settings \a qs. \a prefix //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. true is returned if there is no error. //! bool readProperties(QSettings &qs, const QString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. true is returned if there is no error. //! bool writeProperties(QSettings &qs, const QString &prefix) const; private: void setAtElseProp(); void setCommentProp(); void setCompactProp(); void setOnlyBeginProp(); void setBackticksIdentifierProp(); void setNumbersignCommentProp(); void setBackslashEscapesProp(); void setAllowDottedWordProp(); bool at_else; bool fold_comments; bool fold_compact; bool only_begin; bool backticks_identifier; bool numbersign_comment; bool backslash_escapes; bool allow_dotted_word; QsciLexerSQL(const QsciLexerSQL &); QsciLexerSQL &operator=(const QsciLexerSQL &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscilexerxml.h000066400000000000000000000066021345112435200244350ustar00rootroot00000000000000// This defines the interface to the QsciLexerXML class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCILEXERXML_H #define QSCILEXERXML_H #include #include #include //! \brief The QsciLexerXML class encapsulates the Scintilla XML lexer. class QSCINTILLA_EXPORT QsciLexerXML : public QsciLexerHTML { Q_OBJECT public: //! Construct a QsciLexerXML with parent \a parent. \a parent is typically //! the QsciScintilla instance. QsciLexerXML(QObject *parent = 0); //! Destroys the QsciLexerXML instance. virtual ~QsciLexerXML(); //! Returns the name of the language. const char *language() const; //! Returns the name of the lexer. Some lexers support a number of //! languages. const char *lexer() const; //! Returns the foreground colour of the text for style number \a style. //! //! \sa defaultPaper() QColor defaultColor(int style) const; //! Returns the end-of-line fill for style number \a style. bool defaultEolFill(int style) const; //! Returns the font for style number \a style. QFont defaultFont(int style) const; //! Returns the background colour of the text for style number \a style. //! //! \sa defaultColor() QColor defaultPaper(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. void refreshProperties(); //! If \a allowed is true then scripts are styled. The default is true. //! //! \sa scriptsStyled() void setScriptsStyled(bool styled); //! Returns true if scripts are styled. //! //! \sa setScriptsStyled() bool scriptsStyled() const; protected: //! The lexer's properties are read from the settings \a qs. \a prefix //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. true is returned if there is no error. //! bool readProperties(QSettings &qs, const QString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. true is returned if there is no error. //! bool writeProperties(QSettings &qs, const QString &prefix) const; private: void setScriptsProp(); bool scripts; QsciLexerXML(const QsciLexerXML &); QsciLexerXML &operator=(const QsciLexerXML &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscimacro.h000066400000000000000000000053421345112435200236760ustar00rootroot00000000000000// This defines the interface to the QsciMacro class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCIMACRO_H #define QSCIMACRO_H #include #include #include #include class QsciScintilla; //! \brief The QsciMacro class represents a sequence of recordable editor //! commands. //! //! Methods are provided to convert convert a macro to and from a textual //! representation so that they can be easily written to and read from //! permanent storage. class QSCINTILLA_EXPORT QsciMacro : public QObject { Q_OBJECT public: //! Construct a QsciMacro with parent \a parent. QsciMacro(QsciScintilla *parent); //! Construct a QsciMacro from the printable ASCII representation \a asc, //! with parent \a parent. QsciMacro(const QString &asc, QsciScintilla *parent); //! Destroy the QsciMacro instance. virtual ~QsciMacro(); //! Clear the contents of the macro. void clear(); //! Load the macro from the printable ASCII representation \a asc. Returns //! true if there was no error. //! //! \sa save() bool load(const QString &asc); //! Return a printable ASCII representation of the macro. It is guaranteed //! that only printable ASCII characters are used and that double quote //! characters will not be used. //! //! \sa load() QString save() const; public slots: //! Play the macro. virtual void play(); //! Start recording user commands and add them to the macro. virtual void startRecording(); //! Stop recording user commands. virtual void endRecording(); private slots: void record(unsigned int msg, unsigned long wParam, void *lParam); private: struct Macro { unsigned int msg; unsigned long wParam; QByteArray text; }; QsciScintilla *qsci; QList macro; QsciMacro(const QsciMacro &); QsciMacro &operator=(const QsciMacro &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qsciprinter.h000066400000000000000000000075331345112435200242640ustar00rootroot00000000000000// This module defines interface to the QsciPrinter class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCIPRINTER_H #define QSCIPRINTER_H // This is needed for Qt v5.0.0-alpha. #if defined(B0) #undef B0 #endif #include #if !defined(QT_NO_PRINTER) #include #include QT_BEGIN_NAMESPACE class QRect; class QPainter; QT_END_NAMESPACE class QsciScintillaBase; //! \brief The QsciPrinter class is a sub-class of the Qt QPrinter class that //! is able to print the text of a Scintilla document. //! //! The class can be further sub-classed to alter to layout of the text, adding //! headers and footers for example. class QSCINTILLA_EXPORT QsciPrinter : public QPrinter { public: //! Constructs a printer paint device with mode \a mode. QsciPrinter(PrinterMode mode = ScreenResolution); //! Destroys the QsciPrinter instance. virtual ~QsciPrinter(); //! Format a page, by adding headers and footers for example, before the //! document text is drawn on it. \a painter is the painter to be used to //! add customised text and graphics. \a drawing is true if the page is //! actually being drawn rather than being sized. \a painter drawing //! methods must only be called when \a drawing is true. \a area is the //! area of the page that will be used to draw the text. This should be //! modified if it is necessary to reserve space for any customised text or //! graphics. By default the area is relative to the printable area of the //! page. Use QPrinter::setFullPage() because calling printRange() if you //! want to try and print over the whole page. \a pagenr is the number of //! the page. The first page is numbered 1. virtual void formatPage(QPainter &painter, bool drawing, QRect &area, int pagenr); //! Return the number of points to add to each font when printing. //! //! \sa setMagnification() int magnification() const {return mag;} //! Sets the number of points to add to each font when printing to \a //! magnification. //! //! \sa magnification() virtual void setMagnification(int magnification); //! Print a range of lines from the Scintilla instance \a qsb. \a from is //! the first line to print and a negative value signifies the first line //! of text. \a to is the last line to print and a negative value //! signifies the last line of text. true is returned if there was no //! error. virtual int printRange(QsciScintillaBase *qsb, int from = -1, int to = -1); //! Return the line wrap mode used when printing. The default is //! QsciScintilla::WrapWord. //! //! \sa setWrapMode() QsciScintilla::WrapMode wrapMode() const {return wrap;} //! Sets the line wrap mode used when printing to \a wmode. //! //! \sa wrapMode() virtual void setWrapMode(QsciScintilla::WrapMode wmode); private: int mag; QsciScintilla::WrapMode wrap; QsciPrinter(const QsciPrinter &); QsciPrinter &operator=(const QsciPrinter &); }; #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qsciscintilla.h000066400000000000000000002461011345112435200245570ustar00rootroot00000000000000// This module defines the "official" high-level API of the Qt port of // Scintilla. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCISCINTILLA_H #define QSCISCINTILLA_H #include #include #include #include #include #include #include #include #include QT_BEGIN_NAMESPACE class QAction; class QImage; class QIODevice; class QMenu; class QPoint; QT_END_NAMESPACE class QsciCommandSet; class QsciLexer; class QsciStyle; class QsciStyledText; class QsciListBoxQt; //! \brief The QsciScintilla class implements a higher level, more Qt-like, //! API to the Scintilla editor widget. //! //! QsciScintilla implements methods, signals and slots similar to those found //! in other Qt editor classes. It also provides a higher level interface to //! features specific to Scintilla such as syntax styling, call tips, //! auto-indenting and auto-completion than that provided by QsciScintillaBase. class QSCINTILLA_EXPORT QsciScintilla : public QsciScintillaBase { Q_OBJECT public: //! This enum defines the different auto-indentation styles. enum { //! A line is automatically indented to match the previous line. AiMaintain = 0x01, //! If the language supported by the current lexer has a specific start //! of block character (e.g. { in C++), then a line that begins with //! that character is indented as well as the lines that make up the //! block. It may be logically ored with AiClosing. AiOpening = 0x02, //! If the language supported by the current lexer has a specific end //! of block character (e.g. } in C++), then a line that begins with //! that character is indented as well as the lines that make up the //! block. It may be logically ored with AiOpening. AiClosing = 0x04 }; //! This enum defines the different annotation display styles. enum AnnotationDisplay { //! Annotations are not displayed. AnnotationHidden = ANNOTATION_HIDDEN, //! Annotations are drawn left justified with no adornment. AnnotationStandard = ANNOTATION_STANDARD, //! Annotations are surrounded by a box. AnnotationBoxed = ANNOTATION_BOXED, //! Annotations are indented to match the text. AnnotationIndented = ANNOTATION_INDENTED, }; //! This enum defines the behavior if an auto-completion list contains a //! single entry. enum AutoCompletionUseSingle { //! The single entry is not used automatically and the auto-completion //! list is displayed. AcusNever, //! The single entry is used automatically when auto-completion is //! explicitly requested (using autoCompleteFromAPIs() or //! autoCompleteFromDocument()) but not when auto-completion is //! triggered as the user types. AcusExplicit, //! The single entry is used automatically and the auto-completion list //! is not displayed. AcusAlways }; //! This enum defines the different sources for auto-completion lists. enum AutoCompletionSource { //! No sources are used, ie. automatic auto-completion is disabled. AcsNone, //! The source is all available sources. AcsAll, //! The source is the current document. AcsDocument, //! The source is any installed APIs. AcsAPIs }; //! This enum defines the different brace matching modes. The character //! pairs {}, [] and () are treated as braces. The Python lexer will also //! match a : with the end of the corresponding indented block. enum BraceMatch { //! Brace matching is disabled. NoBraceMatch, //! Brace matching is enabled for a brace immediately before the //! current position. StrictBraceMatch, //! Brace matching is enabled for a brace immediately before or after //! the current position. SloppyBraceMatch }; //! This enum defines the different call tip positions. enum CallTipsPosition { //! Call tips are placed below the text. CallTipsBelowText, //! Call tips are placed above the text. CallTipsAboveText, }; //! This enum defines the different call tip styles. enum CallTipsStyle { //! Call tips are disabled. CallTipsNone, //! Call tips are displayed without a context. A context is any scope //! (e.g. a C++ namespace or a Python module) prior to the function //! name. CallTipsNoContext, //! Call tips are displayed with a context only if the user hasn't //! already implicitly identified the context using autocompletion. //! Note that this style may not always be able to align the call tip //! with the text being entered. CallTipsNoAutoCompletionContext, //! Call tips are displayed with a context. Note that this style //! may not always be able to align the call tip with the text being //! entered. CallTipsContext }; //! This enum defines the different edge modes for long lines. enum EdgeMode { //! Long lines are not marked. EdgeNone = EDGE_NONE, //! A vertical line is drawn at the column set by setEdgeColumn(). //! This is recommended for monospace fonts. EdgeLine = EDGE_LINE, //! The background color of characters after the column limit is //! changed to the color set by setEdgeColor(). This is recommended //! for proportional fonts. EdgeBackground = EDGE_BACKGROUND, //! Multiple vertical lines are drawn at the columns defined by //! multiple calls to addEdgeColumn(). EdgeMultipleLines = EDGE_MULTILINE, }; //! This enum defines the different end-of-line modes. enum EolMode { //! A carriage return/line feed as used on Windows systems. EolWindows = SC_EOL_CRLF, //! A line feed as used on Unix systems, including OS/X. EolUnix = SC_EOL_LF, //! A carriage return as used on Mac systems prior to OS/X. EolMac = SC_EOL_CR }; //! This enum defines the different styles for the folding margin. enum FoldStyle { //! Folding is disabled. NoFoldStyle, //! Plain folding style using plus and minus symbols. PlainFoldStyle, //! Circled folding style using circled plus and minus symbols. CircledFoldStyle, //! Boxed folding style using boxed plus and minus symbols. BoxedFoldStyle, //! Circled tree style using a flattened tree with circled plus and //! minus symbols and rounded corners. CircledTreeFoldStyle, //! Boxed tree style using a flattened tree with boxed plus and minus //! symbols and right-angled corners. BoxedTreeFoldStyle }; //! This enum defines the different indicator styles. enum IndicatorStyle { //! A single straight underline. PlainIndicator = INDIC_PLAIN, //! A squiggly underline that requires 3 pixels of descender space. SquiggleIndicator = INDIC_SQUIGGLE, //! A line of small T shapes. TTIndicator = INDIC_TT, //! Diagonal hatching. DiagonalIndicator = INDIC_DIAGONAL, //! Strike out. StrikeIndicator = INDIC_STRIKE, //! An indicator with no visual appearence. HiddenIndicator = INDIC_HIDDEN, //! A rectangle around the text. BoxIndicator = INDIC_BOX, //! A rectangle with rounded corners around the text with the interior //! usually more transparent than the border. RoundBoxIndicator = INDIC_ROUNDBOX, //! A rectangle around the text with the interior usually more //! transparent than the border. It does not colour the top pixel of //! the line so that indicators on contiguous lines are visually //! distinct and disconnected. StraightBoxIndicator = INDIC_STRAIGHTBOX, //! A rectangle around the text with the interior usually more //! transparent than the border. Unlike StraightBoxIndicator it covers //! the entire character area. FullBoxIndicator = INDIC_FULLBOX, //! A dashed underline. DashesIndicator = INDIC_DASH, //! A dotted underline. DotsIndicator = INDIC_DOTS, //! A squiggly underline that requires 2 pixels of descender space and //! so will fit under smaller fonts. SquiggleLowIndicator = INDIC_SQUIGGLELOW, //! A dotted rectangle around the text with the interior usually more //! transparent than the border. DotBoxIndicator = INDIC_DOTBOX, //! A version of SquiggleIndicator that uses a pixmap. This is quicker //! but may be of lower quality. SquigglePixmapIndicator = INDIC_SQUIGGLEPIXMAP, //! A thick underline typically used for the target during Asian //! language input composition. ThickCompositionIndicator = INDIC_COMPOSITIONTHICK, //! A thin underline typically used for non-target ranges during Asian //! language input composition. ThinCompositionIndicator = INDIC_COMPOSITIONTHIN, //! The color of the text is set to the color of the indicator's //! foreground. TextColorIndicator = INDIC_TEXTFORE, //! A triangle below the start of the indicator range. TriangleIndicator = INDIC_POINT, //! A triangle below the centre of the first character in the indicator //! range. TriangleCharacterIndicator = INDIC_POINTCHARACTER, }; //! This enum defines the different margin options. enum { //! Reset all margin options. MoNone = SC_MARGINOPTION_NONE, //! If this is set then only the first sub-line of a wrapped line will //! be selected when clicking on a margin. MoSublineSelect = SC_MARGINOPTION_SUBLINESELECT }; //! This enum defines the different margin types. enum MarginType { //! The margin contains symbols, including those used for folding. SymbolMargin = SC_MARGIN_SYMBOL, //! The margin contains symbols and uses the default foreground color //! as its background color. SymbolMarginDefaultForegroundColor = SC_MARGIN_FORE, //! The margin contains symbols and uses the default background color //! as its background color. SymbolMarginDefaultBackgroundColor = SC_MARGIN_BACK, //! The margin contains line numbers. NumberMargin = SC_MARGIN_NUMBER, //! The margin contains styled text. TextMargin = SC_MARGIN_TEXT, //! The margin contains right justified styled text. TextMarginRightJustified = SC_MARGIN_RTEXT, //! The margin contains symbols and uses the color set by //! setMarginBackgroundColor() as its background color. SymbolMarginColor = SC_MARGIN_COLOUR, }; //! This enum defines the different pre-defined marker symbols. enum MarkerSymbol { //! A circle. Circle = SC_MARK_CIRCLE, //! A rectangle. Rectangle = SC_MARK_ROUNDRECT, //! A triangle pointing to the right. RightTriangle = SC_MARK_ARROW, //! A smaller rectangle. SmallRectangle = SC_MARK_SMALLRECT, //! An arrow pointing to the right. RightArrow = SC_MARK_SHORTARROW, //! An invisible marker that allows code to track the movement //! of lines. Invisible = SC_MARK_EMPTY, //! A triangle pointing down. DownTriangle = SC_MARK_ARROWDOWN, //! A drawn minus sign. Minus = SC_MARK_MINUS, //! A drawn plus sign. Plus = SC_MARK_PLUS, //! A vertical line drawn in the background colour. VerticalLine = SC_MARK_VLINE, //! A bottom left corner drawn in the background colour. BottomLeftCorner = SC_MARK_LCORNER, //! A vertical line with a centre right horizontal line drawn //! in the background colour. LeftSideSplitter = SC_MARK_TCORNER, //! A drawn plus sign in a box. BoxedPlus = SC_MARK_BOXPLUS, //! A drawn plus sign in a connected box. BoxedPlusConnected = SC_MARK_BOXPLUSCONNECTED, //! A drawn minus sign in a box. BoxedMinus = SC_MARK_BOXMINUS, //! A drawn minus sign in a connected box. BoxedMinusConnected = SC_MARK_BOXMINUSCONNECTED, //! A rounded bottom left corner drawn in the background //! colour. RoundedBottomLeftCorner = SC_MARK_LCORNERCURVE, //! A vertical line with a centre right curved line drawn in the //! background colour. LeftSideRoundedSplitter = SC_MARK_TCORNERCURVE, //! A drawn plus sign in a circle. CircledPlus = SC_MARK_CIRCLEPLUS, //! A drawn plus sign in a connected box. CircledPlusConnected = SC_MARK_CIRCLEPLUSCONNECTED, //! A drawn minus sign in a circle. CircledMinus = SC_MARK_CIRCLEMINUS, //! A drawn minus sign in a connected circle. CircledMinusConnected = SC_MARK_CIRCLEMINUSCONNECTED, //! No symbol is drawn but the line is drawn with the same background //! color as the marker's. Background = SC_MARK_BACKGROUND, //! Three drawn dots. ThreeDots = SC_MARK_DOTDOTDOT, //! Three drawn arrows pointing right. ThreeRightArrows = SC_MARK_ARROWS, //! A full rectangle (ie. the margin background) using the marker's //! background color. FullRectangle = SC_MARK_FULLRECT, //! A left rectangle (ie. the left part of the margin background) using //! the marker's background color. LeftRectangle = SC_MARK_LEFTRECT, //! No symbol is drawn but the line is drawn underlined using the //! marker's background color. Underline = SC_MARK_UNDERLINE, //! A bookmark. Bookmark = SC_MARK_BOOKMARK, }; //! This enum defines how tab characters are drawn when whitespace is //! visible. enum TabDrawMode { //! An arrow stretching to the tab stop. TabLongArrow = SCTD_LONGARROW, //! A horizontal line stretching to the tab stop. TabStrikeOut = SCTD_STRIKEOUT, }; //! This enum defines the different whitespace visibility modes. When //! whitespace is visible spaces are displayed as small centred dots and //! tabs are displayed as light arrows pointing to the right. enum WhitespaceVisibility { //! Whitespace is invisible. WsInvisible = SCWS_INVISIBLE, //! Whitespace is always visible. WsVisible = SCWS_VISIBLEALWAYS, //! Whitespace is visible after the whitespace used for indentation. WsVisibleAfterIndent = SCWS_VISIBLEAFTERINDENT, //! Whitespace used for indentation is visible. WsVisibleOnlyInIndent = SCWS_VISIBLEONLYININDENT, }; //! This enum defines the different line wrap modes. enum WrapMode { //! Lines are not wrapped. WrapNone = SC_WRAP_NONE, //! Lines are wrapped at word boundaries. WrapWord = SC_WRAP_WORD, //! Lines are wrapped at character boundaries. WrapCharacter = SC_WRAP_CHAR, //! Lines are wrapped at whitespace boundaries. WrapWhitespace = SC_WRAP_WHITESPACE, }; //! This enum defines the different line wrap visual flags. enum WrapVisualFlag { //! No wrap flag is displayed. WrapFlagNone, //! A wrap flag is displayed by the text. WrapFlagByText, //! A wrap flag is displayed by the border. WrapFlagByBorder, //! A wrap flag is displayed in the line number margin. WrapFlagInMargin }; //! This enum defines the different line wrap indentation modes. enum WrapIndentMode { //! Wrapped sub-lines are indented by the amount set by //! setWrapVisualFlags(). WrapIndentFixed = SC_WRAPINDENT_FIXED, //! Wrapped sub-lines are indented by the same amount as the first //! sub-line. WrapIndentSame = SC_WRAPINDENT_SAME, //! Wrapped sub-lines are indented by the same amount as the first //! sub-line plus one more level of indentation. WrapIndentIndented = SC_WRAPINDENT_INDENT }; //! Construct an empty QsciScintilla with parent \a parent. QsciScintilla(QWidget *parent = 0); //! Destroys the QsciScintilla instance. virtual ~QsciScintilla(); //! Returns the API context, which is a list of words, before the position //! \a pos in the document. The context can be used by auto-completion and //! call tips to help to identify which API call the user is referring to. //! In the default implementation the current lexer determines what //! characters make up a word, and what characters determine the boundaries //! of words (ie. the start characters). If there is no current lexer then //! the context will consist of a single word. On return \a context_start //! will contain the position in the document of the start of the context //! and \a last_word_start will contain the position in the document of the //! start of the last word of the context. virtual QStringList apiContext(int pos, int &context_start, int &last_word_start); //! Annotate the line \a line with the text \a text using the style number //! \a style. void annotate(int line, const QString &text, int style); //! Annotate the line \a line with the text \a text using the style \a //! style. void annotate(int line, const QString &text, const QsciStyle &style); //! Annotate the line \a line with the styled text \a text. void annotate(int line, const QsciStyledText &text); //! Annotate the line \a line with the list of styled text \a text. void annotate(int line, const QList &text); //! Returns the annotation on line \a line, if any. QString annotation(int line) const; //! Returns the display style for annotations. //! //! \sa setAnnotationDisplay() AnnotationDisplay annotationDisplay() const; //! The annotations on line \a line are removed. If \a line is negative //! then all annotations are removed. void clearAnnotations(int line = -1); //! Returns true if auto-completion lists are case sensitive. //! //! \sa setAutoCompletionCaseSensitivity() bool autoCompletionCaseSensitivity() const; //! Returns true if auto-completion fill-up characters are enabled. //! //! \sa setAutoCompletionFillups(), setAutoCompletionFillupsEnabled() bool autoCompletionFillupsEnabled() const; //! Returns true if the rest of the word to the right of the current cursor //! is removed when an item from an auto-completion list is selected. //! //! \sa setAutoCompletionReplaceWord() bool autoCompletionReplaceWord() const; //! Returns true if the only item in an auto-completion list with a single //! entry is automatically used and the list not displayed. Note that this //! is deprecated and autoCompletionUseSingle() should be used instead. //! //! \sa setAutoCompletionShowSingle() bool autoCompletionShowSingle() const; //! Returns the current source for the auto-completion list when it is //! being displayed automatically as the user types. //! //! \sa setAutoCompletionSource() AutoCompletionSource autoCompletionSource() const {return acSource;} //! Returns the current threshold for the automatic display of the //! auto-completion list as the user types. //! //! \sa setAutoCompletionThreshold() int autoCompletionThreshold() const {return acThresh;} //! Returns the current behavior when an auto-completion list contains a //! single entry. //! //! \sa setAutoCompletionUseSingle() AutoCompletionUseSingle autoCompletionUseSingle() const; //! Returns true if auto-indentation is enabled. //! //! \sa setAutoIndent() bool autoIndent() const {return autoInd;} //! Returns true if the backspace key unindents a line instead of deleting //! a character. The default is false. //! //! \sa setBackspaceUnindents(), tabIndents(), setTabIndents() bool backspaceUnindents() const; //! Mark the beginning of a sequence of actions that can be undone by a //! single call to undo(). //! //! \sa endUndoAction(), undo() void beginUndoAction(); //! Returns the brace matching mode. //! //! \sa setBraceMatching() BraceMatch braceMatching() const {return braceMode;} //! Returns the encoded text between positions \a start and \a end. This //! is typically used by QsciLexerCustom::styleText(). //! //! \sa text() QByteArray bytes(int start, int end) const; //! Returns the current call tip position. //! //! \sa setCallTipsPosition() CallTipsPosition callTipsPosition() const {return call_tips_position;} //! Returns the current call tip style. //! //! \sa setCallTipsStyle() CallTipsStyle callTipsStyle() const {return call_tips_style;} //! Returns the maximum number of call tips that are displayed. //! //! \sa setCallTipsVisible() int callTipsVisible() const {return maxCallTips;} //! Cancel any current auto-completion or user defined list. void cancelList(); //! Returns true if the current language lexer is case sensitive. If there //! is no current lexer then true is returned. bool caseSensitive() const; //! Clear all current folds, i.e. ensure that all lines are displayed //! unfolded. //! //! \sa setFolding() void clearFolds(); //! Clears the range of text with indicator \a indicatorNumber starting at //! position \a indexFrom in line \a lineFrom and finishing at position //! \a indexTo in line \a lineTo. //! //! \sa fillIndicatorRange() void clearIndicatorRange(int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber); //! Clear all registered images. //! //! \sa registerImage() void clearRegisteredImages(); //! Returns the widget's text (ie. foreground) colour. //! //! \sa setColor() QColor color() const; //! Returns a list of the line numbers that have contracted folds. This is //! typically used to save the fold state of a document. //! //! \sa setContractedFolds() QList contractedFolds() const; //! All the lines of the text have their end-of-lines converted to mode //! \a mode. //! //! \sa eolMode(), setEolMode() void convertEols(EolMode mode); //! Create the standard context menu which is shown when the user clicks //! with the right mouse button. It is called from contextMenuEvent(). //! The menu's ownership is transferred to the caller. QMenu *createStandardContextMenu(); //! Returns the attached document. //! //! \sa setDocument() QsciDocument document() const {return doc;} //! Mark the end of a sequence of actions that can be undone by a single //! call to undo(). //! //! \sa beginUndoAction(), undo() void endUndoAction(); //! Returns the color of the marker used to show that a line has exceeded //! the length set by setEdgeColumn(). //! //! \sa setEdgeColor(), \sa setEdgeColumn QColor edgeColor() const; //! Returns the number of the column after which lines are considered to be //! long. //! //! \sa setEdgeColumn() int edgeColumn() const; //! Returns the edge mode which determines how long lines are marked. //! //! \sa setEdgeMode() EdgeMode edgeMode() const; //! Set the default font. This has no effect if a language lexer has been //! set. void setFont(const QFont &f); //! Returns the end-of-line mode. //! //! \sa setEolMode() EolMode eolMode() const; //! Returns the visibility of end-of-lines. //! //! \sa setEolVisibility() bool eolVisibility() const; //! Returns the extra space added to the height of a line above the //! baseline of the text. //! //! \sa setExtraAscent(), extraDescent() int extraAscent() const; //! Returns the extra space added to the height of a line below the //! baseline of the text. //! //! \sa setExtraDescent(), extraAscent() int extraDescent() const; //! Fills the range of text with indicator \a indicatorNumber starting at //! position \a indexFrom in line \a lineFrom and finishing at position //! \a indexTo in line \a lineTo. //! //! \sa clearIndicatorRange() void fillIndicatorRange(int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber); //! Find the first occurrence of the string \a expr and return true if //! \a expr was found, otherwise returns false. If \a expr is found it //! becomes the current selection. //! //! If \a re is true then \a expr is interpreted as a regular expression //! rather than a simple string. //! //! If \a cs is true then the search is case sensitive. //! //! If \a wo is true then the search looks for whole word matches only, //! otherwise it searches for any matching text. //! //! If \a wrap is true then the search wraps around the end of the text. //! //! If \a forward is true (the default) then the search is forward from the //! starting position to the end of the text, otherwise it is backwards to //! the beginning of the text. //! //! If either \a line or \a index are negative (the default) then the //! search begins from the current cursor position. Otherwise the search //! begins at position \a index of line \a line. //! //! If \a show is true (the default) then any text found is made visible //! (ie. it is unfolded). //! //! If \a posix is true then a regular expression is treated in a more //! POSIX compatible manner by interpreting bare ( and ) as tagged sections //! rather than \( and \). //! //! \sa findFirstInSelection(), findNext(), replace() virtual bool findFirst(const QString &expr, bool re, bool cs, bool wo, bool wrap, bool forward = true, int line = -1, int index = -1, bool show = true, bool posix = false); //! Find the first occurrence of the string \a expr in the current //! selection and return true if \a expr was found, otherwise returns //! false. If \a expr is found it becomes the current selection. The //! original selection is restored when a subsequent call to findNext() //! returns false. //! //! If \a re is true then \a expr is interpreted as a regular expression //! rather than a simple string. //! //! If \a cs is true then the search is case sensitive. //! //! If \a wo is true then the search looks for whole word matches only, //! otherwise it searches for any matching text. //! //! If \a forward is true (the default) then the search is forward from the //! start to the end of the selection, otherwise it is backwards from the //! end to the start of the selection. //! //! If \a show is true (the default) then any text found is made visible //! (ie. it is unfolded). //! //! If \a posix is true then a regular expression is treated in a more //! POSIX compatible manner by interpreting bare ( and ) as tagged sections //! rather than \( and \). //! //! \sa findFirstInSelection(), findNext(), replace() virtual bool findFirstInSelection(const QString &expr, bool re, bool cs, bool wo, bool forward = true, bool show = true, bool posix = false); //! Find the next occurence of the string found using findFirst() or //! findFirstInSelection(). //! //! \sa findFirst(), findFirstInSelection(), replace() virtual bool findNext(); //! Returns the number of the first visible line. //! //! \sa setFirstVisibleLine() int firstVisibleLine() const; //! Returns the current folding style. //! //! \sa setFolding() FoldStyle folding() const {return fold;} //! Sets \a *line and \a *index to the line and index of the cursor. //! //! \sa setCursorPosition() void getCursorPosition(int *line, int *index) const; //! If there is a selection, \a *lineFrom is set to the line number in //! which the selection begins and \a *lineTo is set to the line number in //! which the selection ends. (They could be the same.) \a *indexFrom is //! set to the index at which the selection begins within \a *lineFrom, and //! \a *indexTo is set to the index at which the selection ends within //! \a *lineTo. If there is no selection, \a *lineFrom, \a *indexFrom, //! \a *lineTo and \a *indexTo are all set to -1. //! //! \sa setSelection() void getSelection(int *lineFrom, int *indexFrom, int *lineTo, int *indexTo) const; //! Returns true if some text is selected. //! //! \sa selectedText() bool hasSelectedText() const {return selText;} //! Returns the number of characters that line \a line is indented by. //! //! \sa setIndentation() int indentation(int line) const; //! Returns true if the display of indentation guides is enabled. //! //! \sa setIndentationGuides() bool indentationGuides() const; //! Returns true if indentations are created using tabs and spaces, rather //! than just spaces. The default is true. //! //! \sa setIndentationsUseTabs() bool indentationsUseTabs() const; //! Returns the indentation width in characters. The default is 0 which //! means that the value returned by tabWidth() is actually used. //! //! \sa setIndentationWidth(), tabWidth() int indentationWidth() const; //! Define a type of indicator using the style \a style with the indicator //! number \a indicatorNumber. If \a indicatorNumber is -1 then the //! indicator number is automatically allocated. The indicator number is //! returned or -1 if too many types of indicator have been defined. //! //! Indicators are used to display additional information over the top of //! styling. They can be used to show, for example, syntax errors, //! deprecated names and bad indentation by drawing lines under text or //! boxes around text. //! //! There may be up to 32 types of indicator defined at a time. The first //! 8 are normally used by lexers. By default indicator number 0 is a //! dark green SquiggleIndicator, 1 is a blue TTIndicator, and 2 is a red //! PlainIndicator. int indicatorDefine(IndicatorStyle style, int indicatorNumber = -1); //! Returns true if the indicator \a indicatorNumber is drawn under the //! text (i.e. in the background). The default is false. //! //! \sa setIndicatorDrawUnder() bool indicatorDrawUnder(int indicatorNumber) const; //! Returns true if a call tip is currently active. bool isCallTipActive() const; //! Returns true if an auto-completion or user defined list is currently //! active. bool isListActive() const; //! Returns true if the text has been modified. //! //! \sa setModified(), modificationChanged() bool isModified() const; //! Returns true if the text edit is read-only. //! //! \sa setReadOnly() bool isReadOnly() const; //! Returns true if there is something that can be redone. //! //! \sa redo() bool isRedoAvailable() const; //! Returns true if there is something that can be undone. //! //! \sa undo() bool isUndoAvailable() const; //! Returns true if text is interpreted as being UTF8 encoded. The default //! is to interpret the text as Latin1 encoded. //! //! \sa setUtf8() bool isUtf8() const; //! Returns true if character \a ch is a valid word character. //! //! \sa wordCharacters() bool isWordCharacter(char ch) const; //! Returns the line which is at \a point pixel coordinates or -1 if there //! is no line at that point. int lineAt(const QPoint &point) const; //! QScintilla uses the combination of a line number and a character index //! from the start of that line to specify the position of a character //! within the text. The underlying Scintilla instead uses a byte index //! from the start of the text. This will convert the \a position byte //! index to the \a *line line number and \a *index character index. //! //! \sa positionFromLineIndex() void lineIndexFromPosition(int position, int *line, int *index) const; //! Returns the length of line \a line int bytes or -1 if there is no such //! line. In order to get the length in characters use text(line).length(). int lineLength(int line) const; //! Returns the number of lines of text. int lines() const; //! Returns the length of the text edit's text in bytes. In order to get //! the length in characters use text().length(). int length() const; //! Returns the current language lexer used to style text. If it is 0 then //! syntax styling is disabled. //! //! \sa setLexer() QsciLexer *lexer() const; //! Returns the background color of margin \a margin. //! //! \sa setMarginBackgroundColor() QColor marginBackgroundColor(int margin) const; //! Returns true if line numbers are enabled for margin \a margin. //! //! \sa setMarginLineNumbers(), marginType(), SCI_GETMARGINTYPEN bool marginLineNumbers(int margin) const; //! Returns the marker mask of margin \a margin. //! //! \sa setMarginMask(), QsciMarker, SCI_GETMARGINMASKN int marginMarkerMask(int margin) const; //! Returns the margin options. The default is MoNone. //! //! \sa setMarginOptions(), MoNone, MoSublineSelect. int marginOptions() const; //! Returns true if margin \a margin is sensitive to mouse clicks. //! //! \sa setMarginSensitivity(), marginClicked(), SCI_GETMARGINTYPEN bool marginSensitivity(int margin) const; //! Returns the type of margin \a margin. //! //! \sa setMarginType(), SCI_GETMARGINTYPEN MarginType marginType(int margin) const; //! Returns the width in pixels of margin \a margin. //! //! \sa setMarginWidth(), SCI_GETMARGINWIDTHN int marginWidth(int margin) const; //! Returns the number of margins. //! //! \sa setMargins() int margins() const; //! Define a type of marker using the symbol \a sym with the marker number //! \a markerNumber. If \a markerNumber is -1 then the marker number is //! automatically allocated. The marker number is returned or -1 if too //! many types of marker have been defined. //! //! Markers are small geometric symbols and characters used, for example, //! to indicate the current line or, in debuggers, to indicate breakpoints. //! If a margin has a width of 0 then its markers are not drawn, but their //! background colours affect the background colour of the corresponding //! line of text. //! //! There may be up to 32 types of marker defined at a time and each line //! of text has a set of marker instances associated with it. Markers are //! drawn according to their numerical identifier. Markers try to move //! with their text by tracking where the start of their line moves to. //! For example, when a line is deleted its markers are added to previous //! line's markers. //! //! Each marker type is identified by a marker number. Each instance of a //! marker is identified by a marker handle. int markerDefine(MarkerSymbol sym, int markerNumber = -1); //! Define a marker using the character \a ch with the marker number //! \a markerNumber. If \a markerNumber is -1 then the marker number is //! automatically allocated. The marker number is returned or -1 if too //! many markers have been defined. int markerDefine(char ch, int markerNumber = -1); //! Define a marker using a copy of the pixmap \a pm with the marker number //! \a markerNumber. If \a markerNumber is -1 then the marker number is //! automatically allocated. The marker number is returned or -1 if too //! many markers have been defined. int markerDefine(const QPixmap &pm, int markerNumber = -1); //! Define a marker using a copy of the image \a im with the marker number //! \a markerNumber. If \a markerNumber is -1 then the marker number is //! automatically allocated. The marker number is returned or -1 if too //! many markers have been defined. int markerDefine(const QImage &im, int markerNumber = -1); //! Add an instance of marker number \a markerNumber to line number //! \a linenr. A handle for the marker is returned which can be used to //! track the marker's position, or -1 if the \a markerNumber was invalid. //! //! \sa markerDelete(), markerDeleteAll(), markerDeleteHandle() int markerAdd(int linenr, int markerNumber); //! Returns the 32 bit mask of marker numbers at line number \a linenr. //! //! \sa markerAdd() unsigned markersAtLine(int linenr) const; //! Delete all markers with the marker number \a markerNumber in the line //! \a linenr. If \a markerNumber is -1 then delete all markers from line //! \a linenr. //! //! \sa markerAdd(), markerDeleteAll(), markerDeleteHandle() void markerDelete(int linenr, int markerNumber = -1); //! Delete the all markers with the marker number \a markerNumber. If //! \a markerNumber is -1 then delete all markers. //! //! \sa markerAdd(), markerDelete(), markerDeleteHandle() void markerDeleteAll(int markerNumber = -1); //! Delete the the marker instance with the marker handle \a mhandle. //! //! \sa markerAdd(), markerDelete(), markerDeleteAll() void markerDeleteHandle(int mhandle); //! Return the line number that contains the marker instance with the //! marker handle \a mhandle. int markerLine(int mhandle) const; //! Return the number of the next line to contain at least one marker from //! a 32 bit mask of markers. \a linenr is the line number to start the //! search from. \a mask is the mask of markers to search for. //! //! \sa markerFindPrevious() int markerFindNext(int linenr, unsigned mask) const; //! Return the number of the previous line to contain at least one marker //! from a 32 bit mask of markers. \a linenr is the line number to start //! the search from. \a mask is the mask of markers to search for. //! //! \sa markerFindNext() int markerFindPrevious(int linenr, unsigned mask) const; //! Returns true if text entered by the user will overwrite existing text. //! //! \sa setOverwriteMode() bool overwriteMode() const; //! Returns the widget's paper (ie. background) colour. //! //! \sa setPaper() QColor paper() const; //! QScintilla uses the combination of a line number and a character index //! from the start of that line to specify the position of a character //! within the text. The underlying Scintilla instead uses a byte index //! from the start of the text. This will return the byte index //! corresponding to the \a line line number and \a index character index. //! //! \sa lineIndexFromPosition() int positionFromLineIndex(int line, int index) const; //! Reads the current document from the \a io device and returns true if //! there was no error. //! //! \sa write() bool read(QIODevice *io); //! Recolours the document between the \a start and \a end positions. //! \a start defaults to the start of the document and \a end defaults to //! the end of the document. virtual void recolor(int start = 0, int end = -1); //! Register an image \a pm with ID \a id. Registered images can be //! displayed in auto-completion lists. //! //! \sa clearRegisteredImages(), QsciLexer::apiLoad() void registerImage(int id, const QPixmap &pm); //! Register an image \a im with ID \a id. Registered images can be //! displayed in auto-completion lists. //! //! \sa clearRegisteredImages(), QsciLexer::apiLoad() void registerImage(int id, const QImage &im); //! Replace the current selection, set by a previous call to findFirst(), //! findFirstInSelection() or findNext(), with \a replaceStr. //! //! \sa findFirst(), findFirstInSelection(), findNext() virtual void replace(const QString &replaceStr); //! Reset the fold margin colours to their defaults. //! //! \sa setFoldMarginColors() void resetFoldMarginColors(); //! Resets the background colour of an active hotspot area to the default. //! //! \sa setHotspotBackgroundColor(), resetHotspotForegroundColor() void resetHotspotBackgroundColor(); //! Resets the foreground colour of an active hotspot area to the default. //! //! \sa setHotspotForegroundColor(), resetHotspotBackgroundColor() void resetHotspotForegroundColor(); //! The fold margin may be drawn as a one pixel sized checkerboard pattern //! of two colours, \a fore and \a back. //! //! \sa resetFoldMarginColors() void setFoldMarginColors(const QColor &fore, const QColor &back); //! Set the display style for annotations. The default is //! AnnotationStandard. //! //! \sa annotationDisplay() void setAnnotationDisplay(AnnotationDisplay display); //! Enable the use of fill-up characters, either those explicitly set or //! those set by a lexer. By default, fill-up characters are disabled. //! //! \sa autoCompletionFillupsEnabled(), setAutoCompletionFillups() void setAutoCompletionFillupsEnabled(bool enabled); //! A fill-up character is one that, when entered while an auto-completion //! list is being displayed, causes the currently selected item from the //! list to be added to the text followed by the fill-up character. //! \a fillups is the set of fill-up characters. If a language lexer has //! been set then this is ignored and the lexer defines the fill-up //! characters. The default is that no fill-up characters are set. //! //! \sa autoCompletionFillupsEnabled(), setAutoCompletionFillupsEnabled() void setAutoCompletionFillups(const char *fillups); //! A word separator is a sequence of characters that, when entered, causes //! the auto-completion list to be displayed. If a language lexer has been //! set then this is ignored and the lexer defines the word separators. //! The default is that no word separators are set. //! //! \sa setAutoCompletionThreshold() void setAutoCompletionWordSeparators(const QStringList &separators); //! Set the background colour of call tips to \a col. The default is //! white. void setCallTipsBackgroundColor(const QColor &col); //! Set the foreground colour of call tips to \a col. The default is //! mid-gray. void setCallTipsForegroundColor(const QColor &col); //! Set the highlighted colour of call tip text to \a col. The default is //! dark blue. void setCallTipsHighlightColor(const QColor &col); //! Set the current call tip position. The default is CallTipsBelowText. //! //! \sa callTipsPosition() void setCallTipsPosition(CallTipsPosition position); //! Set the current call tip style. The default is CallTipsNoContext. //! //! \sa callTipsStyle() void setCallTipsStyle(CallTipsStyle style); //! Set the maximum number of call tips that are displayed to \a nr. If //! the maximum number is 0 then all applicable call tips are displayed. //! If the maximum number is -1 then one call tip will be displayed with up //! and down arrows that allow the use to scroll through the full list. //! The default is -1. //! //! \sa callTipsVisible() void setCallTipsVisible(int nr); //! Sets each line in the \a folds list of line numbers to be a contracted //! fold. This is typically used to restore the fold state of a document. //! //! \sa contractedFolds() void setContractedFolds(const QList &folds); //! Attach the document \a document, replacing the currently attached //! document. //! //! \sa document() void setDocument(const QsciDocument &document); //! Add \a colnr to the columns which are displayed with a vertical line. //! The edge mode must be set to EdgeMultipleLines. //! //! \sa clearEdgeColumns() void addEdgeColumn(int colnr, const QColor &col); //! Remove any columns added by previous calls to addEdgeColumn(). //! //! \sa addEdgeColumn() void clearEdgeColumns(); //! Set the color of the marker used to show that a line has exceeded the //! length set by setEdgeColumn(). //! //! \sa edgeColor(), \sa setEdgeColumn void setEdgeColor(const QColor &col); //! Set the number of the column after which lines are considered to be //! long. //! //! \sa edgeColumn() void setEdgeColumn(int colnr); //! Set the edge mode which determines how long lines are marked. //! //! \sa edgeMode() void setEdgeMode(EdgeMode mode); //! Set the number of the first visible line to \a linenr. //! //! \sa firstVisibleLine() void setFirstVisibleLine(int linenr); //! Enables or disables, according to \a under, if the indicator //! \a indicatorNumber is drawn under or over the text (i.e. in the //! background or foreground). If \a indicatorNumber is -1 then the state //! of all indicators is set. //! //! \sa indicatorDrawUnder() void setIndicatorDrawUnder(bool under, int indicatorNumber = -1); //! Set the foreground colour of indicator \a indicatorNumber to \a col. //! If \a indicatorNumber is -1 then the colour of all indicators is set. void setIndicatorForegroundColor(const QColor &col, int indicatorNumber = -1); //! Set the foreground colour of indicator \a indicatorNumber to \a col //! when the mouse is over it or the caret moved into it. If //! \a indicatorNumber is -1 then the colour of all indicators is set. void setIndicatorHoverForegroundColor(const QColor &col, int indicatorNumber = -1); //! Set the style of indicator \a indicatorNumber to \a style when the //! mouse is over it or the caret moved into it. If \a indicatorNumber is //! -1 then the style of all indicators is set. void setIndicatorHoverStyle(IndicatorStyle style, int indicatorNumber = -1); //! Set the outline colour of indicator \a indicatorNumber to \a col. //! If \a indicatorNumber is -1 then the colour of all indicators is set. //! At the moment only the alpha value of the colour has any affect. void setIndicatorOutlineColor(const QColor &col, int indicatorNumber = -1); //! Sets the background color of margin \a margin to \a col. //! //! \sa marginBackgroundColor() void setMarginBackgroundColor(int margin, const QColor &col); //! Set the margin options to \a options. //! //! \sa marginOptions(), MoNone, MoSublineSelect. void setMarginOptions(int options); //! Set the margin text of line \a line with the text \a text using the //! style number \a style. void setMarginText(int line, const QString &text, int style); //! Set the margin text of line \a line with the text \a text using the //! style \a style. void setMarginText(int line, const QString &text, const QsciStyle &style); //! Set the margin text of line \a line with the styled text \a text. void setMarginText(int line, const QsciStyledText &text); //! Set the margin text of line \a line with the list of styled text \a //! text. void setMarginText(int line, const QList &text); //! Set the type of margin \a margin to type \a type. //! //! \sa marginType(), SCI_SETMARGINTYPEN void setMarginType(int margin, MarginType type); //! The margin text on line \a line is removed. If \a line is negative //! then all margin text is removed. void clearMarginText(int line = -1); //! Set the number of margins to \a margins. //! //! \sa margins() void setMargins(int margins); //! Set the background colour, including the alpha component, of marker //! \a markerNumber to \a col. If \a markerNumber is -1 then the colour of //! all markers is set. The default is white. //! //! \sa setMarkerForegroundColor() void setMarkerBackgroundColor(const QColor &col, int markerNumber = -1); //! Set the foreground colour of marker \a markerNumber to \a col. If //! \a markerNumber is -1 then the colour of all markers is set. The //! default is black. //! //! \sa setMarkerBackgroundColor() void setMarkerForegroundColor(const QColor &col, int markerNumber = -1); //! Set the background colour used to display matched braces to \a col. It //! is ignored if an indicator is being used. The default is white. //! //! \sa setMatchedBraceForegroundColor(), setMatchedBraceIndicator() void setMatchedBraceBackgroundColor(const QColor &col); //! Set the foreground colour used to display matched braces to \a col. It //! is ignored if an indicator is being used. The default is red. //! //! \sa setMatchedBraceBackgroundColor(), setMatchedBraceIndicator() void setMatchedBraceForegroundColor(const QColor &col); //! Set the indicator used to display matched braces to \a indicatorNumber. //! The default is not to use an indicator. //! //! \sa resetMatchedBraceIndicator(), setMatchedBraceBackgroundColor() void setMatchedBraceIndicator(int indicatorNumber); //! Stop using an indicator to display matched braces. //! //! \sa setMatchedBraceIndicator() void resetMatchedBraceIndicator(); //! Sets the mode used to draw tab characters when whitespace is visible to //! \a mode. The default is to use an arrow. //! //! \sa tabDrawMode() void setTabDrawMode(TabDrawMode mode); //! Set the background colour used to display unmatched braces to \a col. //! It is ignored if an indicator is being used. The default is white. //! //! \sa setUnmatchedBraceForegroundColor(), setUnmatchedBraceIndicator() void setUnmatchedBraceBackgroundColor(const QColor &col); //! Set the foreground colour used to display unmatched braces to \a col. //! It is ignored if an indicator is being used. The default is blue. //! //! \sa setUnmatchedBraceBackgroundColor(), setUnmatchedBraceIndicator() void setUnmatchedBraceForegroundColor(const QColor &col); //! Set the indicator used to display unmatched braces to //! \a indicatorNumber. The default is not to use an indicator. //! //! \sa resetUnmatchedBraceIndicator(), setUnmatchedBraceBackgroundColor() void setUnmatchedBraceIndicator(int indicatorNumber); //! Stop using an indicator to display unmatched braces. //! //! \sa setUnmatchedBraceIndicator() void resetUnmatchedBraceIndicator(); //! Set the visual flags displayed when a line is wrapped. \a endFlag //! determines if and where the flag at the end of a line is displayed. //! \a startFlag determines if and where the flag at the start of a line is //! displayed. \a indent is the number of characters a wrapped line is //! indented by. By default no visual flags are displayed. void setWrapVisualFlags(WrapVisualFlag endFlag, WrapVisualFlag startFlag = WrapFlagNone, int indent = 0); //! Returns the selected text or an empty string if there is no currently //! selected text. //! //! \sa hasSelectedText() QString selectedText() const; //! Returns whether or not the selection is drawn up to the right hand //! border. //! //! \sa setSelectionToEol() bool selectionToEol() const; //! Sets the background colour of an active hotspot area to \a col. //! //! \sa resetHotspotBackgroundColor(), setHotspotForegroundColor() void setHotspotBackgroundColor(const QColor &col); //! Sets the foreground colour of an active hotspot area to \a col. //! //! \sa resetHotspotForegroundColor(), setHotspotBackgroundColor() void setHotspotForegroundColor(const QColor &col); //! Enables or disables, according to \a enable, the underlining of an //! active hotspot area. The default is false. void setHotspotUnderline(bool enable); //! Enables or disables, according to \a enable, the wrapping of a hotspot //! area to following lines. The default is true. void setHotspotWrap(bool enable); //! Sets whether or not the selection is drawn up to the right hand border. //! \a filled is set if the selection is drawn to the border. //! //! \sa selectionToEol() void setSelectionToEol(bool filled); //! Sets the extra space added to the height of a line above the baseline //! of the text to \a extra. //! //! \sa extraAscent(), setExtraDescent() void setExtraAscent(int extra); //! Sets the extra space added to the height of a line below the baseline //! of the text to \a extra. //! //! \sa extraDescent(), setExtraAscent() void setExtraDescent(int extra); //! Text entered by the user will overwrite existing text if \a overwrite //! is true. //! //! \sa overwriteMode() void setOverwriteMode(bool overwrite); //! Sets the background colour of visible whitespace to \a col. If \a col //! is an invalid color (the default) then the color specified by the //! current lexer is used. void setWhitespaceBackgroundColor(const QColor &col); //! Sets the foreground colour of visible whitespace to \a col. If \a col //! is an invalid color (the default) then the color specified by the //! current lexer is used. void setWhitespaceForegroundColor(const QColor &col); //! Sets the size of the dots used to represent visible whitespace. //! //! \sa whitespaceSize() void setWhitespaceSize(int size); //! Sets the line wrap indentation mode to \a mode. The default is //! WrapIndentFixed. //! //! \sa wrapIndentMode() void setWrapIndentMode(WrapIndentMode mode); //! Displays a user defined list which can be interacted with like an //! auto-completion list. \a id is an identifier for the list which is //! passed as an argument to the userListActivated() signal and must be at //! least 1. \a list is the text with which the list is populated. //! //! \sa cancelList(), isListActive(), userListActivated() void showUserList(int id, const QStringList &list); //! The standard command set is returned. QsciCommandSet *standardCommands() const {return stdCmds;} //! Returns the mode used to draw tab characters when whitespace is //! visible. //! //! \sa setTabDrawMode() TabDrawMode tabDrawMode() const; //! Returns true if the tab key indents a line instead of inserting a tab //! character. The default is true. //! //! \sa setTabIndents(), backspaceUnindents(), setBackspaceUnindents() bool tabIndents() const; //! Returns the tab width in characters. The default is 8. //! //! \sa setTabWidth() int tabWidth() const; //! Returns the text of the current document. //! //! \sa setText() QString text() const; //! \overload //! //! Returns the text of line \a line. //! //! \sa setText() QString text(int line) const; //! \overload //! //! Returns the text between positions \a start and \a end. This is //! typically used by QsciLexerCustom::styleText(). //! //! \sa bytes(), setText() QString text(int start, int end) const; //! Returns the height in pixels of the text in line number \a linenr. int textHeight(int linenr) const; //! Returns the size of the dots used to represent visible whitespace. //! //! \sa setWhitespaceSize() int whitespaceSize() const; //! Returns the visibility of whitespace. //! //! \sa setWhitespaceVisibility() WhitespaceVisibility whitespaceVisibility() const; //! Returns the word at the \a line line number and \a index character //! index. QString wordAtLineIndex(int line, int index) const; //! Returns the word at the \a point pixel coordinates. QString wordAtPoint(const QPoint &point) const; //! Returns the set of valid word character as defined by the current //! language lexer. If there is no current lexer then the set contains an //! an underscore, numbers and all upper and lower case alphabetic //! characters. //! //! \sa isWordCharacter() const char *wordCharacters() const; //! Returns the line wrap mode. //! //! \sa setWrapMode() WrapMode wrapMode() const; //! Returns the line wrap indentation mode. //! //! \sa setWrapIndentMode() WrapIndentMode wrapIndentMode() const; //! Writes the current document to the \a io device and returns true if //! there was no error. //! //! \sa read() bool write(QIODevice *io) const; public slots: //! Appends the text \a text to the end of the text edit. Note that the //! undo/redo history is cleared by this function. virtual void append(const QString &text); //! Display an auto-completion list based on any installed APIs, the //! current contents of the document and the characters immediately to the //! left of the cursor. //! //! \sa autoCompleteFromAPIs(), autoCompleteFromDocument() virtual void autoCompleteFromAll(); //! Display an auto-completion list based on any installed APIs and the //! characters immediately to the left of the cursor. //! //! \sa autoCompleteFromAll(), autoCompleteFromDocument(), //! setAutoCompletionAPIs() virtual void autoCompleteFromAPIs(); //! Display an auto-completion list based on the current contents of the //! document and the characters immediately to the left of the cursor. //! //! \sa autoCompleteFromAll(), autoCompleteFromAPIs() virtual void autoCompleteFromDocument(); //! Display a call tip based on the the characters immediately to the left //! of the cursor. virtual void callTip(); //! Deletes all the text in the text edit. virtual void clear(); //! Copies any selected text to the clipboard. //! //! \sa copyAvailable(), cut(), paste() virtual void copy(); //! Copies any selected text to the clipboard and then deletes the text. //! //! \sa copy(), paste() virtual void cut(); //! Ensures that the cursor is visible. virtual void ensureCursorVisible(); //! Ensures that the line number \a line is visible. virtual void ensureLineVisible(int line); //! If any lines are currently folded then they are all unfolded. //! Otherwise all lines are folded. This has the same effect as clicking //! in the fold margin with the shift and control keys pressed. If //! \a children is not set (the default) then only the top level fold //! points are affected, otherwise the state of all fold points are //! changed. virtual void foldAll(bool children = false); //! If the line \a line is folded then it is unfolded. Otherwise it is //! folded. This has the same effect as clicking in the fold margin. virtual void foldLine(int line); //! Increases the indentation of line \a line by an indentation width. //! //! \sa unindent() virtual void indent(int line); //! Insert the text \a text at the current position. virtual void insert(const QString &text); //! Insert the text \a text in the line \a line at the position //! \a index. virtual void insertAt(const QString &text, int line, int index); //! If the cursor is either side of a brace character then move it to the //! position of the corresponding brace. virtual void moveToMatchingBrace(); //! Pastes any text from the clipboard into the text edit at the current //! cursor position. //! //! \sa copy(), cut() virtual void paste(); //! Redo the last change or sequence of changes. //! //! \sa isRedoAvailable() virtual void redo(); //! Removes any selected text. //! //! \sa replaceSelectedText() virtual void removeSelectedText(); //! Replaces any selected text with \a text. //! //! \sa removeSelectedText() virtual void replaceSelectedText(const QString &text); //! Resets the background colour of selected text to the default. //! //! \sa setSelectionBackgroundColor(), resetSelectionForegroundColor() virtual void resetSelectionBackgroundColor(); //! Resets the foreground colour of selected text to the default. //! //! \sa setSelectionForegroundColor(), resetSelectionBackgroundColor() virtual void resetSelectionForegroundColor(); //! If \a select is true (the default) then all the text is selected. If //! \a select is false then any currently selected text is deselected. virtual void selectAll(bool select = true); //! If the cursor is either side of a brace character then move it to the //! position of the corresponding brace and select the text between the //! braces. virtual void selectToMatchingBrace(); //! If \a cs is true then auto-completion lists are case sensitive. The //! default is true. Note that setting a lexer may change the case //! sensitivity. //! //! \sa autoCompletionCaseSensitivity() virtual void setAutoCompletionCaseSensitivity(bool cs); //! If \a replace is true then when an item from an auto-completion list is //! selected, the rest of the word to the right of the current cursor is //! removed. The default is false. //! //! \sa autoCompletionReplaceWord() virtual void setAutoCompletionReplaceWord(bool replace); //! If \a single is true then when there is only a single entry in an //! auto-completion list it is automatically used and the list is not //! displayed. This only has an effect when auto-completion is explicitly //! requested (using autoCompleteFromAPIs() and autoCompleteFromDocument()) //! and has no effect when auto-completion is triggered as the user types. //! The default is false. Note that this is deprecated and //! setAutoCompletionUseSingle() should be used instead. //! //! \sa autoCompletionShowSingle() virtual void setAutoCompletionShowSingle(bool single); //! Sets the source for the auto-completion list when it is being displayed //! automatically as the user types to \a source. The default is AcsNone, //! ie. it is disabled. //! //! \sa autoCompletionSource() virtual void setAutoCompletionSource(AutoCompletionSource source); //! Sets the threshold for the automatic display of the auto-completion //! list as the user types to \a thresh. The threshold is the number of //! characters that the user must type before the list is displayed. If //! the threshold is less than or equal to 0 then the list is disabled. //! The default is -1. //! //! \sa autoCompletionThreshold(), setAutoCompletionWordSeparators() virtual void setAutoCompletionThreshold(int thresh); //! Sets the behavior of the auto-completion list when it has a single //! entry. The default is AcusNever. //! //! \sa autoCompletionUseSingle() virtual void setAutoCompletionUseSingle(AutoCompletionUseSingle single); //! If \a autoindent is true then auto-indentation is enabled. The default //! is false. //! //! \sa autoIndent() virtual void setAutoIndent(bool autoindent); //! Sets the brace matching mode to \a bm. The default is NoBraceMatching. //! //! \sa braceMatching() virtual void setBraceMatching(BraceMatch bm); //! If \a deindent is true then the backspace key will unindent a line //! rather then delete a character. //! //! \sa backspaceUnindents(), tabIndents(), setTabIndents() virtual void setBackspaceUnindents(bool unindent); //! Sets the foreground colour of the caret to \a col. virtual void setCaretForegroundColor(const QColor &col); //! Sets the background colour, including the alpha component, of the line //! containing the caret to \a col. //! //! \sa setCaretLineVisible() virtual void setCaretLineBackgroundColor(const QColor &col); //! Enables or disables, according to \a enable, the background color of //! the line containing the caret. //! //! \sa setCaretLineBackgroundColor() virtual void setCaretLineVisible(bool enable); //! Sets the width of the caret to \a width pixels. A \a width of 0 makes //! the caret invisible. virtual void setCaretWidth(int width); //! The widget's text (ie. foreground) colour is set to \a c. This has no //! effect if a language lexer has been set. //! //! \sa color() virtual void setColor(const QColor &c); //! Sets the cursor to the line \a line at the position \a index. //! //! \sa getCursorPosition() virtual void setCursorPosition(int line, int index); //! Sets the end-of-line mode to \a mode. The default is the platform's //! natural mode. //! //! \sa eolMode() virtual void setEolMode(EolMode mode); //! If \a visible is true then end-of-lines are made visible. The default //! is that they are invisible. //! //! \sa eolVisibility() virtual void setEolVisibility(bool visible); //! Sets the folding style for margin \a margin to \a fold. The default //! style is NoFoldStyle (ie. folding is disabled) and the default margin //! is 2. //! //! \sa folding() virtual void setFolding(FoldStyle fold, int margin = 2); //! Sets the indentation of line \a line to \a indentation characters. //! //! \sa indentation() virtual void setIndentation(int line, int indentation); //! Enables or disables, according to \a enable, this display of //! indentation guides. //! //! \sa indentationGuides() virtual void setIndentationGuides(bool enable); //! Set the background colour of indentation guides to \a col. //! //! \sa setIndentationGuidesForegroundColor() virtual void setIndentationGuidesBackgroundColor(const QColor &col); //! Set the foreground colour of indentation guides to \a col. //! //! \sa setIndentationGuidesBackgroundColor() virtual void setIndentationGuidesForegroundColor(const QColor &col); //! If \a tabs is true then indentations are created using tabs and spaces, //! rather than just spaces. //! //! \sa indentationsUseTabs() virtual void setIndentationsUseTabs(bool tabs); //! Sets the indentation width to \a width characters. If \a width is 0 //! then the value returned by tabWidth() is used. //! //! \sa indentationWidth(), tabWidth() virtual void setIndentationWidth(int width); //! Sets the specific language lexer used to style text to \a lex. If //! \a lex is 0 then syntax styling is disabled. //! //! \sa lexer() virtual void setLexer(QsciLexer *lexer = 0); //! Set the background colour of all margins to \a col. The default is a //! gray. //! //! \sa setMarginsForegroundColor() virtual void setMarginsBackgroundColor(const QColor &col); //! Set the font used in all margins to \a f. virtual void setMarginsFont(const QFont &f); //! Set the foreground colour of all margins to \a col. The default is //! black. //! //! \sa setMarginsBackgroundColor() virtual void setMarginsForegroundColor(const QColor &col); //! Enables or disables, according to \a lnrs, the display of line numbers //! in margin \a margin. //! //! \sa marginLineNumbers(), setMarginType(), SCI_SETMARGINTYPEN virtual void setMarginLineNumbers(int margin, bool lnrs); //! Sets the marker mask of margin \a margin to \a mask. Only those //! markers whose bit is set in the mask are displayed in the margin. //! //! \sa marginMarkerMask(), QsciMarker, SCI_SETMARGINMASKN virtual void setMarginMarkerMask(int margin, int mask); //! Enables or disables, according to \a sens, the sensitivity of margin //! \a margin to mouse clicks. If the user clicks in a sensitive margin //! the marginClicked() signal is emitted. //! //! \sa marginSensitivity(), marginClicked(), SCI_SETMARGINSENSITIVEN virtual void setMarginSensitivity(int margin, bool sens); //! Sets the width of margin \a margin to \a width pixels. If the width of //! a margin is 0 then it is not displayed. //! //! \sa marginWidth(), SCI_SETMARGINWIDTHN virtual void setMarginWidth(int margin, int width); //! Sets the width of margin \a margin so that it is wide enough to display //! \a s in the current margin font. //! //! \sa marginWidth(), SCI_SETMARGINWIDTHN virtual void setMarginWidth(int margin, const QString &s); //! Sets the modified state of the text edit to \a m. Note that it is only //! possible to clear the modified state (where \a m is false). Attempts //! to set the modified state (where \a m is true) are ignored. //! //! \sa isModified(), modificationChanged() virtual void setModified(bool m); //! The widget's paper (ie. background) colour is set to \a c. This has no //! effect if a language lexer has been set. //! //! \sa paper() virtual void setPaper(const QColor &c); //! Sets the read-only state of the text edit to \a ro. //! //! \sa isReadOnly() virtual void setReadOnly(bool ro); //! Sets the selection which starts at position \a indexFrom in line //! \a lineFrom and ends at position \a indexTo in line \a lineTo. The //! cursor is moved to position \a indexTo in \a lineTo. //! //! \sa getSelection() virtual void setSelection(int lineFrom, int indexFrom, int lineTo, int indexTo); //! Sets the background colour, including the alpha component, of selected //! text to \a col. //! //! \sa resetSelectionBackgroundColor(), setSelectionForegroundColor() virtual void setSelectionBackgroundColor(const QColor &col); //! Sets the foreground colour of selected text to \a col. //! //! \sa resetSelectionForegroundColor(), setSelectionBackgroundColor() virtual void setSelectionForegroundColor(const QColor &col); //! If \a indent is true then the tab key will indent a line rather than //! insert a tab character. //! //! \sa tabIndents(), backspaceUnindents(), setBackspaceUnindents() virtual void setTabIndents(bool indent); //! Sets the tab width to \a width characters. //! //! \sa tabWidth() virtual void setTabWidth(int width); //! Replaces all of the current text with \a text. Note that the //! undo/redo history is cleared by this function. //! //! \sa text() virtual void setText(const QString &text); //! Sets the current text encoding. If \a cp is true then UTF8 is used, //! otherwise Latin1 is used. //! //! \sa isUtf8() virtual void setUtf8(bool cp); //! Sets the visibility of whitespace to mode \a mode. The default is that //! whitespace is invisible. //! //! \sa whitespaceVisibility() virtual void setWhitespaceVisibility(WhitespaceVisibility mode); //! Sets the line wrap mode to \a mode. The default is that lines are not //! wrapped. //! //! \sa wrapMode() virtual void setWrapMode(WrapMode mode); //! Undo the last change or sequence of changes. //! //! Scintilla has multiple level undo and redo. It will continue to record //! undoable actions until memory runs out. Sequences of typing or //! deleting are compressed into single actions to make it easier to undo //! and redo at a sensible level of detail. Sequences of actions can be //! combined into actions that are undone as a unit. These sequences occur //! between calls to beginUndoAction() and endUndoAction(). These //! sequences can be nested and only the top level sequences are undone as //! units. //! //! \sa beginUndoAction(), endUndoAction(), isUndoAvailable() virtual void undo(); //! Decreases the indentation of line \a line by an indentation width. //! //! \sa indent() virtual void unindent(int line); //! Zooms in on the text by by making the base font size \a range points //! larger and recalculating all font sizes. //! //! \sa zoomOut(), zoomTo() virtual void zoomIn(int range); //! \overload //! //! Zooms in on the text by by making the base font size one point larger //! and recalculating all font sizes. virtual void zoomIn(); //! Zooms out on the text by by making the base font size \a range points //! smaller and recalculating all font sizes. //! //! \sa zoomIn(), zoomTo() virtual void zoomOut(int range); //! \overload //! //! Zooms out on the text by by making the base font size one point larger //! and recalculating all font sizes. virtual void zoomOut(); //! Zooms the text by making the base font size \a size points and //! recalculating all font sizes. //! //! \sa zoomIn(), zoomOut() virtual void zoomTo(int size); //! For performance, Scintilla does not measure the display width //! of the document to determine the properties of the horizontal //! scroll bar. Instead, an assumed width is used. This sets the //! document width in pixels assumed by Scintilla to \a //! pixelWidth. The default value is 2000. //! //! \sa getScrollWidth(), setScrollWidthTracking() virtual void setScrollWidth(int pixelWidth); //! Gets the document width in pixels assumed by Scintilla. //! //! \sa setScrollWidth(), setScrollWidthTracking() virtual int getScrollWidth() const; //! If scroll width tracking is enabled then the scroll width is //! adjusted to ensure that all of the lines currently displayed //! can be completely scrolled. This mode never adjusts the scroll //! width to be narrower. //! Sets the scroll width tracking to \a enabled. //! //! \sa setScrollWidth(), getScrollWidthTracking() virtual void setScrollWidthTracking(bool enabled); //! Gets the current scroll width tracking mode. //! //! \sa getScrollWidth(), setScrollWidthTracking() virtual bool getScrollWidthTracking() const; signals: //! This signal is emitted whenever the cursor position changes. \a line //! contains the line number and \a index contains the character index //! within the line. void cursorPositionChanged(int line, int index); //! This signal is emitted whenever text is selected or de-selected. //! \a yes is true if text has been selected and false if text has been //! deselected. If \a yes is true then copy() can be used to copy the //! selection to the clipboard. If \a yes is false then copy() does //! nothing. //! //! \sa copy(), selectionChanged() void copyAvailable(bool yes); //! This signal is emitted whenever the user clicks on an indicator. \a //! line is the number of the line where the user clicked. \a index is the //! character index within the line. \a state is the state of the modifier //! keys (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and //! Qt::MetaModifier) when the user clicked. //! //! \sa indicatorReleased() void indicatorClicked(int line, int index, Qt::KeyboardModifiers state); //! This signal is emitted whenever the user releases the mouse on an //! indicator. \a line is the number of the line where the user clicked. //! \a index is the character index within the line. \a state is the state //! of the modifier keys (Qt::ShiftModifier, Qt::ControlModifier, //! Qt::AltModifer and Qt::MetaModifier) when the user released the mouse. //! //! \sa indicatorClicked() void indicatorReleased(int line, int index, Qt::KeyboardModifiers state); //! This signal is emitted whenever the number of lines of text changes. void linesChanged(); //! This signal is emitted whenever the user clicks on a sensitive margin. //! \a margin is the margin. \a line is the number of the line where the //! user clicked. \a state is the state of the modifier keys //! (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and //! Qt::MetaModifier) when the user clicked. //! //! \sa marginSensitivity(), setMarginSensitivity() void marginClicked(int margin, int line, Qt::KeyboardModifiers state); //! This signal is emitted whenever the user right-clicks on a sensitive //! margin. \a margin is the margin. \a line is the number of the line //! where the user clicked. \a state is the state of the modifier keys //! (Qt::ShiftModifier, Qt::ControlModifier, Qt::AltModifer and //! Qt::MetaModifier) when the user clicked. //! //! \sa marginSensitivity(), setMarginSensitivity() void marginRightClicked(int margin, int line, Qt::KeyboardModifiers state); //! This signal is emitted whenever the user attempts to modify read-only //! text. //! //! \sa isReadOnly(), setReadOnly() void modificationAttempted(); //! This signal is emitted whenever the modification state of the text //! changes. \a m is true if the text has been modified. //! //! \sa isModified(), setModified() void modificationChanged(bool m); //! This signal is emitted whenever the selection changes. //! //! \sa copyAvailable() void selectionChanged(); //! This signal is emitted whenever the text in the text edit changes. void textChanged(); //! This signal is emitted when an item in a user defined list is activated //! (selected). \a id is the list identifier. \a string is the text of //! the item. //! //! \sa showUserList() void userListActivated(int id, const QString &string); protected: //! \reimp virtual bool event(QEvent *e); //! \reimp virtual void changeEvent(QEvent *e); //! \reimp virtual void contextMenuEvent(QContextMenuEvent *e); private slots: void handleCallTipClick(int dir); void handleCharAdded(int charadded); void handleIndicatorClick(int pos, int modifiers); void handleIndicatorRelease(int pos, int modifiers); void handleMarginClick(int pos, int margin, int modifiers); void handleMarginRightClick(int pos, int margin, int modifiers); void handleModified(int pos, int mtype, const char *text, int len, int added, int line, int foldNow, int foldPrev, int token, int annotationLinesAdded); void handlePropertyChange(const char *prop, const char *val); void handleSavePointReached(); void handleSavePointLeft(); void handleSelectionChanged(bool yes); void handleAutoCompletionSelection(); void handleUserListSelection(const char *text, int id); void handleStyleColorChange(const QColor &c, int style); void handleStyleEolFillChange(bool eolfill, int style); void handleStyleFontChange(const QFont &f, int style); void handleStylePaperChange(const QColor &c, int style); void handleUpdateUI(int updated); void delete_selection(); private: void detachLexer(); enum IndentState { isNone, isKeywordStart, isBlockStart, isBlockEnd }; void maintainIndentation(char ch, long pos); void autoIndentation(char ch, long pos); void autoIndentLine(long pos, int line, int indent); int blockIndent(int line); IndentState getIndentState(int line); bool rangeIsWhitespace(long spos, long epos); int findStyledWord(const char *text, int style, const char *words); void checkMarker(int &markerNumber); void checkIndicator(int &indicatorNumber); static void allocateId(int &id, unsigned &allocated, int min, int max); int currentIndent() const; int indentWidth() const; bool doFind(); int simpleFind(); void foldClick(int lineClick, int bstate); void foldChanged(int line, int levelNow, int levelPrev); void foldExpand(int &line, bool doExpand, bool force = false, int visLevels = 0, int level = -1); void setFoldMarker(int marknr, int mark = SC_MARK_EMPTY); void setLexerStyle(int style); void setStylesFont(const QFont &f, int style); void setEnabledColors(int style, QColor &fore, QColor &back); void braceMatch(); bool findMatchingBrace(long &brace, long &other, BraceMatch mode); long checkBrace(long pos, int brace_style, bool &colonMode); void gotoMatchingBrace(bool select); void startAutoCompletion(AutoCompletionSource acs, bool checkThresh, bool choose_single); int adjustedCallTipPosition(int ctshift) const; bool getSeparator(int &pos) const; QString getWord(int &pos) const; char getCharacter(int &pos) const; bool isStartChar(char ch) const; bool ensureRW(); void insertAtPos(const QString &text, int pos); static int mapModifiers(int modifiers); QString wordAtPosition(int position) const; ScintillaBytes styleText(const QList &styled_text, char **styles, int style_offset = 0); struct FindState { enum Status { Finding, FindingInSelection, Idle }; FindState() : status(Idle) {} Status status; QString expr; bool wrap; bool forward; int flags; long startpos, startpos_orig; long endpos, endpos_orig; bool show; }; FindState findState; unsigned allocatedMarkers; unsigned allocatedIndicators; int oldPos; int ctPos; bool selText; FoldStyle fold; int foldmargin; bool autoInd; BraceMatch braceMode; AutoCompletionSource acSource; int acThresh; QStringList wseps; const char *wchars; CallTipsPosition call_tips_position; CallTipsStyle call_tips_style; int maxCallTips; QStringList ct_entries; int ct_cursor; QList ct_shifts; AutoCompletionUseSingle use_single; QPointer lex; QsciCommandSet *stdCmds; QsciDocument doc; QColor nl_text_colour; QColor nl_paper_colour; QByteArray explicit_fillups; bool fillups_enabled; // The following allow QsciListBoxQt to distinguish between an // auto-completion list and a user list, and to return the full selection // of an auto-completion list. friend class QsciListBoxQt; QString acSelection; bool isAutoCompletionList() const; void set_shortcut(QAction *action, QsciCommand::Command cmd_id) const; QsciScintilla(const QsciScintilla &); QsciScintilla &operator=(const QsciScintilla &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qsciscintillabase.h000066400000000000000000002477141345112435200254250ustar00rootroot00000000000000// This class defines the "official" low-level API. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCISCINTILLABASE_H #define QSCISCINTILLABASE_H #include #include #include #include #include #include QT_BEGIN_NAMESPACE class QColor; class QImage; class QMimeData; class QPainter; class QPixmap; QT_END_NAMESPACE class QsciScintillaQt; //! \brief The QsciScintillaBase class implements the Scintilla editor widget //! and its low-level API. //! //! Scintilla (http://www.scintilla.org) is a powerful C++ editor class that //! supports many features including syntax styling, error indicators, code //! completion and call tips. It is particularly useful as a programmer's //! editor. //! //! QsciScintillaBase is a port to Qt of Scintilla. It implements the standard //! Scintilla API which consists of a number of messages each taking up to //! two arguments. //! //! See QsciScintilla for the implementation of a higher level API that is more //! consistent with the rest of the Qt toolkit. class QSCINTILLA_EXPORT QsciScintillaBase : public QAbstractScrollArea { Q_OBJECT public: //! The low-level Scintilla API is implemented as a set of messages each of //! which takes up to two parameters (\a wParam and \a lParam) and //! optionally return a value. This enum defines all the possible messages. enum { //! SCI_START = 2000, //! SCI_OPTIONAL_START = 3000, //! SCI_LEXER_START = 4000, //! This message appends some text to the end of the document. //! \a wParam is the length of the text. //! \a lParam is the text to be appended. SCI_ADDTEXT = 2001, //! SCI_ADDSTYLEDTEXT = 2002, //! SCI_INSERTTEXT = 2003, //! SCI_CLEARALL = 2004, //! SCI_CLEARDOCUMENTSTYLE = 2005, //! SCI_GETLENGTH = 2006, //! SCI_GETCHARAT = 2007, //! This message returns the current position. //! //! \sa SCI_SETCURRENTPOS SCI_GETCURRENTPOS = 2008, //! This message returns the anchor. //! //! \sa SCI_SETANCHOR SCI_GETANCHOR = 2009, //! SCI_GETSTYLEAT = 2010, //! SCI_REDO = 2011, //! SCI_SETUNDOCOLLECTION = 2012, //! SCI_SELECTALL = 2013, //! This message marks the current state of the text as the the save //! point. This is usually done when the text is saved or loaded. //! //! \sa SCN_SAVEPOINTREACHED(), SCN_SAVEPOINTLEFT() SCI_SETSAVEPOINT = 2014, //! SCI_GETSTYLEDTEXT = 2015, //! SCI_CANREDO = 2016, //! This message returns the line that contains a particular instance //! of a marker. //! \a wParam is the handle of the marker. //! //! \sa SCI_MARKERADD SCI_MARKERLINEFROMHANDLE = 2017, //! This message removes a particular instance of a marker. //! \a wParam is the handle of the marker. //! //! \sa SCI_MARKERADD SCI_MARKERDELETEHANDLE = 2018, //! SCI_GETUNDOCOLLECTION = 2019, //! SCI_GETVIEWWS = 2020, //! SCI_SETVIEWWS = 2021, //! SCI_POSITIONFROMPOINT = 2022, //! SCI_POSITIONFROMPOINTCLOSE = 2023, //! SCI_GOTOLINE = 2024, //! This message clears the current selection and sets the current //! position. //! \a wParam is the new current position. //! //! \sa SCI_SETCURRENTPOS SCI_GOTOPOS = 2025, //! This message sets the anchor. //! \a wParam is the new anchor. //! //! \sa SCI_GETANCHOR SCI_SETANCHOR = 2026, //! SCI_GETCURLINE = 2027, //! This message returns the character position of the start of the //! text that needs to be syntax styled. //! //! \sa SCN_STYLENEEDED() SCI_GETENDSTYLED = 2028, //! SCI_CONVERTEOLS = 2029, //! SCI_GETEOLMODE = 2030, //! SCI_SETEOLMODE = 2031, //! SCI_STARTSTYLING = 2032, //! SCI_SETSTYLING = 2033, //! SCI_GETBUFFEREDDRAW = 2034, //! SCI_SETBUFFEREDDRAW = 2035, //! SCI_SETTABWIDTH = 2036, //! SCI_GETTABWIDTH = 2121, //! SCI_SETCODEPAGE = 2037, //! This message sets the symbol used to draw one of 32 markers. Some //! markers have pre-defined uses, see the SC_MARKNUM_* values. //! \a wParam is the number of the marker. //! \a lParam is the marker symbol and is one of the SC_MARK_* values. //! //! \sa SCI_MARKERADD, SCI_MARKERDEFINEPIXMAP, //! SCI_MARKERDEFINERGBAIMAGE SCI_MARKERDEFINE = 2040, //! This message sets the foreground colour used to draw a marker. A //! colour is represented as a 24 bit value. The 8 least significant //! bits correspond to red, the middle 8 bits correspond to green, and //! the 8 most significant bits correspond to blue. The default value //! is 0x000000. //! \a wParam is the number of the marker. //! \a lParam is the colour. //! //! \sa SCI_MARKERSETBACK SCI_MARKERSETFORE = 2041, //! This message sets the background colour used to draw a marker. A //! colour is represented as a 24 bit value. The 8 least significant //! bits correspond to red, the middle 8 bits correspond to green, and //! the 8 most significant bits correspond to blue. The default value //! is 0xffffff. //! \a wParam is the number of the marker. //! \a lParam is the colour. //! //! \sa SCI_MARKERSETFORE SCI_MARKERSETBACK = 2042, //! This message adds a marker to a line. A handle for the marker is //! returned which can be used to track the marker's position. //! \a wParam is the line number. //! \a lParam is the number of the marker. //! //! \sa SCI_MARKERDELETE, SCI_MARKERDELETEALL, //! SCI_MARKERDELETEHANDLE SCI_MARKERADD = 2043, //! This message deletes a marker from a line. //! \a wParam is the line number. //! \a lParam is the number of the marker. //! //! \sa SCI_MARKERADD, SCI_MARKERDELETEALL SCI_MARKERDELETE = 2044, //! This message deletes all occurences of a marker. //! \a wParam is the number of the marker. If \a wParam is -1 then all //! markers are removed. //! //! \sa SCI_MARKERADD, SCI_MARKERDELETE SCI_MARKERDELETEALL = 2045, //! This message returns the 32 bit mask of markers at a line. //! \a wParam is the line number. SCI_MARKERGET = 2046, //! This message looks for the next line to contain at least one marker //! contained in a 32 bit mask of markers and returns the line number. //! \a wParam is the line number to start the search from. //! \a lParam is the mask of markers to search for. //! //! \sa SCI_MARKERPREVIOUS SCI_MARKERNEXT = 2047, //! This message looks for the previous line to contain at least one //! marker contained in a 32 bit mask of markers and returns the line //! number. //! \a wParam is the line number to start the search from. //! \a lParam is the mask of markers to search for. //! //! \sa SCI_MARKERNEXT SCI_MARKERPREVIOUS = 2048, //! This message sets the symbol used to draw one of the 32 markers to //! a pixmap. Pixmaps use the SC_MARK_PIXMAP marker symbol. //! \a wParam is the number of the marker. //! \a lParam is a pointer to a QPixmap instance. Note that in other //! ports of Scintilla this is a pointer to either raw or textual XPM //! image data. //! //! \sa SCI_MARKERDEFINE, SCI_MARKERDEFINERGBAIMAGE SCI_MARKERDEFINEPIXMAP = 2049, //! This message sets what can be displayed in a margin. //! \a wParam is the number of the margin. //! \a lParam is the logical or of the SC_MARGIN_* values. //! //! \sa SCI_GETMARGINTYPEN SCI_SETMARGINTYPEN = 2240, //! This message returns what can be displayed in a margin. //! \a wParam is the number of the margin. //! //! \sa SCI_SETMARGINTYPEN SCI_GETMARGINTYPEN = 2241, //! This message sets the width of a margin in pixels. //! \a wParam is the number of the margin. //! \a lParam is the new margin width. //! //! \sa SCI_GETMARGINWIDTHN SCI_SETMARGINWIDTHN = 2242, //! This message returns the width of a margin in pixels. //! \a wParam is the number of the margin. //! //! \sa SCI_SETMARGINWIDTHN SCI_GETMARGINWIDTHN = 2243, //! This message sets the mask of a margin. The mask is a 32 value //! with one bit for each possible marker. If a bit is set then the //! corresponding marker is displayed. By default, all markers are //! displayed. //! \a wParam is the number of the margin. //! \a lParam is the new margin mask. //! //! \sa SCI_GETMARGINMASKN, SCI_MARKERDEFINE SCI_SETMARGINMASKN = 2244, //! This message returns the mask of a margin. //! \a wParam is the number of the margin. //! //! \sa SCI_SETMARGINMASKN SCI_GETMARGINMASKN = 2245, //! This message sets the sensitivity of a margin to mouse clicks. //! \a wParam is the number of the margin. //! \a lParam is non-zero to make the margin sensitive to mouse clicks. //! When the mouse is clicked the SCN_MARGINCLICK() signal is emitted. //! //! \sa SCI_GETMARGINSENSITIVEN, SCN_MARGINCLICK() SCI_SETMARGINSENSITIVEN = 2246, //! This message returns the sensitivity of a margin to mouse clicks. //! \a wParam is the number of the margin. //! //! \sa SCI_SETMARGINSENSITIVEN, SCN_MARGINCLICK() SCI_GETMARGINSENSITIVEN = 2247, //! This message sets the cursor shape displayed over a margin. //! \a wParam is the number of the margin. //! \a lParam is the cursor shape, normally either SC_CURSORARROW or //! SC_CURSORREVERSEARROW. Note that, currently, QScintilla implements //! both of these as Qt::ArrowCursor. //! //! \sa SCI_GETMARGINCURSORN SCI_SETMARGINCURSORN = 2248, //! This message returns the cursor shape displayed over a margin. //! \a wParam is the number of the margin. //! //! \sa SCI_SETMARGINCURSORN SCI_GETMARGINCURSORN = 2249, //! SCI_STYLECLEARALL = 2050, //! SCI_STYLESETFORE = 2051, //! SCI_STYLESETBACK = 2052, //! SCI_STYLESETBOLD = 2053, //! SCI_STYLESETITALIC = 2054, //! SCI_STYLESETSIZE = 2055, //! SCI_STYLESETFONT = 2056, //! SCI_STYLESETEOLFILLED = 2057, //! SCI_STYLERESETDEFAULT = 2058, //! SCI_STYLESETUNDERLINE = 2059, //! SCI_STYLESETCASE = 2060, //! SCI_STYLESETSIZEFRACTIONAL = 2061, //! SCI_STYLEGETSIZEFRACTIONAL = 2062, //! SCI_STYLESETWEIGHT = 2063, //! SCI_STYLEGETWEIGHT = 2064, //! SCI_STYLESETCHARACTERSET = 2066, //! SCI_SETSELFORE = 2067, //! SCI_SETSELBACK = 2068, //! SCI_SETCARETFORE = 2069, //! SCI_ASSIGNCMDKEY = 2070, //! SCI_CLEARCMDKEY = 2071, //! SCI_CLEARALLCMDKEYS = 2072, //! SCI_SETSTYLINGEX = 2073, //! SCI_STYLESETVISIBLE = 2074, //! SCI_GETCARETPERIOD = 2075, //! SCI_SETCARETPERIOD = 2076, //! SCI_SETWORDCHARS = 2077, //! SCI_BEGINUNDOACTION = 2078, //! SCI_ENDUNDOACTION = 2079, //! SCI_INDICSETSTYLE = 2080, //! SCI_INDICGETSTYLE = 2081, //! SCI_INDICSETFORE = 2082, //! SCI_INDICGETFORE = 2083, //! SCI_SETWHITESPACEFORE = 2084, //! SCI_SETWHITESPACEBACK = 2085, //! SCI_SETWHITESPACESIZE = 2086, //! SCI_GETWHITESPACESIZE = 2087, //! SCI_SETSTYLEBITS = 2090, //! SCI_GETSTYLEBITS = 2091, //! SCI_SETLINESTATE = 2092, //! SCI_GETLINESTATE = 2093, //! SCI_GETMAXLINESTATE = 2094, //! SCI_GETCARETLINEVISIBLE = 2095, //! SCI_SETCARETLINEVISIBLE = 2096, //! SCI_GETCARETLINEBACK = 2097, //! SCI_SETCARETLINEBACK = 2098, //! SCI_STYLESETCHANGEABLE = 2099, //! SCI_AUTOCSHOW = 2100, //! SCI_AUTOCCANCEL = 2101, //! SCI_AUTOCACTIVE = 2102, //! SCI_AUTOCPOSSTART = 2103, //! SCI_AUTOCCOMPLETE = 2104, //! SCI_AUTOCSTOPS = 2105, //! SCI_AUTOCSETSEPARATOR = 2106, //! SCI_AUTOCGETSEPARATOR = 2107, //! SCI_AUTOCSELECT = 2108, //! SCI_AUTOCSETCANCELATSTART = 2110, //! SCI_AUTOCGETCANCELATSTART = 2111, //! SCI_AUTOCSETFILLUPS = 2112, //! SCI_AUTOCSETCHOOSESINGLE = 2113, //! SCI_AUTOCGETCHOOSESINGLE = 2114, //! SCI_AUTOCSETIGNORECASE = 2115, //! SCI_AUTOCGETIGNORECASE = 2116, //! SCI_USERLISTSHOW = 2117, //! SCI_AUTOCSETAUTOHIDE = 2118, //! SCI_AUTOCGETAUTOHIDE = 2119, //! SCI_AUTOCSETDROPRESTOFWORD = 2270, //! SCI_AUTOCGETDROPRESTOFWORD = 2271, //! SCI_SETINDENT = 2122, //! SCI_GETINDENT = 2123, //! SCI_SETUSETABS = 2124, //! SCI_GETUSETABS = 2125, //! SCI_SETLINEINDENTATION = 2126, //! SCI_GETLINEINDENTATION = 2127, //! SCI_GETLINEINDENTPOSITION = 2128, //! SCI_GETCOLUMN = 2129, //! SCI_SETHSCROLLBAR = 2130, //! SCI_GETHSCROLLBAR = 2131, //! SCI_SETINDENTATIONGUIDES = 2132, //! SCI_GETINDENTATIONGUIDES = 2133, //! SCI_SETHIGHLIGHTGUIDE = 2134, //! SCI_GETHIGHLIGHTGUIDE = 2135, //! SCI_GETLINEENDPOSITION = 2136, //! SCI_GETCODEPAGE = 2137, //! SCI_GETCARETFORE = 2138, //! This message returns a non-zero value if the document is read-only. //! //! \sa SCI_SETREADONLY SCI_GETREADONLY = 2140, //! This message sets the current position. //! \a wParam is the new current position. //! //! \sa SCI_GETCURRENTPOS SCI_SETCURRENTPOS = 2141, //! SCI_SETSELECTIONSTART = 2142, //! SCI_GETSELECTIONSTART = 2143, //! SCI_SETSELECTIONEND = 2144, //! SCI_GETSELECTIONEND = 2145, //! SCI_SETPRINTMAGNIFICATION = 2146, //! SCI_GETPRINTMAGNIFICATION = 2147, //! SCI_SETPRINTCOLOURMODE = 2148, //! SCI_GETPRINTCOLOURMODE = 2149, //! SCI_FINDTEXT = 2150, //! SCI_FORMATRANGE = 2151, //! SCI_GETFIRSTVISIBLELINE = 2152, //! SCI_GETLINE = 2153, //! SCI_GETLINECOUNT = 2154, //! SCI_SETMARGINLEFT = 2155, //! SCI_GETMARGINLEFT = 2156, //! SCI_SETMARGINRIGHT = 2157, //! SCI_GETMARGINRIGHT = 2158, //! This message returns a non-zero value if the document has been //! modified. SCI_GETMODIFY = 2159, //! SCI_SETSEL = 2160, //! SCI_GETSELTEXT = 2161, //! SCI_GETTEXTRANGE = 2162, //! SCI_HIDESELECTION = 2163, //! SCI_POINTXFROMPOSITION = 2164, //! SCI_POINTYFROMPOSITION = 2165, //! SCI_LINEFROMPOSITION = 2166, //! SCI_POSITIONFROMLINE = 2167, //! SCI_LINESCROLL = 2168, //! SCI_SCROLLCARET = 2169, //! SCI_REPLACESEL = 2170, //! This message sets the read-only state of the document. //! \a wParam is the new read-only state of the document. //! //! \sa SCI_GETREADONLY SCI_SETREADONLY = 2171, //! SCI_NULL = 2172, //! SCI_CANPASTE = 2173, //! SCI_CANUNDO = 2174, //! This message empties the undo buffer. SCI_EMPTYUNDOBUFFER = 2175, //! SCI_UNDO = 2176, //! SCI_CUT = 2177, //! SCI_COPY = 2178, //! SCI_PASTE = 2179, //! SCI_CLEAR = 2180, //! This message sets the text of the document. //! \a wParam is unused. //! \a lParam is the new text of the document. //! //! \sa SCI_GETTEXT SCI_SETTEXT = 2181, //! This message gets the text of the document. //! \a wParam is size of the buffer that the text is copied to. //! \a lParam is the address of the buffer that the text is copied to. //! //! \sa SCI_SETTEXT SCI_GETTEXT = 2182, //! This message returns the length of the document. SCI_GETTEXTLENGTH = 2183, //! SCI_GETDIRECTFUNCTION = 2184, //! SCI_GETDIRECTPOINTER = 2185, //! SCI_SETOVERTYPE = 2186, //! SCI_GETOVERTYPE = 2187, //! SCI_SETCARETWIDTH = 2188, //! SCI_GETCARETWIDTH = 2189, //! SCI_SETTARGETSTART = 2190, //! SCI_GETTARGETSTART = 2191, //! SCI_SETTARGETEND = 2192, //! SCI_GETTARGETEND = 2193, //! SCI_REPLACETARGET = 2194, //! SCI_REPLACETARGETRE = 2195, //! SCI_SEARCHINTARGET = 2197, //! SCI_SETSEARCHFLAGS = 2198, //! SCI_GETSEARCHFLAGS = 2199, //! SCI_CALLTIPSHOW = 2200, //! SCI_CALLTIPCANCEL = 2201, //! SCI_CALLTIPACTIVE = 2202, //! SCI_CALLTIPPOSSTART = 2203, //! SCI_CALLTIPSETHLT = 2204, //! SCI_CALLTIPSETBACK = 2205, //! SCI_CALLTIPSETFORE = 2206, //! SCI_CALLTIPSETFOREHLT = 2207, //! SCI_AUTOCSETMAXWIDTH = 2208, //! SCI_AUTOCGETMAXWIDTH = 2209, //! This message is not implemented. SCI_AUTOCSETMAXHEIGHT = 2210, //! SCI_AUTOCGETMAXHEIGHT = 2211, //! SCI_CALLTIPUSESTYLE = 2212, //! SCI_CALLTIPSETPOSITION = 2213, //! SCI_CALLTIPSETPOSSTART = 2214, //! SCI_VISIBLEFROMDOCLINE = 2220, //! SCI_DOCLINEFROMVISIBLE = 2221, //! SCI_SETFOLDLEVEL = 2222, //! SCI_GETFOLDLEVEL = 2223, //! SCI_GETLASTCHILD = 2224, //! SCI_GETFOLDPARENT = 2225, //! SCI_SHOWLINES = 2226, //! SCI_HIDELINES = 2227, //! SCI_GETLINEVISIBLE = 2228, //! SCI_SETFOLDEXPANDED = 2229, //! SCI_GETFOLDEXPANDED = 2230, //! SCI_TOGGLEFOLD = 2231, //! SCI_ENSUREVISIBLE = 2232, //! SCI_SETFOLDFLAGS = 2233, //! SCI_ENSUREVISIBLEENFORCEPOLICY = 2234, //! SCI_WRAPCOUNT = 2235, //! SCI_GETALLLINESVISIBLE = 2236, //! SCI_FOLDLINE = 2237, //! SCI_FOLDCHILDREN = 2238, //! SCI_EXPANDCHILDREN = 2239, //! SCI_SETMARGINBACKN = 2250, //! SCI_GETMARGINBACKN = 2251, //! SCI_SETMARGINS = 2252, //! SCI_GETMARGINS = 2253, //! SCI_SETTABINDENTS = 2260, //! SCI_GETTABINDENTS = 2261, //! SCI_SETBACKSPACEUNINDENTS = 2262, //! SCI_GETBACKSPACEUNINDENTS = 2263, //! SCI_SETMOUSEDWELLTIME = 2264, //! SCI_GETMOUSEDWELLTIME = 2265, //! SCI_WORDSTARTPOSITION = 2266, //! SCI_WORDENDPOSITION = 2267, //! SCI_SETWRAPMODE = 2268, //! SCI_GETWRAPMODE = 2269, //! SCI_SETLAYOUTCACHE = 2272, //! SCI_GETLAYOUTCACHE = 2273, //! SCI_SETSCROLLWIDTH = 2274, //! SCI_GETSCROLLWIDTH = 2275, //! This message returns the width of some text when rendered in a //! particular style. //! \a wParam is the style number and is one of the STYLE_* values or //! one of the styles defined by a lexer. //! \a lParam is a pointer to the text. SCI_TEXTWIDTH = 2276, //! SCI_SETENDATLASTLINE = 2277, //! SCI_GETENDATLASTLINE = 2278, //! SCI_TEXTHEIGHT = 2279, //! SCI_SETVSCROLLBAR = 2280, //! SCI_GETVSCROLLBAR = 2281, //! SCI_APPENDTEXT = 2282, //! SCI_GETTWOPHASEDRAW = 2283, //! SCI_SETTWOPHASEDRAW = 2284, //! SCI_AUTOCGETTYPESEPARATOR = 2285, //! SCI_AUTOCSETTYPESEPARATOR = 2286, //! SCI_TARGETFROMSELECTION = 2287, //! SCI_LINESJOIN = 2288, //! SCI_LINESSPLIT = 2289, //! SCI_SETFOLDMARGINCOLOUR = 2290, //! SCI_SETFOLDMARGINHICOLOUR = 2291, //! SCI_MARKERSETBACKSELECTED = 2292, //! SCI_MARKERENABLEHIGHLIGHT = 2293, //! SCI_LINEDOWN = 2300, //! SCI_LINEDOWNEXTEND = 2301, //! SCI_LINEUP = 2302, //! SCI_LINEUPEXTEND = 2303, //! SCI_CHARLEFT = 2304, //! SCI_CHARLEFTEXTEND = 2305, //! SCI_CHARRIGHT = 2306, //! SCI_CHARRIGHTEXTEND = 2307, //! SCI_WORDLEFT = 2308, //! SCI_WORDLEFTEXTEND = 2309, //! SCI_WORDRIGHT = 2310, //! SCI_WORDRIGHTEXTEND = 2311, //! SCI_HOME = 2312, //! SCI_HOMEEXTEND = 2313, //! SCI_LINEEND = 2314, //! SCI_LINEENDEXTEND = 2315, //! SCI_DOCUMENTSTART = 2316, //! SCI_DOCUMENTSTARTEXTEND = 2317, //! SCI_DOCUMENTEND = 2318, //! SCI_DOCUMENTENDEXTEND = 2319, //! SCI_PAGEUP = 2320, //! SCI_PAGEUPEXTEND = 2321, //! SCI_PAGEDOWN = 2322, //! SCI_PAGEDOWNEXTEND = 2323, //! SCI_EDITTOGGLEOVERTYPE = 2324, //! SCI_CANCEL = 2325, //! SCI_DELETEBACK = 2326, //! SCI_TAB = 2327, //! SCI_BACKTAB = 2328, //! SCI_NEWLINE = 2329, //! SCI_FORMFEED = 2330, //! SCI_VCHOME = 2331, //! SCI_VCHOMEEXTEND = 2332, //! SCI_ZOOMIN = 2333, //! SCI_ZOOMOUT = 2334, //! SCI_DELWORDLEFT = 2335, //! SCI_DELWORDRIGHT = 2336, //! SCI_LINECUT = 2337, //! SCI_LINEDELETE = 2338, //! SCI_LINETRANSPOSE = 2339, //! SCI_LOWERCASE = 2340, //! SCI_UPPERCASE = 2341, //! SCI_LINESCROLLDOWN = 2342, //! SCI_LINESCROLLUP = 2343, //! SCI_DELETEBACKNOTLINE = 2344, //! SCI_HOMEDISPLAY = 2345, //! SCI_HOMEDISPLAYEXTEND = 2346, //! SCI_LINEENDDISPLAY = 2347, //! SCI_LINEENDDISPLAYEXTEND = 2348, //! SCI_MOVECARETINSIDEVIEW = 2401, //! SCI_LINELENGTH = 2350, //! SCI_BRACEHIGHLIGHT = 2351, //! SCI_BRACEBADLIGHT = 2352, //! SCI_BRACEMATCH = 2353, //! SCI_GETVIEWEOL = 2355, //! SCI_SETVIEWEOL = 2356, //! SCI_GETDOCPOINTER = 2357, //! SCI_SETDOCPOINTER = 2358, //! SCI_SETMODEVENTMASK = 2359, //! SCI_GETEDGECOLUMN = 2360, //! SCI_SETEDGECOLUMN = 2361, //! SCI_GETEDGEMODE = 2362, //! SCI_SETEDGEMODE = 2363, //! SCI_GETEDGECOLOUR = 2364, //! SCI_SETEDGECOLOUR = 2365, //! SCI_SEARCHANCHOR = 2366, //! SCI_SEARCHNEXT = 2367, //! SCI_SEARCHPREV = 2368, //! SCI_LINESONSCREEN = 2370, //! SCI_USEPOPUP = 2371, //! SCI_SELECTIONISRECTANGLE = 2372, //! SCI_SETZOOM = 2373, //! SCI_GETZOOM = 2374, //! SCI_CREATEDOCUMENT = 2375, //! SCI_ADDREFDOCUMENT = 2376, //! SCI_RELEASEDOCUMENT = 2377, //! SCI_GETMODEVENTMASK = 2378, //! SCI_SETFOCUS = 2380, //! SCI_GETFOCUS = 2381, //! SCI_SETSTATUS = 2382, //! SCI_GETSTATUS = 2383, //! SCI_SETMOUSEDOWNCAPTURES = 2384, //! SCI_GETMOUSEDOWNCAPTURES = 2385, //! SCI_SETCURSOR = 2386, //! SCI_GETCURSOR = 2387, //! SCI_SETCONTROLCHARSYMBOL = 2388, //! SCI_GETCONTROLCHARSYMBOL = 2389, //! SCI_WORDPARTLEFT = 2390, //! SCI_WORDPARTLEFTEXTEND = 2391, //! SCI_WORDPARTRIGHT = 2392, //! SCI_WORDPARTRIGHTEXTEND = 2393, //! SCI_SETVISIBLEPOLICY = 2394, //! SCI_DELLINELEFT = 2395, //! SCI_DELLINERIGHT = 2396, //! SCI_SETXOFFSET = 2397, //! SCI_GETXOFFSET = 2398, //! SCI_CHOOSECARETX = 2399, //! SCI_GRABFOCUS = 2400, //! SCI_SETXCARETPOLICY = 2402, //! SCI_SETYCARETPOLICY = 2403, //! SCI_LINEDUPLICATE = 2404, //! This message takes a copy of an image and registers it so that it //! can be refered to by a unique integer identifier. //! \a wParam is the image's identifier. //! \a lParam is a pointer to a QPixmap instance. Note that in other //! ports of Scintilla this is a pointer to either raw or textual XPM //! image data. //! //! \sa SCI_CLEARREGISTEREDIMAGES, SCI_REGISTERRGBAIMAGE SCI_REGISTERIMAGE = 2405, //! SCI_SETPRINTWRAPMODE = 2406, //! SCI_GETPRINTWRAPMODE = 2407, //! This message de-registers all currently registered images. //! //! \sa SCI_REGISTERIMAGE, SCI_REGISTERRGBAIMAGE SCI_CLEARREGISTEREDIMAGES = 2408, //! SCI_STYLESETHOTSPOT = 2409, //! SCI_SETHOTSPOTACTIVEFORE = 2410, //! SCI_SETHOTSPOTACTIVEBACK = 2411, //! SCI_SETHOTSPOTACTIVEUNDERLINE = 2412, //! SCI_PARADOWN = 2413, //! SCI_PARADOWNEXTEND = 2414, //! SCI_PARAUP = 2415, //! SCI_PARAUPEXTEND = 2416, //! SCI_POSITIONBEFORE = 2417, //! SCI_POSITIONAFTER = 2418, //! SCI_COPYRANGE = 2419, //! SCI_COPYTEXT = 2420, //! SCI_SETHOTSPOTSINGLELINE = 2421, //! SCI_SETSELECTIONMODE = 2422, //! SCI_GETSELECTIONMODE = 2423, //! SCI_GETLINESELSTARTPOSITION = 2424, //! SCI_GETLINESELENDPOSITION = 2425, //! SCI_LINEDOWNRECTEXTEND = 2426, //! SCI_LINEUPRECTEXTEND = 2427, //! SCI_CHARLEFTRECTEXTEND = 2428, //! SCI_CHARRIGHTRECTEXTEND = 2429, //! SCI_HOMERECTEXTEND = 2430, //! SCI_VCHOMERECTEXTEND = 2431, //! SCI_LINEENDRECTEXTEND = 2432, //! SCI_PAGEUPRECTEXTEND = 2433, //! SCI_PAGEDOWNRECTEXTEND = 2434, //! SCI_STUTTEREDPAGEUP = 2435, //! SCI_STUTTEREDPAGEUPEXTEND = 2436, //! SCI_STUTTEREDPAGEDOWN = 2437, //! SCI_STUTTEREDPAGEDOWNEXTEND = 2438, //! SCI_WORDLEFTEND = 2439, //! SCI_WORDLEFTENDEXTEND = 2440, //! SCI_WORDRIGHTEND = 2441, //! SCI_WORDRIGHTENDEXTEND = 2442, //! SCI_SETWHITESPACECHARS = 2443, //! SCI_SETCHARSDEFAULT = 2444, //! SCI_AUTOCGETCURRENT = 2445, //! SCI_ALLOCATE = 2446, //! SCI_HOMEWRAP = 2349, //! SCI_HOMEWRAPEXTEND = 2450, //! SCI_LINEENDWRAP = 2451, //! SCI_LINEENDWRAPEXTEND = 2452, //! SCI_VCHOMEWRAP = 2453, //! SCI_VCHOMEWRAPEXTEND = 2454, //! SCI_LINECOPY = 2455, //! SCI_FINDCOLUMN = 2456, //! SCI_GETCARETSTICKY = 2457, //! SCI_SETCARETSTICKY = 2458, //! SCI_TOGGLECARETSTICKY = 2459, //! SCI_SETWRAPVISUALFLAGS = 2460, //! SCI_GETWRAPVISUALFLAGS = 2461, //! SCI_SETWRAPVISUALFLAGSLOCATION = 2462, //! SCI_GETWRAPVISUALFLAGSLOCATION = 2463, //! SCI_SETWRAPSTARTINDENT = 2464, //! SCI_GETWRAPSTARTINDENT = 2465, //! SCI_MARKERADDSET = 2466, //! SCI_SETPASTECONVERTENDINGS = 2467, //! SCI_GETPASTECONVERTENDINGS = 2468, //! SCI_SELECTIONDUPLICATE = 2469, //! SCI_SETCARETLINEBACKALPHA = 2470, //! SCI_GETCARETLINEBACKALPHA = 2471, //! SCI_SETWRAPINDENTMODE = 2472, //! SCI_GETWRAPINDENTMODE = 2473, //! SCI_MARKERSETALPHA = 2476, //! SCI_GETSELALPHA = 2477, //! SCI_SETSELALPHA = 2478, //! SCI_GETSELEOLFILLED = 2479, //! SCI_SETSELEOLFILLED = 2480, //! SCI_STYLEGETFORE = 2481, //! SCI_STYLEGETBACK = 2482, //! SCI_STYLEGETBOLD = 2483, //! SCI_STYLEGETITALIC = 2484, //! SCI_STYLEGETSIZE = 2485, //! SCI_STYLEGETFONT = 2486, //! SCI_STYLEGETEOLFILLED = 2487, //! SCI_STYLEGETUNDERLINE = 2488, //! SCI_STYLEGETCASE = 2489, //! SCI_STYLEGETCHARACTERSET = 2490, //! SCI_STYLEGETVISIBLE = 2491, //! SCI_STYLEGETCHANGEABLE = 2492, //! SCI_STYLEGETHOTSPOT = 2493, //! SCI_GETHOTSPOTACTIVEFORE = 2494, //! SCI_GETHOTSPOTACTIVEBACK = 2495, //! SCI_GETHOTSPOTACTIVEUNDERLINE = 2496, //! SCI_GETHOTSPOTSINGLELINE = 2497, //! SCI_BRACEHIGHLIGHTINDICATOR = 2498, //! SCI_BRACEBADLIGHTINDICATOR = 2499, //! SCI_SETINDICATORCURRENT = 2500, //! SCI_GETINDICATORCURRENT = 2501, //! SCI_SETINDICATORVALUE = 2502, //! SCI_GETINDICATORVALUE = 2503, //! SCI_INDICATORFILLRANGE = 2504, //! SCI_INDICATORCLEARRANGE = 2505, //! SCI_INDICATORALLONFOR = 2506, //! SCI_INDICATORVALUEAT = 2507, //! SCI_INDICATORSTART = 2508, //! SCI_INDICATOREND = 2509, //! SCI_INDICSETUNDER = 2510, //! SCI_INDICGETUNDER = 2511, //! SCI_SETCARETSTYLE = 2512, //! SCI_GETCARETSTYLE = 2513, //! SCI_SETPOSITIONCACHE = 2514, //! SCI_GETPOSITIONCACHE = 2515, //! SCI_SETSCROLLWIDTHTRACKING = 2516, //! SCI_GETSCROLLWIDTHTRACKING = 2517, //! SCI_DELWORDRIGHTEND = 2518, //! This message copies the selection. If the selection is empty then //! copy the line with the caret. SCI_COPYALLOWLINE = 2519, //! This message returns a pointer to the document text. Any //! subsequent message will invalidate the pointer. SCI_GETCHARACTERPOINTER = 2520, //! SCI_INDICSETALPHA = 2523, //! SCI_INDICGETALPHA = 2524, //! SCI_SETEXTRAASCENT = 2525, //! SCI_GETEXTRAASCENT = 2526, //! SCI_SETEXTRADESCENT = 2527, //! SCI_GETEXTRADESCENT = 2528, //! SCI_MARKERSYMBOLDEFINED = 2529, //! SCI_MARGINSETTEXT = 2530, //! SCI_MARGINGETTEXT = 2531, //! SCI_MARGINSETSTYLE = 2532, //! SCI_MARGINGETSTYLE = 2533, //! SCI_MARGINSETSTYLES = 2534, //! SCI_MARGINGETSTYLES = 2535, //! SCI_MARGINTEXTCLEARALL = 2536, //! SCI_MARGINSETSTYLEOFFSET = 2537, //! SCI_MARGINGETSTYLEOFFSET = 2538, //! SCI_SETMARGINOPTIONS = 2539, //! SCI_ANNOTATIONSETTEXT = 2540, //! SCI_ANNOTATIONGETTEXT = 2541, //! SCI_ANNOTATIONSETSTYLE = 2542, //! SCI_ANNOTATIONGETSTYLE = 2543, //! SCI_ANNOTATIONSETSTYLES = 2544, //! SCI_ANNOTATIONGETSTYLES = 2545, //! SCI_ANNOTATIONGETLINES = 2546, //! SCI_ANNOTATIONCLEARALL = 2547, //! SCI_ANNOTATIONSETVISIBLE = 2548, //! SCI_ANNOTATIONGETVISIBLE = 2549, //! SCI_ANNOTATIONSETSTYLEOFFSET = 2550, //! SCI_ANNOTATIONGETSTYLEOFFSET = 2551, //! SCI_RELEASEALLEXTENDEDSTYLES = 2552, //! SCI_ALLOCATEEXTENDEDSTYLES = 2553, //! SCI_SETEMPTYSELECTION = 2556, //! SCI_GETMARGINOPTIONS = 2557, //! SCI_INDICSETOUTLINEALPHA = 2558, //! SCI_INDICGETOUTLINEALPHA = 2559, //! SCI_ADDUNDOACTION = 2560, //! SCI_CHARPOSITIONFROMPOINT = 2561, //! SCI_CHARPOSITIONFROMPOINTCLOSE = 2562, //! SCI_SETMULTIPLESELECTION = 2563, //! SCI_GETMULTIPLESELECTION = 2564, //! SCI_SETADDITIONALSELECTIONTYPING = 2565, //! SCI_GETADDITIONALSELECTIONTYPING = 2566, //! SCI_SETADDITIONALCARETSBLINK = 2567, //! SCI_GETADDITIONALCARETSBLINK = 2568, //! SCI_SCROLLRANGE = 2569, //! SCI_GETSELECTIONS = 2570, //! SCI_CLEARSELECTIONS = 2571, //! SCI_SETSELECTION = 2572, //! SCI_ADDSELECTION = 2573, //! SCI_SETMAINSELECTION = 2574, //! SCI_GETMAINSELECTION = 2575, //! SCI_SETSELECTIONNCARET = 2576, //! SCI_GETSELECTIONNCARET = 2577, //! SCI_SETSELECTIONNANCHOR = 2578, //! SCI_GETSELECTIONNANCHOR = 2579, //! SCI_SETSELECTIONNCARETVIRTUALSPACE = 2580, //! SCI_GETSELECTIONNCARETVIRTUALSPACE = 2581, //! SCI_SETSELECTIONNANCHORVIRTUALSPACE = 2582, //! SCI_GETSELECTIONNANCHORVIRTUALSPACE = 2583, //! SCI_SETSELECTIONNSTART = 2584, //! SCI_GETSELECTIONNSTART = 2585, //! SCI_SETSELECTIONNEND = 2586, //! SCI_GETSELECTIONNEND = 2587, //! SCI_SETRECTANGULARSELECTIONCARET = 2588, //! SCI_GETRECTANGULARSELECTIONCARET = 2589, //! SCI_SETRECTANGULARSELECTIONANCHOR = 2590, //! SCI_GETRECTANGULARSELECTIONANCHOR = 2591, //! SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2592, //! SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2593, //! SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2594, //! SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2595, //! SCI_SETVIRTUALSPACEOPTIONS = 2596, //! SCI_GETVIRTUALSPACEOPTIONS = 2597, //! SCI_SETRECTANGULARSELECTIONMODIFIER = 2598, //! SCI_GETRECTANGULARSELECTIONMODIFIER = 2599, //! SCI_SETADDITIONALSELFORE = 2600, //! SCI_SETADDITIONALSELBACK = 2601, //! SCI_SETADDITIONALSELALPHA = 2602, //! SCI_GETADDITIONALSELALPHA = 2603, //! SCI_SETADDITIONALCARETFORE = 2604, //! SCI_GETADDITIONALCARETFORE = 2605, //! SCI_ROTATESELECTION = 2606, //! SCI_SWAPMAINANCHORCARET = 2607, //! SCI_SETADDITIONALCARETSVISIBLE = 2608, //! SCI_GETADDITIONALCARETSVISIBLE = 2609, //! SCI_AUTOCGETCURRENTTEXT = 2610, //! SCI_SETFONTQUALITY = 2611, //! SCI_GETFONTQUALITY = 2612, //! SCI_SETFIRSTVISIBLELINE = 2613, //! SCI_SETMULTIPASTE = 2614, //! SCI_GETMULTIPASTE = 2615, //! SCI_GETTAG = 2616, //! SCI_CHANGELEXERSTATE = 2617, //! SCI_CONTRACTEDFOLDNEXT = 2618, //! SCI_VERTICALCENTRECARET = 2619, //! SCI_MOVESELECTEDLINESUP = 2620, //! SCI_MOVESELECTEDLINESDOWN = 2621, //! SCI_SETIDENTIFIER = 2622, //! SCI_GETIDENTIFIER = 2623, //! This message sets the width of an RGBA image specified by a future //! call to SCI_MARKERDEFINERGBAIMAGE or SCI_REGISTERRGBAIMAGE. //! //! \sa SCI_RGBAIMAGESETHEIGHT, SCI_MARKERDEFINERGBAIMAGE, //! SCI_REGISTERRGBAIMAGE. SCI_RGBAIMAGESETWIDTH = 2624, //! This message sets the height of an RGBA image specified by a future //! call to SCI_MARKERDEFINERGBAIMAGE or SCI_REGISTERRGBAIMAGE. //! //! \sa SCI_RGBAIMAGESETWIDTH, SCI_MARKERDEFINERGBAIMAGE, //! SCI_REGISTERRGBAIMAGE. SCI_RGBAIMAGESETHEIGHT = 2625, //! This message sets the symbol used to draw one of the 32 markers to //! an RGBA image. RGBA images use the SC_MARK_RGBAIMAGE marker //! symbol. //! \a wParam is the number of the marker. //! \a lParam is a pointer to a QImage instance. Note that in other //! ports of Scintilla this is a pointer to raw RGBA image data. //! //! \sa SCI_MARKERDEFINE, SCI_MARKERDEFINEPIXMAP SCI_MARKERDEFINERGBAIMAGE = 2626, //! This message takes a copy of an image and registers it so that it //! can be refered to by a unique integer identifier. //! \a wParam is the image's identifier. //! \a lParam is a pointer to a QImage instance. Note that in other //! ports of Scintilla this is a pointer to raw RGBA image data. //! //! \sa SCI_CLEARREGISTEREDIMAGES, SCI_REGISTERIMAGE SCI_REGISTERRGBAIMAGE = 2627, //! SCI_SCROLLTOSTART = 2628, //! SCI_SCROLLTOEND = 2629, //! SCI_SETTECHNOLOGY = 2630, //! SCI_GETTECHNOLOGY = 2631, //! SCI_CREATELOADER = 2632, //! SCI_COUNTCHARACTERS = 2633, //! SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR = 2634, //! SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR = 2635, //! SCI_AUTOCSETMULTI = 2636, //! SCI_AUTOCGETMULTI = 2637, //! SCI_FINDINDICATORSHOW = 2640, //! SCI_FINDINDICATORFLASH = 2641, //! SCI_FINDINDICATORHIDE = 2642, //! SCI_GETRANGEPOINTER = 2643, //! SCI_GETGAPPOSITION = 2644, //! SCI_DELETERANGE = 2645, //! SCI_GETWORDCHARS = 2646, //! SCI_GETWHITESPACECHARS = 2647, //! SCI_SETPUNCTUATIONCHARS = 2648, //! SCI_GETPUNCTUATIONCHARS = 2649, //! SCI_GETSELECTIONEMPTY = 2650, //! SCI_RGBAIMAGESETSCALE = 2651, //! SCI_VCHOMEDISPLAY = 2652, //! SCI_VCHOMEDISPLAYEXTEND = 2653, //! SCI_GETCARETLINEVISIBLEALWAYS = 2654, //! SCI_SETCARETLINEVISIBLEALWAYS = 2655, //! SCI_SETLINEENDTYPESALLOWED = 2656, //! SCI_GETLINEENDTYPESALLOWED = 2657, //! SCI_GETLINEENDTYPESACTIVE = 2658, //! SCI_AUTOCSETORDER = 2660, //! SCI_AUTOCGETORDER = 2661, //! SCI_FOLDALL = 2662, //! SCI_SETAUTOMATICFOLD = 2663, //! SCI_GETAUTOMATICFOLD = 2664, //! SCI_SETREPRESENTATION = 2665, //! SCI_GETREPRESENTATION = 2666, //! SCI_CLEARREPRESENTATION = 2667, //! SCI_SETMOUSESELECTIONRECTANGULARSWITCH = 2668, //! SCI_GETMOUSESELECTIONRECTANGULARSWITCH = 2669, //! SCI_POSITIONRELATIVE = 2670, //! SCI_DROPSELECTIONN = 2671, //! SCI_CHANGEINSERTION = 2672, //! SCI_GETPHASESDRAW = 2673, //! SCI_SETPHASESDRAW = 2674, //! SCI_CLEARTABSTOPS = 2675, //! SCI_ADDTABSTOP = 2676, //! SCI_GETNEXTTABSTOP = 2677, //! SCI_GETIMEINTERACTION = 2678, //! SCI_SETIMEINTERACTION = 2679, //! SCI_INDICSETHOVERSTYLE = 2680, //! SCI_INDICGETHOVERSTYLE = 2681, //! SCI_INDICSETHOVERFORE = 2682, //! SCI_INDICGETHOVERFORE = 2683, //! SCI_INDICSETFLAGS = 2684, //! SCI_INDICGETFLAGS = 2685, //! SCI_SETTARGETRANGE = 2686, //! SCI_GETTARGETTEXT = 2687, //! SCI_MULTIPLESELECTADDNEXT = 2688, //! SCI_MULTIPLESELECTADDEACH = 2689, //! SCI_TARGETWHOLEDOCUMENT = 2690, //! SCI_ISRANGEWORD = 2691, //! SCI_SETIDLESTYLING = 2692, //! SCI_GETIDLESTYLING = 2693, //! SCI_MULTIEDGEADDLINE = 2694, //! SCI_MULTIEDGECLEARALL = 2695, //! SCI_SETMOUSEWHEELCAPTURES = 2696, //! SCI_GETMOUSEWHEELCAPTURES = 2697, //! SCI_GETTABDRAWMODE = 2698, //! SCI_SETTABDRAWMODE = 2699, //! SCI_TOGGLEFOLDSHOWTEXT = 2700, //! SCI_FOLDDISPLAYTEXTSETSTYLE = 2701, //! SCI_STARTRECORD = 3001, //! SCI_STOPRECORD = 3002, //! This message sets the number of the lexer to use for syntax //! styling. //! \a wParam is the number of the lexer and is one of the SCLEX_* //! values. SCI_SETLEXER = 4001, //! This message returns the number of the lexer being used for syntax //! styling. SCI_GETLEXER = 4002, //! SCI_COLOURISE = 4003, //! SCI_SETPROPERTY = 4004, //! SCI_SETKEYWORDS = 4005, //! This message sets the name of the lexer to use for syntax styling. //! \a wParam is unused. //! \a lParam is the name of the lexer. SCI_SETLEXERLANGUAGE = 4006, //! SCI_LOADLEXERLIBRARY = 4007, //! SCI_GETPROPERTY = 4008, //! SCI_GETPROPERTYEXPANDED = 4009, //! SCI_GETPROPERTYINT = 4010, //! SCI_GETSTYLEBITSNEEDED = 4011, //! SCI_GETLEXERLANGUAGE = 4012, //! SCI_PRIVATELEXERCALL = 4013, //! SCI_PROPERTYNAMES = 4014, //! SCI_PROPERTYTYPE = 4015, //! SCI_DESCRIBEPROPERTY = 4016, //! SCI_DESCRIBEKEYWORDSETS = 4017, //! SCI_GETLINEENDTYPESSUPPORTED = 4018, //! SCI_ALLOCATESUBSTYLES = 4020, //! SCI_GETSUBSTYLESSTART = 4021, //! SCI_GETSUBSTYLESLENGTH = 4022, //! SCI_GETSTYLEFROMSUBSTYLE = 4027, //! SCI_GETPRIMARYSTYLEFROMSTYLE = 4028, //! SCI_FREESUBSTYLES = 4023, //! SCI_SETIDENTIFIERS = 4024, //! SCI_DISTANCETOSECONDARYSTYLES = 4025, //! SCI_GETSUBSTYLEBASES = 4026, }; enum { SC_AC_FILLUP = 1, SC_AC_DOUBLECLICK = 2, SC_AC_TAB = 3, SC_AC_NEWLINE = 4, SC_AC_COMMAND = 5, }; enum { SC_ALPHA_TRANSPARENT = 0, SC_ALPHA_OPAQUE = 255, SC_ALPHA_NOALPHA = 256 }; enum { SC_CARETSTICKY_OFF = 0, SC_CARETSTICKY_ON = 1, SC_CARETSTICKY_WHITESPACE = 2 }; enum { SC_EFF_QUALITY_MASK = 0x0f, SC_EFF_QUALITY_DEFAULT = 0, SC_EFF_QUALITY_NON_ANTIALIASED = 1, SC_EFF_QUALITY_ANTIALIASED = 2, SC_EFF_QUALITY_LCD_OPTIMIZED = 3 }; enum { SC_IDLESTYLING_NONE = 0, SC_IDLESTYLING_TOVISIBLE = 1, SC_IDLESTYLING_AFTERVISIBLE = 2, SC_IDLESTYLING_ALL = 3, }; enum { SC_IME_WINDOWED = 0, SC_IME_INLINE = 1, }; enum { SC_MARGINOPTION_NONE = 0x00, SC_MARGINOPTION_SUBLINESELECT = 0x01 }; enum { SC_MULTIAUTOC_ONCE = 0, SC_MULTIAUTOC_EACH = 1 }; enum { SC_MULTIPASTE_ONCE = 0, SC_MULTIPASTE_EACH = 1 }; enum { SC_POPUP_NEVER = 0, SC_POPUP_ALL = 1, SC_POPUP_TEXT = 2, }; //! This enum defines the different selection modes. //! //! \sa SCI_GETSELECTIONMODE, SCI_SETSELECTIONMODE enum { SC_SEL_STREAM = 0, SC_SEL_RECTANGLE = 1, SC_SEL_LINES = 2, SC_SEL_THIN = 3 }; enum { SC_STATUS_OK = 0, SC_STATUS_FAILURE = 1, SC_STATUS_BADALLOC = 2, SC_STATUS_WARN_START = 1000, SC_STATUS_WARNREGEX = 1001, }; enum { SC_TYPE_BOOLEAN = 0, SC_TYPE_INTEGER = 1, SC_TYPE_STRING = 2 }; enum { SC_UPDATE_CONTENT = 0x01, SC_UPDATE_SELECTION = 0x02, SC_UPDATE_V_SCROLL = 0x04, SC_UPDATE_H_SCROLL = 0x08 }; enum { SC_WRAPVISUALFLAG_NONE = 0x0000, SC_WRAPVISUALFLAG_END = 0x0001, SC_WRAPVISUALFLAG_START = 0x0002, SC_WRAPVISUALFLAG_MARGIN = 0x0004 }; enum { SC_WRAPVISUALFLAGLOC_DEFAULT = 0x0000, SC_WRAPVISUALFLAGLOC_END_BY_TEXT = 0x0001, SC_WRAPVISUALFLAGLOC_START_BY_TEXT = 0x0002 }; enum { SCTD_LONGARROW = 0, SCTD_STRIKEOUT = 1, }; enum { SCVS_NONE = 0, SCVS_RECTANGULARSELECTION = 1, SCVS_USERACCESSIBLE = 2, SCVS_NOWRAPLINESTART = 4, }; enum { SCWS_INVISIBLE = 0, SCWS_VISIBLEALWAYS = 1, SCWS_VISIBLEAFTERINDENT = 2, SCWS_VISIBLEONLYININDENT = 3, }; enum { SC_EOL_CRLF = 0, SC_EOL_CR = 1, SC_EOL_LF = 2 }; enum { SC_CP_DBCS = 1, SC_CP_UTF8 = 65001 }; //! This enum defines the different marker symbols. //! //! \sa SCI_MARKERDEFINE enum { //! A circle. SC_MARK_CIRCLE = 0, //! A rectangle. SC_MARK_ROUNDRECT = 1, //! A triangle pointing to the right. SC_MARK_ARROW = 2, //! A smaller rectangle. SC_MARK_SMALLRECT = 3, //! An arrow pointing to the right. SC_MARK_SHORTARROW = 4, //! An invisible marker that allows code to track the movement //! of lines. SC_MARK_EMPTY = 5, //! A triangle pointing down. SC_MARK_ARROWDOWN = 6, //! A drawn minus sign. SC_MARK_MINUS = 7, //! A drawn plus sign. SC_MARK_PLUS = 8, //! A vertical line drawn in the background colour. SC_MARK_VLINE = 9, //! A bottom left corner drawn in the background colour. SC_MARK_LCORNER = 10, //! A vertical line with a centre right horizontal line drawn //! in the background colour. SC_MARK_TCORNER = 11, //! A drawn plus sign in a box. SC_MARK_BOXPLUS = 12, //! A drawn plus sign in a connected box. SC_MARK_BOXPLUSCONNECTED = 13, //! A drawn minus sign in a box. SC_MARK_BOXMINUS = 14, //! A drawn minus sign in a connected box. SC_MARK_BOXMINUSCONNECTED = 15, //! A rounded bottom left corner drawn in the background //! colour. SC_MARK_LCORNERCURVE = 16, //! A vertical line with a centre right curved line drawn in //! the background colour. SC_MARK_TCORNERCURVE = 17, //! A drawn plus sign in a circle. SC_MARK_CIRCLEPLUS = 18, //! A drawn plus sign in a connected box. SC_MARK_CIRCLEPLUSCONNECTED = 19, //! A drawn minus sign in a circle. SC_MARK_CIRCLEMINUS = 20, //! A drawn minus sign in a connected circle. SC_MARK_CIRCLEMINUSCONNECTED = 21, //! No symbol is drawn but the line is drawn with the same background //! color as the marker's. SC_MARK_BACKGROUND = 22, //! Three drawn dots. SC_MARK_DOTDOTDOT = 23, //! Three drawn arrows pointing right. SC_MARK_ARROWS = 24, //! An XPM format pixmap. SC_MARK_PIXMAP = 25, //! A full rectangle (ie. the margin background) using the marker's //! background color. SC_MARK_FULLRECT = 26, //! A left rectangle (ie. the left part of the margin background) using //! the marker's background color. SC_MARK_LEFTRECT = 27, //! The value is available for plugins to use. SC_MARK_AVAILABLE = 28, //! The line is underlined using the marker's background color. SC_MARK_UNDERLINE = 29, //! A RGBA format image. SC_MARK_RGBAIMAGE = 30, //! A bookmark. SC_MARK_BOOKMARK = 31, //! Characters can be used as symbols by adding this to the ASCII value //! of the character. SC_MARK_CHARACTER = 10000 }; enum { SC_MARKNUM_FOLDEREND = 25, SC_MARKNUM_FOLDEROPENMID = 26, SC_MARKNUM_FOLDERMIDTAIL = 27, SC_MARKNUM_FOLDERTAIL = 28, SC_MARKNUM_FOLDERSUB = 29, SC_MARKNUM_FOLDER = 30, SC_MARKNUM_FOLDEROPEN = 31, SC_MASK_FOLDERS = 0xfe000000 }; //! This enum defines what can be displayed in a margin. //! //! \sa SCI_GETMARGINTYPEN, SCI_SETMARGINTYPEN enum { //! The margin can display symbols. Note that all margins can display //! symbols. SC_MARGIN_SYMBOL = 0, //! The margin will display line numbers. SC_MARGIN_NUMBER = 1, //! The margin's background color will be set to the default background //! color. SC_MARGIN_BACK = 2, //! The margin's background color will be set to the default foreground //! color. SC_MARGIN_FORE = 3, //! The margin will display text. SC_MARGIN_TEXT = 4, //! The margin will display right justified text. SC_MARGIN_RTEXT = 5, //! The margin's background color will be set to the color set by //! SCI_SETMARGINBACKN. SC_MARGIN_COLOUR = 6, }; enum { STYLE_DEFAULT = 32, STYLE_LINENUMBER = 33, STYLE_BRACELIGHT = 34, STYLE_BRACEBAD = 35, STYLE_CONTROLCHAR = 36, STYLE_INDENTGUIDE = 37, STYLE_CALLTIP = 38, STYLE_FOLDDISPLAYTEXT = 39, STYLE_LASTPREDEFINED = 39, STYLE_MAX = 255 }; enum { SC_CHARSET_ANSI = 0, SC_CHARSET_DEFAULT = 1, SC_CHARSET_BALTIC = 186, SC_CHARSET_CHINESEBIG5 = 136, SC_CHARSET_EASTEUROPE = 238, SC_CHARSET_GB2312 = 134, SC_CHARSET_GREEK = 161, SC_CHARSET_HANGUL = 129, SC_CHARSET_MAC = 77, SC_CHARSET_OEM = 255, SC_CHARSET_RUSSIAN = 204, SC_CHARSET_OEM866 = 866, SC_CHARSET_CYRILLIC = 1251, SC_CHARSET_SHIFTJIS = 128, SC_CHARSET_SYMBOL = 2, SC_CHARSET_TURKISH = 162, SC_CHARSET_JOHAB = 130, SC_CHARSET_HEBREW = 177, SC_CHARSET_ARABIC = 178, SC_CHARSET_VIETNAMESE = 163, SC_CHARSET_THAI = 222, SC_CHARSET_8859_15 = 1000 }; enum { SC_CASE_MIXED = 0, SC_CASE_UPPER = 1, SC_CASE_LOWER = 2, SC_CASE_CAMEL = 3, }; //! This enum defines the different indentation guide views. //! //! \sa SCI_GETINDENTATIONGUIDES, SCI_SETINDENTATIONGUIDES enum { //! No indentation guides are shown. SC_IV_NONE = 0, //! Indentation guides are shown inside real indentation white space. SC_IV_REAL = 1, //! Indentation guides are shown beyond the actual indentation up to //! the level of the next non-empty line. If the previous non-empty //! line was a fold header then indentation guides are shown for one //! more level of indent than that line. This setting is good for //! Python. SC_IV_LOOKFORWARD = 2, //! Indentation guides are shown beyond the actual indentation up to //! the level of the next non-empty line or previous non-empty line //! whichever is the greater. This setting is good for most languages. SC_IV_LOOKBOTH = 3 }; enum { INDIC_PLAIN = 0, INDIC_SQUIGGLE = 1, INDIC_TT = 2, INDIC_DIAGONAL = 3, INDIC_STRIKE = 4, INDIC_HIDDEN = 5, INDIC_BOX = 6, INDIC_ROUNDBOX = 7, INDIC_STRAIGHTBOX = 8, INDIC_DASH = 9, INDIC_DOTS = 10, INDIC_SQUIGGLELOW = 11, INDIC_DOTBOX = 12, INDIC_SQUIGGLEPIXMAP = 13, INDIC_COMPOSITIONTHICK = 14, INDIC_COMPOSITIONTHIN = 15, INDIC_FULLBOX = 16, INDIC_TEXTFORE = 17, INDIC_POINT = 18, INDIC_POINTCHARACTER = 19, INDIC_IME = 32, INDIC_IME_MAX = 35, INDIC_CONTAINER = 8, INDIC_MAX = 35, INDIC0_MASK = 0x20, INDIC1_MASK = 0x40, INDIC2_MASK = 0x80, INDICS_MASK = 0xe0, SC_INDICVALUEBIT = 0x01000000, SC_INDICVALUEMASK = 0x00ffffff, SC_INDICFLAG_VALUEBEFORE = 1, }; enum { SC_PRINT_NORMAL = 0, SC_PRINT_INVERTLIGHT = 1, SC_PRINT_BLACKONWHITE = 2, SC_PRINT_COLOURONWHITE = 3, SC_PRINT_COLOURONWHITEDEFAULTBG = 4 }; enum { SCFIND_WHOLEWORD = 2, SCFIND_MATCHCASE = 4, SCFIND_WORDSTART = 0x00100000, SCFIND_REGEXP = 0x00200000, SCFIND_POSIX = 0x00400000, SCFIND_CXX11REGEX = 0x00800000, }; enum { SC_FOLDDISPLAYTEXT_HIDDEN = 0, SC_FOLDDISPLAYTEXT_STANDARD = 1, SC_FOLDDISPLAYTEXT_BOXED = 2, }; enum { SC_FOLDLEVELBASE = 0x00400, SC_FOLDLEVELWHITEFLAG = 0x01000, SC_FOLDLEVELHEADERFLAG = 0x02000, SC_FOLDLEVELNUMBERMASK = 0x00fff }; enum { SC_FOLDFLAG_LINEBEFORE_EXPANDED = 0x0002, SC_FOLDFLAG_LINEBEFORE_CONTRACTED = 0x0004, SC_FOLDFLAG_LINEAFTER_EXPANDED = 0x0008, SC_FOLDFLAG_LINEAFTER_CONTRACTED = 0x0010, SC_FOLDFLAG_LEVELNUMBERS = 0x0040, SC_FOLDFLAG_LINESTATE = 0x0080, }; enum { SC_LINE_END_TYPE_DEFAULT = 0, SC_LINE_END_TYPE_UNICODE = 1, }; enum { SC_TIME_FOREVER = 10000000 }; enum { SC_WRAP_NONE = 0, SC_WRAP_WORD = 1, SC_WRAP_CHAR = 2, SC_WRAP_WHITESPACE = 3, }; enum { SC_WRAPINDENT_FIXED = 0, SC_WRAPINDENT_SAME = 1, SC_WRAPINDENT_INDENT = 2 }; enum { SC_CACHE_NONE = 0, SC_CACHE_CARET = 1, SC_CACHE_PAGE = 2, SC_CACHE_DOCUMENT = 3 }; enum { SC_PHASES_ONE = 0, SC_PHASES_TWO = 1, SC_PHASES_MULTIPLE = 2, }; enum { ANNOTATION_HIDDEN = 0, ANNOTATION_STANDARD = 1, ANNOTATION_BOXED = 2, ANNOTATION_INDENTED = 3, }; enum { EDGE_NONE = 0, EDGE_LINE = 1, EDGE_BACKGROUND = 2, EDGE_MULTILINE = 3, }; enum { SC_CURSORNORMAL = -1, SC_CURSORARROW = 2, SC_CURSORWAIT = 4, SC_CURSORREVERSEARROW = 7 }; enum { UNDO_MAY_COALESCE = 1 }; enum { VISIBLE_SLOP = 0x01, VISIBLE_STRICT = 0x04 }; enum { CARET_SLOP = 0x01, CARET_STRICT = 0x04, CARET_JUMPS = 0x10, CARET_EVEN = 0x08 }; enum { CARETSTYLE_INVISIBLE = 0, CARETSTYLE_LINE = 1, CARETSTYLE_BLOCK = 2 }; enum { SC_MOD_INSERTTEXT = 0x1, SC_MOD_DELETETEXT = 0x2, SC_MOD_CHANGESTYLE = 0x4, SC_MOD_CHANGEFOLD = 0x8, SC_PERFORMED_USER = 0x10, SC_PERFORMED_UNDO = 0x20, SC_PERFORMED_REDO = 0x40, SC_MULTISTEPUNDOREDO = 0x80, SC_LASTSTEPINUNDOREDO = 0x100, SC_MOD_CHANGEMARKER = 0x200, SC_MOD_BEFOREINSERT = 0x400, SC_MOD_BEFOREDELETE = 0x800, SC_MULTILINEUNDOREDO = 0x1000, SC_STARTACTION = 0x2000, SC_MOD_CHANGEINDICATOR = 0x4000, SC_MOD_CHANGELINESTATE = 0x8000, SC_MOD_CHANGEMARGIN = 0x10000, SC_MOD_CHANGEANNOTATION = 0x20000, SC_MOD_CONTAINER = 0x40000, SC_MOD_LEXERSTATE = 0x80000, SC_MOD_INSERTCHECK = 0x100000, SC_MOD_CHANGETABSTOPS = 0x200000, SC_MODEVENTMASKALL = 0x3fffff }; enum { SCK_DOWN = 300, SCK_UP = 301, SCK_LEFT = 302, SCK_RIGHT = 303, SCK_HOME = 304, SCK_END = 305, SCK_PRIOR = 306, SCK_NEXT = 307, SCK_DELETE = 308, SCK_INSERT = 309, SCK_ESCAPE = 7, SCK_BACK = 8, SCK_TAB = 9, SCK_RETURN = 13, SCK_ADD = 310, SCK_SUBTRACT = 311, SCK_DIVIDE = 312, SCK_WIN = 313, SCK_RWIN = 314, SCK_MENU = 315 }; //! This enum defines the different modifier keys. enum { //! No modifier key. SCMOD_NORM = 0, //! Shift key. SCMOD_SHIFT = 1, //! Control key (the Command key on OS/X, the Ctrl key on other //! platforms). SCMOD_CTRL = 2, //! Alt key. SCMOD_ALT = 4, //! This is the same as SCMOD_META on all platforms. SCMOD_SUPER = 8, //! Meta key (the Ctrl key on OS/X, the Windows key on other //! platforms). SCMOD_META = 16 }; //! This enum defines the different language lexers. //! //! \sa SCI_GETLEXER, SCI_SETLEXER enum { //! No lexer is selected and the SCN_STYLENEEDED signal is emitted so //! that the application can style the text as needed. This is the //! default. SCLEX_CONTAINER = 0, //! Select the null lexer that does no syntax styling. SCLEX_NULL = 1, //! Select the Python lexer. SCLEX_PYTHON = 2, //! Select the C++ lexer. SCLEX_CPP = 3, //! Select the HTML lexer. SCLEX_HTML = 4, //! Select the XML lexer. SCLEX_XML = 5, //! Select the Perl lexer. SCLEX_PERL = 6, //! Select the SQL lexer. SCLEX_SQL = 7, //! Select the Visual Basic lexer. SCLEX_VB = 8, //! Select the lexer for properties style files. SCLEX_PROPERTIES = 9, //! Select the lexer for error list style files. SCLEX_ERRORLIST = 10, //! Select the Makefile lexer. SCLEX_MAKEFILE = 11, //! Select the Windows batch file lexer. SCLEX_BATCH = 12, //! Select the LaTex lexer. SCLEX_LATEX = 14, //! Select the Lua lexer. SCLEX_LUA = 15, //! Select the lexer for diff output. SCLEX_DIFF = 16, //! Select the lexer for Apache configuration files. SCLEX_CONF = 17, //! Select the Pascal lexer. SCLEX_PASCAL = 18, //! Select the Avenue lexer. SCLEX_AVE = 19, //! Select the Ada lexer. SCLEX_ADA = 20, //! Select the Lisp lexer. SCLEX_LISP = 21, //! Select the Ruby lexer. SCLEX_RUBY = 22, //! Select the Eiffel lexer. SCLEX_EIFFEL = 23, //! Select the Eiffel lexer folding at keywords. SCLEX_EIFFELKW = 24, //! Select the Tcl lexer. SCLEX_TCL = 25, //! Select the lexer for nnCron files. SCLEX_NNCRONTAB = 26, //! Select the Bullant lexer. SCLEX_BULLANT = 27, //! Select the VBScript lexer. SCLEX_VBSCRIPT = 28, //! Select the ASP lexer. SCLEX_ASP = SCLEX_HTML, //! Select the PHP lexer. SCLEX_PHP = SCLEX_HTML, //! Select the Baan lexer. SCLEX_BAAN = 31, //! Select the Matlab lexer. SCLEX_MATLAB = 32, //! Select the Scriptol lexer. SCLEX_SCRIPTOL = 33, //! Select the assembler lexer (';' comment character). SCLEX_ASM = 34, //! Select the C++ lexer with case insensitive keywords. SCLEX_CPPNOCASE = 35, //! Select the FORTRAN lexer. SCLEX_FORTRAN = 36, //! Select the FORTRAN77 lexer. SCLEX_F77 = 37, //! Select the CSS lexer. SCLEX_CSS = 38, //! Select the POV lexer. SCLEX_POV = 39, //! Select the Basser Lout typesetting language lexer. SCLEX_LOUT = 40, //! Select the EScript lexer. SCLEX_ESCRIPT = 41, //! Select the PostScript lexer. SCLEX_PS = 42, //! Select the NSIS lexer. SCLEX_NSIS = 43, //! Select the MMIX assembly language lexer. SCLEX_MMIXAL = 44, //! Select the Clarion lexer. SCLEX_CLW = 45, //! Select the Clarion lexer with case insensitive keywords. SCLEX_CLWNOCASE = 46, //! Select the MPT text log file lexer. SCLEX_LOT = 47, //! Select the YAML lexer. SCLEX_YAML = 48, //! Select the TeX lexer. SCLEX_TEX = 49, //! Select the Metapost lexer. SCLEX_METAPOST = 50, //! Select the PowerBASIC lexer. SCLEX_POWERBASIC = 51, //! Select the Forth lexer. SCLEX_FORTH = 52, //! Select the Erlang lexer. SCLEX_ERLANG = 53, //! Select the Octave lexer. SCLEX_OCTAVE = 54, //! Select the MS SQL lexer. SCLEX_MSSQL = 55, //! Select the Verilog lexer. SCLEX_VERILOG = 56, //! Select the KIX-Scripts lexer. SCLEX_KIX = 57, //! Select the Gui4Cli lexer. SCLEX_GUI4CLI = 58, //! Select the Specman E lexer. SCLEX_SPECMAN = 59, //! Select the AutoIt3 lexer. SCLEX_AU3 = 60, //! Select the APDL lexer. SCLEX_APDL = 61, //! Select the Bash lexer. SCLEX_BASH = 62, //! Select the ASN.1 lexer. SCLEX_ASN1 = 63, //! Select the VHDL lexer. SCLEX_VHDL = 64, //! Select the Caml lexer. SCLEX_CAML = 65, //! Select the BlitzBasic lexer. SCLEX_BLITZBASIC = 66, //! Select the PureBasic lexer. SCLEX_PUREBASIC = 67, //! Select the Haskell lexer. SCLEX_HASKELL = 68, //! Select the PHPScript lexer. SCLEX_PHPSCRIPT = 69, //! Select the TADS3 lexer. SCLEX_TADS3 = 70, //! Select the REBOL lexer. SCLEX_REBOL = 71, //! Select the Smalltalk lexer. SCLEX_SMALLTALK = 72, //! Select the FlagShip lexer. SCLEX_FLAGSHIP = 73, //! Select the Csound lexer. SCLEX_CSOUND = 74, //! Select the FreeBasic lexer. SCLEX_FREEBASIC = 75, //! Select the InnoSetup lexer. SCLEX_INNOSETUP = 76, //! Select the Opal lexer. SCLEX_OPAL = 77, //! Select the Spice lexer. SCLEX_SPICE = 78, //! Select the D lexer. SCLEX_D = 79, //! Select the CMake lexer. SCLEX_CMAKE = 80, //! Select the GAP lexer. SCLEX_GAP = 81, //! Select the PLM lexer. SCLEX_PLM = 82, //! Select the Progress lexer. SCLEX_PROGRESS = 83, //! Select the Abaqus lexer. SCLEX_ABAQUS = 84, //! Select the Asymptote lexer. SCLEX_ASYMPTOTE = 85, //! Select the R lexer. SCLEX_R = 86, //! Select the MagikSF lexer. SCLEX_MAGIK = 87, //! Select the PowerShell lexer. SCLEX_POWERSHELL = 88, //! Select the MySQL lexer. SCLEX_MYSQL = 89, //! Select the gettext .po file lexer. SCLEX_PO = 90, //! Select the TAL lexer. SCLEX_TAL = 91, //! Select the COBOL lexer. SCLEX_COBOL = 92, //! Select the TACL lexer. SCLEX_TACL = 93, //! Select the Sorcus lexer. SCLEX_SORCUS = 94, //! Select the PowerPro lexer. SCLEX_POWERPRO = 95, //! Select the Nimrod lexer. SCLEX_NIMROD = 96, //! Select the SML lexer. SCLEX_SML = 97, //! Select the Markdown lexer. SCLEX_MARKDOWN = 98, //! Select the txt2tags lexer. SCLEX_TXT2TAGS = 99, //! Select the 68000 assembler lexer. SCLEX_A68K = 100, //! Select the Modula 3 lexer. SCLEX_MODULA = 101, //! Select the CoffeeScript lexer. SCLEX_COFFEESCRIPT = 102, //! Select the Take Command lexer. SCLEX_TCMD = 103, //! Select the AviSynth lexer. SCLEX_AVS = 104, //! Select the ECL lexer. SCLEX_ECL = 105, //! Select the OScript lexer. SCLEX_OSCRIPT = 106, //! Select the Visual Prolog lexer. SCLEX_VISUALPROLOG = 107, //! Select the Literal Haskell lexer. SCLEX_LITERATEHASKELL = 108, //! Select the Structured Text lexer. SCLEX_STTXT = 109, //! Select the KVIrc lexer. SCLEX_KVIRC = 110, //! Select the Rust lexer. SCLEX_RUST = 111, //! Select the MSC Nastran DMAP lexer. SCLEX_DMAP = 112, //! Select the assembler lexer ('#' comment character). SCLEX_AS = 113, //! Select the DMIS lexer. SCLEX_DMIS = 114, //! Select the lexer for Windows registry files. SCLEX_REGISTRY = 115, //! Select the BibTex lexer. SCLEX_BIBTEX = 116, //! Select the Motorola S-Record hex lexer. SCLEX_SREC = 117, //! Select the Intel hex lexer. SCLEX_IHEX = 118, //! Select the Tektronix extended hex lexer. SCLEX_TEHEX = 119, //! Select the JSON hex lexer. SCLEX_JSON = 120, //! Select the EDIFACT lexer. SCLEX_EDIFACT = 121, }; enum { SC_WEIGHT_NORMAL = 400, SC_WEIGHT_SEMIBOLD = 600, SC_WEIGHT_BOLD = 700, }; enum { SC_TECHNOLOGY_DEFAULT = 0, SC_TECHNOLOGY_DIRECTWRITE = 1, SC_TECHNOLOGY_DIRECTWRITERETAIN = 2, SC_TECHNOLOGY_DIRECTWRITEDC = 3, }; enum { SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE = 0, SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE = 1, }; enum { SC_FONT_SIZE_MULTIPLIER = 100, }; enum { SC_FOLDACTION_CONTRACT = 0, SC_FOLDACTION_EXPAND = 1, SC_FOLDACTION_TOGGLE = 2, }; enum { SC_AUTOMATICFOLD_SHOW = 0x0001, SC_AUTOMATICFOLD_CLICK = 0x0002, SC_AUTOMATICFOLD_CHANGE = 0x0004, }; enum { SC_ORDER_PRESORTED = 0, SC_ORDER_PERFORMSORT = 1, SC_ORDER_CUSTOM = 2, }; //! Construct an empty QsciScintillaBase with parent \a parent. explicit QsciScintillaBase(QWidget *parent = 0); //! Destroys the QsciScintillaBase instance. virtual ~QsciScintillaBase(); //! Returns a pointer to a QsciScintillaBase instance, or 0 if there isn't //! one. This can be used by the higher level API to send messages that //! aren't associated with a particular instance. static QsciScintillaBase *pool(); //! Replaces the existing horizontal scroll bar with \a scrollBar. The //! existing scroll bar is deleted. This should be called instead of //! QAbstractScrollArea::setHorizontalScrollBar(). void replaceHorizontalScrollBar(QScrollBar *scrollBar); //! Replaces the existing vertical scroll bar with \a scrollBar. The //! existing scroll bar is deleted. This should be called instead of //! QAbstractScrollArea::setHorizontalScrollBar(). void replaceVerticalScrollBar(QScrollBar *scrollBar); //! Send the Scintilla message \a msg with the optional parameters \a //! wParam and \a lParam. long SendScintilla(unsigned int msg, unsigned long wParam = 0, long lParam = 0) const; //! \overload long SendScintilla(unsigned int msg, unsigned long wParam, void *lParam) const; //! \overload long SendScintilla(unsigned int msg, unsigned long wParam, const char *lParam) const; //! \overload long SendScintilla(unsigned int msg, const char *lParam) const; //! \overload long SendScintilla(unsigned int msg, const char *wParam, const char *lParam) const; //! \overload long SendScintilla(unsigned int msg, long wParam) const; //! \overload long SendScintilla(unsigned int msg, int wParam) const; //! \overload long SendScintilla(unsigned int msg, long cpMin, long cpMax, char *lpstrText) const; //! \overload long SendScintilla(unsigned int msg, unsigned long wParam, const QColor &col) const; //! \overload long SendScintilla(unsigned int msg, const QColor &col) const; //! \overload long SendScintilla(unsigned int msg, unsigned long wParam, QPainter *hdc, const QRect &rc, long cpMin, long cpMax) const; //! \overload long SendScintilla(unsigned int msg, unsigned long wParam, const QPixmap &lParam) const; //! \overload long SendScintilla(unsigned int msg, unsigned long wParam, const QImage &lParam) const; //! Send the Scintilla message \a msg and return a pointer result. void *SendScintillaPtrResult(unsigned int msg) const; //! \internal static int commandKey(int qt_key, int &modifiers); signals: //! This signal is emitted when text is selected or de-selected. //! \a yes is true if text has been selected and false if text has been //! deselected. void QSCN_SELCHANGED(bool yes); //! This signal is emitted when the user cancels an auto-completion list. //! //! \sa SCN_AUTOCSELECTION() void SCN_AUTOCCANCELLED(); //! This signal is emitted when the user deletes a character when an //! auto-completion list is active. void SCN_AUTOCCHARDELETED(); //! This signal is emitted after an auto-completion has inserted its text. //! \a selection is the text of the selection. //! \a position is the start position of the word being completed. //! \a ch is the fillup character that triggered the selection if method is //! SC_AC_FILLUP. //! \a method is the method used to trigger the selection. //! //! \sa SCN_AUTOCCANCELLED(), SCN_AUTOCSELECTION void SCN_AUTOCCOMPLETED(const char *selection, int position, int ch, int method); //! This signal is emitted when the user selects an item in an //! auto-completion list. It is emitted before the selection is inserted. //! The insertion can be cancelled by sending an SCI_AUTOCANCEL message //! from a connected slot. //! \a selection is the text of the selection. //! \a position is the start position of the word being completed. //! \a ch is the fillup character that triggered the selection if method is //! SC_AC_FILLUP. //! \a method is the method used to trigger the selection. //! //! \sa SCN_AUTOCCANCELLED(), SCN_AUTOCCOMPLETED void SCN_AUTOCSELECTION(const char *selection, int position, int ch, int method); //! \overload void SCN_AUTOCSELECTION(const char *selection, int position); //! This signal is emitted when the document has changed for any reason. void SCEN_CHANGE(); //! This signal ir emitted when the user clicks on a calltip. //! \a direction is 1 if the user clicked on the up arrow, 2 if the user //! clicked on the down arrow, and 0 if the user clicked elsewhere. void SCN_CALLTIPCLICK(int direction); //! This signal is emitted whenever the user enters an ordinary character //! into the text. //! \a charadded is the character. It can be used to decide to display a //! call tip or an auto-completion list. void SCN_CHARADDED(int charadded); //! This signal is emitted when the user double clicks. //! \a position is the position in the text where the click occured. //! \a line is the number of the line in the text where the click occured. //! \a modifiers is the logical or of the modifier keys that were pressed //! when the user double clicked. void SCN_DOUBLECLICK(int position, int line, int modifiers); //! void SCN_DWELLEND(int, int, int); //! void SCN_DWELLSTART(int, int, int); //! This signal is emitted when focus is received. void SCN_FOCUSIN(); //! This signal is emitted when focus is lost. void SCN_FOCUSOUT(); //! This signal is emitted when the user clicks on text in a style with the //! hotspot attribute set. //! \a position is the position in the text where the click occured. //! \a modifiers is the logical or of the modifier keys that were pressed //! when the user clicked. void SCN_HOTSPOTCLICK(int position, int modifiers); //! This signal is emitted when the user double clicks on text in a style //! with the hotspot attribute set. //! \a position is the position in the text where the double click occured. //! \a modifiers is the logical or of the modifier keys that were pressed //! when the user double clicked. void SCN_HOTSPOTDOUBLECLICK(int position, int modifiers); //! This signal is emitted when the user releases the mouse button on text //! in a style with the hotspot attribute set. //! \a position is the position in the text where the release occured. //! \a modifiers is the logical or of the modifier keys that were pressed //! when the user released the button. void SCN_HOTSPOTRELEASECLICK(int position, int modifiers); //! This signal is emitted when the user clicks on text that has an //! indicator. //! \a position is the position in the text where the click occured. //! \a modifiers is the logical or of the modifier keys that were pressed //! when the user clicked. void SCN_INDICATORCLICK(int position, int modifiers); //! This signal is emitted when the user releases the mouse button on text //! that has an indicator. //! \a position is the position in the text where the release occured. //! \a modifiers is the logical or of the modifier keys that were pressed //! when the user released. void SCN_INDICATORRELEASE(int position, int modifiers); //! This signal is emitted when a recordable editor command has been //! executed. void SCN_MACRORECORD(unsigned int, unsigned long, void *); //! This signal is emitted when the user clicks on a sensitive margin. //! \a position is the position of the start of the line against which the //! user clicked. //! \a modifiers is the logical or of the modifier keys that were pressed //! when the user clicked. //! \a margin is the number of the margin the user clicked in: 0, 1 or 2. //! //! \sa SCI_GETMARGINSENSITIVEN, SCI_SETMARGINSENSITIVEN void SCN_MARGINCLICK(int position, int modifiers, int margin); //! This signal is emitted when the user right-clicks on a sensitive //! margin. \a position is the position of the start of the line against //! which the user clicked. //! \a modifiers is the logical or of the modifier keys that were pressed //! when the user clicked. //! \a margin is the number of the margin the user clicked in: 0, 1 or 2. //! //! \sa SCI_GETMARGINSENSITIVEN, SCI_SETMARGINSENSITIVEN void SCN_MARGINRIGHTCLICK(int position, int modifiers, int margin); //! void SCN_MODIFIED(int, int, const char *, int, int, int, int, int, int, int); //! This signal is emitted when the user attempts to modify read-only //! text. void SCN_MODIFYATTEMPTRO(); //! void SCN_NEEDSHOWN(int, int); //! This signal is emitted when painting has been completed. It is useful //! to trigger some other change but to have the paint be done first to //! appear more reponsive to the user. void SCN_PAINTED(); //! This signal is emitted when the current state of the text no longer //! corresponds to the state of the text at the save point. //! //! \sa SCI_SETSAVEPOINT, SCN_SAVEPOINTREACHED() void SCN_SAVEPOINTLEFT(); //! This signal is emitted when the current state of the text corresponds //! to the state of the text at the save point. This allows feedback to be //! given to the user as to whether the text has been modified since it was //! last saved. //! //! \sa SCI_SETSAVEPOINT, SCN_SAVEPOINTLEFT() void SCN_SAVEPOINTREACHED(); //! This signal is emitted when a range of text needs to be syntax styled. //! The range is from the value returned by the SCI_GETENDSTYLED message //! and \a position. It is only emitted if the currently selected lexer is //! SCLEX_CONTAINER. //! //! \sa SCI_COLOURISE, SCI_GETENDSTYLED void SCN_STYLENEEDED(int position); //! This signal is emitted when either the text or styling of the text has //! changed or the selection range or scroll position has changed. //! \a updated contains the set of SC_UPDATE_* flags describing the changes //! since the signal was last emitted. void SCN_UPDATEUI(int updated); //! void SCN_USERLISTSELECTION(const char *, int, int, int); //! \overload void SCN_USERLISTSELECTION(const char *, int); //! void SCN_ZOOM(); protected: //! Returns true if the contents of a MIME data object can be decoded and //! inserted into the document. It is called during drag and paste //! operations. //! \a source is the MIME data object. //! //! \sa fromMimeData(), toMimeData() virtual bool canInsertFromMimeData(const QMimeData *source) const; //! Returns the text of a MIME data object. It is called when a drag and //! drop is completed and when text is pasted from the clipboard. //! \a source is the MIME data object. On return \a rectangular is set if //! the text corresponds to a rectangular selection. //! //! \sa canInsertFromMimeData(), toMimeData() virtual QByteArray fromMimeData(const QMimeData *source, bool &rectangular) const; //! Returns a new MIME data object containing some text and whether it //! corresponds to a rectangular selection. It is called when a drag and //! drop is started and when the selection is copied to the clipboard. //! Ownership of the object is passed to the caller. \a text is the text. //! \a rectangular is set if the text corresponds to a rectangular //! selection. //! //! \sa canInsertFromMimeData(), fromMimeData() virtual QMimeData *toMimeData(const QByteArray &text, bool rectangular) const; //! Re-implemented to handle the context menu. virtual void contextMenuEvent(QContextMenuEvent *e); //! Re-implemented to handle drag enters. virtual void dragEnterEvent(QDragEnterEvent *e); //! Re-implemented to handle drag leaves. virtual void dragLeaveEvent(QDragLeaveEvent *e); //! Re-implemented to handle drag moves. virtual void dragMoveEvent(QDragMoveEvent *e); //! Re-implemented to handle drops. virtual void dropEvent(QDropEvent *e); //! Re-implemented to tell Scintilla it has the focus. virtual void focusInEvent(QFocusEvent *e); //! Re-implemented to tell Scintilla it has lost the focus. virtual void focusOutEvent(QFocusEvent *e); //! Re-implemented to allow tabs to be entered as text. virtual bool focusNextPrevChild(bool next); //! Re-implemented to handle key presses. virtual void keyPressEvent(QKeyEvent *e); //! Re-implemented to handle composed characters. virtual void inputMethodEvent(QInputMethodEvent *event); virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const; //! Re-implemented to handle mouse double-clicks. virtual void mouseDoubleClickEvent(QMouseEvent *e); //! Re-implemented to handle mouse moves. virtual void mouseMoveEvent(QMouseEvent *e); //! Re-implemented to handle mouse presses. virtual void mousePressEvent(QMouseEvent *e); //! Re-implemented to handle mouse releases. virtual void mouseReleaseEvent(QMouseEvent *e); //! Re-implemented to paint the viewport. virtual void paintEvent(QPaintEvent *e); //! Re-implemented to handle resizes. virtual void resizeEvent(QResizeEvent *e); //! \internal Re-implemented to handle scrolling. virtual void scrollContentsBy(int dx, int dy); //! \internal This helps to work around some Scintilla bugs. void setScrollBars(); //! \internal Qt4, Qt5 portability. typedef QByteArray ScintillaBytes; #define ScintillaBytesConstData(b) (b).constData() //! \internal Convert a QString to encoded bytes. ScintillaBytes textAsBytes(const QString &text) const; //! \internal Convert encoded bytes to a QString. QString bytesAsText(const char *bytes) const; private slots: void handleVSb(int value); void handleHSb(int value); void handleSelection(); private: // This is needed to allow QsciScintillaQt to emit this class's signals. friend class QsciScintillaQt; QsciScintillaQt *sci; QPoint triple_click_at; QTimer triple_click; int preeditPos; int preeditNrBytes; QString preeditString; #if QT_VERSION >= 0x050000 bool clickCausedFocus; #endif void connectHorizontalScrollBar(); void connectVerticalScrollBar(); void acceptAction(QDropEvent *e); QsciScintillaBase(const QsciScintillaBase &); QsciScintillaBase &operator=(const QsciScintillaBase &); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscistyle.h000066400000000000000000000132221345112435200237310ustar00rootroot00000000000000// This module defines interface to the QsciStyle class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCISTYLE_H #define QSCISTYLE_H #include #include #include #include class QsciScintillaBase; //! \brief The QsciStyle class encapsulates all the attributes of a style. //! //! Each character of a document has an associated style which determines how //! the character is displayed, e.g. its font and color. A style is identified //! by a number. Lexers define styles for each of the language's features so //! that they are displayed differently. Some style numbers have hard-coded //! meanings, e.g. the style used for call tips. class QSCINTILLA_EXPORT QsciStyle { public: //! This enum defines the different ways the displayed case of the text can //! be changed. enum TextCase { //! The text is displayed as its original case. OriginalCase = 0, //! The text is displayed as upper case. UpperCase = 1, //! The text is displayed as lower case. LowerCase = 2 }; //! Constructs a QsciStyle instance for style number \a style. If \a style //! is negative then a new style number is automatically allocated. QsciStyle(int style = -1); //! Constructs a QsciStyle instance for style number \a style. If \a style //! is negative then a new style number is automatically allocated. The //! styles description, color, paper color, font and end-of-line fill are //! set to \a description, \a color, \a paper, \a font and \a eolFill //! respectively. QsciStyle(int style, const QString &description, const QColor &color, const QColor &paper, const QFont &font, bool eolFill = false); //! \internal Apply the style to a particular editor. void apply(QsciScintillaBase *sci) const; //! Returns the number of the style. int style() const {return style_nr;} //! The style's description is set to \a description. //! //! \sa description() void setDescription(const QString &description) {style_description = description;} //! Returns the style's description. //! //! \sa setDescription() QString description() const {return style_description;} //! The style's foreground color is set to \a color. The default is taken //! from the application's default palette. //! //! \sa color() void setColor(const QColor &color); //! Returns the style's foreground color. //! //! \sa setColor() QColor color() const {return style_color;} //! The style's background color is set to \a paper. The default is taken //! from the application's default palette. //! //! \sa paper() void setPaper(const QColor &paper); //! Returns the style's background color. //! //! \sa setPaper() QColor paper() const {return style_paper;} //! The style's font is set to \a font. The default is the application's //! default font. //! //! \sa font() void setFont(const QFont &font); //! Returns the style's font. //! //! \sa setFont() QFont font() const {return style_font;} //! The style's end-of-line fill is set to \a fill. The default is false. //! //! \sa eolFill() void setEolFill(bool fill); //! Returns the style's end-of-line fill. //! //! \sa setEolFill() bool eolFill() const {return style_eol_fill;} //! The style's text case is set to \a text_case. The default is //! OriginalCase. //! //! \sa textCase() void setTextCase(TextCase text_case); //! Returns the style's text case. //! //! \sa setTextCase() TextCase textCase() const {return style_case;} //! The style's visibility is set to \a visible. The default is true. //! //! \sa visible() void setVisible(bool visible); //! Returns the style's visibility. //! //! \sa setVisible() bool visible() const {return style_visible;} //! The style's changeability is set to \a changeable. The default is //! true. //! //! \sa changeable() void setChangeable(bool changeable); //! Returns the style's changeability. //! //! \sa setChangeable() bool changeable() const {return style_changeable;} //! The style's sensitivity to mouse clicks is set to \a hotspot. The //! default is false. //! //! \sa hotspot() void setHotspot(bool hotspot); //! Returns the style's sensitivity to mouse clicks. //! //! \sa setHotspot() bool hotspot() const {return style_hotspot;} //! Refresh the style settings. void refresh(); private: int style_nr; QString style_description; QColor style_color; QColor style_paper; QFont style_font; bool style_eol_fill; TextCase style_case; bool style_visible; bool style_changeable; bool style_hotspot; void init(int style); }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/Qsci/qscistyledtext.h000066400000000000000000000035521345112435200250070ustar00rootroot00000000000000// This module defines interface to the QsciStyledText class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef QSCISTYLEDTEXT_H #define QSCISTYLEDTEXT_H #include #include class QsciScintillaBase; class QsciStyle; //! \brief The QsciStyledText class is a container for a piece of text and the //! style used to display the text. class QSCINTILLA_EXPORT QsciStyledText { public: //! Constructs a QsciStyledText instance for text \a text and style number //! \a style. QsciStyledText(const QString &text, int style); //! Constructs a QsciStyledText instance for text \a text and style \a //! style. QsciStyledText(const QString &text, const QsciStyle &style); //! \internal Apply the style to a particular editor. void apply(QsciScintillaBase *sci) const; //! Returns a reference to the text. const QString &text() const {return styled_text;} //! Returns the number of the style. int style() const; private: QString styled_text; int style_nr; const QsciStyle *explicit_style; }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/SciClasses.cpp000066400000000000000000000122341345112435200234030ustar00rootroot00000000000000// The implementation of various Qt version independent classes used by the // rest of the port. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "SciNamespace.h" #include "SciClasses.h" #include #include #include #include #include #include #include "ScintillaQt.h" #include "ListBoxQt.h" // Create a call tip. QsciSciCallTip::QsciSciCallTip(QWidget *parent, QsciScintillaQt *sci_) : QWidget(parent, Qt::WindowFlags(Qt::Popup|Qt::FramelessWindowHint|Qt::WA_StaticContents)), sci(sci_) { // Ensure that the main window keeps the focus (and the caret flashing) // when this is displayed. setFocusProxy(parent); } // Destroy a call tip. QsciSciCallTip::~QsciSciCallTip() { // Ensure that the main window doesn't receive a focus out event when // this is destroyed. setFocusProxy(0); } // Paint a call tip. void QsciSciCallTip::paintEvent(QPaintEvent *) { QSCI_SCI_NAMESPACE(Surface) *surfaceWindow = QSCI_SCI_NAMESPACE(Surface)::Allocate(SC_TECHNOLOGY_DEFAULT); if (!surfaceWindow) return; QPainter p(this); surfaceWindow->Init(&p); surfaceWindow->SetUnicodeMode(sci->CodePage() == SC_CP_UTF8); sci->ct.PaintCT(surfaceWindow); delete surfaceWindow; } // Handle a mouse press in a call tip. void QsciSciCallTip::mousePressEvent(QMouseEvent *e) { QSCI_SCI_NAMESPACE(Point) pt; pt.x = e->x(); pt.y = e->y(); sci->ct.MouseClick(pt); sci->CallTipClick(); update(); } // Create the popup instance. QsciSciPopup::QsciSciPopup() { // Set up the mapper. connect(&mapper, SIGNAL(mapped(int)), this, SLOT(on_triggered(int))); } // Add an item and associated command to the popup and enable it if required. void QsciSciPopup::addItem(const QString &label, int cmd, bool enabled, QsciScintillaQt *sci_) { QAction *act = addAction(label, &mapper, SLOT(map())); mapper.setMapping(act, cmd); act->setEnabled(enabled); sci = sci_; } // A slot to handle a menu action being triggered. void QsciSciPopup::on_triggered(int cmd) { sci->Command(cmd); } QsciSciListBox::QsciSciListBox(QWidget *parent, QsciListBoxQt *lbx_) : QListWidget(parent), lbx(lbx_) { setAttribute(Qt::WA_StaticContents); #if defined(Q_OS_WIN) setWindowFlags(Qt::Tool|Qt::FramelessWindowHint); // This stops the main widget losing focus when the user clicks on this one // (which prevents this one being destroyed). setFocusPolicy(Qt::NoFocus); #else // This is the root of the focus problems under Gnome's window manager. We // have tried many flag combinations in the past. The consensus now seems // to be that the following works. However it might now work because of a // change in Qt so we only enable it for recent versions in order to // reduce the risk of breaking something that works with earlier versions. #if QT_VERSION >= 0x040500 setWindowFlags(Qt::ToolTip|Qt::WindowStaysOnTopHint); #else setWindowFlags(Qt::Tool|Qt::FramelessWindowHint); #endif // This may not be needed. setFocusProxy(parent); #endif setFrameShape(StyledPanel); setFrameShadow(Plain); connect(this, SIGNAL(itemDoubleClicked(QListWidgetItem *)), SLOT(handleSelection())); } void QsciSciListBox::addItemPixmap(const QPixmap &pm, const QString &txt) { new QListWidgetItem(pm, txt, this); } int QsciSciListBox::find(const QString &prefix) { QList itms = findItems(prefix, Qt::MatchStartsWith|Qt::MatchCaseSensitive); if (itms.size() == 0) return -1; return row(itms[0]); } QString QsciSciListBox::text(int n) { QListWidgetItem *itm = item(n); if (!itm) return QString(); return itm->text(); } // Reimplemented to close the list when the user presses Escape. void QsciSciListBox::keyPressEvent(QKeyEvent *e) { if (e->key() == Qt::Key_Escape) { e->accept(); close(); } else { QListWidget::keyPressEvent(e); if (!e->isAccepted()) QCoreApplication::sendEvent(parent(), e); } } QsciSciListBox::~QsciSciListBox() { // Ensure that the main widget doesn't get a focus out event when this is // destroyed. setFocusProxy(0); } void QsciSciListBox::handleSelection() { if (lbx && lbx->cb_action) lbx->cb_action(lbx->cb_data); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/SciClasses.h000066400000000000000000000052521345112435200230520ustar00rootroot00000000000000// The definition of various Qt version independent classes used by the rest of // the port. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef _SCICLASSES_H #define _SCICLASSES_H #include #include #include #include #include class QsciScintillaQt; class QsciListBoxQt; // A simple QWidget sub-class to implement a call tip. This is not put into // the Scintilla namespace because of moc's problems with preprocessor macros. class QsciSciCallTip : public QWidget { Q_OBJECT public: QsciSciCallTip(QWidget *parent, QsciScintillaQt *sci_); ~QsciSciCallTip(); protected: void paintEvent(QPaintEvent *e); void mousePressEvent(QMouseEvent *e); private: QsciScintillaQt *sci; }; // A popup menu where options correspond to a numeric command. This is not put // into the Scintilla namespace because of moc's problems with preprocessor // macros. class QsciSciPopup : public QMenu { Q_OBJECT public: QsciSciPopup(); void addItem(const QString &label, int cmd, bool enabled, QsciScintillaQt *sci_); private slots: void on_triggered(int cmd); private: QsciScintillaQt *sci; QSignalMapper mapper; }; // This sub-class of QListBox is needed to provide slots from which we can call // QsciListBox's double-click callback (and you thought this was a C++ // program). This is not put into the Scintilla namespace because of moc's // problems with preprocessor macros. class QsciSciListBox : public QListWidget { Q_OBJECT public: QsciSciListBox(QWidget *parent, QsciListBoxQt *lbx_); virtual ~QsciSciListBox(); void addItemPixmap(const QPixmap &pm, const QString &txt); int find(const QString &prefix); QString text(int n); protected: void keyPressEvent(QKeyEvent *e); private slots: void handleSelection(); private: QsciListBoxQt *lbx; }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/SciNamespace.h000066400000000000000000000024371345112435200233530ustar00rootroot00000000000000// Support for building the Scintilla code in the Scintilla namespace using the // -DSCI_NAMESPACE compiler flag. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef _SCINAMESPACE_H #define _SCINAMESPACE_H #ifdef SCI_NAMESPACE #define QSCI_SCI_NAMESPACE(name) Scintilla::name #define QSCI_BEGIN_SCI_NAMESPACE namespace Scintilla { #define QSCI_END_SCI_NAMESPACE }; #else #define QSCI_SCI_NAMESPACE(name) name #define QSCI_BEGIN_SCI_NAMESPACE #define QSCI_END_SCI_NAMESPACE #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/ScintillaQt.cpp000066400000000000000000000431121345112435200235750ustar00rootroot00000000000000// The implementation of the Qt specific subclass of ScintillaBase. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include #include #include #include #include #include #include #include #include #include "Qsci/qsciscintillabase.h" #include "ScintillaQt.h" #include "SciClasses.h" // We want to use the Scintilla notification names as Qt signal names. #undef SCEN_CHANGE #undef SCN_AUTOCCANCELLED #undef SCN_AUTOCCHARDELETED #undef SCN_AUTOCCOMPLETED #undef SCN_AUTOCSELECTION #undef SCN_CALLTIPCLICK #undef SCN_CHARADDED #undef SCN_DOUBLECLICK #undef SCN_DWELLEND #undef SCN_DWELLSTART #undef SCN_FOCUSIN #undef SCN_FOCUSOUT #undef SCN_HOTSPOTCLICK #undef SCN_HOTSPOTDOUBLECLICK #undef SCN_HOTSPOTRELEASECLICK #undef SCN_INDICATORCLICK #undef SCN_INDICATORRELEASE #undef SCN_MACRORECORD #undef SCN_MARGINCLICK #undef SCN_MARGINRIGHTCLICK #undef SCN_MODIFIED #undef SCN_MODIFYATTEMPTRO #undef SCN_NEEDSHOWN #undef SCN_PAINTED #undef SCN_SAVEPOINTLEFT #undef SCN_SAVEPOINTREACHED #undef SCN_STYLENEEDED #undef SCN_UPDATEUI #undef SCN_USERLISTSELECTION #undef SCN_ZOOM enum { SCEN_CHANGE = 768, SCN_AUTOCCANCELLED = 2025, SCN_AUTOCCHARDELETED = 2026, SCN_AUTOCCOMPLETED = 2030, SCN_AUTOCSELECTION = 2022, SCN_CALLTIPCLICK = 2021, SCN_CHARADDED = 2001, SCN_DOUBLECLICK = 2006, SCN_DWELLEND = 2017, SCN_DWELLSTART = 2016, SCN_FOCUSIN = 2028, SCN_FOCUSOUT = 2029, SCN_HOTSPOTCLICK = 2019, SCN_HOTSPOTDOUBLECLICK = 2020, SCN_HOTSPOTRELEASECLICK = 2027, SCN_INDICATORCLICK = 2023, SCN_INDICATORRELEASE = 2024, SCN_MACRORECORD = 2009, SCN_MARGINCLICK = 2010, SCN_MARGINRIGHTCLICK = 2031, SCN_MODIFIED = 2008, SCN_MODIFYATTEMPTRO = 2004, SCN_NEEDSHOWN = 2011, SCN_PAINTED = 2013, SCN_SAVEPOINTLEFT = 2003, SCN_SAVEPOINTREACHED = 2002, SCN_STYLENEEDED = 2000, SCN_UPDATEUI = 2007, SCN_USERLISTSELECTION = 2014, SCN_ZOOM = 2018 }; // The ctor. QsciScintillaQt::QsciScintillaQt(QsciScintillaBase *qsb_) : vMax(0), hMax(0), vPage(0), hPage(0), capturedMouse(false), qsb(qsb_) { wMain = qsb->viewport(); // This is ignored. imeInteraction = imeInline; for (int i = 0; i <= static_cast(tickPlatform); ++i) timers[i] = 0; Initialise(); } // The dtor. QsciScintillaQt::~QsciScintillaQt() { Finalise(); } // Initialise the instance. void QsciScintillaQt::Initialise() { } // Tidy up the instance. void QsciScintillaQt::Finalise() { for (int i = 0; i <= static_cast(tickPlatform); ++i) FineTickerCancel(static_cast(i)); ScintillaBase::Finalise(); } // Start a drag. void QsciScintillaQt::StartDrag() { inDragDrop = ddDragging; QDrag *qdrag = new QDrag(qsb); qdrag->setMimeData(mimeSelection(drag)); #if QT_VERSION >= 0x040300 Qt::DropAction action = qdrag->exec(Qt::MoveAction | Qt::CopyAction, Qt::MoveAction); #else Qt::DropAction action = qdrag->start(Qt::MoveAction); #endif // Remove the dragged text if it was a move to another widget or // application. if (action == Qt::MoveAction && qdrag->target() != qsb->viewport()) ClearSelection(); SetDragPosition(QSCI_SCI_NAMESPACE(SelectionPosition)()); inDragDrop = ddNone; } // Re-implement to trap certain messages. sptr_t QsciScintillaQt::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { switch (iMessage) { case SCI_GETDIRECTFUNCTION: return reinterpret_cast(DirectFunction); case SCI_GETDIRECTPOINTER: return reinterpret_cast(this); } return ScintillaBase::WndProc(iMessage, wParam, lParam); } // Windows nonsense. sptr_t QsciScintillaQt::DefWndProc(unsigned int, uptr_t, sptr_t) { return 0; } // Grab or release the mouse (and keyboard). void QsciScintillaQt::SetMouseCapture(bool on) { if (mouseDownCaptures) if (on) qsb->viewport()->grabMouse(); else qsb->viewport()->releaseMouse(); capturedMouse = on; } // Return true if the mouse/keyboard are currently grabbed. bool QsciScintillaQt::HaveMouseCapture() { return capturedMouse; } // Set the position of the vertical scrollbar. void QsciScintillaQt::SetVerticalScrollPos() { QScrollBar *sb = qsb->verticalScrollBar(); bool was_blocked = sb->blockSignals(true); sb->setValue(topLine); sb->blockSignals(was_blocked); } // Set the position of the horizontal scrollbar. void QsciScintillaQt::SetHorizontalScrollPos() { QScrollBar *sb = qsb->horizontalScrollBar(); bool was_blocked = sb->blockSignals(true); sb->setValue(xOffset); sb->blockSignals(was_blocked); } // Set the extent of the vertical and horizontal scrollbars and return true if // the view needs re-drawing. bool QsciScintillaQt::ModifyScrollBars(int nMax,int nPage) { bool modified = false; QScrollBar *sb; int vNewPage = nPage; int vNewMax = nMax - vNewPage + 1; if (vMax != vNewMax || vPage != vNewPage) { vMax = vNewMax; vPage = vNewPage; modified = true; sb = qsb->verticalScrollBar(); sb->setMaximum(vMax); sb->setPageStep(vPage); } int hNewPage = GetTextRectangle().Width(); int hNewMax = (scrollWidth > hNewPage) ? scrollWidth - hNewPage : 0; int charWidth = vs.styles[STYLE_DEFAULT].aveCharWidth; sb = qsb->horizontalScrollBar(); if (hMax != hNewMax || hPage != hNewPage || sb->singleStep() != charWidth) { hMax = hNewMax; hPage = hNewPage; modified = true; sb->setMaximum(hMax); sb->setPageStep(hPage); sb->setSingleStep(charWidth); } return modified; } // Called after SCI_SETWRAPMODE and SCI_SETHSCROLLBAR. void QsciScintillaQt::ReconfigureScrollBars() { // Hide or show the scrollbars if needed. bool hsb = (horizontalScrollBarVisible && !Wrapping()); qsb->setHorizontalScrollBarPolicy(hsb ? Qt::ScrollBarAsNeeded : Qt::ScrollBarAlwaysOff); qsb->setVerticalScrollBarPolicy(verticalScrollBarVisible ? Qt::ScrollBarAsNeeded : Qt::ScrollBarAlwaysOff); } // Notify interested parties of any change in the document. void QsciScintillaQt::NotifyChange() { emit qsb->SCEN_CHANGE(); } // Notify interested parties of various events. This is the main mapping // between Scintilla notifications and Qt signals. void QsciScintillaQt::NotifyParent(SCNotification scn) { switch (scn.nmhdr.code) { case SCN_CALLTIPCLICK: emit qsb->SCN_CALLTIPCLICK(scn.position); break; case SCN_AUTOCCANCELLED: emit qsb->SCN_AUTOCCANCELLED(); break; case SCN_AUTOCCHARDELETED: emit qsb->SCN_AUTOCCHARDELETED(); break; case SCN_AUTOCCOMPLETED: emit qsb->SCN_AUTOCCOMPLETED(scn.text, scn.lParam, scn.ch, scn.listCompletionMethod); break; case SCN_AUTOCSELECTION: emit qsb->SCN_AUTOCSELECTION(scn.text, scn.lParam, scn.ch, scn.listCompletionMethod); emit qsb->SCN_AUTOCSELECTION(scn.text, scn.lParam); break; case SCN_CHARADDED: emit qsb->SCN_CHARADDED(scn.ch); break; case SCN_DOUBLECLICK: emit qsb->SCN_DOUBLECLICK(scn.position, scn.line, scn.modifiers); break; case SCN_DWELLEND: emit qsb->SCN_DWELLEND(scn.position, scn.x, scn.y); break; case SCN_DWELLSTART: emit qsb->SCN_DWELLSTART(scn.position, scn.x, scn.y); break; case SCN_FOCUSIN: emit qsb->SCN_FOCUSIN(); break; case SCN_FOCUSOUT: emit qsb->SCN_FOCUSOUT(); break; case SCN_HOTSPOTCLICK: emit qsb->SCN_HOTSPOTCLICK(scn.position, scn.modifiers); break; case SCN_HOTSPOTDOUBLECLICK: emit qsb->SCN_HOTSPOTDOUBLECLICK(scn.position, scn.modifiers); break; case SCN_HOTSPOTRELEASECLICK: emit qsb->SCN_HOTSPOTRELEASECLICK(scn.position, scn.modifiers); break; case SCN_INDICATORCLICK: emit qsb->SCN_INDICATORCLICK(scn.position, scn.modifiers); break; case SCN_INDICATORRELEASE: emit qsb->SCN_INDICATORRELEASE(scn.position, scn.modifiers); break; case SCN_MACRORECORD: emit qsb->SCN_MACRORECORD(scn.message, scn.wParam, reinterpret_cast(scn.lParam)); break; case SCN_MARGINCLICK: emit qsb->SCN_MARGINCLICK(scn.position, scn.modifiers, scn.margin); break; case SCN_MARGINRIGHTCLICK: emit qsb->SCN_MARGINRIGHTCLICK(scn.position, scn.modifiers, scn.margin); break; case SCN_MODIFIED: { char *text; // Give some protection to the Python bindings. if (scn.text && (scn.modificationType & (SC_MOD_INSERTTEXT|SC_MOD_DELETETEXT) != 0)) { text = new char[scn.length + 1]; memcpy(text, scn.text, scn.length); text[scn.length] = '\0'; } else { text = 0; } emit qsb->SCN_MODIFIED(scn.position, scn.modificationType, text, scn.length, scn.linesAdded, scn.line, scn.foldLevelNow, scn.foldLevelPrev, scn.token, scn.annotationLinesAdded); if (text) delete[] text; break; } case SCN_MODIFYATTEMPTRO: emit qsb->SCN_MODIFYATTEMPTRO(); break; case SCN_NEEDSHOWN: emit qsb->SCN_NEEDSHOWN(scn.position, scn.length); break; case SCN_PAINTED: emit qsb->SCN_PAINTED(); break; case SCN_SAVEPOINTLEFT: emit qsb->SCN_SAVEPOINTLEFT(); break; case SCN_SAVEPOINTREACHED: emit qsb->SCN_SAVEPOINTREACHED(); break; case SCN_STYLENEEDED: emit qsb->SCN_STYLENEEDED(scn.position); break; case SCN_UPDATEUI: emit qsb->SCN_UPDATEUI(scn.updated); break; case SCN_USERLISTSELECTION: emit qsb->SCN_USERLISTSELECTION(scn.text, scn.wParam, scn.ch, scn.listCompletionMethod); emit qsb->SCN_USERLISTSELECTION(scn.text, scn.wParam); break; case SCN_ZOOM: emit qsb->SCN_ZOOM(); break; default: qWarning("Unknown notification: %u", scn.nmhdr.code); } } // Convert a selection to mime data. QMimeData *QsciScintillaQt::mimeSelection( const QSCI_SCI_NAMESPACE(SelectionText) &text) const { return qsb->toMimeData(QByteArray(text.Data()), text.rectangular); } // Copy the selected text to the clipboard. void QsciScintillaQt::CopyToClipboard( const QSCI_SCI_NAMESPACE(SelectionText) &selectedText) { QApplication::clipboard()->setMimeData(mimeSelection(selectedText)); } // Implement copy. void QsciScintillaQt::Copy() { if (!sel.Empty()) { QSCI_SCI_NAMESPACE(SelectionText) text; CopySelectionRange(&text); CopyToClipboard(text); } } // Implement pasting text. void QsciScintillaQt::Paste() { pasteFromClipboard(QClipboard::Clipboard); } // Paste text from either the clipboard or selection. void QsciScintillaQt::pasteFromClipboard(QClipboard::Mode mode) { int len; const char *s; bool rectangular; const QMimeData *source = QApplication::clipboard()->mimeData(mode); if (!source || !qsb->canInsertFromMimeData(source)) return; QByteArray text = qsb->fromMimeData(source, rectangular); len = text.length(); s = text.data(); std::string dest = QSCI_SCI_NAMESPACE(Document)::TransformLineEnds(s, len, pdoc->eolMode); QSCI_SCI_NAMESPACE(SelectionText) selText; selText.Copy(dest, (IsUnicodeMode() ? SC_CP_UTF8 : 0), vs.styles[STYLE_DEFAULT].characterSet, rectangular, false); QSCI_SCI_NAMESPACE(UndoGroup) ug(pdoc); ClearSelection(); InsertPasteShape(selText.Data(), selText.Length(), selText.rectangular ? pasteRectangular : pasteStream); EnsureCaretVisible(); } // Create a call tip window. void QsciScintillaQt::CreateCallTipWindow(QSCI_SCI_NAMESPACE(PRectangle) rc) { if (!ct.wCallTip.Created()) ct.wCallTip = ct.wDraw = new QsciSciCallTip(qsb, this); QsciSciCallTip *w = reinterpret_cast(ct.wCallTip.GetID()); w->resize(rc.right - rc.left, rc.bottom - rc.top); ct.wCallTip.Show(); } // Add an item to the right button menu. void QsciScintillaQt::AddToPopUp(const char *label, int cmd, bool enabled) { QsciSciPopup *pm = static_cast(popup.GetID()); if (*label) pm->addItem(qApp->translate("ContextMenu", label), cmd, enabled, this); else pm->addSeparator(); } // Claim the selection. void QsciScintillaQt::ClaimSelection() { bool isSel = !sel.Empty(); if (isSel) { QClipboard *cb = QApplication::clipboard(); // If we support X11 style selection then make it available now. if (cb->supportsSelection()) { QSCI_SCI_NAMESPACE(SelectionText) text; CopySelectionRange(&text); if (text.Data()) cb->setMimeData(mimeSelection(text), QClipboard::Selection); } primarySelection = true; } else primarySelection = false; emit qsb->QSCN_SELCHANGED(isSel); } // Unclaim the selection. void QsciScintillaQt::UnclaimSelection() { if (primarySelection) { primarySelection = false; qsb->viewport()->update(); } } // Implemented to provide compatibility with the Windows version. sptr_t QsciScintillaQt::DirectFunction(QsciScintillaQt *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return sciThis->WndProc(iMessage,wParam,lParam); } // Draw the contents of the widget. void QsciScintillaQt::paintEvent(QPaintEvent *e) { QSCI_SCI_NAMESPACE(Surface) *sw; const QRect &qr = e->rect(); rcPaint.left = qr.left(); rcPaint.top = qr.top(); rcPaint.right = qr.right() + 1; rcPaint.bottom = qr.bottom() + 1; QSCI_SCI_NAMESPACE(PRectangle) rcClient = GetClientRectangle(); paintingAllText = rcPaint.Contains(rcClient); sw = QSCI_SCI_NAMESPACE(Surface)::Allocate(SC_TECHNOLOGY_DEFAULT); if (!sw) return; QPainter painter(qsb->viewport()); paintState = painting; sw->Init(&painter); sw->SetUnicodeMode(CodePage() == SC_CP_UTF8); Paint(sw, rcPaint); delete sw; // If the painting area was insufficient to cover the new style or brace // highlight positions then repaint the whole thing. if (paintState == paintAbandoned) { // Do a full re-paint immediately. This may only be needed on OS X (to // avoid flicker). paintingAllText = true; sw = QSCI_SCI_NAMESPACE(Surface)::Allocate(SC_TECHNOLOGY_DEFAULT); if (!sw) return; QPainter painter(qsb->viewport()); paintState = painting; sw->Init(&painter); sw->SetUnicodeMode(CodePage() == SC_CP_UTF8); Paint(sw, rcPaint); delete sw; qsb->viewport()->update(); } paintState = notPainting; } // Re-implemented to drive the tickers. void QsciScintillaQt::timerEvent(QTimerEvent *e) { for (int i = 0; i <= static_cast(tickPlatform); ++i) if (timers[i] == e->timerId()) TickFor(static_cast(i)); } // Re-implemented to say we support fine tickers. bool QsciScintillaQt::FineTickerAvailable() { return true; } // Re-implemented to stop a ticker. void QsciScintillaQt::FineTickerCancel(TickReason reason) { int &ticker = timers[static_cast(reason)]; if (ticker != 0) { killTimer(ticker); ticker = 0; } } // Re-implemented to check if a particular ticker is running. bool QsciScintillaQt::FineTickerRunning(TickReason reason) { return (timers[static_cast(reason)] != 0); } // Re-implemented to start a ticker. void QsciScintillaQt::FineTickerStart(TickReason reason, int ms, int) { int &ticker = timers[static_cast(reason)]; if (ticker != 0) killTimer(ticker); ticker = startTimer(ms); } // Re-implemented to support idle processing. bool QsciScintillaQt::SetIdle(bool on) { if (on) { if (!idler.state) { QTimer *timer = reinterpret_cast(idler.idlerID); if (!timer) { idler.idlerID = timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(onIdle())); } timer->start(0); idler.state = true; } } else if (idler.state) { reinterpret_cast(idler.idlerID)->stop(); idler.state = false; } return true; } // Invoked to trigger any idle processing. void QsciScintillaQt::onIdle() { if (!Idle()) SetIdle(false); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/ScintillaQt.h000066400000000000000000000101251345112435200232400ustar00rootroot00000000000000// The definition of the Qt specific subclass of ScintillaBase. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #ifndef SCINTILLAQT_H #define SCINTILLAQT_H #include #include #include #include "SciNamespace.h" // These are needed because Scintilla class header files don't manage their own // dependencies properly. #include #include #include #include #include #include #include #include #include "ILexer.h" #include "Platform.h" #include "Scintilla.h" #include "SplitVector.h" #include "Partitioning.h" #include "CellBuffer.h" #include "CharClassify.h" #include "RunStyles.h" #include "CaseFolder.h" #include "Decoration.h" #include "Document.h" #include "Style.h" #include "XPM.h" #include "LineMarker.h" #include "Indicator.h" #include "ViewStyle.h" #include "KeyMap.h" #include "ContractionState.h" #include "Selection.h" #include "PositionCache.h" #include "EditModel.h" #include "MarginView.h" #include "EditView.h" #include "Editor.h" #include "AutoComplete.h" #include "CallTip.h" #include "LexAccessor.h" #include "Accessor.h" #include "ScintillaBase.h" QT_BEGIN_NAMESPACE class QMimeData; class QPaintEvent; QT_END_NAMESPACE class QsciScintillaBase; class QsciSciCallTip; class QsciSciPopup; // This is an internal class but it is referenced by a public class so it has // to have a Qsci prefix rather than being put in the Scintilla namespace // which would mean exposing the SCI_NAMESPACE mechanism). class QsciScintillaQt : public QObject, public QSCI_SCI_NAMESPACE(ScintillaBase) { Q_OBJECT friend class QsciScintillaBase; friend class QsciSciCallTip; friend class QsciSciPopup; public: QsciScintillaQt(QsciScintillaBase *qsb_); virtual ~QsciScintillaQt(); virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); protected: void timerEvent(QTimerEvent *e); private slots: void onIdle(); private: void Initialise(); void Finalise(); bool SetIdle(bool on); void StartDrag(); sptr_t DefWndProc(unsigned int, uptr_t, sptr_t); void SetMouseCapture(bool on); bool HaveMouseCapture(); void SetVerticalScrollPos(); void SetHorizontalScrollPos(); bool ModifyScrollBars(int nMax, int nPage); void ReconfigureScrollBars(); void NotifyChange(); void NotifyParent(SCNotification scn); void CopyToClipboard( const QSCI_SCI_NAMESPACE(SelectionText) &selectedText); void Copy(); void Paste(); void CreateCallTipWindow(QSCI_SCI_NAMESPACE(PRectangle) rc); void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); void ClaimSelection(); void UnclaimSelection(); static sptr_t DirectFunction(QsciScintillaQt *sci, unsigned int iMessage, uptr_t wParam,sptr_t lParam); QMimeData *mimeSelection( const QSCI_SCI_NAMESPACE(SelectionText) &text) const; void paintEvent(QPaintEvent *e); void pasteFromClipboard(QClipboard::Mode mode); // tickPlatform is the last of the TickReason members. int timers[tickPlatform + 1]; bool FineTickerAvailable(); void FineTickerCancel(TickReason reason); bool FineTickerRunning(TickReason reason); void FineTickerStart(TickReason reason, int ms, int tolerance); int vMax, hMax, vPage, hPage; bool capturedMouse; QsciScintillaBase *qsb; }; #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/features/000077500000000000000000000000001345112435200224575ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/features/qscintilla2.prf000066400000000000000000000011041345112435200254110ustar00rootroot00000000000000greaterThan(QT_MAJOR_VERSION, 4) { QT += widgets printsupport greaterThan(QT_MINOR_VERSION, 1) { macx:QT += macextras } } DEFINES += QSCINTILLA_DLL INCLUDEPATH += $$[QT_INSTALL_HEADERS] LIBS += -L$$[QT_INSTALL_LIBS] CONFIG(debug, debug|release) { mac: { LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION}_debug } else { win32: { LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION}d } else { LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION} } } } else { LIBS += -lqscintilla2_qt$${QT_MAJOR_VERSION} } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qsciabstractapis.cpp000066400000000000000000000025661345112435200247160ustar00rootroot00000000000000// This module implements the QsciAbstractAPIs class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qsciabstractapis.h" #include "Qsci/qscilexer.h" // The ctor. QsciAbstractAPIs::QsciAbstractAPIs(QsciLexer *lexer) : QObject(lexer), lex(lexer) { lexer->setAPIs(this); } // The dtor. QsciAbstractAPIs::~QsciAbstractAPIs() { } // Return the lexer. QsciLexer *QsciAbstractAPIs::lexer() const { return lex; } // Called when the user has made a selection from the auto-completion list. void QsciAbstractAPIs::autoCompletionSelected(const QString &selection) { } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qsciapis.cpp000066400000000000000000000605241345112435200231700ustar00rootroot00000000000000// This module implements the QsciAPIs class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include #include "Qsci/qsciapis.h" #include #include #include #include #include #include #include #include #include #include "Qsci/qscilexer.h" // The version number of the prepared API information format. const unsigned char PreparedDataFormatVersion = 0; // This class contains prepared API information. struct QsciAPIsPrepared { // The word dictionary is a map of individual words and a list of positions // each occurs in the sorted list of APIs. A position is a tuple of the // index into the list of APIs and the index into the particular API. QMap wdict; // The case dictionary maps the case insensitive words to the form in which // they are to be used. It is only used if the language is case // insensitive. QMap cdict; // The raw API information. QStringList raw_apis; QStringList apiWords(int api_idx, const QStringList &wseps, bool strip_image) const; static QString apiBaseName(const QString &api); }; // Return a particular API entry as a list of words. QStringList QsciAPIsPrepared::apiWords(int api_idx, const QStringList &wseps, bool strip_image) const { QString base = apiBaseName(raw_apis[api_idx]); // Remove any embedded image reference if necessary. if (strip_image) { int tail = base.indexOf('?'); if (tail >= 0) base.truncate(tail); } if (wseps.isEmpty()) return QStringList(base); return base.split(wseps.first()); } // Return the name of an API function, ie. without the arguments. QString QsciAPIsPrepared::apiBaseName(const QString &api) { QString base = api; int tail = base.indexOf('('); if (tail >= 0) base.truncate(tail); return base.simplified(); } // The user event type that signals that the worker thread has started. const QEvent::Type WorkerStarted = static_cast(QEvent::User + 1012); // The user event type that signals that the worker thread has finished. const QEvent::Type WorkerFinished = static_cast(QEvent::User + 1013); // The user event type that signals that the worker thread has aborted. const QEvent::Type WorkerAborted = static_cast(QEvent::User + 1014); // This class is the worker thread that post-processes the API set. class QsciAPIsWorker : public QThread { public: QsciAPIsWorker(QsciAPIs *apis); virtual ~QsciAPIsWorker(); virtual void run(); QsciAPIsPrepared *prepared; private: QsciAPIs *proxy; bool abort; }; // The worker thread ctor. QsciAPIsWorker::QsciAPIsWorker(QsciAPIs *apis) : proxy(apis), prepared(0), abort(false) { } // The worker thread dtor. QsciAPIsWorker::~QsciAPIsWorker() { // Tell the thread to stop. There is no need to bother with a mutex. abort = true; // Wait for it to do so and hit it if it doesn't. if (!wait(500)) terminate(); if (prepared) delete prepared; } // The worker thread entry point. void QsciAPIsWorker::run() { // Sanity check. if (!prepared) return; // Tell the main thread we have started. QApplication::postEvent(proxy, new QEvent(WorkerStarted)); // Sort the full list. prepared->raw_apis.sort(); QStringList wseps = proxy->lexer()->autoCompletionWordSeparators(); bool cs = proxy->lexer()->caseSensitive(); // Split each entry into separate words but ignoring any arguments. for (int a = 0; a < prepared->raw_apis.count(); ++a) { // Check to see if we should stop. if (abort) break; QStringList words = prepared->apiWords(a, wseps, true); for (int w = 0; w < words.count(); ++w) { const QString &word = words[w]; // Add the word's position to any existing list for this word. QsciAPIs::WordIndexList wil = prepared->wdict[word]; // If the language is case insensitive and we haven't seen this // word before then save it in the case dictionary. if (!cs && wil.count() == 0) prepared->cdict[word.toUpper()] = word; wil.append(QsciAPIs::WordIndex(a, w)); prepared->wdict[word] = wil; } } // Tell the main thread we have finished. QApplication::postEvent(proxy, new QEvent(abort ? WorkerAborted : WorkerFinished)); } // The ctor. QsciAPIs::QsciAPIs(QsciLexer *lexer) : QsciAbstractAPIs(lexer), worker(0), origin_len(0) { prep = new QsciAPIsPrepared; } // The dtor. QsciAPIs::~QsciAPIs() { deleteWorker(); delete prep; } // Delete the worker thread if there is one. void QsciAPIs::deleteWorker() { if (worker) { delete worker; worker = 0; } } //! Handle termination events from the worker thread. bool QsciAPIs::event(QEvent *e) { switch (e->type()) { case WorkerStarted: emit apiPreparationStarted(); return true; case WorkerAborted: deleteWorker(); emit apiPreparationCancelled(); return true; case WorkerFinished: delete prep; old_context.clear(); prep = worker->prepared; worker->prepared = 0; deleteWorker(); // Allow the raw API information to be modified. apis = prep->raw_apis; emit apiPreparationFinished(); return true; } return QObject::event(e); } // Clear the current raw API entries. void QsciAPIs::clear() { apis.clear(); } // Clear out all API information. bool QsciAPIs::load(const QString &filename) { QFile f(filename); if (!f.open(QIODevice::ReadOnly)) return false; QTextStream ts(&f); for (;;) { QString line = ts.readLine(); if (line.isEmpty()) break; apis.append(line); } return true; } // Add a single API entry. void QsciAPIs::add(const QString &entry) { apis.append(entry); } // Remove a single API entry. void QsciAPIs::remove(const QString &entry) { int idx = apis.indexOf(entry); if (idx >= 0) apis.removeAt(idx); } // Position the "origin" cursor into the API entries according to the user // supplied context. QStringList QsciAPIs::positionOrigin(const QStringList &context, QString &path) { // Get the list of words and see if the context is the same as last time we // were called. QStringList new_context; bool same_context = (old_context.count() > 0 && old_context.count() < context.count()); for (int i = 0; i < context.count(); ++i) { QString word = context[i]; if (!lexer()->caseSensitive()) word = word.toUpper(); if (i < old_context.count() && old_context[i] != word) same_context = false; new_context << word; } // If the context has changed then reset the origin. if (!same_context) origin_len = 0; // If we have a current origin (ie. the user made a specific selection in // the current context) then adjust the origin to include the last complete // word as the user may have entered more parts of the name without using // auto-completion. if (origin_len > 0) { const QString wsep = lexer()->autoCompletionWordSeparators().first(); int start_new = old_context.count(); int end_new = new_context.count() - 1; if (start_new == end_new) { path = old_context.join(wsep); origin_len = path.length(); } else { QString fixed = *origin; fixed.truncate(origin_len); path = fixed; while (start_new < end_new) { // Add this word to the current path. path.append(wsep); path.append(new_context[start_new]); origin_len = path.length(); // Skip entries in the current origin that don't match the // path. while (origin != prep->raw_apis.end()) { // See if the current origin has come to an end. if (!originStartsWith(fixed, wsep)) origin = prep->raw_apis.end(); else if (originStartsWith(path, wsep)) break; else ++origin; } if (origin == prep->raw_apis.end()) break; ++start_new; } } // Terminate the path. path.append(wsep); // If the new text wasn't recognised then reset the origin. if (origin == prep->raw_apis.end()) origin_len = 0; } if (origin_len == 0) path.truncate(0); // Save the "committed" context for next time. old_context = new_context; old_context.removeLast(); return new_context; } // Return true if the origin starts with the given path. bool QsciAPIs::originStartsWith(const QString &path, const QString &wsep) { const QString &orig = *origin; if (!orig.startsWith(path)) return false; // Check that the path corresponds to the end of a word, ie. that what // follows in the origin is either a word separator or a (. QString tail = orig.mid(path.length()); return (!tail.isEmpty() && (tail.startsWith(wsep) || tail.at(0) == '(')); } // Add auto-completion words to an existing list. void QsciAPIs::updateAutoCompletionList(const QStringList &context, QStringList &list) { QString path; QStringList new_context = positionOrigin(context, path); if (origin_len > 0) { const QString wsep = lexer()->autoCompletionWordSeparators().first(); QStringList::const_iterator it = origin; unambiguous_context = path; while (it != prep->raw_apis.end()) { QString base = QsciAPIsPrepared::apiBaseName(*it); if (!base.startsWith(path)) break; // Make sure we have something after the path. if (base != path) { // Get the word we are interested in (ie. the one after the // current origin in path). QString w = base.mid(origin_len + wsep.length()).split(wsep).first(); // Append the space, we know the origin is unambiguous. w.append(' '); if (!list.contains(w)) list << w; } ++it; } } else { // At the moment we assume we will add words from multiple contexts so // mark the unambiguous context as unknown. unambiguous_context = QString(); bool unambig = true; QStringList with_context; if (new_context.last().isEmpty()) lastCompleteWord(new_context[new_context.count() - 2], with_context, unambig); else lastPartialWord(new_context.last(), with_context, unambig); for (int i = 0; i < with_context.count(); ++i) { // Remove any unambigious context (allowing for a possible image // identifier). QString noc = with_context[i]; if (unambig) { int op = noc.indexOf(QLatin1String(" (")); if (op >= 0) { int cl = noc.indexOf(QLatin1String(")")); if (cl > op) noc.remove(op, cl - op + 1); else noc.truncate(op); } } list << noc; } } } // Get the index list for a particular word if there is one. const QsciAPIs::WordIndexList *QsciAPIs::wordIndexOf(const QString &word) const { QString csword; // Indirect through the case dictionary if the language isn't case // sensitive. if (lexer()->caseSensitive()) csword = word; else { csword = prep->cdict[word]; if (csword.isEmpty()) return 0; } // Get the possible API entries if any. const WordIndexList *wl = &prep->wdict[csword]; if (wl->isEmpty()) return 0; return wl; } // Add auto-completion words based on the last complete word entered. void QsciAPIs::lastCompleteWord(const QString &word, QStringList &with_context, bool &unambig) { // Get the possible API entries if any. const WordIndexList *wl = wordIndexOf(word); if (wl) addAPIEntries(*wl, true, with_context, unambig); } // Add auto-completion words based on the last partial word entered. void QsciAPIs::lastPartialWord(const QString &word, QStringList &with_context, bool &unambig) { if (lexer()->caseSensitive()) { QMap::const_iterator it = prep->wdict.lowerBound(word); while (it != prep->wdict.end()) { if (!it.key().startsWith(word)) break; addAPIEntries(it.value(), false, with_context, unambig); ++it; } } else { QMap::const_iterator it = prep->cdict.lowerBound(word); while (it != prep->cdict.end()) { if (!it.key().startsWith(word)) break; addAPIEntries(prep->wdict[it.value()], false, with_context, unambig); ++it; } } } // Handle the selection of an entry in the auto-completion list. void QsciAPIs::autoCompletionSelected(const QString &selection) { // If the selection is an API (ie. it has a space separating the selected // word and the optional origin) then remember the origin. QStringList lst = selection.split(' '); if (lst.count() != 2) { origin_len = 0; return; } const QString &path = lst[1]; QString owords; if (path.isEmpty()) owords = unambiguous_context; else { // Check the parenthesis. if (!path.startsWith("(") || !path.endsWith(")")) { origin_len = 0; return; } // Remove the parenthesis. owords = path.mid(1, path.length() - 2); } origin = qLowerBound(prep->raw_apis, owords); /* * There is a bug somewhere, either in qLowerBound() or QList (or in GCC as * it seems to be Linux specific and the Qt code is the same on all * platforms) that the following line seems to fix. Note that it is * actually the call to detach() within begin() that is the important bit. */ prep->raw_apis.begin(); origin_len = owords.length(); } // Add auto-completion words for a particular word (defined by where it appears // in the APIs) and depending on whether the word was complete (when it's // actually the next word in the API entry that is of interest) or not. void QsciAPIs::addAPIEntries(const WordIndexList &wl, bool complete, QStringList &with_context, bool &unambig) { QStringList wseps = lexer()->autoCompletionWordSeparators(); for (int w = 0; w < wl.count(); ++w) { const WordIndex &wi = wl[w]; QStringList api_words = prep->apiWords(wi.first, wseps, false); int idx = wi.second; if (complete) { // Skip if this is the last word. if (++idx >= api_words.count()) continue; } QString api_word, org; if (idx == 0) { api_word = api_words[0] + ' '; org = QString::fromLatin1(""); } else { QStringList orgl = api_words.mid(0, idx); org = orgl.join(wseps.first()); // Add the context (allowing for a possible image identifier). QString w = api_words[idx]; QString type; int type_idx = w.indexOf(QLatin1String("?")); if (type_idx >= 0) { type = w.mid(type_idx); w.truncate(type_idx); } api_word = QString("%1 (%2)%3").arg(w).arg(org).arg(type); } // If the origin is different to the context then the context is // ambiguous. if (unambig) { if (unambiguous_context.isNull()) { unambiguous_context = org; } else if (unambiguous_context != org) { unambiguous_context.truncate(0); unambig = false; } } if (!with_context.contains(api_word)) with_context.append(api_word); } } // Return the call tip for a function. QStringList QsciAPIs::callTips(const QStringList &context, int commas, QsciScintilla::CallTipsStyle style, QList &shifts) { QString path; QStringList new_context = positionOrigin(context, path); QStringList wseps = lexer()->autoCompletionWordSeparators(); QStringList cts; if (origin_len > 0) { // The path should have a trailing word separator. const QString &wsep = wseps.first(); path.chop(wsep.length()); QStringList::const_iterator it = origin; QString prev; // Work out the length of the context. QStringList strip = path.split(wsep); strip.removeLast(); int ctstart = strip.join(wsep).length(); if (ctstart) ctstart += wsep.length(); int shift; if (style == QsciScintilla::CallTipsContext) { shift = ctstart; ctstart = 0; } else shift = 0; // Make sure we only look at the functions we are interested in. path.append('('); while (it != prep->raw_apis.end() && (*it).startsWith(path)) { QString w = (*it).mid(ctstart); if (w != prev && enoughCommas(w, commas)) { shifts << shift; cts << w; prev = w; } ++it; } } else { const QString &fname = new_context[new_context.count() - 2]; // Find everywhere the function name appears in the APIs. const WordIndexList *wil = wordIndexOf(fname); if (wil) for (int i = 0; i < wil->count(); ++i) { const WordIndex &wi = (*wil)[i]; QStringList awords = prep->apiWords(wi.first, wseps, true); // Check the word is the function name and not part of any // context. if (wi.second != awords.count() - 1) continue; const QString &api = prep->raw_apis[wi.first]; int tail = api.indexOf('('); if (tail < 0) continue; if (!enoughCommas(api, commas)) continue; if (style == QsciScintilla::CallTipsNoContext) { shifts << 0; cts << (fname + api.mid(tail)); } else { shifts << tail - fname.length(); // Remove any image type. int im_type = api.indexOf('?'); if (im_type <= 0) cts << api; else cts << (api.left(im_type - 1) + api.mid(tail)); } } } return cts; } // Return true if a string has enough commas in the argument list. bool QsciAPIs::enoughCommas(const QString &s, int commas) { int end = s.indexOf(')'); if (end < 0) return false; QString w = s.left(end); return (w.count(',') >= commas); } // Ensure the list is ready. void QsciAPIs::prepare() { // Handle the trivial case. if (worker) return; QsciAPIsPrepared *new_apis = new QsciAPIsPrepared; new_apis->raw_apis = apis; worker = new QsciAPIsWorker(this); worker->prepared = new_apis; worker->start(); } // Cancel any current preparation. void QsciAPIs::cancelPreparation() { deleteWorker(); } // Check that a prepared API file exists. bool QsciAPIs::isPrepared(const QString &filename) const { QString pname = prepName(filename); if (pname.isEmpty()) return false; QFileInfo fi(pname); return fi.exists(); } // Load the prepared API information. bool QsciAPIs::loadPrepared(const QString &filename) { QString pname = prepName(filename); if (pname.isEmpty()) return false; // Read the prepared data and decompress it. QFile pf(pname); if (!pf.open(QIODevice::ReadOnly)) return false; QByteArray cpdata = pf.readAll(); pf.close(); if (cpdata.count() == 0) return false; QByteArray pdata = qUncompress(cpdata); // Extract the data. QDataStream pds(pdata); unsigned char vers; pds >> vers; if (vers > PreparedDataFormatVersion) return false; char *lex_name; pds >> lex_name; if (qstrcmp(lex_name, lexer()->lexer()) != 0) { delete[] lex_name; return false; } delete[] lex_name; prep->wdict.clear(); pds >> prep->wdict; if (!lexer()->caseSensitive()) { // Build up the case dictionary. prep->cdict.clear(); QMap::const_iterator it = prep->wdict.begin(); while (it != prep->wdict.end()) { prep->cdict[it.key().toUpper()] = it.key(); ++it; } } prep->raw_apis.clear(); pds >> prep->raw_apis; // Allow the raw API information to be modified. apis = prep->raw_apis; return true; } // Save the prepared API information. bool QsciAPIs::savePrepared(const QString &filename) const { QString pname = prepName(filename, true); if (pname.isEmpty()) return false; // Write the prepared data to a memory buffer. QByteArray pdata; QDataStream pds(&pdata, QIODevice::WriteOnly); // Use a serialisation format supported by Qt v3.0 and later. pds.setVersion(QDataStream::Qt_3_0); pds << PreparedDataFormatVersion; pds << lexer()->lexer(); pds << prep->wdict; pds << prep->raw_apis; // Compress the data and write it. QFile pf(pname); if (!pf.open(QIODevice::WriteOnly|QIODevice::Truncate)) return false; if (pf.write(qCompress(pdata)) < 0) { pf.close(); return false; } pf.close(); return true; } // Return the name of the default prepared API file. QString QsciAPIs::defaultPreparedName() const { return prepName(QString()); } // Return the name of a prepared API file. QString QsciAPIs::prepName(const QString &filename, bool mkpath) const { // Handle the tivial case. if (!filename.isEmpty()) return filename; QString pdname; char *qsci = getenv("QSCIDIR"); if (qsci) pdname = qsci; else { static const char *qsci_dir = ".qsci"; QDir pd = QDir::home(); if (mkpath && !pd.exists(qsci_dir) && !pd.mkdir(qsci_dir)) return QString(); pdname = pd.filePath(qsci_dir); } return QString("%1/%2.pap").arg(pdname).arg(lexer()->lexer()); } // Return installed API files. QStringList QsciAPIs::installedAPIFiles() const { QString qtdir = QLibraryInfo::location(QLibraryInfo::DataPath); QDir apidir = QDir(QString("%1/qsci/api/%2").arg(qtdir).arg(lexer()->lexer())); QStringList filenames; QStringList filters; filters << "*.api"; QFileInfoList flist = apidir.entryInfoList(filters, QDir::Files, QDir::IgnoreCase); foreach (QFileInfo fi, flist) filenames << fi.absoluteFilePath(); return filenames; } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscicommand.cpp000066400000000000000000000065021345112435200236460ustar00rootroot00000000000000// This module implements the QsciCommand class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscicommand.h" #include #include #include "Qsci/qsciscintilla.h" #include "Qsci/qsciscintillabase.h" static int convert(int key); // The ctor. QsciCommand::QsciCommand(QsciScintilla *qs, QsciCommand::Command cmd, int key, int altkey, const char *desc) : qsCmd(qs), scicmd(cmd), qkey(key), qaltkey(altkey), descCmd(desc) { scikey = convert(qkey); if (scikey) qsCmd->SendScintilla(QsciScintillaBase::SCI_ASSIGNCMDKEY, scikey, scicmd); scialtkey = convert(qaltkey); if (scialtkey) qsCmd->SendScintilla(QsciScintillaBase::SCI_ASSIGNCMDKEY, scialtkey, scicmd); } // Execute the command. void QsciCommand::execute() { qsCmd->SendScintilla(scicmd); } // Bind a key to a command. void QsciCommand::setKey(int key) { bindKey(key,qkey,scikey); } // Bind an alternate key to a command. void QsciCommand::setAlternateKey(int altkey) { bindKey(altkey,qaltkey,scialtkey); } // Do the hard work of binding a key. void QsciCommand::bindKey(int key,int &qk,int &scik) { int new_scikey; // Ignore if it is invalid, allowing for the fact that we might be // unbinding it. if (key) { new_scikey = convert(key); if (!new_scikey) return; } else new_scikey = 0; if (scik) qsCmd->SendScintilla(QsciScintillaBase::SCI_CLEARCMDKEY, scik); qk = key; scik = new_scikey; if (scik) qsCmd->SendScintilla(QsciScintillaBase::SCI_ASSIGNCMDKEY, scik, scicmd); } // See if a key is valid. bool QsciCommand::validKey(int key) { return convert(key); } // Convert a Qt character to the Scintilla equivalent. Return zero if it is // invalid. static int convert(int key) { // Convert the modifiers. int sci_mod = 0; if (key & Qt::SHIFT) sci_mod |= QsciScintillaBase::SCMOD_SHIFT; if (key & Qt::CTRL) sci_mod |= QsciScintillaBase::SCMOD_CTRL; if (key & Qt::ALT) sci_mod |= QsciScintillaBase::SCMOD_ALT; if (key & Qt::META) sci_mod |= QsciScintillaBase::SCMOD_META; key &= ~Qt::MODIFIER_MASK; // Convert the key. int sci_key = QsciScintillaBase::commandKey(key, sci_mod); if (sci_key) sci_key |= (sci_mod << 16); return sci_key; } // Return the translated user friendly description. QString QsciCommand::description() const { return qApp->translate("QsciCommand", descCmd); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscicommandset.cpp000066400000000000000000000655611345112435200243740ustar00rootroot00000000000000// This module implements the QsciCommandSet class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscicommandset.h" #include #include "Qsci/qscicommand.h" #include "Qsci/qsciscintilla.h" #include "Qsci/qsciscintillabase.h" // Starting with QScintilla v2.7 the standard OS/X keyboard shortcuts are used // where possible. In order to restore the behaviour of earlier versions then // #define DONT_USE_OSX_KEYS here or add it to the qmake project (.pro) file. #if defined(Q_OS_MAC) && !defined(DONT_USE_OSX_KEYS) #define USING_OSX_KEYS #else #undef USING_OSX_KEYS #endif // The ctor. QsciCommandSet::QsciCommandSet(QsciScintilla *qs) : qsci(qs) { struct sci_cmd { QsciCommand::Command cmd; int key; int altkey; const char *desc; }; static struct sci_cmd cmd_table[] = { { QsciCommand::LineDown, Qt::Key_Down, #if defined(USING_OSX_KEYS) Qt::Key_N | Qt::META, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Move down one line") }, { QsciCommand::LineDownExtend, Qt::Key_Down | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_N | Qt::META | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend selection down one line") }, { QsciCommand::LineDownRectExtend, Qt::Key_Down | Qt::ALT | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_N | Qt::META | Qt::ALT | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection down one line") }, { QsciCommand::LineScrollDown, Qt::Key_Down | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Scroll view down one line") }, { QsciCommand::LineUp, Qt::Key_Up, #if defined(USING_OSX_KEYS) Qt::Key_P | Qt::META, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Move up one line") }, { QsciCommand::LineUpExtend, Qt::Key_Up | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_P | Qt::META | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend selection up one line") }, { QsciCommand::LineUpRectExtend, Qt::Key_Up | Qt::ALT | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_P | Qt::META | Qt::ALT | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection up one line") }, { QsciCommand::LineScrollUp, Qt::Key_Up | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Scroll view up one line") }, { QsciCommand::ScrollToStart, #if defined(USING_OSX_KEYS) Qt::Key_Home, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Scroll to start of document") }, { QsciCommand::ScrollToEnd, #if defined(USING_OSX_KEYS) Qt::Key_End, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Scroll to end of document") }, { QsciCommand::VerticalCentreCaret, #if defined(USING_OSX_KEYS) Qt::Key_L | Qt::META, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Scroll vertically to centre current line") }, { QsciCommand::ParaDown, Qt::Key_BracketRight | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move down one paragraph") }, { QsciCommand::ParaDownExtend, Qt::Key_BracketRight | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection down one paragraph") }, { QsciCommand::ParaUp, Qt::Key_BracketLeft | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move up one paragraph") }, { QsciCommand::ParaUpExtend, Qt::Key_BracketLeft | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection up one paragraph") }, { QsciCommand::CharLeft, Qt::Key_Left, #if defined(USING_OSX_KEYS) Qt::Key_B | Qt::META, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Move left one character") }, { QsciCommand::CharLeftExtend, Qt::Key_Left | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_B | Qt::META | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend selection left one character") }, { QsciCommand::CharLeftRectExtend, Qt::Key_Left | Qt::ALT | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_B | Qt::META | Qt::ALT | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection left one character") }, { QsciCommand::CharRight, Qt::Key_Right, #if defined(USING_OSX_KEYS) Qt::Key_F | Qt::META, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Move right one character") }, { QsciCommand::CharRightExtend, Qt::Key_Right | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_F | Qt::META | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend selection right one character") }, { QsciCommand::CharRightRectExtend, Qt::Key_Right | Qt::ALT | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_F | Qt::META | Qt::ALT | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection right one character") }, { QsciCommand::WordLeft, #if defined(USING_OSX_KEYS) Qt::Key_Left | Qt::ALT, #else Qt::Key_Left | Qt::CTRL, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move left one word") }, { QsciCommand::WordLeftExtend, #if defined(USING_OSX_KEYS) Qt::Key_Left | Qt::ALT | Qt::SHIFT, #else Qt::Key_Left | Qt::CTRL | Qt::SHIFT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection left one word") }, { QsciCommand::WordRight, #if defined(USING_OSX_KEYS) 0, #else Qt::Key_Right | Qt::CTRL, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move right one word") }, { QsciCommand::WordRightExtend, Qt::Key_Right | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection right one word") }, { QsciCommand::WordLeftEnd, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to end of previous word") }, { QsciCommand::WordLeftEndExtend, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to end of previous word") }, { QsciCommand::WordRightEnd, #if defined(USING_OSX_KEYS) Qt::Key_Right | Qt::ALT, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to end of next word") }, { QsciCommand::WordRightEndExtend, #if defined(USING_OSX_KEYS) Qt::Key_Right | Qt::ALT | Qt::SHIFT, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to end of next word") }, { QsciCommand::WordPartLeft, Qt::Key_Slash | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move left one word part") }, { QsciCommand::WordPartLeftExtend, Qt::Key_Slash | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection left one word part") }, { QsciCommand::WordPartRight, Qt::Key_Backslash | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move right one word part") }, { QsciCommand::WordPartRightExtend, Qt::Key_Backslash | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection right one word part") }, { QsciCommand::Home, #if defined(USING_OSX_KEYS) Qt::Key_A | Qt::META, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to start of document line") }, { QsciCommand::HomeExtend, #if defined(USING_OSX_KEYS) Qt::Key_A | Qt::META | Qt::SHIFT, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to start of document line") }, { QsciCommand::HomeRectExtend, #if defined(USING_OSX_KEYS) Qt::Key_A | Qt::META | Qt::ALT | Qt::SHIFT, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection to start of document line") }, { QsciCommand::HomeDisplay, #if defined(USING_OSX_KEYS) Qt::Key_Left | Qt::CTRL, #else Qt::Key_Home | Qt::ALT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to start of display line") }, { QsciCommand::HomeDisplayExtend, #if defined(USING_OSX_KEYS) Qt::Key_Left | Qt::CTRL | Qt::SHIFT, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to start of display line") }, { QsciCommand::HomeWrap, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to start of display or document line") }, { QsciCommand::HomeWrapExtend, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to start of display or document line") }, { QsciCommand::VCHome, #if defined(USING_OSX_KEYS) 0, #else Qt::Key_Home, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to first visible character in document line") }, { QsciCommand::VCHomeExtend, #if defined(USING_OSX_KEYS) 0, #else Qt::Key_Home | Qt::SHIFT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to first visible character in document line") }, { QsciCommand::VCHomeRectExtend, #if defined(USING_OSX_KEYS) 0, #else Qt::Key_Home | Qt::ALT | Qt::SHIFT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection to first visible character in document line") }, { QsciCommand::VCHomeWrap, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to first visible character of display in document line") }, { QsciCommand::VCHomeWrapExtend, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to first visible character in display or document line") }, { QsciCommand::LineEnd, #if defined(USING_OSX_KEYS) Qt::Key_E | Qt::META, #else Qt::Key_End, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to end of document line") }, { QsciCommand::LineEndExtend, #if defined(USING_OSX_KEYS) Qt::Key_E | Qt::META | Qt::SHIFT, #else Qt::Key_End | Qt::SHIFT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to end of document line") }, { QsciCommand::LineEndRectExtend, #if defined(USING_OSX_KEYS) Qt::Key_E | Qt::META | Qt::ALT | Qt::SHIFT, #else Qt::Key_End | Qt::ALT | Qt::SHIFT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection to end of document line") }, { QsciCommand::LineEndDisplay, #if defined(USING_OSX_KEYS) Qt::Key_Right | Qt::CTRL, #else Qt::Key_End | Qt::ALT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to end of display line") }, { QsciCommand::LineEndDisplayExtend, #if defined(USING_OSX_KEYS) Qt::Key_Right | Qt::CTRL | Qt::SHIFT, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to end of display line") }, { QsciCommand::LineEndWrap, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to end of display or document line") }, { QsciCommand::LineEndWrapExtend, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to end of display or document line") }, { QsciCommand::DocumentStart, #if defined(USING_OSX_KEYS) Qt::Key_Up | Qt::CTRL, #else Qt::Key_Home | Qt::CTRL, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to start of document") }, { QsciCommand::DocumentStartExtend, #if defined(USING_OSX_KEYS) Qt::Key_Up | Qt::CTRL | Qt::SHIFT, #else Qt::Key_Home | Qt::CTRL | Qt::SHIFT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to start of document") }, { QsciCommand::DocumentEnd, #if defined(USING_OSX_KEYS) Qt::Key_Down | Qt::CTRL, #else Qt::Key_End | Qt::CTRL, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Move to end of document") }, { QsciCommand::DocumentEndExtend, #if defined(USING_OSX_KEYS) Qt::Key_Down | Qt::CTRL | Qt::SHIFT, #else Qt::Key_End | Qt::CTRL | Qt::SHIFT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection to end of document") }, { QsciCommand::PageUp, Qt::Key_PageUp, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move up one page") }, { QsciCommand::PageUpExtend, Qt::Key_PageUp | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend selection up one page") }, { QsciCommand::PageUpRectExtend, Qt::Key_PageUp | Qt::ALT | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection up one page") }, { QsciCommand::PageDown, Qt::Key_PageDown, #if defined(USING_OSX_KEYS) Qt::Key_V | Qt::META, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Move down one page") }, { QsciCommand::PageDownExtend, Qt::Key_PageDown | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_V | Qt::META | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend selection down one page") }, { QsciCommand::PageDownRectExtend, Qt::Key_PageDown | Qt::ALT | Qt::SHIFT, #if defined(USING_OSX_KEYS) Qt::Key_V | Qt::META | Qt::ALT | Qt::SHIFT, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Extend rectangular selection down one page") }, { QsciCommand::StutteredPageUp, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Stuttered move up one page") }, { QsciCommand::StutteredPageUpExtend, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Stuttered extend selection up one page") }, { QsciCommand::StutteredPageDown, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Stuttered move down one page") }, { QsciCommand::StutteredPageDownExtend, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Stuttered extend selection down one page") }, { QsciCommand::Delete, Qt::Key_Delete, #if defined(USING_OSX_KEYS) Qt::Key_D | Qt::META, #else 0, #endif QT_TRANSLATE_NOOP("QsciCommand", "Delete current character") }, { QsciCommand::DeleteBack, Qt::Key_Backspace, #if defined(USING_OSX_KEYS) Qt::Key_H | Qt::META, #else Qt::Key_Backspace | Qt::SHIFT, #endif QT_TRANSLATE_NOOP("QsciCommand", "Delete previous character") }, { QsciCommand::DeleteBackNotLine, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Delete previous character if not at start of line") }, { QsciCommand::DeleteWordLeft, Qt::Key_Backspace | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Delete word to left") }, { QsciCommand::DeleteWordRight, Qt::Key_Delete | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Delete word to right") }, { QsciCommand::DeleteWordRightEnd, #if defined(USING_OSX_KEYS) Qt::Key_Delete | Qt::ALT, #else 0, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Delete right to end of next word") }, { QsciCommand::DeleteLineLeft, Qt::Key_Backspace | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Delete line to left") }, { QsciCommand::DeleteLineRight, #if defined(USING_OSX_KEYS) Qt::Key_K | Qt::META, #else Qt::Key_Delete | Qt::CTRL | Qt::SHIFT, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Delete line to right") }, { QsciCommand::LineDelete, Qt::Key_L | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Delete current line") }, { QsciCommand::LineCut, Qt::Key_L | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Cut current line") }, { QsciCommand::LineCopy, Qt::Key_T | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Copy current line") }, { QsciCommand::LineTranspose, Qt::Key_T | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Transpose current and previous lines") }, { QsciCommand::LineDuplicate, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Duplicate the current line") }, { QsciCommand::SelectAll, Qt::Key_A | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Select all") }, { QsciCommand::MoveSelectedLinesUp, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move selected lines up one line") }, { QsciCommand::MoveSelectedLinesDown, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Move selected lines down one line") }, { QsciCommand::SelectionDuplicate, Qt::Key_D | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Duplicate selection") }, { QsciCommand::SelectionLowerCase, Qt::Key_U | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Convert selection to lower case") }, { QsciCommand::SelectionUpperCase, Qt::Key_U | Qt::CTRL | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "Convert selection to upper case") }, { QsciCommand::SelectionCut, Qt::Key_X | Qt::CTRL, Qt::Key_Delete | Qt::SHIFT, QT_TRANSLATE_NOOP("QsciCommand", "Cut selection") }, { QsciCommand::SelectionCopy, Qt::Key_C | Qt::CTRL, Qt::Key_Insert | Qt::CTRL, QT_TRANSLATE_NOOP("QsciCommand", "Copy selection") }, { QsciCommand::Paste, Qt::Key_V | Qt::CTRL, Qt::Key_Insert | Qt::SHIFT, QT_TRANSLATE_NOOP("QsciCommand", "Paste") }, { QsciCommand::EditToggleOvertype, Qt::Key_Insert, 0, QT_TRANSLATE_NOOP("QsciCommand", "Toggle insert/overtype") }, { QsciCommand::Newline, Qt::Key_Return, Qt::Key_Return | Qt::SHIFT, QT_TRANSLATE_NOOP("QsciCommand", "Insert newline") }, { QsciCommand::Formfeed, 0, 0, QT_TRANSLATE_NOOP("QsciCommand", "Formfeed") }, { QsciCommand::Tab, Qt::Key_Tab, 0, QT_TRANSLATE_NOOP("QsciCommand", "Indent one level") }, { QsciCommand::Backtab, Qt::Key_Tab | Qt::SHIFT, 0, QT_TRANSLATE_NOOP("QsciCommand", "De-indent one level") }, { QsciCommand::Cancel, Qt::Key_Escape, 0, QT_TRANSLATE_NOOP("QsciCommand", "Cancel") }, { QsciCommand::Undo, Qt::Key_Z | Qt::CTRL, Qt::Key_Backspace | Qt::ALT, QT_TRANSLATE_NOOP("QsciCommand", "Undo last command") }, { QsciCommand::Redo, #if defined(USING_OSX_KEYS) Qt::Key_Z | Qt::CTRL | Qt::SHIFT, #else Qt::Key_Y | Qt::CTRL, #endif 0, QT_TRANSLATE_NOOP("QsciCommand", "Redo last command") }, { QsciCommand::ZoomIn, Qt::Key_Plus | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Zoom in") }, { QsciCommand::ZoomOut, Qt::Key_Minus | Qt::CTRL, 0, QT_TRANSLATE_NOOP("QsciCommand", "Zoom out") }, }; // Clear the default map. qsci->SendScintilla(QsciScintillaBase::SCI_CLEARALLCMDKEYS); // By default control characters don't do anything (rather than insert the // control character into the text). for (int k = 'A'; k <= 'Z'; ++k) qsci->SendScintilla(QsciScintillaBase::SCI_ASSIGNCMDKEY, k + (QsciScintillaBase::SCMOD_CTRL << 16), QsciScintillaBase::SCI_NULL); for (int i = 0; i < sizeof (cmd_table) / sizeof (cmd_table[0]); ++i) cmds.append( new QsciCommand(qsci, cmd_table[i].cmd, cmd_table[i].key, cmd_table[i].altkey, cmd_table[i].desc)); } // The dtor. QsciCommandSet::~QsciCommandSet() { for (int i = 0; i < cmds.count(); ++i) delete cmds.at(i); } // Read the command set from settings. bool QsciCommandSet::readSettings(QSettings &qs, const char *prefix) { bool rc = true; QString skey; for (int i = 0; i < cmds.count(); ++i) { QsciCommand *cmd = cmds.at(i); skey.sprintf("%s/keymap/c%d/", prefix, static_cast(cmd->command())); int key; bool ok; // Read the key. ok = qs.contains(skey + "key"); key = qs.value(skey + "key", 0).toInt(); if (ok) cmd->setKey(key); else rc = false; // Read the alternate key. ok = qs.contains(skey + "alt"); key = qs.value(skey + "alt", 0).toInt(); if (ok) cmd->setAlternateKey(key); else rc = false; } return rc; } // Write the command set to settings. bool QsciCommandSet::writeSettings(QSettings &qs, const char *prefix) { bool rc = true; QString skey; for (int i = 0; i < cmds.count(); ++i) { QsciCommand *cmd = cmds.at(i); skey.sprintf("%s/keymap/c%d/", prefix, static_cast(cmd->command())); // Write the key. qs.setValue(skey + "key", cmd->key()); // Write the alternate key. qs.setValue(skey + "alt", cmd->key()); } return rc; } // Clear the key bindings. void QsciCommandSet::clearKeys() { for (int i = 0; i < cmds.count(); ++i) cmds.at(i)->setKey(0); } // Clear the alternate key bindings. void QsciCommandSet::clearAlternateKeys() { for (int i = 0; i < cmds.count(); ++i) cmds.at(i)->setAlternateKey(0); } // Find the command bound to a key. QsciCommand *QsciCommandSet::boundTo(int key) const { for (int i = 0; i < cmds.count(); ++i) { QsciCommand *cmd = cmds.at(i); if (cmd->key() == key || cmd->alternateKey() == key) return cmd; } return 0; } // Find a command. QsciCommand *QsciCommandSet::find(QsciCommand::Command command) const { for (int i = 0; i < cmds.count(); ++i) { QsciCommand *cmd = cmds.at(i); if (cmd->command() == command) return cmd; } // This should never happen. return 0; } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscidocument.cpp000066400000000000000000000073211345112435200240460ustar00rootroot00000000000000// This module implements the QsciDocument class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscidocument.h" #include "Qsci/qsciscintillabase.h" // This internal class encapsulates the underlying document and is shared by // QsciDocument instances. class QsciDocumentP { public: QsciDocumentP() : doc(0), nr_displays(0), nr_attaches(1), modified(false) {} void *doc; // The Scintilla document. int nr_displays; // The number of displays. int nr_attaches; // The number of attaches. bool modified; // Set if not at a save point. }; // The ctor. QsciDocument::QsciDocument() { pdoc = new QsciDocumentP(); } // The dtor. QsciDocument::~QsciDocument() { detach(); } // The copy ctor. QsciDocument::QsciDocument(const QsciDocument &that) { attach(that); } // The assignment operator. QsciDocument &QsciDocument::operator=(const QsciDocument &that) { if (pdoc != that.pdoc) { detach(); attach(that); } return *this; } // Attach an existing document to this one. void QsciDocument::attach(const QsciDocument &that) { ++that.pdoc->nr_attaches; pdoc = that.pdoc; } // Detach the underlying document. void QsciDocument::detach() { if (!pdoc) return; if (--pdoc->nr_attaches == 0) { if (pdoc->doc && pdoc->nr_displays == 0) { QsciScintillaBase *qsb = QsciScintillaBase::pool(); // Release the explicit reference to the document. If the pool is // empty then we just accept the memory leak. if (qsb) qsb->SendScintilla(QsciScintillaBase::SCI_RELEASEDOCUMENT, 0, pdoc->doc); } delete pdoc; } pdoc = 0; } // Undisplay and detach the underlying document. void QsciDocument::undisplay(QsciScintillaBase *qsb) { if (--pdoc->nr_attaches == 0) delete pdoc; else if (--pdoc->nr_displays == 0) { // Create an explicit reference to the document to keep it alive. qsb->SendScintilla(QsciScintillaBase::SCI_ADDREFDOCUMENT, 0, pdoc->doc); } pdoc = 0; } // Display the underlying document. void QsciDocument::display(QsciScintillaBase *qsb, const QsciDocument *from) { void *ndoc = (from ? from->pdoc->doc : 0); // SCI_SETDOCPOINTER appears to reset the EOL mode so save and restore it. int eol_mode = qsb->SendScintilla(QsciScintillaBase::SCI_GETEOLMODE); qsb->SendScintilla(QsciScintillaBase::SCI_SETDOCPOINTER, 0, ndoc); ndoc = qsb->SendScintillaPtrResult(QsciScintillaBase::SCI_GETDOCPOINTER); qsb->SendScintilla(QsciScintillaBase::SCI_SETEOLMODE, eol_mode); pdoc->doc = ndoc; ++pdoc->nr_displays; } // Return the modified state of the document. bool QsciDocument::isModified() const { return pdoc->modified; } // Set the modified state of the document. void QsciDocument::setModified(bool m) { pdoc->modified = m; } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscilexer.cpp000066400000000000000000000407641345112435200233570ustar00rootroot00000000000000// This module implements the QsciLexer class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscilexer.h" #include #include #include #include #include "Qsci/qsciapis.h" #include "Qsci/qsciscintilla.h" #include "Qsci/qsciscintillabase.h" // The ctor. QsciLexer::QsciLexer(QObject *parent) : QObject(parent), autoIndStyle(-1), apiSet(0), attached_editor(0) { #if defined(Q_OS_WIN) defFont = QFont("Verdana",10); #elif defined(Q_OS_MAC) defFont = QFont("Verdana", 12); #else defFont = QFont("Bitstream Vera Sans",9); #endif // Set the default fore and background colours. QPalette pal = QApplication::palette(); defColor = pal.text().color(); defPaper = pal.base().color(); // Putting this on the heap means we can keep the style getters const. style_map = new StyleDataMap; style_map->style_data_set = false; } // The dtor. QsciLexer::~QsciLexer() { delete style_map; } // Set the attached editor. void QsciLexer::setEditor(QsciScintilla *editor) { attached_editor = editor; if (attached_editor) { attached_editor->SendScintilla(QsciScintillaBase::SCI_SETSTYLEBITS, styleBitsNeeded()); } } // Return the lexer name. const char *QsciLexer::lexer() const { return 0; } // Return the lexer identifier. int QsciLexer::lexerId() const { return QsciScintillaBase::SCLEX_CONTAINER; } // Return the number of style bits needed by the lexer. int QsciLexer::styleBitsNeeded() const { if (!attached_editor) return 5; return attached_editor->SendScintilla(QsciScintillaBase::SCI_GETSTYLEBITSNEEDED); } // Make sure the style defaults have been set. void QsciLexer::setStyleDefaults() const { if (!style_map->style_data_set) { for (int i = 0; i < 128; ++i) if (!description(i).isEmpty()) styleData(i); style_map->style_data_set = true; } } // Return a reference to a style's data, setting up the defaults if needed. QsciLexer::StyleData &QsciLexer::styleData(int style) const { StyleData &sd = style_map->style_data[style]; // See if this is a new style by checking if the colour is valid. if (!sd.color.isValid()) { sd.color = defaultColor(style); sd.paper = defaultPaper(style); sd.font = defaultFont(style); sd.eol_fill = defaultEolFill(style); } return sd; } // Set the APIs associated with the lexer. void QsciLexer::setAPIs(QsciAbstractAPIs *apis) { apiSet = apis; } // Return a pointer to the current APIs if there are any. QsciAbstractAPIs *QsciLexer::apis() const { return apiSet; } // Default implementation to return the set of fill up characters that can end // auto-completion. const char *QsciLexer::autoCompletionFillups() const { return "("; } // Default implementation to return the view used for indentation guides. int QsciLexer::indentationGuideView() const { return QsciScintillaBase::SC_IV_LOOKBOTH; } // Default implementation to return the list of character sequences that can // separate auto-completion words. QStringList QsciLexer::autoCompletionWordSeparators() const { return QStringList(); } // Default implementation to return the list of keywords that can start a // block. const char *QsciLexer::blockStartKeyword(int *) const { return 0; } // Default implementation to return the list of characters that can start a // block. const char *QsciLexer::blockStart(int *) const { return 0; } // Default implementation to return the list of characters that can end a // block. const char *QsciLexer::blockEnd(int *) const { return 0; } // Default implementation to return the style used for braces. int QsciLexer::braceStyle() const { return -1; } // Default implementation to return the number of lines to look back when // auto-indenting. int QsciLexer::blockLookback() const { return 20; } // Default implementation to return the case sensitivity of the language. bool QsciLexer::caseSensitive() const { return true; } // Default implementation to return the characters that make up a word. const char *QsciLexer::wordCharacters() const { return 0; } // Default implementation to return the style used for whitespace. int QsciLexer::defaultStyle() const { return 0; } // Returns the foreground colour of the text for a style. QColor QsciLexer::color(int style) const { return styleData(style).color; } // Returns the background colour of the text for a style. QColor QsciLexer::paper(int style) const { return styleData(style).paper; } // Returns the font for a style. QFont QsciLexer::font(int style) const { return styleData(style).font; } // Returns the end-of-line fill for a style. bool QsciLexer::eolFill(int style) const { return styleData(style).eol_fill; } // Returns the set of keywords. const char *QsciLexer::keywords(int) const { return 0; } // Returns the default EOL fill for a style. bool QsciLexer::defaultEolFill(int) const { return false; } // Returns the default font for a style. QFont QsciLexer::defaultFont(int) const { return defaultFont(); } // Returns the default font. QFont QsciLexer::defaultFont() const { return defFont; } // Sets the default font. void QsciLexer::setDefaultFont(const QFont &f) { defFont = f; } // Returns the default text colour for a style. QColor QsciLexer::defaultColor(int) const { return defaultColor(); } // Returns the default text colour. QColor QsciLexer::defaultColor() const { return defColor; } // Sets the default text colour. void QsciLexer::setDefaultColor(const QColor &c) { defColor = c; } // Returns the default paper colour for a styles. QColor QsciLexer::defaultPaper(int) const { return defaultPaper(); } // Returns the default paper colour. QColor QsciLexer::defaultPaper() const { return defPaper; } // Sets the default paper colour. void QsciLexer::setDefaultPaper(const QColor &c) { defPaper = c; // Normally the default values are only intended to provide defaults when a // lexer is first setup because once a style has been referenced then a // copy of the default is made. However the default paper is a special // case because there is no other way to set the background colour used // where there is no text. Therefore we also actively set it. setPaper(c, QsciScintillaBase::STYLE_DEFAULT); } // Read properties from the settings. bool QsciLexer::readProperties(QSettings &,const QString &) { return true; } // Refresh all properties. void QsciLexer::refreshProperties() { } // Write properties to the settings. bool QsciLexer::writeProperties(QSettings &,const QString &) const { return true; } // Restore the user settings. bool QsciLexer::readSettings(QSettings &qs,const char *prefix) { bool ok, flag, rc = true; int num; QString key, full_key; QStringList fdesc; setStyleDefaults(); // Read the styles. for (int i = 0; i < 128; ++i) { // Ignore invalid styles. if (description(i).isEmpty()) continue; key.sprintf("%s/%s/style%d/",prefix,language(),i); // Read the foreground colour. full_key = key + "color"; ok = qs.contains(full_key); num = qs.value(full_key).toInt(); if (ok) setColor(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i); else rc = false; // Read the end-of-line fill. full_key = key + "eolfill"; ok = qs.contains(full_key); flag = qs.value(full_key, false).toBool(); if (ok) setEolFill(flag, i); else rc = false; // Read the font. First try the deprecated format that uses an integer // point size. full_key = key + "font"; ok = qs.contains(full_key); fdesc = qs.value(full_key).toStringList(); if (ok && fdesc.count() == 5) { QFont f; f.setFamily(fdesc[0]); f.setPointSize(fdesc[1].toInt()); f.setBold(fdesc[2].toInt()); f.setItalic(fdesc[3].toInt()); f.setUnderline(fdesc[4].toInt()); setFont(f, i); } else rc = false; // Now try the newer font format that uses a floating point point size. // It is not an error if it doesn't exist. full_key = key + "font2"; ok = qs.contains(full_key); fdesc = qs.value(full_key).toStringList(); if (ok) { // Allow for future versions with more fields. if (fdesc.count() >= 5) { QFont f; f.setFamily(fdesc[0]); f.setPointSizeF(fdesc[1].toDouble()); f.setBold(fdesc[2].toInt()); f.setItalic(fdesc[3].toInt()); f.setUnderline(fdesc[4].toInt()); setFont(f, i); } else { rc = false; } } // Read the background colour. full_key = key + "paper"; ok = qs.contains(full_key); num = qs.value(full_key).toInt(); if (ok) setPaper(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i); else rc = false; } // Read the properties. key.sprintf("%s/%s/properties/",prefix,language()); if (!readProperties(qs,key)) rc = false; refreshProperties(); // Read the rest. key.sprintf("%s/%s/",prefix,language()); // Read the default foreground colour. full_key = key + "defaultcolor"; ok = qs.contains(full_key); num = qs.value(full_key).toInt(); if (ok) setDefaultColor(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff)); else rc = false; // Read the default background colour. full_key = key + "defaultpaper"; ok = qs.contains(full_key); num = qs.value(full_key).toInt(); if (ok) setDefaultPaper(QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff)); else rc = false; // Read the default font. First try the deprecated format that uses an // integer point size. full_key = key + "defaultfont"; ok = qs.contains(full_key); fdesc = qs.value(full_key).toStringList(); if (ok && fdesc.count() == 5) { QFont f; f.setFamily(fdesc[0]); f.setPointSize(fdesc[1].toInt()); f.setBold(fdesc[2].toInt()); f.setItalic(fdesc[3].toInt()); f.setUnderline(fdesc[4].toInt()); setDefaultFont(f); } else rc = false; // Now try the newer font format that uses a floating point point size. It // is not an error if it doesn't exist. full_key = key + "defaultfont2"; ok = qs.contains(full_key); fdesc = qs.value(full_key).toStringList(); if (ok) { // Allow for future versions with more fields. if (fdesc.count() >= 5) { QFont f; f.setFamily(fdesc[0]); f.setPointSizeF(fdesc[1].toDouble()); f.setBold(fdesc[2].toInt()); f.setItalic(fdesc[3].toInt()); f.setUnderline(fdesc[4].toInt()); setDefaultFont(f); } else { rc = false; } } full_key = key + "autoindentstyle"; ok = qs.contains(full_key); num = qs.value(full_key).toInt(); if (ok) setAutoIndentStyle(num); else rc = false; return rc; } // Save the user settings. bool QsciLexer::writeSettings(QSettings &qs,const char *prefix) const { bool rc = true; QString key, fmt("%1"); int num; QStringList fdesc; setStyleDefaults(); // Write the styles. for (int i = 0; i < 128; ++i) { // Ignore invalid styles. if (description(i).isEmpty()) continue; QColor c; key.sprintf("%s/%s/style%d/",prefix,language(),i); // Write the foreground colour. c = color(i); num = (c.red() << 16) | (c.green() << 8) | c.blue(); qs.setValue(key + "color", num); // Write the end-of-line fill. qs.setValue(key + "eolfill", eolFill(i)); // Write the font using the deprecated format. QFont f = font(i); fdesc.clear(); fdesc += f.family(); fdesc += fmt.arg(f.pointSize()); // The casts are for Borland. fdesc += fmt.arg((int)f.bold()); fdesc += fmt.arg((int)f.italic()); fdesc += fmt.arg((int)f.underline()); qs.setValue(key + "font", fdesc); // Write the font using the newer format. fdesc[1] = fmt.arg(f.pointSizeF()); qs.setValue(key + "font2", fdesc); // Write the background colour. c = paper(i); num = (c.red() << 16) | (c.green() << 8) | c.blue(); qs.setValue(key + "paper", num); } // Write the properties. key.sprintf("%s/%s/properties/",prefix,language()); if (!writeProperties(qs,key)) rc = false; // Write the rest. key.sprintf("%s/%s/",prefix,language()); // Write the default foreground colour. num = (defColor.red() << 16) | (defColor.green() << 8) | defColor.blue(); qs.setValue(key + "defaultcolor", num); // Write the default background colour. num = (defPaper.red() << 16) | (defPaper.green() << 8) | defPaper.blue(); qs.setValue(key + "defaultpaper", num); // Write the default font using the deprecated format. fdesc.clear(); fdesc += defFont.family(); fdesc += fmt.arg(defFont.pointSize()); // The casts are for Borland. fdesc += fmt.arg((int)defFont.bold()); fdesc += fmt.arg((int)defFont.italic()); fdesc += fmt.arg((int)defFont.underline()); qs.setValue(key + "defaultfont", fdesc); // Write the font using the newer format. fdesc[1] = fmt.arg(defFont.pointSizeF()); qs.setValue(key + "defaultfont2", fdesc); qs.setValue(key + "autoindentstyle", autoIndStyle); return rc; } // Return the auto-indentation style. int QsciLexer::autoIndentStyle() { // We can't do this in the ctor because we want the virtuals to work. if (autoIndStyle < 0) autoIndStyle = (blockStartKeyword() || blockStart() || blockEnd()) ? 0 : QsciScintilla::AiMaintain; return autoIndStyle; } // Set the auto-indentation style. void QsciLexer::setAutoIndentStyle(int autoindentstyle) { autoIndStyle = autoindentstyle; } // Set the foreground colour for a style. void QsciLexer::setColor(const QColor &c, int style) { if (style >= 0) { styleData(style).color = c; emit colorChanged(c, style); } else for (int i = 0; i < 128; ++i) if (!description(i).isEmpty()) setColor(c, i); } // Set the end-of-line fill for a style. void QsciLexer::setEolFill(bool eolfill, int style) { if (style >= 0) { styleData(style).eol_fill = eolfill; emit eolFillChanged(eolfill, style); } else for (int i = 0; i < 128; ++i) if (!description(i).isEmpty()) setEolFill(eolfill, i); } // Set the font for a style. void QsciLexer::setFont(const QFont &f, int style) { if (style >= 0) { styleData(style).font = f; emit fontChanged(f, style); } else for (int i = 0; i < 128; ++i) if (!description(i).isEmpty()) setFont(f, i); } // Set the background colour for a style. void QsciLexer::setPaper(const QColor &c, int style) { if (style >= 0) { styleData(style).paper = c; emit paperChanged(c, style); } else { for (int i = 0; i < 128; ++i) if (!description(i).isEmpty()) setPaper(c, i); emit paperChanged(c, QsciScintillaBase::STYLE_DEFAULT); } } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscilexercpp.cpp000066400000000000000000000472511345112435200240600ustar00rootroot00000000000000// This module implements the QsciLexerCPP class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscilexercpp.h" #include #include #include // The ctor. QsciLexerCPP::QsciLexerCPP(QObject *parent, bool caseInsensitiveKeywords) : QsciLexer(parent), fold_atelse(false), fold_comments(false), fold_compact(true), fold_preproc(true), style_preproc(false), dollars(true), highlight_triple(false), highlight_hash(false), highlight_back(false), highlight_escape(false), vs_escape(false), nocase(caseInsensitiveKeywords) { } // The dtor. QsciLexerCPP::~QsciLexerCPP() { } // Returns the language name. const char *QsciLexerCPP::language() const { return "C++"; } // Returns the lexer name. const char *QsciLexerCPP::lexer() const { return (nocase ? "cppnocase" : "cpp"); } // Return the set of character sequences that can separate auto-completion // words. QStringList QsciLexerCPP::autoCompletionWordSeparators() const { QStringList wl; wl << "::" << "->" << "."; return wl; } // Return the list of keywords that can start a block. const char *QsciLexerCPP::blockStartKeyword(int *style) const { if (style) *style = Keyword; return "case catch class default do else finally for if private " "protected public struct try union while"; } // Return the list of characters that can start a block. const char *QsciLexerCPP::blockStart(int *style) const { if (style) *style = Operator; return "{"; } // Return the list of characters that can end a block. const char *QsciLexerCPP::blockEnd(int *style) const { if (style) *style = Operator; return "}"; } // Return the style used for braces. int QsciLexerCPP::braceStyle() const { return Operator; } // Return the string of characters that comprise a word. const char *QsciLexerCPP::wordCharacters() const { return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#"; } // Returns the foreground colour of the text for a style. QColor QsciLexerCPP::defaultColor(int style) const { switch (style) { case Default: return QColor(0x80, 0x80, 0x80); case Comment: case CommentLine: return QColor(0x00, 0x7f, 0x00); case CommentDoc: case CommentLineDoc: case PreProcessorCommentLineDoc: return QColor(0x3f, 0x70, 0x3f); case Number: return QColor(0x00, 0x7f, 0x7f); case Keyword: return QColor(0x00, 0x00, 0x7f); case DoubleQuotedString: case SingleQuotedString: case RawString: return QColor(0x7f, 0x00, 0x7f); case PreProcessor: return QColor(0x7f, 0x7f, 0x00); case Operator: case UnclosedString: return QColor(0x00, 0x00, 0x00); case VerbatimString: case TripleQuotedVerbatimString: case HashQuotedString: return QColor(0x00, 0x7f, 0x00); case Regex: return QColor(0x3f, 0x7f, 0x3f); case CommentDocKeyword: return QColor(0x30, 0x60, 0xa0); case CommentDocKeywordError: return QColor(0x80, 0x40, 0x20); case PreProcessorComment: return QColor(0x65, 0x99, 0x00); case InactiveDefault: case InactiveUUID: case InactiveCommentLineDoc: case InactiveKeywordSet2: case InactiveCommentDocKeyword: case InactiveCommentDocKeywordError: case InactivePreProcessorCommentLineDoc: return QColor(0xc0, 0xc0, 0xc0); case InactiveComment: case InactiveCommentLine: case InactiveNumber: case InactiveVerbatimString: case InactiveTripleQuotedVerbatimString: case InactiveHashQuotedString: return QColor(0x90, 0xb0, 0x90); case InactiveCommentDoc: return QColor(0xd0, 0xd0, 0xd0); case InactiveKeyword: return QColor(0x90, 0x90, 0xb0); case InactiveDoubleQuotedString: case InactiveSingleQuotedString: case InactiveRawString: return QColor(0xb0, 0x90, 0xb0); case InactivePreProcessor: return QColor(0xb0, 0xb0, 0x90); case InactiveOperator: case InactiveIdentifier: case InactiveGlobalClass: return QColor(0xb0, 0xb0, 0xb0); case InactiveUnclosedString: return QColor(0x00, 0x00, 0x00); case InactiveRegex: return QColor(0x7f, 0xaf, 0x7f); case InactivePreProcessorComment: return QColor(0xa0, 0xc0, 0x90); case UserLiteral: return QColor(0xc0, 0x60, 0x00); case InactiveUserLiteral: return QColor(0xd7, 0xa0, 0x90); case TaskMarker: return QColor(0xbe, 0x07, 0xff); case InactiveTaskMarker: return QColor(0xc3, 0xa1, 0xcf); } return QsciLexer::defaultColor(style); } // Returns the end-of-line fill for a style. bool QsciLexerCPP::defaultEolFill(int style) const { switch (style) { case UnclosedString: case InactiveUnclosedString: case VerbatimString: case InactiveVerbatimString: case Regex: case InactiveRegex: case TripleQuotedVerbatimString: case InactiveTripleQuotedVerbatimString: case HashQuotedString: case InactiveHashQuotedString: return true; } return QsciLexer::defaultEolFill(style); } // Returns the font of the text for a style. QFont QsciLexerCPP::defaultFont(int style) const { QFont f; switch (style) { case Comment: case InactiveComment: case CommentLine: case InactiveCommentLine: case CommentDoc: case InactiveCommentDoc: case CommentLineDoc: case InactiveCommentLineDoc: case CommentDocKeyword: case InactiveCommentDocKeyword: case CommentDocKeywordError: case InactiveCommentDocKeywordError: case TaskMarker: case InactiveTaskMarker: #if defined(Q_OS_WIN) f = QFont("Comic Sans MS",9); #elif defined(Q_OS_MAC) f = QFont("Comic Sans MS", 12); #else f = QFont("Bitstream Vera Serif",9); #endif break; case Keyword: case InactiveKeyword: case Operator: case InactiveOperator: f = QsciLexer::defaultFont(style); f.setBold(true); break; case DoubleQuotedString: case InactiveDoubleQuotedString: case SingleQuotedString: case InactiveSingleQuotedString: case UnclosedString: case InactiveUnclosedString: case VerbatimString: case InactiveVerbatimString: case Regex: case InactiveRegex: case TripleQuotedVerbatimString: case InactiveTripleQuotedVerbatimString: case HashQuotedString: case InactiveHashQuotedString: #if defined(Q_OS_WIN) f = QFont("Courier New",10); #elif defined(Q_OS_MAC) f = QFont("Courier", 12); #else f = QFont("Bitstream Vera Sans Mono",9); #endif break; default: f = QsciLexer::defaultFont(style); } return f; } // Returns the set of keywords. const char *QsciLexerCPP::keywords(int set) const { if (set == 1) return "and and_eq asm auto bitand bitor bool break case " "catch char class compl const const_cast continue " "default delete do double dynamic_cast else enum " "explicit export extern false float for friend goto if " "inline int long mutable namespace new not not_eq " "operator or or_eq private protected public register " "reinterpret_cast return short signed sizeof static " "static_cast struct switch template this throw true " "try typedef typeid typename union unsigned using " "virtual void volatile wchar_t while xor xor_eq"; if (set == 3) return "a addindex addtogroup anchor arg attention author b " "brief bug c class code date def defgroup deprecated " "dontinclude e em endcode endhtmlonly endif " "endlatexonly endlink endverbatim enum example " "exception f$ f[ f] file fn hideinitializer " "htmlinclude htmlonly if image include ingroup " "internal invariant interface latexonly li line link " "mainpage name namespace nosubgrouping note overload " "p page par param post pre ref relates remarks return " "retval sa section see showinitializer since skip " "skipline struct subsection test throw todo typedef " "union until var verbatim verbinclude version warning " "weakgroup $ @ \\ & < > # { }"; return 0; } // Returns the user name of a style. QString QsciLexerCPP::description(int style) const { switch (style) { case Default: return tr("Default"); case InactiveDefault: return tr("Inactive default"); case Comment: return tr("C comment"); case InactiveComment: return tr("Inactive C comment"); case CommentLine: return tr("C++ comment"); case InactiveCommentLine: return tr("Inactive C++ comment"); case CommentDoc: return tr("JavaDoc style C comment"); case InactiveCommentDoc: return tr("Inactive JavaDoc style C comment"); case Number: return tr("Number"); case InactiveNumber: return tr("Inactive number"); case Keyword: return tr("Keyword"); case InactiveKeyword: return tr("Inactive keyword"); case DoubleQuotedString: return tr("Double-quoted string"); case InactiveDoubleQuotedString: return tr("Inactive double-quoted string"); case SingleQuotedString: return tr("Single-quoted string"); case InactiveSingleQuotedString: return tr("Inactive single-quoted string"); case UUID: return tr("IDL UUID"); case InactiveUUID: return tr("Inactive IDL UUID"); case PreProcessor: return tr("Pre-processor block"); case InactivePreProcessor: return tr("Inactive pre-processor block"); case Operator: return tr("Operator"); case InactiveOperator: return tr("Inactive operator"); case Identifier: return tr("Identifier"); case InactiveIdentifier: return tr("Inactive identifier"); case UnclosedString: return tr("Unclosed string"); case InactiveUnclosedString: return tr("Inactive unclosed string"); case VerbatimString: return tr("C# verbatim string"); case InactiveVerbatimString: return tr("Inactive C# verbatim string"); case Regex: return tr("JavaScript regular expression"); case InactiveRegex: return tr("Inactive JavaScript regular expression"); case CommentLineDoc: return tr("JavaDoc style C++ comment"); case InactiveCommentLineDoc: return tr("Inactive JavaDoc style C++ comment"); case KeywordSet2: return tr("Secondary keywords and identifiers"); case InactiveKeywordSet2: return tr("Inactive secondary keywords and identifiers"); case CommentDocKeyword: return tr("JavaDoc keyword"); case InactiveCommentDocKeyword: return tr("Inactive JavaDoc keyword"); case CommentDocKeywordError: return tr("JavaDoc keyword error"); case InactiveCommentDocKeywordError: return tr("Inactive JavaDoc keyword error"); case GlobalClass: return tr("Global classes and typedefs"); case InactiveGlobalClass: return tr("Inactive global classes and typedefs"); case RawString: return tr("C++ raw string"); case InactiveRawString: return tr("Inactive C++ raw string"); case TripleQuotedVerbatimString: return tr("Vala triple-quoted verbatim string"); case InactiveTripleQuotedVerbatimString: return tr("Inactive Vala triple-quoted verbatim string"); case HashQuotedString: return tr("Pike hash-quoted string"); case InactiveHashQuotedString: return tr("Inactive Pike hash-quoted string"); case PreProcessorComment: return tr("Pre-processor C comment"); case InactivePreProcessorComment: return tr("Inactive pre-processor C comment"); case PreProcessorCommentLineDoc: return tr("JavaDoc style pre-processor comment"); case InactivePreProcessorCommentLineDoc: return tr("Inactive JavaDoc style pre-processor comment"); case UserLiteral: return tr("User-defined literal"); case InactiveUserLiteral: return tr("Inactive user-defined literal"); case TaskMarker: return tr("Task marker"); case InactiveTaskMarker: return tr("Inactive task marker"); case EscapeSequence: return tr("Escape sequence"); case InactiveEscapeSequence: return tr("Inactive escape sequence"); } return QString(); } // Returns the background colour of the text for a style. QColor QsciLexerCPP::defaultPaper(int style) const { switch (style) { case UnclosedString: case InactiveUnclosedString: return QColor(0xe0,0xc0,0xe0); case VerbatimString: case InactiveVerbatimString: case TripleQuotedVerbatimString: case InactiveTripleQuotedVerbatimString: return QColor(0xe0,0xff,0xe0); case Regex: case InactiveRegex: return QColor(0xe0,0xf0,0xe0); case RawString: case InactiveRawString: return QColor(0xff,0xf3,0xff); case HashQuotedString: case InactiveHashQuotedString: return QColor(0xe7,0xff,0xd7); } return QsciLexer::defaultPaper(style); } // Refresh all properties. void QsciLexerCPP::refreshProperties() { setAtElseProp(); setCommentProp(); setCompactProp(); setPreprocProp(); setStylePreprocProp(); setDollarsProp(); setHighlightTripleProp(); setHighlightHashProp(); setHighlightBackProp(); setHighlightEscapeProp(); setVerbatimStringEscapeProp(); } // Read properties from the settings. bool QsciLexerCPP::readProperties(QSettings &qs,const QString &prefix) { fold_atelse = qs.value(prefix + "foldatelse", false).toBool(); fold_comments = qs.value(prefix + "foldcomments", false).toBool(); fold_compact = qs.value(prefix + "foldcompact", true).toBool(); fold_preproc = qs.value(prefix + "foldpreprocessor", true).toBool(); style_preproc = qs.value(prefix + "stylepreprocessor", false).toBool(); dollars = qs.value(prefix + "dollars", true).toBool(); highlight_triple = qs.value(prefix + "highlighttriple", false).toBool(); highlight_hash = qs.value(prefix + "highlighthash", false).toBool(); highlight_back = qs.value(prefix + "highlightback", false).toBool(); highlight_escape = qs.value(prefix + "highlightescape", false).toBool(); vs_escape = qs.value(prefix + "verbatimstringescape", false).toBool(); return true; } // Write properties to the settings. bool QsciLexerCPP::writeProperties(QSettings &qs,const QString &prefix) const { qs.setValue(prefix + "foldatelse", fold_atelse); qs.setValue(prefix + "foldcomments", fold_comments); qs.setValue(prefix + "foldcompact", fold_compact); qs.setValue(prefix + "foldpreprocessor", fold_preproc); qs.setValue(prefix + "stylepreprocessor", style_preproc); qs.setValue(prefix + "dollars", dollars); qs.setValue(prefix + "highlighttriple", highlight_triple); qs.setValue(prefix + "highlighthash", highlight_hash); qs.setValue(prefix + "highlightback", highlight_back); qs.setValue(prefix + "highlightescape", highlight_escape); qs.setValue(prefix + "verbatimstringescape", vs_escape); return true; } // Set if else can be folded. void QsciLexerCPP::setFoldAtElse(bool fold) { fold_atelse = fold; setAtElseProp(); } // Set the "fold.at.else" property. void QsciLexerCPP::setAtElseProp() { emit propertyChanged("fold.at.else",(fold_atelse ? "1" : "0")); } // Set if comments can be folded. void QsciLexerCPP::setFoldComments(bool fold) { fold_comments = fold; setCommentProp(); } // Set the "fold.comment" property. void QsciLexerCPP::setCommentProp() { emit propertyChanged("fold.comment",(fold_comments ? "1" : "0")); } // Set if folds are compact void QsciLexerCPP::setFoldCompact(bool fold) { fold_compact = fold; setCompactProp(); } // Set the "fold.compact" property. void QsciLexerCPP::setCompactProp() { emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); } // Set if preprocessor blocks can be folded. void QsciLexerCPP::setFoldPreprocessor(bool fold) { fold_preproc = fold; setPreprocProp(); } // Set the "fold.preprocessor" property. void QsciLexerCPP::setPreprocProp() { emit propertyChanged("fold.preprocessor",(fold_preproc ? "1" : "0")); } // Set if preprocessor lines are styled. void QsciLexerCPP::setStylePreprocessor(bool style) { style_preproc = style; setStylePreprocProp(); } // Set the "styling.within.preprocessor" property. void QsciLexerCPP::setStylePreprocProp() { emit propertyChanged("styling.within.preprocessor",(style_preproc ? "1" : "0")); } // Set if '$' characters are allowed. void QsciLexerCPP::setDollarsAllowed(bool allowed) { dollars = allowed; setDollarsProp(); } // Set the "lexer.cpp.allow.dollars" property. void QsciLexerCPP::setDollarsProp() { emit propertyChanged("lexer.cpp.allow.dollars",(dollars ? "1" : "0")); } // Set if triple quoted strings are highlighted. void QsciLexerCPP::setHighlightTripleQuotedStrings(bool enabled) { highlight_triple = enabled; setHighlightTripleProp(); } // Set the "lexer.cpp.triplequoted.strings" property. void QsciLexerCPP::setHighlightTripleProp() { emit propertyChanged("lexer.cpp.triplequoted.strings", (highlight_triple ? "1" : "0")); } // Set if hash quoted strings are highlighted. void QsciLexerCPP::setHighlightHashQuotedStrings(bool enabled) { highlight_hash = enabled; setHighlightHashProp(); } // Set the "lexer.cpp.hashquoted.strings" property. void QsciLexerCPP::setHighlightHashProp() { emit propertyChanged("lexer.cpp.hashquoted.strings", (highlight_hash ? "1" : "0")); } // Set if back-quoted strings are highlighted. void QsciLexerCPP::setHighlightBackQuotedStrings(bool enabled) { highlight_back = enabled; setHighlightBackProp(); } // Set the "lexer.cpp.backquoted.strings" property. void QsciLexerCPP::setHighlightBackProp() { emit propertyChanged("lexer.cpp.backquoted.strings", (highlight_back ? "1" : "0")); } // Set if escape sequences in strings are highlighted. void QsciLexerCPP::setHighlightEscapeSequences(bool enabled) { highlight_escape = enabled; setHighlightEscapeProp(); } // Set the "lexer.cpp.escape.sequence" property. void QsciLexerCPP::setHighlightEscapeProp() { emit propertyChanged("lexer.cpp.escape.sequence", (highlight_escape ? "1" : "0")); } // Set if escape sequences in verbatim strings are allowed. void QsciLexerCPP::setVerbatimStringEscapeSequencesAllowed(bool allowed) { vs_escape = allowed; setVerbatimStringEscapeProp(); } // Set the "lexer.cpp.verbatim.strings.allow.escapes" property. void QsciLexerCPP::setVerbatimStringEscapeProp() { emit propertyChanged("lexer.cpp.verbatim.strings.allow.escapes", (vs_escape ? "1" : "0")); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscilexercustom.cpp000066400000000000000000000051731345112435200246050ustar00rootroot00000000000000// This module implements the QsciLexerCustom class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscilexercustom.h" #include "Qsci/qsciscintilla.h" #include "Qsci/qsciscintillabase.h" #include "Qsci/qscistyle.h" // The ctor. QsciLexerCustom::QsciLexerCustom(QObject *parent) : QsciLexer(parent) { } // The dtor. QsciLexerCustom::~QsciLexerCustom() { } // Start styling. void QsciLexerCustom::startStyling(int start, int) { if (!editor()) return; editor()->SendScintilla(QsciScintillaBase::SCI_STARTSTYLING, start); } // Set the style for a number of characters. void QsciLexerCustom::setStyling(int length, int style) { if (!editor()) return; editor()->SendScintilla(QsciScintillaBase::SCI_SETSTYLING, length, style); } // Set the style for a number of characters. void QsciLexerCustom::setStyling(int length, const QsciStyle &style) { setStyling(length, style.style()); } // Set the attached editor. void QsciLexerCustom::setEditor(QsciScintilla *new_editor) { if (editor()) disconnect(editor(), SIGNAL(SCN_STYLENEEDED(int)), this, SLOT(handleStyleNeeded(int))); QsciLexer::setEditor(new_editor); if (editor()) connect(editor(), SIGNAL(SCN_STYLENEEDED(int)), this, SLOT(handleStyleNeeded(int))); } // Return the number of style bits needed by the lexer. int QsciLexerCustom::styleBitsNeeded() const { return 5; } // Handle a request to style some text. void QsciLexerCustom::handleStyleNeeded(int pos) { int start = editor()->SendScintilla(QsciScintillaBase::SCI_GETENDSTYLED); int line = editor()->SendScintilla(QsciScintillaBase::SCI_LINEFROMPOSITION, start); start = editor()->SendScintilla(QsciScintillaBase::SCI_POSITIONFROMLINE, line); if (start != pos) styleText(start, pos); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscilexerhtml.cpp000066400000000000000000000740701345112435200242410ustar00rootroot00000000000000// This module implements the QsciLexerHTML class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscilexerhtml.h" #include #include #include #include "Qsci/qscilexerjavascript.h" #include "Qsci/qscilexerpython.h" // The ctor. QsciLexerHTML::QsciLexerHTML(QObject *parent) : QsciLexer(parent), fold_compact(true), fold_preproc(true), case_sens_tags(false), fold_script_comments(false), fold_script_heredocs(false), django_templates(false), mako_templates(false) { } // The dtor. QsciLexerHTML::~QsciLexerHTML() { } // Returns the language name. const char *QsciLexerHTML::language() const { return "HTML"; } // Returns the lexer name. const char *QsciLexerHTML::lexer() const { return "hypertext"; } // Return the auto-completion fillup characters. const char *QsciLexerHTML::autoCompletionFillups() const { return "/>"; } // Return the string of characters that comprise a word. const char *QsciLexerHTML::wordCharacters() const { return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-"; } // Returns the foreground colour of the text for a style. QColor QsciLexerHTML::defaultColor(int style) const { switch (style) { case Default: case JavaScriptDefault: case JavaScriptWord: case JavaScriptSymbol: case ASPJavaScriptDefault: case ASPJavaScriptWord: case ASPJavaScriptSymbol: case VBScriptDefault: case ASPVBScriptDefault: case PHPOperator: return QColor(0x00,0x00,0x00); case Tag: case XMLTagEnd: case Script: case SGMLDefault: case SGMLCommand: case VBScriptKeyword: case VBScriptIdentifier: case VBScriptUnclosedString: case ASPVBScriptKeyword: case ASPVBScriptIdentifier: case ASPVBScriptUnclosedString: return QColor(0x00,0x00,0x80); case UnknownTag: case UnknownAttribute: return QColor(0xff,0x00,0x00); case Attribute: case VBScriptNumber: case ASPVBScriptNumber: return QColor(0x00,0x80,0x80); case HTMLNumber: case JavaScriptNumber: case ASPJavaScriptNumber: case PythonNumber: case PythonFunctionMethodName: case ASPPythonNumber: case ASPPythonFunctionMethodName: return QColor(0x00,0x7f,0x7f); case HTMLDoubleQuotedString: case HTMLSingleQuotedString: case JavaScriptDoubleQuotedString: case JavaScriptSingleQuotedString: case ASPJavaScriptDoubleQuotedString: case ASPJavaScriptSingleQuotedString: case PythonDoubleQuotedString: case PythonSingleQuotedString: case ASPPythonDoubleQuotedString: case ASPPythonSingleQuotedString: case PHPKeyword: return QColor(0x7f,0x00,0x7f); case OtherInTag: case Entity: case VBScriptString: case ASPVBScriptString: return QColor(0x80,0x00,0x80); case HTMLComment: case SGMLComment: return QColor(0x80,0x80,0x00); case XMLStart: case XMLEnd: case PHPStart: case PythonClassName: case ASPPythonClassName: return QColor(0x00,0x00,0xff); case HTMLValue: return QColor(0xff,0x00,0xff); case SGMLParameter: return QColor(0x00,0x66,0x00); case SGMLDoubleQuotedString: case SGMLError: return QColor(0x80,0x00,0x00); case SGMLSingleQuotedString: return QColor(0x99,0x33,0x00); case SGMLSpecial: return QColor(0x33,0x66,0xff); case SGMLEntity: return QColor(0x33,0x33,0x33); case SGMLBlockDefault: return QColor(0x00,0x00,0x66); case JavaScriptStart: case ASPJavaScriptStart: return QColor(0x7f,0x7f,0x00); case JavaScriptComment: case JavaScriptCommentLine: case ASPJavaScriptComment: case ASPJavaScriptCommentLine: case PythonComment: case ASPPythonComment: case PHPDoubleQuotedString: return QColor(0x00,0x7f,0x00); case JavaScriptCommentDoc: return QColor(0x3f,0x70,0x3f); case JavaScriptKeyword: case ASPJavaScriptKeyword: case PythonKeyword: case ASPPythonKeyword: case PHPVariable: case PHPDoubleQuotedVariable: return QColor(0x00,0x00,0x7f); case ASPJavaScriptCommentDoc: return QColor(0x7f,0x7f,0x7f); case VBScriptComment: case ASPVBScriptComment: return QColor(0x00,0x80,0x00); case PythonStart: case PythonDefault: case ASPPythonStart: case ASPPythonDefault: return QColor(0x80,0x80,0x80); case PythonTripleSingleQuotedString: case PythonTripleDoubleQuotedString: case ASPPythonTripleSingleQuotedString: case ASPPythonTripleDoubleQuotedString: return QColor(0x7f,0x00,0x00); case PHPDefault: return QColor(0x00,0x00,0x33); case PHPSingleQuotedString: return QColor(0x00,0x9f,0x00); case PHPNumber: return QColor(0xcc,0x99,0x00); case PHPComment: return QColor(0x99,0x99,0x99); case PHPCommentLine: return QColor(0x66,0x66,0x66); } return QsciLexer::defaultColor(style); } // Returns the end-of-line fill for a style. bool QsciLexerHTML::defaultEolFill(int style) const { switch (style) { case JavaScriptDefault: case JavaScriptComment: case JavaScriptCommentDoc: case JavaScriptUnclosedString: case ASPJavaScriptDefault: case ASPJavaScriptComment: case ASPJavaScriptCommentDoc: case ASPJavaScriptUnclosedString: case VBScriptDefault: case VBScriptComment: case VBScriptNumber: case VBScriptKeyword: case VBScriptString: case VBScriptIdentifier: case VBScriptUnclosedString: case ASPVBScriptDefault: case ASPVBScriptComment: case ASPVBScriptNumber: case ASPVBScriptKeyword: case ASPVBScriptString: case ASPVBScriptIdentifier: case ASPVBScriptUnclosedString: case PythonDefault: case PythonComment: case PythonNumber: case PythonDoubleQuotedString: case PythonSingleQuotedString: case PythonKeyword: case PythonTripleSingleQuotedString: case PythonTripleDoubleQuotedString: case PythonClassName: case PythonFunctionMethodName: case PythonOperator: case PythonIdentifier: case ASPPythonDefault: case ASPPythonComment: case ASPPythonNumber: case ASPPythonDoubleQuotedString: case ASPPythonSingleQuotedString: case ASPPythonKeyword: case ASPPythonTripleSingleQuotedString: case ASPPythonTripleDoubleQuotedString: case ASPPythonClassName: case ASPPythonFunctionMethodName: case ASPPythonOperator: case ASPPythonIdentifier: case PHPDefault: return true; } return QsciLexer::defaultEolFill(style); } // Returns the font of the text for a style. QFont QsciLexerHTML::defaultFont(int style) const { QFont f; switch (style) { case Default: case Entity: #if defined(Q_OS_WIN) f = QFont("Times New Roman",11); #elif defined(Q_OS_MAC) f = QFont("Times New Roman", 12); #else f = QFont("Bitstream Charter",10); #endif break; case HTMLComment: #if defined(Q_OS_WIN) f = QFont("Verdana",9); #elif defined(Q_OS_MAC) f = QFont("Verdana", 12); #else f = QFont("Bitstream Vera Sans",8); #endif break; case SGMLCommand: case PythonKeyword: case PythonClassName: case PythonFunctionMethodName: case PythonOperator: case ASPPythonKeyword: case ASPPythonClassName: case ASPPythonFunctionMethodName: case ASPPythonOperator: f = QsciLexer::defaultFont(style); f.setBold(true); break; case JavaScriptDefault: case JavaScriptCommentDoc: case JavaScriptKeyword: case JavaScriptSymbol: case ASPJavaScriptDefault: case ASPJavaScriptCommentDoc: case ASPJavaScriptKeyword: case ASPJavaScriptSymbol: #if defined(Q_OS_WIN) f = QFont("Comic Sans MS",9); #elif defined(Q_OS_MAC) f = QFont("Comic Sans MS", 12); #else f = QFont("Bitstream Vera Serif",9); #endif f.setBold(true); break; case JavaScriptComment: case JavaScriptCommentLine: case JavaScriptNumber: case JavaScriptWord: case JavaScriptDoubleQuotedString: case JavaScriptSingleQuotedString: case ASPJavaScriptComment: case ASPJavaScriptCommentLine: case ASPJavaScriptNumber: case ASPJavaScriptWord: case ASPJavaScriptDoubleQuotedString: case ASPJavaScriptSingleQuotedString: case VBScriptComment: case ASPVBScriptComment: case PythonComment: case ASPPythonComment: case PHPComment: #if defined(Q_OS_WIN) f = QFont("Comic Sans MS",9); #elif defined(Q_OS_MAC) f = QFont("Comic Sans MS", 12); #else f = QFont("Bitstream Vera Serif",9); #endif break; case VBScriptDefault: case VBScriptNumber: case VBScriptString: case VBScriptIdentifier: case VBScriptUnclosedString: case ASPVBScriptDefault: case ASPVBScriptNumber: case ASPVBScriptString: case ASPVBScriptIdentifier: case ASPVBScriptUnclosedString: #if defined(Q_OS_WIN) f = QFont("Lucida Sans Unicode",9); #elif defined(Q_OS_MAC) f = QFont("Lucida Grande", 12); #else f = QFont("Bitstream Vera Serif",9); #endif break; case VBScriptKeyword: case ASPVBScriptKeyword: #if defined(Q_OS_WIN) f = QFont("Lucida Sans Unicode",9); #elif defined(Q_OS_MAC) f = QFont("Lucida Grande", 12); #else f = QFont("Bitstream Vera Serif",9); #endif f.setBold(true); break; case PythonDoubleQuotedString: case PythonSingleQuotedString: case ASPPythonDoubleQuotedString: case ASPPythonSingleQuotedString: #if defined(Q_OS_WIN) f = QFont("Courier New",10); #elif defined(Q_OS_MAC) f = QFont("Courier New", 12); #else f = QFont("Bitstream Vera Sans Mono",9); #endif break; case PHPKeyword: case PHPVariable: case PHPDoubleQuotedVariable: f = QsciLexer::defaultFont(style); f.setItalic(true); break; case PHPCommentLine: #if defined(Q_OS_WIN) f = QFont("Comic Sans MS",9); #elif defined(Q_OS_MAC) f = QFont("Comic Sans MS", 12); #else f = QFont("Bitstream Vera Serif",9); #endif f.setItalic(true); break; default: f = QsciLexer::defaultFont(style); } return f; } // Returns the set of keywords. const char *QsciLexerHTML::keywords(int set) const { if (set == 1) return "a abbr acronym address applet area " "b base basefont bdo big blockquote body br button " "caption center cite code col colgroup " "dd del dfn dir div dl dt " "em " "fieldset font form frame frameset " "h1 h2 h3 h4 h5 h6 head hr html " "i iframe img input ins isindex " "kbd " "label legend li link " "map menu meta " "noframes noscript " "object ol optgroup option " "p param pre " "q " "s samp script select small span strike strong style " "sub sup " "table tbody td textarea tfoot th thead title tr tt " "u ul " "var " "xml xmlns " "abbr accept-charset accept accesskey action align " "alink alt archive axis " "background bgcolor border " "cellpadding cellspacing char charoff charset checked " "cite class classid clear codebase codetype color " "cols colspan compact content coords " "data datafld dataformatas datapagesize datasrc " "datetime declare defer dir disabled " "enctype event " "face for frame frameborder " "headers height href hreflang hspace http-equiv " "id ismap label lang language leftmargin link " "longdesc " "marginwidth marginheight maxlength media method " "multiple " "name nohref noresize noshade nowrap " "object onblur onchange onclick ondblclick onfocus " "onkeydown onkeypress onkeyup onload onmousedown " "onmousemove onmouseover onmouseout onmouseup onreset " "onselect onsubmit onunload " "profile prompt " "readonly rel rev rows rowspan rules " "scheme scope selected shape size span src standby " "start style summary " "tabindex target text title topmargin type " "usemap " "valign value valuetype version vlink vspace " "width " "text password checkbox radio submit reset file " "hidden image " "public !doctype"; if (set == 2) return QsciLexerJavaScript::keywordClass; if (set == 3) return // Move these to QsciLexerVisualBasic when we // get round to implementing it. "and begin case call continue do each else elseif end " "erase error event exit false for function get gosub " "goto if implement in load loop lset me mid new next " "not nothing on or property raiseevent rem resume " "return rset select set stop sub then to true unload " "until wend while with withevents attribute alias as " "boolean byref byte byval const compare currency date " "declare dim double enum explicit friend global " "integer let lib long module object option optional " "preserve private property public redim single static " "string type variant"; if (set == 4) return QsciLexerPython::keywordClass; if (set == 5) return "and argv as argc break case cfunction class continue " "declare default do die " "echo else elseif empty enddeclare endfor endforeach " "endif endswitch endwhile e_all e_parse e_error " "e_warning eval exit extends " "false for foreach function global " "http_cookie_vars http_get_vars http_post_vars " "http_post_files http_env_vars http_server_vars " "if include include_once list new not null " "old_function or " "parent php_os php_self php_version print " "require require_once return " "static switch stdclass this true var xor virtual " "while " "__file__ __line__ __sleep __wakeup"; if (set == 6) return "ELEMENT DOCTYPE ATTLIST ENTITY NOTATION"; return 0; } // Returns the user name of a style. QString QsciLexerHTML::description(int style) const { switch (style) { case Default: return tr("HTML default"); case Tag: return tr("Tag"); case UnknownTag: return tr("Unknown tag"); case Attribute: return tr("Attribute"); case UnknownAttribute: return tr("Unknown attribute"); case HTMLNumber: return tr("HTML number"); case HTMLDoubleQuotedString: return tr("HTML double-quoted string"); case HTMLSingleQuotedString: return tr("HTML single-quoted string"); case OtherInTag: return tr("Other text in a tag"); case HTMLComment: return tr("HTML comment"); case Entity: return tr("Entity"); case XMLTagEnd: return tr("End of a tag"); case XMLStart: return tr("Start of an XML fragment"); case XMLEnd: return tr("End of an XML fragment"); case Script: return tr("Script tag"); case ASPAtStart: return tr("Start of an ASP fragment with @"); case ASPStart: return tr("Start of an ASP fragment"); case CDATA: return tr("CDATA"); case PHPStart: return tr("Start of a PHP fragment"); case HTMLValue: return tr("Unquoted HTML value"); case ASPXCComment: return tr("ASP X-Code comment"); case SGMLDefault: return tr("SGML default"); case SGMLCommand: return tr("SGML command"); case SGMLParameter: return tr("First parameter of an SGML command"); case SGMLDoubleQuotedString: return tr("SGML double-quoted string"); case SGMLSingleQuotedString: return tr("SGML single-quoted string"); case SGMLError: return tr("SGML error"); case SGMLSpecial: return tr("SGML special entity"); case SGMLComment: return tr("SGML comment"); case SGMLParameterComment: return tr("First parameter comment of an SGML command"); case SGMLBlockDefault: return tr("SGML block default"); case JavaScriptStart: return tr("Start of a JavaScript fragment"); case JavaScriptDefault: return tr("JavaScript default"); case JavaScriptComment: return tr("JavaScript comment"); case JavaScriptCommentLine: return tr("JavaScript line comment"); case JavaScriptCommentDoc: return tr("JavaDoc style JavaScript comment"); case JavaScriptNumber: return tr("JavaScript number"); case JavaScriptWord: return tr("JavaScript word"); case JavaScriptKeyword: return tr("JavaScript keyword"); case JavaScriptDoubleQuotedString: return tr("JavaScript double-quoted string"); case JavaScriptSingleQuotedString: return tr("JavaScript single-quoted string"); case JavaScriptSymbol: return tr("JavaScript symbol"); case JavaScriptUnclosedString: return tr("JavaScript unclosed string"); case JavaScriptRegex: return tr("JavaScript regular expression"); case ASPJavaScriptStart: return tr("Start of an ASP JavaScript fragment"); case ASPJavaScriptDefault: return tr("ASP JavaScript default"); case ASPJavaScriptComment: return tr("ASP JavaScript comment"); case ASPJavaScriptCommentLine: return tr("ASP JavaScript line comment"); case ASPJavaScriptCommentDoc: return tr("JavaDoc style ASP JavaScript comment"); case ASPJavaScriptNumber: return tr("ASP JavaScript number"); case ASPJavaScriptWord: return tr("ASP JavaScript word"); case ASPJavaScriptKeyword: return tr("ASP JavaScript keyword"); case ASPJavaScriptDoubleQuotedString: return tr("ASP JavaScript double-quoted string"); case ASPJavaScriptSingleQuotedString: return tr("ASP JavaScript single-quoted string"); case ASPJavaScriptSymbol: return tr("ASP JavaScript symbol"); case ASPJavaScriptUnclosedString: return tr("ASP JavaScript unclosed string"); case ASPJavaScriptRegex: return tr("ASP JavaScript regular expression"); case VBScriptStart: return tr("Start of a VBScript fragment"); case VBScriptDefault: return tr("VBScript default"); case VBScriptComment: return tr("VBScript comment"); case VBScriptNumber: return tr("VBScript number"); case VBScriptKeyword: return tr("VBScript keyword"); case VBScriptString: return tr("VBScript string"); case VBScriptIdentifier: return tr("VBScript identifier"); case VBScriptUnclosedString: return tr("VBScript unclosed string"); case ASPVBScriptStart: return tr("Start of an ASP VBScript fragment"); case ASPVBScriptDefault: return tr("ASP VBScript default"); case ASPVBScriptComment: return tr("ASP VBScript comment"); case ASPVBScriptNumber: return tr("ASP VBScript number"); case ASPVBScriptKeyword: return tr("ASP VBScript keyword"); case ASPVBScriptString: return tr("ASP VBScript string"); case ASPVBScriptIdentifier: return tr("ASP VBScript identifier"); case ASPVBScriptUnclosedString: return tr("ASP VBScript unclosed string"); case PythonStart: return tr("Start of a Python fragment"); case PythonDefault: return tr("Python default"); case PythonComment: return tr("Python comment"); case PythonNumber: return tr("Python number"); case PythonDoubleQuotedString: return tr("Python double-quoted string"); case PythonSingleQuotedString: return tr("Python single-quoted string"); case PythonKeyword: return tr("Python keyword"); case PythonTripleDoubleQuotedString: return tr("Python triple double-quoted string"); case PythonTripleSingleQuotedString: return tr("Python triple single-quoted string"); case PythonClassName: return tr("Python class name"); case PythonFunctionMethodName: return tr("Python function or method name"); case PythonOperator: return tr("Python operator"); case PythonIdentifier: return tr("Python identifier"); case ASPPythonStart: return tr("Start of an ASP Python fragment"); case ASPPythonDefault: return tr("ASP Python default"); case ASPPythonComment: return tr("ASP Python comment"); case ASPPythonNumber: return tr("ASP Python number"); case ASPPythonDoubleQuotedString: return tr("ASP Python double-quoted string"); case ASPPythonSingleQuotedString: return tr("ASP Python single-quoted string"); case ASPPythonKeyword: return tr("ASP Python keyword"); case ASPPythonTripleDoubleQuotedString: return tr("ASP Python triple double-quoted string"); case ASPPythonTripleSingleQuotedString: return tr("ASP Python triple single-quoted string"); case ASPPythonClassName: return tr("ASP Python class name"); case ASPPythonFunctionMethodName: return tr("ASP Python function or method name"); case ASPPythonOperator: return tr("ASP Python operator"); case ASPPythonIdentifier: return tr("ASP Python identifier"); case PHPDefault: return tr("PHP default"); case PHPDoubleQuotedString: return tr("PHP double-quoted string"); case PHPSingleQuotedString: return tr("PHP single-quoted string"); case PHPKeyword: return tr("PHP keyword"); case PHPNumber: return tr("PHP number"); case PHPVariable: return tr("PHP variable"); case PHPComment: return tr("PHP comment"); case PHPCommentLine: return tr("PHP line comment"); case PHPDoubleQuotedVariable: return tr("PHP double-quoted variable"); case PHPOperator: return tr("PHP operator"); } return QString(); } // Returns the background colour of the text for a style. QColor QsciLexerHTML::defaultPaper(int style) const { switch (style) { case ASPAtStart: return QColor(0xff,0xff,0x00); case ASPStart: case CDATA: return QColor(0xff,0xdf,0x00); case PHPStart: return QColor(0xff,0xef,0xbf); case HTMLValue: return QColor(0xff,0xef,0xff); case SGMLDefault: case SGMLCommand: case SGMLParameter: case SGMLDoubleQuotedString: case SGMLSingleQuotedString: case SGMLSpecial: case SGMLEntity: case SGMLComment: return QColor(0xef,0xef,0xff); case SGMLError: return QColor(0xff,0x66,0x66); case SGMLBlockDefault: return QColor(0xcc,0xcc,0xe0); case JavaScriptDefault: case JavaScriptComment: case JavaScriptCommentLine: case JavaScriptCommentDoc: case JavaScriptNumber: case JavaScriptWord: case JavaScriptKeyword: case JavaScriptDoubleQuotedString: case JavaScriptSingleQuotedString: case JavaScriptSymbol: return QColor(0xf0,0xf0,0xff); case JavaScriptUnclosedString: case ASPJavaScriptUnclosedString: return QColor(0xbf,0xbb,0xb0); case JavaScriptRegex: case ASPJavaScriptRegex: return QColor(0xff,0xbb,0xb0); case ASPJavaScriptDefault: case ASPJavaScriptComment: case ASPJavaScriptCommentLine: case ASPJavaScriptCommentDoc: case ASPJavaScriptNumber: case ASPJavaScriptWord: case ASPJavaScriptKeyword: case ASPJavaScriptDoubleQuotedString: case ASPJavaScriptSingleQuotedString: case ASPJavaScriptSymbol: return QColor(0xdf,0xdf,0x7f); case VBScriptDefault: case VBScriptComment: case VBScriptNumber: case VBScriptKeyword: case VBScriptString: case VBScriptIdentifier: return QColor(0xef,0xef,0xff); case VBScriptUnclosedString: case ASPVBScriptUnclosedString: return QColor(0x7f,0x7f,0xff); case ASPVBScriptDefault: case ASPVBScriptComment: case ASPVBScriptNumber: case ASPVBScriptKeyword: case ASPVBScriptString: case ASPVBScriptIdentifier: return QColor(0xcf,0xcf,0xef); case PythonDefault: case PythonComment: case PythonNumber: case PythonDoubleQuotedString: case PythonSingleQuotedString: case PythonKeyword: case PythonTripleSingleQuotedString: case PythonTripleDoubleQuotedString: case PythonClassName: case PythonFunctionMethodName: case PythonOperator: case PythonIdentifier: return QColor(0xef,0xff,0xef); case ASPPythonDefault: case ASPPythonComment: case ASPPythonNumber: case ASPPythonDoubleQuotedString: case ASPPythonSingleQuotedString: case ASPPythonKeyword: case ASPPythonTripleSingleQuotedString: case ASPPythonTripleDoubleQuotedString: case ASPPythonClassName: case ASPPythonFunctionMethodName: case ASPPythonOperator: case ASPPythonIdentifier: return QColor(0xcf,0xef,0xcf); case PHPDefault: case PHPDoubleQuotedString: case PHPSingleQuotedString: case PHPKeyword: case PHPNumber: case PHPVariable: case PHPComment: case PHPCommentLine: case PHPDoubleQuotedVariable: case PHPOperator: return QColor(0xff,0xf8,0xf8); } return QsciLexer::defaultPaper(style); } // Refresh all properties. void QsciLexerHTML::refreshProperties() { setCompactProp(); setPreprocProp(); setCaseSensTagsProp(); setScriptCommentsProp(); setScriptHeredocsProp(); setDjangoProp(); setMakoProp(); } // Read properties from the settings. bool QsciLexerHTML::readProperties(QSettings &qs,const QString &prefix) { int rc = true; fold_compact = qs.value(prefix + "foldcompact", true).toBool(); fold_preproc = qs.value(prefix + "foldpreprocessor", false).toBool(); case_sens_tags = qs.value(prefix + "casesensitivetags", false).toBool(); fold_script_comments = qs.value(prefix + "foldscriptcomments", false).toBool(); fold_script_heredocs = qs.value(prefix + "foldscriptheredocs", false).toBool(); django_templates = qs.value(prefix + "djangotemplates", false).toBool(); mako_templates = qs.value(prefix + "makotemplates", false).toBool(); return rc; } // Write properties to the settings. bool QsciLexerHTML::writeProperties(QSettings &qs,const QString &prefix) const { int rc = true; qs.setValue(prefix + "foldcompact", fold_compact); qs.setValue(prefix + "foldpreprocessor", fold_preproc); qs.setValue(prefix + "casesensitivetags", case_sens_tags); qs.setValue(prefix + "foldscriptcomments", fold_script_comments); qs.setValue(prefix + "foldscriptheredocs", fold_script_heredocs); qs.setValue(prefix + "djangotemplates", django_templates); qs.setValue(prefix + "makotemplates", mako_templates); return rc; } // Set if tags are case sensitive. void QsciLexerHTML::setCaseSensitiveTags(bool sens) { case_sens_tags = sens; setCaseSensTagsProp(); } // Set the "html.tags.case.sensitive" property. void QsciLexerHTML::setCaseSensTagsProp() { emit propertyChanged("html.tags.case.sensitive",(case_sens_tags ? "1" : "0")); } // Set if folds are compact void QsciLexerHTML::setFoldCompact(bool fold) { fold_compact = fold; setCompactProp(); } // Set the "fold.compact" property. void QsciLexerHTML::setCompactProp() { emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); } // Set if preprocessor blocks can be folded. void QsciLexerHTML::setFoldPreprocessor(bool fold) { fold_preproc = fold; setPreprocProp(); } // Set the "fold.html.preprocessor" property. void QsciLexerHTML::setPreprocProp() { emit propertyChanged("fold.html.preprocessor",(fold_preproc ? "1" : "0")); } // Set if script comments can be folded. void QsciLexerHTML::setFoldScriptComments(bool fold) { fold_script_comments = fold; setScriptCommentsProp(); } // Set the "fold.hypertext.comment" property. void QsciLexerHTML::setScriptCommentsProp() { emit propertyChanged("fold.hypertext.comment",(fold_script_comments ? "1" : "0")); } // Set if script heredocs can be folded. void QsciLexerHTML::setFoldScriptHeredocs(bool fold) { fold_script_heredocs = fold; setScriptHeredocsProp(); } // Set the "fold.hypertext.heredoc" property. void QsciLexerHTML::setScriptHeredocsProp() { emit propertyChanged("fold.hypertext.heredoc",(fold_script_heredocs ? "1" : "0")); } // Set if Django templates are supported. void QsciLexerHTML::setDjangoTemplates(bool enable) { django_templates = enable; setDjangoProp(); } // Set the "lexer.html.django" property. void QsciLexerHTML::setDjangoProp() { emit propertyChanged("lexer.html.django", (django_templates ? "1" : "0")); } // Set if Mako templates are supported. void QsciLexerHTML::setMakoTemplates(bool enable) { mako_templates = enable; setMakoProp(); } // Set the "lexer.html.mako" property. void QsciLexerHTML::setMakoProp() { emit propertyChanged("lexer.html.mako", (mako_templates ? "1" : "0")); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscilexerjavascript.cpp000066400000000000000000000062071345112435200254400ustar00rootroot00000000000000// This module implements the QsciLexerJavaScript class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscilexerjavascript.h" #include #include // The list of JavaScript keywords that can be used by other friendly lexers. const char *QsciLexerJavaScript::keywordClass = "abstract boolean break byte case catch char class const continue " "debugger default delete do double else enum export extends final " "finally float for function goto if implements import in instanceof " "int interface long native new package private protected public " "return short static super switch synchronized this throw throws " "transient try typeof var void volatile while with"; // The ctor. QsciLexerJavaScript::QsciLexerJavaScript(QObject *parent) : QsciLexerCPP(parent) { } // The dtor. QsciLexerJavaScript::~QsciLexerJavaScript() { } // Returns the language name. const char *QsciLexerJavaScript::language() const { return "JavaScript"; } // Returns the foreground colour of the text for a style. QColor QsciLexerJavaScript::defaultColor(int style) const { if (style == Regex) return QColor(0x3f,0x7f,0x3f); return QsciLexerCPP::defaultColor(style); } // Returns the end-of-line fill for a style. bool QsciLexerJavaScript::defaultEolFill(int style) const { if (style == Regex) return true; return QsciLexerCPP::defaultEolFill(style); } // Returns the font of the text for a style. QFont QsciLexerJavaScript::defaultFont(int style) const { if (style == Regex) #if defined(Q_OS_WIN) return QFont("Courier New",10); #elif defined(Q_OS_MAC) return QFont("Courier", 12); #else return QFont("Bitstream Vera Sans Mono",9); #endif return QsciLexerCPP::defaultFont(style); } // Returns the set of keywords. const char *QsciLexerJavaScript::keywords(int set) const { if (set != 1) return 0; return keywordClass; } // Returns the user name of a style. QString QsciLexerJavaScript::description(int style) const { if (style == Regex) return tr("Regular expression"); return QsciLexerCPP::description(style); } // Returns the background colour of the text for a style. QColor QsciLexerJavaScript::defaultPaper(int style) const { if (style == Regex) return QColor(0xe0,0xf0,0xff); return QsciLexer::defaultPaper(style); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscilexerjson.cpp000066400000000000000000000142151345112435200242410ustar00rootroot00000000000000// This module implements the QsciLexerJSON class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscilexerjson.h" #include #include #include // The ctor. QsciLexerJSON::QsciLexerJSON(QObject *parent) : QsciLexer(parent), allow_comments(true), escape_sequence(true), fold_compact(true) { } // The dtor. QsciLexerJSON::~QsciLexerJSON() { } // Returns the language name. const char *QsciLexerJSON::language() const { return "JSON"; } // Returns the lexer name. const char *QsciLexerJSON::lexer() const { return "json"; } // Returns the foreground colour of the text for a style. QColor QsciLexerJSON::defaultColor(int style) const { switch (style) { case UnclosedString: case Error: return QColor(0xff, 0xff, 0xff); case Number: return QColor(0x00, 0x7f, 0x7f); case String: return QColor(0x7f, 0x00, 0x00); case Property: return QColor(0x88, 0x0a, 0xe8); case EscapeSequence: return QColor(0x0b, 0x98, 0x2e); case CommentLine: case CommentBlock: return QColor(0x05, 0xbb, 0xae); case Operator: return QColor(0x18, 0x64, 0x4a); case IRI: return QColor(0x00, 0x00, 0xff); case IRICompact: return QColor(0xd1, 0x37, 0xc1); case Keyword: return QColor(0x0b, 0xce, 0xa7); case KeywordLD: return QColor(0xec, 0x28, 0x06); } return QsciLexer::defaultColor(style); } // Returns the end-of-line fill for a style. bool QsciLexerJSON::defaultEolFill(int style) const { switch (style) { case UnclosedString: return true; } return QsciLexer::defaultEolFill(style); } // Returns the font of the text for a style. QFont QsciLexerJSON::defaultFont(int style) const { QFont f; switch (style) { case CommentLine: f = QsciLexer::defaultFont(style); f.setItalic(true); break; case Keyword: f = QsciLexer::defaultFont(style); f.setBold(true); break; default: f = QsciLexer::defaultFont(style); } return f; } // Returns the set of keywords. const char *QsciLexerJSON::keywords(int set) const { if (set == 1) return "false true null"; if (set == 2) return "@id @context @type @value @language @container @list @set " "@reverse @index @base @vocab @graph"; return 0; } // Returns the user name of a style. QString QsciLexerJSON::description(int style) const { switch (style) { case Default: return tr("Default"); case Number: return tr("Number"); case String: return tr("String"); case UnclosedString: return tr("Unclosed string"); case Property: return tr("Property"); case EscapeSequence: return tr("Escape sequence"); case CommentLine: return tr("Line comment"); case CommentBlock: return tr("Block comment"); case Operator: return tr("Operator"); case IRI: return tr("IRI"); case IRICompact: return tr("JSON-LD compact IRI"); case Keyword: return tr("JSON keyword"); case KeywordLD: return tr("JSON-LD keyword"); case Error: return tr("Parsing error"); } return QString(); } // Returns the background colour of the text for a style. QColor QsciLexerJSON::defaultPaper(int style) const { switch (style) { case UnclosedString: case Error: return QColor(0xff, 0x00, 0x00); } return QsciLexer::defaultPaper(style); } // Refresh all properties. void QsciLexerJSON::refreshProperties() { setAllowCommentsProp(); setEscapeSequenceProp(); setCompactProp(); } // Read properties from the settings. bool QsciLexerJSON::readProperties(QSettings &qs,const QString &prefix) { allow_comments = qs.value(prefix + "allowcomments", true).toBool(); escape_sequence = qs.value(prefix + "escapesequence", true).toBool(); fold_compact = qs.value(prefix + "foldcompact", true).toBool(); return true; } // Write properties to the settings. bool QsciLexerJSON::writeProperties(QSettings &qs,const QString &prefix) const { qs.setValue(prefix + "allowcomments", allow_comments); qs.setValue(prefix + "escapesequence", escape_sequence); qs.setValue(prefix + "foldcompact", fold_compact); return true; } // Set if comments are highlighted void QsciLexerJSON::setHighlightComments(bool highlight) { allow_comments = highlight; setAllowCommentsProp(); } // Set the "lexer.json.allow.comments" property. void QsciLexerJSON::setAllowCommentsProp() { emit propertyChanged("lexer.json.allow.comments", (allow_comments ? "1" : "0")); } // Set if escape sequences are highlighted. void QsciLexerJSON::setHighlightEscapeSequences(bool highlight) { escape_sequence = highlight; setEscapeSequenceProp(); } // Set the "lexer.json.escape.sequence" property. void QsciLexerJSON::setEscapeSequenceProp() { emit propertyChanged("lexer.json.escape.sequence", (escape_sequence ? "1" : "0")); } // Set if folds are compact. void QsciLexerJSON::setFoldCompact(bool fold) { fold_compact = fold; setCompactProp(); } // Set the "fold.compact" property. void QsciLexerJSON::setCompactProp() { emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscilexerpython.cpp000066400000000000000000000260221345112435200246100ustar00rootroot00000000000000// This module implements the QsciLexerPython class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscilexerpython.h" #include #include #include // The list of Python keywords that can be used by other friendly lexers. const char *QsciLexerPython::keywordClass = "and as assert break class continue def del elif else except exec " "finally for from global if import in is lambda None not or pass " "print raise return try while with yield"; // The ctor. QsciLexerPython::QsciLexerPython(QObject *parent) : QsciLexer(parent), fold_comments(false), fold_compact(true), fold_quotes(false), indent_warn(NoWarning), strings_over_newline(false), v2_unicode(true), v3_binary_octal(true), v3_bytes(true), highlight_subids(true) { } // The dtor. QsciLexerPython::~QsciLexerPython() { } // Returns the language name. const char *QsciLexerPython::language() const { return "Python"; } // Returns the lexer name. const char *QsciLexerPython::lexer() const { return "python"; } // Return the view used for indentation guides. int QsciLexerPython::indentationGuideView() const { return QsciScintillaBase::SC_IV_LOOKFORWARD; } // Return the set of character sequences that can separate auto-completion // words. QStringList QsciLexerPython::autoCompletionWordSeparators() const { QStringList wl; wl << "."; return wl; } // Return the list of characters that can start a block. const char *QsciLexerPython::blockStart(int *style) const { if (style) *style = Operator; return ":"; } // Return the number of lines to look back when auto-indenting. int QsciLexerPython::blockLookback() const { // This must be 0 otherwise de-indenting a Python block gets very // difficult. return 0; } // Return the style used for braces. int QsciLexerPython::braceStyle() const { return Operator; } // Returns the foreground colour of the text for a style. QColor QsciLexerPython::defaultColor(int style) const { switch (style) { case Default: return QColor(0x80,0x80,0x80); case Comment: return QColor(0x00,0x7f,0x00); case Number: return QColor(0x00,0x7f,0x7f); case DoubleQuotedString: case SingleQuotedString: return QColor(0x7f,0x00,0x7f); case Keyword: return QColor(0x00,0x00,0x7f); case TripleSingleQuotedString: case TripleDoubleQuotedString: return QColor(0x7f,0x00,0x00); case ClassName: return QColor(0x00,0x00,0xff); case FunctionMethodName: return QColor(0x00,0x7f,0x7f); case Operator: case Identifier: break; case CommentBlock: return QColor(0x7f,0x7f,0x7f); case UnclosedString: return QColor(0x00,0x00,0x00); case HighlightedIdentifier: return QColor(0x40,0x70,0x90); case Decorator: return QColor(0x80,0x50,0x00); } return QsciLexer::defaultColor(style); } // Returns the end-of-line fill for a style. bool QsciLexerPython::defaultEolFill(int style) const { if (style == UnclosedString) return true; return QsciLexer::defaultEolFill(style); } // Returns the font of the text for a style. QFont QsciLexerPython::defaultFont(int style) const { QFont f; switch (style) { case Comment: #if defined(Q_OS_WIN) f = QFont("Comic Sans MS",9); #elif defined(Q_OS_MAC) f = QFont("Comic Sans MS", 12); #else f = QFont("Bitstream Vera Serif",9); #endif break; case DoubleQuotedString: case SingleQuotedString: case UnclosedString: #if defined(Q_OS_WIN) f = QFont("Courier New",10); #elif defined(Q_OS_MAC) f = QFont("Courier", 12); #else f = QFont("Bitstream Vera Sans Mono",9); #endif break; case Keyword: case ClassName: case FunctionMethodName: case Operator: f = QsciLexer::defaultFont(style); f.setBold(true); break; default: f = QsciLexer::defaultFont(style); } return f; } // Returns the set of keywords. const char *QsciLexerPython::keywords(int set) const { if (set != 1) return 0; return keywordClass; } // Returns the user name of a style. QString QsciLexerPython::description(int style) const { switch (style) { case Default: return tr("Default"); case Comment: return tr("Comment"); case Number: return tr("Number"); case DoubleQuotedString: return tr("Double-quoted string"); case SingleQuotedString: return tr("Single-quoted string"); case Keyword: return tr("Keyword"); case TripleSingleQuotedString: return tr("Triple single-quoted string"); case TripleDoubleQuotedString: return tr("Triple double-quoted string"); case ClassName: return tr("Class name"); case FunctionMethodName: return tr("Function or method name"); case Operator: return tr("Operator"); case Identifier: return tr("Identifier"); case CommentBlock: return tr("Comment block"); case UnclosedString: return tr("Unclosed string"); case HighlightedIdentifier: return tr("Highlighted identifier"); case Decorator: return tr("Decorator"); } return QString(); } // Returns the background colour of the text for a style. QColor QsciLexerPython::defaultPaper(int style) const { if (style == UnclosedString) return QColor(0xe0,0xc0,0xe0); return QsciLexer::defaultPaper(style); } // Refresh all properties. void QsciLexerPython::refreshProperties() { setCommentProp(); setCompactProp(); setQuotesProp(); setTabWhingeProp(); setStringsOverNewlineProp(); setV2UnicodeProp(); setV3BinaryOctalProp(); setV3BytesProp(); setHighlightSubidsProp(); } // Read properties from the settings. bool QsciLexerPython::readProperties(QSettings &qs,const QString &prefix) { int rc = true, num; fold_comments = qs.value(prefix + "foldcomments", false).toBool(); fold_compact = qs.value(prefix + "foldcompact", true).toBool(); fold_quotes = qs.value(prefix + "foldquotes", false).toBool(); indent_warn = (IndentationWarning)qs.value(prefix + "indentwarning", (int)NoWarning).toInt(); strings_over_newline = qs.value(prefix + "stringsovernewline", false).toBool(); v2_unicode = qs.value(prefix + "v2unicode", true).toBool(); v3_binary_octal = qs.value(prefix + "v3binaryoctal", true).toBool(); v3_bytes = qs.value(prefix + "v3bytes", true).toBool(); highlight_subids = qs.value(prefix + "highlightsubids", true).toBool(); return rc; } // Write properties to the settings. bool QsciLexerPython::writeProperties(QSettings &qs,const QString &prefix) const { int rc = true; qs.setValue(prefix + "foldcomments", fold_comments); qs.setValue(prefix + "foldcompact", fold_compact); qs.setValue(prefix + "foldquotes", fold_quotes); qs.setValue(prefix + "indentwarning", (int)indent_warn); qs.setValue(prefix + "stringsovernewline", strings_over_newline); qs.setValue(prefix + "v2unicode", v2_unicode); qs.setValue(prefix + "v3binaryoctal", v3_binary_octal); qs.setValue(prefix + "v3bytes", v3_bytes); qs.setValue(prefix + "highlightsubids", highlight_subids); return rc; } // Set if comments can be folded. void QsciLexerPython::setFoldComments(bool fold) { fold_comments = fold; setCommentProp(); } // Set the "fold.comment.python" property. void QsciLexerPython::setCommentProp() { emit propertyChanged("fold.comment.python",(fold_comments ? "1" : "0")); } // Set if folds are compact. void QsciLexerPython::setFoldCompact(bool fold) { fold_compact = fold; setCompactProp(); } // Set the "fold.compact" property. void QsciLexerPython::setCompactProp() { emit propertyChanged("fold.compact",(fold_compact ? "1" : "0")); } // Set if quotes can be folded. void QsciLexerPython::setFoldQuotes(bool fold) { fold_quotes = fold; setQuotesProp(); } // Set the "fold.quotes.python" property. void QsciLexerPython::setQuotesProp() { emit propertyChanged("fold.quotes.python",(fold_quotes ? "1" : "0")); } // Set the indentation warning. void QsciLexerPython::setIndentationWarning(QsciLexerPython::IndentationWarning warn) { indent_warn = warn; setTabWhingeProp(); } // Set the "tab.timmy.whinge.level" property. void QsciLexerPython::setTabWhingeProp() { emit propertyChanged("tab.timmy.whinge.level", QByteArray::number(indent_warn)); } // Set if string literals can span newlines. void QsciLexerPython::setStringsOverNewlineAllowed(bool allowed) { strings_over_newline = allowed; setStringsOverNewlineProp(); } // Set the "lexer.python.strings.u" property. void QsciLexerPython::setStringsOverNewlineProp() { emit propertyChanged("lexer.python.strings.over.newline", (strings_over_newline ? "1" : "0")); } // Set if v2 unicode string literals are allowed. void QsciLexerPython::setV2UnicodeAllowed(bool allowed) { v2_unicode = allowed; setV2UnicodeProp(); } // Set the "lexer.python.strings.u" property. void QsciLexerPython::setV2UnicodeProp() { emit propertyChanged("lexer.python.strings.u", (v2_unicode ? "1" : "0")); } // Set if v3 binary and octal literals are allowed. void QsciLexerPython::setV3BinaryOctalAllowed(bool allowed) { v3_binary_octal = allowed; setV3BinaryOctalProp(); } // Set the "lexer.python.literals.binary" property. void QsciLexerPython::setV3BinaryOctalProp() { emit propertyChanged("lexer.python.literals.binary", (v3_binary_octal ? "1" : "0")); } // Set if v3 bytes string literals are allowed. void QsciLexerPython::setV3BytesAllowed(bool allowed) { v3_bytes = allowed; setV3BytesProp(); } // Set the "lexer.python.strings.b" property. void QsciLexerPython::setV3BytesProp() { emit propertyChanged("lexer.python.strings.b",(v3_bytes ? "1" : "0")); } // Set if sub-identifiers are highlighted. void QsciLexerPython::setHighlightSubidentifiers(bool enabled) { highlight_subids = enabled; setHighlightSubidsProp(); } // Set the "lexer.python.keywords2.no.sub.identifiers" property. void QsciLexerPython::setHighlightSubidsProp() { emit propertyChanged("lexer.python.keywords2.no.sub.identifiers", (highlight_subids ? "0" : "1")); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscilexersql.cpp000066400000000000000000000326211345112435200240700ustar00rootroot00000000000000// This module implements the QsciLexerSQL class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscilexersql.h" #include #include #include // The ctor. QsciLexerSQL::QsciLexerSQL(QObject *parent) : QsciLexer(parent), at_else(false), fold_comments(false), fold_compact(true), only_begin(false), backticks_identifier(false), numbersign_comment(false), backslash_escapes(false), allow_dotted_word(false) { } // The dtor. QsciLexerSQL::~QsciLexerSQL() { } // Returns the language name. const char *QsciLexerSQL::language() const { return "SQL"; } // Returns the lexer name. const char *QsciLexerSQL::lexer() const { return "sql"; } // Return the style used for braces. int QsciLexerSQL::braceStyle() const { return Operator; } // Returns the foreground colour of the text for a style. QColor QsciLexerSQL::defaultColor(int style) const { switch (style) { case Default: return QColor(0x80,0x80,0x80); case Comment: case CommentLine: case PlusPrompt: case PlusComment: case CommentLineHash: return QColor(0x00,0x7f,0x00); case CommentDoc: return QColor(0x7f,0x7f,0x7f); case Number: return QColor(0x00,0x7f,0x7f); case Keyword: return QColor(0x00,0x00,0x7f); case DoubleQuotedString: case SingleQuotedString: return QColor(0x7f,0x00,0x7f); case PlusKeyword: return QColor(0x7f,0x7f,0x00); case Operator: case Identifier: break; case CommentDocKeyword: return QColor(0x30,0x60,0xa0); case CommentDocKeywordError: return QColor(0x80,0x40,0x20); case KeywordSet5: return QColor(0x4b,0x00,0x82); case KeywordSet6: return QColor(0xb0,0x00,0x40); case KeywordSet7: return QColor(0x8b,0x00,0x00); case KeywordSet8: return QColor(0x80,0x00,0x80); } return QsciLexer::defaultColor(style); } // Returns the end-of-line fill for a style. bool QsciLexerSQL::defaultEolFill(int style) const { if (style == PlusPrompt) return true; return QsciLexer::defaultEolFill(style); } // Returns the font of the text for a style. QFont QsciLexerSQL::defaultFont(int style) const { QFont f; switch (style) { case Comment: case CommentLine: case PlusComment: case CommentLineHash: case CommentDocKeyword: case CommentDocKeywordError: #if defined(Q_OS_WIN) f = QFont("Comic Sans MS",9); #elif defined(Q_OS_MAC) f = QFont("Comic Sans MS", 12); #else f = QFont("Bitstream Vera Serif",9); #endif break; case Keyword: case Operator: f = QsciLexer::defaultFont(style); f.setBold(true); break; case DoubleQuotedString: case SingleQuotedString: case PlusPrompt: #if defined(Q_OS_WIN) f = QFont("Courier New",10); #elif defined(Q_OS_MAC) f = QFont("Courier", 12); #else f = QFont("Bitstream Vera Sans Mono",9); #endif break; default: f = QsciLexer::defaultFont(style); } return f; } // Returns the set of keywords. const char *QsciLexerSQL::keywords(int set) const { if (set == 1) return "absolute action add admin after aggregate alias all " "allocate alter and any are array as asc assertion " "at authorization before begin binary bit blob " "boolean both breadth by call cascade cascaded case " "cast catalog char character check class clob close " "collate collation column commit completion connect " "connection constraint constraints constructor " "continue corresponding create cross cube current " "current_date current_path current_role current_time " "current_timestamp current_user cursor cycle data " "date day deallocate dec decimal declare default " "deferrable deferred delete depth deref desc " "describe descriptor destroy destructor " "deterministic dictionary diagnostics disconnect " "distinct domain double drop dynamic each else end " "end-exec equals escape every except exception exec " "execute external false fetch first float for " "foreign found from free full function general get " "global go goto grant group grouping having host " "hour identity if ignore immediate in indicator " "initialize initially inner inout input insert int " "integer intersect interval into is isolation " "iterate join key language large last lateral " "leading left less level like limit local localtime " "localtimestamp locator map match minute modifies " "modify module month names national natural nchar " "nclob new next no none not null numeric object of " "off old on only open operation option or order " "ordinality out outer output pad parameter " "parameters partial path postfix precision prefix " "preorder prepare preserve primary prior privileges " "procedure public read reads real recursive ref " "references referencing relative restrict result " "return returns revoke right role rollback rollup " "routine row rows savepoint schema scroll scope " "search second section select sequence session " "session_user set sets size smallint some| space " "specific specifictype sql sqlexception sqlstate " "sqlwarning start state statement static structure " "system_user table temporary terminate than then " "time timestamp timezone_hour timezone_minute to " "trailing transaction translation treat trigger " "true under union unique unknown unnest update usage " "user using value values varchar variable varying " "view when whenever where with without work write " "year zone"; if (set == 3) return "param author since return see deprecated todo"; if (set == 4) return "acc~ept a~ppend archive log attribute bre~ak " "bti~tle c~hange cl~ear col~umn comp~ute conn~ect " "copy def~ine del desc~ribe disc~onnect e~dit " "exec~ute exit get help ho~st i~nput l~ist passw~ord " "pau~se pri~nt pro~mpt quit recover rem~ark " "repf~ooter reph~eader r~un sav~e set sho~w shutdown " "spo~ol sta~rt startup store timi~ng tti~tle " "undef~ine var~iable whenever oserror whenever " "sqlerror"; if (set == 5) return "dbms_output.disable dbms_output.enable dbms_output.get_line " "dbms_output.get_lines dbms_output.new_line dbms_output.put " "dbms_output.put_line"; return 0; } // Returns the user name of a style. QString QsciLexerSQL::description(int style) const { switch (style) { case Default: return tr("Default"); case Comment: return tr("Comment"); case CommentLine: return tr("Comment line"); case CommentDoc: return tr("JavaDoc style comment"); case Number: return tr("Number"); case Keyword: return tr("Keyword"); case DoubleQuotedString: return tr("Double-quoted string"); case SingleQuotedString: return tr("Single-quoted string"); case PlusKeyword: return tr("SQL*Plus keyword"); case PlusPrompt: return tr("SQL*Plus prompt"); case Operator: return tr("Operator"); case Identifier: return tr("Identifier"); case PlusComment: return tr("SQL*Plus comment"); case CommentLineHash: return tr("# comment line"); case CommentDocKeyword: return tr("JavaDoc keyword"); case CommentDocKeywordError: return tr("JavaDoc keyword error"); case KeywordSet5: return tr("User defined 1"); case KeywordSet6: return tr("User defined 2"); case KeywordSet7: return tr("User defined 3"); case KeywordSet8: return tr("User defined 4"); case QuotedIdentifier: return tr("Quoted identifier"); case QuotedOperator: return tr("Quoted operator"); } return QString(); } // Returns the background colour of the text for a style. QColor QsciLexerSQL::defaultPaper(int style) const { if (style == PlusPrompt) return QColor(0xe0,0xff,0xe0); return QsciLexer::defaultPaper(style); } // Refresh all properties. void QsciLexerSQL::refreshProperties() { setAtElseProp(); setCommentProp(); setCompactProp(); setOnlyBeginProp(); setBackticksIdentifierProp(); setNumbersignCommentProp(); setBackslashEscapesProp(); setAllowDottedWordProp(); } // Read properties from the settings. bool QsciLexerSQL::readProperties(QSettings &qs, const QString &prefix) { int rc = true; at_else = qs.value(prefix + "atelse", false).toBool(); fold_comments = qs.value(prefix + "foldcomments", false).toBool(); fold_compact = qs.value(prefix + "foldcompact", true).toBool(); only_begin = qs.value(prefix + "onlybegin", false).toBool(); backticks_identifier = qs.value(prefix + "backticksidentifier", false).toBool(); numbersign_comment = qs.value(prefix + "numbersigncomment", false).toBool(); backslash_escapes = qs.value(prefix + "backslashescapes", false).toBool(); allow_dotted_word = qs.value(prefix + "allowdottedword", false).toBool(); return rc; } // Write properties to the settings. bool QsciLexerSQL::writeProperties(QSettings &qs, const QString &prefix) const { int rc = true; qs.value(prefix + "atelse", at_else); qs.value(prefix + "foldcomments", fold_comments); qs.value(prefix + "foldcompact", fold_compact); qs.value(prefix + "onlybegin", only_begin); qs.value(prefix + "backticksidentifier", backticks_identifier); qs.value(prefix + "numbersigncomment", numbersign_comment); qs.value(prefix + "backslashescapes", backslash_escapes); qs.value(prefix + "allowdottedword", allow_dotted_word); return rc; } // Set if ELSE blocks can be folded. void QsciLexerSQL::setFoldAtElse(bool fold) { at_else = fold; setAtElseProp(); } // Set the "fold.sql.at.else" property. void QsciLexerSQL::setAtElseProp() { emit propertyChanged("fold.sql.at.else", (at_else ? "1" : "0")); } // Set if comments can be folded. void QsciLexerSQL::setFoldComments(bool fold) { fold_comments = fold; setCommentProp(); } // Set the "fold.comment" property. void QsciLexerSQL::setCommentProp() { emit propertyChanged("fold.comment", (fold_comments ? "1" : "0")); } // Set if folds are compact void QsciLexerSQL::setFoldCompact(bool fold) { fold_compact = fold; setCompactProp(); } // Set the "fold.compact" property. void QsciLexerSQL::setCompactProp() { emit propertyChanged("fold.compact", (fold_compact ? "1" : "0")); } // Set if BEGIN blocks only can be folded. void QsciLexerSQL::setFoldOnlyBegin(bool fold) { only_begin = fold; setOnlyBeginProp(); } // Set the "fold.sql.only.begin" property. void QsciLexerSQL::setOnlyBeginProp() { emit propertyChanged("fold.sql.only.begin", (only_begin ? "1" : "0")); } // Enable quoted identifiers. void QsciLexerSQL::setQuotedIdentifiers(bool enable) { backticks_identifier = enable; setBackticksIdentifierProp(); } // Set the "lexer.sql.backticks.identifier" property. void QsciLexerSQL::setBackticksIdentifierProp() { emit propertyChanged("lexer.sql.backticks.identifier", (backticks_identifier ? "1" : "0")); } // Enable '#' as a comment character. void QsciLexerSQL::setHashComments(bool enable) { numbersign_comment = enable; setNumbersignCommentProp(); } // Set the "lexer.sql.numbersign.comment" property. void QsciLexerSQL::setNumbersignCommentProp() { emit propertyChanged("lexer.sql.numbersign.comment", (numbersign_comment ? "1" : "0")); } // Enable/disable backslash escapes. void QsciLexerSQL::setBackslashEscapes(bool enable) { backslash_escapes = enable; setBackslashEscapesProp(); } // Set the "sql.backslash.escapes" property. void QsciLexerSQL::setBackslashEscapesProp() { emit propertyChanged("sql.backslash.escapes", (backslash_escapes ? "1" : "0")); } // Enable dotted words. void QsciLexerSQL::setDottedWords(bool enable) { allow_dotted_word = enable; setAllowDottedWordProp(); } // Set the "lexer.sql.allow.dotted.word" property. void QsciLexerSQL::setAllowDottedWordProp() { emit propertyChanged("lexer.sql.allow.dotted.word", (allow_dotted_word ? "1" : "0")); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscilexerxml.cpp000066400000000000000000000122501345112435200240650ustar00rootroot00000000000000// This module implements the QsciLexerXML class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscilexerxml.h" #include #include #include // The ctor. QsciLexerXML::QsciLexerXML(QObject *parent) : QsciLexerHTML(parent), scripts(true) { } // The dtor. QsciLexerXML::~QsciLexerXML() { } // Returns the language name. const char *QsciLexerXML::language() const { return "XML"; } // Returns the lexer name. const char *QsciLexerXML::lexer() const { return "xml"; } // Returns the foreground colour of the text for a style. QColor QsciLexerXML::defaultColor(int style) const { switch (style) { case Default: return QColor(0x00,0x00,0x00); case Tag: case UnknownTag: case XMLTagEnd: case SGMLDefault: case SGMLCommand: return QColor(0x00,0x00,0x80); case Attribute: case UnknownAttribute: return QColor(0x00,0x80,0x80); case HTMLNumber: return QColor(0x00,0x7f,0x7f); case HTMLDoubleQuotedString: case HTMLSingleQuotedString: return QColor(0x7f,0x00,0x7f); case OtherInTag: case Entity: case XMLStart: case XMLEnd: return QColor(0x80,0x00,0x80); case HTMLComment: case SGMLComment: return QColor(0x80,0x80,0x00); case CDATA: case PHPStart: case SGMLDoubleQuotedString: case SGMLError: return QColor(0x80,0x00,0x00); case HTMLValue: return QColor(0x60,0x80,0x60); case SGMLParameter: return QColor(0x00,0x66,0x00); case SGMLSingleQuotedString: return QColor(0x99,0x33,0x00); case SGMLSpecial: return QColor(0x33,0x66,0xff); case SGMLEntity: return QColor(0x33,0x33,0x33); case SGMLBlockDefault: return QColor(0x00,0x00,0x66); } return QsciLexerHTML::defaultColor(style); } // Returns the end-of-line fill for a style. bool QsciLexerXML::defaultEolFill(int style) const { if (style == CDATA) return true; return QsciLexerHTML::defaultEolFill(style); } // Returns the font of the text for a style. QFont QsciLexerXML::defaultFont(int style) const { QFont f; switch (style) { case Default: case Entity: case CDATA: #if defined(Q_OS_WIN) f = QFont("Times New Roman",11); #elif defined(Q_OS_MAC) f = QFont("Times New Roman", 12); #else f = QFont("Bitstream Charter",10); #endif break; case XMLStart: case XMLEnd: case SGMLCommand: f = QsciLexer::defaultFont(style); f.setBold(true); break; default: f = QsciLexerHTML::defaultFont(style); } return f; } // Returns the set of keywords. const char *QsciLexerXML::keywords(int set) const { if (set == 6) return QsciLexerHTML::keywords(set); return 0; } // Returns the background colour of the text for a style. QColor QsciLexerXML::defaultPaper(int style) const { switch (style) { case CDATA: return QColor(0xff,0xf0,0xf0); case SGMLDefault: case SGMLCommand: case SGMLParameter: case SGMLDoubleQuotedString: case SGMLSingleQuotedString: case SGMLSpecial: case SGMLEntity: case SGMLComment: return QColor(0xef,0xef,0xff); case SGMLError: return QColor(0xff,0x66,0x66); case SGMLBlockDefault: return QColor(0xcc,0xcc,0xe0); } return QsciLexerHTML::defaultPaper(style); } // Refresh all properties. void QsciLexerXML::refreshProperties() { setScriptsProp(); } // Read properties from the settings. bool QsciLexerXML::readProperties(QSettings &qs, const QString &prefix) { int rc = QsciLexerHTML::readProperties(qs, prefix), num; scripts = qs.value(prefix + "scriptsstyled", true).toBool(); return rc; } // Write properties to the settings. bool QsciLexerXML::writeProperties(QSettings &qs, const QString &prefix) const { int rc = QsciLexerHTML::writeProperties(qs, prefix); qs.setValue(prefix + "scriptsstyled", scripts); return rc; } // Return true if scripts are styled. bool QsciLexerXML::scriptsStyled() const { return scripts; } // Set if scripts are styled. void QsciLexerXML::setScriptsStyled(bool styled) { scripts = styled; setScriptsProp(); } // Set the "lexer.xml.allow.scripts" property. void QsciLexerXML::setScriptsProp() { emit propertyChanged("lexer.xml.allow.scripts",(scripts ? "1" : "0")); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscimacro.cpp000066400000000000000000000163671345112435200233430ustar00rootroot00000000000000// This module implements the QsciMacro class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscimacro.h" #include #include "Qsci/qsciscintilla.h" static int fromHex(unsigned char ch); // The ctor. QsciMacro::QsciMacro(QsciScintilla *parent) : QObject(parent), qsci(parent) { } // The ctor that initialises the macro. QsciMacro::QsciMacro(const QString &asc, QsciScintilla *parent) : QObject(parent), qsci(parent) { load(asc); } // The dtor. QsciMacro::~QsciMacro() { } // Clear the contents of the macro. void QsciMacro::clear() { macro.clear(); } // Read a macro from a string. bool QsciMacro::load(const QString &asc) { bool ok = true; macro.clear(); QStringList fields = asc.split(' '); int f = 0; while (f < fields.size()) { Macro cmd; unsigned len; // Extract the 3 fixed fields. if (f + 3 > fields.size()) { ok = false; break; } cmd.msg = fields[f++].toUInt(&ok); if (!ok) break; cmd.wParam = fields[f++].toULong(&ok); if (!ok) break; len = fields[f++].toUInt(&ok); if (!ok) break; // Extract any text. if (len) { if (f + 1 > fields.size()) { ok = false; break; } QByteArray ba = fields[f++].toLatin1(); const char *sp = ba.data(); if (!sp) { ok = false; break; } // Because of historical bugs the length field is unreliable. bool embedded_null = false; unsigned char ch; while ((ch = *sp++) != '\0') { if (ch == '"' || ch <= ' ' || ch >= 0x7f) { ok = false; break; } if (ch == '\\') { int b1, b2; if ((b1 = fromHex(*sp++)) < 0 || (b2 = fromHex(*sp++)) < 0) { ok = false; break; } ch = (b1 << 4) + b2; } if (ch == '\0') { // Don't add it now as it may be the terminating '\0'. embedded_null = true; } else { if (embedded_null) { // Add the pending embedded '\0'. cmd.text += '\0'; embedded_null = false; } cmd.text += ch; } } if (!ok) break; } macro.append(cmd); } if (!ok) macro.clear(); return ok; } // Write a macro to a string. QString QsciMacro::save() const { QString ms; QList::const_iterator it; for (it = macro.begin(); it != macro.end(); ++it) { if (!ms.isEmpty()) ms += ' '; unsigned len = (*it).text.size(); QString m; ms += m.sprintf("%u %lu %u", (*it).msg, (*it).wParam, len); if (len) { // In Qt v3, if the length is greater than zero then it also // includes the '\0', so we need to make sure that Qt v4 writes the // '\0'. That the '\0' is written at all is a bug because // QCString::size() is used instead of QCString::length(). We // don't fix this so as not to break old macros. However this is // still broken because we have already written the unadjusted // length. So, in summary, the length field should be interpreted // as a zero/non-zero value, and the end of the data is either at // the next space or the very end of the data. ++len; ms += ' '; const char *cp = (*it).text.data(); while (len--) { unsigned char ch = *cp++; if (ch == '\\' || ch == '"' || ch <= ' ' || ch >= 0x7f) { QString buf; ms += buf.sprintf("\\%02x", ch); } else ms += ch; } } } return ms; } // Play the macro. void QsciMacro::play() { if (!qsci) return; QList::const_iterator it; for (it = macro.begin(); it != macro.end(); ++it) qsci->SendScintilla((*it).msg, (*it).wParam, (*it).text.data()); } // Start recording. void QsciMacro::startRecording() { if (!qsci) return; macro.clear(); connect(qsci, SIGNAL(SCN_MACRORECORD(unsigned int, unsigned long, void *)), SLOT(record(unsigned int, unsigned long, void *))); qsci->SendScintilla(QsciScintillaBase::SCI_STARTRECORD); } // End recording. void QsciMacro::endRecording() { if (!qsci) return; qsci->SendScintilla(QsciScintillaBase::SCI_STOPRECORD); qsci->disconnect(this); } // Record a command. void QsciMacro::record(unsigned int msg, unsigned long wParam, void *lParam) { Macro m; m.msg = msg; m.wParam = wParam; // Determine commands which need special handling of the parameters. switch (msg) { case QsciScintillaBase::SCI_ADDTEXT: m.text = QByteArray(reinterpret_cast(lParam), wParam); break; case QsciScintillaBase::SCI_REPLACESEL: if (!macro.isEmpty() && macro.last().msg == QsciScintillaBase::SCI_REPLACESEL) { // This is the command used for ordinary user input so it's a // significant space reduction to append it to the previous // command. macro.last().text.append(reinterpret_cast(lParam)); return; } /* Drop through. */ case QsciScintillaBase::SCI_INSERTTEXT: case QsciScintillaBase::SCI_APPENDTEXT: case QsciScintillaBase::SCI_SEARCHNEXT: case QsciScintillaBase::SCI_SEARCHPREV: m.text.append(reinterpret_cast(lParam)); break; } macro.append(m); } // Return the given hex character as a binary. static int fromHex(unsigned char ch) { if (ch >= '0' && ch <= '9') return ch - '0'; if (ch >= 'a' && ch <= 'f') return ch - 'a' + 10; return -1; } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla.pro000066400000000000000000000134421345112435200235320ustar00rootroot00000000000000# The project file for the QScintilla library. # # Copyright (c) 2017 Riverbank Computing Limited # # This file is part of QScintilla. # # This file may be used under the terms of the GNU General Public License # version 3.0 as published by the Free Software Foundation and appearing in # the file LICENSE included in the packaging of this file. Please review the # following information to ensure the GNU General Public License version 3.0 # requirements will be met: http://www.gnu.org/copyleft/gpl.html. # # If you do not wish to use this file under the terms of the GPL version 3.0 # then you may purchase a commercial license. For more information contact # info@riverbankcomputing.com. # # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE # WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # This must be kept in sync with Python/configure.py, Python/configure-old.py, # example-Qt4Qt5/application.pro and designer-Qt4Qt5/designer.pro. !win32:VERSION = 13.0.0 TEMPLATE = lib TARGET = qscintilla2 CONFIG += qt warn_off thread exceptions hide_symbols staticlib debug_and_release INCLUDEPATH += . ../include ../lexlib ../src QMAKE_CXXFLAGS += -std=c++11 !CONFIG(staticlib) { DEFINES += QSCINTILLA_MAKE_DLL } DEFINES += SCINTILLA_QT SCI_LEXER greaterThan(QT_MAJOR_VERSION, 4) { QT += widgets printsupport greaterThan(QT_MINOR_VERSION, 1) { macx:QT += macextras } # Work around QTBUG-39300. CONFIG -= android_install } # Comment this in if you want the internal Scintilla classes to be placed in a # Scintilla namespace rather than pollute the global namespace. #DEFINES += SCI_NAMESPACE target.path = $$[QT_INSTALL_LIBS] INSTALLS += target header.path = $$[QT_INSTALL_HEADERS] header.files = Qsci INSTALLS += header trans.path = $$[QT_INSTALL_TRANSLATIONS] trans.files = qscintilla_*.qm INSTALLS += trans qsci.path = $$[QT_INSTALL_DATA] qsci.files = ../qsci INSTALLS += qsci greaterThan(QT_MAJOR_VERSION, 4) { features.path = $$[QT_HOST_DATA]/mkspecs/features } else { features.path = $$[QT_INSTALL_DATA]/mkspecs/features } CONFIG(staticlib) { features.files = $$PWD/features_staticlib/qscintilla2.prf } else { features.files = $$PWD/features/qscintilla2.prf } INSTALLS += features HEADERS = \ ./Qsci/qsciglobal.h \ ./Qsci/qsciscintilla.h \ ./Qsci/qsciscintillabase.h \ ./Qsci/qsciabstractapis.h \ ./Qsci/qsciapis.h \ ./Qsci/qscicommand.h \ ./Qsci/qscicommandset.h \ ./Qsci/qscidocument.h \ ./Qsci/qscilexer.h \ ./Qsci/qscilexercustom.h \ ./Qsci/qscilexersql.h \ ./Qsci/qscilexerjson.h \ ./Qsci/qscilexerhtml.h \ ./Qsci/qscilexerxml.h \ ./Qsci/qscilexerjavascript.h \ ./Qsci/qscilexercpp.h \ ./Qsci/qscilexerpython.h \ ./Qsci/qscimacro.h \ ./Qsci/qsciprinter.h \ ./Qsci/qscistyle.h \ ./Qsci/qscistyledtext.h \ ListBoxQt.h \ SciClasses.h \ SciNamespace.h \ ScintillaQt.h \ ../include/ILexer.h \ ../include/Platform.h \ ../include/Sci_Position.h \ ../include/SciLexer.h \ ../include/Scintilla.h \ ../include/ScintillaWidget.h \ ../lexlib/Accessor.h \ ../lexlib/CharacterCategory.h \ ../lexlib/CharacterSet.h \ ../lexlib/LexAccessor.h \ ../lexlib/LexerBase.h \ ../lexlib/LexerModule.h \ ../lexlib/LexerNoExceptions.h \ ../lexlib/LexerSimple.h \ ../lexlib/OptionSet.h \ ../lexlib/PropSetSimple.h \ ../lexlib/StringCopy.h \ ../lexlib/StyleContext.h \ ../lexlib/SubStyles.h \ ../lexlib/WordList.h \ ../src/AutoComplete.h \ ../src/CallTip.h \ ../src/CaseConvert.h \ ../src/CaseFolder.h \ ../src/Catalogue.h \ ../src/CellBuffer.h \ ../src/CharClassify.h \ ../src/ContractionState.h \ ../src/Decoration.h \ ../src/Document.h \ ../src/EditModel.h \ ../src/Editor.h \ ../src/EditView.h \ ../src/ExternalLexer.h \ ../src/FontQuality.h \ ../src/Indicator.h \ ../src/KeyMap.h \ ../src/LineMarker.h \ ../src/MarginView.h \ ../src/Partitioning.h \ ../src/PerLine.h \ ../src/PositionCache.h \ ../src/RESearch.h \ ../src/RunStyles.h \ ../src/ScintillaBase.h \ ../src/Selection.h \ ../src/SplitVector.h \ ../src/Style.h \ ../src/UnicodeFromUTF8.h \ ../src/UniConversion.h \ ../src/ViewStyle.h \ ../src/XPM.h SOURCES = \ qsciscintilla.cpp \ qsciscintillabase.cpp \ qsciabstractapis.cpp \ qsciapis.cpp \ qscicommand.cpp \ qscicommandset.cpp \ qscidocument.cpp \ qscilexer.cpp \ qscilexercustom.cpp \ qscilexersql.cpp \ qscilexerjson.cpp \ qscilexerhtml.cpp \ qscilexerxml.cpp \ qscilexerjavascript.cpp \ qscilexercpp.cpp \ qscilexerpython.cpp \ qscimacro.cpp \ qsciprinter.cpp \ qscistyle.cpp \ qscistyledtext.cpp \ MacPasteboardMime.cpp \ InputMethod.cpp \ SciClasses.cpp \ ListBoxQt.cpp \ PlatQt.cpp \ ScintillaQt.cpp \ ../lexers/LexSQL.cpp \ ../lexers/LexJSON.cpp \ ../lexers/LexHTML.cpp \ ../lexlib/Accessor.cpp \ ../lexlib/CharacterCategory.cpp \ ../lexlib/CharacterSet.cpp \ ../lexlib/LexerBase.cpp \ ../lexlib/LexerModule.cpp \ ../lexlib/LexerNoExceptions.cpp \ ../lexlib/LexerSimple.cpp \ ../lexlib/PropSetSimple.cpp \ ../lexlib/StyleContext.cpp \ ../lexlib/WordList.cpp \ ../src/AutoComplete.cpp \ ../src/CallTip.cpp \ ../src/CaseConvert.cpp \ ../src/CaseFolder.cpp \ ../src/Catalogue.cpp \ ../src/CellBuffer.cpp \ ../src/CharClassify.cpp \ ../src/ContractionState.cpp \ ../src/Decoration.cpp \ ../src/Document.cpp \ ../src/EditModel.cpp \ ../src/Editor.cpp \ ../src/EditView.cpp \ ../src/ExternalLexer.cpp \ ../src/Indicator.cpp \ ../src/KeyMap.cpp \ ../src/LineMarker.cpp \ ../src/MarginView.cpp \ ../src/PerLine.cpp \ ../src/PositionCache.cpp \ ../src/RESearch.cpp \ ../src/RunStyles.cpp \ ../src/ScintillaBase.cpp \ ../src/Selection.cpp \ ../src/Style.cpp \ ../src/UniConversion.cpp \ ../src/ViewStyle.cpp \ ../src/XPM.cpp TRANSLATIONS = \ qscintilla_cs.ts \ qscintilla_de.ts \ qscintilla_es.ts \ qscintilla_fr.ts \ qscintilla_pt_br.ts sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_cs.qm000066400000000000000000001265061345112435200240420ustar00rootroot00000000000000#Nhh2_T9UpuSO<9tWGUB$DRo?UIc4%'[[uAf+l&SI~ŰG 4X`X|z5[0dszq O>vx Z6{ctA  T:A$<L,_?@A3@Ah@Ar$@A@A@B4!@Bi'@BrS@Bl@B@C4|@Ci@Cr@C@CS@Di@D&@DA*\8\8N\8 \8%\8/(\83\886\8c\8g0\8m\8p^\8t\8x\8}\8U\8 \8P\8r\8/\8\8\8r&Xr0]r1vBynzkM5855#5-52857k5e5m5p5s5x&5555+55]55GgGqp9\9\:4J*q9?^tHo_p[}&}/}8d('`.5C<WeȐGȐȐȐ%Ȑ*Ȑ/bȐ3?Ȑ8mȐcȐgaȐjȐmȐpȐt:ȐxȐȐRȐȐ`ȐȐȐKѽ8 ԇZfg ` "I)6%)o6|_uR}d*yd*iyd*z d*z=i*Ew'Rw܌KZ9] _D:&QF*Nv3ggj |^KE"1"e"rlT ~ ~!)~,~k;2cq2aUo^|<2DpO ~ &0' &0'= ?3_? @|U`h o^ @tj E b  ^V   " ) -= 6 l v   2 ~ X$ur =y@ i ,E T` 4PV '4! *S *Su *S} Iq> S~I S d85 d8k d8 d8 d<E d<> d< P d<5R d<6z d<eK d<j> d<l/ d<n d<o& d<u d<|X d<} d<~ d<6 d<{ d< d< d<J d< d< d4!d h k, qeEG $M9 dve R) BA t t~ tx t t! t)\ t, t2 t5 t6 tc% te tj{ tk tlj tn to tr tv< t| t} tT t t t t tA t& t tY zGK ZTP  Z5 _T ?O " (] ;2 ;^B A\ E\ _? cV4 dg dNC ea 4$[ ' F  yl |# |.h |B Bu|* ӕp O O 4E 4z ؗO ES )~ ) ) >V W=~ f* oX ow o 'G } J! $x C 'P x5 Ig'b Ig1y Ig3v Ig9 Igd Ighx Igq Igt IgQ IgR Ig t#J t. t `Su .^ y@Wba cb +' }9 @=eUVWW\O ]gBeTI5hwLirZ&ld;wgY{?O&4H&*09ntv{ B< >)wƦ n L rkCqj602$2N@Am#}w,4+4URΒVD2R)tnE9TYw}Ui ZruaitCancel QsciCommandHVybran text pYevst na mal psmenaConvert selection to lower case QsciCommandJVybran text pYevst na velk psmenaConvert selection to upper case QsciCommand0Koprovat aktuln YdkuCopy current line QsciCommandKoprovat vbrCopy selection QsciCommand,Vyjmout aktuln YdkuCut current line QsciCommandVyjmout vbr Cut selection QsciCommand(Smazat aktuln znakDelete current character QsciCommand*Smazat aktuln YdkuDelete current line QsciCommand&Smazat Ydku dolevaDelete line to left QsciCommand(Smazat Ydku dopravaDelete line to right QsciCommand*Smazat pYedchoz znakDelete previous character QsciCommand&Smazat slovo dolevaDelete word to left QsciCommand(Smazat slovo dopravaDelete word to right QsciCommand Duplikovat vbrDuplicate selection QsciCommandZRozaYit obdlnkov vbr o jednu Ydku dolo*Extend rectangular selection down one line QsciCommandTRozaYit obdlnkov vbr na dala stranu*Extend rectangular selection down one page QsciCommandbRozaYit obdlnkov vbr o jedno psmeno doleva/Extend rectangular selection left one character QsciCommanddRozaYit obdlnkov vbr o jedno psmeno doprava0Extend rectangular selection right one character QsciCommand^RozaYit obdlnkov vbr o jednu Ydku nahoru(Extend rectangular selection up one line QsciCommand\RozaYit obdlnkov vbr na pYedchoz stranu(Extend rectangular selection up one page QsciCommandBRozaYit vbr o jednu Ydku doloExtend selection down one line QsciCommand<RozaYit vbr na dala stranuExtend selection down one page QsciCommandHRozaYit vbr o jeden odstavec dolo#Extend selection down one paragraph QsciCommandJRozaYit vbr o jedno psmeno doleva#Extend selection left one character QsciCommandFRozaYit vbr o jedno slovo dolevaExtend selection left one word QsciCommandDRozaYit vbr o  st slova doleva#Extend selection left one word part QsciCommandLRozaYit vbr o jedno psmeno doprava$Extend selection right one character QsciCommandHRozaYit vbr o jedno slovo dopravaExtend selection right one word QsciCommandFRozaYit vbr o  st slova doprava$Extend selection right one word part QsciCommandFRozaYit vbr o jednu Ydku nahoruExtend selection up one line QsciCommandDRozaYit vbr na pYedchoz stranuExtend selection up one page QsciCommandLRozaYit vbr o jeden odstavec nahoru!Extend selection up one paragraph QsciCommandVysunoutFormfeed QsciCommand,Odsadit o jednu roveHIndent one level QsciCommand0Posun o jednu Ydku doloMove down one line QsciCommand*Posun na dala stranuMove down one page QsciCommand6Posun o jeden odstavec doloMove down one paragraph QsciCommand8Posun o jedno psmeno dolevaMove left one character QsciCommand2Posun o jedno slovo vlevoMove left one word QsciCommand2Posun o  st slova dolevaMove left one word part QsciCommand:Posun o jedno psmeno dopravaMove right one character QsciCommand6Posun o jedno slovo dopravaMove right one word QsciCommand4Posun o  st slova dopravaMove right one word part QsciCommand4Posun o jednu Ydku nahoruMove up one line QsciCommand2Posun na pYedchoz stranuMove up one page QsciCommand:Posun o jeden odstavec nahoruMove up one paragraph QsciCommand Vlo~itPaste QsciCommand8Znovu pou~t posledn pYkazRedo last command QsciCommandBRolovat pohled o jednu Ydku doloScroll view down one line QsciCommandFRolovat pohled o jednu Ydku nahoruScroll view up one line QsciCommand:PYepnout vkldn/pYepisovnToggle insert/overtype QsciCommandZvtaitZoom in QsciCommandZmenaitZoom out QsciCommandDefaultDefault QsciLexerAVS<String ve dvojitch uvozovkchDouble-quoted string QsciLexerAVSIdentifiktor Identifier QsciLexerAVSKl ov slovoKeyword QsciLexerAVS*JednoYdkov komentY Line comment QsciLexerAVS  sloNumber QsciLexerAVSOpertorOperator QsciLexerAVSHString ve tYech dvojitch uvozovkchTriple double-quoted string QsciLexerAVSZptn chod Backticks QsciLexerBashKomentYComment QsciLexerBashDefaultDefault QsciLexerBash<String ve dvojitch uvozovkchDouble-quoted string QsciLexerBash ChybaError QsciLexerBash4Zde je oddlova dokumentuHere document delimiter QsciLexerBashIdentifiktor Identifier QsciLexerBashKl ov slovoKeyword QsciLexerBash  sloNumber QsciLexerBashOpertorOperator QsciLexerBash"Rozklad parametruParameter expansion QsciLexerBash SkalrScalar QsciLexerBashFJednoduch uvozovky zde v dokumentuSingle-quoted here document QsciLexerBash@String v jednoduchch uvozovkchSingle-quoted string QsciLexerBashKomentYCommentQsciLexerBatchDefaultDefaultQsciLexerBatchExtern pYkazExternal commandQsciLexerBatch*Skrt psmeno pYkazuHide command characterQsciLexerBatchKl ov slovoKeywordQsciLexerBatch NadpisLabelQsciLexerBatchOpertorOperatorQsciLexerBatchPromnnVariableQsciLexerBatchKomentYCommentQsciLexerCMakeDefaultDefaultQsciLexerCMake NadpisLabelQsciLexerCMake  sloNumberQsciLexerCMakePromnnVariableQsciLexerCMakeC komentY C comment QsciLexerCPPC++ komentY C++ comment QsciLexerCPPDefaultDefault QsciLexerCPP<String ve dvojitch uvozovkchDouble-quoted string QsciLexerCPP<Globln tYdy a definice typoGlobal classes and typedefs QsciLexerCPPIdentifiktor Identifier QsciLexerCPP*JavaDoc kl ov slovoJavaDoc keyword QsciLexerCPP6JavaDoc kl ov slovo chybyJavaDoc keyword error QsciLexerCPP0JavaDoc styl C komentYeJavaDoc style C comment QsciLexerCPP4JavaDoc styl C++ komentYeJavaDoc style C++ comment QsciLexerCPP2JavaSript regulrn vrazJavaScript regular expression QsciLexerCPPKl ov slovoKeyword QsciLexerCPP  sloNumber QsciLexerCPPOpertorOperator QsciLexerCPP"Pre-procesor blokPre-processor block QsciLexerCPPRSekundrn kl ov slova a identifiktory"Secondary keywords and identifiers QsciLexerCPP@String v jednoduchch uvozovkchSingle-quoted string QsciLexerCPP"NeuzavYen stringUnclosed string QsciLexerCPP@-pravidlo@-rule QsciLexerCSSAtribut Attribute QsciLexerCSSCSS1 vlastnost CSS1 property QsciLexerCSSCSS2 vlastnost CSS2 property QsciLexerCSS(CSS2 vlastnost {3 ?} CSS3 property QsciLexerCSSSelektor tYdyClass selector QsciLexerCSSDefaultDefault QsciLexerCSS<String ve dvojitch uvozovkchDouble-quoted string QsciLexerCSSID selektor ID selector QsciLexerCSSImportant Important QsciLexerCSSOpertorOperator QsciLexerCSSPseudotYda Pseudo-class QsciLexerCSS@String v jednoduchch uvozovkchSingle-quoted string QsciLexerCSSTagTag QsciLexerCSS,Nedefinovan vlastnostUnknown property QsciLexerCSS0Nedefinovan pseudotYdaUnknown pseudo-class QsciLexerCSSHodnotaValue QsciLexerCSSPromnnVariable QsciLexerCSSVerbatim stringQsciLexerCSharpDefaultDefaultQsciLexerCoffeeScript<String ve dvojitch uvozovkchDouble-quoted stringQsciLexerCoffeeScriptIdentifiktor IdentifierQsciLexerCoffeeScript*JavaDoc kl ov slovoJavaDoc keywordQsciLexerCoffeeScript6JavaDoc kl ov slovo chybyJavaDoc keyword errorQsciLexerCoffeeScriptKl ov slovoKeywordQsciLexerCoffeeScript  sloNumberQsciLexerCoffeeScriptOpertorOperatorQsciLexerCoffeeScript"Pre-procesor blokPre-processor blockQsciLexerCoffeeScriptRegulrn vrazRegular expressionQsciLexerCoffeeScriptRSekundrn kl ov slova a identifiktory"Secondary keywords and identifiersQsciLexerCoffeeScript@String v jednoduchch uvozovkchSingle-quoted stringQsciLexerCoffeeScript"NeuzavYen stringUnclosed stringQsciLexerCoffeeScriptZnak Character QsciLexerDDefaultDefault QsciLexerDIdentifiktor Identifier QsciLexerDKl ov slovoKeyword QsciLexerD*JednoYdkov komentY Line comment QsciLexerD  sloNumber QsciLexerDOpertorOperator QsciLexerD"NeuzavYen stringUnclosed string QsciLexerD.Definovno u~ivatelem 1User defined 1 QsciLexerD.Definovno u~ivatelem 2User defined 2 QsciLexerD.Definovno u~ivatelem 3User defined 3 QsciLexerDPYidan Ydka Added line QsciLexerDiff PYkazCommand QsciLexerDiffKomentYComment QsciLexerDiffDefaultDefault QsciLexerDiffHlavi kaHeader QsciLexerDiff PozicePosition QsciLexerDiffOdebran Ydka Removed line QsciLexerDiffKomentYCommentQsciLexerFortran77DefaultDefaultQsciLexerFortran77<String ve dvojitch uvozovkchDouble-quoted stringQsciLexerFortran77Identifiktor IdentifierQsciLexerFortran77Kl ov slovoKeywordQsciLexerFortran77 NadpisLabelQsciLexerFortran77  sloNumberQsciLexerFortran77OpertorOperatorQsciLexerFortran77"Pre-procesor blokPre-processor blockQsciLexerFortran77@String v jednoduchch uvozovkchSingle-quoted stringQsciLexerFortran77"NeuzavYen stringUnclosed stringQsciLexerFortran77.ASP JavaScript komentYASP JavaScript comment QsciLexerHTMLASP JavaScript default QsciLexerHTMLZASP JavaScript string ve dvojitch uvozovkch#ASP JavaScript double-quoted string QsciLexerHTML8ASP JavaScript kl ov slovoASP JavaScript keyword QsciLexerHTMLFASP JavaScript jednoYdkov komenYASP JavaScript line comment QsciLexerHTML(ASP JavaScript  sloASP JavaScript number QsciLexerHTML<ASP JavaScript regulrn vraz!ASP JavaScript regular expression QsciLexerHTMLPASP JavaScript v jednoduchch uvozovkch#ASP JavaScript single-quoted string QsciLexerHTMLASP JavaScript symbol QsciLexerHTML@ASP JavaScript neuzavYen stringASP JavaScript unclosed string QsciLexerHTML(ASP JavaScript slovoASP JavaScript word QsciLexerHTML,ASP Python jmno tYdyASP Python class name QsciLexerHTML&ASP Python komentYASP Python comment QsciLexerHTMLASP Python default QsciLexerHTMLRASP Python string ve dvojitch uvozovkchASP Python double-quoted string QsciLexerHTMLHASP Python jmno funkce nebo metody"ASP Python function or method name QsciLexerHTML0ASP Python identifiktorASP Python identifier QsciLexerHTML0ASP Python kl ov slovoASP Python keyword QsciLexerHTML ASP Python  sloASP Python number QsciLexerHTML&ASP Python opertorASP Python operator QsciLexerHTMLHASP Python v jednoduchch uvozovkchASP Python single-quoted string QsciLexerHTMLPASP Python ve tYech dvojitch uvozovkch&ASP Python triple double-quoted string QsciLexerHTMLVASP Python ve tYech jednoduchch uvozovkch&ASP Python triple single-quoted string QsciLexerHTML*ASP VBScript komentYASP VBScript comment QsciLexerHTMLASP VBScript default QsciLexerHTML4ASP VBScript identifiktorASP VBScript identifier QsciLexerHTML4ASP VBScript kl ov slovoASP VBScript keyword QsciLexerHTML$ASP VBScript  sloASP VBScript number QsciLexerHTMLASP VBScript string QsciLexerHTML<ASP VBScript neuzavYen stringASP VBScript unclosed string QsciLexerHTML&ASP X-Code komentYASP X-Code comment QsciLexerHTMLAtribut Attribute QsciLexerHTMLCDATA QsciLexerHTMLKonec tagu End of a tag QsciLexerHTMLKonec XML  stiEnd of an XML fragment QsciLexerHTML EntitaEntity QsciLexerHTMLNKomentY prvnho parametru SGML pYkazu*First parameter comment of an SGML command QsciLexerHTML:Prvn parametr v SGML pYkazu"First parameter of an SGML command QsciLexerHTMLHTML komentY HTML comment QsciLexerHTML HTML default QsciLexerHTMLBHTML string ve dojtch uvozovkchHTML double-quoted string QsciLexerHTMLHTML  slo HTML number QsciLexerHTMLJHTML string v jednoduchch uvozovkchHTML single-quoted string QsciLexerHTMLHJavaDoc styl ASP JavaScript komentY$JavaDoc style ASP JavaScript comment QsciLexerHTMLBJavaDoc styl JavaScript komentYe JavaDoc style JavaScript comment QsciLexerHTML&JavaScript komentYJavaScript comment QsciLexerHTMLJavaScript default QsciLexerHTMLPJavaSript string ve dvojitch uvozovkchJavaScript double-quoted string QsciLexerHTML.JavaSript kl ov slovoJavaScript keyword QsciLexerHTML@JavaScript jednoYdkov komentYJavaScript line comment QsciLexerHTML JavaScript  sloJavaScript number QsciLexerHTML2JavaSript regulrn vrazJavaScript regular expression QsciLexerHTMLTJavaSript string v jednoduchch uvozovkchJavaScript single-quoted string QsciLexerHTMLJavaScript symbol QsciLexerHTML6JavaSript neuzavYen stringJavaScript unclosed string QsciLexerHTMLJavaSript slovoJavaScript word QsciLexerHTML"Dala text v taguOther text in a tag QsciLexerHTMLPHP komentY PHP comment QsciLexerHTML PHP default QsciLexerHTMLDPHP string ve dvojitch uvozovkchPHP double-quoted string QsciLexerHTMLHPHP promnn ve dvojitch uvozovkchPHP double-quoted variable QsciLexerHTML"PHP kl ov slovo PHP keyword QsciLexerHTML2PHP jednoYdkov komentYPHP line comment QsciLexerHTMLPHP  slo PHP number QsciLexerHTMLPHP opertor PHP operator QsciLexerHTML:PHP v jednoduchch uvozovkchPHP single-quoted string QsciLexerHTMLPHP promnn PHP variable QsciLexerHTML$Python jmno tYdyPython class name QsciLexerHTMLPython komentYPython comment QsciLexerHTMLPython default QsciLexerHTMLFPython string ve dojtch uvozovkchPython double-quoted string QsciLexerHTML>Python jmno funkce nebo metodyPython function or method name QsciLexerHTML(Python identifiktorPython identifier QsciLexerHTML(Python kl ov slovoPython keyword QsciLexerHTMLPython  slo Python number QsciLexerHTMLPython opertorPython operator QsciLexerHTMLNPython string v jednoduchch uvozovkchPython single-quoted string QsciLexerHTMLVPython string ve tYech dvojitch uvozovkch"Python triple double-quoted string QsciLexerHTMLNPython ve tYech jednoduchch uvozovkch"Python triple single-quoted string QsciLexerHTML&SGML defaultn blokSGML block default QsciLexerHTMLSGML pYkaz SGML command QsciLexerHTMLSGML komentY SGML comment QsciLexerHTML SGML default QsciLexerHTMLFSGML string ve dvojitch uvozovkchSGML double-quoted string QsciLexerHTMLSGML chyba SGML error QsciLexerHTMLJSGML string v jednoduchch uvozovkchSGML single-quoted string QsciLexerHTML*SGML speciln entitaSGML special entity QsciLexerHTMLTag skriptu Script tag QsciLexerHTML.Za tek JavaScript kduStart of a JavaScript fragment QsciLexerHTML Za tek PHP kduStart of a PHP fragment QsciLexerHTML&Za tek Python kduStart of a Python fragment QsciLexerHTML*Za tek VBScript kduStart of a VBScript fragment QsciLexerHTML6Za tek ASP JavaScript kdu#Start of an ASP JavaScript fragment QsciLexerHTML.Za tek ASP Python kduStart of an ASP Python fragment QsciLexerHTML2Za tek ASP VBScript kdu!Start of an ASP VBScript fragment QsciLexerHTML Za tek ASP kduStart of an ASP fragment QsciLexerHTML(Za tek ASP kdu s @Start of an ASP fragment with @ QsciLexerHTML"Za tek XML  stiStart of an XML fragment QsciLexerHTMLTag QsciLexerHTML(Nedefinovan atributUnknown attribute QsciLexerHTML Nedefinovan tag Unknown tag QsciLexerHTML2HTML hodnota bez uvozovekUnquoted HTML value QsciLexerHTML"VBScript komentYVBScript comment QsciLexerHTMLVBScript default QsciLexerHTML,VBScript identifiktorVBScript identifier QsciLexerHTML,VBScript kl ov slovoVBScript keyword QsciLexerHTMLVBScript  sloVBScript number QsciLexerHTMLVBScript string QsciLexerHTML4VBScript neuzavYen stringVBScript unclosed string QsciLexerHTMLUUID QsciLexerIDLDefaultDefault QsciLexerJSON*JednoYdkov komentY Line comment QsciLexerJSON  sloNumber QsciLexerJSONOpertorOperator QsciLexerJSON"NeuzavYen stringUnclosed string QsciLexerJSONRegulrn vrazRegular expressionQsciLexerJavaScriptZkladn funkceBasic functions QsciLexerLuaZnak Character QsciLexerLuaKomentYComment QsciLexerLua%Coroutines, i/o and system facilities QsciLexerLuaDefault QsciLexerLuaIdentifiktor Identifier QsciLexerLuaKl ov slovoKeyword QsciLexerLua NadpisLabel QsciLexerLua*JednoYdkov komentY Line comment QsciLexerLuaLiteral string QsciLexerLua  sloNumber QsciLexerLuaOpertorOperator QsciLexerLua Preprocessor QsciLexerLuaString QsciLexerLuaHString, tabulka a matematick funkce!String, table and maths functions QsciLexerLua"NeuzavYen stringUnclosed string QsciLexerLua.Definovno u~ivatelem 1User defined 1 QsciLexerLua.Definovno u~ivatelem 2User defined 2 QsciLexerLua.Definovno u~ivatelem 3User defined 3 QsciLexerLua.Definovno u~ivatelem 4User defined 4 QsciLexerLuaKomentYCommentQsciLexerMakefileDefaultQsciLexerMakefile ChybaErrorQsciLexerMakefileOpertorOperatorQsciLexerMakefile PreprocessorQsciLexerMakefileClTargetQsciLexerMakefilePromnnVariableQsciLexerMakefileDefaultDefaultQsciLexerMarkdown PYkazCommandQsciLexerMatlabKomentYCommentQsciLexerMatlabDefaultDefaultQsciLexerMatlab<String ve dvojitch uvozovkchDouble-quoted stringQsciLexerMatlabIdentifiktor IdentifierQsciLexerMatlabKl ov slovoKeywordQsciLexerMatlab  sloNumberQsciLexerMatlabOpertorOperatorQsciLexerMatlab@String v jednoduchch uvozovkchSingle-quoted stringQsciLexerMatlabKomentYComment QsciLexerPODefaultDefault QsciLexerPO Bad directive QsciLexerPOVKomentYComment QsciLexerPOV*JednoYdkov komentY Comment line QsciLexerPOVDefault QsciLexerPOVDirektiva Directive QsciLexerPOVIdentifiktor Identifier QsciLexerPOV  sloNumber QsciLexerPOVObjects, CSG and appearance QsciLexerPOVOpertorOperator QsciLexerPOVPredefined functions QsciLexerPOVPredefined identifiers QsciLexerPOVString QsciLexerPOVTypes, modifiers and items QsciLexerPOV"NeuzavYen stringUnclosed string QsciLexerPOVUser defined 1 QsciLexerPOVUser defined 2 QsciLexerPOVUser defined 3 QsciLexerPOVZnak CharacterQsciLexerPascalDefaultDefaultQsciLexerPascalIdentifiktor IdentifierQsciLexerPascalKl ov slovoKeywordQsciLexerPascal*JednoYdkov komentY Line commentQsciLexerPascal  sloNumberQsciLexerPascalOpertorOperatorQsciLexerPascal@String v jednoduchch uvozovkchSingle-quoted stringQsciLexerPascal"NeuzavYen stringUnclosed stringQsciLexerPascalPoleArray QsciLexerPerlBacktick here document QsciLexerPerl Backticks QsciLexerPerlKomentYComment QsciLexerPerl Data section QsciLexerPerlDefault QsciLexerPerlNZde je dokument ve dvojitch uvozovkchDouble-quoted here document QsciLexerPerl<String ve dvojitch uvozovkchDouble-quoted string QsciLexerPerl ChybaError QsciLexerPerlHash QsciLexerPerl4Zde je oddlova dokumentuHere document delimiter QsciLexerPerlIdentifiktor Identifier QsciLexerPerlKl ov slovoKeyword QsciLexerPerl  sloNumber QsciLexerPerlOpertorOperator QsciLexerPerlPOD QsciLexerPerl POD verbatim QsciLexerPerlQuoted string (q) QsciLexerPerlQuoted string (qq) QsciLexerPerlQuoted string (qr) QsciLexerPerlQuoted string (qw) QsciLexerPerlQuoted string (qx) QsciLexerPerlRegulrn vrazRegular expression QsciLexerPerl SkalrScalar QsciLexerPerlRZde je dokument v jednoduchch uvozovkchSingle-quoted here document QsciLexerPerl@String v jednoduchch uvozovkchSingle-quoted string QsciLexerPerl Substitution QsciLexerPerl Symbol table QsciLexerPerlKomentYCommentQsciLexerPostScriptDefaultDefaultQsciLexerPostScriptKl ov slovoKeywordQsciLexerPostScript  sloNumberQsciLexerPostScript AssignmentQsciLexerPropertiesCommentQsciLexerPropertiesDefaultQsciLexerProperties Default valueQsciLexerPropertiesSectionQsciLexerPropertiesJmno tYdy Class nameQsciLexerPythonKomentYCommentQsciLexerPythonBlok komentYe Comment blockQsciLexerPythonDekortor DecoratorQsciLexerPythonDefaultQsciLexerPython<String ve dvojitch uvozovkchDouble-quoted stringQsciLexerPython0Jmno funkce nebo metodyFunction or method nameQsciLexerPython0Zvraznn identifiktorHighlighted identifierQsciLexerPythonIdentifiktor IdentifierQsciLexerPythonKl ov slovoKeywordQsciLexerPython  sloNumberQsciLexerPythonOpertorOperatorQsciLexerPython@String v jednoduchch uvozovkchSingle-quoted stringQsciLexerPythonHString ve tYech dvojitch uvozovkchTriple double-quoted stringQsciLexerPythonNString ve tYech jednoduchch uvozovkchTriple single-quoted stringQsciLexerPython"NeuzavYen stringUnclosed stringQsciLexerPython %Q string QsciLexerRuby %q string QsciLexerRuby %r string QsciLexerRuby %w string QsciLexerRuby %x string QsciLexerRuby Backticks QsciLexerRubyJmno tYdy Class name QsciLexerRubyPromnn tYdyClass variable QsciLexerRubyKomentYComment QsciLexerRubyDatov sekce Data section QsciLexerRubyDefault QsciLexerRubyDemoted keyword QsciLexerRuby<String ve dvojitch uvozovkchDouble-quoted string QsciLexerRuby ChybaError QsciLexerRuby0Jmno funkce nebo metodyFunction or method name QsciLexerRubyGlobal QsciLexerRubyZde je dokument Here document QsciLexerRuby4Zde je oddlova dokumentuHere document delimiter QsciLexerRubyIdentifiktor Identifier QsciLexerRuby"Promnn instanceInstance variable QsciLexerRubyKl ov slovoKeyword QsciLexerRubyJmno modulu Module name QsciLexerRuby  sloNumber QsciLexerRubyOpertorOperator QsciLexerRubyPODPOD QsciLexerRubyRegulrn vrazRegular expression QsciLexerRuby@String v jednoduchch uvozovkchSingle-quoted string QsciLexerRubySymbol QsciLexerRubystderr QsciLexerRubystdin QsciLexerRubystdout QsciLexerRuby.# jednoYdkov komentY# comment line QsciLexerSQLKomentYComment QsciLexerSQL*JednoYdkov komentY Comment line QsciLexerSQLDefault QsciLexerSQL<String ve dvojitch uvozovkchDouble-quoted string QsciLexerSQLIdentifiktor Identifier QsciLexerSQL*JavaDoc kl ov slovoJavaDoc keyword QsciLexerSQL6JavaDoc kl ov slovo chybyJavaDoc keyword error QsciLexerSQL*JavaDoc styl komentYJavaDoc style comment QsciLexerSQLKl ov slovoKeyword QsciLexerSQL  sloNumber QsciLexerSQLOpertorOperator QsciLexerSQL"SQL*Plus komentYSQL*Plus comment QsciLexerSQL,SQL*Plus kl ov slovoSQL*Plus keyword QsciLexerSQLSQL*Plus prompt QsciLexerSQL@String v jednoduchch uvozovkchSingle-quoted string QsciLexerSQL.Definovno u~ivatelem 1User defined 1 QsciLexerSQL.Definovno u~ivatelem 2User defined 2 QsciLexerSQL.Definovno u~ivatelem 3User defined 3 QsciLexerSQL.Definovno u~ivatelem 4User defined 4 QsciLexerSQL PYkazCommandQsciLexerSpiceKomentYCommentQsciLexerSpiceDefaultDefaultQsciLexerSpiceIdentifiktor IdentifierQsciLexerSpice  sloNumberQsciLexerSpiceHodnotaValueQsciLexerSpiceKomentYComment QsciLexerTCLBlok komentYe Comment block QsciLexerTCL*JednoYdkov komentY Comment line QsciLexerTCLDefaultDefault QsciLexerTCLIdentifiktor Identifier QsciLexerTCL  sloNumber QsciLexerTCLOpertorOperator QsciLexerTCL.Definovno u~ivatelem 1User defined 1 QsciLexerTCL.Definovno u~ivatelem 2User defined 2 QsciLexerTCL.Definovno u~ivatelem 3User defined 3 QsciLexerTCL.Definovno u~ivatelem 4User defined 4 QsciLexerTCL PYkazCommand QsciLexerTeXDefault QsciLexerTeXSkupinaGroup QsciLexerTeXSpecial QsciLexerTeXSymbol QsciLexerTeXText QsciLexerTeXAtribut Attribute QsciLexerVHDLKomentYComment QsciLexerVHDLBlok komentYe Comment block QsciLexerVHDL*JednoYdkov komentY Comment line QsciLexerVHDLDefaultDefault QsciLexerVHDLIdentifiktor Identifier QsciLexerVHDLKl ov slovoKeyword QsciLexerVHDL  sloNumber QsciLexerVHDLOpertorOperator QsciLexerVHDL"NeuzavYen stringUnclosed string QsciLexerVHDLKomentYCommentQsciLexerVerilogDefaultDefaultQsciLexerVerilogIdentifiktor IdentifierQsciLexerVerilog*JednoYdkov komentY Line commentQsciLexerVerilog  sloNumberQsciLexerVerilogOpertorOperatorQsciLexerVerilogRSekundrn kl ov slova a identifiktory"Secondary keywords and identifiersQsciLexerVerilog"NeuzavYen stringUnclosed stringQsciLexerVerilogKomentYComment QsciLexerYAMLDefaultDefault QsciLexerYAMLIdentifiktor Identifier QsciLexerYAMLKl ov slovoKeyword QsciLexerYAML  sloNumber QsciLexerYAMLOpertorOperator QsciLexerYAMLsqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_cs.ts000066400000000000000000004342311345112435200240500ustar00rootroot00000000000000 QsciCommand Move down one line Posun o jednu řádku dolů Extend selection down one line Rozšířit výběr o jednu řádku dolů Scroll view down one line Rolovat pohled o jednu řádku dolů Extend rectangular selection down one line Rozšířit obdélníkový výběr o jednu řádku dolů Move up one line Posun o jednu řádku nahoru Extend selection up one line Rozšířit výběr o jednu řádku nahoru Scroll view up one line Rolovat pohled o jednu řádku nahoru Extend rectangular selection up one line Rozšířit obdélníkový výběr o jednu řádku nahoru Move up one paragraph Posun o jeden odstavec nahoru Extend selection up one paragraph Rozšířit výběr o jeden odstavec nahoru Move down one paragraph Posun o jeden odstavec dolů Scroll to start of document Scroll to end of document Scroll vertically to centre current line Extend selection down one paragraph Rozšířit výběr o jeden odstavec dolů Move left one character Posun o jedno písmeno doleva Extend selection left one character Rozšířit výběr o jedno písmeno doleva Move left one word Posun o jedno slovo vlevo Extend selection left one word Rozšířit výběr o jedno slovo doleva Extend rectangular selection left one character Rozšířit obdélníkový výběr o jedno písmeno doleva Move right one character Posun o jedno písmeno doprava Extend selection right one character Rozšířit výběr o jedno písmeno doprava Move right one word Posun o jedno slovo doprava Extend selection right one word Rozšířit výběr o jedno slovo doprava Extend rectangular selection right one character Rozšířit obdélníkový výběr o jedno písmeno doprava Move to end of previous word Extend selection to end of previous word Move to end of next word Extend selection to end of next word Move left one word part Posun o část slova doleva Extend selection left one word part Rozšířit výběr o část slova doleva Move right one word part Posun o část slova doprava Extend selection right one word part Rozšířit výběr o část slova doprava Move up one page Posun na předchozí stranu Extend selection up one page Rozšířit výběr na předchozí stranu Extend rectangular selection up one page Rozšířit obdélníkový výběr na předchozí stranu Move down one page Posun na další stranu Extend selection down one page Rozšířit výběr na další stranu Extend rectangular selection down one page Rozšířit obdélníkový výběr na další stranu Delete current character Smazat aktuální znak Cut selection Vyjmout výběr Delete word to right Smazat slovo doprava Move to start of document line Extend selection to start of document line Extend rectangular selection to start of document line Move to start of display line Extend selection to start of display line Move to start of display or document line Extend selection to start of display or document line Move to first visible character in document line Extend selection to first visible character in document line Extend rectangular selection to first visible character in document line Move to first visible character of display in document line Extend selection to first visible character in display or document line Move to end of document line Extend selection to end of document line Extend rectangular selection to end of document line Move to end of display line Extend selection to end of display line Move to end of display or document line Extend selection to end of display or document line Move to start of document Extend selection to start of document Move to end of document Extend selection to end of document Stuttered move up one page Stuttered extend selection up one page Stuttered move down one page Stuttered extend selection down one page Delete previous character if not at start of line Delete right to end of next word Delete line to right Smazat řádku doprava Transpose current and previous lines Duplicate the current line Select all Select document Move selected lines up one line Move selected lines down one line Toggle insert/overtype Přepnout vkládání/přepisování Paste Vložit Copy selection Kopírovat výběr Insert newline De-indent one level Cancel Zrušit Delete previous character Smazat předchozí znak Delete word to left Smazat slovo doleva Delete line to left Smazat řádku doleva Undo last command Redo last command Znovu použít poslední příkaz Indent one level Odsadit o jednu úroveň Zoom in Zvětšit Zoom out Zmenšit Formfeed Vysunout Cut current line Vyjmout aktuální řádku Delete current line Smazat aktuální řádku Copy current line Kopírovat aktuální řádku Convert selection to lower case Vybraný text převést na malá písmena Convert selection to upper case Vybraný text převést na velká písmena Duplicate selection Duplikovat výběr QsciLexerAVS Default Default Block comment Nested block comment Line comment Jednořádkový komentář Number Číslo Operator Operátor Identifier Identifikátor Double-quoted string String ve dvojitých uvozovkách Triple double-quoted string String ve třech dvojitých uvozovkách Keyword Klíčové slovo Filter Plugin Function Clip property User defined QsciLexerBash Default Default Error Chyba Comment Komentář Number Číslo Keyword Klíčové slovo Double-quoted string String ve dvojitých uvozovkách Single-quoted string String v jednoduchých uvozovkách Operator Operátor Identifier Identifikátor Scalar Skalár Parameter expansion Rozklad parametru Backticks Zpětný chod Here document delimiter Zde je oddělovač dokumentu Single-quoted here document Jednoduché uvozovky zde v dokumentu QsciLexerBatch Default Default Comment Komentář Keyword Klíčové slovo Label Nadpis Hide command character Skrýt písmeno příkazu External command Externí příkaz Variable Proměnná Operator Operátor QsciLexerCMake Default Default Comment Komentář String Left quoted string Right quoted string Function Variable Proměnná Label Nadpis User defined WHILE block FOREACH block IF block MACRO block Variable within a string Number Číslo QsciLexerCPP Default Default Inactive default C comment C komentář Inactive C comment C++ comment C++ komentář Inactive C++ comment JavaDoc style C comment JavaDoc styl C komentáře Inactive JavaDoc style C comment Number Číslo Inactive number Keyword Klíčové slovo Inactive keyword Double-quoted string String ve dvojitých uvozovkách Inactive double-quoted string Single-quoted string String v jednoduchých uvozovkách Inactive single-quoted string IDL UUID Inactive IDL UUID Pre-processor block Pre-procesor blok Inactive pre-processor block Operator Operátor Inactive operator Identifier Identifikátor Inactive identifier Unclosed string Neuzavřený string Inactive unclosed string C# verbatim string Inactive C# verbatim string JavaScript regular expression JavaSript regulární výraz Inactive JavaScript regular expression JavaDoc style C++ comment JavaDoc styl C++ komentáře Inactive JavaDoc style C++ comment Secondary keywords and identifiers Sekundární klíčová slova a identifikátory Inactive secondary keywords and identifiers JavaDoc keyword JavaDoc klíčové slovo Inactive JavaDoc keyword JavaDoc keyword error JavaDoc klíčové slovo chyby Inactive JavaDoc keyword error Global classes and typedefs Globální třídy a definice typů Inactive global classes and typedefs C++ raw string Inactive C++ raw string Vala triple-quoted verbatim string Inactive Vala triple-quoted verbatim string Pike hash-quoted string Inactive Pike hash-quoted string Pre-processor C comment Inactive pre-processor C comment JavaDoc style pre-processor comment Inactive JavaDoc style pre-processor comment User-defined literal Inactive user-defined literal Task marker Inactive task marker Escape sequence Inactive escape sequence QsciLexerCSS Default Default Tag Tag Class selector Selektor třídy Pseudo-class Pseudotřída Unknown pseudo-class Nedefinovaná pseudotřída Operator Operátor CSS1 property CSS1 vlastnost Unknown property Nedefinovaná vlastnost Value Hodnota ID selector ID selektor Important Important @-rule @-pravidlo Double-quoted string String ve dvojitých uvozovkách Single-quoted string String v jednoduchých uvozovkách CSS2 property CSS2 vlastnost Attribute Atribut CSS3 property CSS2 vlastnost {3 ?} Pseudo-element Extended CSS property Extended pseudo-class Extended pseudo-element Media rule Variable Proměnná QsciLexerCSharp Verbatim string QsciLexerCoffeeScript Default Default C-style comment C++-style comment JavaDoc C-style comment Number Číslo Keyword Klíčové slovo Double-quoted string String ve dvojitých uvozovkách Single-quoted string String v jednoduchých uvozovkách IDL UUID Pre-processor block Pre-procesor blok Operator Operátor Identifier Identifikátor Unclosed string Neuzavřený string C# verbatim string Regular expression Regulární výraz JavaDoc C++-style comment Secondary keywords and identifiers Sekundární klíčová slova a identifikátory JavaDoc keyword JavaDoc klíčové slovo JavaDoc keyword error JavaDoc klíčové slovo chyby Global classes Block comment Block regular expression Block regular expression comment Instance property QsciLexerD Default Default Block comment Line comment Jednořádkový komentář DDoc style block comment Nesting comment Number Číslo Keyword Klíčové slovo Secondary keyword Documentation keyword Type definition String Unclosed string Neuzavřený string Character Znak Operator Operátor Identifier Identifikátor DDoc style line comment DDoc keyword DDoc keyword error Backquoted string Raw string User defined 1 Definováno uživatelem 1 User defined 2 Definováno uživatelem 2 User defined 3 Definováno uživatelem 3 QsciLexerDiff Default Default Comment Komentář Command Příkaz Header Hlavička Position Pozice Removed line Odebraná řádka Added line Přidaná řádka Changed line QsciLexerFortran77 Default Default Comment Komentář Number Číslo Single-quoted string String v jednoduchých uvozovkách Double-quoted string String ve dvojitých uvozovkách Unclosed string Neuzavřený string Operator Operátor Identifier Identifikátor Keyword Klíčové slovo Intrinsic function Extended function Pre-processor block Pre-procesor blok Dotted operator Label Nadpis Continuation QsciLexerHTML HTML default Tag Unknown tag Nedefinovaný tag Attribute Atribut Unknown attribute Nedefinovaný atribut HTML number HTML číslo HTML double-quoted string HTML string ve dojtých uvozovkách HTML single-quoted string HTML string v jednoduchých uvozovkách Other text in a tag Další text v tagu HTML comment HTML komentář Entity Entita End of a tag Konec tagu Start of an XML fragment Začátek XML části End of an XML fragment Konec XML části Script tag Tag skriptu Start of an ASP fragment with @ Začátek ASP kódu s @ Start of an ASP fragment Začátek ASP kódu CDATA Start of a PHP fragment Začátek PHP kódu Unquoted HTML value HTML hodnota bez uvozovek ASP X-Code comment ASP X-Code komentář SGML default SGML command SGML příkaz First parameter of an SGML command První parametr v SGML příkazu SGML double-quoted string SGML string ve dvojitých uvozovkách SGML single-quoted string SGML string v jednoduchých uvozovkách SGML error SGML chyba SGML special entity SGML speciální entita SGML comment SGML komentář First parameter comment of an SGML command Komentář prvního parametru SGML příkazu SGML block default SGML defaultní blok Start of a JavaScript fragment Začátek JavaScript kódu JavaScript default JavaScript comment JavaScript komentář JavaScript line comment JavaScript jednořádkový komentář JavaDoc style JavaScript comment JavaDoc styl JavaScript komentáře JavaScript number JavaScript číslo JavaScript word JavaSript slovo JavaScript keyword JavaSript klíčové slovo JavaScript double-quoted string JavaSript string ve dvojitých uvozovkách JavaScript single-quoted string JavaSript string v jednoduchých uvozovkách JavaScript symbol JavaScript unclosed string JavaSript neuzavřený string JavaScript regular expression JavaSript regulární výraz Start of an ASP JavaScript fragment Začátek ASP JavaScript kódu ASP JavaScript default ASP JavaScript comment ASP JavaScript komentář ASP JavaScript line comment ASP JavaScript jednořádkový komenář JavaDoc style ASP JavaScript comment JavaDoc styl ASP JavaScript komentář ASP JavaScript number ASP JavaScript číslo ASP JavaScript word ASP JavaScript slovo ASP JavaScript keyword ASP JavaScript klíčové slovo ASP JavaScript double-quoted string ASP JavaScript string ve dvojitých uvozovkách ASP JavaScript single-quoted string ASP JavaScript v jednoduchých uvozovkách ASP JavaScript symbol ASP JavaScript unclosed string ASP JavaScript neuzavřený string ASP JavaScript regular expression ASP JavaScript regulární výraz Start of a VBScript fragment Začátek VBScript kódu VBScript default VBScript comment VBScript komentář VBScript number VBScript číslo VBScript keyword VBScript klíčové slovo VBScript string VBScript identifier VBScript identifikátor VBScript unclosed string VBScript neuzavřený string Start of an ASP VBScript fragment Začátek ASP VBScript kódu ASP VBScript default ASP VBScript comment ASP VBScript komentář ASP VBScript number ASP VBScript číslo ASP VBScript keyword ASP VBScript klíčové slovo ASP VBScript string ASP VBScript identifier ASP VBScript identifikátor ASP VBScript unclosed string ASP VBScript neuzavřený string Start of a Python fragment Začátek Python kódu Python default Python comment Python komentář Python number Python číslo Python double-quoted string Python string ve dojtých uvozovkách Python single-quoted string Python string v jednoduchých uvozovkách Python keyword Python klíčové slovo Python triple double-quoted string Python string ve třech dvojitých uvozovkách Python triple single-quoted string Python ve třech jednoduchých uvozovkách Python class name Python jméno třídy Python function or method name Python jméno funkce nebo metody Python operator Python operátor Python identifier Python identifikátor Start of an ASP Python fragment Začátek ASP Python kódu ASP Python default ASP Python comment ASP Python komentář ASP Python number ASP Python číslo ASP Python double-quoted string ASP Python string ve dvojitých uvozovkách ASP Python single-quoted string ASP Python v jednoduchých uvozovkách ASP Python keyword ASP Python klíčové slovo ASP Python triple double-quoted string ASP Python ve třech dvojitých uvozovkách ASP Python triple single-quoted string ASP Python ve třech jednoduchých uvozovkách ASP Python class name ASP Python jméno třídy ASP Python function or method name ASP Python jméno funkce nebo metody ASP Python operator ASP Python operátor ASP Python identifier ASP Python identifikátor PHP default PHP double-quoted string PHP string ve dvojitých uvozovkách PHP single-quoted string PHP v jednoduchých uvozovkách PHP keyword PHP klíčové slovo PHP number PHP číslo PHP variable PHP proměnná PHP comment PHP komentář PHP line comment PHP jednořádkový komentář PHP double-quoted variable PHP proměnná ve dvojitých uvozovkách PHP operator PHP operátor QsciLexerIDL UUID QsciLexerJSON Default Default Number Číslo String Unclosed string Neuzavřený string Property Escape sequence Line comment Jednořádkový komentář Block comment Operator Operátor IRI JSON-LD compact IRI JSON keyword JSON-LD keyword Parsing error QsciLexerJavaScript Regular expression Regulární výraz QsciLexerLua Default Comment Komentář Line comment Jednořádkový komentář Number Číslo Keyword Klíčové slovo String Character Znak Literal string Preprocessor Operator Operátor Identifier Identifikátor Unclosed string Neuzavřený string Basic functions Základní funkce String, table and maths functions String, tabulka a matematické funkce Coroutines, i/o and system facilities User defined 1 Definováno uživatelem 1 User defined 2 Definováno uživatelem 2 User defined 3 Definováno uživatelem 3 User defined 4 Definováno uživatelem 4 Label Nadpis QsciLexerMakefile Default Comment Komentář Preprocessor Variable Proměnná Operator Operátor Target Cíl Error Chyba QsciLexerMarkdown Default Default Special Strong emphasis using double asterisks Strong emphasis using double underscores Emphasis using single asterisks Emphasis using single underscores Level 1 header Level 2 header Level 3 header Level 4 header Level 5 header Level 6 header Pre-char Unordered list item Ordered list item Block quote Strike out Horizontal rule Link Code between backticks Code between double backticks Code block QsciLexerMatlab Default Default Comment Komentář Command Příkaz Number Číslo Keyword Klíčové slovo Single-quoted string String v jednoduchých uvozovkách Operator Operátor Identifier Identifikátor Double-quoted string String ve dvojitých uvozovkách QsciLexerPO Default Default Comment Komentář Message identifier Message identifier text Message string Message string text Message context Message context text Fuzzy flag Programmer comment Reference Flags Message identifier text end-of-line Message string text end-of-line Message context text end-of-line QsciLexerPOV Default Comment Komentář Comment line Jednořádkový komentář Number Číslo Operator Operátor Identifier Identifikátor String Unclosed string Neuzavřený string Directive Direktiva Bad directive Objects, CSG and appearance Types, modifiers and items Predefined identifiers Predefined functions User defined 1 User defined 2 User defined 3 QsciLexerPascal Default Default Line comment Jednořádkový komentář Number Číslo Keyword Klíčové slovo Single-quoted string String v jednoduchých uvozovkách Operator Operátor Identifier Identifikátor '{ ... }' style comment '(* ... *)' style comment '{$ ... }' style pre-processor block '(*$ ... *)' style pre-processor block Hexadecimal number Unclosed string Neuzavřený string Character Znak Inline asm QsciLexerPerl Default Error Chyba Comment Komentář POD Number Číslo Keyword Klíčové slovo Double-quoted string String ve dvojitých uvozovkách Single-quoted string String v jednoduchých uvozovkách Operator Operátor Identifier Identifikátor Scalar Skalár Array Pole Hash Symbol table Regular expression Regulární výraz Substitution Backticks Data section Here document delimiter Zde je oddělovač dokumentu Single-quoted here document Zde je dokument v jednoduchých uvozovkách Double-quoted here document Zde je dokument ve dvojitých uvozovkách Backtick here document Quoted string (q) Quoted string (qq) Quoted string (qx) Quoted string (qr) Quoted string (qw) POD verbatim Subroutine prototype Format identifier Format body Double-quoted string (interpolated variable) Translation Regular expression (interpolated variable) Substitution (interpolated variable) Backticks (interpolated variable) Double-quoted here document (interpolated variable) Backtick here document (interpolated variable) Quoted string (qq, interpolated variable) Quoted string (qx, interpolated variable) Quoted string (qr, interpolated variable) QsciLexerPostScript Default Default Comment Komentář DSC comment DSC comment value Number Číslo Name Keyword Klíčové slovo Literal Immediately evaluated literal Array parenthesis Dictionary parenthesis Procedure parenthesis Text Hexadecimal string Base85 string Bad string character QsciLexerProperties Default Comment Section Assignment Default value Key QsciLexerPython Default Comment Komentář Number Číslo Double-quoted string String ve dvojitých uvozovkách Single-quoted string String v jednoduchých uvozovkách Keyword Klíčové slovo Triple single-quoted string String ve třech jednoduchých uvozovkách Triple double-quoted string String ve třech dvojitých uvozovkách Class name Jméno třídy Function or method name Jméno funkce nebo metody Operator Operátor Identifier Identifikátor Comment block Blok komentáře Unclosed string Neuzavřený string Highlighted identifier Zvýrazněný identifikátor Decorator Dekorátor QsciLexerRuby Default Comment Komentář Number Číslo Double-quoted string String ve dvojitých uvozovkách Single-quoted string String v jednoduchých uvozovkách Keyword Klíčové slovo Class name Jméno třídy Function or method name Jméno funkce nebo metody Operator Operátor Identifier Identifikátor Error Chyba POD POD Regular expression Regulární výraz Global Symbol Module name Jméno modulu Instance variable Proměnná instance Class variable Proměnná třídy Backticks Data section Datová sekce Here document delimiter Zde je oddělovač dokumentu Here document Zde je dokument %q string %Q string %x string %r string %w string Demoted keyword stdin stdout stderr QsciLexerSQL Default Comment Komentář Number Číslo Keyword Klíčové slovo Single-quoted string String v jednoduchých uvozovkách Operator Operátor Identifier Identifikátor Comment line Jednořádkový komentář JavaDoc style comment JavaDoc styl komentář Double-quoted string String ve dvojitých uvozovkách SQL*Plus keyword SQL*Plus klíčové slovo SQL*Plus prompt SQL*Plus comment SQL*Plus komentář # comment line # jednořádkový komentář JavaDoc keyword JavaDoc klíčové slovo JavaDoc keyword error JavaDoc klíčové slovo chyby User defined 1 Definováno uživatelem 1 User defined 2 Definováno uživatelem 2 User defined 3 Definováno uživatelem 3 User defined 4 Definováno uživatelem 4 Quoted identifier Quoted operator QsciLexerSpice Default Default Identifier Identifikátor Command Příkaz Function Parameter Number Číslo Delimiter Value Hodnota Comment Komentář QsciLexerTCL Default Default Comment Komentář Comment line Jednořádkový komentář Number Číslo Quoted keyword Quoted string Operator Operátor Identifier Identifikátor Substitution Brace substitution Modifier Expand keyword TCL keyword Tk keyword iTCL keyword Tk command User defined 1 Definováno uživatelem 1 User defined 2 Definováno uživatelem 2 User defined 3 Definováno uživatelem 3 User defined 4 Definováno uživatelem 4 Comment box Comment block Blok komentáře QsciLexerTeX Default Special Group Skupina Symbol Command Příkaz Text QsciLexerVHDL Default Default Comment Komentář Comment line Jednořádkový komentář Number Číslo String Operator Operátor Identifier Identifikátor Unclosed string Neuzavřený string Keyword Klíčové slovo Standard operator Attribute Atribut Standard function Standard package Standard type User defined Comment block Blok komentáře QsciLexerVerilog Default Default Comment Komentář Line comment Jednořádkový komentář Bang comment Number Číslo Primary keywords and identifiers String Secondary keywords and identifiers Sekundární klíčová slova a identifikátory System task Preprocessor block Operator Operátor Identifier Identifikátor Unclosed string Neuzavřený string User defined tasks and identifiers Keyword comment Inactive keyword comment Input port declaration Inactive input port declaration Output port declaration Inactive output port declaration Input/output port declaration Inactive input/output port declaration Port connection Inactive port connection QsciLexerYAML Default Default Comment Komentář Identifier Identifikátor Keyword Klíčové slovo Number Číslo Reference Document delimiter Text block marker Syntax error marker Operator Operátor QsciScintilla &Undo &Redo Cu&t &Copy &Paste Delete Select All sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_de.qm000066400000000000000000002247521345112435200240270ustar00rootroot00000000000000HVEq|f4~u ڴ2/(ۅH%MooZe*&^s 5'F/>p3:?=ZAFky{R5e2wt3LwtaPwtjwt{-{!stKieb4%"4>^+l"+/Wu0Xmm5mm5>9=Uxgomv ɯx{p'r Ջ".Z[#ZD@U8 }M!6#GNh+QdfIh2 eU}bo_4wLu a9U 2p ӫ ;%dN@s ,u+O*7 k<9tV3WjmDZUD$' Ma0{AGE$lo7Tp*^?313 6$"4%ZQ[[u6f`l&0E dZk GY IcMn[tcr,tc~Ű4:4(T 4IFX|zr'n+h D; z Cvx6م6Xct Tx$<*t[,_~f@Apy@A@AŊ@A{@Am@Bp@Bp@B@B@B@Cq@C@C0@C!@C@D@Dt@DfA^Bo8H[kZ\86<\89\8@\8U\8g\8n\8v\8J\8'\8=\8\8B\8һ\85\8\8\8\8-\8I\8\8 \8k'rWjrhr s6vBӖ{:^|:5459{5EB5e5me5ui555“5585.5s5-5555Z5G@GoG=GGxGG Hʂ9\9\:4ECڧ0tw#'q)n)*8Q?^t]u-(_p3o?C 1}W}h4}vdH('.rE#[Ȑ6kȐ:.Ȑ=ȐUȐ^`ȐgȐnȐvȐzȐVȐȐoȐuȐtȐȐȐȐȐxȐ5Ȑ Ȑ?ѽ8ԇjUjGo1%|^WB^"k$""QlT|~=~AD~`~Iz2cîN.2WOf,7Kl`ݔE d{l2 ~q &0'6 &0' 3 ?3 @|U AP\ DQ f o @t 2N @ O < ^7 V" 4 8i C [ d t < Ϛ  s  J X$ˮ =P $f0 i ,E W?b 5  4y =WQ b Z L " b '4B )J *S7 *S *S +O4I 0 FYo Iq>:h S S ZU/ ^Q d8r d8 d8 d8 d<7 d<; d<= d<r= d<ss d< d<i d< d< d< d<͔ d< d<@ d< d<N d< d< d< d<y d< d< d4B: g$ hY k,a k, qe s(ڗ |C3 $* dN R[q % B t3 t80 t< t>6 tC t[ tc tl trx ts tA t t t t tR t tȌ t t t t t t~ t9 t0 t> tI t t  z ZT  Z5# o _E ?  "1\ $tƃ 'd, ( 85& ;2 ;^ A\ E~ _! cVql d dN eK pCd v]wBz v]wb }TFn 4$ p %Ng ZM " >  . ; y S |ST |f | BuO zDj ӕ ܶ$ OM O 4: 4F ) ؗ E ) )Y ) FB  X > J4 J> J WLܖ W| f] j o9 o o ' ,lg  kO % %y Au GE T r ' u xz  .  . E+ '4,L 15 943 @&4 @*$X _: cbt: t}45 t}4m t}4 t}4s t}4 t}4 R wtRt S \RJ \  ?D| O IgX Igj Igp Igw Ig} Ig Ig, Ig Ig Ig Ig E tR tf tl ut ` . }n w 5 J0 1 yWBH c  _'9 ~=epHIDO VbW\]geThwirldywg.{~ -C4&4N;nW_'iwYʰػ#sBz_jj})w(4hƦcnH٤bLkCķ|js's4 5(t2U2@V"wۭ#}w`'[2^4+4+842b9<3xFky2RΒm%wu@7ku@@u@E$l 2V)t)nE.AT!#%%_9rqi)AbbrechenCancel QsciCommandHAuswahl in Kleinbuchstaben umwandelnConvert selection to lower case QsciCommandFAuswahl in Grobuchstaben umwandelnConvert selection to upper case QsciCommand.Aktuelle Zeile kopierenCopy current line QsciCommand Auswahl kopierenCopy selection QsciCommand6Aktuelle Zeile ausschneidenCut current line QsciCommand(Auswahl ausschneiden Cut selection QsciCommand(Eine Ebene ausrckenDe-indent one level QsciCommand2Aktuelles Zeichen lschenDelete current character QsciCommand,Aktuelle Zeile lschenDelete current line QsciCommand&Zeile links lschenDelete line to left QsciCommand(Zeile rechts lschenDelete line to right QsciCommand*Zeichen links lschenDelete previous character QsciCommandbZeichen links lschen, wenn nicht am Zeilenanfang1Delete previous character if not at start of line QsciCommand^Rechts bis zum Ende des nchsten Wortes lschen Delete right to end of next word QsciCommand$Wort links lschenDelete word to left QsciCommand&Wort rechts lschenDelete word to right QsciCommand&Auswahl duplizierenDuplicate selection QsciCommand4Aktuelle Zeile duplizierenDuplicate the current line QsciCommandlRechteckige Auswahl um eine Zeile nach unten erweitern*Extend rectangular selection down one line QsciCommandlRechteckige Auswahl um eine Seite nach unten erweitern*Extend rectangular selection down one page QsciCommandnRechteckige Auswahl um ein Zeichen nach links erweitern/Extend rectangular selection left one character QsciCommandpRechteckige Auswahl um ein Zeichen nach rechts erweitern0Extend rectangular selection right one character QsciCommandtRechteckige Auswahl zum Ende der Dokumentenzeile erweitern4Extend rectangular selection to end of document line QsciCommandRechteckige Auswahl zum ersten sichtbaren Zeichen der Dokumentzeile erweiternHExtend rectangular selection to first visible character in document line QsciCommandxRechteckige Auswahl zum Beginn der Dokumentenzeile erweitern6Extend rectangular selection to start of document line QsciCommandjRechteckige Auswahl um eine Zeile nach oben erweitern(Extend rectangular selection up one line QsciCommandjRechteckige Auswahl um eine Seite nach oben erweitern(Extend rectangular selection up one page QsciCommandTAuswahl um eine Zeile nach unten erweiternExtend selection down one line QsciCommandTAuswahl um eine Seite nach unten erweiternExtend selection down one page QsciCommandXAuswahl um einen Absatz nach unten erweitern#Extend selection down one paragraph QsciCommandVAuswahl um ein Zeichen nach links erweitern#Extend selection left one character QsciCommandPAuswahl um ein Wort nach links erweiternExtend selection left one word QsciCommand\Auswahl um einen Wortteil nach links erweitern#Extend selection left one word part QsciCommandXAuswahl um ein Zeichen nach rechts erweitern$Extend selection right one character QsciCommandRAuswahl um ein Wort nach rechts erweiternExtend selection right one word QsciCommand^Auswahl um einen Wortteil nach rechts erweitern$Extend selection right one word part QsciCommandVAuswahl zum Ende der Anzeigezeile erweitern'Extend selection to end of display line QsciCommandRechteckige Auswahl zum Ende der Dokumenten- oder Anzeigezeile erweitern3Extend selection to end of display or document line QsciCommandHAuswahl zum Dokumentenende erweitern#Extend selection to end of document QsciCommand\Auswahl zum Ende der Dokumentenzeile erweitern(Extend selection to end of document line QsciCommanddAuswahl bis zum Ende des nchsten Wortes erweitern$Extend selection to end of next word QsciCommandbAuswahl bis zum Ende des vorigen Wortes erweitern(Extend selection to end of previous word QsciCommandAuswahl zum ersten sichtbaren Zeichen der Dokument- oder Anzeigezeile erweiternGExtend selection to first visible character in display or document line QsciCommandAuswahl zum ersten sichtbaren Zeichen der Dokumentzeile erweiternInaktives JavaDoc SchlsselwortInactive JavaDoc keyword QsciLexerCPPJInaktiver JavaDoc SchlsselwortfehlerInactive JavaDoc keyword error QsciLexerCPP:Inaktiver JavaDoc C Kommentar Inactive JavaDoc style C comment QsciLexerCPP>Inaktiver JavaDoc C++ Kommentar"Inactive JavaDoc style C++ comment QsciLexerCPPNInaktiver JavaDoc Prprozessorkommentar,Inactive JavaDoc style pre-processor comment QsciLexerCPPNJavaScript Inaktiver Regulrer Ausdruck&Inactive JavaScript regular expression QsciLexerCPPfInaktive Pike Zeichenkette in '#-Anfhrungszeichen' Inactive Pike hash-quoted string QsciLexerCPPhInaktive Vala Zeichenkette in dreifachen Hochkommata+Inactive Vala triple-quoted verbatim string QsciLexerCPP$Inaktiver StandardInactive default QsciLexerCPPTInaktive Zeichenkette in AnfhrungszeichenInactive double-quoted string QsciLexerCPP.Inaktive Escape-SequenzInactive escape sequence QsciLexerCPPXInaktive globale Klassen und Typdefinitionen$Inactive global classes and typedefs QsciLexerCPP(Inaktiver BezeichnerInactive identifier QsciLexerCPP.Inaktives SchlsselwortInactive keyword QsciLexerCPPInaktive ZahlInactive number QsciLexerCPP$Inaktiver OperatorInactive operator QsciLexerCPPBInaktiver C Prprozessorkommentar Inactive pre-processor C comment QsciLexerCPP6Inaktiver PrprozessorblockInactive pre-processor block QsciLexerCPPbInaktive sekundre Schlusselwrter und Bezeichner+Inactive secondary keywords and identifiers QsciLexerCPPHInaktive Zeichenkette in HochkommataInactive single-quoted string QsciLexerCPP6Inaktive AufgabenmarkierungInactive task marker QsciLexerCPP@Inaktive unbeendete ZeichenketteInactive unclosed string QsciLexerCPPHInaktives Nutzer definiertes LiteralInactive user-defined literal QsciLexerCPP*JavaDoc SchlsselwortJavaDoc keyword QsciLexerCPP6JavaDoc SchlsselwortfehlerJavaDoc keyword error QsciLexerCPP&JavaDoc C KommentarJavaDoc style C comment QsciLexerCPP*JavaDoc C++ KommentarJavaDoc style C++ comment QsciLexerCPP:JavaDoc Prprozessorkommentar#JavaDoc style pre-processor comment QsciLexerCPP:JavaScript Regulrer AusdruckJavaScript regular expression QsciLexerCPPSchlsselwortKeyword QsciLexerCPPZahlNumber QsciLexerCPPOperatorOperator QsciLexerCPPTPike Zeichenkette in '#-Anfhrungszeichen'Pike hash-quoted string QsciLexerCPP.C PrprozessorkommentarPre-processor C comment QsciLexerCPP"PrprozessorblockPre-processor block QsciLexerCPPPSekundre Schlusselwrter und Bezeichner"Secondary keywords and identifiers QsciLexerCPP6Zeichenkette in HochkommataSingle-quoted string QsciLexerCPP$Aufgabenmarkierung Task marker QsciLexerCPP.Unbeendete ZeichenketteUnclosed string QsciLexerCPP4Nutzer definiertes LiteralUser-defined literal QsciLexerCPPVVala Zeichenkette in dreifachen Hochkommata"Vala triple-quoted verbatim string QsciLexerCPP@-Regel@-rule QsciLexerCSSAttribut Attribute QsciLexerCSS CSS1 Eigenschaft CSS1 property QsciLexerCSS CSS2 Eigenschaft CSS2 property QsciLexerCSS CSS3 Eigenschaft CSS3 property QsciLexerCSSKlassenselektorClass selector QsciLexerCSSStandardDefault QsciLexerCSSBZeichenkette in AnfhrungszeichenDouble-quoted string QsciLexerCSS4Erweiterte CSS EigenschaftExtended CSS property QsciLexerCSS.Erweiterte PseudoklasseExtended pseudo-class QsciLexerCSS2Erweitertes PseudoelementExtended pseudo-element QsciLexerCSSID-Selektor ID selector QsciLexerCSSWichtig Important QsciLexerCSSMedienregel Media rule QsciLexerCSSOperatorOperator QsciLexerCSSPseudoklasse Pseudo-class QsciLexerCSSPseudoelementPseudo-element QsciLexerCSS6Zeichenkette in HochkommataSingle-quoted string QsciLexerCSSTagTag QsciLexerCSS,Unbekannte EigenschaftUnknown property QsciLexerCSS.Unbekannte PseudoklasseUnknown pseudo-class QsciLexerCSSWertValue QsciLexerCSSVariableVariable QsciLexerCSS:Uninterpretierte ZeichenketteVerbatim stringQsciLexerCSharpBlockkommentar Block commentQsciLexerCoffeeScript0Regulrer AusdrucksblockBlock regular expressionQsciLexerCoffeeScriptBRegulrer Ausdrucksblockkommentar Block regular expression commentQsciLexerCoffeeScript@Uninterpretierte C# ZeichenketteC# verbatim stringQsciLexerCoffeeScriptC++ KommentarC++-style commentQsciLexerCoffeeScriptC KommentarC-style commentQsciLexerCoffeeScriptStandardDefaultQsciLexerCoffeeScriptBZeichenkette in AnfhrungszeichenDouble-quoted stringQsciLexerCoffeeScriptGlobale KlassenGlobal classesQsciLexerCoffeeScriptIDL UUIDIDL UUIDQsciLexerCoffeeScriptBezeichner IdentifierQsciLexerCoffeeScript&Instanz-EigenschaftInstance propertyQsciLexerCoffeeScript*JavaDoc C++ KommentarJavaDoc C++-style commentQsciLexerCoffeeScript&JavaDoc C KommentarJavaDoc C-style commentQsciLexerCoffeeScript*JavaDoc SchlsselwortJavaDoc keywordQsciLexerCoffeeScript6JavaDoc SchlsselwortfehlerJavaDoc keyword errorQsciLexerCoffeeScriptSchlsselwortKeywordQsciLexerCoffeeScriptZahlNumberQsciLexerCoffeeScriptOperatorOperatorQsciLexerCoffeeScript"PrprozessorblockPre-processor blockQsciLexerCoffeeScript$Regulrer AusdruckRegular expressionQsciLexerCoffeeScriptPSekundre Schlusselwrter und Bezeichner"Secondary keywords and identifiersQsciLexerCoffeeScript6Zeichenkette in HochkommataSingle-quoted stringQsciLexerCoffeeScript.Unbeendete ZeichenketteUnclosed stringQsciLexerCoffeeScriptBZeichenkette in RckwrtsstrichenBackquoted string QsciLexerDBlockkommentar Block comment QsciLexerDZeichen Character QsciLexerD$DDoc Schlsselwort DDoc keyword QsciLexerD0DDoc SchlsselwortfehlerDDoc keyword error QsciLexerD&DDoc BlockkommentarDDoc style block comment QsciLexerD(DDoc ZeilenkommentarDDoc style line comment QsciLexerDStandardDefault QsciLexerD6DokumentationsschlsselwortDocumentation keyword QsciLexerDBezeichner Identifier QsciLexerDSchlsselwortKeyword QsciLexerDZeilenkommentar Line comment QsciLexerD0schachtelbarer KommentarNesting comment QsciLexerDZahlNumber QsciLexerDOperatorOperator QsciLexerD"Rohe Zeichenkette Raw string QsciLexerD0Sekundres SchlsselwortSecondary keyword QsciLexerDZeichenketteString QsciLexerDTypdefinitionType definition QsciLexerD.Unbeendete ZeichenketteUnclosed string QsciLexerD$Nutzer definiert 1User defined 1 QsciLexerD$Nutzer definiert 2User defined 2 QsciLexerD$Nutzer definiert 3User defined 3 QsciLexerD$Hinzugefgte Zeile Added line QsciLexerDiffGenderte Zeile Changed line QsciLexerDiff BefehlCommand QsciLexerDiffKommentarComment QsciLexerDiffStandardDefault QsciLexerDiffKopfzeilenHeader QsciLexerDiffPositionPosition QsciLexerDiffEntfernte Zeile Removed line QsciLexerDiffKommentarCommentQsciLexerFortran77Fortsetzung ContinuationQsciLexerFortran77StandardDefaultQsciLexerFortran77Dotted OperatorDotted operatorQsciLexerFortran77BZeichenkette in AnfhrungszeichenDouble-quoted stringQsciLexerFortran77&Erweiterte FunktionExtended functionQsciLexerFortran77Bezeichner IdentifierQsciLexerFortran77$Intrinsic-FunktionIntrinsic functionQsciLexerFortran77SchlsselwortKeywordQsciLexerFortran77 MarkeLabelQsciLexerFortran77ZahlNumberQsciLexerFortran77OperatorOperatorQsciLexerFortran77"PrprozessorblockPre-processor blockQsciLexerFortran776Zeichenkette in HochkommataSingle-quoted stringQsciLexerFortran77.Unbeendete ZeichenketteUnclosed stringQsciLexerFortran770ASP JavaScript KommentarASP JavaScript comment QsciLexerHTML.ASP JavaScript StandardASP JavaScript default QsciLexerHTML`ASP JavaScript Zeichenkette in Anfhrungszeichen#ASP JavaScript double-quoted string QsciLexerHTML8ASP JavaScript SchlsselwortASP JavaScript keyword QsciLexerHTML<ASP JavaScript ZeilenkommentarASP JavaScript line comment QsciLexerHTML&ASP JavaScript ZahlASP JavaScript number QsciLexerHTMLBASP JavaScript Regulrer Ausdruck!ASP JavaScript regular expression QsciLexerHTMLTASP JavaScript Zeichenkette in Hochkommata#ASP JavaScript single-quoted string QsciLexerHTML*ASP JavaScript SymbolASP JavaScript symbol QsciLexerHTMLLASP JavaScript Unbeendete ZeichenketteASP JavaScript unclosed string QsciLexerHTML&ASP JavaScript WortASP JavaScript word QsciLexerHTML,ASP Python KlassennameASP Python class name QsciLexerHTML(ASP Python KommentarASP Python comment QsciLexerHTML&ASP Python StandardASP Python default QsciLexerHTMLXASP Python Zeichenkette in AnfhrungszeichenASP Python double-quoted string QsciLexerHTMLNASP Python Funktions- oder Methodenname"ASP Python function or method name QsciLexerHTML*ASP Python BezeichnerASP Python identifier QsciLexerHTML0ASP Python SchlsselwortASP Python keyword QsciLexerHTMLASP Python ZahlASP Python number QsciLexerHTML&ASP Python OperatorASP Python operator QsciLexerHTMLLASP Python Zeichenkette in HochkommataASP Python single-quoted string QsciLexerHTMLnASP Python Zeichenkette in dreifachen Anfhrungszeichen&ASP Python triple double-quoted string QsciLexerHTMLbASP Python Zeichenkette in dreifachen Hochkommata&ASP Python triple single-quoted string QsciLexerHTML,ASP VBScript KommentarASP VBScript comment QsciLexerHTML*ASP VBScript StandardASP VBScript default QsciLexerHTML.ASP VBScript BezeichnerASP VBScript identifier QsciLexerHTML4ASP VBScript SchlsselwortASP VBScript keyword QsciLexerHTML"ASP VBScript ZahlASP VBScript number QsciLexerHTML2ASP VBScript ZeichenketteASP VBScript string QsciLexerHTMLHASP VBScript Unbeendete ZeichenketteASP VBScript unclosed string QsciLexerHTML(ASP X-Code KommentarASP X-Code comment QsciLexerHTMLAttribut Attribute QsciLexerHTML CDATACDATA QsciLexerHTMLTagende End of a tag QsciLexerHTML2Ende eines XML FragmentesEnd of an XML fragment QsciLexerHTMLEntittEntity QsciLexerHTMLdKommentar des ersten Parameters eines SGML Befehls*First parameter comment of an SGML command QsciLexerHTMLFErster Parameter eines SGML Befehls"First parameter of an SGML command QsciLexerHTMLHTML Kommentar HTML comment QsciLexerHTMLHTML Standard HTML default QsciLexerHTMLLHTML Zeichenkette in AnfhrungszeichenHTML double-quoted string QsciLexerHTMLHTML Zahl HTML number QsciLexerHTML@HTML Zeichenkette in HochkommataHTML single-quoted string QsciLexerHTML@JavaDoc ASP JavaScript Kommentar$JavaDoc style ASP JavaScript comment QsciLexerHTML8JavaDoc JavaScript Kommentar JavaDoc style JavaScript comment QsciLexerHTML(JavaScript KommentarJavaScript comment QsciLexerHTML&JavaScript StandardJavaScript default QsciLexerHTMLXJavaScript Zeichenkette in AnfhrungszeichenJavaScript double-quoted string QsciLexerHTML0JavaScript SchlsselwortJavaScript keyword QsciLexerHTML4JavaScript ZeilenkommentarJavaScript line comment QsciLexerHTMLJavaScript ZahlJavaScript number QsciLexerHTML:JavaScript Regulrer AusdruckJavaScript regular expression QsciLexerHTMLLJavaScript Zeichenkette in HochkommataJavaScript single-quoted string QsciLexerHTML"JavaScript SymbolJavaScript symbol QsciLexerHTMLDJavaScript Unbeendete ZeichenketteJavaScript unclosed string QsciLexerHTMLJavaScript WortJavaScript word QsciLexerHTML2Anderer Text in einem TagOther text in a tag QsciLexerHTMLPHP Kommentar PHP comment QsciLexerHTMLPHP Standard PHP default QsciLexerHTMLJPHP Zeichenkette in AnfhrungszeichenPHP double-quoted string QsciLexerHTMLBPHP Variable in AnfhrungszeichenPHP double-quoted variable QsciLexerHTML"PHP Schlsselwort PHP keyword QsciLexerHTML&PHP ZeilenkommentarPHP line comment QsciLexerHTMLPHP Zahl PHP number QsciLexerHTMLPHP Operator PHP operator QsciLexerHTML>PHP Zeichenkette in HochkommataPHP single-quoted string QsciLexerHTMLPHP Variable PHP variable QsciLexerHTML$Python KlassennamePython class name QsciLexerHTML Python KommentarPython comment QsciLexerHTMLPython StandardPython default QsciLexerHTMLPPython Zeichenkette in AnfhrungszeichenPython double-quoted string QsciLexerHTMLFPython Funktions- oder MethodennamePython function or method name QsciLexerHTML"Python BezeichnerPython identifier QsciLexerHTML(Python SchlsselwortPython keyword QsciLexerHTMLPython Zahl Python number QsciLexerHTMLPython OperatorPython operator QsciLexerHTMLDPython Zeichenkette in HochkommataPython single-quoted string QsciLexerHTMLfPython Zeichenkette in dreifachen Anfhrungszeichen"Python triple double-quoted string QsciLexerHTMLZPython Zeichenkette in dreifachen Hochkommata"Python triple single-quoted string QsciLexerHTML$SGML StandardblockSGML block default QsciLexerHTMLSGML Befehl SGML command QsciLexerHTMLSGML Kommentar SGML comment QsciLexerHTMLSGML Standard SGML default QsciLexerHTMLLSGML Zeichenkette in AnfhrungszeichenSGML double-quoted string QsciLexerHTMLSGML Fehler SGML error QsciLexerHTML@SGML Zeichenkette in HochkommataSGML single-quoted string QsciLexerHTML,SGML Spezielle EntittSGML special entity QsciLexerHTMLSkript Tag Script tag QsciLexerHTMLDBeginn eines JavaScript FragmentesStart of a JavaScript fragment QsciLexerHTML6Beginn eines PHP FragmentesStart of a PHP fragment QsciLexerHTML<Beginn eines Python FragmentesStart of a Python fragment QsciLexerHTML@Beginn eines VBScript FragmentesStart of a VBScript fragment QsciLexerHTMLLBeginn eines ASP JavaScript Fragmentes#Start of an ASP JavaScript fragment QsciLexerHTMLDBeginn eines ASP Python FragmentesStart of an ASP Python fragment QsciLexerHTMLHBeginn eines ASP VBScript Fragmentes!Start of an ASP VBScript fragment QsciLexerHTML6Beginn eines ASP FragmentesStart of an ASP fragment QsciLexerHTMLBBeginn eines ASP Fragmentes mit @Start of an ASP fragment with @ QsciLexerHTML6Beginn eines XML FragmentesStart of an XML fragment QsciLexerHTMLTagTag QsciLexerHTML(Unbekanntes AttributUnknown attribute QsciLexerHTMLUnbekanntes Tag Unknown tag QsciLexerHTML@HTML Wert ohne AnfhrungszeichenUnquoted HTML value QsciLexerHTML$VBScript KommentarVBScript comment QsciLexerHTML"VBScript StandardVBScript default QsciLexerHTML&VBScript BezeichnerVBScript identifier QsciLexerHTML,VBScript SchlsselwortVBScript keyword QsciLexerHTMLVBScript ZahlVBScript number QsciLexerHTML*VBScript ZeichenketteVBScript string QsciLexerHTML@VBScript Unbeendete ZeichenketteVBScript unclosed string QsciLexerHTMLUUIDUUID QsciLexerIDLBlockkommentar Block comment QsciLexerJSONStandardDefault QsciLexerJSONEscape-SequenzEscape sequence QsciLexerJSONIRIIRI QsciLexerJSON$JSON Schlsselwort JSON keyword QsciLexerJSON*JSON-LD kompaktes IRIJSON-LD compact IRI QsciLexerJSON*JSON-LD SchlsselwortJSON-LD keyword QsciLexerJSONZeilenkommentar Line comment QsciLexerJSONZahlNumber QsciLexerJSONOperatorOperator QsciLexerJSONAnalysefehler Parsing error QsciLexerJSONEigenschaftProperty QsciLexerJSONZeichenketteString QsciLexerJSON.Unbeendete ZeichenketteUnclosed string QsciLexerJSON$Regulrer AusdruckRegular expressionQsciLexerJavaScriptBasisfunktionenBasic functions QsciLexerLuaZeichen Character QsciLexerLuaKommentarComment QsciLexerLuaJKoroutinen, I/O- und Systemfunktionen%Coroutines, i/o and system facilities QsciLexerLuaStandardDefault QsciLexerLuaBezeichner Identifier QsciLexerLuaSchlsselwortKeyword QsciLexerLua MarkeLabel QsciLexerLuaZeilenkommentar Line comment QsciLexerLua:Uninterpretierte ZeichenketteLiteral string QsciLexerLuaZahlNumber QsciLexerLuaOperatorOperator QsciLexerLuaPrprozessor Preprocessor QsciLexerLuaZeichenketteString QsciLexerLuajZeichenketten-, Tabelle- und mathematische Funktionen!String, table and maths functions QsciLexerLua.Unbeendete ZeichenketteUnclosed string QsciLexerLua$Nutzer definiert 1User defined 1 QsciLexerLua$Nutzer definiert 2User defined 2 QsciLexerLua$Nutzer definiert 3User defined 3 QsciLexerLua$Nutzer definiert 4User defined 4 QsciLexerLuaKommentarCommentQsciLexerMakefileStandardDefaultQsciLexerMakefile FehlerErrorQsciLexerMakefileOperatorOperatorQsciLexerMakefilePrprozessor PreprocessorQsciLexerMakefileZielTargetQsciLexerMakefileVariableVariableQsciLexerMakefileBlockzitat Block quoteQsciLexerMarkdown.Code zwischen BackticksCode between backticksQsciLexerMarkdownBCode zwischen doppelten BackticksCode between double backticksQsciLexerMarkdownCodeblock Code blockQsciLexerMarkdownStandardDefaultQsciLexerMarkdownJKursive Schrift mit einfachen SternenEmphasis using single asterisksQsciLexerMarkdownVKursive Schrift mit einfachen Unterstrichen!Emphasis using single underscoresQsciLexerMarkdown"Horizontale LinieHorizontal ruleQsciLexerMarkdown&berschrift Ebene 1Level 1 headerQsciLexerMarkdown&berschrift Ebene 2Level 2 headerQsciLexerMarkdown&berschrift Ebene 3Level 3 headerQsciLexerMarkdown&berschrift Ebene 4Level 4 headerQsciLexerMarkdown&berschrift Ebene 5Level 5 headerQsciLexerMarkdown&berschrift Ebene 6Level 6 headerQsciLexerMarkdownHyperlinkLinkQsciLexerMarkdown4Nummeriertes ListenelementOrdered list itemQsciLexerMarkdown$EinleitungszeichenPre-charQsciLexerMarkdownSpezialSpecialQsciLexerMarkdownDurchgestrichen Strike outQsciLexerMarkdownBFettschrift mit doppelten Sternen&Strong emphasis using double asterisksQsciLexerMarkdownNFettschrift mit doppelten Unterstrichen(Strong emphasis using double underscoresQsciLexerMarkdown@Nicht nummeriertes ListenelementUnordered list itemQsciLexerMarkdown BefehlCommandQsciLexerMatlabKommentarCommentQsciLexerMatlabStandardDefaultQsciLexerMatlabBZeichenkette in AnfhrungszeichenDouble-quoted stringQsciLexerMatlabBezeichner IdentifierQsciLexerMatlabSchlsselwortKeywordQsciLexerMatlabZahlNumberQsciLexerMatlabOperatorOperatorQsciLexerMatlab6Zeichenkette in HochkommataSingle-quoted stringQsciLexerMatlabKommentarComment QsciLexerPOStandardDefault QsciLexerPOMarkierungFlags QsciLexerPO"Unschrfmarkierung Fuzzy flag QsciLexerPOMeldungskontextMessage context QsciLexerPO&MeldungskontexttextMessage context text QsciLexerPO<Meldungskontexttext Zeilenende Message context text end-of-line QsciLexerPO$MeldungsbezeichnerMessage identifier QsciLexerPO,MeldungsbezeichnertextMessage identifier text QsciLexerPOBMeldungsbezeichnertext Zeilenende#Message identifier text end-of-line QsciLexerPO(MeldungszeichenketteMessage string QsciLexerPO2MeldungszeichenkettentextMessage string text QsciLexerPOHMeldungszeichenkettentext ZeilenendeMessage string text end-of-line QsciLexerPO,ProgrammiererkommentarProgrammer comment QsciLexerPOReferenz Reference QsciLexerPO&Ungltige Direktive Bad directive QsciLexerPOVKommentarComment QsciLexerPOVKommentarzeile Comment line QsciLexerPOVStandardDefault QsciLexerPOVDirektive Directive QsciLexerPOVBezeichner Identifier QsciLexerPOVZahlNumber QsciLexerPOV8Objekte, CSG und ErscheinungObjects, CSG and appearance QsciLexerPOVOperatorOperator QsciLexerPOV,Vordefinierte FunktionPredefined functions QsciLexerPOV2Vordefinierter BezeichnerPredefined identifiers QsciLexerPOVZeichenketteString QsciLexerPOV:Typen, Modifizierer und ItemsTypes, modifiers and items QsciLexerPOV.Unbeendete ZeichenketteUnclosed string QsciLexerPOV$Nutzer definiert 1User defined 1 QsciLexerPOV$Nutzer definiert 2User defined 2 QsciLexerPOV$Nutzer definiert 3User defined 3 QsciLexerPOV*'(* ... *)' Kommentar'(* ... *)' style commentQsciLexerPascal<'(*$ ... *)' Prprozessorblock&'(*$ ... *)' style pre-processor blockQsciLexerPascal&'{ ... }' Kommentar'{ ... }' style commentQsciLexerPascal8'{$ ... }' Prprozessorblock$'{$ ... }' style pre-processor blockQsciLexerPascalZeichen CharacterQsciLexerPascalStandardDefaultQsciLexerPascal"Hexadezimale ZahlHexadecimal numberQsciLexerPascalBezeichner IdentifierQsciLexerPascal Inline Assembler Inline asmQsciLexerPascalSchlsselwortKeywordQsciLexerPascalZeilenkommentar Line commentQsciLexerPascalZahlNumberQsciLexerPascalOperatorOperatorQsciLexerPascal6Zeichenkette in HochkommataSingle-quoted stringQsciLexerPascal.Unbeendete ZeichenketteUnclosed stringQsciLexerPascalFeldArray QsciLexerPerl4Here Dokument in BackticksBacktick here document QsciLexerPerlfHere Dokument in Backticks (interpolierte Variable).Backtick here document (interpolated variable) QsciLexerPerlBackticks Backticks QsciLexerPerlDBackticks (interpolierte Variable)!Backticks (interpolated variable) QsciLexerPerlKommentarComment QsciLexerPerlDatensektion Data section QsciLexerPerlStandardDefault QsciLexerPerlDHere Dokument in AnfhrungszeichenDouble-quoted here document QsciLexerPerlvHere Dokument in Anfhrungszeichen (interpolierte Variable)3Double-quoted here document (interpolated variable) QsciLexerPerlBZeichenkette in AnfhrungszeichenDouble-quoted string QsciLexerPerltZeichenkette in Anfhrungszeichen (interpolierte Variable),Double-quoted string (interpolated variable) QsciLexerPerl FehlerError QsciLexerPerlFormatzweig Format body QsciLexerPerl&FormatidentifikatorFormat identifier QsciLexerPerlHashHash QsciLexerPerl.Here Dokument-BegrenzerHere document delimiter QsciLexerPerlBezeichner Identifier QsciLexerPerlSchlsselwortKeyword QsciLexerPerlZahlNumber QsciLexerPerlOperatorOperator QsciLexerPerlPODPOD QsciLexerPerlPOD wrtlich POD verbatim QsciLexerPerl Zeichenkette (q)Quoted string (q) QsciLexerPerl"Zeichenkette (qq)Quoted string (qq) QsciLexerPerlRZeichenkette (qq, interpolierte Variable))Quoted string (qq, interpolated variable) QsciLexerPerl"Zeichenkette (qr)Quoted string (qr) QsciLexerPerlRZeichenkette (qr, interpolierte Variable))Quoted string (qr, interpolated variable) QsciLexerPerl"Zeichenkette (qw)Quoted string (qw) QsciLexerPerl"Zeichenkette (qx)Quoted string (qx) QsciLexerPerlRZeichenkette (qx, interpolierte Variable))Quoted string (qx, interpolated variable) QsciLexerPerl$Regulrer AusdruckRegular expression QsciLexerPerlVRegulrer Ausdruck (interpolierte Variable)*Regular expression (interpolated variable) QsciLexerPerl SkalarScalar QsciLexerPerl8Here Dokument in HochkommataSingle-quoted here document QsciLexerPerl6Zeichenkette in HochkommataSingle-quoted string QsciLexerPerl(Subroutinen PrototypSubroutine prototype QsciLexerPerlErsetzung Substitution QsciLexerPerlDErsetzung (interpolierte Variable)$Substitution (interpolated variable) QsciLexerPerlSymboltabelle Symbol table QsciLexerPerlbersetzung Translation QsciLexerPerlFeldklammernArray parenthesisQsciLexerPostScriptFUngltiges Zeichen fr ZeichenketteBad string characterQsciLexerPostScript&Base85 Zeichenkette Base85 stringQsciLexerPostScriptKommentarCommentQsciLexerPostScriptDSC Kommentar DSC commentQsciLexerPostScript"DSC KommentarwertDSC comment valueQsciLexerPostScriptStandardDefaultQsciLexerPostScript&Dictionary-KlammernDictionary parenthesisQsciLexerPostScript2Hexadezimale ZeichenketteHexadecimal stringQsciLexerPostScript6Direkt ausgefhrtes LiteralImmediately evaluated literalQsciLexerPostScriptSchlsselwortKeywordQsciLexerPostScriptLiteralLiteralQsciLexerPostScriptNameNameQsciLexerPostScriptZahlNumberQsciLexerPostScript ProzedurklammernProcedure parenthesisQsciLexerPostScriptTextTextQsciLexerPostScriptZuweisung AssignmentQsciLexerPropertiesKommentarCommentQsciLexerPropertiesStandardDefaultQsciLexerPropertiesStandardwert Default valueQsciLexerPropertiesSchlsselKeyQsciLexerPropertiesAbschnittSectionQsciLexerPropertiesKlassenname Class nameQsciLexerPythonKommentarCommentQsciLexerPythonKommentarblock Comment blockQsciLexerPythonDekorator DecoratorQsciLexerPythonStandardDefaultQsciLexerPythonBZeichenkette in AnfhrungszeichenDouble-quoted stringQsciLexerPython8Funktions- oder MethodennameFunction or method nameQsciLexerPython4Hervorgehobener BezeichnerHighlighted identifierQsciLexerPythonBezeichner IdentifierQsciLexerPythonSchlsselwortKeywordQsciLexerPythonZahlNumberQsciLexerPythonOperatorOperatorQsciLexerPython6Zeichenkette in HochkommataSingle-quoted stringQsciLexerPythonXZeichenkette in dreifachen AnfhrungszeichenTriple double-quoted stringQsciLexerPythonLZeichenkette in dreifachen HochkommataTriple single-quoted stringQsciLexerPython.Unbeendete ZeichenketteUnclosed stringQsciLexerPython%Q Zeichenkette %Q string QsciLexerRuby%q Zeichenkette %q string QsciLexerRuby%r Zeichenkette %r string QsciLexerRuby%w Zeichenkette %w string QsciLexerRuby%x Zeichenkette %x string QsciLexerRubyBackticks Backticks QsciLexerRubyKlassenname Class name QsciLexerRubyKlassenvariableClass variable QsciLexerRubyKommentarComment QsciLexerRubyDatensektion Data section QsciLexerRubyStandardDefault QsciLexerRuby:zurckgestuftes SchlsselwortDemoted keyword QsciLexerRubyBZeichenkette in AnfhrungszeichenDouble-quoted string QsciLexerRuby FehlerError QsciLexerRuby8Funktions- oder MethodennameFunction or method name QsciLexerRuby GlobalGlobal QsciLexerRubyHere Dokument Here document QsciLexerRuby.Here Dokument-BegrenzerHere document delimiter QsciLexerRubyBezeichner Identifier QsciLexerRubyInstanzvariableInstance variable QsciLexerRubySchlsselwortKeyword QsciLexerRubyModulname Module name QsciLexerRubyZahlNumber QsciLexerRubyOperatorOperator QsciLexerRubyPODPOD QsciLexerRuby$Regulrer AusdruckRegular expression QsciLexerRuby6Zeichenkette in HochkommataSingle-quoted string QsciLexerRuby SymbolSymbol QsciLexerRuby Stderrstderr QsciLexerRuby Stdinstdin QsciLexerRuby Stdoutstdout QsciLexerRuby # Kommentarzeile# comment line QsciLexerSQLKommentarComment QsciLexerSQLKommentarzeile Comment line QsciLexerSQLStandardDefault QsciLexerSQLBZeichenkette in AnfhrungszeichenDouble-quoted string QsciLexerSQLBezeichner Identifier QsciLexerSQL*JavaDoc SchlsselwortJavaDoc keyword QsciLexerSQL6JavaDoc SchlsselwortfehlerJavaDoc keyword error QsciLexerSQL"JavaDoc KommentarJavaDoc style comment QsciLexerSQLSchlsselwortKeyword QsciLexerSQLZahlNumber QsciLexerSQLOperatorOperator QsciLexerSQL>Bezeichner in AnfhrungszeichenQuoted identifier QsciLexerSQL:Operator in AnfhrungszeichenQuoted operator QsciLexerSQL$SQL*Plus KommentarSQL*Plus comment QsciLexerSQL,SQL*Plus SchlsselwortSQL*Plus keyword QsciLexerSQL SQL*Plus EingabeSQL*Plus prompt QsciLexerSQL6Zeichenkette in HochkommataSingle-quoted string QsciLexerSQL$Nutzer definiert 1User defined 1 QsciLexerSQL$Nutzer definiert 2User defined 2 QsciLexerSQL$Nutzer definiert 3User defined 3 QsciLexerSQL$Nutzer definiert 4User defined 4 QsciLexerSQL BefehlCommandQsciLexerSpiceKommentarCommentQsciLexerSpiceStandardDefaultQsciLexerSpiceDelimiter DelimiterQsciLexerSpiceFunktionFunctionQsciLexerSpiceBezeichner IdentifierQsciLexerSpiceZahlNumberQsciLexerSpiceParameter ParameterQsciLexerSpiceWertValueQsciLexerSpice KlammerersetzungBrace substitution QsciLexerTCLKommentarComment QsciLexerTCLKommentarblock Comment block QsciLexerTCLKommentarbox Comment box QsciLexerTCLKommentarzeile Comment line QsciLexerTCLStandardDefault QsciLexerTCL2ErweiterungsschlsselwortExpand keyword QsciLexerTCLBezeichner Identifier QsciLexerTCLModifiziererModifier QsciLexerTCLZahlNumber QsciLexerTCLOperatorOperator QsciLexerTCL2angefhrtes SchlsselwortQuoted keyword QsciLexerTCLZeichenkette Quoted string QsciLexerTCLErsetzung Substitution QsciLexerTCL"TCL Schlsselwort TCL keyword QsciLexerTCLTk Befehl Tk command QsciLexerTCL Tk Schlsselwort Tk keyword QsciLexerTCL$Nutzer definiert 1User defined 1 QsciLexerTCL$Nutzer definiert 2User defined 2 QsciLexerTCL$Nutzer definiert 3User defined 3 QsciLexerTCL$Nutzer definiert 4User defined 4 QsciLexerTCL$iTCL Schlsselwort iTCL keyword QsciLexerTCL BefehlCommand QsciLexerTeXStandardDefault QsciLexerTeX GruppeGroup QsciLexerTeXSpezialSpecial QsciLexerTeX SymbolSymbol QsciLexerTeXTextText QsciLexerTeXAttribut Attribute QsciLexerVHDLKommentarComment QsciLexerVHDLKommentarblock Comment block QsciLexerVHDLKommentarzeile Comment line QsciLexerVHDLStandardDefault QsciLexerVHDLBezeichner Identifier QsciLexerVHDLSchlsselwortKeyword QsciLexerVHDLZahlNumber QsciLexerVHDLOperatorOperator QsciLexerVHDL StandardfunktionStandard function QsciLexerVHDL StandardoperatorStandard operator QsciLexerVHDLStandardpaketStandard package QsciLexerVHDLStandardtyp Standard type QsciLexerVHDLZeichenketteString QsciLexerVHDL.Unbeendete ZeichenketteUnclosed string QsciLexerVHDL Nutzer definiert User defined QsciLexerVHDLBang Kommentar Bang commentQsciLexerVerilogKommentarCommentQsciLexerVerilogStandardDefaultQsciLexerVerilogBezeichner IdentifierQsciLexerVerilog<Inaktive EingabeportdefinitionInactive input port declarationQsciLexerVerilogFInaktive Ein-/Ausgabeportdefinition&Inactive input/output port declarationQsciLexerVerilog@Inaktiver SchlsselwortkommentarInactive keyword commentQsciLexerVerilog<Inaktive Ausgabeportdefinition Inactive output port declarationQsciLexerVerilog.Inaktive PortverbindungInactive port connectionQsciLexerVerilog*EingabeportdefinitionInput port declarationQsciLexerVerilog4Ein-/AusgabeportdefinitionInput/output port declarationQsciLexerVerilog,SchlsselwortkommentarKeyword commentQsciLexerVerilogZeilenkommentar Line commentQsciLexerVerilogZahlNumberQsciLexerVerilogOperatorOperatorQsciLexerVerilog*AusgabeportdefinitionOutput port declarationQsciLexerVerilogPortverbindungPort connectionQsciLexerVerilog"PrprozessorblockPreprocessor blockQsciLexerVerilogLPrimre Schlusselwrter und Bezeichner Primary keywords and identifiersQsciLexerVerilogPSekundre Schlusselwrter und Bezeichner"Secondary keywords and identifiersQsciLexerVerilogZeichenketteStringQsciLexerVerilogSystemtask System taskQsciLexerVerilog.Unbeendete ZeichenketteUnclosed stringQsciLexerVerilogJNutzerdefinierte Tasks und Bezeichner"User defined tasks and identifiersQsciLexerVerilogKommentarComment QsciLexerYAMLStandardDefault QsciLexerYAML"DokumentbegrenzerDocument delimiter QsciLexerYAMLBezeichner Identifier QsciLexerYAMLSchlsselwortKeyword QsciLexerYAMLZahlNumber QsciLexerYAMLOperatorOperator QsciLexerYAMLReferenz Reference QsciLexerYAML.Syntaxfehler MarkierungSyntax error marker QsciLexerYAML(Textblock MarkierungText block marker QsciLexerYAML&Kopieren&Copy QsciScintillaEin&fgen&Paste QsciScintilla"Wieder&herstellen&Redo QsciScintilla&Rckgngig&Undo QsciScintilla&AusschneidenCu&t QsciScintillaLschenDelete QsciScintillaAlle auswhlen Select All QsciScintillasqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_de.ts000066400000000000000000004345621345112435200240420ustar00rootroot00000000000000 QsciCommand Move left one character Ein Zeichen nach links Move right one character Ein Zeichen nach rechts Move up one line Eine Zeile nach oben Move down one line Eine Zeile nach unten Move left one word part Ein Wortteil nach links Move right one word part Ein Wortteil nach rechts Move left one word Ein Wort nach links Move right one word Ein Wort nach rechts Scroll view down one line Eine Zeile nach unten rollen Scroll view up one line Eine Zeile nach oben rollen Move up one page Eine Seite hoch Move down one page Eine Seite nach unten Indent one level Eine Ebene einrücken Extend selection left one character Auswahl um ein Zeichen nach links erweitern Extend selection right one character Auswahl um ein Zeichen nach rechts erweitern Extend selection up one line Auswahl um eine Zeile nach oben erweitern Extend selection down one line Auswahl um eine Zeile nach unten erweitern Extend selection left one word part Auswahl um einen Wortteil nach links erweitern Extend selection right one word part Auswahl um einen Wortteil nach rechts erweitern Extend selection left one word Auswahl um ein Wort nach links erweitern Extend selection right one word Auswahl um ein Wort nach rechts erweitern Extend selection up one page Auswahl um eine Seite nach oben erweitern Extend selection down one page Auswahl um eine Seite nach unten erweitern Delete previous character Zeichen links löschen Delete current character Aktuelles Zeichen löschen Delete word to left Wort links löschen Delete word to right Wort rechts löschen Delete line to left Zeile links löschen Delete line to right Zeile rechts löschen Delete current line Aktuelle Zeile löschen Cut current line Aktuelle Zeile ausschneiden Cut selection Auswahl ausschneiden Copy selection Auswahl kopieren Paste Einfügen Redo last command Letzten Befehl wiederholen Cancel Abbrechen Toggle insert/overtype Einfügen/Überschreiben umschalten Scroll to start of document Zum Dokumentenanfang rollen Scroll to end of document Zum Dokumentenende rollen Scroll vertically to centre current line Vertical rollen, um aktuelle Zeile zu zentrieren Move to end of previous word Zum Ende des vorigen Wortes springen Extend selection to end of previous word Auswahl bis zum Ende des vorigen Wortes erweitern Move to end of next word Zum Ende des nächsten Wortes springen Extend selection to end of next word Auswahl bis zum Ende des nächsten Wortes erweitern Move to start of document line Zum Beginn der Dokumentenzeile springen Extend selection to start of document line Auswahl zum Beginn der Dokumentenzeile erweitern Extend rectangular selection to start of document line Rechteckige Auswahl zum Beginn der Dokumentenzeile erweitern Move to start of display line Zum Beginn der Anzeigezeile springen Extend selection to start of display line Auswahl zum Beginn der Anzeigezeile erweitern Move to start of display or document line Zum Beginn der Dokumenten- oder Anzeigezeile springen Extend selection to start of display or document line Rechteckige Auswahl zum Beginn der Dokumenten- oder Anzeigezeile erweitern Move to first visible character in document line Zum ersten sichtbaren Zeichen der Dokumentzeile springen Extend selection to first visible character in document line Auswahl zum ersten sichtbaren Zeichen der Dokumentzeile erweitern Extend rectangular selection to first visible character in document line Rechteckige Auswahl zum ersten sichtbaren Zeichen der Dokumentzeile erweitern Move to first visible character of display in document line Zum ersten angezeigten Zeichen der Dokumentzeile springen Extend selection to first visible character in display or document line Auswahl zum ersten sichtbaren Zeichen der Dokument- oder Anzeigezeile erweitern Move to end of document line Zum Ende der Dokumentzeile springen Extend selection to end of document line Auswahl zum Ende der Dokumentenzeile erweitern Extend rectangular selection to end of document line Rechteckige Auswahl zum Ende der Dokumentenzeile erweitern Move to end of display line Zum Ende der Anzeigezeile springen Extend selection to end of display line Auswahl zum Ende der Anzeigezeile erweitern Move to end of display or document line Zum Ende der Dokumenten- oder Anzeigezeile springen Extend selection to end of display or document line Rechteckige Auswahl zum Ende der Dokumenten- oder Anzeigezeile erweitern Move to start of document Zum Dokumentenanfang springen Extend selection to start of document Auswahl zum Dokumentenanfang erweitern Move to end of document Zum Dokumentenende springen Extend selection to end of document Auswahl zum Dokumentenende erweitern Stuttered move up one page "Stotternd" um eine Seite nach oben Stuttered extend selection up one page Auswahl "stotternd" um eine Seite nach oben erweitern Stuttered move down one page "Stotternd" um eine Seite nach unten Stuttered extend selection down one page Auswahl "stotternd" um eine Seite nach unten erweitern Delete previous character if not at start of line Zeichen links löschen, wenn nicht am Zeilenanfang Delete right to end of next word Rechts bis zum Ende des nächsten Wortes löschen Transpose current and previous lines Aktuelle und vorherige Zeile tauschen Duplicate the current line Aktuelle Zeile duplizieren Select all Select document Alle auswählen Move selected lines up one line Ausgewählte Zeilen um eine Zeile nach oben Move selected lines down one line Ausgewählte Zeilen um eine Zeile nach unten Convert selection to lower case Auswahl in Kleinbuchstaben umwandeln Convert selection to upper case Auswahl in Großbuchstaben umwandeln Insert newline Neue Zeile einfügen De-indent one level Eine Ebene ausrücken Undo last command Letzten Befehl rückgängig machen Zoom in Vergrößern Zoom out Verkleinern Move up one paragraph Einen Absatz nach oben Move down one paragraph Einen Absatz nach unten Extend selection up one paragraph Auswahl um einen Absatz nach oben erweitern Extend selection down one paragraph Auswahl um einen Absatz nach unten erweitern Copy current line Aktuelle Zeile kopieren Extend rectangular selection down one line Rechteckige Auswahl um eine Zeile nach unten erweitern Extend rectangular selection up one line Rechteckige Auswahl um eine Zeile nach oben erweitern Extend rectangular selection left one character Rechteckige Auswahl um ein Zeichen nach links erweitern Extend rectangular selection right one character Rechteckige Auswahl um ein Zeichen nach rechts erweitern Extend rectangular selection up one page Rechteckige Auswahl um eine Seite nach oben erweitern Extend rectangular selection down one page Rechteckige Auswahl um eine Seite nach unten erweitern Formfeed Seitenumbruch Duplicate selection Auswahl duplizieren QsciLexerAVS Default Standard Block comment Blockkommentar Nested block comment Verschachtelter Blockkommentar Line comment Zeilenkommentar Number Zahl Operator Operator Identifier Bezeichner Double-quoted string Zeichenkette in Anführungszeichen Triple double-quoted string Zeichenkette in dreifachen Anführungszeichen Keyword Schlüsselwort Filter Filter Plugin Plugin Function Funktion Clip property Clip Eigenschaft User defined Nutzer definiert QsciLexerBash Default Standard Error Fehler Comment Kommentar Number Zahl Keyword Schlüsselwort Double-quoted string Zeichenkette in Anführungszeichen Single-quoted string Zeichenkette in Hochkommata Operator Operator Identifier Bezeichner Scalar Skalar Parameter expansion Parametererweiterung Backticks Backticks Here document delimiter Here Dokument-Begrenzer Single-quoted here document Here Dokument in Hochkommata QsciLexerBatch Default Standard Comment Kommentar Keyword Schlüsselwort Label Marke Variable Variable Operator Operator Hide command character "Befehl verbergen" Zeichen External command Externer Befehl QsciLexerCMake Default Standard Comment Kommentar String Zeichenkette Left quoted string Links quotierte Zeichenkette Right quoted string Rechts quotierte Zeichenkette Function Funktion Variable Variable Label Marke User defined Nutzer definiert WHILE block WHILE Block FOREACH block FOREACH Block IF block IF Block MACRO block MACRO Block Variable within a string Variable in einer Zeichenkette Number Zahl QsciLexerCPP Number Zahl Keyword Schlüsselwort Double-quoted string Zeichenkette in Anführungszeichen Single-quoted string Zeichenkette in Hochkommata IDL UUID IDL UUID Pre-processor block Präprozessorblock Operator Operator Identifier Bezeichner Unclosed string Unbeendete Zeichenkette Default Standard Inactive default Inaktiver Standard C comment C Kommentar Inactive C comment Inaktiver C Kommentar C++ comment C++ Kommentar Inactive C++ comment Inaktiver C++ Kommentar JavaDoc style C comment JavaDoc C Kommentar Inactive JavaDoc style C comment Inaktiver JavaDoc C Kommentar Inactive number Inaktive Zahl Inactive keyword Inaktives Schlüsselwort Inactive double-quoted string Inaktive Zeichenkette in Anführungszeichen Inactive single-quoted string Inaktive Zeichenkette in Hochkommata Inactive IDL UUID Inaktive IDL UUID Inactive pre-processor block Inaktiver Präprozessorblock Inactive operator Inaktiver Operator Inactive identifier Inaktiver Bezeichner Inactive unclosed string Inaktive unbeendete Zeichenkette C# verbatim string Uninterpretierte C# Zeichenkette Inactive C# verbatim string Inaktive, Uninterpretierte C# Zeichenkette JavaScript regular expression JavaScript Regulärer Ausdruck Inactive JavaScript regular expression JavaScript Inaktiver Regulärer Ausdruck JavaDoc style C++ comment JavaDoc C++ Kommentar Inactive JavaDoc style C++ comment Inaktiver JavaDoc C++ Kommentar Inactive secondary keywords and identifiers Inaktive sekundäre Schlusselwörter und Bezeichner JavaDoc keyword JavaDoc Schlüsselwort Inactive JavaDoc keyword Inaktives JavaDoc Schlüsselwort JavaDoc keyword error JavaDoc Schlüsselwortfehler Inactive global classes and typedefs Inaktive globale Klassen und Typdefinitionen C++ raw string Rohe C++ Zeichenkette Inactive C++ raw string Inaktive rohe C++ Zeichenkette Vala triple-quoted verbatim string Vala Zeichenkette in dreifachen Hochkommata Inactive Vala triple-quoted verbatim string Inaktive Vala Zeichenkette in dreifachen Hochkommata Pike hash-quoted string Pike Zeichenkette in '#-Anführungszeichen' Inactive Pike hash-quoted string Inaktive Pike Zeichenkette in '#-Anführungszeichen' Pre-processor C comment C Präprozessorkommentar Inactive pre-processor C comment Inaktiver C Präprozessorkommentar JavaDoc style pre-processor comment JavaDoc Präprozessorkommentar Inactive JavaDoc style pre-processor comment Inaktiver JavaDoc Präprozessorkommentar User-defined literal Nutzer definiertes Literal Inactive user-defined literal Inaktives Nutzer definiertes Literal Task marker Aufgabenmarkierung Inactive task marker Inaktive Aufgabenmarkierung Escape sequence Escape-Sequenz Inactive escape sequence Inaktive Escape-Sequenz Secondary keywords and identifiers Sekundäre Schlusselwörter und Bezeichner Inactive JavaDoc keyword error Inaktiver JavaDoc Schlüsselwortfehler Global classes and typedefs Globale Klassen und Typdefinitionen QsciLexerCSS Default Standard Tag Tag Class selector Klassenselektor Pseudo-class Pseudoklasse Unknown pseudo-class Unbekannte Pseudoklasse Operator Operator CSS1 property CSS1 Eigenschaft Unknown property Unbekannte Eigenschaft Value Wert ID selector ID-Selektor Important Wichtig @-rule @-Regel Double-quoted string Zeichenkette in Anführungszeichen Single-quoted string Zeichenkette in Hochkommata CSS2 property CSS2 Eigenschaft Attribute Attribut CSS3 property CSS3 Eigenschaft Pseudo-element Pseudoelement Extended CSS property Erweiterte CSS Eigenschaft Extended pseudo-class Erweiterte Pseudoklasse Extended pseudo-element Erweitertes Pseudoelement Media rule Medienregel Variable Variable QsciLexerCSharp Verbatim string Uninterpretierte Zeichenkette QsciLexerCoffeeScript Default Standard C-style comment C Kommentar C++-style comment C++ Kommentar JavaDoc C-style comment JavaDoc C Kommentar Number Zahl Keyword Schlüsselwort Double-quoted string Zeichenkette in Anführungszeichen Single-quoted string Zeichenkette in Hochkommata IDL UUID IDL UUID Pre-processor block Präprozessorblock Operator Operator Identifier Bezeichner Unclosed string Unbeendete Zeichenkette C# verbatim string Uninterpretierte C# Zeichenkette Regular expression Regulärer Ausdruck JavaDoc C++-style comment JavaDoc C++ Kommentar Secondary keywords and identifiers Sekundäre Schlusselwörter und Bezeichner JavaDoc keyword JavaDoc Schlüsselwort JavaDoc keyword error JavaDoc Schlüsselwortfehler Global classes Globale Klassen Block comment Blockkommentar Block regular expression Regulärer Ausdrucksblock Block regular expression comment Regulärer Ausdrucksblockkommentar Instance property Instanz-Eigenschaft QsciLexerD Default Standard Block comment Blockkommentar Line comment Zeilenkommentar DDoc style block comment DDoc Blockkommentar Nesting comment schachtelbarer Kommentar Number Zahl Keyword Schlüsselwort Secondary keyword Sekundäres Schlüsselwort Documentation keyword Dokumentationsschlüsselwort Type definition Typdefinition String Zeichenkette Unclosed string Unbeendete Zeichenkette Character Zeichen Operator Operator Identifier Bezeichner DDoc style line comment DDoc Zeilenkommentar DDoc keyword DDoc Schlüsselwort DDoc keyword error DDoc Schlüsselwortfehler Backquoted string Zeichenkette in Rückwärtsstrichen Raw string Rohe Zeichenkette User defined 1 Nutzer definiert 1 User defined 2 Nutzer definiert 2 User defined 3 Nutzer definiert 3 QsciLexerDiff Default Standard Comment Kommentar Command Befehl Header Kopfzeilen Position Position Removed line Entfernte Zeile Added line Hinzugefügte Zeile Changed line Geänderte Zeile QsciLexerFortran77 Default Standard Comment Kommentar Number Zahl Single-quoted string Zeichenkette in Hochkommata Double-quoted string Zeichenkette in Anführungszeichen Unclosed string Unbeendete Zeichenkette Operator Operator Identifier Bezeichner Keyword Schlüsselwort Intrinsic function Intrinsic-Funktion Extended function Erweiterte Funktion Pre-processor block Präprozessorblock Dotted operator Dotted Operator Label Marke Continuation Fortsetzung QsciLexerHTML HTML default HTML Standard Tag Tag Unknown tag Unbekanntes Tag Attribute Attribut Unknown attribute Unbekanntes Attribut HTML number HTML Zahl HTML double-quoted string HTML Zeichenkette in Anführungszeichen HTML single-quoted string HTML Zeichenkette in Hochkommata Other text in a tag Anderer Text in einem Tag HTML comment HTML Kommentar Entity Entität End of a tag Tagende Start of an XML fragment Beginn eines XML Fragmentes End of an XML fragment Ende eines XML Fragmentes Script tag Skript Tag Start of an ASP fragment with @ Beginn eines ASP Fragmentes mit @ Start of an ASP fragment Beginn eines ASP Fragmentes CDATA CDATA Start of a PHP fragment Beginn eines PHP Fragmentes Unquoted HTML value HTML Wert ohne Anführungszeichen ASP X-Code comment ASP X-Code Kommentar SGML default SGML Standard SGML command SGML Befehl First parameter of an SGML command Erster Parameter eines SGML Befehls SGML double-quoted string SGML Zeichenkette in Anführungszeichen SGML single-quoted string SGML Zeichenkette in Hochkommata SGML error SGML Fehler SGML special entity SGML Spezielle Entität SGML comment SGML Kommentar First parameter comment of an SGML command Kommentar des ersten Parameters eines SGML Befehls SGML block default SGML Standardblock Start of a JavaScript fragment Beginn eines JavaScript Fragmentes JavaScript default JavaScript Standard JavaScript comment JavaScript Kommentar JavaScript line comment JavaScript Zeilenkommentar JavaDoc style JavaScript comment JavaDoc JavaScript Kommentar JavaScript number JavaScript Zahl JavaScript word JavaScript Wort JavaScript keyword JavaScript Schlüsselwort JavaScript double-quoted string JavaScript Zeichenkette in Anführungszeichen JavaScript single-quoted string JavaScript Zeichenkette in Hochkommata JavaScript symbol JavaScript Symbol JavaScript unclosed string JavaScript Unbeendete Zeichenkette JavaScript regular expression JavaScript Regulärer Ausdruck Start of an ASP JavaScript fragment Beginn eines ASP JavaScript Fragmentes ASP JavaScript default ASP JavaScript Standard ASP JavaScript comment ASP JavaScript Kommentar ASP JavaScript line comment ASP JavaScript Zeilenkommentar JavaDoc style ASP JavaScript comment JavaDoc ASP JavaScript Kommentar ASP JavaScript number ASP JavaScript Zahl ASP JavaScript word ASP JavaScript Wort ASP JavaScript keyword ASP JavaScript Schlüsselwort ASP JavaScript double-quoted string ASP JavaScript Zeichenkette in Anführungszeichen ASP JavaScript single-quoted string ASP JavaScript Zeichenkette in Hochkommata ASP JavaScript symbol ASP JavaScript Symbol ASP JavaScript unclosed string ASP JavaScript Unbeendete Zeichenkette ASP JavaScript regular expression ASP JavaScript Regulärer Ausdruck Start of a VBScript fragment Beginn eines VBScript Fragmentes VBScript default VBScript Standard VBScript comment VBScript Kommentar VBScript number VBScript Zahl VBScript keyword VBScript Schlüsselwort VBScript string VBScript Zeichenkette VBScript identifier VBScript Bezeichner VBScript unclosed string VBScript Unbeendete Zeichenkette Start of an ASP VBScript fragment Beginn eines ASP VBScript Fragmentes ASP VBScript default ASP VBScript Standard ASP VBScript comment ASP VBScript Kommentar ASP VBScript number ASP VBScript Zahl ASP VBScript keyword ASP VBScript Schlüsselwort ASP VBScript string ASP VBScript Zeichenkette ASP VBScript identifier ASP VBScript Bezeichner ASP VBScript unclosed string ASP VBScript Unbeendete Zeichenkette Start of a Python fragment Beginn eines Python Fragmentes Python default Python Standard Python comment Python Kommentar Python number Python Zahl Python double-quoted string Python Zeichenkette in Anführungszeichen Python single-quoted string Python Zeichenkette in Hochkommata Python keyword Python Schlüsselwort Python triple double-quoted string Python Zeichenkette in dreifachen Anführungszeichen Python triple single-quoted string Python Zeichenkette in dreifachen Hochkommata Python class name Python Klassenname Python function or method name Python Funktions- oder Methodenname Python operator Python Operator Python identifier Python Bezeichner Start of an ASP Python fragment Beginn eines ASP Python Fragmentes ASP Python default ASP Python Standard ASP Python comment ASP Python Kommentar ASP Python number ASP Python Zahl ASP Python double-quoted string ASP Python Zeichenkette in Anführungszeichen ASP Python single-quoted string ASP Python Zeichenkette in Hochkommata ASP Python keyword ASP Python Schlüsselwort ASP Python triple double-quoted string ASP Python Zeichenkette in dreifachen Anführungszeichen ASP Python triple single-quoted string ASP Python Zeichenkette in dreifachen Hochkommata ASP Python class name ASP Python Klassenname ASP Python function or method name ASP Python Funktions- oder Methodenname ASP Python operator ASP Python Operator ASP Python identifier ASP Python Bezeichner PHP default PHP Standard PHP double-quoted string PHP Zeichenkette in Anführungszeichen PHP single-quoted string PHP Zeichenkette in Hochkommata PHP keyword PHP Schlüsselwort PHP number PHP Zahl PHP comment PHP Kommentar PHP line comment PHP Zeilenkommentar PHP double-quoted variable PHP Variable in Anführungszeichen PHP operator PHP Operator PHP variable PHP Variable QsciLexerIDL UUID UUID QsciLexerJSON Default Standard Number Zahl String Zeichenkette Unclosed string Unbeendete Zeichenkette Property Eigenschaft Escape sequence Escape-Sequenz Line comment Zeilenkommentar Block comment Blockkommentar Operator Operator IRI IRI JSON-LD compact IRI JSON-LD kompaktes IRI JSON keyword JSON Schlüsselwort JSON-LD keyword JSON-LD Schlüsselwort Parsing error Analysefehler QsciLexerJavaScript Regular expression Regulärer Ausdruck QsciLexerLua Default Standard Comment Kommentar Line comment Zeilenkommentar Number Zahl Keyword Schlüsselwort String Zeichenkette Character Zeichen Literal string Uninterpretierte Zeichenkette Preprocessor Präprozessor Operator Operator Identifier Bezeichner Unclosed string Unbeendete Zeichenkette Basic functions Basisfunktionen String, table and maths functions Zeichenketten-, Tabelle- und mathematische Funktionen Coroutines, i/o and system facilities Koroutinen, I/O- und Systemfunktionen User defined 1 Nutzer definiert 1 User defined 2 Nutzer definiert 2 User defined 3 Nutzer definiert 3 User defined 4 Nutzer definiert 4 Label Marke QsciLexerMakefile Default Standard Comment Kommentar Preprocessor Präprozessor Variable Variable Operator Operator Target Ziel Error Fehler QsciLexerMarkdown Default Standard Special Spezial Strong emphasis using double asterisks Fettschrift mit doppelten Sternen Strong emphasis using double underscores Fettschrift mit doppelten Unterstrichen Emphasis using single asterisks Kursive Schrift mit einfachen Sternen Emphasis using single underscores Kursive Schrift mit einfachen Unterstrichen Level 1 header Überschrift Ebene 1 Level 2 header Überschrift Ebene 2 Level 3 header Überschrift Ebene 3 Level 4 header Überschrift Ebene 4 Level 5 header Überschrift Ebene 5 Level 6 header Überschrift Ebene 6 Pre-char Einleitungszeichen Unordered list item Nicht nummeriertes Listenelement Ordered list item Nummeriertes Listenelement Block quote Blockzitat Strike out Durchgestrichen Horizontal rule Horizontale Linie Link Hyperlink Code between backticks Code zwischen Backticks Code between double backticks Code zwischen doppelten Backticks Code block Codeblock QsciLexerMatlab Default Standard Comment Kommentar Command Befehl Number Zahl Keyword Schlüsselwort Single-quoted string Zeichenkette in Hochkommata Operator Operator Identifier Bezeichner Double-quoted string Zeichenkette in Anführungszeichen QsciLexerPO Default Standard Comment Kommentar Message identifier Meldungsbezeichner Message identifier text Meldungsbezeichnertext Message string Meldungszeichenkette Message string text Meldungszeichenkettentext Message context Meldungskontext Message context text Meldungskontexttext Fuzzy flag Unschrfmarkierung Programmer comment Programmiererkommentar Reference Referenz Flags Markierung Message identifier text end-of-line Meldungsbezeichnertext Zeilenende Message string text end-of-line Meldungszeichenkettentext Zeilenende Message context text end-of-line Meldungskontexttext Zeilenende QsciLexerPOV Default Standard Comment Kommentar Comment line Kommentarzeile Number Zahl Operator Operator Identifier Bezeichner String Zeichenkette Unclosed string Unbeendete Zeichenkette Directive Direktive Bad directive Ungültige Direktive Objects, CSG and appearance Objekte, CSG und Erscheinung Types, modifiers and items Typen, Modifizierer und Items Predefined identifiers Vordefinierter Bezeichner Predefined functions Vordefinierte Funktion User defined 1 Nutzer definiert 1 User defined 2 Nutzer definiert 2 User defined 3 Nutzer definiert 3 QsciLexerPascal Default Standard Line comment Zeilenkommentar Number Zahl Keyword Schlüsselwort Single-quoted string Zeichenkette in Hochkommata Operator Operator Identifier Bezeichner '{ ... }' style comment '{ ... }' Kommentar '(* ... *)' style comment '(* ... *)' Kommentar '{$ ... }' style pre-processor block '{$ ... }' Präprozessorblock '(*$ ... *)' style pre-processor block '(*$ ... *)' Präprozessorblock Hexadecimal number Hexadezimale Zahl Unclosed string Unbeendete Zeichenkette Character Zeichen Inline asm Inline Assembler QsciLexerPerl Default Standard Error Fehler Comment Kommentar POD POD Number Zahl Keyword Schlüsselwort Double-quoted string Zeichenkette in Anführungszeichen Single-quoted string Zeichenkette in Hochkommata Operator Operator Identifier Bezeichner Scalar Skalar Array Feld Hash Hash Symbol table Symboltabelle Regular expression Regulärer Ausdruck Substitution Ersetzung Backticks Backticks Data section Datensektion Here document delimiter Here Dokument-Begrenzer Single-quoted here document Here Dokument in Hochkommata Double-quoted here document Here Dokument in Anführungszeichen Backtick here document Here Dokument in Backticks Quoted string (q) Zeichenkette (q) Quoted string (qq) Zeichenkette (qq) Quoted string (qx) Zeichenkette (qx) Quoted string (qr) Zeichenkette (qr) Quoted string (qw) Zeichenkette (qw) POD verbatim POD wörtlich Subroutine prototype Subroutinen Prototyp Format identifier Formatidentifikator Format body Formatzweig Double-quoted string (interpolated variable) Zeichenkette in Anführungszeichen (interpolierte Variable) Translation Übersetzung Regular expression (interpolated variable) Regulärer Ausdruck (interpolierte Variable) Substitution (interpolated variable) Ersetzung (interpolierte Variable) Backticks (interpolated variable) Backticks (interpolierte Variable) Double-quoted here document (interpolated variable) Here Dokument in Anführungszeichen (interpolierte Variable) Backtick here document (interpolated variable) Here Dokument in Backticks (interpolierte Variable) Quoted string (qq, interpolated variable) Zeichenkette (qq, interpolierte Variable) Quoted string (qx, interpolated variable) Zeichenkette (qx, interpolierte Variable) Quoted string (qr, interpolated variable) Zeichenkette (qr, interpolierte Variable) QsciLexerPostScript Default Standard Comment Kommentar DSC comment DSC Kommentar DSC comment value DSC Kommentarwert Number Zahl Name Name Keyword Schlüsselwort Literal Literal Immediately evaluated literal Direkt ausgeführtes Literal Array parenthesis Feldklammern Dictionary parenthesis Dictionary-Klammern Procedure parenthesis Prozedurklammern Text Text Hexadecimal string Hexadezimale Zeichenkette Base85 string Base85 Zeichenkette Bad string character Ungültiges Zeichen für Zeichenkette QsciLexerProperties Default Standard Comment Kommentar Section Abschnitt Assignment Zuweisung Default value Standardwert Key Schlüssel QsciLexerPython Comment Kommentar Number Zahl Double-quoted string Zeichenkette in Anführungszeichen Single-quoted string Zeichenkette in Hochkommata Keyword Schlüsselwort Triple single-quoted string Zeichenkette in dreifachen Hochkommata Triple double-quoted string Zeichenkette in dreifachen Anführungszeichen Class name Klassenname Function or method name Funktions- oder Methodenname Operator Operator Identifier Bezeichner Comment block Kommentarblock Unclosed string Unbeendete Zeichenkette Default Standard Highlighted identifier Hervorgehobener Bezeichner Decorator Dekorator QsciLexerRuby Default Standard Comment Kommentar Number Zahl Double-quoted string Zeichenkette in Anführungszeichen Single-quoted string Zeichenkette in Hochkommata Keyword Schlüsselwort Class name Klassenname Function or method name Funktions- oder Methodenname Operator Operator Identifier Bezeichner Error Fehler POD POD Regular expression Regulärer Ausdruck Global Global Symbol Symbol Module name Modulname Instance variable Instanzvariable Class variable Klassenvariable Backticks Backticks Data section Datensektion Here document delimiter Here Dokument-Begrenzer Here document Here Dokument %q string %q Zeichenkette %Q string %Q Zeichenkette %x string %x Zeichenkette %r string %r Zeichenkette %w string %w Zeichenkette Demoted keyword zurückgestuftes Schlüsselwort stdin Stdin stdout Stdout stderr Stderr QsciLexerSQL Default Standard Comment Kommentar Number Zahl Keyword Schlüsselwort Single-quoted string Zeichenkette in Hochkommata Operator Operator Identifier Bezeichner Comment line Kommentarzeile JavaDoc style comment JavaDoc Kommentar Double-quoted string Zeichenkette in Anführungszeichen SQL*Plus keyword SQL*Plus Schlüsselwort SQL*Plus prompt SQL*Plus Eingabe SQL*Plus comment SQL*Plus Kommentar # comment line # Kommentarzeile JavaDoc keyword JavaDoc Schlüsselwort JavaDoc keyword error JavaDoc Schlüsselwortfehler User defined 1 Nutzer definiert 1 User defined 2 Nutzer definiert 2 User defined 3 Nutzer definiert 3 User defined 4 Nutzer definiert 4 Quoted identifier Bezeichner in Anführungszeichen Quoted operator Operator in Anführungszeichen QsciLexerSpice Default Standard Identifier Bezeichner Command Befehl Function Funktion Parameter Parameter Number Zahl Delimiter Delimiter Value Wert Comment Kommentar QsciLexerTCL Default Standard Comment Kommentar Comment line Kommentarzeile Number Zahl Quoted keyword angeführtes Schlüsselwort Quoted string Zeichenkette Operator Operator Identifier Bezeichner Substitution Ersetzung Brace substitution Klammerersetzung Modifier Modifizierer Expand keyword Erweiterungsschlüsselwort TCL keyword TCL Schlüsselwort Tk keyword Tk Schlüsselwort iTCL keyword iTCL Schlüsselwort Tk command Tk Befehl User defined 1 Nutzer definiert 1 User defined 2 Nutzer definiert 2 User defined 3 Nutzer definiert 3 User defined 4 Nutzer definiert 4 Comment box Kommentarbox Comment block Kommentarblock QsciLexerTeX Default Standard Special Spezial Group Gruppe Symbol Symbol Command Befehl Text Text QsciLexerVHDL Default Standard Comment Kommentar Comment line Kommentarzeile Number Zahl String Zeichenkette Operator Operator Identifier Bezeichner Unclosed string Unbeendete Zeichenkette Keyword Schlüsselwort Standard operator Standardoperator Attribute Attribut Standard function Standardfunktion Standard package Standardpaket Standard type Standardtyp User defined Nutzer definiert Comment block Kommentarblock QsciLexerVerilog Default Standard Comment Kommentar Line comment Zeilenkommentar Bang comment Bang Kommentar Number Zahl Primary keywords and identifiers Primäre Schlusselwörter und Bezeichner String Zeichenkette Secondary keywords and identifiers Sekundäre Schlusselwörter und Bezeichner System task Systemtask Preprocessor block Präprozessorblock Operator Operator Identifier Bezeichner Unclosed string Unbeendete Zeichenkette User defined tasks and identifiers Nutzerdefinierte Tasks und Bezeichner Keyword comment Schlüsselwortkommentar Inactive keyword comment Inaktiver Schlüsselwortkommentar Input port declaration Eingabeportdefinition Inactive input port declaration Inaktive Eingabeportdefinition Output port declaration Ausgabeportdefinition Inactive output port declaration Inaktive Ausgabeportdefinition Input/output port declaration Ein-/Ausgabeportdefinition Inactive input/output port declaration Inaktive Ein-/Ausgabeportdefinition Port connection Portverbindung Inactive port connection Inaktive Portverbindung QsciLexerYAML Default Standard Comment Kommentar Identifier Bezeichner Keyword Schlüsselwort Number Zahl Reference Referenz Document delimiter Dokumentbegrenzer Text block marker Textblock Markierung Syntax error marker Syntaxfehler Markierung Operator Operator QsciScintilla &Undo &Rückgängig &Redo Wieder&herstellen Cu&t &Ausschneiden &Copy &Kopieren &Paste Ein&fügen Delete Löschen Select All Alle auswählen sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_es.qm000066400000000000000000002330301345112435200240330ustar00rootroot00000000000000M#VEip4~zڴ1,/,ۅȔ%Qo oe-U&^y 5'Kc/C3\:D=ZFkyߧR5 e6wt7Nwtf<wtp<wtV{1t{#tij|4ŗ%$QA>^l"/WÒu4Dmmmcm 9P> AZtlsX{ѵ@  'ramՋ.\_`_pIE@U6 Q!X# Nh.dufMh2 eU }b _I4wQ 9U pӫ;%/dSV@ ,Bu.[O-7 q<9tV7WmDU4$@"Mf4{FgK$ro7T8`c?J353^$%N4%_Qe[!b[u fe!l&E ZkG^ IcR [thx,th ~ŰV:8(T 4>Iu-X|zx'scnPR H  vx66ct T~$<*t1,_z@Av9@A@A@A}@A@Bv@B@BS@B@Bz@Cv@CG@Cʹ@C?@C@D@D@D <AcBtHn[p\8:R\8>L\8D\8Z\8m\8t;\8|}\8\8\8\8,\8P\8ۃ\8\8e\8V\8\8y\8\8 \8\8Ek*r\trn_rs:vB`{:G^ ?DL59 5=5I5j.5s5{Q5F5r55)555#5525O5 55GE~GuJGGTGGGVʂ9\9\ :4v|Eڧt&'qΒ)n,*g8V<?^t:]u0_p7 o?C3}\}m}|d('.x=#Ȑ:Ȑ>ȐB&ȐZȐc`ȐmTȐtlȐ|ȐȐȐȐ5ȐȐ҆Ȑ۷ȐȐȐȐȐ MȐȐyѽ8Kĝԇ@9Vwb%Z")6%)*yYaa4F5tj6|8 @E%C_ub]zd*d*id*d*Cibm;$LwMwtLYf܌~&k[ED _E6&@''&*+}3gu<.)YFky%KA\^]D>i1KCjjLo1(|^/B"p""QlTh~Ba~F,~e~N; 2cN22BɫS,7P`Iit2 ~U &0': &0'E 3 ?3 @|U- AU DQv f oY @t 2R T A7 ^ [" 88 < H ` i$ z  6     X$Ӷ = $kf i ,EZ WD 5B  4 =WU b 8 |  " '4G )O *S; *S$ *S +O4 0 FYu Iq>> S1 S ZU3 ^V d8w d8M d8 d8 d<< d<@h d<B d<x! d<y_ d<8 d< d< d< d< d< d<j d< d<} d< d< d<9 d< d< i d< d< d4G g$ h k,1 k, qe s( |G $n d R`i % B t7 tL J8 JCf J WL W fb j o=& o] o ' ,q h kT %W % A{  GJ X r '_ u $ x  .A  . E} '4/ 15 943t @&4 @*$ _ cbz0 t}49 t}4s t}4v t}4 t}4 t}4( wtW Xx \R a  ?D S Ig] Igos Igu Ig} Ig Ig3 Ig̠ Ig0 IgA Ig Ig J3 tW tk tT ut? ` .\ }na 9 N 5 yWPBL c X d'9 =eHIO ؠVW\B]geThw irldwg{-CRH&4N,?]d'o}]q#EB_o)w4Ʀgn`٤gLkC%|jys4 5+2Y2>@d"w#}we'[ϱ2c4+4/k846j9<3@Fky4RΒm%wu@;ku@Eu@m$q~2)tnE1T2$I#%(I9r8wiWCancelarCancel QsciCommand@Convertir seleccin a minsculasConvert selection to lower case QsciCommand@Convertir seleccin a maysculasConvert selection to upper case QsciCommand&Copiar lnea actualCopy current line QsciCommand Copiar seleccinCopy selection QsciCommand&Cortar lnea actualCut current line QsciCommand Cortar seleccin Cut selection QsciCommand<Deshacer un nivel de indentadoDe-indent one level QsciCommand2Borrar el carcter actualDelete current character QsciCommand&Borrar lnea actualDelete current line QsciCommand>Borrar lnea hacia la izquierdaDelete line to left QsciCommand:Borrar lnea hacia la derechaDelete line to right QsciCommand0Borrar carcter anteriorDelete previous character QsciCommandzBorrar carcter anterior si no est al principio de una lnea1Delete previous character if not at start of line QsciCommandtBorrar a la derecha hasta el final de la siguiente palabra Delete right to end of next word QsciCommandBBorrar palabra hacia la izquierdaDelete word to left QsciCommand>Borrar palabra hacia la derechaDelete word to right QsciCommand$Duplicar seleccinDuplicate selection QsciCommand*Duplicar lnea actualDuplicate the current line QsciCommandnExtender la seleccin rectangular una lnea hacia abajo*Extend rectangular selection down one line QsciCommandpExtender la seleccin rectangular una pgina hacia abajo*Extend rectangular selection down one page QsciCommandExtender la seleccin rectangular un carcter hacia la izquierda/Extend rectangular selection left one character QsciCommand|Extender la seleccin rectangular un carcter hacia la derecha0Extend rectangular selection right one character QsciCommandExtender seleccin rectangular al final de la lnea del documento4Extend rectangular selection to end of document line QsciCommandExtender seleccin rectangular al primer carcter visible en la lnea del documentoHExtend rectangular selection to first visible character in document line QsciCommandExtender seleccin rectangular al principio de la lnea del documento6Extend rectangular selection to start of document line QsciCommandpExtender la seleccin rectangular una lnea hacia arriba(Extend rectangular selection up one line QsciCommandrExtender la seleccin rectangular hacia arriba una pgina(Extend rectangular selection up one page QsciCommandVExtender la seleccin una lnea hacia abajoExtend selection down one line QsciCommandXExtender la seleccin hacia abajo una pginaExtend selection down one page QsciCommandXExtender la seleccin un prrafo hacia abajo#Extend selection down one paragraph QsciCommandhExtender la seleccin un carcter hacia la izquierda#Extend selection left one character QsciCommand`Extender la seleccin una palabra a la izquierdaExtend selection left one word QsciCommandrExtender la seleccin parte de una palabra a la izquierda#Extend selection left one word part QsciCommanddExtender la seleccin un carcter hacia la derecha$Extend selection right one character QsciCommand\Extender la seleccin una palabra a la derechaExtend selection right one word QsciCommandnExtender la seleccin parte de una palabra a la derecha$Extend selection right one word part QsciCommandfExtender seleccin al final de la lnea visualizada'Extend selection to end of display line QsciCommandExtender seleccin al final de la lnea visualizada o del documento3Extend selection to end of display or document line QsciCommandRExtender seleccin al final del documento#Extend selection to end of document QsciCommandjExtender seleccin al final de la lnea del documento(Extend selection to end of document line QsciCommandxExtender la seleccin hasta el final de la palabra siguiente$Extend selection to end of next word QsciCommanddExtender seleccin al final de la palabra anterior(Extend selection to end of previous word QsciCommandExtender seleccin al primer carcter de lnea visualizada o del documentoGExtend selection to first visible character in display or document line QsciCommandExtender seleccin al primer carcter visible en la lnea del documentoDesplazar una lnea hacia abajoMove down one line QsciCommand8Mover hacia abajo una pginaMove down one page QsciCommand@Desplazar un prrafo hacia abajoMove down one paragraph QsciCommandHMover un carcter hacia la izquierdaMove left one character QsciCommandHMover una palabra hacia la izquierdaMove left one word QsciCommandZMover parte de una palabra hacia la izquierdaMove left one word part QsciCommandDMover un carcter hacia la derechaMove right one character QsciCommandDMover una palabra hacia la derechaMove right one word QsciCommandVMover parte de una palabra hacia la derechaMove right one word part QsciCommandhMover las lneas seleccionadas una lnea hacia abajo!Move selected lines down one line QsciCommandjMover las lneas seleccionadas una lnea hacia arribaMove selected lines up one line QsciCommandLMover al final de la lnea visualizadaMove to end of display line QsciCommandlMover al final de la lnea visualizada o del documento'Move to end of display or document line QsciCommand8Mover al final del documentoMove to end of document QsciCommandPMover al final de la lnea del documentoMove to end of document line QsciCommandLMover al final de la palabra siguienteMove to end of next word QsciCommandDMover al final de palabra anteriorMove to end of previous word QsciCommandtMover al primer carcter visible en la lnea del documento0Move to first visible character in document line QsciCommandExtender seleccin al primer carcter visualizado en la lnea del documento;Move to first visible character of display in document line QsciCommandTMover al principio de la lnea visualizadaMove to start of display line QsciCommandtMover al principio de la lnea visualizada o del documento)Move to start of display or document line QsciCommand@Mover al principio del documentoMove to start of document QsciCommandXMover al principio de la lnea del documentoMove to start of document line QsciCommand@Desplazar una lnea hacia arribaMove up one line QsciCommand:Mover hacia arriba una pginaMove up one page QsciCommandBDesplazar un prrafo hacia arribaMove up one paragraph QsciCommand PegarPaste QsciCommand,Rehacer ltimo comandoRedo last command QsciCommand@Desplazar al final del documentoScroll to end of document QsciCommandHDesplazar al principio del documentoScroll to start of document QsciCommandhDesplazar verticalmente al centro de la lnea actual(Scroll vertically to centre current line QsciCommandPDesplazar la vista una lnea hacia abajoScroll view down one line QsciCommandRDesplazar la vista una lnea hacia arribaScroll view up one line QsciCommand Seleccionar todo Select all QsciCommandrExtender progresivamente seleccin hacia abajo una pgina(Stuttered extend selection down one page QsciCommandtExtender progresivamente seleccin hacia arriba una pgina&Stuttered extend selection up one page QsciCommandXMover progresivamente una pgina hacia abajoStuttered move down one page QsciCommandZMover progresivamente una pgina hacia arribaStuttered move up one page QsciCommand>Conmutar insertar/sobreescribirToggle insert/overtype QsciCommandFTransponer lneas actual y anterior$Transpose current and previous lines QsciCommand.Deshacer ltimo comandoUndo last command QsciCommandAumentar zoomZoom in QsciCommandDisminuir zoomZoom out QsciCommand(Comentario de bloque Block comment QsciLexerAVS(Propiedad de recorte Clip property QsciLexerAVSPor defectoDefault QsciLexerAVS4Cadena con comillas doblesDouble-quoted string QsciLexerAVS FiltroFilter QsciLexerAVSFuncinFunction QsciLexerAVSIdentificador Identifier QsciLexerAVSPalabra claveKeyword QsciLexerAVS&Comentario de lnea Line comment QsciLexerAVS8Comentario de bloque anidadoNested block comment QsciLexerAVS NmeroNumber QsciLexerAVSOperadorOperator QsciLexerAVS PluginPlugin QsciLexerAVS>Cadena con triple comilla dobleTriple double-quoted string QsciLexerAVS.Definido por el usuario User defined QsciLexerAVSComilla inversa Backticks QsciLexerBashComentarioComment QsciLexerBashPor defectoDefault QsciLexerBash4Cadena con comillas doblesDouble-quoted string QsciLexerBash ErrorError QsciLexerBashdDelimitador de documento integrado (here document)Here document delimiter QsciLexerBashIdentificador Identifier QsciLexerBashPalabra claveKeyword QsciLexerBash NmeroNumber QsciLexerBashOperadorOperator QsciLexerBash.Expansin de parmetrosParameter expansion QsciLexerBashEscalarScalar QsciLexerBashlDocumento integrado (here document) con comilla simpleSingle-quoted here document QsciLexerBash6Cadena con comillas simplesSingle-quoted string QsciLexerBashComentarioCommentQsciLexerBatchPor defectoDefaultQsciLexerBatchComando externoExternal commandQsciLexerBatch:Ocultar caracteres de comandoHide command characterQsciLexerBatchPalabra claveKeywordQsciLexerBatchEtiquetaLabelQsciLexerBatchOperadorOperatorQsciLexerBatchVariableVariableQsciLexerBatchComentarioCommentQsciLexerCMakePor defectoDefaultQsciLexerCMakeBloque FOREACH FOREACH blockQsciLexerCMakeFuncinFunctionQsciLexerCMakeBloque IFIF blockQsciLexerCMakeEtiquetaLabelQsciLexerCMakeDCadena con comillas a la izquierdaLeft quoted stringQsciLexerCMakeBloque MACRO MACRO blockQsciLexerCMake NmeroNumberQsciLexerCMake@Cadena con comillas a la derechaRight quoted stringQsciLexerCMake(Cadena de caracteresStringQsciLexerCMake.Definido por el usuario User definedQsciLexerCMakeVariableVariableQsciLexerCMake,Variable en una cadenaVariable within a stringQsciLexerCMakeBloque WHILE WHILE blockQsciLexerCMakeComentario C C comment QsciLexerCPP"Cadena C# textualC# verbatim string QsciLexerCPPComentario C++ C++ comment QsciLexerCPP&Cadena en bruto C++C++ raw string QsciLexerCPPPor defectoDefault QsciLexerCPP4Cadena con comillas doblesDouble-quoted string QsciLexerCPP&Secuencia de escapeEscape sequence QsciLexerCPP4Clases globales y typedefsGlobal classes and typedefs QsciLexerCPPIDL UUIDIDL UUID QsciLexerCPPIdentificador Identifier QsciLexerCPP*Comentario C inactivoInactive C comment QsciLexerCPP4Cadena C# textual inactivaInactive C# verbatim string QsciLexerCPP.Comentario C++ inactivoInactive C++ comment QsciLexerCPP&Cadena inactiva C++Inactive C++ raw string QsciLexerCPP"IDL UUID inactivoInactive IDL UUID QsciLexerCPPBPalabra clave de JavaDoc inactivaInactive JavaDoc keyword QsciLexerCPPTError en palabra clave de Javadoc inactivoInactive JavaDoc keyword error QsciLexerCPPHComentario C estilo JavaDoc inactivo Inactive JavaDoc style C comment QsciLexerCPPLComentario C++ estilo JavaDoc inactivo"Inactive JavaDoc style C++ comment QsciLexerCPPfComentario de preprocesador estilo JavaDoc inactivo,Inactive JavaDoc style pre-processor comment QsciLexerCPPJExpresin regular JavaScript inactiva&Inactive JavaScript regular expression QsciLexerCPPXCadena Pike con hash entrecomillado inactiva Inactive Pike hash-quoted string QsciLexerCPP^Cadena Vala con triple comilla textual inactiva+Inactive Vala triple-quoted verbatim string QsciLexerCPP(Por defecto inactivoInactive default QsciLexerCPPBCadena con doble comilla inactivaInactive double-quoted string QsciLexerCPP8Secuencia de escape inactivaInactive escape sequence QsciLexerCPPHClases globales y typedefs inactivos$Inactive global classes and typedefs QsciLexerCPP,Identificador inactivoInactive identifier QsciLexerCPP,Palabra clave inactivaInactive keyword QsciLexerCPPNmero inactivoInactive number QsciLexerCPP"Operador inactivoInactive operator QsciLexerCPPLComentario C de preprocesador inactivo Inactive pre-processor C comment QsciLexerCPP@Bloque de preprocesador inactivoInactive pre-processor block QsciLexerCPPlIdentificadores y palabras clave secundarios inactivos+Inactive secondary keywords and identifiers QsciLexerCPPDCadena con comilla simple inactivaInactive single-quoted string QsciLexerCPP4Marcador de tarea inactivoInactive task marker QsciLexerCPP4Cadena sin cerrar inactivaInactive unclosed string QsciLexerCPPPLiteral inactivo definido por el usuarioInactive user-defined literal QsciLexerCPP0Palabra clave de JavadocJavaDoc keyword QsciLexerCPPBError en palabra clave de JavadocJavaDoc keyword error QsciLexerCPP<Comentario C de estilo JavaDocJavaDoc style C comment QsciLexerCPP@Comentario C++ de estilo JavaDocJavaDoc style C++ comment QsciLexerCPPTComentario de preprocesador estilo JavaDoc#JavaDoc style pre-processor comment QsciLexerCPP8Expresin regular JavaScriptJavaScript regular expression QsciLexerCPPPalabra claveKeyword QsciLexerCPP NmeroNumber QsciLexerCPPOperadorOperator QsciLexerCPPFCadena Pike con hash entrecomilladoPike hash-quoted string QsciLexerCPP:Comentario C de preprocesadorPre-processor C comment QsciLexerCPP.Bloque de preprocesadorPre-processor block QsciLexerCPPXIdentificadores y palabras clave secundarios"Secondary keywords and identifiers QsciLexerCPP6Cadena con comillas simplesSingle-quoted string QsciLexerCPP"Marcador de tarea Task marker QsciLexerCPP"Cadena sin cerrarUnclosed string QsciLexerCPP>Literal definido por el usuarioUser-defined literal QsciLexerCPPLCadena Vala con triple comilla textual"Vala triple-quoted verbatim string QsciLexerCPPRegla-@@-rule QsciLexerCSSAtributo Attribute QsciLexerCSSPropiedad CSS1 CSS1 property QsciLexerCSSPropiedad CSS2 CSS2 property QsciLexerCSSPropiedad CSS3 CSS3 property QsciLexerCSS"Selector de claseClass selector QsciLexerCSSPor defectoDefault QsciLexerCSS4Cadena con comillas doblesDouble-quoted string QsciLexerCSS.Propiedad CSS extendidaExtended CSS property QsciLexerCSS*Pseudoclase extendidaExtended pseudo-class QsciLexerCSS0Pseudoelemento extendidoExtended pseudo-element QsciLexerCSSSelector de ID ID selector QsciLexerCSSImportante Important QsciLexerCSS"Regla de '@media' Media rule QsciLexerCSSOperadorOperator QsciLexerCSSPseudoclase Pseudo-class QsciLexerCSSPseudoelementoPseudo-element QsciLexerCSS6Cadena con comillas simplesSingle-quoted string QsciLexerCSSEtiquetaTag QsciLexerCSS*Propiedad desconocidaUnknown property QsciLexerCSS.Pseudoclase desconocidaUnknown pseudo-class QsciLexerCSS ValorValue QsciLexerCSSVariableVariable QsciLexerCSSCadena textualVerbatim stringQsciLexerCSharp(Comentario de bloque Block commentQsciLexerCoffeeScript6Expresin regular de bloqueBlock regular expressionQsciLexerCoffeeScriptRComentario de expresin regular de bloque Block regular expression commentQsciLexerCoffeeScript"Cadena C# textualC# verbatim stringQsciLexerCoffeeScript0Comentario de estilo C++C++-style commentQsciLexerCoffeeScript,Comentario de estilo CC-style commentQsciLexerCoffeeScriptPor defectoDefaultQsciLexerCoffeeScript4Cadena con comillas doblesDouble-quoted stringQsciLexerCoffeeScriptClases globalesGlobal classesQsciLexerCoffeeScriptIDL UUIDIDL UUIDQsciLexerCoffeeScriptIdentificador IdentifierQsciLexerCoffeeScript,Propiedad de instanciaInstance propertyQsciLexerCoffeeScript@Comentario de estilo JavaDoc C++JavaDoc C++-style commentQsciLexerCoffeeScript<Comentario de estilo JavaDoc CJavaDoc C-style commentQsciLexerCoffeeScript0Palabra clave de JavaDocJavaDoc keywordQsciLexerCoffeeScriptBError en palabra clave de JavaDocJavaDoc keyword errorQsciLexerCoffeeScriptPalabra claveKeywordQsciLexerCoffeeScript NmeroNumberQsciLexerCoffeeScriptOperadorOperatorQsciLexerCoffeeScript.Bloque de preprocesadorPre-processor blockQsciLexerCoffeeScript"Expresin regularRegular expressionQsciLexerCoffeeScriptXIdentificadores y palabras clave secundarios"Secondary keywords and identifiersQsciLexerCoffeeScript2Cadena con comilla simpleSingle-quoted stringQsciLexerCoffeeScript"Cadena sin cerrarUnclosed stringQsciLexerCoffeeScript>Cadena con comillas hacia atrsBackquoted string QsciLexerD(Comentario de bloque Block comment QsciLexerDCarcter Character QsciLexerD$Palabra clave DDoc DDoc keyword QsciLexerD6Error en palabra clave DDOCDDoc keyword error QsciLexerD@Comentario de bloque estilo DDocDDoc style block comment QsciLexerD>Comentario de lnea estilo DDocDDoc style line comment QsciLexerDPor defectoDefault QsciLexerD<Palabra clave de documentacinDocumentation keyword QsciLexerDIdentificador Identifier QsciLexerDPalabra claveKeyword QsciLexerD&Comentario de lnea Line comment QsciLexerD$Comentario anidadoNesting comment QsciLexerD NmeroNumber QsciLexerDOperadorOperator QsciLexerDCadena en bruto Raw string QsciLexerD0Palabra clave secundariaSecondary keyword QsciLexerD(Cadena de caracteresString QsciLexerD$Definicin de tipoType definition QsciLexerD"Cadena sin cerrarUnclosed string QsciLexerD2Definido por el usuario 1User defined 1 QsciLexerD2Definido por el usuario 2User defined 2 QsciLexerD2Definido por el usuario 3User defined 3 QsciLexerDLnea aadida Added line QsciLexerDiff Lnea modificada Changed line QsciLexerDiffComandoCommand QsciLexerDiffComentarioComment QsciLexerDiffPor defectoDefault QsciLexerDiffEncabezadoHeader QsciLexerDiffPosicinPosition QsciLexerDiffLnea eliminada Removed line QsciLexerDiffComentarioCommentQsciLexerFortran77Continuacin ContinuationQsciLexerFortran77Por defectoDefaultQsciLexerFortran77"Operador punteadoDotted operatorQsciLexerFortran774Cadena con comillas doblesDouble-quoted stringQsciLexerFortran77"Funcin extendidaExtended functionQsciLexerFortran77Identificador IdentifierQsciLexerFortran77$Funcin intrnsecaIntrinsic functionQsciLexerFortran77Palabra claveKeywordQsciLexerFortran77EtiquetaLabelQsciLexerFortran77 NmeroNumberQsciLexerFortran77OperadorOperatorQsciLexerFortran77.Bloque de preprocesadorPre-processor blockQsciLexerFortran776Cadena con comillas simplesSingle-quoted stringQsciLexerFortran77"Cadena sin cerrarUnclosed stringQsciLexerFortran778Comentario de ASP JavaScriptASP JavaScript comment QsciLexerHTML4ASP JavaScript por defectoASP JavaScript default QsciLexerHTMLRCadena ASP JavaScript con comillas dobles#ASP JavaScript double-quoted string QsciLexerHTML8Palabra clave ASP JavaScriptASP JavaScript keyword QsciLexerHTMLJComentario de lnea de ASP JavaScriptASP JavaScript line comment QsciLexerHTML*Nmero ASP JavaScriptASP JavaScript number QsciLexerHTML@Expresin regular ASP JavaScript!ASP JavaScript regular expression QsciLexerHTMLTCadena ASP JavaScript con comillas simples#ASP JavaScript single-quoted string QsciLexerHTML,Smbolo ASP JavaScriptASP JavaScript symbol QsciLexerHTML@Cadena ASP JavaScript sin cerrarASP JavaScript unclosed string QsciLexerHTML,Palabra ASP JavaScriptASP JavaScript word QsciLexerHTML4Nombre de clase ASP PythonASP Python class name QsciLexerHTML*Comentario ASP PythonASP Python comment QsciLexerHTML,ASP Python por defectoASP Python default QsciLexerHTMLJCadena ASP Python con comillas doblesASP Python double-quoted string QsciLexerHTMLJNombre de mtodo o funcin ASP Python"ASP Python function or method name QsciLexerHTML0Identificador ASP PythonASP Python identifier QsciLexerHTML6Palabra clave de ASP PythonASP Python keyword QsciLexerHTML"Nmero ASP PythonASP Python number QsciLexerHTML&Operador ASP PythonASP Python operator QsciLexerHTMLLCadena ASP Python con comillas simplesASP Python single-quoted string QsciLexerHTMLTCadena ASP Python con triple comilla doble&ASP Python triple double-quoted string QsciLexerHTMLVCadena ASP Python con triple comilla simple&ASP Python triple single-quoted string QsciLexerHTML4Comentario de ASP VBScriptASP VBScript comment QsciLexerHTML0ASP VBScript por defectoASP VBScript default QsciLexerHTML4Identificador ASP VBScriptASP VBScript identifier QsciLexerHTML4Palabra clave ASP VBScriptASP VBScript keyword QsciLexerHTML&Nmero ASP VBScriptASP VBScript number QsciLexerHTMLBCadena de caracteres ASP VBScriptASP VBScript string QsciLexerHTML<Cadena ASP VBScript sin cerrarASP VBScript unclosed string QsciLexerHTML*Comentario ASP X-CodeASP X-Code comment QsciLexerHTMLAtributo Attribute QsciLexerHTML CDATACDATA QsciLexerHTML*Final de una etiqueta End of a tag QsciLexerHTML.Fin de un fragmento XMLEnd of an XML fragment QsciLexerHTMLEntidadEntity QsciLexerHTMLbComentario de primer parametro de un comando SGML*First parameter comment of an SGML command QsciLexerHTMLFPrimer parametro de un comando SGML"First parameter of an SGML command QsciLexerHTMLComentario HTML HTML comment QsciLexerHTML HTML por defecto HTML default QsciLexerHTML>Cadena HTML con comillas doblesHTML double-quoted string QsciLexerHTMLNmero HTML HTML number QsciLexerHTML@Cadena HTML con comillas simplesHTML single-quoted string QsciLexerHTMLVComentario ASP JavaScript de estilo JavaDoc$JavaDoc style ASP JavaScript comment QsciLexerHTMLNComentario JavaScript de estilo JavaDoc JavaDoc style JavaScript comment QsciLexerHTML*Comentario JavaScriptJavaScript comment QsciLexerHTML,JavaScript por defectoJavaScript default QsciLexerHTMLJCadena JavaScript con comillas doblesJavaScript double-quoted string QsciLexerHTML0Palabra clave JavaScriptJavaScript keyword QsciLexerHTMLBComentario de lnea de JavaScriptJavaScript line comment QsciLexerHTML"Nmero JavaScriptJavaScript number QsciLexerHTML8Expresin regular JavaScriptJavaScript regular expression QsciLexerHTMLLCadena JavaScript con comillas simplesJavaScript single-quoted string QsciLexerHTML$Smbolo JavaScriptJavaScript symbol QsciLexerHTML8Cadena JavaScript sin cerrarJavaScript unclosed string QsciLexerHTML$Palabra JavaScriptJavaScript word QsciLexerHTML4Otro texto en una etiquetaOther text in a tag QsciLexerHTMLComentario PHP PHP comment QsciLexerHTMLPHP por defecto PHP default QsciLexerHTML<Cadena PHP con comillas doblesPHP double-quoted string QsciLexerHTML@Variable PHP con comillas doblesPHP double-quoted variable QsciLexerHTML"Palabra clave PHP PHP keyword QsciLexerHTML.Comentario de lnea PHPPHP line comment QsciLexerHTMLNmero PHP PHP number QsciLexerHTMLOperador PHP PHP operator QsciLexerHTML>Cadena PHP con comillas simplesPHP single-quoted string QsciLexerHTMLVariable PHP PHP variable QsciLexerHTML,Nombre de clase PythonPython class name QsciLexerHTML"Comentario PythonPython comment QsciLexerHTML$Python por defectoPython default QsciLexerHTMLBCadena Python con comillas doblesPython double-quoted string QsciLexerHTMLBNombre de mtodo o funcin PythonPython function or method name QsciLexerHTML(Identificador PythonPython identifier QsciLexerHTML.Palabra clave de PythonPython keyword QsciLexerHTMLNmero Python Python number QsciLexerHTMLOperador PythonPython operator QsciLexerHTMLDCadena Python con comillas simplesPython single-quoted string QsciLexerHTMLLCadena Python con triple comilla doble"Python triple double-quoted string QsciLexerHTMLNCadena Python con triple comilla simple"Python triple single-quoted string QsciLexerHTML.Bloque SGML por defectoSGML block default QsciLexerHTMLComando SGML SGML command QsciLexerHTMLComentario SGML SGML comment QsciLexerHTML SGML por defecto SGML default QsciLexerHTML>Cadena SGML con comillas doblesSGML double-quoted string QsciLexerHTMLError SGML SGML error QsciLexerHTML@Cadena SGML con comillas simplesSGML single-quoted string QsciLexerHTML*Entidad SGML especialSGML special entity QsciLexerHTML$Etiqueta de script Script tag QsciLexerHTMLBInicio de un fragmento JavaScriptStart of a JavaScript fragment QsciLexerHTML4Inicio de un fragmento PHPStart of a PHP fragment QsciLexerHTML:Inicio de un fragmento PythonStart of a Python fragment QsciLexerHTML>Inicio de un fragmento VBScriptStart of a VBScript fragment QsciLexerHTMLPInicio de un fragmento de ASP JavaScript#Start of an ASP JavaScript fragment QsciLexerHTMLBInicio de un fragmento ASP PythonStart of an ASP Python fragment QsciLexerHTMLLInicio de un fragmento de ASP VBScript!Start of an ASP VBScript fragment QsciLexerHTML4Inicio de un fragmento ASPStart of an ASP fragment QsciLexerHTML@Inicio de un fragmento ASP con @Start of an ASP fragment with @ QsciLexerHTML4Inicio de un fragmento XMLStart of an XML fragment QsciLexerHTMLEtiquetaTag QsciLexerHTML(Atributo desconocidoUnknown attribute QsciLexerHTML(Etiqueta desconocida Unknown tag QsciLexerHTML.Valor HTML sin comillasUnquoted HTML value QsciLexerHTML&Comentario VBScriptVBScript comment QsciLexerHTML(VBScript por defectoVBScript default QsciLexerHTML,Identificador VBScriptVBScript identifier QsciLexerHTML,Palabra clave VBScriptVBScript keyword QsciLexerHTMLNmero VBScriptVBScript number QsciLexerHTML:Cadena de caracteres VBScriptVBScript string QsciLexerHTML4Cadena VBScript sin cerrarVBScript unclosed string QsciLexerHTMLUUIDUUID QsciLexerIDL(Comentario de bloque Block comment QsciLexerJSONPor defectoDefault QsciLexerJSON&Secuencia de escapeEscape sequence QsciLexerJSONIRIIRI QsciLexerJSON$Palabra clave JSON JSON keyword QsciLexerJSON&JSON-LD compact IRIJSON-LD compact IRI QsciLexerJSON*Palabra clave JSON-LDJSON-LD keyword QsciLexerJSON&Comentario de lnea Line comment QsciLexerJSON NmeroNumber QsciLexerJSONOperadorOperator QsciLexerJSON&Error de intrprete Parsing error QsciLexerJSONPropiedadProperty QsciLexerJSON CadenaString QsciLexerJSON"Cadena sin cerrarUnclosed string QsciLexerJSON"Expresin regularRegular expressionQsciLexerJavaScript"Funciones basicasBasic functions QsciLexerLuaCarcter Character QsciLexerLuaComentarioComment QsciLexerLuaNCo-rutinas, e/s y funciones del sistema%Coroutines, i/o and system facilities QsciLexerLuaPor defectoDefault QsciLexerLuaIdentificador Identifier QsciLexerLuaPalabra claveKeyword QsciLexerLuaEtiquetaLabel QsciLexerLua&Comentario de lnea Line comment QsciLexerLuaCadena literalLiteral string QsciLexerLua NmeroNumber QsciLexerLuaOperadorOperator QsciLexerLuaPreprocesador Preprocessor QsciLexerLua(Cadena de caracteresString QsciLexerLuaNFuncines de cadena, tabla y matemticas!String, table and maths functions QsciLexerLua"Cadena sin cerrarUnclosed string QsciLexerLua2Definido por el usuario 1User defined 1 QsciLexerLua2Definido por el usuario 2User defined 2 QsciLexerLua2Definido por el usuario 3User defined 3 QsciLexerLua2Definido por el usuario 4User defined 4 QsciLexerLuaComentarioCommentQsciLexerMakefilePor defectoDefaultQsciLexerMakefile ErrorErrorQsciLexerMakefileOperadorOperatorQsciLexerMakefilePreprocesador PreprocessorQsciLexerMakefileObjetivoTargetQsciLexerMakefileVariableVariableQsciLexerMakefileBloque de cita Block quoteQsciLexerMarkdownBCdigo entre comillas hacia atrsCode between backticksQsciLexerMarkdownPCdigo entre comillas hacia atrs doblesCode between double backticksQsciLexerMarkdown Bloque de cdigo Code blockQsciLexerMarkdownPor defectoDefaultQsciLexerMarkdownBnfasis usando asterisco sencilloEmphasis using single asterisksQsciLexerMarkdownDnfasis usando guin bajo sencillo!Emphasis using single underscoresQsciLexerMarkdown Regla horizontalHorizontal ruleQsciLexerMarkdown*Encabezado de nivel 1Level 1 headerQsciLexerMarkdown*Encabezado de nivel 2Level 2 headerQsciLexerMarkdown*Encabezado de nivel 3Level 3 headerQsciLexerMarkdown*Encabezado de nivel 4Level 4 headerQsciLexerMarkdown*Encabezado de nivel 5Level 5 headerQsciLexerMarkdown*Encabezado de nivel 6Level 6 headerQsciLexerMarkdown EnlaceLinkQsciLexerMarkdown4Elemento de lista ordenadaOrdered list itemQsciLexerMarkdownPre-charPre-charQsciLexerMarkdownEspecialSpecialQsciLexerMarkdown Tachar Strike outQsciLexerMarkdownJnfasis fuerte usando doble asterisco&Strong emphasis using double asterisksQsciLexerMarkdownLnfasis fuerte usando doble guin bajo(Strong emphasis using double underscoresQsciLexerMarkdown:Elemento de lista sin ordenarUnordered list itemQsciLexerMarkdownComandoCommandQsciLexerMatlabComentarioCommentQsciLexerMatlabPor defectoDefaultQsciLexerMatlab4Cadena con comillas doblesDouble-quoted stringQsciLexerMatlabIdentificador IdentifierQsciLexerMatlabPalabra claveKeywordQsciLexerMatlab NmeroNumberQsciLexerMatlabOperadorOperatorQsciLexerMatlab6Cadena con comillas simplesSingle-quoted stringQsciLexerMatlabComentarioComment QsciLexerPOPor defectoDefault QsciLexerPOSealadoresFlags QsciLexerPO Sealador difuso Fuzzy flag QsciLexerPO&Contexto de mensajeMessage context QsciLexerPO8Texto de contexto de mensajeMessage context text QsciLexerPOXFin de lnea de texto de contexto de mensaje Message context text end-of-line QsciLexerPO0Identificador de mensajeMessage identifier QsciLexerPO<Texto identificador de mensajeMessage identifier text QsciLexerPO\Fin de lnea de texto identificador de mensaje#Message identifier text end-of-line QsciLexerPO"Cadena de mensajeMessage string QsciLexerPO4Texto de cadena de mensajeMessage string text QsciLexerPOTFin de lnea de texto de cadena de mensajeMessage string text end-of-line QsciLexerPO2Comentario de programadorProgrammer comment QsciLexerPOReferencia Reference QsciLexerPOMala directiva Bad directive QsciLexerPOVComentarioComment QsciLexerPOV&Lnea de comentario Comment line QsciLexerPOVPor defectoDefault QsciLexerPOVDirectiva Directive QsciLexerPOVIdentificador Identifier QsciLexerPOV NmeroNumber QsciLexerPOV2Objetos, CSG y aparienciaObjects, CSG and appearance QsciLexerPOVOperadorOperator QsciLexerPOV,Funciones predefinidasPredefined functions QsciLexerPOV8Identificadores predefinidosPredefined identifiers QsciLexerPOV(Cadena de caracteresString QsciLexerPOV@Tipos, modificadores y elementosTypes, modifiers and items QsciLexerPOV"Cadena sin cerrarUnclosed string QsciLexerPOV2Definido por el usuario 1User defined 1 QsciLexerPOV2Definido por el usuario 2User defined 2 QsciLexerPOV2Definido por el usuario 3User defined 3 QsciLexerPOV@Comentario de estilo '(* ... *)''(* ... *)' style commentQsciLexerPascal\Bloque de preprocesador de estilo '(*$ ... *)'&'(*$ ... *)' style pre-processor blockQsciLexerPascal>Comentario de estilo '{ ... }' '{ ... }' style commentQsciLexerPascalXBloque de preprocesador de estilo '{$ ... }'$'{$ ... }' style pre-processor blockQsciLexerPascalCarcter CharacterQsciLexerPascalPor defectoDefaultQsciLexerPascal$Nmero hexadecimalHexadecimal numberQsciLexerPascalIdentificador IdentifierQsciLexerPascalasm inline  Inline asmQsciLexerPascalPalabra claveKeywordQsciLexerPascal&Comentario de lnea Line commentQsciLexerPascal NmeroNumberQsciLexerPascalOperadorOperatorQsciLexerPascal6Cadena con comillas simplesSingle-quoted stringQsciLexerPascal"Cadena sin cerrarUnclosed stringQsciLexerPascal ArrayArray QsciLexerPerlnDocumento integrado (here document) con comilla inversaBacktick here document QsciLexerPerlxHere document con comilla hacia atrs (variable interpolada).Backtick here document (interpolated variable) QsciLexerPerlComilla inversa Backticks QsciLexerPerlTComilla hacia atrs (variable interpolada)!Backticks (interpolated variable) QsciLexerPerlComentarioComment QsciLexerPerl Seccin de datos Data section QsciLexerPerlPor defectoDefault QsciLexerPerljDocumento integrado (here document) con comilla dobleDouble-quoted here document QsciLexerPerllHere document con comilla doble (variable interpolada)3Double-quoted here document (interpolated variable) QsciLexerPerl4Cadena con comillas doblesDouble-quoted string QsciLexerPerl^Cadena con doble comilla (variable interpolada),Double-quoted string (interpolated variable) QsciLexerPerl ErrorError QsciLexerPerl"Cuerpo de formato Format body QsciLexerPerl0Identificador de formatoFormat identifier QsciLexerPerlHashHash QsciLexerPerldDelimitador de documento integrado (here document)Here document delimiter QsciLexerPerlIdentificador Identifier QsciLexerPerlPalabra claveKeyword QsciLexerPerl NmeroNumber QsciLexerPerlOperadorOperator QsciLexerPerlPODPOD QsciLexerPerlPOD textual POD verbatim QsciLexerPerl.Cadena con comillas (q)Quoted string (q) QsciLexerPerl0Cadena con comillas (qq)Quoted string (qq) QsciLexerPerl`Cadena entrecomillada (qq, variable interpolada))Quoted string (qq, interpolated variable) QsciLexerPerl0Cadena con comillas (qr)Quoted string (qr) QsciLexerPerl`Cadena entrecomillada (qr, variable interpolada))Quoted string (qr, interpolated variable) QsciLexerPerl0Cadena con comillas (qw)Quoted string (qw) QsciLexerPerl0Cadena con comillas (qx)Quoted string (qx) QsciLexerPerl`Cadena entrecomillada (qx, variable interpolada))Quoted string (qx, interpolated variable) QsciLexerPerl"Expresin regularRegular expression QsciLexerPerlPExpresin regular (variable interpolada)*Regular expression (interpolated variable) QsciLexerPerlEscalarScalar QsciLexerPerllDocumento integrado (here document) con comilla simpleSingle-quoted here document QsciLexerPerl6Cadena con comillas simplesSingle-quoted string QsciLexerPerl,Prototipo de subrutinaSubroutine prototype QsciLexerPerlSustitucin Substitution QsciLexerPerlFSubstitucin (variable interpolada)$Substitution (interpolated variable) QsciLexerPerl"Tabla de smbolos Symbol table QsciLexerPerlTraduccin Translation QsciLexerPerl&Parntesis de arrayArray parenthesisQsciLexerPostScript.Carcter de cadena malaBad string characterQsciLexerPostScriptCadena Base85 Base85 stringQsciLexerPostScriptComentarioCommentQsciLexerPostScriptComentario DSC DSC commentQsciLexerPostScript.Valor de comentario DSCDSC comment valueQsciLexerPostScriptPor defectoDefaultQsciLexerPostScript2Parntesis de diccionarioDictionary parenthesisQsciLexerPostScript$Cadena hexadecimalHexadecimal stringQsciLexerPostScript>Literal de evaluacin inmediataImmediately evaluated literalQsciLexerPostScriptPalabra claveKeywordQsciLexerPostScriptLiteralLiteralQsciLexerPostScript NombreNameQsciLexerPostScript NmeroNumberQsciLexerPostScript6Parntesis de procedimientoProcedure parenthesisQsciLexerPostScript TextoTextQsciLexerPostScriptAsignacin AssignmentQsciLexerPropertiesComentarioCommentQsciLexerPropertiesPor defectoDefaultQsciLexerProperties"Valor por defecto Default valueQsciLexerProperties ClaveKeyQsciLexerPropertiesSeccinSectionQsciLexerPropertiesNombre de clase Class nameQsciLexerPythonComentarioCommentQsciLexerPython(Bloque de comentario Comment blockQsciLexerPythonDecorador DecoratorQsciLexerPythonPor defectoDefaultQsciLexerPython4Cadena con comillas doblesDouble-quoted stringQsciLexerPython4Nombre de mtodo o funcinFunction or method nameQsciLexerPython.Identificador resaltadoHighlighted identifierQsciLexerPythonIdentificador IdentifierQsciLexerPythonPalabra claveKeywordQsciLexerPython NmeroNumberQsciLexerPythonOperadorOperatorQsciLexerPython6Cadena con comillas simplesSingle-quoted stringQsciLexerPython>Cadena con triple comilla dobleTriple double-quoted stringQsciLexerPython@Cadena con triple comilla simpleTriple single-quoted stringQsciLexerPython"Cadena sin cerrarUnclosed stringQsciLexerPythonCadena %Q %Q string QsciLexerRubyCadena %q %q string QsciLexerRubyCadena %r %r string QsciLexerRubyCadena %w %w string QsciLexerRubyCadena %x %x string QsciLexerRubyComilla inversa Backticks QsciLexerRubyNombre de clase Class name QsciLexerRuby"Variable de claseClass variable QsciLexerRubyComentarioComment QsciLexerRuby Seccin de datos Data section QsciLexerRubyPor defectoDefault QsciLexerRuby.Palabra clave degradadaDemoted keyword QsciLexerRuby4Cadena con comillas doblesDouble-quoted string QsciLexerRuby ErrorError QsciLexerRuby4Nombre de mtodo o funcinFunction or method name QsciLexerRuby GlobalGlobal QsciLexerRubyFDocumento integrado (here document) Here document QsciLexerRubydDelimitador de documento integrado (here document)Here document delimiter QsciLexerRubyIdentificador Identifier QsciLexerRuby*Variable de instanciaInstance variable QsciLexerRubyPalabra claveKeyword QsciLexerRuby Nombre de mdulo Module name QsciLexerRuby NmeroNumber QsciLexerRubyOperadorOperator QsciLexerRubyPODPOD QsciLexerRuby"Expresin regularRegular expression QsciLexerRuby6Cadena con comillas simplesSingle-quoted string QsciLexerRubySmboloSymbol QsciLexerRuby stderrstderr QsciLexerRuby stdinstdin QsciLexerRuby stdoutstdout QsciLexerRuby*# lnea de comentario# comment line QsciLexerSQLComentarioComment QsciLexerSQL&Lnea de comentario Comment line QsciLexerSQLPor defectoDefault QsciLexerSQL4Cadena con comillas doblesDouble-quoted string QsciLexerSQLIdentificador Identifier QsciLexerSQL0Palabra clave de JavadocJavaDoc keyword QsciLexerSQLBError en palabra clave de JavadocJavaDoc keyword error QsciLexerSQL8Comentario de estilo JavaDocJavaDoc style comment QsciLexerSQLPalabra claveKeyword QsciLexerSQL NmeroNumber QsciLexerSQLOperadorOperator QsciLexerSQL8Identificador entrecomilladoQuoted identifier QsciLexerSQL.Operador entrecomilladoQuoted operator QsciLexerSQL&Comentario SQL*PlusSQL*Plus comment QsciLexerSQL,Palabra clave SQL*PlusSQL*Plus keyword QsciLexerSQLPrompt SQL*PlusSQL*Plus prompt QsciLexerSQL6Cadena con comillas simplesSingle-quoted string QsciLexerSQL2Definido por el usuario 1User defined 1 QsciLexerSQL2Definido por el usuario 2User defined 2 QsciLexerSQL2Definido por el usuario 3User defined 3 QsciLexerSQL2Definido por el usuario 4User defined 4 QsciLexerSQLComandoCommandQsciLexerSpiceComentarioCommentQsciLexerSpicePor defectoDefaultQsciLexerSpiceDelimitador DelimiterQsciLexerSpiceFuncinFunctionQsciLexerSpiceIdentificador IdentifierQsciLexerSpice NmeroNumberQsciLexerSpiceParmetro ParameterQsciLexerSpice ValorValueQsciLexerSpice0Sustitucin de corchetesBrace substitution QsciLexerTCLComentarioComment QsciLexerTCL(Bloque de comentario Comment block QsciLexerTCL$Caja de comentario Comment box QsciLexerTCL&Lnea de comentario Comment line QsciLexerTCLPor defectoDefault QsciLexerTCL,Expandir palabra claveExpand keyword QsciLexerTCLIdentificador Identifier QsciLexerTCLModificadorModifier QsciLexerTCL NmeroNumber QsciLexerTCLOperadorOperator QsciLexerTCL8Palabra clave entrecomilladaQuoted keyword QsciLexerTCL*Cadena entrecomillada Quoted string QsciLexerTCLSustitucin Substitution QsciLexerTCL"Palabra clave TCL TCL keyword QsciLexerTCLComando Tk Tk command QsciLexerTCL Palabra clave Tk Tk keyword QsciLexerTCL2Definido por el usuario 1User defined 1 QsciLexerTCL2Definido por el usuario 2User defined 2 QsciLexerTCL2Definido por el usuario 3User defined 3 QsciLexerTCL2Definido por el usuario 4User defined 4 QsciLexerTCL$Palabra clave iTCL iTCL keyword QsciLexerTCLComandoCommand QsciLexerTeXPor defectoDefault QsciLexerTeX GrupoGroup QsciLexerTeXEspecialSpecial QsciLexerTeXSmboloSymbol QsciLexerTeX TextoText QsciLexerTeXAtributo Attribute QsciLexerVHDLComentarioComment QsciLexerVHDL(Bloque de comentario Comment block QsciLexerVHDL&Lnea de comentario Comment line QsciLexerVHDLPor defectoDefault QsciLexerVHDLIdentificador Identifier QsciLexerVHDLPalabra claveKeyword QsciLexerVHDL NmeroNumber QsciLexerVHDLOperadorOperator QsciLexerVHDL Funcin estndarStandard function QsciLexerVHDL"Operador estndarStandard operator QsciLexerVHDL Paquete estndarStandard package QsciLexerVHDLTipo estndar Standard type QsciLexerVHDL(Cadena de caracteresString QsciLexerVHDL"Cadena sin cerrarUnclosed string QsciLexerVHDL.Definido por el usuario User defined QsciLexerVHDLComentario'Bang Bang commentQsciLexerVerilogComentarioCommentQsciLexerVerilogPor defectoDefaultQsciLexerVerilogIdentificador IdentifierQsciLexerVerilogNDeclaracin de puerto de input inactivoInactive input port declarationQsciLexerVerilog\Declaracin de puerto de input/output inactivo&Inactive input/output port declarationQsciLexerVerilogHComentario de palabra clave inactivaInactive keyword commentQsciLexerVerilogPDeclaracin de puerto de output inactivo Inactive output port declarationQsciLexerVerilog6Conexin inactiva de puertoInactive port connectionQsciLexerVerilog<Declaracin de puerto de inputInput port declarationQsciLexerVerilog\Declaracin de puerto de input/output inactivoInput/output port declarationQsciLexerVerilog6Comentario de palabra claveKeyword commentQsciLexerVerilog&Comentario de lnea Line commentQsciLexerVerilogNumberQsciLexerVerilogOperadorOperatorQsciLexerVerilog>Declaracin de puerto de outputOutput port declarationQsciLexerVerilog$Conexin de puertoPort connectionQsciLexerVerilog.Bloque de preprocesadorPreprocessor blockQsciLexerVerilogTIdentificadores y palabras clave primarios Primary keywords and identifiersQsciLexerVerilogXPalabras clave e identificadores secundarios"Secondary keywords and identifiersQsciLexerVerilog CadenaStringQsciLexerVerilog Tarea de sistema System taskQsciLexerVerilog"Cadena sin cerrarUnclosed stringQsciLexerVerilogbTareas definidas por el usuario e identificadores"User defined tasks and identifiersQsciLexerVerilogComentarioComment QsciLexerYAMLPor defectoDefault QsciLexerYAML0Delimitador de documentoDocument delimiter QsciLexerYAMLIdentificador Identifier QsciLexerYAMLPalabra claveKeyword QsciLexerYAML NmeroNumber QsciLexerYAMLOperadorOperator QsciLexerYAMLReferencia Reference QsciLexerYAML:Marcador de error de sintaxisSyntax error marker QsciLexerYAML6Marcador de bloque de textoText block marker QsciLexerYAML&Copiar&Copy QsciScintilla &Pegar&Paste QsciScintilla&Rehacer&Redo QsciScintilla&Deshacer&Undo QsciScintillaCor&tarCu&t QsciScintilla BorrarDelete QsciScintilla Seleccionar todo Select All QsciScintillasqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_es.ts000066400000000000000000004376531345112435200240650ustar00rootroot00000000000000 QsciCommand Move down one line Desplazar una línea hacia abajo Extend selection down one line Extender la selección una línea hacia abajo Scroll view down one line Desplazar la vista una línea hacia abajo Extend rectangular selection down one line Extender la selección rectangular una línea hacia abajo Move up one line Desplazar una línea hacia arriba Extend selection up one line Extender la selección una línea hacia arriba Scroll view up one line Desplazar la vista una línea hacia arriba Extend rectangular selection up one line Extender la selección rectangular una línea hacia arriba Move up one paragraph Desplazar un párrafo hacia arriba Extend selection up one paragraph Extender la selección un párrafo hacia arriba Move down one paragraph Desplazar un párrafo hacia abajo Scroll to start of document Desplazar al principio del documento Scroll to end of document Desplazar al final del documento Scroll vertically to centre current line Desplazar verticalmente al centro de la línea actual Extend selection down one paragraph Extender la selección un párrafo hacia abajo Move left one character Mover un carácter hacia la izquierda Extend selection left one character Extender la selección un carácter hacia la izquierda Move left one word Mover una palabra hacia la izquierda Extend selection left one word Extender la selección una palabra a la izquierda Extend rectangular selection left one character Extender la selección rectangular un carácter hacia la izquierda Move right one character Mover un carácter hacia la derecha Extend selection right one character Extender la selección un carácter hacia la derecha Move right one word Mover una palabra hacia la derecha Extend selection right one word Extender la selección una palabra a la derecha Extend rectangular selection right one character Extender la selección rectangular un carácter hacia la derecha Move to end of previous word Mover al final de palabra anterior Extend selection to end of previous word Extender selección al final de la palabra anterior Move to end of next word Mover al final de la palabra siguiente Extend selection to end of next word Extender la selección hasta el final de la palabra siguiente Move left one word part Mover parte de una palabra hacia la izquierda Extend selection left one word part Extender la selección parte de una palabra a la izquierda Move right one word part Mover parte de una palabra hacia la derecha Extend selection right one word part Extender la selección parte de una palabra a la derecha Move up one page Mover hacia arriba una página Extend selection up one page Extender la selección hacia arriba una página Extend rectangular selection up one page Extender la selección rectangular hacia arriba una página Move down one page Mover hacia abajo una página Extend selection down one page Extender la selección hacia abajo una página Extend rectangular selection down one page Extender la selección rectangular una página hacia abajo Delete current character Borrar el carácter actual Cut selection Cortar selección Delete word to right Borrar palabra hacia la derecha Move to start of document line Mover al principio de la línea del documento Extend selection to start of document line Extender selección al principio de la línea del documento Extend rectangular selection to start of document line Extender selección rectangular al principio de la línea del documento Move to start of display line Mover al principio de la línea visualizada Extend selection to start of display line Extender selección al principio de la línea visualizada Move to start of display or document line Mover al principio de la línea visualizada o del documento Extend selection to start of display or document line Extender selección al principio de la línea visualizada o del documento Move to first visible character in document line Mover al primer carácter visible en la línea del documento Extend selection to first visible character in document line Extender selección al primer carácter visible en la línea del documento Extend rectangular selection to first visible character in document line Extender selección rectangular al primer carácter visible en la línea del documento Move to first visible character of display in document line Extender selección al primer carácter visualizado en la línea del documento Extend selection to first visible character in display or document line Extender selección al primer carácter de línea visualizada o del documento Move to end of document line Mover al final de la línea del documento Extend selection to end of document line Extender selección al final de la línea del documento Extend rectangular selection to end of document line Extender selección rectangular al final de la línea del documento Move to end of display line Mover al final de la línea visualizada Extend selection to end of display line Extender selección al final de la línea visualizada Move to end of display or document line Mover al final de la línea visualizada o del documento Extend selection to end of display or document line Extender selección al final de la línea visualizada o del documento Move to start of document Mover al principio del documento Extend selection to start of document Extender selección al principio del documento Move to end of document Mover al final del documento Extend selection to end of document Extender selección al final del documento Stuttered move up one page Mover progresivamente una página hacia arriba Stuttered extend selection up one page Extender progresivamente selección hacia arriba una página Stuttered move down one page Mover progresivamente una página hacia abajo Stuttered extend selection down one page Extender progresivamente selección hacia abajo una página Delete previous character if not at start of line Borrar carácter anterior si no está al principio de una línea Delete right to end of next word Borrar a la derecha hasta el final de la siguiente palabra Delete line to right Borrar línea hacia la derecha Transpose current and previous lines Transponer líneas actual y anterior Duplicate the current line Duplicar línea actual Select all Select document Seleccionar todo Move selected lines up one line Mover las líneas seleccionadas una línea hacia arriba Move selected lines down one line Mover las líneas seleccionadas una línea hacia abajo Toggle insert/overtype Conmutar insertar/sobreescribir Paste Pegar Copy selection Copiar selección Insert newline Insertar carácter de nueva línea De-indent one level Deshacer un nivel de indentado Cancel Cancelar Delete previous character Borrar carácter anterior Delete word to left Borrar palabra hacia la izquierda Delete line to left Borrar línea hacia la izquierda Undo last command Deshacer último comando Redo last command Rehacer último comando Indent one level Indentar un nivel Zoom in Aumentar zoom Zoom out Disminuir zoom Formfeed Carga de la página Cut current line Cortar línea actual Delete current line Borrar línea actual Copy current line Copiar línea actual Convert selection to lower case Convertir selección a minúsculas Convert selection to upper case Convertir selección a mayúsculas Duplicate selection Duplicar selección QsciLexerAVS Default Por defecto Block comment Comentario de bloque Nested block comment Comentario de bloque anidado Line comment Comentario de línea Number Número Operator Operador Identifier Identificador Double-quoted string Cadena con comillas dobles Triple double-quoted string Cadena con triple comilla doble Keyword Palabra clave Filter Filtro Plugin Plugin Function Función Clip property Propiedad de recorte User defined Definido por el usuario QsciLexerBash Default Por defecto Error Error Comment Comentario Number Número Keyword Palabra clave Double-quoted string Cadena con comillas dobles Single-quoted string Cadena con comillas simples Operator Operador Identifier Identificador Scalar Escalar Parameter expansion Expansión de parámetros Backticks Comilla inversa Here document delimiter Delimitador de documento integrado (here document) Single-quoted here document Documento integrado (here document) con comilla simple QsciLexerBatch Default Por defecto Comment Comentario Keyword Palabra clave Label Etiqueta Hide command character Ocultar caracteres de comando External command Comando externo Variable Variable Operator Operador QsciLexerCMake Default Por defecto Comment Comentario String Cadena de caracteres Left quoted string Cadena con comillas a la izquierda Right quoted string Cadena con comillas a la derecha Function Función Variable Variable Label Etiqueta User defined Definido por el usuario WHILE block Bloque WHILE FOREACH block Bloque FOREACH IF block Bloque IF MACRO block Bloque MACRO Variable within a string Variable en una cadena Number Número QsciLexerCPP Default Por defecto Inactive default Por defecto inactivo C comment Comentario C Inactive C comment Comentario C inactivo C++ comment Comentario C++ Inactive C++ comment Comentario C++ inactivo JavaDoc style C comment Comentario C de estilo JavaDoc Inactive JavaDoc style C comment Comentario C estilo JavaDoc inactivo Number Número Inactive number Número inactivo Keyword Palabra clave Inactive keyword Palabra clave inactiva Double-quoted string Cadena con comillas dobles Inactive double-quoted string Cadena con doble comilla inactiva Single-quoted string Cadena con comillas simples Inactive single-quoted string Cadena con comilla simple inactiva IDL UUID IDL UUID Inactive IDL UUID IDL UUID inactivo Pre-processor block Bloque de preprocesador Inactive pre-processor block Bloque de preprocesador inactivo Operator Operador Inactive operator Operador inactivo Identifier Identificador Inactive identifier Identificador inactivo Unclosed string Cadena sin cerrar Inactive unclosed string Cadena sin cerrar inactiva C# verbatim string Cadena C# textual Inactive C# verbatim string Cadena C# textual inactiva JavaScript regular expression Expresión regular JavaScript Inactive JavaScript regular expression Expresión regular JavaScript inactiva JavaDoc style C++ comment Comentario C++ de estilo JavaDoc Inactive JavaDoc style C++ comment Comentario C++ estilo JavaDoc inactivo Secondary keywords and identifiers Identificadores y palabras clave secundarios Inactive secondary keywords and identifiers Identificadores y palabras clave secundarios inactivos JavaDoc keyword Palabra clave de Javadoc Inactive JavaDoc keyword Palabra clave de JavaDoc inactiva JavaDoc keyword error Error en palabra clave de Javadoc Inactive JavaDoc keyword error Error en palabra clave de Javadoc inactivo Global classes and typedefs Clases globales y typedefs Inactive global classes and typedefs Clases globales y typedefs inactivos C++ raw string Cadena en bruto C++ Inactive C++ raw string Cadena inactiva C++ Vala triple-quoted verbatim string Cadena Vala con triple comilla textual Inactive Vala triple-quoted verbatim string Cadena Vala con triple comilla textual inactiva Pike hash-quoted string Cadena Pike con hash entrecomillado Inactive Pike hash-quoted string Cadena Pike con hash entrecomillado inactiva Pre-processor C comment Comentario C de preprocesador Inactive pre-processor C comment Comentario C de preprocesador inactivo JavaDoc style pre-processor comment Comentario de preprocesador estilo JavaDoc Inactive JavaDoc style pre-processor comment Comentario de preprocesador estilo JavaDoc inactivo User-defined literal Literal definido por el usuario Inactive user-defined literal Literal inactivo definido por el usuario Task marker Marcador de tarea Inactive task marker Marcador de tarea inactivo Escape sequence Secuencia de escape Inactive escape sequence Secuencia de escape inactiva QsciLexerCSS Default Por defecto Tag Etiqueta Class selector Selector de clase Pseudo-class Pseudoclase Unknown pseudo-class Pseudoclase desconocida Operator Operador CSS1 property Propiedad CSS1 Unknown property Propiedad desconocida Value Valor ID selector Selector de ID Important Importante @-rule Regla-@ Double-quoted string Cadena con comillas dobles Single-quoted string Cadena con comillas simples CSS2 property Propiedad CSS2 Attribute Atributo CSS3 property Propiedad CSS3 Pseudo-element Pseudoelemento Extended CSS property Propiedad CSS extendida Extended pseudo-class Pseudoclase extendida Extended pseudo-element Pseudoelemento extendido Media rule Regla de '@media' Variable Variable QsciLexerCSharp Verbatim string Cadena textual QsciLexerCoffeeScript Default Por defecto C-style comment Comentario de estilo C C++-style comment Comentario de estilo C++ JavaDoc C-style comment Comentario de estilo JavaDoc C Number Número Keyword Palabra clave Double-quoted string Cadena con comillas dobles Single-quoted string Cadena con comilla simple IDL UUID IDL UUID Pre-processor block Bloque de preprocesador Operator Operador Identifier Identificador Unclosed string Cadena sin cerrar C# verbatim string Cadena C# textual Regular expression Expresión regular JavaDoc C++-style comment Comentario de estilo JavaDoc C++ Secondary keywords and identifiers Identificadores y palabras clave secundarios JavaDoc keyword Palabra clave de JavaDoc JavaDoc keyword error Error en palabra clave de JavaDoc Global classes Clases globales Block comment Comentario de bloque Block regular expression Expresión regular de bloque Block regular expression comment Comentario de expresión regular de bloque Instance property Propiedad de instancia QsciLexerD Default Por defecto Block comment Comentario de bloque Line comment Comentario de línea DDoc style block comment Comentario de bloque estilo DDoc Nesting comment Comentario anidado Number Número Keyword Palabra clave Secondary keyword Palabra clave secundaria Documentation keyword Palabra clave de documentación Type definition Definición de tipo String Cadena de caracteres Unclosed string Cadena sin cerrar Character Carácter Operator Operador Identifier Identificador DDoc style line comment Comentario de línea estilo DDoc DDoc keyword Palabra clave DDoc DDoc keyword error Error en palabra clave DDOC Backquoted string Cadena con comillas hacia atrás Raw string Cadena en bruto User defined 1 Definido por el usuario 1 User defined 2 Definido por el usuario 2 User defined 3 Definido por el usuario 3 QsciLexerDiff Default Por defecto Comment Comentario Command Comando Header Encabezado Position Posición Removed line Línea eliminada Added line Línea añadida Changed line Línea modificada QsciLexerFortran77 Default Por defecto Comment Comentario Number Número Single-quoted string Cadena con comillas simples Double-quoted string Cadena con comillas dobles Unclosed string Cadena sin cerrar Operator Operador Identifier Identificador Keyword Palabra clave Intrinsic function Función intrínseca Extended function Función extendida Pre-processor block Bloque de preprocesador Dotted operator Operador punteado Label Etiqueta Continuation Continuación QsciLexerHTML HTML default HTML por defecto Tag Etiqueta Unknown tag Etiqueta desconocida Attribute Atributo Unknown attribute Atributo desconocido HTML number Número HTML HTML double-quoted string Cadena HTML con comillas dobles HTML single-quoted string Cadena HTML con comillas simples Other text in a tag Otro texto en una etiqueta HTML comment Comentario HTML Entity Entidad End of a tag Final de una etiqueta Start of an XML fragment Inicio de un fragmento XML End of an XML fragment Fin de un fragmento XML Script tag Etiqueta de script Start of an ASP fragment with @ Inicio de un fragmento ASP con @ Start of an ASP fragment Inicio de un fragmento ASP CDATA CDATA Start of a PHP fragment Inicio de un fragmento PHP Unquoted HTML value Valor HTML sin comillas ASP X-Code comment Comentario ASP X-Code SGML default SGML por defecto SGML command Comando SGML First parameter of an SGML command Primer parametro de un comando SGML SGML double-quoted string Cadena SGML con comillas dobles SGML single-quoted string Cadena SGML con comillas simples SGML error Error SGML SGML special entity Entidad SGML especial SGML comment Comentario SGML First parameter comment of an SGML command Comentario de primer parametro de un comando SGML SGML block default Bloque SGML por defecto Start of a JavaScript fragment Inicio de un fragmento JavaScript JavaScript default JavaScript por defecto JavaScript comment Comentario JavaScript JavaScript line comment Comentario de línea de JavaScript JavaDoc style JavaScript comment Comentario JavaScript de estilo JavaDoc JavaScript number Número JavaScript JavaScript word Palabra JavaScript JavaScript keyword Palabra clave JavaScript JavaScript double-quoted string Cadena JavaScript con comillas dobles JavaScript single-quoted string Cadena JavaScript con comillas simples JavaScript symbol Símbolo JavaScript JavaScript unclosed string Cadena JavaScript sin cerrar JavaScript regular expression Expresión regular JavaScript Start of an ASP JavaScript fragment Inicio de un fragmento de ASP JavaScript ASP JavaScript default ASP JavaScript por defecto ASP JavaScript comment Comentario de ASP JavaScript ASP JavaScript line comment Comentario de línea de ASP JavaScript JavaDoc style ASP JavaScript comment Comentario ASP JavaScript de estilo JavaDoc ASP JavaScript number Número ASP JavaScript ASP JavaScript word Palabra ASP JavaScript ASP JavaScript keyword Palabra clave ASP JavaScript ASP JavaScript double-quoted string Cadena ASP JavaScript con comillas dobles ASP JavaScript single-quoted string Cadena ASP JavaScript con comillas simples ASP JavaScript symbol Símbolo ASP JavaScript ASP JavaScript unclosed string Cadena ASP JavaScript sin cerrar ASP JavaScript regular expression Expresión regular ASP JavaScript Start of a VBScript fragment Inicio de un fragmento VBScript VBScript default VBScript por defecto VBScript comment Comentario VBScript VBScript number Número VBScript VBScript keyword Palabra clave VBScript VBScript string Cadena de caracteres VBScript VBScript identifier Identificador VBScript VBScript unclosed string Cadena VBScript sin cerrar Start of an ASP VBScript fragment Inicio de un fragmento de ASP VBScript ASP VBScript default ASP VBScript por defecto ASP VBScript comment Comentario de ASP VBScript ASP VBScript number Número ASP VBScript ASP VBScript keyword Palabra clave ASP VBScript ASP VBScript string Cadena de caracteres ASP VBScript ASP VBScript identifier Identificador ASP VBScript ASP VBScript unclosed string Cadena ASP VBScript sin cerrar Start of a Python fragment Inicio de un fragmento Python Python default Python por defecto Python comment Comentario Python Python number Número Python Python double-quoted string Cadena Python con comillas dobles Python single-quoted string Cadena Python con comillas simples Python keyword Palabra clave de Python Python triple double-quoted string Cadena Python con triple comilla doble Python triple single-quoted string Cadena Python con triple comilla simple Python class name Nombre de clase Python Python function or method name Nombre de método o función Python Python operator Operador Python Python identifier Identificador Python Start of an ASP Python fragment Inicio de un fragmento ASP Python ASP Python default ASP Python por defecto ASP Python comment Comentario ASP Python ASP Python number Número ASP Python ASP Python double-quoted string Cadena ASP Python con comillas dobles ASP Python single-quoted string Cadena ASP Python con comillas simples ASP Python keyword Palabra clave de ASP Python ASP Python triple double-quoted string Cadena ASP Python con triple comilla doble ASP Python triple single-quoted string Cadena ASP Python con triple comilla simple ASP Python class name Nombre de clase ASP Python ASP Python function or method name Nombre de método o función ASP Python ASP Python operator Operador ASP Python ASP Python identifier Identificador ASP Python PHP default PHP por defecto PHP double-quoted string Cadena PHP con comillas dobles PHP single-quoted string Cadena PHP con comillas simples PHP keyword Palabra clave PHP PHP number Número PHP PHP variable Variable PHP PHP comment Comentario PHP PHP line comment Comentario de línea PHP PHP double-quoted variable Variable PHP con comillas dobles PHP operator Operador PHP QsciLexerIDL UUID UUID QsciLexerJSON Default Por defecto Number Número String Cadena Unclosed string Cadena sin cerrar Property Propiedad Escape sequence Secuencia de escape Line comment Comentario de línea Block comment Comentario de bloque Operator Operador IRI IRI JSON-LD compact IRI JSON-LD compact IRI JSON keyword Palabra clave JSON JSON-LD keyword Palabra clave JSON-LD Parsing error Error de intérprete QsciLexerJavaScript Regular expression Expresión regular QsciLexerLua Default Por defecto Comment Comentario Line comment Comentario de línea Number Número Keyword Palabra clave String Cadena de caracteres Character Carácter Literal string Cadena literal Preprocessor Preprocesador Operator Operador Identifier Identificador Unclosed string Cadena sin cerrar Basic functions Funciones basicas String, table and maths functions Funcines de cadena, tabla y matemáticas Coroutines, i/o and system facilities Co-rutinas, e/s y funciones del sistema User defined 1 Definido por el usuario 1 User defined 2 Definido por el usuario 2 User defined 3 Definido por el usuario 3 User defined 4 Definido por el usuario 4 Label Etiqueta QsciLexerMakefile Default Por defecto Comment Comentario Preprocessor Preprocesador Variable Variable Operator Operador Target Objetivo Error Error QsciLexerMarkdown Default Por defecto Special Especial Strong emphasis using double asterisks Énfasis fuerte usando doble asterisco Strong emphasis using double underscores Énfasis fuerte usando doble guión bajo Emphasis using single asterisks Énfasis usando asterisco sencillo Emphasis using single underscores Énfasis usando guión bajo sencillo Level 1 header Encabezado de nivel 1 Level 2 header Encabezado de nivel 2 Level 3 header Encabezado de nivel 3 Level 4 header Encabezado de nivel 4 Level 5 header Encabezado de nivel 5 Level 6 header Encabezado de nivel 6 Pre-char Pre-char Unordered list item Elemento de lista sin ordenar Ordered list item Elemento de lista ordenada Block quote Bloque de cita Strike out Tachar Horizontal rule Regla horizontal Link Enlace Code between backticks Código entre comillas hacia atrás Code between double backticks Código entre comillas hacia atrás dobles Code block Bloque de código QsciLexerMatlab Default Por defecto Comment Comentario Command Comando Number Número Keyword Palabra clave Single-quoted string Cadena con comillas simples Operator Operador Identifier Identificador Double-quoted string Cadena con comillas dobles QsciLexerPO Default Por defecto Comment Comentario Message identifier Identificador de mensaje Message identifier text Texto identificador de mensaje Message string Cadena de mensaje Message string text Texto de cadena de mensaje Message context Contexto de mensaje Message context text Texto de contexto de mensaje Fuzzy flag Señalador difuso Programmer comment Comentario de programador Reference Referencia Flags Señaladores Message identifier text end-of-line Fin de línea de texto identificador de mensaje Message string text end-of-line Fin de línea de texto de cadena de mensaje Message context text end-of-line Fin de línea de texto de contexto de mensaje QsciLexerPOV Default Por defecto Comment Comentario Comment line Línea de comentario Number Número Operator Operador Identifier Identificador String Cadena de caracteres Unclosed string Cadena sin cerrar Directive Directiva Bad directive Mala directiva Objects, CSG and appearance Objetos, CSG y apariencia Types, modifiers and items Tipos, modificadores y elementos Predefined identifiers Identificadores predefinidos Predefined functions Funciones predefinidas User defined 1 Definido por el usuario 1 User defined 2 Definido por el usuario 2 User defined 3 Definido por el usuario 3 QsciLexerPascal Default Por defecto Line comment Comentario de línea Number Número Keyword Palabra clave Single-quoted string Cadena con comillas simples Operator Operador Identifier Identificador '{ ... }' style comment Comentario de estilo '{ ... }' '(* ... *)' style comment Comentario de estilo '(* ... *)' '{$ ... }' style pre-processor block Bloque de preprocesador de estilo '{$ ... }' '(*$ ... *)' style pre-processor block Bloque de preprocesador de estilo '(*$ ... *)' Hexadecimal number Número hexadecimal Unclosed string Cadena sin cerrar Character Carácter Inline asm asm inline QsciLexerPerl Default Por defecto Error Error Comment Comentario POD POD Number Número Keyword Palabra clave Double-quoted string Cadena con comillas dobles Single-quoted string Cadena con comillas simples Operator Operador Identifier Identificador Scalar Escalar Array Array Hash Hash Symbol table Tabla de símbolos Regular expression Expresión regular Substitution Sustitución Backticks Comilla inversa Data section Sección de datos Here document delimiter Delimitador de documento integrado (here document) Single-quoted here document Documento integrado (here document) con comilla simple Double-quoted here document Documento integrado (here document) con comilla doble Backtick here document Documento integrado (here document) con comilla inversa Quoted string (q) Cadena con comillas (q) Quoted string (qq) Cadena con comillas (qq) Quoted string (qx) Cadena con comillas (qx) Quoted string (qr) Cadena con comillas (qr) Quoted string (qw) Cadena con comillas (qw) POD verbatim POD textual Subroutine prototype Prototipo de subrutina Format identifier Identificador de formato Format body Cuerpo de formato Double-quoted string (interpolated variable) Cadena con doble comilla (variable interpolada) Translation Traducción Regular expression (interpolated variable) Expresión regular (variable interpolada) Substitution (interpolated variable) Substitución (variable interpolada) Backticks (interpolated variable) Comilla hacia atrás (variable interpolada) Double-quoted here document (interpolated variable) Here document con comilla doble (variable interpolada) Backtick here document (interpolated variable) Here document con comilla hacia atrás (variable interpolada) Quoted string (qq, interpolated variable) Cadena entrecomillada (qq, variable interpolada) Quoted string (qx, interpolated variable) Cadena entrecomillada (qx, variable interpolada) Quoted string (qr, interpolated variable) Cadena entrecomillada (qr, variable interpolada) QsciLexerPostScript Default Por defecto Comment Comentario DSC comment Comentario DSC DSC comment value Valor de comentario DSC Number Número Name Nombre Keyword Palabra clave Literal Literal Immediately evaluated literal Literal de evaluación inmediata Array parenthesis Paréntesis de array Dictionary parenthesis Paréntesis de diccionario Procedure parenthesis Paréntesis de procedimiento Text Texto Hexadecimal string Cadena hexadecimal Base85 string Cadena Base85 Bad string character Carácter de cadena mala QsciLexerProperties Default Por defecto Comment Comentario Section Sección Assignment Asignación Default value Valor por defecto Key Clave QsciLexerPython Default Por defecto Comment Comentario Number Número Double-quoted string Cadena con comillas dobles Single-quoted string Cadena con comillas simples Keyword Palabra clave Triple single-quoted string Cadena con triple comilla simple Triple double-quoted string Cadena con triple comilla doble Class name Nombre de clase Function or method name Nombre de método o función Operator Operador Identifier Identificador Comment block Bloque de comentario Unclosed string Cadena sin cerrar Highlighted identifier Identificador resaltado Decorator Decorador QsciLexerRuby Default Por defecto Comment Comentario Number Número Double-quoted string Cadena con comillas dobles Single-quoted string Cadena con comillas simples Keyword Palabra clave Class name Nombre de clase Function or method name Nombre de método o función Operator Operador Identifier Identificador Error Error POD POD Regular expression Expresión regular Global Global Symbol Símbolo Module name Nombre de módulo Instance variable Variable de instancia Class variable Variable de clase Backticks Comilla inversa Data section Sección de datos Here document delimiter Delimitador de documento integrado (here document) Here document Documento integrado (here document) %q string Cadena %q %Q string Cadena %Q %x string Cadena %x %r string Cadena %r %w string Cadena %w Demoted keyword Palabra clave degradada stdin stdin stdout stdout stderr stderr QsciLexerSQL Default Por defecto Comment Comentario Number Número Keyword Palabra clave Single-quoted string Cadena con comillas simples Operator Operador Identifier Identificador Comment line Línea de comentario JavaDoc style comment Comentario de estilo JavaDoc Double-quoted string Cadena con comillas dobles SQL*Plus keyword Palabra clave SQL*Plus SQL*Plus prompt Prompt SQL*Plus SQL*Plus comment Comentario SQL*Plus # comment line # línea de comentario JavaDoc keyword Palabra clave de Javadoc JavaDoc keyword error Error en palabra clave de Javadoc User defined 1 Definido por el usuario 1 User defined 2 Definido por el usuario 2 User defined 3 Definido por el usuario 3 User defined 4 Definido por el usuario 4 Quoted identifier Identificador entrecomillado Quoted operator Operador entrecomillado QsciLexerSpice Default Por defecto Identifier Identificador Command Comando Function Función Parameter Parámetro Number Número Delimiter Delimitador Value Valor Comment Comentario QsciLexerTCL Default Por defecto Comment Comentario Comment line Línea de comentario Number Número Quoted keyword Palabra clave entrecomillada Quoted string Cadena entrecomillada Operator Operador Identifier Identificador Substitution Sustitución Brace substitution Sustitución de corchetes Modifier Modificador Expand keyword Expandir palabra clave TCL keyword Palabra clave TCL Tk keyword Palabra clave Tk iTCL keyword Palabra clave iTCL Tk command Comando Tk User defined 1 Definido por el usuario 1 User defined 2 Definido por el usuario 2 User defined 3 Definido por el usuario 3 User defined 4 Definido por el usuario 4 Comment box Caja de comentario Comment block Bloque de comentario QsciLexerTeX Default Por defecto Special Especial Group Grupo Symbol Símbolo Command Comando Text Texto QsciLexerVHDL Default Por defecto Comment Comentario Comment line Línea de comentario Number Número String Cadena de caracteres Operator Operador Identifier Identificador Unclosed string Cadena sin cerrar Keyword Palabra clave Standard operator Operador estándar Attribute Atributo Standard function Función estándar Standard package Paquete estándar Standard type Tipo estándar User defined Definido por el usuario Comment block Bloque de comentario QsciLexerVerilog Default Por defecto Comment Comentario Line comment Comentario de línea Bang comment Comentario'Bang Number Primary keywords and identifiers Identificadores y palabras clave primarios String Cadena Secondary keywords and identifiers Palabras clave e identificadores secundarios System task Tarea de sistema Preprocessor block Bloque de preprocesador Operator Operador Identifier Identificador Unclosed string Cadena sin cerrar User defined tasks and identifiers Tareas definidas por el usuario e identificadores Keyword comment Comentario de palabra clave Inactive keyword comment Comentario de palabra clave inactiva Input port declaration Declaración de puerto de input Inactive input port declaration Declaración de puerto de input inactivo Output port declaration Declaración de puerto de output Inactive output port declaration Declaración de puerto de output inactivo Input/output port declaration Declaración de puerto de input/output inactivo Inactive input/output port declaration Declaración de puerto de input/output inactivo Port connection Conexión de puerto Inactive port connection Conexión inactiva de puerto QsciLexerYAML Default Por defecto Comment Comentario Identifier Identificador Keyword Palabra clave Number Número Reference Referencia Document delimiter Delimitador de documento Text block marker Marcador de bloque de texto Syntax error marker Marcador de error de sintaxis Operator Operador QsciScintilla &Undo &Deshacer &Redo &Rehacer Cu&t Cor&tar &Copy &Copiar &Paste &Pegar Delete Borrar Select All Seleccionar todo sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_fr.qm000066400000000000000000001474651345112435200240530ustar00rootroot00000000000000FN}+7&B"k44`3-@U4 N$!#Nhh2_g(9U Mp @u*O7 >b<9tWXUf$UGeoi?h9Z4%3]Q-[[uf7l&eMI~ŰX:! 4ktOX|zCFn;z w a,vx 66ctP TI!$<],_OI@A@@AS@A@A@AD@BAI@B@B@B@B@CA@C@Cp@CL@C@Dp@D@DaA6OHxC[>\8#)\8&\8+\80\8:\8?\8F\8y.\8~5\8\8\8\8]\8\8[\8=\8\8\8\8\8\8r1r'O5"W5&U5.^595>5E5|5K55555w55=5J5\558G+G@/Gz)G~G|GKG9\9\tx[*?^tYe]u_p }1i};i}G:d('s.C|SNjȐ#\Ȑ'Ȑ*Ȑ1.Ȑ6Ȑ;%Ȑ?ȐFȐybȐ~hȐȐȐ}ȐȐȐȐqȐȐȐȐȐѽ8'ԇ)fm}  {"[)6%) 6|_udd*d*id*Cd*i5A܌]$n1Hp{ _Tt&c*`,3g5<.j o1|^{VB"="{"lT~*~,F~83~LJ2c2u[qL2T ~D &0'# &0'Y 3 ?3r @|Us fy orD @t Vy vp ) ^i| !d %- -K 5! 9 D    a  y X$p = i f 4bz '4, *S$h *S *S +O4 0M Iq>'D S SM d8B d8 d8 d8 d<$ d<( d<+ d<B d<D d<{ d< d<A d< d< d<1 d<i d<i d< d< d< d<D d<- d<; d<h d<\ d4, k, k,f qeU s(( $^ d R4 BQ t!( t$ t)( t+P t- t4 t8 t> tC tDy tw t| t t t t t t t t t t t$ tC t t t t t t zX+ ZTb  Z5 _f ?a " 5 'd4 (p ;2r ;^Q A\& Ep _ cVB d9 dN eud 4$oL 3 Ws  y |. |:9 | Bu ӕ Oc O 4' 4 ؗb Ef' )? )k )z >i+ J" J WL f5 o% oq o 'W  %' AE [a / T 'c xK  .p  . EsF '4 943| @&4l' @*$k _{N t}4" t}4?r t}4x t}4} t}4p t}45 /[ ?DM Ig2 Ig=j Ig@| IgH= Igzy Ig Ig@ Ig Ig Ig Ig t. t9 tM `e .qm yPrWv cs 7M'9 O=egVjW\`]gReTZ;hw^irmXldJ@wgl{N&4Y(`2d6<GB< 4BK)N)wƦhn!L wkCjC20I2_@Q3#}w8l4+4VRΒhu@2dc)t2nETlu!9ryBIidAnnulerCancel QsciCommandZConversion de la ligne courante en minusculesConvert selection to lower case QsciCommandZConversion de la ligne courante en majusculesConvert selection to upper case QsciCommand0Copier la ligne couranteCopy current line QsciCommand&Copier la slectionCopy selection QsciCommand0Couper la ligne couranteCut current line QsciCommand&Couper la slection Cut selection QsciCommand>Effacement du caractre courantDelete current character QsciCommand@Suppression de la ligne couranteDelete current line QsciCommandHEffacer la partie gauche de la ligneDelete line to left QsciCommandVSuppression de la partie droite de la ligneDelete line to right QsciCommand@Suppression du dernier caractreDelete previous character QsciCommand8Suppression du mot de gaucheDelete word to left QsciCommand8Suppression du mot de droiteDelete word to right QsciCommand~Extension de la slection rectangulaire d'une ligne vers le bas*Extend rectangular selection down one line QsciCommand|Extension de la slection rectangulaire d'une page vers le bas*Extend rectangular selection down one page QsciCommandExtension de la slection rectangulaire d'un caractre vers la gauche/Extend rectangular selection left one character QsciCommandExtension de la slection rectangulaire d'un caractre vers la droite0Extend rectangular selection right one character QsciCommandExtension de la slection rectangulaire d'une ligne vers le haut(Extend rectangular selection up one line QsciCommand~Extension de la slection rectangulaire d'une page vers le haut(Extend rectangular selection up one page QsciCommandbExtension de la slection d'une ligne vers le basExtend selection down one line QsciCommand`Extension de la slection d'une page vers le basExtend selection down one page QsciCommandjExtension de la slection d'un paragraphe vers le bas#Extend selection down one paragraph QsciCommandnExtension de la slection d'un caractre vers la gauche#Extend selection left one character QsciCommandbExtension de la slection d'un mot vers la gaucheExtend selection left one word QsciCommandtExtension de la slection d'une part de mot vers la gauche#Extend selection left one word part QsciCommandnExtension de la slection d'un caractre vers la droite$Extend selection right one character QsciCommandbExtension de la slection d'un mot vers la droiteExtend selection right one word QsciCommandtExtension de la slection d'une part de mot vers la droite$Extend selection right one word part QsciCommandbExtension de la slection vers fin du mot suivant$Extend selection to end of next word QsciCommandfExtension de la slection vers fin du mot prcdent(Extend selection to end of previous word QsciCommandrExtension de la slection vers dbut de ligne du document*Extend selection to start of document line QsciCommanddExtension de la slection d'une ligne vers le hautExtend selection up one line QsciCommandbExtension de la slection d'une page vers le hautExtend selection up one page QsciCommandlExtension de la slection d'un paragraphe vers le haut!Extend selection up one paragraph QsciCommand*Chargement de la pageFormfeed QsciCommand.Indentation d'un niveauIndent one level QsciCommandFDplacement d'une ligne vers le basMove down one line QsciCommandDDplacement d'une page vers le basMove down one page QsciCommandNDplacement d'un paragraphe vers le basMove down one paragraph QsciCommandRDplacement d'un caractre vers la gaucheMove left one character QsciCommandFDplacement d'un mot vers la gaucheMove left one word QsciCommandXDplacement d'une part de mot vers la gaucheMove left one word part QsciCommandRDplacement d'un caractre vers la droiteMove right one character QsciCommandFDplacement d'un mot vers la droiteMove right one word QsciCommandXDplacement d'une part de mot vers la droiteMove right one word part QsciCommandFDplacement vers fin du mot suivantMove to end of next word QsciCommandJDplacement vers fin du mot prcdentMove to end of previous word QsciCommandVDplacement vers dbut de ligne du documentMove to start of document line QsciCommandHDplacement d'une ligne vers le hautMove up one line QsciCommandFDplacement d'une page vers le hautMove up one page QsciCommandPDplacement d'un paragraphe vers le hautMove up one paragraph QsciCommand CollerPaste QsciCommand8Refaire la dernire commandeRedo last command QsciCommand<Descendre la fin du documentScroll to end of document QsciCommand:Remonter au dbut du documentScroll to start of document QsciCommandhDfiler verticalement pour centrer la ligne courante(Scroll vertically to centre current line QsciCommand6Decendre la vue d'une ligneScroll view down one line QsciCommand6Remonter la vue d'une ligneScroll view up one line QsciCommandBBasculement Insertion /EcrasementToggle insert/overtype QsciCommandZoom avantZoom in QsciCommandZoom arrireZoom out QsciCommandPar dfautDefault QsciLexerAVSRChaine de caractres (guillemets doubles)Double-quoted string QsciLexerAVS FiltreFilter QsciLexerAVSFonctionFunction QsciLexerAVSIdentificateur Identifier QsciLexerAVSMot-clKeyword QsciLexerAVS(Commentaire de ligne Line comment QsciLexerAVS NombreNumber QsciLexerAVSOprateurOperator QsciLexerAVSExtensionPlugin QsciLexerAVS\Chaine de caractres HTML (guillemets simples)Triple double-quoted string QsciLexerAVSQuotes inverses Backticks QsciLexerBashCommentaireComment QsciLexerBashPar dfautDefault QsciLexerBashRChaine de caractres (guillemets doubles)Double-quoted string QsciLexerBash ErreurError QsciLexerBash4Ici dlimiteur de documentHere document delimiter QsciLexerBashIdentificateur Identifier QsciLexerBashMot-clKeyword QsciLexerBash NombreNumber QsciLexerBashOprateurOperator QsciLexerBash,Extension de paramtreParameter expansion QsciLexerBashScalaireScalar QsciLexerBashFDocument intgr guillemets simplesSingle-quoted here document QsciLexerBashRChaine de caractres (guillemets simples)Single-quoted string QsciLexerBashCommentaireCommentQsciLexerBatchPar dfautDefaultQsciLexerBatch Commande externeExternal commandQsciLexerBatch<Cacher le caratre de commandeHide command characterQsciLexerBatchMot-clKeywordQsciLexerBatch TitreLabelQsciLexerBatchOprateurOperatorQsciLexerBatchVariableVariableQsciLexerBatchCommentaireCommentQsciLexerCMakePar dfautDefaultQsciLexerCMake TitreLabelQsciLexerCMake NombreNumberQsciLexerCMake(Chane de caractresStringQsciLexerCMakeVariableVariableQsciLexerCMakeCommentaire C C comment QsciLexerCPPCommentaire C++ C++ comment QsciLexerCPPPar dfautDefault QsciLexerCPPRChaine de caractres (guillemets doubles)Double-quoted string QsciLexerCPPPClasses globales et dfinitions de typesGlobal classes and typedefs QsciLexerCPPIdentificateur Identifier QsciLexerCPPMot-cl JavaDocJavaDoc keyword QsciLexerCPP2Erreur de mot-cl JavaDocJavaDoc keyword error QsciLexerCPP<Commentaire C de style JavaDocJavaDoc style C comment QsciLexerCPP@Commentaire C++ de style JavaDocJavaDoc style C++ comment QsciLexerCPP>Expression rgulire JavaScriptJavaScript regular expression QsciLexerCPPMot-clKeyword QsciLexerCPP NombreNumber QsciLexerCPPOprateurOperator QsciLexerCPP<Instructions de pr-processingPre-processor block QsciLexerCPPHSeconds mots-cls et identificateurs"Secondary keywords and identifiers QsciLexerCPPRChaine de caractres (guillemets simples)Single-quoted string QsciLexerCPPBChaine de caractres non refermeUnclosed string QsciLexerCPPrgle-@@-rule QsciLexerCSSAttribut Attribute QsciLexerCSSProprit CSS1 CSS1 property QsciLexerCSSProprit CSS2 CSS2 property QsciLexerCSSProprit CSS3 CSS3 property QsciLexerCSS ClasseClass selector QsciLexerCSSPar dfautDefault QsciLexerCSSRChaine de caractres (guillemets doubles)Double-quoted string QsciLexerCSSID ID selector QsciLexerCSSImportant Important QsciLexerCSSOprateurOperator QsciLexerCSSPseudo-classe Pseudo-class QsciLexerCSSRChaine de caractres (guillemets simples)Single-quoted string QsciLexerCSS BaliseTag QsciLexerCSS$Proprit inconnueUnknown property QsciLexerCSS*Peudo-classe inconnueUnknown pseudo-class QsciLexerCSS ValeurValue QsciLexerCSSVariableVariable QsciLexerCSSChaine verbatimVerbatim stringQsciLexerCSharpPar dfautDefaultQsciLexerCoffeeScriptRChaine de caractres (guillemets doubles)Double-quoted stringQsciLexerCoffeeScriptIdentificateur IdentifierQsciLexerCoffeeScriptMot-cl JavaDocJavaDoc keywordQsciLexerCoffeeScript2Erreur de mot-cl JavaDocJavaDoc keyword errorQsciLexerCoffeeScriptMot-clKeywordQsciLexerCoffeeScript NombreNumberQsciLexerCoffeeScriptOprateurOperatorQsciLexerCoffeeScript<Instructions de pr-processingPre-processor blockQsciLexerCoffeeScript(Expression rgulireRegular expressionQsciLexerCoffeeScriptHSeconds mots-cls et identificateurs"Secondary keywords and identifiersQsciLexerCoffeeScriptRChaine de caractres (guillemets simples)Single-quoted stringQsciLexerCoffeeScriptBChaine de caractres non refermeUnclosed stringQsciLexerCoffeeScriptCaractre Character QsciLexerDMot-cl DDoc DDoc keyword QsciLexerD,Erreur de mot-cl DDocDDoc keyword error QsciLexerDPar dfautDefault QsciLexerDIdentificateur Identifier QsciLexerDMot-clKeyword QsciLexerD(Commentaire de ligne Line comment QsciLexerD NombreNumber QsciLexerDOprateurOperator QsciLexerD(Chane de caractresString QsciLexerDBChaine de caractres non refermeUnclosed string QsciLexerD0Dfinition utilisateur 1User defined 1 QsciLexerD0Dfinition utilisateur 2User defined 2 QsciLexerD0Dfinition utilisateur 3User defined 3 QsciLexerDLigne ajoute Added line QsciLexerDiffLigne change Changed line QsciLexerDiffCommandeCommand QsciLexerDiffCommentaireComment QsciLexerDiffPar dfautDefault QsciLexerDiffEn-tteHeader QsciLexerDiffPositionPosition QsciLexerDiffLigne supprime Removed line QsciLexerDiffCommentaireCommentQsciLexerFortran77 ContinuationQsciLexerFortran77Par dfautDefaultQsciLexerFortran77RChaine de caractres (guillemets doubles)Double-quoted stringQsciLexerFortran77 Fonction tendueExtended functionQsciLexerFortran77Identificateur IdentifierQsciLexerFortran77(Fonction intrinsqueIntrinsic functionQsciLexerFortran77Mot-clKeywordQsciLexerFortran77 TitreLabelQsciLexerFortran77 NombreNumberQsciLexerFortran77OprateurOperatorQsciLexerFortran77<Instructions de pr-processingPre-processor blockQsciLexerFortran77RChaine de caractres (guillemets simples)Single-quoted stringQsciLexerFortran77BChaine de caractres non refermeUnclosed stringQsciLexerFortran774Commentaire JavaScript ASPASP JavaScript comment QsciLexerHTML2JavaScript ASP par dfautASP JavaScript default QsciLexerHTMLpChaine de caractres JavaScript ASP (guillemets doubles)#ASP JavaScript double-quoted string QsciLexerHTML.Mot-cl JavaScript ASP ASP JavaScript keyword QsciLexerHTMLFCommentaire de ligne JavaScript ASPASP JavaScript line comment QsciLexerHTML*Nombre JavaScript ASPASP JavaScript number QsciLexerHTMLFExpression rgulire JavaScript ASP!ASP JavaScript regular expression QsciLexerHTMLpChaine de caractres JavaScript ASP (guillemets simples)#ASP JavaScript single-quoted string QsciLexerHTML,Symbole JavaScript ASPASP JavaScript symbol QsciLexerHTML`Chaine de caractres JavaScript ASP non refermeASP JavaScript unclosed string QsciLexerHTML$Mot JavaScript ASPASP JavaScript word QsciLexerHTML0Nom de classe Python ASPASP Python class name QsciLexerHTML,Commentaire Python ASPASP Python comment QsciLexerHTML*Python ASP par dfautASP Python default QsciLexerHTMLhChaine de caractres Python ASP (guillemets doubles)ASP Python double-quoted string QsciLexerHTML<Mthode ou fonction Python ASP"ASP Python function or method name QsciLexerHTML2Identificateur Python ASPASP Python identifier QsciLexerHTML$Mot-cl Python ASPASP Python keyword QsciLexerHTML"Nombre Python ASPASP Python number QsciLexerHTML(Oprateur Python ASPASP Python operator QsciLexerHTMLhChaine de caractres Python ASP (guillemets simples)ASP Python single-quoted string QsciLexerHTMLxChaine de caractres Python ASP (triples guillemets doubles)&ASP Python triple double-quoted string QsciLexerHTMLxChaine de caractres Python ASP (triples guillemets simples)&ASP Python triple single-quoted string QsciLexerHTML0Commentaire VBScript ASPASP VBScript comment QsciLexerHTML.VBScript ASP par dfautASP VBScript default QsciLexerHTML6Identificateur VBScript ASPASP VBScript identifier QsciLexerHTML*Mot-cl VBScript ASP ASP VBScript keyword QsciLexerHTML&Nombre VBScript ASPASP VBScript number QsciLexerHTMLBChaine de caractres VBScript ASPASP VBScript string QsciLexerHTML\Chaine de caractres VBScript ASP non refermeASP VBScript unclosed string QsciLexerHTML,Commentaire X-Code ASPASP X-Code comment QsciLexerHTMLAttribut Attribute QsciLexerHTML CDATACDATA QsciLexerHTMLBalise fermante End of a tag QsciLexerHTML Fin de block XMLEnd of an XML fragment QsciLexerHTML EntitEntity QsciLexerHTMLbPremier paramtre de commentaire de commande SGML*First parameter comment of an SGML command QsciLexerHTMLDPremier paramtre de commande SGML"First parameter of an SGML command QsciLexerHTML Commentaire HTML HTML comment QsciLexerHTMLHTML par dfaut HTML default QsciLexerHTML\Chaine de caractres HTML (guillemets doubles)HTML double-quoted string QsciLexerHTMLNombre HTML HTML number QsciLexerHTML\Chaine de caractres HTML (guillemets simples)HTML single-quoted string QsciLexerHTMLVCommentaire JavaScript ASP de style JavaDoc$JavaDoc style ASP JavaScript comment QsciLexerHTMLNCommentaire JavaScript de style JavaDoc JavaDoc style JavaScript comment QsciLexerHTML,Commentaire JavaScriptJavaScript comment QsciLexerHTML*JavaScript par dfautJavaScript default QsciLexerHTMLhChaine de caractres JavaScript (guillemets doubles)JavaScript double-quoted string QsciLexerHTML$Mot-cl JavaScriptJavaScript keyword QsciLexerHTML>Commentaire de ligne JavaScriptJavaScript line comment QsciLexerHTML"Nombre JavaScriptJavaScript number QsciLexerHTML>Expression rgulire JavaScriptJavaScript regular expression QsciLexerHTMLhChaine de caractres JavaScript (guillemets simples)JavaScript single-quoted string QsciLexerHTML$Symbole JavaScriptJavaScript symbol QsciLexerHTMLXChaine de caractres JavaScript non refermeJavaScript unclosed string QsciLexerHTMLMot JavaScriptJavaScript word QsciLexerHTML8Autre texte dans les balisesOther text in a tag QsciLexerHTMLCommentaire PHP PHP comment QsciLexerHTMLPHP par dfaut PHP default QsciLexerHTMLZChaine de caractres PHP (guillemets doubles)PHP double-quoted string QsciLexerHTMLBVariable PHP (guillemets doubles)PHP double-quoted variable QsciLexerHTMLMot-cl PHP PHP keyword QsciLexerHTML0Commentaire de ligne PHPPHP line comment QsciLexerHTMLNombre PHP PHP number QsciLexerHTMLOprateur PHP PHP operator QsciLexerHTMLZChaine de caractres PHP (guillemets simples)PHP single-quoted string QsciLexerHTMLVariable PHP PHP variable QsciLexerHTML(Nom de classe PythonPython class name QsciLexerHTML$Commentaire PythonPython comment QsciLexerHTML"Python par dfautPython default QsciLexerHTML`Chaine de caractres Python (guillemets doubles)Python double-quoted string QsciLexerHTML4Mthode ou fonction PythonPython function or method name QsciLexerHTML*Identificateur PythonPython identifier QsciLexerHTMLMot-cl PythonPython keyword QsciLexerHTMLNombre Python Python number QsciLexerHTML Oprateur PythonPython operator QsciLexerHTML`Chaine de caractres Python (guillemets simples)Python single-quoted string QsciLexerHTMLpChaine de caractres Python (triples guillemets doubles)"Python triple double-quoted string QsciLexerHTMLpChaine de caractres Python (triples guillemets simples)"Python triple single-quoted string QsciLexerHTML*Block SGML par dfautSGML block default QsciLexerHTMLCommande SGML SGML command QsciLexerHTML Commentaire SGML SGML comment QsciLexerHTMLSGML par dfaut SGML default QsciLexerHTML\Chaine de caractres SGML (guillemets doubles)SGML double-quoted string QsciLexerHTMLErreur SGML SGML error QsciLexerHTML\Chaine de caractres SGML (guillemets simples)SGML single-quoted string QsciLexerHTML(Entit SGML spcialeSGML special entity QsciLexerHTML Balise de script Script tag QsciLexerHTML2Dbut de block JavaScriptStart of a JavaScript fragment QsciLexerHTML$Dbut de block PHPStart of a PHP fragment QsciLexerHTML*Dbut de block PythonStart of a Python fragment QsciLexerHTML.Dbut de block VBScriptStart of a VBScript fragment QsciLexerHTML:Dbut de block JavaScript ASP#Start of an ASP JavaScript fragment QsciLexerHTML2Dbut de block Python ASPStart of an ASP Python fragment QsciLexerHTML6Dbut de block VBScript ASP!Start of an ASP VBScript fragment QsciLexerHTML$Dbut de block ASPStart of an ASP fragment QsciLexerHTML2Dbut de block ASP avec @Start of an ASP fragment with @ QsciLexerHTML$Dbut de block XMLStart of an XML fragment QsciLexerHTML BaliseTag QsciLexerHTML Attribut inconnuUnknown attribute QsciLexerHTMLBalise inconnue Unknown tag QsciLexerHTML6Valeur HTML sans guillemetsUnquoted HTML value QsciLexerHTML(Commentaire VBScriptVBScript comment QsciLexerHTML&VBScript par dfautVBScript default QsciLexerHTML.Identificateur VBScriptVBScript identifier QsciLexerHTML Mot-cl VBScriptVBScript keyword QsciLexerHTMLNombre VBScriptVBScript number QsciLexerHTML:Chaine de caractres VBScriptVBScript string QsciLexerHTMLTChaine de caractres VBScript non refermeVBScript unclosed string QsciLexerHTMLUUIDUUID QsciLexerIDL*Block de commentaires Block comment QsciLexerJSONPar dfautDefault QsciLexerJSON,Squence d'chappementEscape sequence QsciLexerJSONIRI QsciLexerJSONMot-cl JSON JSON keyword QsciLexerJSONMot-cl JSON-LDJSON-LD keyword QsciLexerJSON(Commentaire de ligne Line comment QsciLexerJSON NombreNumber QsciLexerJSONOprateurOperator QsciLexerJSON Erreur d'analyse Parsing error QsciLexerJSONPropritProperty QsciLexerJSON(Chane de caractresString QsciLexerJSONBChaine de caractres non refermeUnclosed string QsciLexerJSON(Expression rgulireRegular expressionQsciLexerJavaScript"Fonctions de baseBasic functions QsciLexerLuaCaractre Character QsciLexerLuaCommentaireComment QsciLexerLuaHCoroutines, i/o et fonctions systme%Coroutines, i/o and system facilities QsciLexerLuaPar dfautDefault QsciLexerLuaIdentificateur Identifier QsciLexerLuaMot-clKeyword QsciLexerLua TitreLabel QsciLexerLua(Commentaire de ligne Line comment QsciLexerLua Chane littraleLiteral string QsciLexerLua NombreNumber QsciLexerLuaOprateurOperator QsciLexerLuaPrprocessing Preprocessor QsciLexerLua(Chane de caractresString QsciLexerLuafFonctions sur les chaines, tables et fonctions math!String, table and maths functions QsciLexerLuaBChaine de caractres non refermeUnclosed string QsciLexerLua0Dfinition utilisateur 1User defined 1 QsciLexerLua0Dfinition utilisateur 2User defined 2 QsciLexerLua0Dfinition utilisateur 3User defined 3 QsciLexerLua0Dfinition utilisateur 4User defined 4 QsciLexerLuaCommentaireCommentQsciLexerMakefilePar dfautDefaultQsciLexerMakefile ErreurErrorQsciLexerMakefileOprateurOperatorQsciLexerMakefilePrprocessing PreprocessorQsciLexerMakefile CibleTargetQsciLexerMakefileVariableVariableQsciLexerMakefilePar dfautDefaultQsciLexerMarkdownSpcialSpecialQsciLexerMarkdownCommandeCommandQsciLexerMatlabCommentaireCommentQsciLexerMatlabPar dfautDefaultQsciLexerMatlabRChaine de caractres (guillemets doubles)Double-quoted stringQsciLexerMatlabIdentificateur IdentifierQsciLexerMatlabMot-clKeywordQsciLexerMatlab NombreNumberQsciLexerMatlabOprateurOperatorQsciLexerMatlabRChaine de caractres (guillemets simples)Single-quoted stringQsciLexerMatlabCommentaireComment QsciLexerPOPar dfautDefault QsciLexerPO$Mauvaise directive Bad directive QsciLexerPOVCommentaireComment QsciLexerPOVLigne commente Comment line QsciLexerPOVPar dfautDefault QsciLexerPOVDirective Directive QsciLexerPOVIdentificateur Identifier QsciLexerPOV NombreNumber QsciLexerPOV0Objets, CSG et apparenceObjects, CSG and appearance QsciLexerPOVOprateurOperator QsciLexerPOV*Fonctions prdfiniesPredefined functions QsciLexerPOV.Identifiants prdfinisPredefined identifiers QsciLexerPOV(Chane de caractresString QsciLexerPOV:Types, modifieurs et lmentsTypes, modifiers and items QsciLexerPOVBChaine de caractres non refermeUnclosed string QsciLexerPOV0Dfinition utilisateur 1User defined 1 QsciLexerPOV0Dfinition utilisateur 2User defined 2 QsciLexerPOV0Dfinition utilisateur 3User defined 3 QsciLexerPOVCaractre CharacterQsciLexerPascalPar dfautDefaultQsciLexerPascal$Nombre hexadcimalHexadecimal numberQsciLexerPascalIdentificateur IdentifierQsciLexerPascalAsm en ligne Inline asmQsciLexerPascalMot-clKeywordQsciLexerPascal(Commentaire de ligne Line commentQsciLexerPascal NombreNumberQsciLexerPascalOprateurOperatorQsciLexerPascalRChaine de caractres (guillemets simples)Single-quoted stringQsciLexerPascalBChaine de caractres non refermeUnclosed stringQsciLexerPascalTableauArray QsciLexerPerl@Document intgr quotes inversesBacktick here document QsciLexerPerlQuotes inverses Backticks QsciLexerPerlCommentaireComment QsciLexerPerl$Section de donnes Data section QsciLexerPerlPar dfautDefault QsciLexerPerlFDocument intgr guillemets doublesDouble-quoted here document QsciLexerPerlRChaine de caractres (guillemets doubles)Double-quoted string QsciLexerPerl ErreurError QsciLexerPerlHashageHash QsciLexerPerl4Ici dlimiteur de documentHere document delimiter QsciLexerPerlIdentificateur Identifier QsciLexerPerlMot-clKeyword QsciLexerPerl NombreNumber QsciLexerPerlOprateurOperator QsciLexerPerlPODPOD QsciLexerPerlPOD verbatim POD verbatim QsciLexerPerl"Chaine quote (q)Quoted string (q) QsciLexerPerl$Chaine quote (qq)Quoted string (qq) QsciLexerPerl$Chaine quote (qr)Quoted string (qr) QsciLexerPerl$Chaine quote (qw)Quoted string (qw) QsciLexerPerl$Chaine quote (qx)Quoted string (qx) QsciLexerPerl(Expression rgulireRegular expression QsciLexerPerlScalaireScalar QsciLexerPerlFDocument intgr guillemets simplesSingle-quoted here document QsciLexerPerlRChaine de caractres (guillemets simples)Single-quoted string QsciLexerPerlSubstitution Substitution QsciLexerPerl"Table de symboles Symbol table QsciLexerPerlTraduction Translation QsciLexerPerlCommentaireCommentQsciLexerPostScriptCommentaire DSC DSC commentQsciLexerPostScriptPar dfautDefaultQsciLexerPostScriptMot-clKeywordQsciLexerPostScriptNomNameQsciLexerPostScript NombreNumberQsciLexerPostScript TexteTextQsciLexerPostScriptAffectation AssignmentQsciLexerPropertiesCommentaireCommentQsciLexerPropertiesPar dfautDefaultQsciLexerProperties"Valeur par dfaut Default valueQsciLexerPropertiesClKeyQsciLexerPropertiesSectionSectionQsciLexerPropertiesNom de classe Class nameQsciLexerPythonCommentaireCommentQsciLexerPython*Block de commentaires Comment blockQsciLexerPythonPar dfautDefaultQsciLexerPythonRChaine de caractres (guillemets doubles)Double-quoted stringQsciLexerPython:Nom de mthode ou de fonctionFunction or method nameQsciLexerPythonIdentificateur IdentifierQsciLexerPythonMot-clKeywordQsciLexerPython NombreNumberQsciLexerPythonOprateurOperatorQsciLexerPythonRChaine de caractres (guillemets simples)Single-quoted stringQsciLexerPython\Chaine de caractres HTML (guillemets simples)Triple double-quoted stringQsciLexerPython\Chaine de caractres HTML (guillemets simples)Triple single-quoted stringQsciLexerPythonBChaine de caractres non refermeUnclosed stringQsciLexerPythonQuotes inverses Backticks QsciLexerRubyNom de classe Class name QsciLexerRubyCommentaireComment QsciLexerRuby$Section de donnes Data section QsciLexerRubyPar dfautDefault QsciLexerRubyRChaine de caractres (guillemets doubles)Double-quoted string QsciLexerRuby ErreurError QsciLexerRuby:Nom de mthode ou de fonctionFunction or method name QsciLexerRuby GlobalGlobal QsciLexerRubyIci document Here document QsciLexerRuby4Ici dlimiteur de documentHere document delimiter QsciLexerRubyIdentificateur Identifier QsciLexerRubyMot-clKeyword QsciLexerRubyNom de module Module name QsciLexerRuby NombreNumber QsciLexerRubyOprateurOperator QsciLexerRubyPODPOD QsciLexerRuby(Expression rgulireRegular expression QsciLexerRubyRChaine de caractres (guillemets simples)Single-quoted string QsciLexerRubySymboleSymbol QsciLexerRubystderr QsciLexerRubystdin QsciLexerRubystdout QsciLexerRuby"# Ligne commente# comment line QsciLexerSQLCommentaireComment QsciLexerSQLLigne commente Comment line QsciLexerSQLPar dfautDefault QsciLexerSQLRChaine de caractres (guillemets doubles)Double-quoted string QsciLexerSQLIdentificateur Identifier QsciLexerSQLMot-cl JavaDocJavaDoc keyword QsciLexerSQL2Erreur de mot-cl JavaDocJavaDoc keyword error QsciLexerSQL2Commentaire style JavaDocJavaDoc style comment QsciLexerSQLMot-clKeyword QsciLexerSQL NombreNumber QsciLexerSQLOprateurOperator QsciLexerSQL(Commentaire SQL*PlusSQL*Plus comment QsciLexerSQL Mot-cl SQL*PlusSQL*Plus keyword QsciLexerSQLPrompt SQL*PlusSQL*Plus prompt QsciLexerSQLRChaine de caractres (guillemets simples)Single-quoted string QsciLexerSQL0Dfinition utilisateur 1User defined 1 QsciLexerSQL0Dfinition utilisateur 2User defined 2 QsciLexerSQL0Dfinition utilisateur 3User defined 3 QsciLexerSQL0Dfinition utilisateur 4User defined 4 QsciLexerSQLCommandeCommandQsciLexerSpiceCommentaireCommentQsciLexerSpicePar dfautDefaultQsciLexerSpiceDlimiteur DelimiterQsciLexerSpiceFonctionFunctionQsciLexerSpiceIdentificateur IdentifierQsciLexerSpice NombreNumberQsciLexerSpiceParamtre ParameterQsciLexerSpice ValeurValueQsciLexerSpiceCommentaireComment QsciLexerTCL*Block de commentaires Comment block QsciLexerTCLLigne commente Comment line QsciLexerTCLPar dfautDefault QsciLexerTCLIdentificateur Identifier QsciLexerTCL NombreNumber QsciLexerTCLOprateurOperator QsciLexerTCLSubstitution Substitution QsciLexerTCL0Dfinition utilisateur 1User defined 1 QsciLexerTCL0Dfinition utilisateur 2User defined 2 QsciLexerTCL0Dfinition utilisateur 3User defined 3 QsciLexerTCL0Dfinition utilisateur 4User defined 4 QsciLexerTCLCommandeCommand QsciLexerTeXPar dfautDefault QsciLexerTeX GroupeGroup QsciLexerTeXSpcialSpecial QsciLexerTeXSymboleSymbol QsciLexerTeX TexteText QsciLexerTeXAttribut Attribute QsciLexerVHDLCommentaireComment QsciLexerVHDL*Block de commentaires Comment block QsciLexerVHDLLigne commente Comment line QsciLexerVHDLPar dfautDefault QsciLexerVHDLIdentificateur Identifier QsciLexerVHDLMot-clKeyword QsciLexerVHDL NombreNumber QsciLexerVHDLOprateurOperator QsciLexerVHDL(Chane de caractresString QsciLexerVHDLBChaine de caractres non refermeUnclosed string QsciLexerVHDL,Dfinition utilisateur User defined QsciLexerVHDLCommentaireCommentQsciLexerVerilogPar dfautDefaultQsciLexerVerilogIdentificateur IdentifierQsciLexerVerilog(Commentaire de ligne Line commentQsciLexerVerilog NombreNumberQsciLexerVerilogOprateurOperatorQsciLexerVerilogHSeconds mots-cls et identificateurs"Secondary keywords and identifiersQsciLexerVerilog(Chane de caractresStringQsciLexerVerilogBChaine de caractres non refermeUnclosed stringQsciLexerVerilogCommentaireComment QsciLexerYAMLPar dfautDefault QsciLexerYAML,Dlimiteur de documentDocument delimiter QsciLexerYAMLIdentificateur Identifier QsciLexerYAMLMot-clKeyword QsciLexerYAML NombreNumber QsciLexerYAMLOprateurOperator QsciLexerYAMLRfrence Reference QsciLexerYAMLsqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_fr.ts000066400000000000000000004344061345112435200240560ustar00rootroot00000000000000 QsciCommand Move down one line Déplacement d'une ligne vers le bas Extend selection down one line Extension de la sélection d'une ligne vers le bas Scroll view down one line Decendre la vue d'une ligne Extend rectangular selection down one line Extension de la sélection rectangulaire d'une ligne vers le bas Move up one line Déplacement d'une ligne vers le haut Extend selection up one line Extension de la sélection d'une ligne vers le haut Scroll view up one line Remonter la vue d'une ligne Extend rectangular selection up one line Extension de la sélection rectangulaire d'une ligne vers le haut Move up one paragraph Déplacement d'un paragraphe vers le haut Extend selection up one paragraph Extension de la sélection d'un paragraphe vers le haut Move down one paragraph Déplacement d'un paragraphe vers le bas Scroll to start of document Remonter au début du document Scroll to end of document Descendre à la fin du document Scroll vertically to centre current line Défiler verticalement pour centrer la ligne courante Extend selection down one paragraph Extension de la sélection d'un paragraphe vers le bas Move left one character Déplacement d'un caractère vers la gauche Extend selection left one character Extension de la sélection d'un caractère vers la gauche Move left one word Déplacement d'un mot vers la gauche Extend selection left one word Extension de la sélection d'un mot vers la gauche Extend rectangular selection left one character Extension de la sélection rectangulaire d'un caractère vers la gauche Move right one character Déplacement d'un caractère vers la droite Extend selection right one character Extension de la sélection d'un caractère vers la droite Move right one word Déplacement d'un mot vers la droite Extend selection right one word Extension de la sélection d'un mot vers la droite Extend rectangular selection right one character Extension de la sélection rectangulaire d'un caractère vers la droite Move to end of previous word Déplacement vers fin du mot précédent Extend selection to end of previous word Extension de la sélection vers fin du mot précédent Move to end of next word Déplacement vers fin du mot suivant Extend selection to end of next word Extension de la sélection vers fin du mot suivant Move left one word part Déplacement d'une part de mot vers la gauche Extend selection left one word part Extension de la sélection d'une part de mot vers la gauche Move right one word part Déplacement d'une part de mot vers la droite Extend selection right one word part Extension de la sélection d'une part de mot vers la droite Move up one page Déplacement d'une page vers le haut Extend selection up one page Extension de la sélection d'une page vers le haut Extend rectangular selection up one page Extension de la sélection rectangulaire d'une page vers le haut Move down one page Déplacement d'une page vers le bas Extend selection down one page Extension de la sélection d'une page vers le bas Extend rectangular selection down one page Extension de la sélection rectangulaire d'une page vers le bas Delete current character Effacement du caractère courant Cut selection Couper la sélection Delete word to right Suppression du mot de droite Move to start of document line Déplacement vers début de ligne du document Extend selection to start of document line Extension de la sélection vers début de ligne du document Extend rectangular selection to start of document line Move to start of display line Extend selection to start of display line Move to start of display or document line Extend selection to start of display or document line Move to first visible character in document line Extend selection to first visible character in document line Extend rectangular selection to first visible character in document line Move to first visible character of display in document line Extend selection to first visible character in display or document line Move to end of document line Extend selection to end of document line Extend rectangular selection to end of document line Move to end of display line Extend selection to end of display line Move to end of display or document line Extend selection to end of display or document line Move to start of document Extend selection to start of document Move to end of document Extend selection to end of document Stuttered move up one page Stuttered extend selection up one page Stuttered move down one page Stuttered extend selection down one page Delete previous character if not at start of line Delete right to end of next word Delete line to right Suppression de la partie droite de la ligne Transpose current and previous lines Duplicate the current line Select all Select document Move selected lines up one line Move selected lines down one line Toggle insert/overtype Basculement Insertion /Ecrasement Paste Coller Copy selection Copier la sélection Insert newline De-indent one level Cancel Annuler Delete previous character Suppression du dernier caractère Delete word to left Suppression du mot de gauche Delete line to left Effacer la partie gauche de la ligne Undo last command Redo last command Refaire la dernière commande Indent one level Indentation d'un niveau Zoom in Zoom avant Zoom out Zoom arrière Formfeed Chargement de la page Cut current line Couper la ligne courante Delete current line Suppression de la ligne courante Copy current line Copier la ligne courante Convert selection to lower case Conversion de la ligne courante en minuscules Convert selection to upper case Conversion de la ligne courante en majuscules Duplicate selection QsciLexerAVS Default Par défaut Block comment Nested block comment Line comment Commentaire de ligne Number Nombre Operator Opérateur Identifier Identificateur Double-quoted string Chaine de caractères (guillemets doubles) Triple double-quoted string Chaine de caractères HTML (guillemets simples) Keyword Mot-clé Filter Filtre Plugin Extension Function Fonction Clip property User defined QsciLexerBash Default Par défaut Error Erreur Comment Commentaire Number Nombre Keyword Mot-clé Double-quoted string Chaine de caractères (guillemets doubles) Single-quoted string Chaine de caractères (guillemets simples) Operator Opérateur Identifier Identificateur Scalar Scalaire Parameter expansion Extension de paramètre Backticks Quotes inverses Here document delimiter Ici délimiteur de document Single-quoted here document Document intégré guillemets simples QsciLexerBatch Default Par défaut Comment Commentaire Keyword Mot-clé Label Titre Hide command character Cacher le caratère de commande External command Commande externe Variable Variable Operator Opérateur QsciLexerCMake Default Par défaut Comment Commentaire String Chaîne de caractères Left quoted string Right quoted string Function Variable Variable Label Titre User defined WHILE block FOREACH block IF block MACRO block Variable within a string Number Nombre QsciLexerCPP Default Par défaut Inactive default C comment Commentaire C Inactive C comment C++ comment Commentaire C++ Inactive C++ comment JavaDoc style C comment Commentaire C de style JavaDoc Inactive JavaDoc style C comment Number Nombre Inactive number Keyword Mot-clé Inactive keyword Double-quoted string Chaine de caractères (guillemets doubles) Inactive double-quoted string Single-quoted string Chaine de caractères (guillemets simples) Inactive single-quoted string IDL UUID Inactive IDL UUID Pre-processor block Instructions de pré-processing Inactive pre-processor block Operator Opérateur Inactive operator Identifier Identificateur Inactive identifier Unclosed string Chaine de caractères non refermée Inactive unclosed string C# verbatim string Inactive C# verbatim string JavaScript regular expression Expression régulière JavaScript Inactive JavaScript regular expression JavaDoc style C++ comment Commentaire C++ de style JavaDoc Inactive JavaDoc style C++ comment Secondary keywords and identifiers Seconds mots-clés et identificateurs Inactive secondary keywords and identifiers JavaDoc keyword Mot-clé JavaDoc Inactive JavaDoc keyword JavaDoc keyword error Erreur de mot-clé JavaDoc Inactive JavaDoc keyword error Global classes and typedefs Classes globales et définitions de types Inactive global classes and typedefs C++ raw string Inactive C++ raw string Vala triple-quoted verbatim string Inactive Vala triple-quoted verbatim string Pike hash-quoted string Inactive Pike hash-quoted string Pre-processor C comment Inactive pre-processor C comment JavaDoc style pre-processor comment Inactive JavaDoc style pre-processor comment User-defined literal Inactive user-defined literal Task marker Inactive task marker Escape sequence Inactive escape sequence QsciLexerCSS Default Par défaut Tag Balise Class selector Classe Pseudo-class Pseudo-classe Unknown pseudo-class Peudo-classe inconnue Operator Opérateur CSS1 property Propriété CSS1 Unknown property Propriété inconnue Value Valeur ID selector ID Important Important @-rule règle-@ Double-quoted string Chaine de caractères (guillemets doubles) Single-quoted string Chaine de caractères (guillemets simples) CSS2 property Propriété CSS2 Attribute Attribut CSS3 property Propriété CSS3 Pseudo-element Extended CSS property Extended pseudo-class Extended pseudo-element Media rule Variable Variable QsciLexerCSharp Verbatim string Chaine verbatim QsciLexerCoffeeScript Default Par défaut C-style comment C++-style comment JavaDoc C-style comment Number Nombre Keyword Mot-clé Double-quoted string Chaine de caractères (guillemets doubles) Single-quoted string Chaine de caractères (guillemets simples) IDL UUID Pre-processor block Instructions de pré-processing Operator Opérateur Identifier Identificateur Unclosed string Chaine de caractères non refermée C# verbatim string Regular expression Expression régulière JavaDoc C++-style comment Secondary keywords and identifiers Seconds mots-clés et identificateurs JavaDoc keyword Mot-clé JavaDoc JavaDoc keyword error Erreur de mot-clé JavaDoc Global classes Block comment Block regular expression Block regular expression comment Instance property QsciLexerD Default Par défaut Block comment Line comment Commentaire de ligne DDoc style block comment Nesting comment Number Nombre Keyword Mot-clé Secondary keyword Documentation keyword Type definition String Chaîne de caractères Unclosed string Chaine de caractères non refermée Character Caractère Operator Opérateur Identifier Identificateur DDoc style line comment DDoc keyword Mot-clé DDoc DDoc keyword error Erreur de mot-clé DDoc Backquoted string Raw string User defined 1 Définition utilisateur 1 User defined 2 Définition utilisateur 2 User defined 3 Définition utilisateur 3 QsciLexerDiff Default Par défaut Comment Commentaire Command Commande Header En-tête Position Position Removed line Ligne supprimée Added line Ligne ajoutée Changed line Ligne changée QsciLexerFortran77 Default Par défaut Comment Commentaire Number Nombre Single-quoted string Chaine de caractères (guillemets simples) Double-quoted string Chaine de caractères (guillemets doubles) Unclosed string Chaine de caractères non refermée Operator Opérateur Identifier Identificateur Keyword Mot-clé Intrinsic function Fonction intrinsèque Extended function Fonction étendue Pre-processor block Instructions de pré-processing Dotted operator Label Titre Continuation QsciLexerHTML HTML default HTML par défaut Tag Balise Unknown tag Balise inconnue Attribute Attribut Unknown attribute Attribut inconnu HTML number Nombre HTML HTML double-quoted string Chaine de caractères HTML (guillemets doubles) HTML single-quoted string Chaine de caractères HTML (guillemets simples) Other text in a tag Autre texte dans les balises HTML comment Commentaire HTML Entity Entité End of a tag Balise fermante Start of an XML fragment Début de block XML End of an XML fragment Fin de block XML Script tag Balise de script Start of an ASP fragment with @ Début de block ASP avec @ Start of an ASP fragment Début de block ASP CDATA CDATA Start of a PHP fragment Début de block PHP Unquoted HTML value Valeur HTML sans guillemets ASP X-Code comment Commentaire X-Code ASP SGML default SGML par défaut SGML command Commande SGML First parameter of an SGML command Premier paramètre de commande SGML SGML double-quoted string Chaine de caractères SGML (guillemets doubles) SGML single-quoted string Chaine de caractères SGML (guillemets simples) SGML error Erreur SGML SGML special entity Entité SGML spéciale SGML comment Commentaire SGML First parameter comment of an SGML command Premier paramètre de commentaire de commande SGML SGML block default Block SGML par défaut Start of a JavaScript fragment Début de block JavaScript JavaScript default JavaScript par défaut JavaScript comment Commentaire JavaScript JavaScript line comment Commentaire de ligne JavaScript JavaDoc style JavaScript comment Commentaire JavaScript de style JavaDoc JavaScript number Nombre JavaScript JavaScript word Mot JavaScript JavaScript keyword Mot-clé JavaScript JavaScript double-quoted string Chaine de caractères JavaScript (guillemets doubles) JavaScript single-quoted string Chaine de caractères JavaScript (guillemets simples) JavaScript symbol Symbole JavaScript JavaScript unclosed string Chaine de caractères JavaScript non refermée JavaScript regular expression Expression régulière JavaScript Start of an ASP JavaScript fragment Début de block JavaScript ASP ASP JavaScript default JavaScript ASP par défaut ASP JavaScript comment Commentaire JavaScript ASP ASP JavaScript line comment Commentaire de ligne JavaScript ASP JavaDoc style ASP JavaScript comment Commentaire JavaScript ASP de style JavaDoc ASP JavaScript number Nombre JavaScript ASP ASP JavaScript word Mot JavaScript ASP ASP JavaScript keyword Mot-clé JavaScript ASP ASP JavaScript double-quoted string Chaine de caractères JavaScript ASP (guillemets doubles) ASP JavaScript single-quoted string Chaine de caractères JavaScript ASP (guillemets simples) ASP JavaScript symbol Symbole JavaScript ASP ASP JavaScript unclosed string Chaine de caractères JavaScript ASP non refermée ASP JavaScript regular expression Expression régulière JavaScript ASP Start of a VBScript fragment Début de block VBScript VBScript default VBScript par défaut VBScript comment Commentaire VBScript VBScript number Nombre VBScript VBScript keyword Mot-clé VBScript VBScript string Chaine de caractères VBScript VBScript identifier Identificateur VBScript VBScript unclosed string Chaine de caractères VBScript non refermée Start of an ASP VBScript fragment Début de block VBScript ASP ASP VBScript default VBScript ASP par défaut ASP VBScript comment Commentaire VBScript ASP ASP VBScript number Nombre VBScript ASP ASP VBScript keyword Mot-clé VBScript ASP ASP VBScript string Chaine de caractères VBScript ASP ASP VBScript identifier Identificateur VBScript ASP ASP VBScript unclosed string Chaine de caractères VBScript ASP non refermée Start of a Python fragment Début de block Python Python default Python par défaut Python comment Commentaire Python Python number Nombre Python Python double-quoted string Chaine de caractères Python (guillemets doubles) Python single-quoted string Chaine de caractères Python (guillemets simples) Python keyword Mot-clé Python Python triple double-quoted string Chaine de caractères Python (triples guillemets doubles) Python triple single-quoted string Chaine de caractères Python (triples guillemets simples) Python class name Nom de classe Python Python function or method name Méthode ou fonction Python Python operator Opérateur Python Python identifier Identificateur Python Start of an ASP Python fragment Début de block Python ASP ASP Python default Python ASP par défaut ASP Python comment Commentaire Python ASP ASP Python number Nombre Python ASP ASP Python double-quoted string Chaine de caractères Python ASP (guillemets doubles) ASP Python single-quoted string Chaine de caractères Python ASP (guillemets simples) ASP Python keyword Mot-clé Python ASP ASP Python triple double-quoted string Chaine de caractères Python ASP (triples guillemets doubles) ASP Python triple single-quoted string Chaine de caractères Python ASP (triples guillemets simples) ASP Python class name Nom de classe Python ASP ASP Python function or method name Méthode ou fonction Python ASP ASP Python operator Opérateur Python ASP ASP Python identifier Identificateur Python ASP PHP default PHP par défaut PHP double-quoted string Chaine de caractères PHP (guillemets doubles) PHP single-quoted string Chaine de caractères PHP (guillemets simples) PHP keyword Mot-clé PHP PHP number Nombre PHP PHP variable Variable PHP PHP comment Commentaire PHP PHP line comment Commentaire de ligne PHP PHP double-quoted variable Variable PHP (guillemets doubles) PHP operator Opérateur PHP QsciLexerIDL UUID UUID QsciLexerJSON Default Par défaut Number Nombre String Chaîne de caractères Unclosed string Chaine de caractères non refermée Property Propriété Escape sequence Séquence d'échappement Line comment Commentaire de ligne Block comment Block de commentaires Operator Opérateur IRI JSON-LD compact IRI JSON keyword Mot-clé JSON JSON-LD keyword Mot-clé JSON-LD Parsing error Erreur d'analyse QsciLexerJavaScript Regular expression Expression régulière QsciLexerLua Default Par défaut Comment Commentaire Line comment Commentaire de ligne Number Nombre Keyword Mot-clé String Chaîne de caractères Character Caractère Literal string Chaîne littérale Preprocessor Préprocessing Operator Opérateur Identifier Identificateur Unclosed string Chaine de caractères non refermée Basic functions Fonctions de base String, table and maths functions Fonctions sur les chaines, tables et fonctions math Coroutines, i/o and system facilities Coroutines, i/o et fonctions système User defined 1 Définition utilisateur 1 User defined 2 Définition utilisateur 2 User defined 3 Définition utilisateur 3 User defined 4 Définition utilisateur 4 Label Titre QsciLexerMakefile Default Par défaut Comment Commentaire Preprocessor Préprocessing Variable Variable Operator Opérateur Target Cible Error Erreur QsciLexerMarkdown Default Par défaut Special Spécial Strong emphasis using double asterisks Strong emphasis using double underscores Emphasis using single asterisks Emphasis using single underscores Level 1 header Level 2 header Level 3 header Level 4 header Level 5 header Level 6 header Pre-char Unordered list item Ordered list item Block quote Strike out Horizontal rule Link Code between backticks Code between double backticks Code block QsciLexerMatlab Default Par défaut Comment Commentaire Command Commande Number Nombre Keyword Mot-clé Single-quoted string Chaine de caractères (guillemets simples) Operator Opérateur Identifier Identificateur Double-quoted string Chaine de caractères (guillemets doubles) QsciLexerPO Default Par défaut Comment Commentaire Message identifier Message identifier text Message string Message string text Message context Message context text Fuzzy flag Programmer comment Reference Flags Message identifier text end-of-line Message string text end-of-line Message context text end-of-line QsciLexerPOV Default Par défaut Comment Commentaire Comment line Ligne commentée Number Nombre Operator Opérateur Identifier Identificateur String Chaîne de caractères Unclosed string Chaine de caractères non refermée Directive Directive Bad directive Mauvaise directive Objects, CSG and appearance Objets, CSG et apparence Types, modifiers and items Types, modifieurs et éléments Predefined identifiers Identifiants prédéfinis Predefined functions Fonctions prédéfinies User defined 1 Définition utilisateur 1 User defined 2 Définition utilisateur 2 User defined 3 Définition utilisateur 3 QsciLexerPascal Default Par défaut Line comment Commentaire de ligne Number Nombre Keyword Mot-clé Single-quoted string Chaine de caractères (guillemets simples) Operator Opérateur Identifier Identificateur '{ ... }' style comment '(* ... *)' style comment '{$ ... }' style pre-processor block '(*$ ... *)' style pre-processor block Hexadecimal number Nombre hexadécimal Unclosed string Chaine de caractères non refermée Character Caractère Inline asm Asm en ligne QsciLexerPerl Default Par défaut Error Erreur Comment Commentaire POD POD Number Nombre Keyword Mot-clé Double-quoted string Chaine de caractères (guillemets doubles) Single-quoted string Chaine de caractères (guillemets simples) Operator Opérateur Identifier Identificateur Scalar Scalaire Array Tableau Hash Hashage Symbol table Table de symboles Regular expression Expression régulière Substitution Substitution Backticks Quotes inverses Data section Section de données Here document delimiter Ici délimiteur de document Single-quoted here document Document intégré guillemets simples Double-quoted here document Document intégré guillemets doubles Backtick here document Document intégré quotes inverses Quoted string (q) Chaine quotée (q) Quoted string (qq) Chaine quotée (qq) Quoted string (qx) Chaine quotée (qx) Quoted string (qr) Chaine quotée (qr) Quoted string (qw) Chaine quotée (qw) POD verbatim POD verbatim Subroutine prototype Format identifier Format body Double-quoted string (interpolated variable) Translation Traduction Regular expression (interpolated variable) Substitution (interpolated variable) Backticks (interpolated variable) Double-quoted here document (interpolated variable) Backtick here document (interpolated variable) Quoted string (qq, interpolated variable) Quoted string (qx, interpolated variable) Quoted string (qr, interpolated variable) QsciLexerPostScript Default Par défaut Comment Commentaire DSC comment Commentaire DSC DSC comment value Number Nombre Name Nom Keyword Mot-clé Literal Immediately evaluated literal Array parenthesis Dictionary parenthesis Procedure parenthesis Text Texte Hexadecimal string Base85 string Bad string character QsciLexerProperties Default Par défaut Comment Commentaire Section Section Assignment Affectation Default value Valeur par défaut Key Clé QsciLexerPython Default Par défaut Comment Commentaire Number Nombre Double-quoted string Chaine de caractères (guillemets doubles) Single-quoted string Chaine de caractères (guillemets simples) Keyword Mot-clé Triple single-quoted string Chaine de caractères HTML (guillemets simples) Triple double-quoted string Chaine de caractères HTML (guillemets simples) Class name Nom de classe Function or method name Nom de méthode ou de fonction Operator Opérateur Identifier Identificateur Comment block Block de commentaires Unclosed string Chaine de caractères non refermée Highlighted identifier Decorator QsciLexerRuby Default Par défaut Comment Commentaire Number Nombre Double-quoted string Chaine de caractères (guillemets doubles) Single-quoted string Chaine de caractères (guillemets simples) Keyword Mot-clé Class name Nom de classe Function or method name Nom de méthode ou de fonction Operator Opérateur Identifier Identificateur Error Erreur POD POD Regular expression Expression régulière Global Global Symbol Symbole Module name Nom de module Instance variable Class variable Backticks Quotes inverses Data section Section de données Here document delimiter Ici délimiteur de document Here document Ici document %q string %Q string %x string %r string %w string Demoted keyword stdin stdout stderr QsciLexerSQL Default Par défaut Comment Commentaire Number Nombre Keyword Mot-clé Single-quoted string Chaine de caractères (guillemets simples) Operator Opérateur Identifier Identificateur Comment line Ligne commentée JavaDoc style comment Commentaire style JavaDoc Double-quoted string Chaine de caractères (guillemets doubles) SQL*Plus keyword Mot-clé SQL*Plus SQL*Plus prompt Prompt SQL*Plus SQL*Plus comment Commentaire SQL*Plus # comment line # Ligne commentée JavaDoc keyword Mot-clé JavaDoc JavaDoc keyword error Erreur de mot-clé JavaDoc User defined 1 Définition utilisateur 1 User defined 2 Définition utilisateur 2 User defined 3 Définition utilisateur 3 User defined 4 Définition utilisateur 4 Quoted identifier Quoted operator QsciLexerSpice Default Par défaut Identifier Identificateur Command Commande Function Fonction Parameter Paramètre Number Nombre Delimiter Délimiteur Value Valeur Comment Commentaire QsciLexerTCL Default Par défaut Comment Commentaire Comment line Ligne commentée Number Nombre Quoted keyword Quoted string Operator Opérateur Identifier Identificateur Substitution Substitution Brace substitution Modifier Expand keyword TCL keyword Tk keyword iTCL keyword Tk command User defined 1 Définition utilisateur 1 User defined 2 Définition utilisateur 2 User defined 3 Définition utilisateur 3 User defined 4 Définition utilisateur 4 Comment box Comment block Block de commentaires QsciLexerTeX Default Par défaut Special Spécial Group Groupe Symbol Symbole Command Commande Text Texte QsciLexerVHDL Default Par défaut Comment Commentaire Comment line Ligne commentée Number Nombre String Chaîne de caractères Operator Opérateur Identifier Identificateur Unclosed string Chaine de caractères non refermée Keyword Mot-clé Standard operator Attribute Attribut Standard function Standard package Standard type User defined Définition utilisateur Comment block Block de commentaires QsciLexerVerilog Default Par défaut Comment Commentaire Line comment Commentaire de ligne Bang comment Number Nombre Primary keywords and identifiers String Chaîne de caractères Secondary keywords and identifiers Seconds mots-clés et identificateurs System task Preprocessor block Operator Opérateur Identifier Identificateur Unclosed string Chaine de caractères non refermée User defined tasks and identifiers Keyword comment Inactive keyword comment Input port declaration Inactive input port declaration Output port declaration Inactive output port declaration Input/output port declaration Inactive input/output port declaration Port connection Inactive port connection QsciLexerYAML Default Par défaut Comment Commentaire Identifier Identificateur Keyword Mot-clé Number Nombre Reference Référence Document delimiter Délimiteur de document Text block marker Syntax error marker Operator Opérateur QsciScintilla &Undo &Redo Cu&t &Copy &Paste Delete Select All sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_pt_br.qm000066400000000000000000001403631345112435200245400ustar00rootroot00000000000000'\8p\8uw\8}\8\80\8E\8\8r\8\8K\8\81\8\8N\8#r)fr4rvB:SzB555%51575=\5t5|u55W55555x5555G#xG8Gq[Gv,GGGa9\9\ T*/?^tQj_p}(}3}>d('l.;K%bȐȐ}Ȑ"%Ȑ(Ȑ.Ȑ3Ȑ8Ȑ>`Ȑq!ȐuȐyȐ}8ȐȐfȐyȐȐHȐ~ȐdȐEȐȐWѽ8ԇ fKu  "S3)6%)N6|_u]&d*Sd*id*d*oi-܌UGf@(ib _LW&[*X]3g{j 2|^7M"6l"r"lT e~"`~#~0J~z|B-2c2n<{jC2LC ~ &0'! &0'| ?3k @|Um okK @tw Nd o !: ^b R  $ , 1C < {      X$ = i _C 4Z '4$F *S *Sr *S? Iq> S S d8: d8{0 d8 d8N d< d< u d<" d<; d<a WDU f- oI o 'O E Sv '\ K '[M xC  .  . El_ 943s> @&4d @*$d _rx t}4l t}48! t}4p t}4t t}4 t}4 & ?DEV Ig* Ig5 Ig9 Ig? Igq Igw- Ig` Ig: Ig Ig Ig t& t2- t `^N .jd yH'WoJ ck /P' 9 G=e`>VcrW\Y]gJYeTRDhwVirf ldAwgej{F&4Q*.5U?}tBBF,)w#ƦnCL kCj;2'2W@H#}w04+4RΒao2\)tnETe_iCancelarCancel QsciCommandDConverter a seleo para minsculaConvert selection to lower case QsciCommandDConverter a seleo para maisculaConvert selection to upper case QsciCommand$Copiar linha atualCopy current line QsciCommandCopiar seleoCopy selection QsciCommand,Configurar linha atualCut current line QsciCommand Recortar seleo Cut selection QsciCommand.Excluir caractere atualDelete current character QsciCommand&Excluir linha atualDelete current line QsciCommand0Excluir linha a esquerdaDelete line to left QsciCommand4Excluir linha para direitaDelete line to right QsciCommand4Excluir caractere anteriorDelete previous character QsciCommand4Excluir palavra a esquerdaDelete word to left QsciCommand8Excluir palavra para direitaDelete word to right QsciCommanddExtender a seleo retangular uma linha para baixo*Extend rectangular selection down one line QsciCommandfExtender a seleo retangular uma pgina para baixo*Extend rectangular selection down one page QsciCommandpExtender a seleo retangular um caractere para esquerda/Extend rectangular selection left one character QsciCommandnExtender a seleo retangular um caractere para direita0Extend rectangular selection right one character QsciCommandbExtender a seleo retangular uma linha para cima(Extend rectangular selection up one line QsciCommanddExtender a seleo retangular uma pgina para cima(Extend rectangular selection up one page QsciCommandNExtender a seleo uma linha para baixoExtend selection down one line QsciCommandPExtender a seleo uma pgina para baixoExtend selection down one page QsciCommandVExtender a seleo um paragrafo para baixo#Extend selection down one paragraph QsciCommandZExtender a seleo um caractere para esquerda#Extend selection left one character QsciCommandXExtender a seleo uma palavra para esquerdaExtend selection left one word QsciCommandjExtender a seleo uma parte de palavra para esquerda#Extend selection left one word part QsciCommandXExtender a seleo um caractere para direita$Extend selection right one character QsciCommandVExtender a seleo uma palavra para direitaExtend selection right one word QsciCommandhExtender a seleo uma parte de palavra para direita$Extend selection right one word part QsciCommandLExtender a seleo uma linha para cimaExtend selection up one line QsciCommandNExtender a seleo uma pgina para cimaExtend selection up one page QsciCommandRExtender a seleo um paragrafo para cima!Extend selection up one paragraph QsciCommand*Alimentao da PginaFormfeed QsciCommand"Indentar um nvelIndent one level QsciCommand4Mover uma linha para baixoMove down one line QsciCommand6Mover uma pgina para baixoMove down one page QsciCommand:Mover um paragrafo para baixoMove down one paragraph QsciCommandDMover um caractere para a esquerdaMove left one character QsciCommand>Mover uma palavra para esquerdaMove left one word QsciCommandPMover uma parte da palavra para esquerdaMove left one word part QsciCommand>Mover um caractere para direitaMove right one character QsciCommand<Mover uma palavra para direitaMove right one word QsciCommandNMover uma parte da palavra para direitaMove right one word part QsciCommand2Mover uma linha para cimaMove up one line QsciCommand4Mover uma pgina para cimaMove up one page QsciCommand8Mover um paragrafo para cimaMove up one paragraph QsciCommand CopiarPaste QsciCommand,Refazer ltimo comandoRedo last command QsciCommandFDescer a viso uma linha para baixoScroll view down one line QsciCommandBSubir a viso uma linha para cimaScroll view up one line QsciCommandXAlternar entre modo de inserir/sobreescreverToggle insert/overtype QsciCommandAumentar zoomZoom in QsciCommandDiminuir zoomZoom out QsciCommand PadroDefault QsciLexerAVS^Cadeia de caracteres envolvida por aspas duplasDouble-quoted string QsciLexerAVSIdentificador Identifier QsciLexerAVSPalavra ChaveKeyword QsciLexerAVSComentar Linha Line comment QsciLexerAVS NmeroNumber QsciLexerAVSOperadorOperator QsciLexerAVShCadeia de caracteres envolvida por trs aspas duplasTriple double-quoted string QsciLexerAVS Aspas Invertidas Backticks QsciLexerBashComentrioComment QsciLexerBash PadroDefault QsciLexerBash^Cadeia de caracteres envolvida por aspas duplasDouble-quoted string QsciLexerBash NmeroError QsciLexerBash>Delimitador de "here documents"Here document delimiter QsciLexerBashIdentificador Identifier QsciLexerBashPalavra ChaveKeyword QsciLexerBash NmeroNumber QsciLexerBashOperadorOperator QsciLexerBash*Parmetro de ExpansoParameter expansion QsciLexerBashEscalarScalar QsciLexerBashV"here document" envolvido por aspas simplesSingle-quoted here document QsciLexerBash`Cadeia de caracteres envolvida por aspas simplesSingle-quoted string QsciLexerBashComentrioCommentQsciLexerBatch PadroDefaultQsciLexerBatchComando externoExternal commandQsciLexerBatch:Esconder caractere de comandoHide command characterQsciLexerBatchPalavra ChaveKeywordQsciLexerBatch RtuloLabelQsciLexerBatchOperadorOperatorQsciLexerBatchVarivelVariableQsciLexerBatchComentrioCommentQsciLexerCMake PadroDefaultQsciLexerCMake RtuloLabelQsciLexerCMake NmeroNumberQsciLexerCMake(Cadeia de CaracteresStringQsciLexerCMakeVarivelVariableQsciLexerCMakeComentrio C C comment QsciLexerCPPComentrio C++ C++ comment QsciLexerCPP PadroDefault QsciLexerCPP^Cadeia de caracteres envolvida por aspas duplasDouble-quoted string QsciLexerCPPHClasses e definies de tipo globaisGlobal classes and typedefs QsciLexerCPPIdentificador Identifier QsciLexerCPP*Palavra chave JavaDocJavaDoc keyword QsciLexerCPP@Erro de palavra chave do JavaDocJavaDoc keyword error QsciLexerCPP6Comentrio JavaDoc estilo CJavaDoc style C comment QsciLexerCPP:Comentrio JavaDoc estilo C++JavaDoc style C++ comment QsciLexerCPP8Expresso regular JavaScriptJavaScript regular expression QsciLexerCPPPalavra ChaveKeyword QsciLexerCPP NmeroNumber QsciLexerCPPOperadorOperator QsciLexerCPP>Instrues de pr-processamentoPre-processor block QsciLexerCPPXIdentificadores e palavras chave secundrias"Secondary keywords and identifiers QsciLexerCPP`Cadeia de caracteres envolvida por aspas simplesSingle-quoted string QsciLexerCPP@Cadeia de caracteres no fechadaUnclosed string QsciLexerCPPregra-@@-rule QsciLexerCSSAtributo Attribute QsciLexerCSS Propriedade CSS1 CSS1 property QsciLexerCSS Propriedade CSS2 CSS2 property QsciLexerCSS,Propriedade CSS2 {3 ?} CSS3 property QsciLexerCSS"Seletor de classeClass selector QsciLexerCSS PadroDefault QsciLexerCSS^Cadeia de caracteres envolvida por aspas duplasDouble-quoted string QsciLexerCSSSeletor de ID ID selector QsciLexerCSSImportante Important QsciLexerCSSOperadorOperator QsciLexerCSSPseudo-classe Pseudo-class QsciLexerCSS`Cadeia de caracteres envolvida por aspas simplesSingle-quoted string QsciLexerCSSMarcadorTag QsciLexerCSS0Propriedade desconhecidaUnknown property QsciLexerCSS4Pseudo-classe desconhecidaUnknown pseudo-class QsciLexerCSS ValorValue QsciLexerCSSVarivelVariable QsciLexerCSSPCadeia de caracteres no formato verbatimVerbatim stringQsciLexerCSharp PadroDefaultQsciLexerCoffeeScript^Cadeia de caracteres envolvida por aspas duplasDouble-quoted stringQsciLexerCoffeeScriptIdentificador IdentifierQsciLexerCoffeeScript*Palavra chave JavaDocJavaDoc keywordQsciLexerCoffeeScript@Erro de palavra chave do JavaDocJavaDoc keyword errorQsciLexerCoffeeScriptPalavra ChaveKeywordQsciLexerCoffeeScript NmeroNumberQsciLexerCoffeeScriptOperadorOperatorQsciLexerCoffeeScript>Instrues de pr-processamentoPre-processor blockQsciLexerCoffeeScript"Expresso RegularRegular expressionQsciLexerCoffeeScriptXIdentificadores e palavras chave secundrias"Secondary keywords and identifiersQsciLexerCoffeeScript`Cadeia de caracteres envolvida por aspas simplesSingle-quoted stringQsciLexerCoffeeScript@Cadeia de caracteres no fechadaUnclosed stringQsciLexerCoffeeScriptCaractere Character QsciLexerD*Palavra chave JavaDoc DDoc keyword QsciLexerD@Erro de palavra chave do JavaDocDDoc keyword error QsciLexerD PadroDefault QsciLexerDIdentificador Identifier QsciLexerDPalavra ChaveKeyword QsciLexerDComentar Linha Line comment QsciLexerD NmeroNumber QsciLexerDOperadorOperator QsciLexerD(Cadeia de CaracteresString QsciLexerD@Cadeia de caracteres no fechadaUnclosed string QsciLexerD,Definio de usurio 1User defined 1 QsciLexerD,Definio de usurio 2User defined 2 QsciLexerD,Definio de usurio 3User defined 3 QsciLexerD Linha Adicionada Added line QsciLexerDiffComandoCommand QsciLexerDiffComentrioComment QsciLexerDiff PadroDefault QsciLexerDiffCabealhoHeader QsciLexerDiffPosioPosition QsciLexerDiffLinha Removida Removed line QsciLexerDiffComentrioCommentQsciLexerFortran77 PadroDefaultQsciLexerFortran77^Cadeia de caracteres envolvida por aspas duplasDouble-quoted stringQsciLexerFortran77Identificador IdentifierQsciLexerFortran77Palavra ChaveKeywordQsciLexerFortran77 RtuloLabelQsciLexerFortran77 NmeroNumberQsciLexerFortran77OperadorOperatorQsciLexerFortran77>Instrues de pr-processamentoPre-processor blockQsciLexerFortran77`Cadeia de caracteres envolvida por aspas simplesSingle-quoted stringQsciLexerFortran77@Cadeia de caracteres no fechadaUnclosed stringQsciLexerFortran772Comentrio JavaScript ASPASP JavaScript comment QsciLexerHTML2JavaScript ASP por padroASP JavaScript default QsciLexerHTML|Cadeia de caracteres JavaScript ASP envolvida por aspas duplas#ASP JavaScript double-quoted string QsciLexerHTML8Palavra chave JavaScript ASPASP JavaScript keyword QsciLexerHTMLDComentrio de linha JavaScript ASPASP JavaScript line comment QsciLexerHTML*Nmero JavaScript ASPASP JavaScript number QsciLexerHTML@Expresso regular JavaScript ASP!ASP JavaScript regular expression QsciLexerHTML~Cadeia de caracteres JavaScript ASP envolvida por aspas simples#ASP JavaScript single-quoted string QsciLexerHTML,Smbolo JavaScript ASPASP JavaScript symbol QsciLexerHTML^Cadeia de caracteres JavaScript ASP no fechadaASP JavaScript unclosed string QsciLexerHTML8Palavra chave JavaScript ASPASP JavaScript word QsciLexerHTML2Nome de classe Python ASPASP Python class name QsciLexerHTML*Comentrio Python ASPASP Python comment QsciLexerHTML*Python ASP por padroASP Python default QsciLexerHTMLtCadeia de caracteres Python ASP envolvida por aspas duplasASP Python double-quoted string QsciLexerHTMLFNome de mtodo ou funo Python ASP"ASP Python function or method name QsciLexerHTML0Identificador Python ASPASP Python identifier QsciLexerHTML0Palavra chave Python ASPASP Python keyword QsciLexerHTML"Nmero Python ASPASP Python number QsciLexerHTML&Operador Python ASPASP Python operator QsciLexerHTMLvCadeia de caracteres Python ASP envolvida por aspas simplesASP Python single-quoted string QsciLexerHTMLCadeia de caracteres Python ASP envolvida por aspas triplas duplas&ASP Python triple double-quoted string QsciLexerHTMLCadeia de caracteres Python ASP envolvida por aspas triplas simples&ASP Python triple single-quoted string QsciLexerHTML.Comentrio VBScript ASPASP VBScript comment QsciLexerHTML.VBScript ASP por padroASP VBScript default QsciLexerHTML4Identificador VBScript ASPASP VBScript identifier QsciLexerHTML4Palavra chave VBScript ASPASP VBScript keyword QsciLexerHTML&Nmero VBScript ASPASP VBScript number QsciLexerHTMLBCadeia de caracteres VBScript ASPASP VBScript string QsciLexerHTMLZCadeia de caracteres VBScript ASP no fechadaASP VBScript unclosed string QsciLexerHTML*Comentrio ASP X-CodeASP X-Code comment QsciLexerHTMLAtributo Attribute QsciLexerHTML CDATACDATA QsciLexerHTML(Final de um marcador End of a tag QsciLexerHTML*Final de um bloco XMLEnd of an XML fragment QsciLexerHTMLEntidadeEntity QsciLexerHTMLhPrimeiro comentrio de parmetro de uma comando SGML*First parameter comment of an SGML command QsciLexerHTMLJPrimeiro parmetro em um comando SGML"First parameter of an SGML command QsciLexerHTMLComentrio HTML HTML comment QsciLexerHTMLHTML por padro HTML default QsciLexerHTMLhCadeia de caracteres HTML envolvida por aspas duplasHTML double-quoted string QsciLexerHTMLNmero HTML HTML number QsciLexerHTMLjCadeia de caracteres HTML envolvida por aspas simplesHTML single-quoted string QsciLexerHTMLVComentrio JavaScript ASP no estilo JavaDoc$JavaDoc style ASP JavaScript comment QsciLexerHTMLNComentrio JavaScript no estilo JavaDoc JavaDoc style JavaScript comment QsciLexerHTML*Comentrio JavaScriptJavaScript comment QsciLexerHTML*JavaScript por padroJavaScript default QsciLexerHTMLtCadeia de caracteres JavaScript envolvida por aspas duplasJavaScript double-quoted string QsciLexerHTML0Palavra chave JavaScriptJavaScript keyword QsciLexerHTML<Comentrio de linha JavaScriptJavaScript line comment QsciLexerHTML"Nmero JavaScriptJavaScript number QsciLexerHTML8Expresso regular JavaScriptJavaScript regular expression QsciLexerHTMLvCadeia de caracteres JavaScript envolvida por aspas simplesJavaScript single-quoted string QsciLexerHTML$Smbolo JavaScriptJavaScript symbol QsciLexerHTMLVCadeia de caracteres JavaScript no fechadaJavaScript unclosed string QsciLexerHTML$Palavra JavaScriptJavaScript word QsciLexerHTML4Outro texto em um marcadorOther text in a tag QsciLexerHTMLComentrio PHP PHP comment QsciLexerHTMLPHP por padro PHP default QsciLexerHTMLfCadeia de caracteres PHP envolvida por aspas duplasPHP double-quoted string QsciLexerHTMLNVarivel PHP envolvida por aspas duplasPHP double-quoted variable QsciLexerHTML"Palavra chave PHP PHP keyword QsciLexerHTML.Comentrio de linha PHPPHP line comment QsciLexerHTMLNmero PHP PHP number QsciLexerHTMLOperador PHP PHP operator QsciLexerHTMLhCadeia de caracteres PHP envolvida por aspas simplesPHP single-quoted string QsciLexerHTMLVarivel PHP PHP variable QsciLexerHTML*Nome de classe PythonPython class name QsciLexerHTML"Comentrio PythonPython comment QsciLexerHTML"Python por padroPython default QsciLexerHTMLlCadeia de caracteres Python envolvida por aspas duplasPython double-quoted string QsciLexerHTML>Nome de mtodo ou funo PythonPython function or method name QsciLexerHTML(Identificador PythonPython identifier QsciLexerHTML(Palavra chave PythonPython keyword QsciLexerHTMLNmero Python Python number QsciLexerHTMLOperador PythonPython operator QsciLexerHTMLnCadeia de caracteres Python envolvida por aspas simplesPython single-quoted string QsciLexerHTML|Cadeia de caracteres Python envolvida por aspas triplas duplas"Python triple double-quoted string QsciLexerHTML~Cadeia de caracteres Python envolvida por aspas triplas simples"Python triple single-quoted string QsciLexerHTML*Bloco SGML por padroSGML block default QsciLexerHTMLComando SGML SGML command QsciLexerHTMLComando SGML SGML comment QsciLexerHTMLSGML por padro SGML default QsciLexerHTMLhCadeia de caracteres SGML envolvida por aspas duplasSGML double-quoted string QsciLexerHTMLErro SGML SGML error QsciLexerHTMLjCadeia de caracteres SGML envolvida por aspas simplesSGML single-quoted string QsciLexerHTML,Entidade especial SGMLSGML special entity QsciLexerHTML$Marcador de script Script tag QsciLexerHTML:Incio de um bloco JavascriptStart of a JavaScript fragment QsciLexerHTML,Incio de um bloco PHPStart of a PHP fragment QsciLexerHTML2Incio de um bloco PythonStart of a Python fragment QsciLexerHTML6Incio de um bloco VBScriptStart of a VBScript fragment QsciLexerHTMLBIncio de um bloco Javascript ASP#Start of an ASP JavaScript fragment QsciLexerHTML:Incio de um bloco Python ASPStart of an ASP Python fragment QsciLexerHTML>Incio de um bloco VBScript ASP!Start of an ASP VBScript fragment QsciLexerHTML,Incio de um bloco ASPStart of an ASP fragment QsciLexerHTML8Incio de um bloco ASP com @Start of an ASP fragment with @ QsciLexerHTML,Incio de um bloco XMLStart of an XML fragment QsciLexerHTMLMarcadorTag QsciLexerHTML*Atributo desconhecidoUnknown attribute QsciLexerHTML*Marcador desconhecido Unknown tag QsciLexerHTMLDValor HTML no envolvido por aspasUnquoted HTML value QsciLexerHTML&Comentrio VBScriptVBScript comment QsciLexerHTML&VBScript por padroVBScript default QsciLexerHTML,Identificador VBScriptVBScript identifier QsciLexerHTML,Palavra chave VBScriptVBScript keyword QsciLexerHTMLNmero VBScriptVBScript number QsciLexerHTML:Cadeia de caracteres VBScriptVBScript string QsciLexerHTMLRCadeia de caracteres VBScript no fechadaVBScript unclosed string QsciLexerHTMLUUIDUUID QsciLexerIDL PadroDefault QsciLexerJSONComentar Linha Line comment QsciLexerJSON NmeroNumber QsciLexerJSONOperadorOperator QsciLexerJSON(Cadeia de CaracteresString QsciLexerJSON@Cadeia de caracteres no fechadaUnclosed string QsciLexerJSON"Expresso RegularRegular expressionQsciLexerJavaScriptFunes bsicasBasic functions QsciLexerLuaCaractere Character QsciLexerLuaComentrioComment QsciLexerLuaVFunes auxiiares, e/s e funes de sistema%Coroutines, i/o and system facilities QsciLexerLua PadroDefault QsciLexerLuaIdentificador Identifier QsciLexerLuaPalavra ChaveKeyword QsciLexerLua RtuloLabel QsciLexerLuaComentar Linha Line comment QsciLexerLua8Cadeia de caracteres literalLiteral string QsciLexerLua NmeroNumber QsciLexerLuaOperadorOperator QsciLexerLuaPreprocessador Preprocessor QsciLexerLua(Cadeia de CaracteresString QsciLexerLuapFunes de cadeia de caracteres e de tabelas matemticas!String, table and maths functions QsciLexerLua@Cadeia de caracteres no fechadaUnclosed string QsciLexerLua,Definio de usurio 1User defined 1 QsciLexerLua,Definio de usurio 2User defined 2 QsciLexerLua,Definio de usurio 3User defined 3 QsciLexerLua,Definio de usurio 4User defined 4 QsciLexerLuaComentrioCommentQsciLexerMakefile PadroDefaultQsciLexerMakefileErroErrorQsciLexerMakefileOperadorOperatorQsciLexerMakefilePreprocessador PreprocessorQsciLexerMakefileDestinoTargetQsciLexerMakefileVarivelVariableQsciLexerMakefile PadroDefaultQsciLexerMarkdownEspecialSpecialQsciLexerMarkdownComandoCommandQsciLexerMatlabComentrioCommentQsciLexerMatlab PadroDefaultQsciLexerMatlab^Cadeia de caracteres envolvida por aspas duplasDouble-quoted stringQsciLexerMatlabIdentificador IdentifierQsciLexerMatlabPalavra ChaveKeywordQsciLexerMatlab NmeroNumberQsciLexerMatlabOperadorOperatorQsciLexerMatlab`Cadeia de caracteres envolvida por aspas simplesSingle-quoted stringQsciLexerMatlabComentrioComment QsciLexerPO PadroDefault QsciLexerPODiretiva ruim Bad directive QsciLexerPOVComentrioComment QsciLexerPOVComentar Linha Comment line QsciLexerPOV PadroDefault QsciLexerPOVDiretiva Directive QsciLexerPOVIdentificador Identifier QsciLexerPOV NmeroNumber QsciLexerPOV0Objetos, CSG e aparnciaObjects, CSG and appearance QsciLexerPOVOperadorOperator QsciLexerPOV(Funes predefinidasPredefined functions QsciLexerPOV8Identificadores predefinidosPredefined identifiers QsciLexerPOV(Cadeia de CaracteresString QsciLexerPOV8Tipos, modificadores e itensTypes, modifiers and items QsciLexerPOV@Cadeia de caracteres no fechadaUnclosed string QsciLexerPOV,Definio de usurio 1User defined 1 QsciLexerPOV,Definio de usurio 2User defined 2 QsciLexerPOV,Definio de usurio 3User defined 3 QsciLexerPOVCaractere CharacterQsciLexerPascal PadroDefaultQsciLexerPascalIdentificador IdentifierQsciLexerPascalPalavra ChaveKeywordQsciLexerPascalComentar Linha Line commentQsciLexerPascal NmeroNumberQsciLexerPascalOperadorOperatorQsciLexerPascal`Cadeia de caracteres envolvida por aspas simplesSingle-quoted stringQsciLexerPascal@Cadeia de caracteres no fechadaUnclosed stringQsciLexerPascal VetorArray QsciLexerPerl\"here document" envolvido por aspas invertidasBacktick here document QsciLexerPerl Aspas Invertidas Backticks QsciLexerPerlComentrioComment QsciLexerPerlSeo de dados Data section QsciLexerPerl PadroDefault QsciLexerPerlT"here document" envolvido por aspas duplasDouble-quoted here document QsciLexerPerl^Cadeia de caracteres envolvida por aspas duplasDouble-quoted string QsciLexerPerlErroError QsciLexerPerlHashHash QsciLexerPerlDelimitador de documentos criados atravs de redicionadores (>> e >)Here document delimiter QsciLexerPerlIdentificador Identifier QsciLexerPerlPalavra ChaveKeyword QsciLexerPerl NmeroNumber QsciLexerPerlOperadorOperator QsciLexerPerlPODPOD QsciLexerPerl.POD em formato verbatim POD verbatim QsciLexerPerlXCadeia de caracteres envolvida por aspas (q)Quoted string (q) QsciLexerPerlZCadeia de caracteres envolvida por aspas (qq)Quoted string (qq) QsciLexerPerlZCadeia de caracteres envolvida por aspas (qr)Quoted string (qr) QsciLexerPerlZCadeia de caracteres envolvida por aspas (qw)Quoted string (qw) QsciLexerPerlZCadeia de caracteres envolvida por aspas (qx)Quoted string (qx) QsciLexerPerl"Expresso RegularRegular expression QsciLexerPerlEscalarScalar QsciLexerPerlV"here document" envolvido por aspas simplesSingle-quoted here document QsciLexerPerl`Cadeia de caracteres envolvida por aspas simplesSingle-quoted string QsciLexerPerlSubstituio Substitution QsciLexerPerl$Tabela de Smbolos Symbol table QsciLexerPerlComentrioCommentQsciLexerPostScript PadroDefaultQsciLexerPostScriptPalavra ChaveKeywordQsciLexerPostScript NmeroNumberQsciLexerPostScript TextoTextQsciLexerPostScriptAtribuio AssignmentQsciLexerPropertiesComentrioCommentQsciLexerProperties PadroDefaultQsciLexerPropertiesValor Padro Default valueQsciLexerProperties SeoSectionQsciLexerPropertiesNome da classe Class nameQsciLexerPythonComentrioCommentQsciLexerPython(Bloco de comentrios Comment blockQsciLexerPython PadroDefaultQsciLexerPython^Cadeia de caracteres envolvida por aspas duplasDouble-quoted stringQsciLexerPython0Nome da funo ou mtodoFunction or method nameQsciLexerPythonIdentificador IdentifierQsciLexerPythonPalavra ChaveKeywordQsciLexerPython NmeroNumberQsciLexerPythonOperadorOperatorQsciLexerPython`Cadeia de caracteres envolvida por aspas simplesSingle-quoted stringQsciLexerPythonhCadeia de caracteres envolvida por trs aspas duplasTriple double-quoted stringQsciLexerPythonjCadeia de caracteres envolvida por trs aspas simplesTriple single-quoted stringQsciLexerPython@Cadeia de caracteres no fechadaUnclosed stringQsciLexerPython Aspas Invertidas Backticks QsciLexerRubyNome da classe Class name QsciLexerRubyComentrioComment QsciLexerRubySeo de dados Data section QsciLexerRuby PadroDefault QsciLexerRuby^Cadeia de caracteres envolvida por aspas duplasDouble-quoted string QsciLexerRuby0Nome da funo ou mtodoFunction or method name QsciLexerRubyIdentificador Identifier QsciLexerRubyPalavra ChaveKeyword QsciLexerRuby NmeroNumber QsciLexerRubyOperadorOperator QsciLexerRubyPODPOD QsciLexerRuby"Expresso RegularRegular expression QsciLexerRuby`Cadeia de caracteres envolvida por aspas simplesSingle-quoted string QsciLexerRubySmboloSymbol QsciLexerRuby8Comentrio de linha usando ## comment line QsciLexerSQLComentrioComment QsciLexerSQL&Comentrio de Linha Comment line QsciLexerSQL PadroDefault QsciLexerSQL^Cadeia de caracteres envolvida por aspas duplasDouble-quoted string QsciLexerSQLIdentificador Identifier QsciLexerSQL*Palavra chave JavaDocJavaDoc keyword QsciLexerSQL@Erro de palavra chave do JavaDocJavaDoc keyword error QsciLexerSQL2Comentrio estilo JavaDocJavaDoc style comment QsciLexerSQLPalavra ChaveKeyword QsciLexerSQL NmeroNumber QsciLexerSQLOperadorOperator QsciLexerSQL,Comentrio do SQL*PlusSQL*Plus comment QsciLexerSQL2Palavra chave do SQL*PlusSQL*Plus keyword QsciLexerSQL$Prompt do SQL*PlusSQL*Plus prompt QsciLexerSQL`Cadeia de caracteres envolvida por aspas simplesSingle-quoted string QsciLexerSQL,Definio de usurio 1User defined 1 QsciLexerSQL,Definio de usurio 2User defined 2 QsciLexerSQL,Definio de usurio 3User defined 3 QsciLexerSQL,Definio de usurio 4User defined 4 QsciLexerSQLComandoCommandQsciLexerSpiceComentrioCommentQsciLexerSpice PadroDefaultQsciLexerSpiceIdentificador IdentifierQsciLexerSpice NmeroNumberQsciLexerSpice ValorValueQsciLexerSpiceComentrioComment QsciLexerTCL(Bloco de comentrios Comment block QsciLexerTCL PadroDefault QsciLexerTCLIdentificador Identifier QsciLexerTCL NmeroNumber QsciLexerTCLOperadorOperator QsciLexerTCLSubstituio Substitution QsciLexerTCL,Definio de usurio 1User defined 1 QsciLexerTCL,Definio de usurio 2User defined 2 QsciLexerTCL,Definio de usurio 3User defined 3 QsciLexerTCL,Definio de usurio 4User defined 4 QsciLexerTCLComandoCommand QsciLexerTeX PadroDefault QsciLexerTeX GrupoGroup QsciLexerTeXEspecialSpecial QsciLexerTeXSmboloSymbol QsciLexerTeX TextoText QsciLexerTeXAtributo Attribute QsciLexerVHDLComentrioComment QsciLexerVHDL(Bloco de comentrios Comment block QsciLexerVHDL PadroDefault QsciLexerVHDLIdentificador Identifier QsciLexerVHDLPalavra ChaveKeyword QsciLexerVHDL NmeroNumber QsciLexerVHDLOperadorOperator QsciLexerVHDL(Cadeia de CaracteresString QsciLexerVHDL@Cadeia de caracteres no fechadaUnclosed string QsciLexerVHDLComentrioCommentQsciLexerVerilog PadroDefaultQsciLexerVerilogIdentificador IdentifierQsciLexerVerilogComentar Linha Line commentQsciLexerVerilog NmeroNumberQsciLexerVerilogOperadorOperatorQsciLexerVerilogXIdentificadores e palavras chave secundrias"Secondary keywords and identifiersQsciLexerVerilog(Cadeia de CaracteresStringQsciLexerVerilog@Cadeia de caracteres no fechadaUnclosed stringQsciLexerVerilogComentrioComment QsciLexerYAML PadroDefault QsciLexerYAMLIdentificador Identifier QsciLexerYAMLPalavra ChaveKeyword QsciLexerYAML NmeroNumber QsciLexerYAMLOperadorOperator QsciLexerYAMLsqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscintilla_pt_br.ts000066400000000000000000004415201345112435200245500ustar00rootroot00000000000000 QsciCommand Move down one line Mover uma linha para baixo Extend selection down one line Extender a seleção uma linha para baixo Scroll view down one line Descer a visão uma linha para baixo Extend rectangular selection down one line Extender a seleção retangular uma linha para baixo Move up one line Mover uma linha para cima Extend selection up one line Extender a seleção uma linha para cima Scroll view up one line Subir a visão uma linha para cima Extend rectangular selection up one line Extender a seleção retangular uma linha para cima Move up one paragraph Mover um paragrafo para cima Extend selection up one paragraph Extender a seleção um paragrafo para cima Move down one paragraph Mover um paragrafo para baixo Scroll to start of document Scroll to end of document Scroll vertically to centre current line Extend selection down one paragraph Extender a seleção um paragrafo para baixo Move left one character Mover um caractere para a esquerda Extend selection left one character Extender a seleção um caractere para esquerda Move left one word Mover uma palavra para esquerda Extend selection left one word Extender a seleção uma palavra para esquerda Extend rectangular selection left one character Extender a seleção retangular um caractere para esquerda Move right one character Mover um caractere para direita Extend selection right one character Extender a seleção um caractere para direita Move right one word Mover uma palavra para direita Extend selection right one word Extender a seleção uma palavra para direita Extend rectangular selection right one character Extender a seleção retangular um caractere para direita Move to end of previous word Extend selection to end of previous word Move to end of next word Extend selection to end of next word Move left one word part Mover uma parte da palavra para esquerda Extend selection left one word part Extender a seleção uma parte de palavra para esquerda Move right one word part Mover uma parte da palavra para direita Extend selection right one word part Extender a seleção uma parte de palavra para direita Move up one page Mover uma página para cima Extend selection up one page Extender a seleção uma página para cima Extend rectangular selection up one page Extender a seleção retangular uma página para cima Move down one page Mover uma página para baixo Extend selection down one page Extender a seleção uma página para baixo Extend rectangular selection down one page Extender a seleção retangular uma página para baixo Delete current character Excluir caractere atual Cut selection Recortar seleção Delete word to right Excluir palavra para direita Move to start of document line Extend selection to start of document line Extend rectangular selection to start of document line Move to start of display line Extend selection to start of display line Move to start of display or document line Extend selection to start of display or document line Move to first visible character in document line Extend selection to first visible character in document line Extend rectangular selection to first visible character in document line Move to first visible character of display in document line Extend selection to first visible character in display or document line Move to end of document line Extend selection to end of document line Extend rectangular selection to end of document line Move to end of display line Extend selection to end of display line Move to end of display or document line Extend selection to end of display or document line Move to start of document Extend selection to start of document Move to end of document Extend selection to end of document Stuttered move up one page Stuttered extend selection up one page Stuttered move down one page Stuttered extend selection down one page Delete previous character if not at start of line Delete right to end of next word Delete line to right Excluir linha para direita Transpose current and previous lines Duplicate the current line Select all Select document Move selected lines up one line Move selected lines down one line Toggle insert/overtype Alternar entre modo de inserir/sobreescrever Paste Copiar Copy selection Copiar seleção Insert newline De-indent one level Cancel Cancelar Delete previous character Excluir caractere anterior Delete word to left Excluir palavra a esquerda Delete line to left Excluir linha a esquerda Undo last command Redo last command Refazer último comando Indent one level Indentar um nível Zoom in Aumentar zoom Zoom out Diminuir zoom Formfeed Alimentação da Página Cut current line Configurar linha atual Delete current line Excluir linha atual Copy current line Copiar linha atual Convert selection to lower case Converter a seleção para minúscula Convert selection to upper case Converter a seleção para maiúscula Duplicate selection QsciLexerAVS Default Padrão Block comment Nested block comment Line comment Comentar Linha Number Número Operator Operador Identifier Identificador Double-quoted string Cadeia de caracteres envolvida por aspas duplas Triple double-quoted string Cadeia de caracteres envolvida por três aspas duplas Keyword Palavra Chave Filter Plugin Function Clip property User defined QsciLexerBash Default Padrão Error Número Comment Comentário Number Número Keyword Palavra Chave Double-quoted string Cadeia de caracteres envolvida por aspas duplas Single-quoted string Cadeia de caracteres envolvida por aspas simples Operator Operador Identifier Identificador Scalar Escalar Parameter expansion Parâmetro de Expansão Backticks Aspas Invertidas Here document delimiter Delimitador de "here documents" Single-quoted here document "here document" envolvido por aspas simples QsciLexerBatch Default Padrão Comment Comentário Keyword Palavra Chave Label Rótulo Hide command character Esconder caractere de comando External command Comando externo Variable Variável Operator Operador QsciLexerCMake Default Padrão Comment Comentário String Cadeia de Caracteres Left quoted string Right quoted string Function Variable Variável Label Rótulo User defined WHILE block FOREACH block IF block MACRO block Variable within a string Number Número QsciLexerCPP Default Padrão Inactive default C comment Comentário C Inactive C comment C++ comment Comentário C++ Inactive C++ comment JavaDoc style C comment Comentário JavaDoc estilo C Inactive JavaDoc style C comment Number Número Inactive number Keyword Palavra Chave Inactive keyword Double-quoted string Cadeia de caracteres envolvida por aspas duplas Inactive double-quoted string Single-quoted string Cadeia de caracteres envolvida por aspas simples Inactive single-quoted string IDL UUID Inactive IDL UUID Pre-processor block Instruções de pré-processamento Inactive pre-processor block Operator Operador Inactive operator Identifier Identificador Inactive identifier Unclosed string Cadeia de caracteres não fechada Inactive unclosed string C# verbatim string Inactive C# verbatim string JavaScript regular expression Expressão regular JavaScript Inactive JavaScript regular expression JavaDoc style C++ comment Comentário JavaDoc estilo C++ Inactive JavaDoc style C++ comment Secondary keywords and identifiers Identificadores e palavras chave secundárias Inactive secondary keywords and identifiers JavaDoc keyword Palavra chave JavaDoc Inactive JavaDoc keyword JavaDoc keyword error Erro de palavra chave do JavaDoc Inactive JavaDoc keyword error Global classes and typedefs Classes e definições de tipo globais Inactive global classes and typedefs C++ raw string Inactive C++ raw string Vala triple-quoted verbatim string Inactive Vala triple-quoted verbatim string Pike hash-quoted string Inactive Pike hash-quoted string Pre-processor C comment Inactive pre-processor C comment JavaDoc style pre-processor comment Inactive JavaDoc style pre-processor comment User-defined literal Inactive user-defined literal Task marker Inactive task marker Escape sequence Inactive escape sequence QsciLexerCSS Default Padrão Tag Marcador Class selector Seletor de classe Pseudo-class Pseudo-classe Unknown pseudo-class Pseudo-classe desconhecida Operator Operador CSS1 property Propriedade CSS1 Unknown property Propriedade desconhecida Value Valor ID selector Seletor de ID Important Importante @-rule regra-@ Double-quoted string Cadeia de caracteres envolvida por aspas duplas Single-quoted string Cadeia de caracteres envolvida por aspas simples CSS2 property Propriedade CSS2 Attribute Atributo CSS3 property Propriedade CSS2 {3 ?} Pseudo-element Extended CSS property Extended pseudo-class Extended pseudo-element Media rule Variable Variável QsciLexerCSharp Verbatim string Cadeia de caracteres no formato verbatim QsciLexerCoffeeScript Default Padrão C-style comment C++-style comment JavaDoc C-style comment Number Número Keyword Palavra Chave Double-quoted string Cadeia de caracteres envolvida por aspas duplas Single-quoted string Cadeia de caracteres envolvida por aspas simples IDL UUID Pre-processor block Instruções de pré-processamento Operator Operador Identifier Identificador Unclosed string Cadeia de caracteres não fechada C# verbatim string Regular expression Expressão Regular JavaDoc C++-style comment Secondary keywords and identifiers Identificadores e palavras chave secundárias JavaDoc keyword Palavra chave JavaDoc JavaDoc keyword error Erro de palavra chave do JavaDoc Global classes Block comment Block regular expression Block regular expression comment Instance property QsciLexerD Default Padrão Block comment Line comment Comentar Linha DDoc style block comment Nesting comment Number Número Keyword Palavra Chave Secondary keyword Documentation keyword Type definition String Cadeia de Caracteres Unclosed string Cadeia de caracteres não fechada Character Caractere Operator Operador Identifier Identificador DDoc style line comment DDoc keyword Palavra chave JavaDoc DDoc keyword error Erro de palavra chave do JavaDoc Backquoted string Raw string User defined 1 Definição de usuário 1 User defined 2 Definição de usuário 2 User defined 3 Definição de usuário 3 QsciLexerDiff Default Padrão Comment Comentário Command Comando Header Cabeçalho Position Posição Removed line Linha Removida Added line Linha Adicionada Changed line QsciLexerFortran77 Default Padrão Comment Comentário Number Número Single-quoted string Cadeia de caracteres envolvida por aspas simples Double-quoted string Cadeia de caracteres envolvida por aspas duplas Unclosed string Cadeia de caracteres não fechada Operator Operador Identifier Identificador Keyword Palavra Chave Intrinsic function Extended function Pre-processor block Instruções de pré-processamento Dotted operator Label Rótulo Continuation QsciLexerHTML HTML default HTML por padrão Tag Marcador Unknown tag Marcador desconhecido Attribute Atributo Unknown attribute Atributo desconhecido HTML number Número HTML HTML double-quoted string Cadeia de caracteres HTML envolvida por aspas duplas HTML single-quoted string Cadeia de caracteres HTML envolvida por aspas simples Other text in a tag Outro texto em um marcador HTML comment Comentário HTML Entity Entidade End of a tag Final de um marcador Start of an XML fragment Início de um bloco XML End of an XML fragment Final de um bloco XML Script tag Marcador de script Start of an ASP fragment with @ Início de um bloco ASP com @ Start of an ASP fragment Início de um bloco ASP CDATA CDATA Start of a PHP fragment Início de um bloco PHP Unquoted HTML value Valor HTML não envolvido por aspas ASP X-Code comment Comentário ASP X-Code SGML default SGML por padrão SGML command Comando SGML First parameter of an SGML command Primeiro parâmetro em um comando SGML SGML double-quoted string Cadeia de caracteres SGML envolvida por aspas duplas SGML single-quoted string Cadeia de caracteres SGML envolvida por aspas simples SGML error Erro SGML SGML special entity Entidade especial SGML SGML comment Comando SGML First parameter comment of an SGML command Primeiro comentário de parâmetro de uma comando SGML SGML block default Bloco SGML por padrão Start of a JavaScript fragment Início de um bloco Javascript JavaScript default JavaScript por padrão JavaScript comment Comentário JavaScript JavaScript line comment Comentário de linha JavaScript JavaDoc style JavaScript comment Comentário JavaScript no estilo JavaDoc JavaScript number Número JavaScript JavaScript word Palavra JavaScript JavaScript keyword Palavra chave JavaScript JavaScript double-quoted string Cadeia de caracteres JavaScript envolvida por aspas duplas JavaScript single-quoted string Cadeia de caracteres JavaScript envolvida por aspas simples JavaScript symbol Símbolo JavaScript JavaScript unclosed string Cadeia de caracteres JavaScript não fechada JavaScript regular expression Expressão regular JavaScript Start of an ASP JavaScript fragment Início de um bloco Javascript ASP ASP JavaScript default JavaScript ASP por padrão ASP JavaScript comment Comentário JavaScript ASP ASP JavaScript line comment Comentário de linha JavaScript ASP JavaDoc style ASP JavaScript comment Comentário JavaScript ASP no estilo JavaDoc ASP JavaScript number Número JavaScript ASP ASP JavaScript word Palavra chave JavaScript ASP ASP JavaScript keyword Palavra chave JavaScript ASP ASP JavaScript double-quoted string Cadeia de caracteres JavaScript ASP envolvida por aspas duplas ASP JavaScript single-quoted string Cadeia de caracteres JavaScript ASP envolvida por aspas simples ASP JavaScript symbol Símbolo JavaScript ASP ASP JavaScript unclosed string Cadeia de caracteres JavaScript ASP não fechada ASP JavaScript regular expression Expressão regular JavaScript ASP Start of a VBScript fragment Início de um bloco VBScript VBScript default VBScript por padrão VBScript comment Comentário VBScript VBScript number Número VBScript VBScript keyword Palavra chave VBScript VBScript string Cadeia de caracteres VBScript VBScript identifier Identificador VBScript VBScript unclosed string Cadeia de caracteres VBScript não fechada Start of an ASP VBScript fragment Início de um bloco VBScript ASP ASP VBScript default VBScript ASP por padrão ASP VBScript comment Comentário VBScript ASP ASP VBScript number Número VBScript ASP ASP VBScript keyword Palavra chave VBScript ASP ASP VBScript string Cadeia de caracteres VBScript ASP ASP VBScript identifier Identificador VBScript ASP ASP VBScript unclosed string Cadeia de caracteres VBScript ASP não fechada Start of a Python fragment Início de um bloco Python Python default Python por padrão Python comment Comentário Python Python number Número Python Python double-quoted string Cadeia de caracteres Python envolvida por aspas duplas Python single-quoted string Cadeia de caracteres Python envolvida por aspas simples Python keyword Palavra chave Python Python triple double-quoted string Cadeia de caracteres Python envolvida por aspas triplas duplas Python triple single-quoted string Cadeia de caracteres Python envolvida por aspas triplas simples Python class name Nome de classe Python Python function or method name Nome de método ou função Python Python operator Operador Python Python identifier Identificador Python Start of an ASP Python fragment Início de um bloco Python ASP ASP Python default Python ASP por padrão ASP Python comment Comentário Python ASP ASP Python number Número Python ASP ASP Python double-quoted string Cadeia de caracteres Python ASP envolvida por aspas duplas ASP Python single-quoted string Cadeia de caracteres Python ASP envolvida por aspas simples ASP Python keyword Palavra chave Python ASP ASP Python triple double-quoted string Cadeia de caracteres Python ASP envolvida por aspas triplas duplas ASP Python triple single-quoted string Cadeia de caracteres Python ASP envolvida por aspas triplas simples ASP Python class name Nome de classe Python ASP ASP Python function or method name Nome de método ou função Python ASP ASP Python operator Operador Python ASP ASP Python identifier Identificador Python ASP PHP default PHP por padrão PHP double-quoted string Cadeia de caracteres PHP envolvida por aspas duplas PHP single-quoted string Cadeia de caracteres PHP envolvida por aspas simples PHP keyword Palavra chave PHP PHP number Número PHP PHP variable Variável PHP PHP comment Comentário PHP PHP line comment Comentário de linha PHP PHP double-quoted variable Variável PHP envolvida por aspas duplas PHP operator Operador PHP QsciLexerIDL UUID UUID QsciLexerJSON Default Padrão Number Número String Cadeia de Caracteres Unclosed string Cadeia de caracteres não fechada Property Escape sequence Line comment Comentar Linha Block comment Operator Operador IRI JSON-LD compact IRI JSON keyword JSON-LD keyword Parsing error QsciLexerJavaScript Regular expression Expressão Regular QsciLexerLua Default Padrão Comment Comentário Line comment Comentar Linha Number Número Keyword Palavra Chave String Cadeia de Caracteres Character Caractere Literal string Cadeia de caracteres literal Preprocessor Preprocessador Operator Operador Identifier Identificador Unclosed string Cadeia de caracteres não fechada Basic functions Funções básicas String, table and maths functions Funções de cadeia de caracteres e de tabelas matemáticas Coroutines, i/o and system facilities Funções auxiiares, e/s e funções de sistema User defined 1 Definição de usuário 1 User defined 2 Definição de usuário 2 User defined 3 Definição de usuário 3 User defined 4 Definição de usuário 4 Label Rótulo QsciLexerMakefile Default Padrão Comment Comentário Preprocessor Preprocessador Variable Variável Operator Operador Target Destino Error Erro QsciLexerMarkdown Default Padrão Special Especial Strong emphasis using double asterisks Strong emphasis using double underscores Emphasis using single asterisks Emphasis using single underscores Level 1 header Level 2 header Level 3 header Level 4 header Level 5 header Level 6 header Pre-char Unordered list item Ordered list item Block quote Strike out Horizontal rule Link Code between backticks Code between double backticks Code block QsciLexerMatlab Default Padrão Comment Comentário Command Comando Number Número Keyword Palavra Chave Single-quoted string Cadeia de caracteres envolvida por aspas simples Operator Operador Identifier Identificador Double-quoted string Cadeia de caracteres envolvida por aspas duplas QsciLexerPO Default Padrão Comment Comentário Message identifier Message identifier text Message string Message string text Message context Message context text Fuzzy flag Programmer comment Reference Flags Message identifier text end-of-line Message string text end-of-line Message context text end-of-line QsciLexerPOV Default Padrão Comment Comentário Comment line Comentar Linha Number Número Operator Operador Identifier Identificador String Cadeia de Caracteres Unclosed string Cadeia de caracteres não fechada Directive Diretiva Bad directive Diretiva ruim Objects, CSG and appearance Objetos, CSG e aparência Types, modifiers and items Tipos, modificadores e itens Predefined identifiers Identificadores predefinidos Predefined functions Funções predefinidas User defined 1 Definição de usuário 1 User defined 2 Definição de usuário 2 User defined 3 Definição de usuário 3 QsciLexerPascal Default Padrão Line comment Comentar Linha Number Número Keyword Palavra Chave Single-quoted string Cadeia de caracteres envolvida por aspas simples Operator Operador Identifier Identificador '{ ... }' style comment '(* ... *)' style comment '{$ ... }' style pre-processor block '(*$ ... *)' style pre-processor block Hexadecimal number Unclosed string Cadeia de caracteres não fechada Character Caractere Inline asm QsciLexerPerl Default Padrão Error Erro Comment Comentário POD POD Number Número Keyword Palavra Chave Double-quoted string Cadeia de caracteres envolvida por aspas duplas Single-quoted string Cadeia de caracteres envolvida por aspas simples Operator Operador Identifier Identificador Scalar Escalar Array Vetor Hash Hash Symbol table Tabela de Símbolos Regular expression Expressão Regular Substitution Substituição Backticks Aspas Invertidas Data section Seção de dados Here document delimiter Delimitador de documentos criados através de redicionadores (>> e >) Single-quoted here document "here document" envolvido por aspas simples Double-quoted here document "here document" envolvido por aspas duplas Backtick here document "here document" envolvido por aspas invertidas Quoted string (q) Cadeia de caracteres envolvida por aspas (q) Quoted string (qq) Cadeia de caracteres envolvida por aspas (qq) Quoted string (qx) Cadeia de caracteres envolvida por aspas (qx) Quoted string (qr) Cadeia de caracteres envolvida por aspas (qr) Quoted string (qw) Cadeia de caracteres envolvida por aspas (qw) POD verbatim POD em formato verbatim Subroutine prototype Format identifier Format body Double-quoted string (interpolated variable) Translation Regular expression (interpolated variable) Substitution (interpolated variable) Backticks (interpolated variable) Double-quoted here document (interpolated variable) Backtick here document (interpolated variable) Quoted string (qq, interpolated variable) Quoted string (qx, interpolated variable) Quoted string (qr, interpolated variable) QsciLexerPostScript Default Padrão Comment Comentário DSC comment DSC comment value Number Número Name Keyword Palavra Chave Literal Immediately evaluated literal Array parenthesis Dictionary parenthesis Procedure parenthesis Text Texto Hexadecimal string Base85 string Bad string character QsciLexerProperties Default Padrão Comment Comentário Section Seção Assignment Atribuição Default value Valor Padrão Key QsciLexerPython Default Padrão Comment Comentário Number Número Double-quoted string Cadeia de caracteres envolvida por aspas duplas Single-quoted string Cadeia de caracteres envolvida por aspas simples Keyword Palavra Chave Triple single-quoted string Cadeia de caracteres envolvida por três aspas simples Triple double-quoted string Cadeia de caracteres envolvida por três aspas duplas Class name Nome da classe Function or method name Nome da função ou método Operator Operador Identifier Identificador Comment block Bloco de comentários Unclosed string Cadeia de caracteres não fechada Highlighted identifier Decorator QsciLexerRuby Default Padrão Comment Comentário Number Número Double-quoted string Cadeia de caracteres envolvida por aspas duplas Single-quoted string Cadeia de caracteres envolvida por aspas simples Keyword Palavra Chave Class name Nome da classe Function or method name Nome da função ou método Operator Operador Identifier Identificador Error POD POD Regular expression Expressão Regular Global Symbol Símbolo Module name Instance variable Class variable Backticks Aspas Invertidas Data section Seção de dados Here document delimiter Here document %q string %Q string %x string %r string %w string Demoted keyword stdin stdout stderr QsciLexerSQL Default Padrão Comment Comentário Number Número Keyword Palavra Chave Single-quoted string Cadeia de caracteres envolvida por aspas simples Operator Operador Identifier Identificador Comment line Comentário de Linha JavaDoc style comment Comentário estilo JavaDoc Double-quoted string Cadeia de caracteres envolvida por aspas duplas SQL*Plus keyword Palavra chave do SQL*Plus SQL*Plus prompt Prompt do SQL*Plus SQL*Plus comment Comentário do SQL*Plus # comment line Comentário de linha usando # JavaDoc keyword Palavra chave JavaDoc JavaDoc keyword error Erro de palavra chave do JavaDoc User defined 1 Definição de usuário 1 User defined 2 Definição de usuário 2 User defined 3 Definição de usuário 3 User defined 4 Definição de usuário 4 Quoted identifier Quoted operator QsciLexerSpice Default Padrão Identifier Identificador Command Comando Function Parameter Number Número Delimiter Value Valor Comment Comentário QsciLexerTCL Default Padrão Comment Comentário Comment line Number Número Quoted keyword Quoted string Operator Operador Identifier Identificador Substitution Substituição Brace substitution Modifier Expand keyword TCL keyword Tk keyword iTCL keyword Tk command User defined 1 Definição de usuário 1 User defined 2 Definição de usuário 2 User defined 3 Definição de usuário 3 User defined 4 Definição de usuário 4 Comment box Comment block Bloco de comentários QsciLexerTeX Default Padrão Special Especial Group Grupo Symbol Símbolo Command Comando Text Texto QsciLexerVHDL Default Padrão Comment Comentário Comment line Number Número String Cadeia de Caracteres Operator Operador Identifier Identificador Unclosed string Cadeia de caracteres não fechada Keyword Palavra Chave Standard operator Attribute Atributo Standard function Standard package Standard type User defined Comment block Bloco de comentários QsciLexerVerilog Default Padrão Comment Comentário Line comment Comentar Linha Bang comment Number Número Primary keywords and identifiers String Cadeia de Caracteres Secondary keywords and identifiers Identificadores e palavras chave secundárias System task Preprocessor block Operator Operador Identifier Identificador Unclosed string Cadeia de caracteres não fechada User defined tasks and identifiers Keyword comment Inactive keyword comment Input port declaration Inactive input port declaration Output port declaration Inactive output port declaration Input/output port declaration Inactive input/output port declaration Port connection Inactive port connection QsciLexerYAML Default Padrão Comment Comentário Identifier Identificador Keyword Palavra Chave Number Número Reference Document delimiter Text block marker Syntax error marker Operator Operador QsciScintilla &Undo &Redo Cu&t &Copy &Paste Delete Select All sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qsciprinter.cpp000066400000000000000000000112061345112435200237100ustar00rootroot00000000000000// This module implements the QsciPrinter class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qsciprinter.h" #if !defined(QT_NO_PRINTER) #include #include #include #include "Qsci/qsciscintillabase.h" // The ctor. QsciPrinter::QsciPrinter(QPrinter::PrinterMode mode) : QPrinter(mode), mag(0), wrap(QsciScintilla::WrapWord) { } // The dtor. QsciPrinter::~QsciPrinter() { } // Format the page before the document text is drawn. void QsciPrinter::formatPage(QPainter &, bool, QRect &, int) { } // Print a range of lines to a printer. int QsciPrinter::printRange(QsciScintillaBase *qsb, int from, int to) { // Sanity check. if (!qsb) return false; // Setup the printing area. QRect def_area; def_area.setX(0); def_area.setY(0); def_area.setWidth(width()); def_area.setHeight(height()); // Get the page range. int pgFrom, pgTo; pgFrom = fromPage(); pgTo = toPage(); // Find the position range. long startPos, endPos; endPos = qsb->SendScintilla(QsciScintillaBase::SCI_GETLENGTH); startPos = (from > 0 ? qsb -> SendScintilla(QsciScintillaBase::SCI_POSITIONFROMLINE,from) : 0); if (to >= 0) { long toPos = qsb -> SendScintilla(QsciScintillaBase::SCI_POSITIONFROMLINE,to + 1); if (endPos > toPos) endPos = toPos; } if (startPos >= endPos) return false; QPainter painter(this); bool reverse = (pageOrder() == LastPageFirst); bool needNewPage = false; qsb -> SendScintilla(QsciScintillaBase::SCI_SETPRINTMAGNIFICATION,mag); qsb -> SendScintilla(QsciScintillaBase::SCI_SETPRINTWRAPMODE,wrap); for (int i = 1; i <= numCopies(); ++i) { // If we are printing in reverse page order then remember the start // position of each page. QStack pageStarts; int currPage = 1; long pos = startPos; while (pos < endPos) { // See if we have finished the requested page range. if (pgTo > 0 && pgTo < currPage) break; // See if we are going to render this page, or just see how much // would fit onto it. bool render = false; if (pgFrom == 0 || pgFrom <= currPage) { if (reverse) pageStarts.push(pos); else { render = true; if (needNewPage) { if (!newPage()) return false; } else needNewPage = true; } } QRect area = def_area; formatPage(painter,render,area,currPage); pos = qsb -> SendScintilla(QsciScintillaBase::SCI_FORMATRANGE,render,&painter,area,pos,endPos); ++currPage; } // All done if we are printing in normal page order. if (!reverse) continue; // Now go through each page on the stack and really print it. while (!pageStarts.isEmpty()) { --currPage; long ePos = pos; pos = pageStarts.pop(); if (needNewPage) { if (!newPage()) return false; } else needNewPage = true; QRect area = def_area; formatPage(painter,true,area,currPage); qsb->SendScintilla(QsciScintillaBase::SCI_FORMATRANGE,true,&painter,area,pos,ePos); } } return true; } // Set the print magnification in points. void QsciPrinter::setMagnification(int magnification) { mag = magnification; } // Set the line wrap mode. void QsciPrinter::setWrapMode(QsciScintilla::WrapMode wmode) { wrap = wmode; } #endif sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qsciscintilla.cpp000066400000000000000000003327551345112435200242260ustar00rootroot00000000000000// This module implements the "official" high-level API of the Qt port of // Scintilla. It is modelled on QTextEdit - a method of the same name should // behave in the same way. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qsciscintilla.h" #include #include #include #include #include #include #include #include #include #include #include #include "Qsci/qsciabstractapis.h" #include "Qsci/qscicommandset.h" #include "Qsci/qscilexer.h" #include "Qsci/qscistyle.h" #include "Qsci/qscistyledtext.h" // Make sure these match the values in Scintilla.h. We don't #include that // file because it just causes more clashes. #define KEYWORDSET_MAX 8 #define MARKER_MAX 31 // The list separators for auto-completion and user lists. const char acSeparator = '\x03'; const char userSeparator = '\x04'; // The default fold margin width. static const int defaultFoldMarginWidth = 14; // The default set of characters that make up a word. static const char *defaultWordChars = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; // Forward declarations. static QColor asQColor(long sci_colour); // The ctor. QsciScintilla::QsciScintilla(QWidget *parent) : QsciScintillaBase(parent), allocatedMarkers(0), allocatedIndicators(7), oldPos(-1), selText(false), fold(NoFoldStyle), foldmargin(2), autoInd(false), braceMode(NoBraceMatch), acSource(AcsNone), acThresh(-1), wchars(defaultWordChars), call_tips_position(CallTipsBelowText), call_tips_style(CallTipsNoContext), maxCallTips(-1), use_single(AcusNever), explicit_fillups(""), fillups_enabled(false) { connect(this,SIGNAL(SCN_MODIFYATTEMPTRO()), SIGNAL(modificationAttempted())); connect(this,SIGNAL(SCN_MODIFIED(int,int,const char *,int,int,int,int,int,int,int)), SLOT(handleModified(int,int,const char *,int,int,int,int,int,int,int))); connect(this,SIGNAL(SCN_CALLTIPCLICK(int)), SLOT(handleCallTipClick(int))); connect(this,SIGNAL(SCN_CHARADDED(int)), SLOT(handleCharAdded(int))); connect(this,SIGNAL(SCN_INDICATORCLICK(int,int)), SLOT(handleIndicatorClick(int,int))); connect(this,SIGNAL(SCN_INDICATORRELEASE(int,int)), SLOT(handleIndicatorRelease(int,int))); connect(this,SIGNAL(SCN_MARGINCLICK(int,int,int)), SLOT(handleMarginClick(int,int,int))); connect(this,SIGNAL(SCN_MARGINRIGHTCLICK(int,int,int)), SLOT(handleMarginRightClick(int,int,int))); connect(this,SIGNAL(SCN_SAVEPOINTREACHED()), SLOT(handleSavePointReached())); connect(this,SIGNAL(SCN_SAVEPOINTLEFT()), SLOT(handleSavePointLeft())); connect(this,SIGNAL(SCN_UPDATEUI(int)), SLOT(handleUpdateUI(int))); connect(this,SIGNAL(QSCN_SELCHANGED(bool)), SLOT(handleSelectionChanged(bool))); connect(this,SIGNAL(SCN_AUTOCSELECTION(const char *,int)), SLOT(handleAutoCompletionSelection())); connect(this,SIGNAL(SCN_USERLISTSELECTION(const char *,int)), SLOT(handleUserListSelection(const char *,int))); // Set the default font. setFont(QApplication::font()); // Set the default fore and background colours. QPalette pal = QApplication::palette(); setColor(pal.text().color()); setPaper(pal.base().color()); setSelectionForegroundColor(pal.highlightedText().color()); setSelectionBackgroundColor(pal.highlight().color()); #if defined(Q_OS_WIN) setEolMode(EolWindows); #else // Note that EolMac is pre-OS/X. setEolMode(EolUnix); #endif // Capturing the mouse seems to cause problems on multi-head systems. Qt // should do the right thing anyway. SendScintilla(SCI_SETMOUSEDOWNCAPTURES, 0UL); setMatchedBraceForegroundColor(Qt::blue); setUnmatchedBraceForegroundColor(Qt::red); setAnnotationDisplay(AnnotationStandard); setLexer(); // Set the visible policy. These are the same as SciTE's defaults // which, presumably, are sensible. SendScintilla(SCI_SETVISIBLEPOLICY, VISIBLE_STRICT | VISIBLE_SLOP, 4); // The default behaviour is unexpected. SendScintilla(SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE); // Create the standard command set. stdCmds = new QsciCommandSet(this); doc.display(this,0); } // The dtor. QsciScintilla::~QsciScintilla() { // Detach any current lexer. detachLexer(); doc.undisplay(this); delete stdCmds; } // Return the current text colour. QColor QsciScintilla::color() const { return nl_text_colour; } // Set the text colour. void QsciScintilla::setColor(const QColor &c) { if (lex.isNull()) { // Assume style 0 applies to everything so that we don't need to use // SCI_STYLECLEARALL which clears everything. SendScintilla(SCI_STYLESETFORE, 0, c); nl_text_colour = c; } } // Return the overwrite mode. bool QsciScintilla::overwriteMode() const { return SendScintilla(SCI_GETOVERTYPE); } // Set the overwrite mode. void QsciScintilla::setOverwriteMode(bool overwrite) { SendScintilla(SCI_SETOVERTYPE, overwrite); } // Return the current paper colour. QColor QsciScintilla::paper() const { return nl_paper_colour; } // Set the paper colour. void QsciScintilla::setPaper(const QColor &c) { if (lex.isNull()) { // Assume style 0 applies to everything so that we don't need to use // SCI_STYLECLEARALL which clears everything. We still have to set the // default style as well for the background without any text. SendScintilla(SCI_STYLESETBACK, 0, c); SendScintilla(SCI_STYLESETBACK, STYLE_DEFAULT, c); nl_paper_colour = c; } } // Set the default font. void QsciScintilla::setFont(const QFont &f) { if (lex.isNull()) { // Assume style 0 applies to everything so that we don't need to use // SCI_STYLECLEARALL which clears everything. setStylesFont(f, 0); QWidget::setFont(f); } } // Enable/disable auto-indent. void QsciScintilla::setAutoIndent(bool autoindent) { autoInd = autoindent; } // Set the brace matching mode. void QsciScintilla::setBraceMatching(BraceMatch bm) { braceMode = bm; } // Handle the addition of a character. void QsciScintilla::handleCharAdded(int ch) { // Ignore if there is a selection. long pos = SendScintilla(SCI_GETSELECTIONSTART); if (pos != SendScintilla(SCI_GETSELECTIONEND) || pos == 0) return; // If auto-completion is already active then see if this character is a // start character. If it is then create a new list which will be a subset // of the current one. The case where it isn't a start character seems to // be handled correctly elsewhere. if (isListActive() && isStartChar(ch)) { cancelList(); startAutoCompletion(acSource, false, use_single == AcusAlways); return; } // Handle call tips. if (call_tips_style != CallTipsNone && !lex.isNull() && strchr("(),", ch) != NULL) callTip(); // Handle auto-indentation. if (autoInd) if (lex.isNull() || (lex->autoIndentStyle() & AiMaintain)) maintainIndentation(ch, pos); else autoIndentation(ch, pos); // See if we might want to start auto-completion. if (!isCallTipActive() && acSource != AcsNone) if (isStartChar(ch)) startAutoCompletion(acSource, false, use_single == AcusAlways); else if (acThresh >= 1 && isWordCharacter(ch)) startAutoCompletion(acSource, true, use_single == AcusAlways); } // See if a call tip is active. bool QsciScintilla::isCallTipActive() const { return SendScintilla(SCI_CALLTIPACTIVE); } // Handle a possible change to any current call tip. void QsciScintilla::callTip() { QsciAbstractAPIs *apis = lex->apis(); if (!apis) return; int pos, commas = 0; bool found = false; char ch; pos = SendScintilla(SCI_GETCURRENTPOS); // Move backwards through the line looking for the start of the current // call tip and working out which argument it is. while ((ch = getCharacter(pos)) != '\0') { if (ch == ',') ++commas; else if (ch == ')') { int depth = 1; // Ignore everything back to the start of the corresponding // parenthesis. while ((ch = getCharacter(pos)) != '\0') { if (ch == ')') ++depth; else if (ch == '(' && --depth == 0) break; } } else if (ch == '(') { found = true; break; } } // Cancel any existing call tip. SendScintilla(SCI_CALLTIPCANCEL); // Done if there is no new call tip to set. if (!found) return; QStringList context = apiContext(pos, pos, ctPos); if (context.isEmpty()) return; // The last word is complete, not partial. context << QString(); ct_cursor = 0; ct_shifts.clear(); ct_entries = apis->callTips(context, commas, call_tips_style, ct_shifts); int nr_entries = ct_entries.count(); if (nr_entries == 0) return; if (maxCallTips > 0 && maxCallTips < nr_entries) { ct_entries = ct_entries.mid(0, maxCallTips); nr_entries = maxCallTips; } int shift; QString ct; int nr_shifts = ct_shifts.count(); if (maxCallTips < 0 && nr_entries > 1) { shift = (nr_shifts > 0 ? ct_shifts.first() : 0); ct = ct_entries[0]; ct.prepend('\002'); } else { if (nr_shifts > nr_entries) nr_shifts = nr_entries; // Find the biggest shift. shift = 0; for (int i = 0; i < nr_shifts; ++i) { int sh = ct_shifts[i]; if (shift < sh) shift = sh; } ct = ct_entries.join("\n"); } QByteArray ct_ba; if (isUtf8()) ct_ba = ct.toUtf8(); else ct_ba = ct.toLatin1(); const char *cts = ct_ba.data(); SendScintilla(SCI_CALLTIPSHOW, adjustedCallTipPosition(shift), cts); // Done if there is more than one call tip. if (nr_entries > 1) return; // Highlight the current argument. const char *astart; if (commas == 0) astart = strchr(cts, '('); else for (astart = strchr(cts, ','); astart && --commas > 0; astart = strchr(astart + 1, ',')) ; if (!astart || !*++astart) return; // The end is at the next comma or unmatched closing parenthesis. const char *aend; int depth = 0; for (aend = astart; *aend; ++aend) { char ch = *aend; if (ch == ',' && depth == 0) break; else if (ch == '(') ++depth; else if (ch == ')') { if (depth == 0) break; --depth; } } if (astart != aend) SendScintilla(SCI_CALLTIPSETHLT, astart - cts, aend - cts); } // Handle a call tip click. void QsciScintilla::handleCallTipClick(int dir) { int nr_entries = ct_entries.count(); // Move the cursor while bounds checking. if (dir == 1) { if (ct_cursor - 1 < 0) return; --ct_cursor; } else if (dir == 2) { if (ct_cursor + 1 >= nr_entries) return; ++ct_cursor; } else return; int shift = (ct_shifts.count() > ct_cursor ? ct_shifts[ct_cursor] : 0); QString ct = ct_entries[ct_cursor]; // Add the arrows. if (ct_cursor < nr_entries - 1) ct.prepend('\002'); if (ct_cursor > 0) ct.prepend('\001'); SendScintilla(SCI_CALLTIPSHOW, adjustedCallTipPosition(shift), ct.toLatin1().data()); } // Shift the position of the call tip (to take any context into account) but // don't go before the start of the line. int QsciScintilla::adjustedCallTipPosition(int ctshift) const { int ct = ctPos; if (ctshift) { int ctmin = SendScintilla(SCI_POSITIONFROMLINE, SendScintilla(SCI_LINEFROMPOSITION, ct)); if (ct - ctshift < ctmin) ct = ctmin; } return ct; } // Return the list of words that make up the context preceding the given // position. The list will only have more than one element if there is a lexer // set and it defines start strings. If so, then the last element might be // empty if a start string has just been typed. On return pos is at the start // of the context. QStringList QsciScintilla::apiContext(int pos, int &context_start, int &last_word_start) { enum { Either, Separator, Word }; QStringList words; int good_pos = pos, expecting = Either; last_word_start = -1; while (pos > 0) { if (getSeparator(pos)) { if (expecting == Either) words.prepend(QString()); else if (expecting == Word) break; good_pos = pos; expecting = Word; } else { QString word = getWord(pos); if (word.isEmpty() || expecting == Separator) break; words.prepend(word); good_pos = pos; expecting = Separator; // Return the position of the start of the last word if required. if (last_word_start < 0) last_word_start = pos; } // Strip any preceding spaces (mainly around operators). char ch; while ((ch = getCharacter(pos)) != '\0') { // This is the same definition of space that Scintilla uses. if (ch != ' ' && (ch < 0x09 || ch > 0x0d)) { ++pos; break; } } } // A valid sequence always starts with a word and so should be expecting a // separator. if (expecting != Separator) words.clear(); context_start = good_pos; return words; } // Try and get a lexer's word separator from the text before the current // position. Return true if one was found and adjust the position accordingly. bool QsciScintilla::getSeparator(int &pos) const { int opos = pos; // Go through each separator. for (int i = 0; i < wseps.count(); ++i) { const QString &ws = wseps[i]; // Work backwards. uint l; for (l = ws.length(); l; --l) { char ch = getCharacter(pos); if (ch == '\0' || ws.at(l - 1) != ch) break; } if (!l) return true; // Reset for the next separator. pos = opos; } return false; } // Try and get a word from the text before the current position. Return the // word if one was found and adjust the position accordingly. QString QsciScintilla::getWord(int &pos) const { QString word; bool numeric = true; char ch; while ((ch = getCharacter(pos)) != '\0') { if (!isWordCharacter(ch)) { ++pos; break; } if (ch < '0' || ch > '9') numeric = false; word.prepend(ch); } // We don't auto-complete numbers. if (numeric) word.truncate(0); return word; } // Get the "next" character (ie. the one before the current position) in the // current line. The character will be '\0' if there are no more. char QsciScintilla::getCharacter(int &pos) const { if (pos <= 0) return '\0'; char ch = SendScintilla(SCI_GETCHARAT, --pos); // Don't go past the end of the previous line. if (ch == '\n' || ch == '\r') { ++pos; return '\0'; } return ch; } // See if a character is an auto-completion start character, ie. the last // character of a word separator. bool QsciScintilla::isStartChar(char ch) const { QString s = QChar(ch); for (int i = 0; i < wseps.count(); ++i) if (wseps[i].endsWith(s)) return true; return false; } // Possibly start auto-completion. void QsciScintilla::startAutoCompletion(AutoCompletionSource acs, bool checkThresh, bool choose_single) { int start, ignore; QStringList context = apiContext(SendScintilla(SCI_GETCURRENTPOS), start, ignore); if (context.isEmpty()) return; // Get the last word's raw data and length. ScintillaBytes s = textAsBytes(context.last()); const char *last_data = ScintillaBytesConstData(s); int last_len = s.length(); if (checkThresh && last_len < acThresh) return; // Generate the string representing the valid words to select from. QStringList wlist; if ((acs == AcsAll || acs == AcsAPIs) && !lex.isNull()) { QsciAbstractAPIs *apis = lex->apis(); if (apis) apis->updateAutoCompletionList(context, wlist); } if (acs == AcsAll || acs == AcsDocument) { int sflags = SCFIND_WORDSTART; if (!SendScintilla(SCI_AUTOCGETIGNORECASE)) sflags |= SCFIND_MATCHCASE; SendScintilla(SCI_SETSEARCHFLAGS, sflags); int pos = 0; int dlen = SendScintilla(SCI_GETLENGTH); int caret = SendScintilla(SCI_GETCURRENTPOS); int clen = caret - start; char *orig_context = new char[clen + 1]; SendScintilla(SCI_GETTEXTRANGE, start, caret, orig_context); for (;;) { int fstart; SendScintilla(SCI_SETTARGETSTART, pos); SendScintilla(SCI_SETTARGETEND, dlen); if ((fstart = SendScintilla(SCI_SEARCHINTARGET, clen, orig_context)) < 0) break; // Move past the root part. pos = fstart + clen; // Skip if this is the context we are auto-completing. if (pos == caret) continue; // Get the rest of this word. QString w = last_data; while (pos < dlen) { char ch = SendScintilla(SCI_GETCHARAT, pos); if (!isWordCharacter(ch)) break; w += ch; ++pos; } // Add the word if it isn't already there. if (!w.isEmpty()) { bool keep; // If there are APIs then check if the word is already present // as an API word (i.e. with a trailing space). if (acs == AcsAll) { QString api_w = w; api_w.append(' '); keep = !wlist.contains(api_w); } else { keep = true; } if (keep && !wlist.contains(w)) wlist.append(w); } } delete []orig_context; } if (wlist.isEmpty()) return; wlist.sort(); SendScintilla(SCI_AUTOCSETCHOOSESINGLE, choose_single); SendScintilla(SCI_AUTOCSETSEPARATOR, acSeparator); ScintillaBytes wlist_s = textAsBytes(wlist.join(QChar(acSeparator))); SendScintilla(SCI_AUTOCSHOW, last_len, ScintillaBytesConstData(wlist_s)); } // Maintain the indentation of the previous line. void QsciScintilla::maintainIndentation(char ch, long pos) { if (ch != '\r' && ch != '\n') return; int curr_line = SendScintilla(SCI_LINEFROMPOSITION, pos); // Get the indentation of the preceding non-zero length line. int ind = 0; for (int line = curr_line - 1; line >= 0; --line) { if (SendScintilla(SCI_GETLINEENDPOSITION, line) > SendScintilla(SCI_POSITIONFROMLINE, line)) { ind = indentation(line); break; } } if (ind > 0) autoIndentLine(pos, curr_line, ind); } // Implement auto-indentation. void QsciScintilla::autoIndentation(char ch, long pos) { int curr_line = SendScintilla(SCI_LINEFROMPOSITION, pos); int ind_width = indentWidth(); long curr_line_start = SendScintilla(SCI_POSITIONFROMLINE, curr_line); const char *block_start = lex->blockStart(); bool start_single = (block_start && qstrlen(block_start) == 1); const char *block_end = lex->blockEnd(); bool end_single = (block_end && qstrlen(block_end) == 1); if (end_single && block_end[0] == ch) { if (!(lex->autoIndentStyle() & AiClosing) && rangeIsWhitespace(curr_line_start, pos - 1)) autoIndentLine(pos, curr_line, blockIndent(curr_line - 1) - ind_width); } else if (start_single && block_start[0] == ch) { // De-indent if we have already indented because the previous line was // a start of block keyword. if (!(lex->autoIndentStyle() & AiOpening) && curr_line > 0 && getIndentState(curr_line - 1) == isKeywordStart && rangeIsWhitespace(curr_line_start, pos - 1)) autoIndentLine(pos, curr_line, blockIndent(curr_line - 1) - ind_width); } else if (ch == '\r' || ch == '\n') { // Don't auto-indent the line (ie. preserve its existing indentation) // if we have inserted a new line above by pressing return at the start // of this line - in other words, if the previous line is empty. long prev_line_length = SendScintilla(SCI_GETLINEENDPOSITION, curr_line - 1) - SendScintilla(SCI_POSITIONFROMLINE, curr_line - 1); if (prev_line_length != 0) autoIndentLine(pos, curr_line, blockIndent(curr_line - 1)); } } // Set the indentation for a line. void QsciScintilla::autoIndentLine(long pos, int line, int indent) { if (indent < 0) return; long pos_before = SendScintilla(SCI_GETLINEINDENTPOSITION, line); SendScintilla(SCI_SETLINEINDENTATION, line, indent); long pos_after = SendScintilla(SCI_GETLINEINDENTPOSITION, line); long new_pos = -1; if (pos_after > pos_before) new_pos = pos + (pos_after - pos_before); else if (pos_after < pos_before && pos >= pos_after) if (pos >= pos_before) new_pos = pos + (pos_after - pos_before); else new_pos = pos_after; if (new_pos >= 0) SendScintilla(SCI_SETSEL, new_pos, new_pos); } // Return the indentation of the block defined by the given line (or something // significant before). int QsciScintilla::blockIndent(int line) { if (line < 0) return 0; // Handle the trvial case. if (!lex->blockStartKeyword() && !lex->blockStart() && !lex->blockEnd()) return indentation(line); int line_limit = line - lex->blockLookback(); if (line_limit < 0) line_limit = 0; for (int l = line; l >= line_limit; --l) { IndentState istate = getIndentState(l); if (istate != isNone) { int ind_width = indentWidth(); int ind = indentation(l); if (istate == isBlockStart) { if (!(lex -> autoIndentStyle() & AiOpening)) ind += ind_width; } else if (istate == isBlockEnd) { if (lex -> autoIndentStyle() & AiClosing) ind -= ind_width; if (ind < 0) ind = 0; } else if (line == l) ind += ind_width; return ind; } } return indentation(line); } // Return true if all characters starting at spos up to, but not including // epos, are spaces or tabs. bool QsciScintilla::rangeIsWhitespace(long spos, long epos) { while (spos < epos) { char ch = SendScintilla(SCI_GETCHARAT, spos); if (ch != ' ' && ch != '\t') return false; ++spos; } return true; } // Returns the indentation state of a line. QsciScintilla::IndentState QsciScintilla::getIndentState(int line) { IndentState istate; // Get the styled text. long spos = SendScintilla(SCI_POSITIONFROMLINE, line); long epos = SendScintilla(SCI_POSITIONFROMLINE, line + 1); char *text = new char[(epos - spos + 1) * 2]; SendScintilla(SCI_GETSTYLEDTEXT, spos, epos, text); int style, bstart_off, bend_off; // Block start/end takes precedence over keywords. const char *bstart_words = lex->blockStart(&style); bstart_off = findStyledWord(text, style, bstart_words); const char *bend_words = lex->blockEnd(&style); bend_off = findStyledWord(text, style, bend_words); // If there is a block start but no block end characters then ignore it // unless the block start is the last significant thing on the line, ie. // assume Python-like blocking. if (bstart_off >= 0 && !bend_words) for (int i = bstart_off * 2; text[i] != '\0'; i += 2) if (!QChar(text[i]).isSpace()) return isNone; if (bstart_off > bend_off) istate = isBlockStart; else if (bend_off > bstart_off) istate = isBlockEnd; else { const char *words = lex->blockStartKeyword(&style); istate = (findStyledWord(text,style,words) >= 0) ? isKeywordStart : isNone; } delete[] text; return istate; } // text is a pointer to some styled text (ie. a character byte followed by a // style byte). style is a style number. words is a space separated list of // words. Returns the position in the text immediately after the last one of // the words with the style. The reason we are after the last, and not the // first, occurance is that we are looking for words that start and end a block // where the latest one is the most significant. int QsciScintilla::findStyledWord(const char *text, int style, const char *words) { if (!words) return -1; // Find the range of text with the style we are looking for. const char *stext; for (stext = text; stext[1] != style; stext += 2) if (stext[0] == '\0') return -1; // Move to the last character. const char *etext = stext; while (etext[2] != '\0') etext += 2; // Backtrack until we find the style. There will be one. while (etext[1] != style) etext -= 2; // Look for each word in turn. while (words[0] != '\0') { // Find the end of the word. const char *eword = words; while (eword[1] != ' ' && eword[1] != '\0') ++eword; // Now search the text backwards. const char *wp = eword; for (const char *tp = etext; tp >= stext; tp -= 2) { if (tp[0] != wp[0] || tp[1] != style) { // Reset the search. wp = eword; continue; } // See if all the word has matched. if (wp-- == words) return ((tp - text) / 2) + (eword - words) + 1; } // Move to the start of the next word if there is one. words = eword + 1; if (words[0] == ' ') ++words; } return -1; } // Return true if the code page is UTF8. bool QsciScintilla::isUtf8() const { return (SendScintilla(SCI_GETCODEPAGE) == SC_CP_UTF8); } // Set the code page. void QsciScintilla::setUtf8(bool cp) { SendScintilla(SCI_SETCODEPAGE, (cp ? SC_CP_UTF8 : 0)); } // Return the end-of-line mode. QsciScintilla::EolMode QsciScintilla::eolMode() const { return (EolMode)SendScintilla(SCI_GETEOLMODE); } // Set the end-of-line mode. void QsciScintilla::setEolMode(EolMode mode) { SendScintilla(SCI_SETEOLMODE, mode); } // Convert the end-of-lines to a particular mode. void QsciScintilla::convertEols(EolMode mode) { SendScintilla(SCI_CONVERTEOLS, mode); } // Add an edge column. void QsciScintilla::addEdgeColumn(int colnr, const QColor &col) { SendScintilla(SCI_MULTIEDGEADDLINE, colnr, col); } // Clear all multi-edge columns. void QsciScintilla::clearEdgeColumns() { SendScintilla(SCI_MULTIEDGECLEARALL); } // Return the edge colour. QColor QsciScintilla::edgeColor() const { return asQColor(SendScintilla(SCI_GETEDGECOLOUR)); } // Set the edge colour. void QsciScintilla::setEdgeColor(const QColor &col) { SendScintilla(SCI_SETEDGECOLOUR, col); } // Return the edge column. int QsciScintilla::edgeColumn() const { return SendScintilla(SCI_GETEDGECOLUMN); } // Set the edge column. void QsciScintilla::setEdgeColumn(int colnr) { SendScintilla(SCI_SETEDGECOLUMN, colnr); } // Return the edge mode. QsciScintilla::EdgeMode QsciScintilla::edgeMode() const { return (EdgeMode)SendScintilla(SCI_GETEDGEMODE); } // Set the edge mode. void QsciScintilla::setEdgeMode(EdgeMode mode) { SendScintilla(SCI_SETEDGEMODE, mode); } // Return the end-of-line visibility. bool QsciScintilla::eolVisibility() const { return SendScintilla(SCI_GETVIEWEOL); } // Set the end-of-line visibility. void QsciScintilla::setEolVisibility(bool visible) { SendScintilla(SCI_SETVIEWEOL, visible); } // Return the extra ascent. int QsciScintilla::extraAscent() const { return SendScintilla(SCI_GETEXTRAASCENT); } // Set the extra ascent. void QsciScintilla::setExtraAscent(int extra) { SendScintilla(SCI_SETEXTRAASCENT, extra); } // Return the extra descent. int QsciScintilla::extraDescent() const { return SendScintilla(SCI_GETEXTRADESCENT); } // Set the extra descent. void QsciScintilla::setExtraDescent(int extra) { SendScintilla(SCI_SETEXTRADESCENT, extra); } // Return the whitespace size. int QsciScintilla::whitespaceSize() const { return SendScintilla(SCI_GETWHITESPACESIZE); } // Set the whitespace size. void QsciScintilla::setWhitespaceSize(int size) { SendScintilla(SCI_SETWHITESPACESIZE, size); } // Set the whitespace background colour. void QsciScintilla::setWhitespaceBackgroundColor(const QColor &col) { SendScintilla(SCI_SETWHITESPACEBACK, col.isValid(), col); } // Set the whitespace foreground colour. void QsciScintilla::setWhitespaceForegroundColor(const QColor &col) { SendScintilla(SCI_SETWHITESPACEFORE, col.isValid(), col); } // Return the whitespace visibility. QsciScintilla::WhitespaceVisibility QsciScintilla::whitespaceVisibility() const { return (WhitespaceVisibility)SendScintilla(SCI_GETVIEWWS); } // Set the whitespace visibility. void QsciScintilla::setWhitespaceVisibility(WhitespaceVisibility mode) { SendScintilla(SCI_SETVIEWWS, mode); } // Return the tab draw mode. QsciScintilla::TabDrawMode QsciScintilla::tabDrawMode() const { return (TabDrawMode)SendScintilla(SCI_GETTABDRAWMODE); } // Set the tab draw mode. void QsciScintilla::setTabDrawMode(TabDrawMode mode) { SendScintilla(SCI_SETTABDRAWMODE, mode); } // Return the line wrap mode. QsciScintilla::WrapMode QsciScintilla::wrapMode() const { return (WrapMode)SendScintilla(SCI_GETWRAPMODE); } // Set the line wrap mode. void QsciScintilla::setWrapMode(WrapMode mode) { SendScintilla(SCI_SETLAYOUTCACHE, (mode == WrapNone ? SC_CACHE_CARET : SC_CACHE_DOCUMENT)); SendScintilla(SCI_SETWRAPMODE, mode); } // Return the line wrap indent mode. QsciScintilla::WrapIndentMode QsciScintilla::wrapIndentMode() const { return (WrapIndentMode)SendScintilla(SCI_GETWRAPINDENTMODE); } // Set the line wrap indent mode. void QsciScintilla::setWrapIndentMode(WrapIndentMode mode) { SendScintilla(SCI_SETWRAPINDENTMODE, mode); } // Set the line wrap visual flags. void QsciScintilla::setWrapVisualFlags(WrapVisualFlag endFlag, WrapVisualFlag startFlag, int indent) { int flags = SC_WRAPVISUALFLAG_NONE; int loc = SC_WRAPVISUALFLAGLOC_DEFAULT; switch (endFlag) { case WrapFlagByText: flags |= SC_WRAPVISUALFLAG_END; loc |= SC_WRAPVISUALFLAGLOC_END_BY_TEXT; break; case WrapFlagByBorder: flags |= SC_WRAPVISUALFLAG_END; break; case WrapFlagInMargin: flags |= SC_WRAPVISUALFLAG_MARGIN; break; } switch (startFlag) { case WrapFlagByText: flags |= SC_WRAPVISUALFLAG_START; loc |= SC_WRAPVISUALFLAGLOC_START_BY_TEXT; break; case WrapFlagByBorder: flags |= SC_WRAPVISUALFLAG_START; break; case WrapFlagInMargin: flags |= SC_WRAPVISUALFLAG_MARGIN; break; } SendScintilla(SCI_SETWRAPVISUALFLAGS, flags); SendScintilla(SCI_SETWRAPVISUALFLAGSLOCATION, loc); SendScintilla(SCI_SETWRAPSTARTINDENT, indent); } // Set the folding style. void QsciScintilla::setFolding(FoldStyle folding, int margin) { fold = folding; foldmargin = margin; if (folding == NoFoldStyle) { SendScintilla(SCI_SETMARGINWIDTHN, margin, 0L); return; } int mask = SendScintilla(SCI_GETMODEVENTMASK); SendScintilla(SCI_SETMODEVENTMASK, mask | SC_MOD_CHANGEFOLD); SendScintilla(SCI_SETFOLDFLAGS, SC_FOLDFLAG_LINEAFTER_CONTRACTED); SendScintilla(SCI_SETMARGINTYPEN, margin, (long)SC_MARGIN_SYMBOL); SendScintilla(SCI_SETMARGINMASKN, margin, SC_MASK_FOLDERS); SendScintilla(SCI_SETMARGINSENSITIVEN, margin, 1); // Set the marker symbols to use. switch (folding) { case PlainFoldStyle: setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_MINUS); setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_PLUS); setFoldMarker(SC_MARKNUM_FOLDERSUB); setFoldMarker(SC_MARKNUM_FOLDERTAIL); setFoldMarker(SC_MARKNUM_FOLDEREND); setFoldMarker(SC_MARKNUM_FOLDEROPENMID); setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL); break; case CircledFoldStyle: setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS); setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS); setFoldMarker(SC_MARKNUM_FOLDERSUB); setFoldMarker(SC_MARKNUM_FOLDERTAIL); setFoldMarker(SC_MARKNUM_FOLDEREND); setFoldMarker(SC_MARKNUM_FOLDEROPENMID); setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL); break; case BoxedFoldStyle: setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS); setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS); setFoldMarker(SC_MARKNUM_FOLDERSUB); setFoldMarker(SC_MARKNUM_FOLDERTAIL); setFoldMarker(SC_MARKNUM_FOLDEREND); setFoldMarker(SC_MARKNUM_FOLDEROPENMID); setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL); break; case CircledTreeFoldStyle: setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_CIRCLEMINUS); setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_CIRCLEPLUS); setFoldMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE); setFoldMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNERCURVE); setFoldMarker(SC_MARKNUM_FOLDEREND, SC_MARK_CIRCLEPLUSCONNECTED); setFoldMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_CIRCLEMINUSCONNECTED); setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNERCURVE); break; case BoxedTreeFoldStyle: setFoldMarker(SC_MARKNUM_FOLDEROPEN, SC_MARK_BOXMINUS); setFoldMarker(SC_MARKNUM_FOLDER, SC_MARK_BOXPLUS); setFoldMarker(SC_MARKNUM_FOLDERSUB, SC_MARK_VLINE); setFoldMarker(SC_MARKNUM_FOLDERTAIL, SC_MARK_LCORNER); setFoldMarker(SC_MARKNUM_FOLDEREND, SC_MARK_BOXPLUSCONNECTED); setFoldMarker(SC_MARKNUM_FOLDEROPENMID, SC_MARK_BOXMINUSCONNECTED); setFoldMarker(SC_MARKNUM_FOLDERMIDTAIL, SC_MARK_TCORNER); break; } SendScintilla(SCI_SETMARGINWIDTHN, margin, defaultFoldMarginWidth); } // Clear all current folds. void QsciScintilla::clearFolds() { recolor(); int maxLine = SendScintilla(SCI_GETLINECOUNT); for (int line = 0; line < maxLine; line++) { int level = SendScintilla(SCI_GETFOLDLEVEL, line); if (level & SC_FOLDLEVELHEADERFLAG) { SendScintilla(SCI_SETFOLDEXPANDED, line, 1); foldExpand(line, true, false, 0, level); line--; } } } // Set up a folder marker. void QsciScintilla::setFoldMarker(int marknr, int mark) { SendScintilla(SCI_MARKERDEFINE, marknr, mark); if (mark != SC_MARK_EMPTY) { SendScintilla(SCI_MARKERSETFORE, marknr, QColor(Qt::white)); SendScintilla(SCI_MARKERSETBACK, marknr, QColor(Qt::black)); } } // Handle a click in the fold margin. This is mostly taken from SciTE. void QsciScintilla::foldClick(int lineClick, int bstate) { bool shift = bstate & Qt::ShiftModifier; bool ctrl = bstate & Qt::ControlModifier; if (shift && ctrl) { foldAll(); return; } int levelClick = SendScintilla(SCI_GETFOLDLEVEL, lineClick); if (levelClick & SC_FOLDLEVELHEADERFLAG) { if (shift) { // Ensure all children are visible. SendScintilla(SCI_SETFOLDEXPANDED, lineClick, 1); foldExpand(lineClick, true, true, 100, levelClick); } else if (ctrl) { if (SendScintilla(SCI_GETFOLDEXPANDED, lineClick)) { // Contract this line and all its children. SendScintilla(SCI_SETFOLDEXPANDED, lineClick, 0L); foldExpand(lineClick, false, true, 0, levelClick); } else { // Expand this line and all its children. SendScintilla(SCI_SETFOLDEXPANDED, lineClick, 1); foldExpand(lineClick, true, true, 100, levelClick); } } else { // Toggle this line. SendScintilla(SCI_TOGGLEFOLD, lineClick); } } } // Do the hard work of hiding and showing lines. This is mostly taken from // SciTE. void QsciScintilla::foldExpand(int &line, bool doExpand, bool force, int visLevels, int level) { int lineMaxSubord = SendScintilla(SCI_GETLASTCHILD, line, level & SC_FOLDLEVELNUMBERMASK); line++; while (line <= lineMaxSubord) { if (force) { if (visLevels > 0) SendScintilla(SCI_SHOWLINES, line, line); else SendScintilla(SCI_HIDELINES, line, line); } else if (doExpand) SendScintilla(SCI_SHOWLINES, line, line); int levelLine = level; if (levelLine == -1) levelLine = SendScintilla(SCI_GETFOLDLEVEL, line); if (levelLine & SC_FOLDLEVELHEADERFLAG) { if (force) { if (visLevels > 1) SendScintilla(SCI_SETFOLDEXPANDED, line, 1); else SendScintilla(SCI_SETFOLDEXPANDED, line, 0L); foldExpand(line, doExpand, force, visLevels - 1); } else if (doExpand) { if (!SendScintilla(SCI_GETFOLDEXPANDED, line)) SendScintilla(SCI_SETFOLDEXPANDED, line, 1); foldExpand(line, true, force, visLevels - 1); } else foldExpand(line, false, force, visLevels - 1); } else line++; } } // Fully expand (if there is any line currently folded) all text. Otherwise, // fold all text. This is mostly taken from SciTE. void QsciScintilla::foldAll(bool children) { recolor(); int maxLine = SendScintilla(SCI_GETLINECOUNT); bool expanding = true; for (int lineSeek = 0; lineSeek < maxLine; lineSeek++) { if (SendScintilla(SCI_GETFOLDLEVEL,lineSeek) & SC_FOLDLEVELHEADERFLAG) { expanding = !SendScintilla(SCI_GETFOLDEXPANDED, lineSeek); break; } } for (int line = 0; line < maxLine; line++) { int level = SendScintilla(SCI_GETFOLDLEVEL, line); if (!(level & SC_FOLDLEVELHEADERFLAG)) continue; if (children || (SC_FOLDLEVELBASE == (level & SC_FOLDLEVELNUMBERMASK))) { if (expanding) { SendScintilla(SCI_SETFOLDEXPANDED, line, 1); foldExpand(line, true, false, 0, level); line--; } else { int lineMaxSubord = SendScintilla(SCI_GETLASTCHILD, line, -1); SendScintilla(SCI_SETFOLDEXPANDED, line, 0L); if (lineMaxSubord > line) SendScintilla(SCI_HIDELINES, line + 1, lineMaxSubord); } } } } // Handle a fold change. This is mostly taken from SciTE. void QsciScintilla::foldChanged(int line,int levelNow,int levelPrev) { if (levelNow & SC_FOLDLEVELHEADERFLAG) { if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) SendScintilla(SCI_SETFOLDEXPANDED, line, 1); } else if (levelPrev & SC_FOLDLEVELHEADERFLAG) { if (!SendScintilla(SCI_GETFOLDEXPANDED, line)) { // Removing the fold from one that has been contracted so should // expand. Otherwise lines are left invisible with no way to make // them visible. foldExpand(line, true, false, 0, levelPrev); } } } // Toggle the fold for a line if it contains a fold marker. void QsciScintilla::foldLine(int line) { SendScintilla(SCI_TOGGLEFOLD, line); } // Return the list of folded lines. QList QsciScintilla::contractedFolds() const { QList folds; int linenr = 0, fold_line; while ((fold_line = SendScintilla(SCI_CONTRACTEDFOLDNEXT, linenr)) >= 0) { folds.append(fold_line); linenr = fold_line + 1; } return folds; } // Set the fold state from a list. void QsciScintilla::setContractedFolds(const QList &folds) { for (int i = 0; i < folds.count(); ++i) { int line = folds[i]; int last_line = SendScintilla(SCI_GETLASTCHILD, line, -1); SendScintilla(SCI_SETFOLDEXPANDED, line, 0L); SendScintilla(SCI_HIDELINES, line + 1, last_line); } } // Handle the SCN_MODIFIED notification. void QsciScintilla::handleModified(int pos, int mtype, const char *text, int len, int added, int line, int foldNow, int foldPrev, int token, int annotationLinesAdded) { if (mtype & SC_MOD_CHANGEFOLD) { if (fold) foldChanged(line, foldNow, foldPrev); } if (mtype & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) { emit textChanged(); if (added != 0) emit linesChanged(); } } // Zoom in a number of points. void QsciScintilla::zoomIn(int range) { zoomTo(SendScintilla(SCI_GETZOOM) + range); } // Zoom in a single point. void QsciScintilla::zoomIn() { SendScintilla(SCI_ZOOMIN); } // Zoom out a number of points. void QsciScintilla::zoomOut(int range) { zoomTo(SendScintilla(SCI_GETZOOM) - range); } // Zoom out a single point. void QsciScintilla::zoomOut() { SendScintilla(SCI_ZOOMOUT); } // Set the zoom to a number of points. void QsciScintilla::zoomTo(int size) { if (size < -10) size = -10; else if (size > 20) size = 20; SendScintilla(SCI_SETZOOM, size); } // Find the first occurrence of a string. bool QsciScintilla::findFirst(const QString &expr, bool re, bool cs, bool wo, bool wrap, bool forward, int line, int index, bool show, bool posix) { if (expr.isEmpty()) { findState.status = FindState::Idle; return false; } findState.status = FindState::Finding; findState.expr = expr; findState.wrap = wrap; findState.forward = forward; findState.flags = (cs ? SCFIND_MATCHCASE : 0) | (wo ? SCFIND_WHOLEWORD : 0) | (re ? SCFIND_REGEXP : 0) | (posix ? SCFIND_POSIX : 0); if (line < 0 || index < 0) findState.startpos = SendScintilla(SCI_GETCURRENTPOS); else findState.startpos = positionFromLineIndex(line, index); if (forward) findState.endpos = SendScintilla(SCI_GETLENGTH); else findState.endpos = 0; findState.show = show; return doFind(); } // Find the first occurrence of a string in the current selection. bool QsciScintilla::findFirstInSelection(const QString &expr, bool re, bool cs, bool wo, bool forward, bool show, bool posix) { if (expr.isEmpty()) { findState.status = FindState::Idle; return false; } findState.status = FindState::FindingInSelection; findState.expr = expr; findState.wrap = false; findState.forward = forward; findState.flags = (cs ? SCFIND_MATCHCASE : 0) | (wo ? SCFIND_WHOLEWORD : 0) | (re ? SCFIND_REGEXP : 0) | (posix ? SCFIND_POSIX : 0); findState.startpos_orig = SendScintilla(SCI_GETSELECTIONSTART); findState.endpos_orig = SendScintilla(SCI_GETSELECTIONEND); if (forward) { findState.startpos = findState.startpos_orig; findState.endpos = findState.endpos_orig; } else { findState.startpos = findState.endpos_orig; findState.endpos = findState.startpos_orig; } findState.show = show; return doFind(); } // Find the next occurrence of a string. bool QsciScintilla::findNext() { if (findState.status == FindState::Idle) return false; return doFind(); } // Do the hard work of the find methods. bool QsciScintilla::doFind() { SendScintilla(SCI_SETSEARCHFLAGS, findState.flags); int pos = simpleFind(); // See if it was found. If not and wraparound is wanted, try again. if (pos == -1 && findState.wrap) { if (findState.forward) { findState.startpos = 0; findState.endpos = SendScintilla(SCI_GETLENGTH); } else { findState.startpos = SendScintilla(SCI_GETLENGTH); findState.endpos = 0; } pos = simpleFind(); } if (pos == -1) { // Restore the original selection. if (findState.status == FindState::FindingInSelection) SendScintilla(SCI_SETSEL, findState.startpos_orig, findState.endpos_orig); findState.status = FindState::Idle; return false; } // It was found. long targstart = SendScintilla(SCI_GETTARGETSTART); long targend = SendScintilla(SCI_GETTARGETEND); // Ensure the text found is visible if required. if (findState.show) { int startLine = SendScintilla(SCI_LINEFROMPOSITION, targstart); int endLine = SendScintilla(SCI_LINEFROMPOSITION, targend); for (int i = startLine; i <= endLine; ++i) SendScintilla(SCI_ENSUREVISIBLEENFORCEPOLICY, i); } // Now set the selection. SendScintilla(SCI_SETSEL, targstart, targend); // Finally adjust the start position so that we don't find the same one // again. if (findState.forward) findState.startpos = targend; else if ((findState.startpos = targstart - 1) < 0) findState.startpos = 0; return true; } // Do a simple find between the start and end positions. int QsciScintilla::simpleFind() { if (findState.startpos == findState.endpos) return -1; SendScintilla(SCI_SETTARGETSTART, findState.startpos); SendScintilla(SCI_SETTARGETEND, findState.endpos); ScintillaBytes s = textAsBytes(findState.expr); return SendScintilla(SCI_SEARCHINTARGET, s.length(), ScintillaBytesConstData(s)); } // Replace the text found with the previous find method. void QsciScintilla::replace(const QString &replaceStr) { if (findState.status == FindState::Idle) return; long start = SendScintilla(SCI_GETSELECTIONSTART); long orig_len = SendScintilla(SCI_GETSELECTIONEND) - start; SendScintilla(SCI_TARGETFROMSELECTION); int cmd = (findState.flags & SCFIND_REGEXP) ? SCI_REPLACETARGETRE : SCI_REPLACETARGET; ScintillaBytes s = textAsBytes(replaceStr); long len = SendScintilla(cmd, -1, ScintillaBytesConstData(s)); // Reset the selection. SendScintilla(SCI_SETSELECTIONSTART, start); SendScintilla(SCI_SETSELECTIONEND, start + len); // Fix the original selection. findState.endpos_orig += (len - orig_len); if (findState.forward) findState.startpos = start + len; } // Query the modified state. bool QsciScintilla::isModified() const { return doc.isModified(); } // Set the modified state. void QsciScintilla::setModified(bool m) { if (!m) SendScintilla(SCI_SETSAVEPOINT); } // Handle the SCN_INDICATORCLICK notification. void QsciScintilla::handleIndicatorClick(int pos, int modifiers) { int state = mapModifiers(modifiers); int line, index; lineIndexFromPosition(pos, &line, &index); emit indicatorClicked(line, index, Qt::KeyboardModifiers(state)); } // Handle the SCN_INDICATORRELEASE notification. void QsciScintilla::handleIndicatorRelease(int pos, int modifiers) { int state = mapModifiers(modifiers); int line, index; lineIndexFromPosition(pos, &line, &index); emit indicatorReleased(line, index, Qt::KeyboardModifiers(state)); } // Handle the SCN_MARGINCLICK notification. void QsciScintilla::handleMarginClick(int pos, int modifiers, int margin) { int state = mapModifiers(modifiers); int line = SendScintilla(SCI_LINEFROMPOSITION, pos); if (fold && margin == foldmargin) foldClick(line, state); else emit marginClicked(margin, line, Qt::KeyboardModifiers(state)); } // Handle the SCN_MARGINRIGHTCLICK notification. void QsciScintilla::handleMarginRightClick(int pos, int modifiers, int margin) { int state = mapModifiers(modifiers); int line = SendScintilla(SCI_LINEFROMPOSITION, pos); emit marginRightClicked(margin, line, Qt::KeyboardModifiers(state)); } // Handle the SCN_SAVEPOINTREACHED notification. void QsciScintilla::handleSavePointReached() { doc.setModified(false); emit modificationChanged(false); } // Handle the SCN_SAVEPOINTLEFT notification. void QsciScintilla::handleSavePointLeft() { doc.setModified(true); emit modificationChanged(true); } // Handle the QSCN_SELCHANGED signal. void QsciScintilla::handleSelectionChanged(bool yes) { selText = yes; emit copyAvailable(yes); emit selectionChanged(); } // Get the current selection. void QsciScintilla::getSelection(int *lineFrom, int *indexFrom, int *lineTo, int *indexTo) const { if (selText) { lineIndexFromPosition(SendScintilla(SCI_GETSELECTIONSTART), lineFrom, indexFrom); lineIndexFromPosition(SendScintilla(SCI_GETSELECTIONEND), lineTo, indexTo); } else *lineFrom = *indexFrom = *lineTo = *indexTo = -1; } // Sets the current selection. void QsciScintilla::setSelection(int lineFrom, int indexFrom, int lineTo, int indexTo) { SendScintilla(SCI_SETSEL, positionFromLineIndex(lineFrom, indexFrom), positionFromLineIndex(lineTo, indexTo)); } // Set the background colour of selected text. void QsciScintilla::setSelectionBackgroundColor(const QColor &col) { int alpha = col.alpha(); if (alpha == 255) alpha = SC_ALPHA_NOALPHA; SendScintilla(SCI_SETSELBACK, 1, col); SendScintilla(SCI_SETSELALPHA, alpha); } // Set the foreground colour of selected text. void QsciScintilla::setSelectionForegroundColor(const QColor &col) { SendScintilla(SCI_SETSELFORE, 1, col); } // Reset the background colour of selected text to the default. void QsciScintilla::resetSelectionBackgroundColor() { SendScintilla(SCI_SETSELALPHA, SC_ALPHA_NOALPHA); SendScintilla(SCI_SETSELBACK, 0UL); } // Reset the foreground colour of selected text to the default. void QsciScintilla::resetSelectionForegroundColor() { SendScintilla(SCI_SETSELFORE, 0UL); } // Set the fill to the end-of-line for the selection. void QsciScintilla::setSelectionToEol(bool filled) { SendScintilla(SCI_SETSELEOLFILLED, filled); } // Return the fill to the end-of-line for the selection. bool QsciScintilla::selectionToEol() const { return SendScintilla(SCI_GETSELEOLFILLED); } // Set the width of the caret. void QsciScintilla::setCaretWidth(int width) { SendScintilla(SCI_SETCARETWIDTH, width); } // Set the foreground colour of the caret. void QsciScintilla::setCaretForegroundColor(const QColor &col) { SendScintilla(SCI_SETCARETFORE, col); } // Set the background colour of the line containing the caret. void QsciScintilla::setCaretLineBackgroundColor(const QColor &col) { int alpha = col.alpha(); if (alpha == 255) alpha = SC_ALPHA_NOALPHA; SendScintilla(SCI_SETCARETLINEBACK, col); SendScintilla(SCI_SETCARETLINEBACKALPHA, alpha); } // Set the state of the background colour of the line containing the caret. void QsciScintilla::setCaretLineVisible(bool enable) { SendScintilla(SCI_SETCARETLINEVISIBLE, enable); } // Set the background colour of a hotspot area. void QsciScintilla::setHotspotBackgroundColor(const QColor &col) { SendScintilla(SCI_SETSELBACK, 1, col); } // Set the foreground colour of a hotspot area. void QsciScintilla::setHotspotForegroundColor(const QColor &col) { SendScintilla(SCI_SETHOTSPOTACTIVEFORE, 1, col); } // Reset the background colour of a hotspot area to the default. void QsciScintilla::resetHotspotBackgroundColor() { SendScintilla(SCI_SETSELBACK, 0UL); } // Reset the foreground colour of a hotspot area to the default. void QsciScintilla::resetHotspotForegroundColor() { SendScintilla(SCI_SETHOTSPOTACTIVEFORE, 0UL); } // Set the underline of a hotspot area. void QsciScintilla::setHotspotUnderline(bool enable) { SendScintilla(SCI_SETHOTSPOTACTIVEUNDERLINE, enable); } // Set the wrapping of a hotspot area. void QsciScintilla::setHotspotWrap(bool enable) { SendScintilla(SCI_SETHOTSPOTSINGLELINE, !enable); } // Query the read-only state. bool QsciScintilla::isReadOnly() const { return SendScintilla(SCI_GETREADONLY); } // Set the read-only state. void QsciScintilla::setReadOnly(bool ro) { setAttribute(Qt::WA_InputMethodEnabled, !ro); SendScintilla(SCI_SETREADONLY, ro); } // Append the given text. void QsciScintilla::append(const QString &text) { bool ro = ensureRW(); ScintillaBytes s = textAsBytes(text); SendScintilla(SCI_APPENDTEXT, s.length(), ScintillaBytesConstData(s)); SendScintilla(SCI_EMPTYUNDOBUFFER); setReadOnly(ro); } // Insert the given text at the current position. void QsciScintilla::insert(const QString &text) { insertAtPos(text, -1); } // Insert the given text at the given line and offset. void QsciScintilla::insertAt(const QString &text, int line, int index) { insertAtPos(text, positionFromLineIndex(line, index)); } // Insert the given text at the given position. void QsciScintilla::insertAtPos(const QString &text, int pos) { bool ro = ensureRW(); SendScintilla(SCI_BEGINUNDOACTION); SendScintilla(SCI_INSERTTEXT, pos, ScintillaBytesConstData(textAsBytes(text))); SendScintilla(SCI_ENDUNDOACTION); setReadOnly(ro); } // Begin a sequence of undoable actions. void QsciScintilla::beginUndoAction() { SendScintilla(SCI_BEGINUNDOACTION); } // End a sequence of undoable actions. void QsciScintilla::endUndoAction() { SendScintilla(SCI_ENDUNDOACTION); } // Redo a sequence of actions. void QsciScintilla::redo() { SendScintilla(SCI_REDO); } // Undo a sequence of actions. void QsciScintilla::undo() { SendScintilla(SCI_UNDO); } // See if there is something to redo. bool QsciScintilla::isRedoAvailable() const { return SendScintilla(SCI_CANREDO); } // See if there is something to undo. bool QsciScintilla::isUndoAvailable() const { return SendScintilla(SCI_CANUNDO); } // Return the number of lines. int QsciScintilla::lines() const { return SendScintilla(SCI_GETLINECOUNT); } // Return the line at a position. int QsciScintilla::lineAt(const QPoint &pos) const { long chpos = SendScintilla(SCI_POSITIONFROMPOINTCLOSE, pos.x(), pos.y()); if (chpos < 0) return -1; return SendScintilla(SCI_LINEFROMPOSITION, chpos); } // Return the length of a line. int QsciScintilla::lineLength(int line) const { if (line < 0 || line >= SendScintilla(SCI_GETLINECOUNT)) return -1; return SendScintilla(SCI_LINELENGTH, line); } // Return the length of the current text. int QsciScintilla::length() const { return SendScintilla(SCI_GETTEXTLENGTH); } // Remove any selected text. void QsciScintilla::removeSelectedText() { SendScintilla(SCI_REPLACESEL, ""); } // Replace any selected text. void QsciScintilla::replaceSelectedText(const QString &text) { SendScintilla(SCI_REPLACESEL, ScintillaBytesConstData(textAsBytes(text))); } // Return the current selected text. QString QsciScintilla::selectedText() const { if (!selText) return QString(); char *buf = new char[SendScintilla(SCI_GETSELECTIONEND) - SendScintilla(SCI_GETSELECTIONSTART) + 1]; SendScintilla(SCI_GETSELTEXT, buf); QString qs = bytesAsText(buf); delete[] buf; return qs; } // Return the current text. QString QsciScintilla::text() const { int buflen = length() + 1; char *buf = new char[buflen]; SendScintilla(SCI_GETTEXT, buflen, buf); QString qs = bytesAsText(buf); delete[] buf; return qs; } // Return the text of a line. QString QsciScintilla::text(int line) const { int line_len = lineLength(line); if (line_len < 1) return QString(); char *buf = new char[line_len + 1]; SendScintilla(SCI_GETLINE, line, buf); buf[line_len] = '\0'; QString qs = bytesAsText(buf); delete[] buf; return qs; } // Return the text between two positions. QString QsciScintilla::text(int start, int end) const { char *buf = new char[end - start + 1]; SendScintilla(SCI_GETTEXTRANGE, start, end, buf); QString text = bytesAsText(buf); delete[] buf; return text; } // Return the text as encoded bytes between two positions. QByteArray QsciScintilla::bytes(int start, int end) const { QByteArray bytes(end - start + 1, '\0'); SendScintilla(SCI_GETTEXTRANGE, start, end, bytes.data()); return bytes; } // Set the given text. void QsciScintilla::setText(const QString &text) { bool ro = ensureRW(); SendScintilla(SCI_SETTEXT, ScintillaBytesConstData(textAsBytes(text))); SendScintilla(SCI_EMPTYUNDOBUFFER); setReadOnly(ro); } // Get the cursor position void QsciScintilla::getCursorPosition(int *line, int *index) const { lineIndexFromPosition(SendScintilla(SCI_GETCURRENTPOS), line, index); } // Set the cursor position void QsciScintilla::setCursorPosition(int line, int index) { SendScintilla(SCI_GOTOPOS, positionFromLineIndex(line, index)); } // Ensure the cursor is visible. void QsciScintilla::ensureCursorVisible() { SendScintilla(SCI_SCROLLCARET); } // Ensure a line is visible. void QsciScintilla::ensureLineVisible(int line) { SendScintilla(SCI_ENSUREVISIBLEENFORCEPOLICY, line); } // Copy text to the clipboard. void QsciScintilla::copy() { SendScintilla(SCI_COPY); } // Cut text to the clipboard. void QsciScintilla::cut() { SendScintilla(SCI_CUT); } // Paste text from the clipboard. void QsciScintilla::paste() { SendScintilla(SCI_PASTE); } // Select all text, or deselect any selected text. void QsciScintilla::selectAll(bool select) { if (select) SendScintilla(SCI_SELECTALL); else SendScintilla(SCI_SETANCHOR, SendScintilla(SCI_GETCURRENTPOS)); } // Delete all text. void QsciScintilla::clear() { bool ro = ensureRW(); SendScintilla(SCI_BEGINUNDOACTION); SendScintilla(SCI_CLEARALL); SendScintilla(SCI_ENDUNDOACTION); setReadOnly(ro); } // Return the indentation of a line. int QsciScintilla::indentation(int line) const { return SendScintilla(SCI_GETLINEINDENTATION, line); } // Set the indentation of a line. void QsciScintilla::setIndentation(int line, int indentation) { SendScintilla(SCI_BEGINUNDOACTION); SendScintilla(SCI_SETLINEINDENTATION, line, indentation); SendScintilla(SCI_ENDUNDOACTION); } // Indent a line. void QsciScintilla::indent(int line) { setIndentation(line, indentation(line) + indentWidth()); } // Unindent a line. void QsciScintilla::unindent(int line) { int newIndent = indentation(line) - indentWidth(); if (newIndent < 0) newIndent = 0; setIndentation(line, newIndent); } // Return the indentation of the current line. int QsciScintilla::currentIndent() const { return indentation(SendScintilla(SCI_LINEFROMPOSITION, SendScintilla(SCI_GETCURRENTPOS))); } // Return the current indentation width. int QsciScintilla::indentWidth() const { int w = indentationWidth(); if (w == 0) w = tabWidth(); return w; } // Return the state of indentation guides. bool QsciScintilla::indentationGuides() const { return (SendScintilla(SCI_GETINDENTATIONGUIDES) != SC_IV_NONE); } // Enable and disable indentation guides. void QsciScintilla::setIndentationGuides(bool enable) { int iv; if (!enable) iv = SC_IV_NONE; else if (lex.isNull()) iv = SC_IV_REAL; else iv = lex->indentationGuideView(); SendScintilla(SCI_SETINDENTATIONGUIDES, iv); } // Set the background colour of indentation guides. void QsciScintilla::setIndentationGuidesBackgroundColor(const QColor &col) { SendScintilla(SCI_STYLESETBACK, STYLE_INDENTGUIDE, col); } // Set the foreground colour of indentation guides. void QsciScintilla::setIndentationGuidesForegroundColor(const QColor &col) { SendScintilla(SCI_STYLESETFORE, STYLE_INDENTGUIDE, col); } // Return the indentation width. int QsciScintilla::indentationWidth() const { return SendScintilla(SCI_GETINDENT); } // Set the indentation width. void QsciScintilla::setIndentationWidth(int width) { SendScintilla(SCI_SETINDENT, width); } // Return the tab width. int QsciScintilla::tabWidth() const { return SendScintilla(SCI_GETTABWIDTH); } // Set the tab width. void QsciScintilla::setTabWidth(int width) { SendScintilla(SCI_SETTABWIDTH, width); } // Return the effect of the backspace key. bool QsciScintilla::backspaceUnindents() const { return SendScintilla(SCI_GETBACKSPACEUNINDENTS); } // Set the effect of the backspace key. void QsciScintilla::setBackspaceUnindents(bool unindents) { SendScintilla(SCI_SETBACKSPACEUNINDENTS, unindents); } // Return the effect of the tab key. bool QsciScintilla::tabIndents() const { return SendScintilla(SCI_GETTABINDENTS); } // Set the effect of the tab key. void QsciScintilla::setTabIndents(bool indents) { SendScintilla(SCI_SETTABINDENTS, indents); } // Return the indentation use of tabs. bool QsciScintilla::indentationsUseTabs() const { return SendScintilla(SCI_GETUSETABS); } // Set the indentation use of tabs. void QsciScintilla::setIndentationsUseTabs(bool tabs) { SendScintilla(SCI_SETUSETABS, tabs); } // Return the number of margins. int QsciScintilla::margins() const { return SendScintilla(SCI_GETMARGINS); } // Set the number of margins. void QsciScintilla::setMargins(int margins) { SendScintilla(SCI_SETMARGINS, margins); } // Return the margin background colour. QColor QsciScintilla::marginBackgroundColor(int margin) const { return asQColor(SendScintilla(SCI_GETMARGINBACKN, margin)); } // Set the margin background colour. void QsciScintilla::setMarginBackgroundColor(int margin, const QColor &col) { SendScintilla(SCI_SETMARGINBACKN, margin, col); } // Return the margin options. int QsciScintilla::marginOptions() const { return SendScintilla(SCI_GETMARGINOPTIONS); } // Set the margin options. void QsciScintilla::setMarginOptions(int options) { SendScintilla(SCI_SETMARGINOPTIONS, options); } // Return the margin type. QsciScintilla::MarginType QsciScintilla::marginType(int margin) const { return (MarginType)SendScintilla(SCI_GETMARGINTYPEN, margin); } // Set the margin type. void QsciScintilla::setMarginType(int margin, QsciScintilla::MarginType type) { SendScintilla(SCI_SETMARGINTYPEN, margin, type); } // Clear margin text. void QsciScintilla::clearMarginText(int line) { if (line < 0) SendScintilla(SCI_MARGINTEXTCLEARALL); else SendScintilla(SCI_MARGINSETTEXT, line, (const char *)0); } // Annotate a line. void QsciScintilla::setMarginText(int line, const QString &text, int style) { int style_offset = SendScintilla(SCI_MARGINGETSTYLEOFFSET); SendScintilla(SCI_MARGINSETTEXT, line, ScintillaBytesConstData(textAsBytes(text))); SendScintilla(SCI_MARGINSETSTYLE, line, style - style_offset); } // Annotate a line. void QsciScintilla::setMarginText(int line, const QString &text, const QsciStyle &style) { style.apply(this); setMarginText(line, text, style.style()); } // Annotate a line. void QsciScintilla::setMarginText(int line, const QsciStyledText &text) { text.apply(this); setMarginText(line, text.text(), text.style()); } // Annotate a line. void QsciScintilla::setMarginText(int line, const QList &text) { char *styles; ScintillaBytes styled_text = styleText(text, &styles, SendScintilla(SCI_MARGINGETSTYLEOFFSET)); SendScintilla(SCI_MARGINSETTEXT, line, ScintillaBytesConstData(styled_text)); SendScintilla(SCI_MARGINSETSTYLES, line, styles); delete[] styles; } // Return the state of line numbers in a margin. bool QsciScintilla::marginLineNumbers(int margin) const { return SendScintilla(SCI_GETMARGINTYPEN, margin); } // Enable and disable line numbers in a margin. void QsciScintilla::setMarginLineNumbers(int margin, bool lnrs) { SendScintilla(SCI_SETMARGINTYPEN, margin, lnrs ? SC_MARGIN_NUMBER : SC_MARGIN_SYMBOL); } // Return the marker mask of a margin. int QsciScintilla::marginMarkerMask(int margin) const { return SendScintilla(SCI_GETMARGINMASKN, margin); } // Set the marker mask of a margin. void QsciScintilla::setMarginMarkerMask(int margin,int mask) { SendScintilla(SCI_SETMARGINMASKN, margin, mask); } // Return the state of a margin's sensitivity. bool QsciScintilla::marginSensitivity(int margin) const { return SendScintilla(SCI_GETMARGINSENSITIVEN, margin); } // Enable and disable a margin's sensitivity. void QsciScintilla::setMarginSensitivity(int margin,bool sens) { SendScintilla(SCI_SETMARGINSENSITIVEN, margin, sens); } // Return the width of a margin. int QsciScintilla::marginWidth(int margin) const { return SendScintilla(SCI_GETMARGINWIDTHN, margin); } // Set the width of a margin. void QsciScintilla::setMarginWidth(int margin, int width) { SendScintilla(SCI_SETMARGINWIDTHN, margin, width); } // Set the width of a margin to the width of some text. void QsciScintilla::setMarginWidth(int margin, const QString &s) { int width = SendScintilla(SCI_TEXTWIDTH, STYLE_LINENUMBER, ScintillaBytesConstData(textAsBytes(s))); setMarginWidth(margin, width); } // Set the background colour of all margins. void QsciScintilla::setMarginsBackgroundColor(const QColor &col) { handleStylePaperChange(col, STYLE_LINENUMBER); } // Set the foreground colour of all margins. void QsciScintilla::setMarginsForegroundColor(const QColor &col) { handleStyleColorChange(col, STYLE_LINENUMBER); } // Set the font of all margins. void QsciScintilla::setMarginsFont(const QFont &f) { setStylesFont(f, STYLE_LINENUMBER); } // Define an indicator. int QsciScintilla::indicatorDefine(IndicatorStyle style, int indicatorNumber) { checkIndicator(indicatorNumber); if (indicatorNumber >= 0) SendScintilla(SCI_INDICSETSTYLE, indicatorNumber, static_cast(style)); return indicatorNumber; } // Return the state of an indicator being drawn under the text. bool QsciScintilla::indicatorDrawUnder(int indicatorNumber) const { if (indicatorNumber < 0 || indicatorNumber >= INDIC_IME) return false; return SendScintilla(SCI_INDICGETUNDER, indicatorNumber); } // Set the state of indicators being drawn under the text. void QsciScintilla::setIndicatorDrawUnder(bool under, int indicatorNumber) { if (indicatorNumber < INDIC_IME) { // We ignore allocatedIndicators to allow any indicators defined // elsewhere (e.g. in lexers) to be set. if (indicatorNumber < 0) { for (int i = 0; i < INDIC_IME; ++i) SendScintilla(SCI_INDICSETUNDER, i, under); } else { SendScintilla(SCI_INDICSETUNDER, indicatorNumber, under); } } } // Set the indicator foreground colour. void QsciScintilla::setIndicatorForegroundColor(const QColor &col, int indicatorNumber) { if (indicatorNumber < INDIC_IME) { int alpha = col.alpha(); // We ignore allocatedIndicators to allow any indicators defined // elsewhere (e.g. in lexers) to be set. if (indicatorNumber < 0) { for (int i = 0; i < INDIC_IME; ++i) { SendScintilla(SCI_INDICSETFORE, i, col); SendScintilla(SCI_INDICSETALPHA, i, alpha); } } else { SendScintilla(SCI_INDICSETFORE, indicatorNumber, col); SendScintilla(SCI_INDICSETALPHA, indicatorNumber, alpha); } } } // Set the indicator hover foreground colour. void QsciScintilla::setIndicatorHoverForegroundColor(const QColor &col, int indicatorNumber) { if (indicatorNumber < INDIC_IME) { // We ignore allocatedIndicators to allow any indicators defined // elsewhere (e.g. in lexers) to be set. if (indicatorNumber < 0) { for (int i = 0; i < INDIC_IME; ++i) SendScintilla(SCI_INDICSETHOVERFORE, i, col); } else { SendScintilla(SCI_INDICSETHOVERFORE, indicatorNumber, col); } } } // Set the indicator hover style. void QsciScintilla::setIndicatorHoverStyle(IndicatorStyle style, int indicatorNumber) { if (indicatorNumber < INDIC_IME) { // We ignore allocatedIndicators to allow any indicators defined // elsewhere (e.g. in lexers) to be set. if (indicatorNumber < 0) { for (int i = 0; i < INDIC_IME; ++i) SendScintilla(SCI_INDICSETHOVERSTYLE, i, static_cast(style)); } else { SendScintilla(SCI_INDICSETHOVERSTYLE, indicatorNumber, static_cast(style)); } } } // Set the indicator outline colour. void QsciScintilla::setIndicatorOutlineColor(const QColor &col, int indicatorNumber) { if (indicatorNumber < INDIC_IME) { int alpha = col.alpha(); // We ignore allocatedIndicators to allow any indicators defined // elsewhere (e.g. in lexers) to be set. if (indicatorNumber < 0) { for (int i = 0; i < INDIC_IME; ++i) SendScintilla(SCI_INDICSETOUTLINEALPHA, i, alpha); } else { SendScintilla(SCI_INDICSETOUTLINEALPHA, indicatorNumber, alpha); } } } // Fill a range with an indicator. void QsciScintilla::fillIndicatorRange(int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { if (indicatorNumber < INDIC_IME) { int start = positionFromLineIndex(lineFrom, indexFrom); int finish = positionFromLineIndex(lineTo, indexTo); // We ignore allocatedIndicators to allow any indicators defined // elsewhere (e.g. in lexers) to be set. if (indicatorNumber < 0) { for (int i = 0; i < INDIC_IME; ++i) { SendScintilla(SCI_SETINDICATORCURRENT, i); SendScintilla(SCI_INDICATORFILLRANGE, start, finish - start); } } else { SendScintilla(SCI_SETINDICATORCURRENT, indicatorNumber); SendScintilla(SCI_INDICATORFILLRANGE, start, finish - start); } } } // Clear a range with an indicator. void QsciScintilla::clearIndicatorRange(int lineFrom, int indexFrom, int lineTo, int indexTo, int indicatorNumber) { if (indicatorNumber < INDIC_IME) { int start = positionFromLineIndex(lineFrom, indexFrom); int finish = positionFromLineIndex(lineTo, indexTo); // We ignore allocatedIndicators to allow any indicators defined // elsewhere (e.g. in lexers) to be set. if (indicatorNumber < 0) { for (int i = 0; i < INDIC_IME; ++i) { SendScintilla(SCI_SETINDICATORCURRENT, i); SendScintilla(SCI_INDICATORCLEARRANGE, start, finish - start); } } else { SendScintilla(SCI_SETINDICATORCURRENT, indicatorNumber); SendScintilla(SCI_INDICATORCLEARRANGE, start, finish - start); } } } // Define a marker based on a symbol. int QsciScintilla::markerDefine(MarkerSymbol sym, int markerNumber) { checkMarker(markerNumber); if (markerNumber >= 0) SendScintilla(SCI_MARKERDEFINE, markerNumber, static_cast(sym)); return markerNumber; } // Define a marker based on a character. int QsciScintilla::markerDefine(char ch, int markerNumber) { checkMarker(markerNumber); if (markerNumber >= 0) SendScintilla(SCI_MARKERDEFINE, markerNumber, static_cast(SC_MARK_CHARACTER) + ch); return markerNumber; } // Define a marker based on a QPixmap. int QsciScintilla::markerDefine(const QPixmap &pm, int markerNumber) { checkMarker(markerNumber); if (markerNumber >= 0) SendScintilla(SCI_MARKERDEFINEPIXMAP, markerNumber, pm); return markerNumber; } // Define a marker based on a QImage. int QsciScintilla::markerDefine(const QImage &im, int markerNumber) { checkMarker(markerNumber); if (markerNumber >= 0) { SendScintilla(SCI_RGBAIMAGESETHEIGHT, im.height()); SendScintilla(SCI_RGBAIMAGESETWIDTH, im.width()); SendScintilla(SCI_MARKERDEFINERGBAIMAGE, markerNumber, im); } return markerNumber; } // Add a marker to a line. int QsciScintilla::markerAdd(int linenr, int markerNumber) { if (markerNumber < 0 || markerNumber > MARKER_MAX || (allocatedMarkers & (1 << markerNumber)) == 0) return -1; return SendScintilla(SCI_MARKERADD, linenr, markerNumber); } // Get the marker mask for a line. unsigned QsciScintilla::markersAtLine(int linenr) const { return SendScintilla(SCI_MARKERGET, linenr); } // Delete a marker from a line. void QsciScintilla::markerDelete(int linenr, int markerNumber) { if (markerNumber <= MARKER_MAX) { if (markerNumber < 0) { unsigned am = allocatedMarkers; for (int m = 0; m <= MARKER_MAX; ++m) { if (am & 1) SendScintilla(SCI_MARKERDELETE, linenr, m); am >>= 1; } } else if (allocatedMarkers & (1 << markerNumber)) SendScintilla(SCI_MARKERDELETE, linenr, markerNumber); } } // Delete a marker from the text. void QsciScintilla::markerDeleteAll(int markerNumber) { if (markerNumber <= MARKER_MAX) { if (markerNumber < 0) SendScintilla(SCI_MARKERDELETEALL, -1); else if (allocatedMarkers & (1 << markerNumber)) SendScintilla(SCI_MARKERDELETEALL, markerNumber); } } // Delete a marker handle from the text. void QsciScintilla::markerDeleteHandle(int mhandle) { SendScintilla(SCI_MARKERDELETEHANDLE, mhandle); } // Return the line containing a marker instance. int QsciScintilla::markerLine(int mhandle) const { return SendScintilla(SCI_MARKERLINEFROMHANDLE, mhandle); } // Search forwards for a marker. int QsciScintilla::markerFindNext(int linenr, unsigned mask) const { return SendScintilla(SCI_MARKERNEXT, linenr, mask); } // Search backwards for a marker. int QsciScintilla::markerFindPrevious(int linenr, unsigned mask) const { return SendScintilla(SCI_MARKERPREVIOUS, linenr, mask); } // Set the marker background colour. void QsciScintilla::setMarkerBackgroundColor(const QColor &col, int markerNumber) { if (markerNumber <= MARKER_MAX) { int alpha = col.alpha(); // An opaque background would make the text invisible. if (alpha == 255) alpha = SC_ALPHA_NOALPHA; if (markerNumber < 0) { unsigned am = allocatedMarkers; for (int m = 0; m <= MARKER_MAX; ++m) { if (am & 1) { SendScintilla(SCI_MARKERSETBACK, m, col); SendScintilla(SCI_MARKERSETALPHA, m, alpha); } am >>= 1; } } else if (allocatedMarkers & (1 << markerNumber)) { SendScintilla(SCI_MARKERSETBACK, markerNumber, col); SendScintilla(SCI_MARKERSETALPHA, markerNumber, alpha); } } } // Set the marker foreground colour. void QsciScintilla::setMarkerForegroundColor(const QColor &col, int markerNumber) { if (markerNumber <= MARKER_MAX) { if (markerNumber < 0) { unsigned am = allocatedMarkers; for (int m = 0; m <= MARKER_MAX; ++m) { if (am & 1) SendScintilla(SCI_MARKERSETFORE, m, col); am >>= 1; } } else if (allocatedMarkers & (1 << markerNumber)) { SendScintilla(SCI_MARKERSETFORE, markerNumber, col); } } } // Check a marker, allocating a marker number if necessary. void QsciScintilla::checkMarker(int &markerNumber) { allocateId(markerNumber, allocatedMarkers, 0, MARKER_MAX); } // Check an indicator, allocating an indicator number if necessary. void QsciScintilla::checkIndicator(int &indicatorNumber) { allocateId(indicatorNumber, allocatedIndicators, INDIC_CONTAINER, INDIC_IME - 1); } // Make sure an identifier is valid and allocate it if necessary. void QsciScintilla::allocateId(int &id, unsigned &allocated, int min, int max) { if (id >= 0) { // Note that we allow existing identifiers to be explicitly redefined. if (id > max) id = -1; } else { unsigned aids = allocated >> min; // Find the smallest unallocated identifier. for (id = min; id <= max; ++id) { if ((aids & 1) == 0) break; aids >>= 1; } } // Allocate the identifier if it is valid. if (id >= 0) allocated |= (1 << id); } // Reset the fold margin colours. void QsciScintilla::resetFoldMarginColors() { SendScintilla(SCI_SETFOLDMARGINHICOLOUR, 0, 0L); SendScintilla(SCI_SETFOLDMARGINCOLOUR, 0, 0L); } // Set the fold margin colours. void QsciScintilla::setFoldMarginColors(const QColor &fore, const QColor &back) { SendScintilla(SCI_SETFOLDMARGINHICOLOUR, 1, fore); SendScintilla(SCI_SETFOLDMARGINCOLOUR, 1, back); } // Set the call tips background colour. void QsciScintilla::setCallTipsBackgroundColor(const QColor &col) { SendScintilla(SCI_CALLTIPSETBACK, col); } // Set the call tips foreground colour. void QsciScintilla::setCallTipsForegroundColor(const QColor &col) { SendScintilla(SCI_CALLTIPSETFORE, col); } // Set the call tips highlight colour. void QsciScintilla::setCallTipsHighlightColor(const QColor &col) { SendScintilla(SCI_CALLTIPSETFOREHLT, col); } // Set the matched brace background colour. void QsciScintilla::setMatchedBraceBackgroundColor(const QColor &col) { SendScintilla(SCI_STYLESETBACK, STYLE_BRACELIGHT, col); } // Set the matched brace foreground colour. void QsciScintilla::setMatchedBraceForegroundColor(const QColor &col) { SendScintilla(SCI_STYLESETFORE, STYLE_BRACELIGHT, col); } // Set the matched brace indicator. void QsciScintilla::setMatchedBraceIndicator(int indicatorNumber) { SendScintilla(SCI_BRACEHIGHLIGHTINDICATOR, 1, indicatorNumber); } // Reset the matched brace indicator. void QsciScintilla::resetMatchedBraceIndicator() { SendScintilla(SCI_BRACEHIGHLIGHTINDICATOR, 0, 0L); } // Set the unmatched brace background colour. void QsciScintilla::setUnmatchedBraceBackgroundColor(const QColor &col) { SendScintilla(SCI_STYLESETBACK, STYLE_BRACEBAD, col); } // Set the unmatched brace foreground colour. void QsciScintilla::setUnmatchedBraceForegroundColor(const QColor &col) { SendScintilla(SCI_STYLESETFORE, STYLE_BRACEBAD, col); } // Set the unmatched brace indicator. void QsciScintilla::setUnmatchedBraceIndicator(int indicatorNumber) { SendScintilla(SCI_BRACEBADLIGHTINDICATOR, 1, indicatorNumber); } // Reset the unmatched brace indicator. void QsciScintilla::resetUnmatchedBraceIndicator() { SendScintilla(SCI_BRACEBADLIGHTINDICATOR, 0, 0L); } // Detach any lexer. void QsciScintilla::detachLexer() { if (!lex.isNull()) { lex->setEditor(0); lex->disconnect(this); SendScintilla(SCI_STYLERESETDEFAULT); SendScintilla(SCI_STYLECLEARALL); } } // Set the lexer. void QsciScintilla::setLexer(QsciLexer *lexer) { // Detach any current lexer. detachLexer(); // Connect up the new lexer. lex = lexer; if (lex) { SendScintilla(SCI_CLEARDOCUMENTSTYLE); if (lex->lexer()) SendScintilla(SCI_SETLEXERLANGUAGE, lex->lexer()); else SendScintilla(SCI_SETLEXER, lex->lexerId()); lex->setEditor(this); connect(lex,SIGNAL(colorChanged(const QColor &, int)), SLOT(handleStyleColorChange(const QColor &, int))); connect(lex,SIGNAL(eolFillChanged(bool, int)), SLOT(handleStyleEolFillChange(bool, int))); connect(lex,SIGNAL(fontChanged(const QFont &, int)), SLOT(handleStyleFontChange(const QFont &, int))); connect(lex,SIGNAL(paperChanged(const QColor &, int)), SLOT(handleStylePaperChange(const QColor &, int))); connect(lex,SIGNAL(propertyChanged(const char *, const char *)), SLOT(handlePropertyChange(const char *, const char *))); SendScintilla(SCI_SETPROPERTY, "fold", "1"); SendScintilla(SCI_SETPROPERTY, "fold.html", "1"); // Set the keywords. Scintilla allows for sets numbered 0 to // KEYWORDSET_MAX (although the lexers only seem to exploit 0 to // KEYWORDSET_MAX - 1). We number from 1 in line with SciTE's property // files. for (int k = 0; k <= KEYWORDSET_MAX; ++k) { const char *kw = lex -> keywords(k + 1); if (!kw) kw = ""; SendScintilla(SCI_SETKEYWORDS, k, kw); } // Initialise each style. Do the default first so its (possibly // incorrect) font setting gets reset when style 0 is set. setLexerStyle(STYLE_DEFAULT); int nrStyles = 1 << SendScintilla(SCI_GETSTYLEBITS); for (int s = 0; s < nrStyles; ++s) if (!lex->description(s).isEmpty()) setLexerStyle(s); // Initialise the properties. lex->refreshProperties(); // Set the auto-completion fillups and word separators. setAutoCompletionFillupsEnabled(fillups_enabled); wseps = lex->autoCompletionWordSeparators(); wchars = lex->wordCharacters(); if (!wchars) wchars = defaultWordChars; SendScintilla(SCI_AUTOCSETIGNORECASE, !lex->caseSensitive()); recolor(); } else { SendScintilla(SCI_SETLEXER, SCLEX_CONTAINER); setColor(nl_text_colour); setPaper(nl_paper_colour); SendScintilla(SCI_AUTOCSETFILLUPS, ""); SendScintilla(SCI_AUTOCSETIGNORECASE, false); wseps.clear(); wchars = defaultWordChars; } } // Set a particular style of the current lexer. void QsciScintilla::setLexerStyle(int style) { handleStyleColorChange(lex->color(style), style); handleStyleEolFillChange(lex->eolFill(style), style); handleStyleFontChange(lex->font(style), style); handleStylePaperChange(lex->paper(style), style); } // Get the current lexer. QsciLexer *QsciScintilla::lexer() const { return lex; } // Handle a change in lexer style foreground colour. void QsciScintilla::handleStyleColorChange(const QColor &c, int style) { SendScintilla(SCI_STYLESETFORE, style, c); } // Handle a change in lexer style end-of-line fill. void QsciScintilla::handleStyleEolFillChange(bool eolfill, int style) { SendScintilla(SCI_STYLESETEOLFILLED, style, eolfill); } // Handle a change in lexer style font. void QsciScintilla::handleStyleFontChange(const QFont &f, int style) { setStylesFont(f, style); if (style == lex->braceStyle()) { setStylesFont(f, STYLE_BRACELIGHT); setStylesFont(f, STYLE_BRACEBAD); } } // Set the font for a style. void QsciScintilla::setStylesFont(const QFont &f, int style) { SendScintilla(SCI_STYLESETFONT, style, f.family().toLatin1().data()); SendScintilla(SCI_STYLESETSIZEFRACTIONAL, style, long(f.pointSizeF() * SC_FONT_SIZE_MULTIPLIER)); // Pass the Qt weight via the back door. SendScintilla(SCI_STYLESETWEIGHT, style, -f.weight()); SendScintilla(SCI_STYLESETITALIC, style, f.italic()); SendScintilla(SCI_STYLESETUNDERLINE, style, f.underline()); // Tie the font settings of the default style to that of style 0 (the style // conventionally used for whitespace by lexers). This is needed so that // fold marks, indentations, edge columns etc are set properly. if (style == 0) setStylesFont(f, STYLE_DEFAULT); } // Handle a change in lexer style background colour. void QsciScintilla::handleStylePaperChange(const QColor &c, int style) { SendScintilla(SCI_STYLESETBACK, style, c); } // Handle a change in lexer property. void QsciScintilla::handlePropertyChange(const char *prop, const char *val) { SendScintilla(SCI_SETPROPERTY, prop, val); } // Handle a change to the user visible user interface. void QsciScintilla::handleUpdateUI(int) { int newPos = SendScintilla(SCI_GETCURRENTPOS); if (newPos != oldPos) { oldPos = newPos; int line = SendScintilla(SCI_LINEFROMPOSITION, newPos); int col = SendScintilla(SCI_GETCOLUMN, newPos); emit cursorPositionChanged(line, col); } if (braceMode != NoBraceMatch) braceMatch(); } // Handle brace matching. void QsciScintilla::braceMatch() { long braceAtCaret, braceOpposite; findMatchingBrace(braceAtCaret, braceOpposite, braceMode); if (braceAtCaret >= 0 && braceOpposite < 0) { SendScintilla(SCI_BRACEBADLIGHT, braceAtCaret); SendScintilla(SCI_SETHIGHLIGHTGUIDE, 0UL); } else { char chBrace = SendScintilla(SCI_GETCHARAT, braceAtCaret); SendScintilla(SCI_BRACEHIGHLIGHT, braceAtCaret, braceOpposite); long columnAtCaret = SendScintilla(SCI_GETCOLUMN, braceAtCaret); long columnOpposite = SendScintilla(SCI_GETCOLUMN, braceOpposite); if (chBrace == ':') { long lineStart = SendScintilla(SCI_LINEFROMPOSITION, braceAtCaret); long indentPos = SendScintilla(SCI_GETLINEINDENTPOSITION, lineStart); long indentPosNext = SendScintilla(SCI_GETLINEINDENTPOSITION, lineStart + 1); columnAtCaret = SendScintilla(SCI_GETCOLUMN, indentPos); long columnAtCaretNext = SendScintilla(SCI_GETCOLUMN, indentPosNext); long indentSize = SendScintilla(SCI_GETINDENT); if (columnAtCaretNext - indentSize > 1) columnAtCaret = columnAtCaretNext - indentSize; if (columnOpposite == 0) columnOpposite = columnAtCaret; } long column = columnAtCaret; if (column > columnOpposite) column = columnOpposite; SendScintilla(SCI_SETHIGHLIGHTGUIDE, column); } } // Check if the character at a position is a brace. long QsciScintilla::checkBrace(long pos, int brace_style, bool &colonMode) { long brace_pos = -1; char ch = SendScintilla(SCI_GETCHARAT, pos); if (ch == ':') { // A bit of a hack, we should really use a virtual. if (!lex.isNull() && qstrcmp(lex->lexer(), "python") == 0) { brace_pos = pos; colonMode = true; } } else if (ch && strchr("[](){}<>", ch)) { if (brace_style < 0) brace_pos = pos; else { int style = SendScintilla(SCI_GETSTYLEAT, pos) & 0x1f; if (style == brace_style) brace_pos = pos; } } return brace_pos; } // Find a brace and it's match. Return true if the current position is inside // a pair of braces. bool QsciScintilla::findMatchingBrace(long &brace, long &other,BraceMatch mode) { bool colonMode = false; int brace_style = (lex.isNull() ? -1 : lex->braceStyle()); brace = -1; other = -1; long caretPos = SendScintilla(SCI_GETCURRENTPOS); if (caretPos > 0) brace = checkBrace(caretPos - 1, brace_style, colonMode); bool isInside = false; if (brace < 0 && mode == SloppyBraceMatch) { brace = checkBrace(caretPos, brace_style, colonMode); if (brace >= 0 && !colonMode) isInside = true; } if (brace >= 0) { if (colonMode) { // Find the end of the Python indented block. long lineStart = SendScintilla(SCI_LINEFROMPOSITION, brace); long lineMaxSubord = SendScintilla(SCI_GETLASTCHILD, lineStart, -1); other = SendScintilla(SCI_GETLINEENDPOSITION, lineMaxSubord); } else other = SendScintilla(SCI_BRACEMATCH, brace, 0L); if (other > brace) isInside = !isInside; } return isInside; } // Move to the matching brace. void QsciScintilla::moveToMatchingBrace() { gotoMatchingBrace(false); } // Select to the matching brace. void QsciScintilla::selectToMatchingBrace() { gotoMatchingBrace(true); } // Move to the matching brace and optionally select the text. void QsciScintilla::gotoMatchingBrace(bool select) { long braceAtCaret; long braceOpposite; bool isInside = findMatchingBrace(braceAtCaret, braceOpposite, SloppyBraceMatch); if (braceOpposite >= 0) { // Convert the character positions into caret positions based on // whether the caret position was inside or outside the braces. if (isInside) { if (braceOpposite > braceAtCaret) braceAtCaret++; else braceOpposite++; } else { if (braceOpposite > braceAtCaret) braceOpposite++; else braceAtCaret++; } ensureLineVisible(SendScintilla(SCI_LINEFROMPOSITION, braceOpposite)); if (select) SendScintilla(SCI_SETSEL, braceAtCaret, braceOpposite); else SendScintilla(SCI_SETSEL, braceOpposite, braceOpposite); } } // Return a position from a line number and an index within the line. int QsciScintilla::positionFromLineIndex(int line, int index) const { int pos = SendScintilla(SCI_POSITIONFROMLINE, line); // Allow for multi-byte characters. for(int i = 0; i < index; i++) pos = SendScintilla(SCI_POSITIONAFTER, pos); return pos; } // Return a line number and an index within the line from a position. void QsciScintilla::lineIndexFromPosition(int position, int *line, int *index) const { int lin = SendScintilla(SCI_LINEFROMPOSITION, position); int linpos = SendScintilla(SCI_POSITIONFROMLINE, lin); int indx = 0; // Allow for multi-byte characters. while (linpos < position) { int new_linpos = SendScintilla(SCI_POSITIONAFTER, linpos); // If the position hasn't moved then we must be at the end of the text // (which implies that the position passed was beyond the end of the // text). if (new_linpos == linpos) break; linpos = new_linpos; ++indx; } *line = lin; *index = indx; } // Set the source of the automatic auto-completion list. void QsciScintilla::setAutoCompletionSource(AutoCompletionSource source) { acSource = source; } // Set the threshold for automatic auto-completion. void QsciScintilla::setAutoCompletionThreshold(int thresh) { acThresh = thresh; } // Set the auto-completion word separators if there is no current lexer. void QsciScintilla::setAutoCompletionWordSeparators(const QStringList &separators) { if (lex.isNull()) wseps = separators; } // Explicitly auto-complete from all sources. void QsciScintilla::autoCompleteFromAll() { startAutoCompletion(AcsAll, false, use_single != AcusNever); } // Explicitly auto-complete from the APIs. void QsciScintilla::autoCompleteFromAPIs() { startAutoCompletion(AcsAPIs, false, use_single != AcusNever); } // Explicitly auto-complete from the document. void QsciScintilla::autoCompleteFromDocument() { startAutoCompletion(AcsDocument, false, use_single != AcusNever); } // Check if a character can be in a word. bool QsciScintilla::isWordCharacter(char ch) const { return (strchr(wchars, ch) != NULL); } // Return the set of valid word characters. const char *QsciScintilla::wordCharacters() const { return wchars; } // Recolour the document. void QsciScintilla::recolor(int start, int end) { SendScintilla(SCI_COLOURISE, start, end); } // Registered a QPixmap image. void QsciScintilla::registerImage(int id, const QPixmap &pm) { SendScintilla(SCI_REGISTERIMAGE, id, pm); } // Registered a QImage image. void QsciScintilla::registerImage(int id, const QImage &im) { SendScintilla(SCI_RGBAIMAGESETHEIGHT, im.height()); SendScintilla(SCI_RGBAIMAGESETWIDTH, im.width()); SendScintilla(SCI_REGISTERRGBAIMAGE, id, im); } // Clear all registered images. void QsciScintilla::clearRegisteredImages() { SendScintilla(SCI_CLEARREGISTEREDIMAGES); } // Enable auto-completion fill-ups. void QsciScintilla::setAutoCompletionFillupsEnabled(bool enable) { const char *fillups; if (!enable) fillups = ""; else if (!lex.isNull()) fillups = lex->autoCompletionFillups(); else fillups = explicit_fillups.data(); SendScintilla(SCI_AUTOCSETFILLUPS, fillups); fillups_enabled = enable; } // See if auto-completion fill-ups are enabled. bool QsciScintilla::autoCompletionFillupsEnabled() const { return fillups_enabled; } // Set the fill-up characters for auto-completion if there is no current lexer. void QsciScintilla::setAutoCompletionFillups(const char *fillups) { explicit_fillups = fillups; setAutoCompletionFillupsEnabled(fillups_enabled); } // Set the case sensitivity for auto-completion. void QsciScintilla::setAutoCompletionCaseSensitivity(bool cs) { SendScintilla(SCI_AUTOCSETIGNORECASE, !cs); } // Return the case sensitivity for auto-completion. bool QsciScintilla::autoCompletionCaseSensitivity() const { return !SendScintilla(SCI_AUTOCGETIGNORECASE); } // Set the replace word mode for auto-completion. void QsciScintilla::setAutoCompletionReplaceWord(bool replace) { SendScintilla(SCI_AUTOCSETDROPRESTOFWORD, replace); } // Return the replace word mode for auto-completion. bool QsciScintilla::autoCompletionReplaceWord() const { return SendScintilla(SCI_AUTOCGETDROPRESTOFWORD); } // Set the single item mode for auto-completion. void QsciScintilla::setAutoCompletionUseSingle(AutoCompletionUseSingle single) { use_single = single; } // Return the single item mode for auto-completion. QsciScintilla::AutoCompletionUseSingle QsciScintilla::autoCompletionUseSingle() const { return use_single; } // Set the single item mode for auto-completion (deprecated). void QsciScintilla::setAutoCompletionShowSingle(bool single) { use_single = (single ? AcusExplicit : AcusNever); } // Return the single item mode for auto-completion (deprecated). bool QsciScintilla::autoCompletionShowSingle() const { return (use_single != AcusNever); } // Set current call tip position. void QsciScintilla::setCallTipsPosition(CallTipsPosition position) { SendScintilla(SCI_CALLTIPSETPOSITION, (position == CallTipsAboveText)); call_tips_position = position; } // Set current call tip style. void QsciScintilla::setCallTipsStyle(CallTipsStyle style) { call_tips_style = style; } // Set maximum number of call tips displayed. void QsciScintilla::setCallTipsVisible(int nr) { maxCallTips = nr; } // Set the document to display. void QsciScintilla::setDocument(const QsciDocument &document) { if (doc.pdoc != document.pdoc) { doc.undisplay(this); doc.attach(document); doc.display(this,&document); } } // Ensure the document is read-write and return true if was was read-only. bool QsciScintilla::ensureRW() { bool ro = isReadOnly(); if (ro) setReadOnly(false); return ro; } // Return the number of the first visible line. int QsciScintilla::firstVisibleLine() const { return SendScintilla(SCI_GETFIRSTVISIBLELINE); } // Set the number of the first visible line. void QsciScintilla::setFirstVisibleLine(int linenr) { SendScintilla(SCI_SETFIRSTVISIBLELINE, linenr); } // Return the height in pixels of the text in a particular line. int QsciScintilla::textHeight(int linenr) const { return SendScintilla(SCI_TEXTHEIGHT, linenr); } // See if auto-completion or user list is active. bool QsciScintilla::isListActive() const { return SendScintilla(SCI_AUTOCACTIVE); } // Cancel any current auto-completion or user list. void QsciScintilla::cancelList() { SendScintilla(SCI_AUTOCCANCEL); } // Handle a selection from the auto-completion list. void QsciScintilla::handleAutoCompletionSelection() { if (!lex.isNull()) { QsciAbstractAPIs *apis = lex->apis(); if (apis) apis->autoCompletionSelected(acSelection); } } // Display a user list. void QsciScintilla::showUserList(int id, const QStringList &list) { // Sanity check to make sure auto-completion doesn't get confused. if (id <= 0) return; SendScintilla(SCI_AUTOCSETSEPARATOR, userSeparator); ScintillaBytes s = textAsBytes(list.join(QChar(userSeparator))); SendScintilla(SCI_USERLISTSHOW, id, ScintillaBytesConstData(s)); } // Translate the SCN_USERLISTSELECTION notification into something more useful. void QsciScintilla::handleUserListSelection(const char *text, int id) { emit userListActivated(id, QString(text)); // Make sure the editor hasn't been deactivated as a side effect. activateWindow(); } // Return the case sensitivity of any lexer. bool QsciScintilla::caseSensitive() const { return lex.isNull() ? true : lex->caseSensitive(); } // Return true if the current list is an auto-completion list rather than a // user list. bool QsciScintilla::isAutoCompletionList() const { return (SendScintilla(SCI_AUTOCGETSEPARATOR) == acSeparator); } // Read the text from a QIODevice. bool QsciScintilla::read(QIODevice *io) { const int min_size = 1024 * 8; int buf_size = min_size; char *buf = new char[buf_size]; int data_len = 0; bool ok = true; qint64 part; // Read the whole lot in so we don't have to worry about character // boundaries. do { // Make sure there is a minimum amount of room. if (buf_size - data_len < min_size) { buf_size *= 2; char *new_buf = new char[buf_size * 2]; memcpy(new_buf, buf, data_len); delete[] buf; buf = new_buf; } part = io->read(buf + data_len, buf_size - data_len - 1); data_len += part; } while (part > 0); if (part < 0) ok = false; else { buf[data_len] = '\0'; bool ro = ensureRW(); SendScintilla(SCI_SETTEXT, buf); SendScintilla(SCI_EMPTYUNDOBUFFER); setReadOnly(ro); } delete[] buf; return ok; } // Write the text to a QIODevice. bool QsciScintilla::write(QIODevice *io) const { const char *buf = reinterpret_cast(SendScintillaPtrResult(SCI_GETCHARACTERPOINTER)); const char *bp = buf; uint buflen = qstrlen(buf); while (buflen > 0) { qint64 part = io->write(bp, buflen); if (part < 0) return false; bp += part; buflen -= part; } return true; } // Return the word at the given coordinates. QString QsciScintilla::wordAtLineIndex(int line, int index) const { return wordAtPosition(positionFromLineIndex(line, index)); } // Return the word at the given coordinates. QString QsciScintilla::wordAtPoint(const QPoint &point) const { long close_pos = SendScintilla(SCI_POSITIONFROMPOINTCLOSE, point.x(), point.y()); return wordAtPosition(close_pos); } // Return the word at the given position. QString QsciScintilla::wordAtPosition(int position) const { if (position < 0) return QString(); long start_pos = SendScintilla(SCI_WORDSTARTPOSITION, position, true); long end_pos = SendScintilla(SCI_WORDENDPOSITION, position, true); if (start_pos >= end_pos) return QString(); return text(start_pos, end_pos); } // Return the display style for annotations. QsciScintilla::AnnotationDisplay QsciScintilla::annotationDisplay() const { return (AnnotationDisplay)SendScintilla(SCI_ANNOTATIONGETVISIBLE); } // Set the display style for annotations. void QsciScintilla::setAnnotationDisplay(QsciScintilla::AnnotationDisplay display) { SendScintilla(SCI_ANNOTATIONSETVISIBLE, display); setScrollBars(); } // Clear annotations. void QsciScintilla::clearAnnotations(int line) { if (line >= 0) SendScintilla(SCI_ANNOTATIONSETTEXT, line, (const char *)0); else SendScintilla(SCI_ANNOTATIONCLEARALL); setScrollBars(); } // Annotate a line. void QsciScintilla::annotate(int line, const QString &text, int style) { int style_offset = SendScintilla(SCI_ANNOTATIONGETSTYLEOFFSET); ScintillaBytes s = textAsBytes(text); SendScintilla(SCI_ANNOTATIONSETTEXT, line, ScintillaBytesConstData(s)); SendScintilla(SCI_ANNOTATIONSETSTYLE, line, style - style_offset); setScrollBars(); } // Annotate a line. void QsciScintilla::annotate(int line, const QString &text, const QsciStyle &style) { style.apply(this); annotate(line, text, style.style()); } // Annotate a line. void QsciScintilla::annotate(int line, const QsciStyledText &text) { text.apply(this); annotate(line, text.text(), text.style()); } // Annotate a line. void QsciScintilla::annotate(int line, const QList &text) { char *styles; ScintillaBytes styled_text = styleText(text, &styles, SendScintilla(SCI_ANNOTATIONGETSTYLEOFFSET)); SendScintilla(SCI_ANNOTATIONSETTEXT, line, ScintillaBytesConstData(styled_text)); SendScintilla(SCI_ANNOTATIONSETSTYLES, line, styles); delete[] styles; } // Get the annotation for a line, if any. QString QsciScintilla::annotation(int line) const { char *buf = new char[SendScintilla(SCI_ANNOTATIONGETTEXT, line, (const char *)0) + 1]; buf[SendScintilla(SCI_ANNOTATIONGETTEXT, line, buf)] = '\0'; QString qs = bytesAsText(buf); delete[] buf; return qs; } // Convert a list of styled text to the low-level arrays. QsciScintillaBase::ScintillaBytes QsciScintilla::styleText(const QList &styled_text, char **styles, int style_offset) { QString text; int i; // Build the full text. for (i = 0; i < styled_text.count(); ++i) { const QsciStyledText &st = styled_text[i]; st.apply(this); text.append(st.text()); } ScintillaBytes s = textAsBytes(text); // There is a style byte for every byte. char *sp = *styles = new char[s.length()]; for (i = 0; i < styled_text.count(); ++i) { const QsciStyledText &st = styled_text[i]; ScintillaBytes part = textAsBytes(st.text()); int part_length = part.length(); for (int c = 0; c < part_length; ++c) *sp++ = (char)(st.style() - style_offset); } return s; } // Convert Scintilla modifiers to the Qt equivalent. int QsciScintilla::mapModifiers(int modifiers) { int state = 0; if (modifiers & SCMOD_SHIFT) state |= Qt::ShiftModifier; if (modifiers & SCMOD_CTRL) state |= Qt::ControlModifier; if (modifiers & SCMOD_ALT) state |= Qt::AltModifier; if (modifiers & (SCMOD_SUPER | SCMOD_META)) state |= Qt::MetaModifier; return state; } // Re-implemented to handle shortcut overrides. bool QsciScintilla::event(QEvent *e) { if (e->type() == QEvent::ShortcutOverride && !isReadOnly()) { QKeyEvent *ke = static_cast(e); if (ke->key()) { // We want ordinary characters. if ((ke->modifiers() == Qt::NoModifier || ke->modifiers() == Qt::ShiftModifier || ke->modifiers() == Qt::KeypadModifier) && ke->key() < Qt::Key_Escape) { ke->accept(); return true; } // We want any key that is bound. QsciCommand *cmd = stdCmds->boundTo(ke->key() | (ke->modifiers() & ~Qt::KeypadModifier)); if (cmd) { ke->accept(); return true; } } } return QsciScintillaBase::event(e); } // Re-implemented to handle chenges to the enabled state. void QsciScintilla::changeEvent(QEvent *e) { QsciScintillaBase::changeEvent(e); if (e->type() != QEvent::EnabledChange) return; if (isEnabled()) SendScintilla(SCI_SETCARETSTYLE, CARETSTYLE_LINE); else SendScintilla(SCI_SETCARETSTYLE, CARETSTYLE_INVISIBLE); QColor fore = palette().color(QPalette::Disabled, QPalette::Text); QColor back = palette().color(QPalette::Disabled, QPalette::Base); if (lex.isNull()) { if (isEnabled()) { fore = nl_text_colour; back = nl_paper_colour; } SendScintilla(SCI_STYLESETFORE, 0, fore); // Assume style 0 applies to everything so that we don't need to use // SCI_STYLECLEARALL which clears everything. We still have to set the // default style as well for the background without any text. SendScintilla(SCI_STYLESETBACK, 0, back); SendScintilla(SCI_STYLESETBACK, STYLE_DEFAULT, back); } else { setEnabledColors(STYLE_DEFAULT, fore, back); int nrStyles = 1 << SendScintilla(SCI_GETSTYLEBITS); for (int s = 0; s < nrStyles; ++s) if (!lex->description(s).isNull()) setEnabledColors(s, fore, back); } } // Set the foreground and background colours for a style. void QsciScintilla::setEnabledColors(int style, QColor &fore, QColor &back) { if (isEnabled()) { fore = lex->color(style); back = lex->paper(style); } handleStyleColorChange(fore, style); handleStylePaperChange(back, style); } // Re-implemented to implement a more Qt-like context menu. void QsciScintilla::contextMenuEvent(QContextMenuEvent *e) { QMenu *menu = createStandardContextMenu(); if (menu) { menu->setAttribute(Qt::WA_DeleteOnClose); menu->popup(e->globalPos()); } } // Create an instance of the standard context menu. QMenu *QsciScintilla::createStandardContextMenu() { bool read_only = isReadOnly(); bool has_selection = hasSelectedText(); QMenu *menu = new QMenu(this); QAction *action; if (!read_only) { action = menu->addAction(tr("&Undo"), this, SLOT(undo())); set_shortcut(action, QsciCommand::Undo); action->setEnabled(isUndoAvailable()); action = menu->addAction(tr("&Redo"), this, SLOT(redo())); set_shortcut(action, QsciCommand::Redo); action->setEnabled(isRedoAvailable()); menu->addSeparator(); action = menu->addAction(tr("Cu&t"), this, SLOT(cut())); set_shortcut(action, QsciCommand::SelectionCut); action->setEnabled(has_selection); } action = menu->addAction(tr("&Copy"), this, SLOT(copy())); set_shortcut(action, QsciCommand::SelectionCopy); action->setEnabled(has_selection); if (!read_only) { action = menu->addAction(tr("&Paste"), this, SLOT(paste())); set_shortcut(action, QsciCommand::Paste); action->setEnabled(SendScintilla(SCI_CANPASTE)); action = menu->addAction(tr("Delete"), this, SLOT(delete_selection())); action->setEnabled(has_selection); } if (!menu->isEmpty()) menu->addSeparator(); action = menu->addAction(tr("Select All"), this, SLOT(selectAll())); set_shortcut(action, QsciCommand::SelectAll); action->setEnabled(length() != 0); return menu; } // Set the shortcut for an action using any current key binding. void QsciScintilla::set_shortcut(QAction *action, QsciCommand::Command cmd_id) const { QsciCommand *cmd = stdCmds->find(cmd_id); if (cmd && cmd->key()) action->setShortcut(QKeySequence(cmd->key())); } // Delete the current selection. void QsciScintilla::delete_selection() { SendScintilla(SCI_CLEAR); } // Convert a Scintilla colour to a QColor. static QColor asQColor(long sci_colour) { return QColor( ((int)sci_colour) & 0x00ff, ((int)(sci_colour >> 8)) & 0x00ff, ((int)(sci_colour >> 16)) & 0x00ff); } void QsciScintilla::setScrollWidth(int pixelWidth) { SendScintilla(SCI_SETSCROLLWIDTH, pixelWidth); } int QsciScintilla::getScrollWidth() const { return SendScintilla(SCI_GETSCROLLWIDTH); } void QsciScintilla::setScrollWidthTracking(bool enabled) { SendScintilla(SCI_SETSCROLLWIDTHTRACKING, enabled); } bool QsciScintilla::getScrollWidthTracking() const { return SendScintilla(SCI_GETSCROLLWIDTHTRACKING); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qsciscintillabase.cpp000066400000000000000000000504771345112435200250570ustar00rootroot00000000000000// This module implements the "official" low-level API. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qsciscintillabase.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ScintillaQt.h" // The #defines in Scintilla.h and the enums in qsciscintillabase.h conflict // (because we want to use the same names) so we have to undefine those we use // in this file. #undef SCI_SETCARETPERIOD #undef SCK_DOWN #undef SCK_UP #undef SCK_LEFT #undef SCK_RIGHT #undef SCK_HOME #undef SCK_END #undef SCK_PRIOR #undef SCK_NEXT #undef SCK_DELETE #undef SCK_INSERT #undef SCK_ESCAPE #undef SCK_BACK #undef SCK_TAB #undef SCK_RETURN #undef SCK_ADD #undef SCK_SUBTRACT #undef SCK_DIVIDE #undef SCK_WIN #undef SCK_RWIN #undef SCK_MENU // Remember if we have linked the lexers. static bool lexersLinked = false; // The list of instances. static QList poolList; // Mime support. static const QLatin1String mimeTextPlain("text/plain"); static const QLatin1String mimeRectangularWin("MSDEVColumnSelect"); static const QLatin1String mimeRectangular("text/x-qscintilla-rectangular"); #if (QT_VERSION >= 0x040200 && QT_VERSION < 0x050000 && defined(Q_OS_MAC)) || (QT_VERSION >= 0x050200 && defined(Q_OS_OSX)) extern void initialiseRectangularPasteboardMime(); #endif // The ctor. QsciScintillaBase::QsciScintillaBase(QWidget *parent) : QAbstractScrollArea(parent), preeditPos(-1), preeditNrBytes(0) #if QT_VERSION >= 0x050000 , clickCausedFocus(false) #endif { connectVerticalScrollBar(); connectHorizontalScrollBar(); setAcceptDrops(true); setFocusPolicy(Qt::WheelFocus); setAttribute(Qt::WA_KeyCompression); setAttribute(Qt::WA_InputMethodEnabled); #if QT_VERSION >= 0x050100 setInputMethodHints( Qt::ImhNoAutoUppercase|Qt::ImhNoPredictiveText|Qt::ImhMultiLine); #elif QT_VERSION >= 0x040600 setInputMethodHints(Qt::ImhNoAutoUppercase|Qt::ImhNoPredictiveText); #endif viewport()->setBackgroundRole(QPalette::Base); viewport()->setMouseTracking(true); viewport()->setAttribute(Qt::WA_NoSystemBackground); triple_click.setSingleShot(true); #if (QT_VERSION >= 0x040200 && QT_VERSION < 0x050000 && defined(Q_OS_MAC)) || (QT_VERSION >= 0x050200 && defined(Q_OS_OSX)) initialiseRectangularPasteboardMime(); #endif sci = new QsciScintillaQt(this); SendScintilla(SCI_SETCARETPERIOD, QApplication::cursorFlashTime() / 2); // Make sure the lexers are linked in. if (!lexersLinked) { Scintilla_LinkLexers(); lexersLinked = true; } QClipboard *cb = QApplication::clipboard(); if (cb->supportsSelection()) connect(cb, SIGNAL(selectionChanged()), SLOT(handleSelection())); // Add it to the pool. poolList.append(this); } // The dtor. QsciScintillaBase::~QsciScintillaBase() { // The QsciScintillaQt object isn't a child so delete it explicitly. delete sci; // Remove it from the pool. poolList.removeAt(poolList.indexOf(this)); } // Return an instance from the pool. QsciScintillaBase *QsciScintillaBase::pool() { return poolList.first(); } // Tell Scintilla to update the scroll bars. Scintilla should be doing this // itself. void QsciScintillaBase::setScrollBars() { sci->SetScrollBars(); } // Send a message to the real Scintilla widget using the low level Scintilla // API. long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, long lParam) const { return sci->WndProc(msg, wParam, lParam); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, void *lParam) const { return sci->WndProc(msg, wParam, reinterpret_cast(lParam)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, const char *lParam) const { return sci->WndProc(msg, wParam, reinterpret_cast(lParam)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, const char *lParam) const { return sci->WndProc(msg, static_cast(0), reinterpret_cast(lParam)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, const char *wParam, const char *lParam) const { return sci->WndProc(msg, reinterpret_cast(wParam), reinterpret_cast(lParam)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, long wParam) const { return sci->WndProc(msg, static_cast(wParam), static_cast(0)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, int wParam) const { return sci->WndProc(msg, static_cast(wParam), static_cast(0)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, long cpMin, long cpMax, char *lpstrText) const { Sci_TextRange tr; tr.chrg.cpMin = cpMin; tr.chrg.cpMax = cpMax; tr.lpstrText = lpstrText; return sci->WndProc(msg, static_cast(0), reinterpret_cast(&tr)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, const QColor &col) const { sptr_t lParam = (col.blue() << 16) | (col.green() << 8) | col.red(); return sci->WndProc(msg, wParam, lParam); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, const QColor &col) const { uptr_t wParam = (col.blue() << 16) | (col.green() << 8) | col.red(); return sci->WndProc(msg, wParam, static_cast(0)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, QPainter *hdc, const QRect &rc, long cpMin, long cpMax) const { Sci_RangeToFormat rf; rf.hdc = rf.hdcTarget = reinterpret_cast(hdc); rf.rc.left = rc.left(); rf.rc.top = rc.top(); rf.rc.right = rc.right() + 1; rf.rc.bottom = rc.bottom() + 1; rf.chrg.cpMin = cpMin; rf.chrg.cpMax = cpMax; return sci->WndProc(msg, wParam, reinterpret_cast(&rf)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, const QPixmap &lParam) const { return sci->WndProc(msg, wParam, reinterpret_cast(&lParam)); } // Overloaded message send. long QsciScintillaBase::SendScintilla(unsigned int msg, unsigned long wParam, const QImage &lParam) const { return sci->WndProc(msg, wParam, reinterpret_cast(&lParam)); } // Send a message to the real Scintilla widget using the low level Scintilla // API that returns a pointer result. void *QsciScintillaBase::SendScintillaPtrResult(unsigned int msg) const { return reinterpret_cast(sci->WndProc(msg, static_cast(0), static_cast(0))); } // Re-implemented to handle the context menu. void QsciScintillaBase::contextMenuEvent(QContextMenuEvent *e) { sci->ContextMenu(QSCI_SCI_NAMESPACE(Point)(e->globalX(), e->globalY())); } // Re-implemented to tell the widget it has the focus. void QsciScintillaBase::focusInEvent(QFocusEvent *e) { sci->SetFocusState(true); #if QT_VERSION >= 0x050000 clickCausedFocus = (e->reason() == Qt::MouseFocusReason); #endif QAbstractScrollArea::focusInEvent(e); } // Re-implemented to tell the widget it has lost the focus. void QsciScintillaBase::focusOutEvent(QFocusEvent *e) { if (e->reason() == Qt::ActiveWindowFocusReason) { // Only tell Scintilla we have lost focus if the new active window // isn't our auto-completion list. This is probably only an issue on // Linux and there are still problems because subsequent focus out // events don't always seem to get generated (at least with Qt5). QWidget *aw = QApplication::activeWindow(); if (!aw || aw->parent() != this || !aw->inherits("QsciSciListBox")) sci->SetFocusState(false); } else { sci->SetFocusState(false); } QAbstractScrollArea::focusOutEvent(e); } // Re-implemented to make sure tabs are passed to the editor. bool QsciScintillaBase::focusNextPrevChild(bool next) { if (!sci->pdoc->IsReadOnly()) return false; return QAbstractScrollArea::focusNextPrevChild(next); } // Handle the selection changing. void QsciScintillaBase::handleSelection() { if (!QApplication::clipboard()->ownsSelection()) sci->UnclaimSelection(); } // Handle key presses. void QsciScintillaBase::keyPressEvent(QKeyEvent *e) { int modifiers = 0; if (e->modifiers() & Qt::ShiftModifier) modifiers |= SCMOD_SHIFT; if (e->modifiers() & Qt::ControlModifier) modifiers |= SCMOD_CTRL; if (e->modifiers() & Qt::AltModifier) modifiers |= SCMOD_ALT; if (e->modifiers() & Qt::MetaModifier) modifiers |= SCMOD_META; int key = commandKey(e->key(), modifiers); if (key) { bool consumed = false; sci->KeyDownWithModifiers(key, modifiers, &consumed); if (consumed) { e->accept(); return; } } QString text = e->text(); if (!text.isEmpty() && text[0].isPrint()) { ScintillaBytes bytes = textAsBytes(text); sci->AddCharUTF(bytes.data(), bytes.length()); e->accept(); } else { QAbstractScrollArea::keyPressEvent(e); } } // Map a Qt key to a valid Scintilla command key, or 0 if none. int QsciScintillaBase::commandKey(int qt_key, int &modifiers) { int key; switch (qt_key) { case Qt::Key_Down: key = SCK_DOWN; break; case Qt::Key_Up: key = SCK_UP; break; case Qt::Key_Left: key = SCK_LEFT; break; case Qt::Key_Right: key = SCK_RIGHT; break; case Qt::Key_Home: key = SCK_HOME; break; case Qt::Key_End: key = SCK_END; break; case Qt::Key_PageUp: key = SCK_PRIOR; break; case Qt::Key_PageDown: key = SCK_NEXT; break; case Qt::Key_Delete: key = SCK_DELETE; break; case Qt::Key_Insert: key = SCK_INSERT; break; case Qt::Key_Escape: key = SCK_ESCAPE; break; case Qt::Key_Backspace: key = SCK_BACK; break; case Qt::Key_Tab: key = SCK_TAB; break; case Qt::Key_Backtab: // Scintilla assumes a backtab is shift-tab. key = SCK_TAB; modifiers |= SCMOD_SHIFT; break; case Qt::Key_Return: case Qt::Key_Enter: key = SCK_RETURN; break; case Qt::Key_Super_L: key = SCK_WIN; break; case Qt::Key_Super_R: key = SCK_RWIN; break; case Qt::Key_Menu: key = SCK_MENU; break; default: if ((key = qt_key) > 0x7f) key = 0; } return key; } // Encode a QString as bytes. QsciScintillaBase::ScintillaBytes QsciScintillaBase::textAsBytes(const QString &text) const { if (sci->IsUnicodeMode()) return text.toUtf8(); return text.toLatin1(); } // Decode bytes as a QString. QString QsciScintillaBase::bytesAsText(const char *bytes) const { if (sci->IsUnicodeMode()) return QString::fromUtf8(bytes); return QString::fromLatin1(bytes); } // Handle a mouse button double click. void QsciScintillaBase::mouseDoubleClickEvent(QMouseEvent *e) { if (e->button() != Qt::LeftButton) { e->ignore(); return; } setFocus(); // Make sure Scintilla will interpret this as a double-click. unsigned clickTime = sci->lastClickTime + QSCI_SCI_NAMESPACE(Platform)::DoubleClickTime() - 1; bool shift = e->modifiers() & Qt::ShiftModifier; bool ctrl = e->modifiers() & Qt::ControlModifier; bool alt = e->modifiers() & Qt::AltModifier; sci->ButtonDown(QSCI_SCI_NAMESPACE(Point)(e->x(), e->y()), clickTime, shift, ctrl, alt); // Remember the current position and time in case it turns into a triple // click. triple_click_at = e->globalPos(); triple_click.start(QApplication::doubleClickInterval()); } // Handle a mouse move. void QsciScintillaBase::mouseMoveEvent(QMouseEvent *e) { sci->ButtonMove(QSCI_SCI_NAMESPACE(Point)(e->x(), e->y())); } // Handle a mouse button press. void QsciScintillaBase::mousePressEvent(QMouseEvent *e) { setFocus(); QSCI_SCI_NAMESPACE(Point) pt(e->x(), e->y()); if (e->button() == Qt::LeftButton) { unsigned clickTime; // It is a triple click if the timer is running and the mouse hasn't // moved too much. if (triple_click.isActive() && (e->globalPos() - triple_click_at).manhattanLength() < QApplication::startDragDistance()) clickTime = sci->lastClickTime + QSCI_SCI_NAMESPACE(Platform)::DoubleClickTime() - 1; else clickTime = sci->lastClickTime + QSCI_SCI_NAMESPACE(Platform)::DoubleClickTime() + 1; triple_click.stop(); // Scintilla uses the Alt modifier to initiate rectangular selection. // However the GTK port (under X11, not Windows) uses the Control // modifier (by default, although it is configurable). It does this // because most X11 window managers hijack Alt-drag to move the window. // We do the same, except that (for the moment at least) we don't allow // the modifier to be configured. bool shift = e->modifiers() & Qt::ShiftModifier; bool ctrl = e->modifiers() & Qt::ControlModifier; #if defined(Q_OS_MAC) || defined(Q_OS_WIN) bool alt = e->modifiers() & Qt::AltModifier; #else bool alt = ctrl; #endif sci->ButtonDown(pt, clickTime, shift, ctrl, alt); } else if (e->button() == Qt::MidButton) { QClipboard *cb = QApplication::clipboard(); if (cb->supportsSelection()) { int pos = sci->PositionFromLocation(pt); sci->sel.Clear(); sci->SetSelection(pos, pos); sci->pasteFromClipboard(QClipboard::Selection); } } } // Handle a mouse button releases. void QsciScintillaBase::mouseReleaseEvent(QMouseEvent *e) { if (e->button() != Qt::LeftButton) return; QSCI_SCI_NAMESPACE(Point) pt(e->x(), e->y()); if (sci->HaveMouseCapture()) { bool ctrl = e->modifiers() & Qt::ControlModifier; sci->ButtonUp(pt, 0, ctrl); } #if QT_VERSION >= 0x050000 if (!sci->pdoc->IsReadOnly() && !sci->PointInSelMargin(pt) && qApp->autoSipEnabled()) { QStyle::RequestSoftwareInputPanel rsip = QStyle::RequestSoftwareInputPanel(style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); if (!clickCausedFocus || rsip == QStyle::RSIP_OnMouseClick) qApp->inputMethod()->show(); } clickCausedFocus = false; #endif } // Handle paint events. void QsciScintillaBase::paintEvent(QPaintEvent *e) { sci->paintEvent(e); } // Handle resize events. void QsciScintillaBase::resizeEvent(QResizeEvent *) { sci->ChangeSize(); } // Re-implemented to suppress the default behaviour as Scintilla works at a // more fundamental level. Note that this means that replacing the scrollbars // with custom versions does not work. void QsciScintillaBase::scrollContentsBy(int, int) { } // Handle the vertical scrollbar. void QsciScintillaBase::handleVSb(int value) { sci->ScrollTo(value); } // Handle the horizontal scrollbar. void QsciScintillaBase::handleHSb(int value) { sci->HorizontalScrollTo(value); } // Handle drag enters. void QsciScintillaBase::dragEnterEvent(QDragEnterEvent *e) { QsciScintillaBase::dragMoveEvent(e); } // Handle drag leaves. void QsciScintillaBase::dragLeaveEvent(QDragLeaveEvent *) { sci->SetDragPosition(QSCI_SCI_NAMESPACE(SelectionPosition)()); } // Handle drag moves. void QsciScintillaBase::dragMoveEvent(QDragMoveEvent *e) { sci->SetDragPosition( sci->SPositionFromLocation( QSCI_SCI_NAMESPACE(Point)(e->pos().x(), e->pos().y()), false, false, sci->UserVirtualSpace())); acceptAction(e); } // Handle drops. void QsciScintillaBase::dropEvent(QDropEvent *e) { bool moving; int len; const char *s; bool rectangular; acceptAction(e); if (!e->isAccepted()) return; moving = (e->dropAction() == Qt::MoveAction); QByteArray text = fromMimeData(e->mimeData(), rectangular); len = text.length(); s = text.data(); std::string dest = QSCI_SCI_NAMESPACE(Document)::TransformLineEnds(s, len, sci->pdoc->eolMode); sci->DropAt(sci->posDrop, dest.c_str(), dest.length(), moving, rectangular); sci->Redraw(); } void QsciScintillaBase::acceptAction(QDropEvent *e) { if (sci->pdoc->IsReadOnly() || !canInsertFromMimeData(e->mimeData())) e->ignore(); else e->acceptProposedAction(); } // See if a MIME data object can be decoded. bool QsciScintillaBase::canInsertFromMimeData(const QMimeData *source) const { return source->hasFormat(mimeTextPlain); } // Create text from a MIME data object. QByteArray QsciScintillaBase::fromMimeData(const QMimeData *source, bool &rectangular) const { // See if it is rectangular. We try all of the different formats that // Scintilla supports in case we are working across different platforms. if (source->hasFormat(mimeRectangularWin)) rectangular = true; else if (source->hasFormat(mimeRectangular)) rectangular = true; else rectangular = false; // Note that we don't support Scintilla's hack of adding a '\0' as Qt // strips it off under the covers when pasting from another process. QString utf8 = source->text(); QByteArray text; if (sci->IsUnicodeMode()) text = utf8.toUtf8(); else text = utf8.toLatin1(); return text; } // Create a MIME data object for some text. QMimeData *QsciScintillaBase::toMimeData(const QByteArray &text, bool rectangular) const { QMimeData *mime = new QMimeData; QString utf8; if (sci->IsUnicodeMode()) utf8 = QString::fromUtf8(text.constData(), text.size()); else utf8 = QString::fromLatin1(text.constData(), text.size()); mime->setText(utf8); if (rectangular) { // Use the platform specific "standard" for specifying a rectangular // selection. #if defined(Q_OS_WIN) mime->setData(mimeRectangularWin, QByteArray()); #else mime->setData(mimeRectangular, QByteArray()); #endif } return mime; } // Connect up the vertical scroll bar. void QsciScintillaBase::connectVerticalScrollBar() { connect(verticalScrollBar(), SIGNAL(valueChanged(int)), SLOT(handleVSb(int))); } // Connect up the horizontal scroll bar. void QsciScintillaBase::connectHorizontalScrollBar() { connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), SLOT(handleHSb(int))); } //! Replace the vertical scroll bar. void QsciScintillaBase::replaceVerticalScrollBar(QScrollBar *scrollBar) { setVerticalScrollBar(scrollBar); connectVerticalScrollBar(); } // Replace the horizontal scroll bar. void QsciScintillaBase::replaceHorizontalScrollBar(QScrollBar *scrollBar) { setHorizontalScrollBar(scrollBar); connectHorizontalScrollBar(); } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscistyle.cpp000066400000000000000000000115221345112435200233660ustar00rootroot00000000000000// This module implements the QsciStyle class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscistyle.h" #include #include "Qsci/qsciscintillabase.h" // A ctor. QsciStyle::QsciStyle(int style) { init(style); QPalette pal = QApplication::palette(); setColor(pal.text().color()); setPaper(pal.base().color()); setFont(QApplication::font()); setEolFill(false); } // A ctor. QsciStyle::QsciStyle(int style, const QString &description, const QColor &color, const QColor &paper, const QFont &font, bool eolFill) { init(style); setDescription(description); setColor(color); setPaper(paper); setFont(font); setEolFill(eolFill); } // Initialisation common to all ctors. void QsciStyle::init(int style) { // The next style number to allocate. The initial values corresponds to // the amount of space that Scintilla initially creates for styles. static int next_style_nr = 63; // See if a new style should be allocated. Note that we allow styles to be // passed in that are bigger than STYLE_MAX because the styles used for // annotations are allowed to be. if (style < 0) { // Note that we don't deal with the situation where the newly allocated // style number has already been used explicitly. if (next_style_nr > QsciScintillaBase::STYLE_LASTPREDEFINED) style = next_style_nr--; } style_nr = style; // Initialise the minor attributes. setTextCase(QsciStyle::OriginalCase); setVisible(true); setChangeable(true); setHotspot(false); } // Apply the style to a particular editor. void QsciStyle::apply(QsciScintillaBase *sci) const { sci->SendScintilla(QsciScintillaBase::SCI_STYLESETFORE, style_nr, style_color); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETBACK, style_nr, style_paper); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETFONT, style_nr, style_font.family().toLatin1().data()); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETSIZEFRACTIONAL, style_nr, long(style_font.pointSizeF() * QsciScintillaBase::SC_FONT_SIZE_MULTIPLIER)); // Pass the Qt weight via the back door. sci->SendScintilla(QsciScintillaBase::SCI_STYLESETWEIGHT, style_nr, -style_font.weight()); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETITALIC, style_nr, style_font.italic()); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETUNDERLINE, style_nr, style_font.underline()); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETEOLFILLED, style_nr, style_eol_fill); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETCASE, style_nr, (long)style_case); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETVISIBLE, style_nr, style_visible); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETCHANGEABLE, style_nr, style_changeable); sci->SendScintilla(QsciScintillaBase::SCI_STYLESETHOTSPOT, style_nr, style_hotspot); } // Set the color attribute. void QsciStyle::setColor(const QColor &color) { style_color = color; } // Set the paper attribute. void QsciStyle::setPaper(const QColor &paper) { style_paper = paper; } // Set the font attribute. void QsciStyle::setFont(const QFont &font) { style_font = font; } // Set the eol fill attribute. void QsciStyle::setEolFill(bool eolFill) { style_eol_fill = eolFill; } // Set the text case attribute. void QsciStyle::setTextCase(QsciStyle::TextCase text_case) { style_case = text_case; } // Set the visible attribute. void QsciStyle::setVisible(bool visible) { style_visible = visible; } // Set the changeable attribute. void QsciStyle::setChangeable(bool changeable) { style_changeable = changeable; } // Set the hotspot attribute. void QsciStyle::setHotspot(bool hotspot) { style_hotspot = hotspot; } // Refresh the style. Note that since we had to add apply() then this can't do // anything useful so we leave it as a no-op. void QsciStyle::refresh() { } sqlitebrowser-3.11.2/libs/qscintilla/Qt4Qt5/qscistyledtext.cpp000066400000000000000000000031241345112435200244360ustar00rootroot00000000000000// This module implements the QsciStyledText class. // // Copyright (c) 2017 Riverbank Computing Limited // // This file is part of QScintilla. // // This file may be used under the terms of the GNU General Public License // version 3.0 as published by the Free Software Foundation and appearing in // the file LICENSE included in the packaging of this file. Please review the // following information to ensure the GNU General Public License version 3.0 // requirements will be met: http://www.gnu.org/copyleft/gpl.html. // // If you do not wish to use this file under the terms of the GPL version 3.0 // then you may purchase a commercial license. For more information contact // info@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. #include "Qsci/qscistyledtext.h" #include "Qsci/qsciscintillabase.h" #include "Qsci/qscistyle.h" // A ctor. QsciStyledText::QsciStyledText(const QString &text, int style) : styled_text(text), style_nr(style), explicit_style(0) { } // A ctor. QsciStyledText::QsciStyledText(const QString &text, const QsciStyle &style) : styled_text(text), style_nr(-1) { explicit_style = new QsciStyle(style); } // Return the number of the style. int QsciStyledText::style() const { return explicit_style ? explicit_style->style() : style_nr; } // Apply any explicit style to an editor. void QsciStyledText::apply(QsciScintillaBase *sci) const { if (explicit_style) explicit_style->apply(sci); } sqlitebrowser-3.11.2/libs/qscintilla/README000066400000000000000000000002131345112435200204530ustar00rootroot00000000000000All the documentation for QScintilla for Qt v4 and Qt v5 (including installation instructions) can be found in doc/html-Qt4Qt5/index.html. sqlitebrowser-3.11.2/libs/qscintilla/include/000077500000000000000000000000001345112435200212225ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qscintilla/include/ILexer.h000066400000000000000000000101171345112435200225630ustar00rootroot00000000000000// Scintilla source code edit control /** @file ILexer.h ** Interface between Scintilla and lexers. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef ILEXER_H #define ILEXER_H #include "Sci_Position.h" #ifdef SCI_NAMESPACE namespace Scintilla { #endif #ifdef _WIN32 #define SCI_METHOD __stdcall #else #define SCI_METHOD #endif enum { dvOriginal=0, dvLineEnd=1 }; class IDocument { public: virtual int SCI_METHOD Version() const = 0; virtual void SCI_METHOD SetErrorStatus(int status) = 0; virtual Sci_Position SCI_METHOD Length() const = 0; virtual void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const = 0; virtual char SCI_METHOD StyleAt(Sci_Position position) const = 0; virtual Sci_Position SCI_METHOD LineFromPosition(Sci_Position position) const = 0; virtual Sci_Position SCI_METHOD LineStart(Sci_Position line) const = 0; virtual int SCI_METHOD GetLevel(Sci_Position line) const = 0; virtual int SCI_METHOD SetLevel(Sci_Position line, int level) = 0; virtual int SCI_METHOD GetLineState(Sci_Position line) const = 0; virtual int SCI_METHOD SetLineState(Sci_Position line, int state) = 0; virtual void SCI_METHOD StartStyling(Sci_Position position, char mask) = 0; virtual bool SCI_METHOD SetStyleFor(Sci_Position length, char style) = 0; virtual bool SCI_METHOD SetStyles(Sci_Position length, const char *styles) = 0; virtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = 0; virtual void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) = 0; virtual void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) = 0; virtual int SCI_METHOD CodePage() const = 0; virtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = 0; virtual const char * SCI_METHOD BufferPointer() = 0; virtual int SCI_METHOD GetLineIndentation(Sci_Position line) = 0; }; class IDocumentWithLineEnd : public IDocument { public: virtual Sci_Position SCI_METHOD LineEnd(Sci_Position line) const = 0; virtual Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const = 0; virtual int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const = 0; }; enum { lvOriginal=0, lvSubStyles=1 }; class ILexer { public: virtual int SCI_METHOD Version() const = 0; virtual void SCI_METHOD Release() = 0; virtual const char * SCI_METHOD PropertyNames() = 0; virtual int SCI_METHOD PropertyType(const char *name) = 0; virtual const char * SCI_METHOD DescribeProperty(const char *name) = 0; virtual Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) = 0; virtual const char * SCI_METHOD DescribeWordListSets() = 0; virtual Sci_Position SCI_METHOD WordListSet(int n, const char *wl) = 0; virtual void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; virtual void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; virtual void * SCI_METHOD PrivateCall(int operation, void *pointer) = 0; }; class ILexerWithSubStyles : public ILexer { public: virtual int SCI_METHOD LineEndTypesSupported() = 0; virtual int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) = 0; virtual int SCI_METHOD SubStylesStart(int styleBase) = 0; virtual int SCI_METHOD SubStylesLength(int styleBase) = 0; virtual int SCI_METHOD StyleFromSubStyle(int subStyle) = 0; virtual int SCI_METHOD PrimaryStyleFromStyle(int style) = 0; virtual void SCI_METHOD FreeSubStyles() = 0; virtual void SCI_METHOD SetIdentifiers(int style, const char *identifiers) = 0; virtual int SCI_METHOD DistanceToSecondaryStyles() = 0; virtual const char * SCI_METHOD GetSubStyleBases() = 0; }; class ILoader { public: virtual int SCI_METHOD Release() = 0; // Returns a status code from SC_STATUS_* virtual int SCI_METHOD AddData(char *data, Sci_Position length) = 0; virtual void * SCI_METHOD ConvertToDocument() = 0; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/include/License.txt000066400000000000000000000015441345112435200233510ustar00rootroot00000000000000License for Scintilla and SciTE Copyright 1998-2003 by Neil Hodgson All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. sqlitebrowser-3.11.2/libs/qscintilla/include/Platform.h000066400000000000000000000350371345112435200231670ustar00rootroot00000000000000// Scintilla source code edit control /** @file Platform.h ** Interface to platform facilities. Also includes some basic utilities. ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. **/ // Copyright 1998-2009 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef PLATFORM_H #define PLATFORM_H // PLAT_GTK = GTK+ on Linux or Win32 // PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 // PLAT_WIN = Win32 API on Win32 OS // PLAT_WX is wxWindows on any supported platform // PLAT_TK = Tcl/TK on Linux or Win32 #define PLAT_GTK 0 #define PLAT_GTK_WIN32 0 #define PLAT_GTK_MACOSX 0 #define PLAT_MACOSX 0 #define PLAT_WIN 0 #define PLAT_WX 0 #define PLAT_QT 0 #define PLAT_FOX 0 #define PLAT_CURSES 0 #define PLAT_TK 0 #if defined(FOX) #undef PLAT_FOX #define PLAT_FOX 1 #elif defined(__WX__) #undef PLAT_WX #define PLAT_WX 1 #elif defined(CURSES) #undef PLAT_CURSES #define PLAT_CURSES 1 #elif defined(SCINTILLA_QT) #undef PLAT_QT #define PLAT_QT 1 #include QT_BEGIN_NAMESPACE class QPainter; QT_END_NAMESPACE // This is needed to work around an HP-UX bug with Qt4. #include #elif defined(TK) #undef PLAT_TK #define PLAT_TK 1 #elif defined(GTK) #undef PLAT_GTK #define PLAT_GTK 1 #if defined(__WIN32__) || defined(_MSC_VER) #undef PLAT_GTK_WIN32 #define PLAT_GTK_WIN32 1 #endif #if defined(__APPLE__) #undef PLAT_GTK_MACOSX #define PLAT_GTK_MACOSX 1 #endif #elif defined(__APPLE__) #undef PLAT_MACOSX #define PLAT_MACOSX 1 #else #undef PLAT_WIN #define PLAT_WIN 1 #endif #ifdef SCI_NAMESPACE namespace Scintilla { #endif typedef float XYPOSITION; typedef double XYACCUMULATOR; inline int RoundXYPosition(XYPOSITION xyPos) { return int(xyPos + 0.5); } // Underlying the implementation of the platform classes are platform specific types. // Sometimes these need to be passed around by client code so they are defined here typedef void *FontID; typedef void *SurfaceID; typedef void *WindowID; typedef void *MenuID; typedef void *TickerID; typedef void *Function; typedef void *IdlerID; /** * A geometric point class. * Point is similar to the Win32 POINT and GTK+ GdkPoint types. */ class Point { public: XYPOSITION x; XYPOSITION y; explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) : x(x_), y(y_) { } static Point FromInts(int x_, int y_) { return Point(static_cast(x_), static_cast(y_)); } // Other automatically defined methods (assignment, copy constructor, destructor) are fine static Point FromLong(long lpoint); }; /** * A geometric rectangle class. * PRectangle is similar to the Win32 RECT. * PRectangles contain their top and left sides, but not their right and bottom sides. */ class PRectangle { public: XYPOSITION left; XYPOSITION top; XYPOSITION right; XYPOSITION bottom; explicit PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) : left(left_), top(top_), right(right_), bottom(bottom_) { } static PRectangle FromInts(int left_, int top_, int right_, int bottom_) { return PRectangle(static_cast(left_), static_cast(top_), static_cast(right_), static_cast(bottom_)); } // Other automatically defined methods (assignment, copy constructor, destructor) are fine bool operator==(PRectangle &rc) const { return (rc.left == left) && (rc.right == right) && (rc.top == top) && (rc.bottom == bottom); } bool Contains(Point pt) const { return (pt.x >= left) && (pt.x <= right) && (pt.y >= top) && (pt.y <= bottom); } bool ContainsWholePixel(Point pt) const { // Does the rectangle contain all of the pixel to left/below the point return (pt.x >= left) && ((pt.x+1) <= right) && (pt.y >= top) && ((pt.y+1) <= bottom); } bool Contains(PRectangle rc) const { return (rc.left >= left) && (rc.right <= right) && (rc.top >= top) && (rc.bottom <= bottom); } bool Intersects(PRectangle other) const { return (right > other.left) && (left < other.right) && (bottom > other.top) && (top < other.bottom); } void Move(XYPOSITION xDelta, XYPOSITION yDelta) { left += xDelta; top += yDelta; right += xDelta; bottom += yDelta; } XYPOSITION Width() const { return right - left; } XYPOSITION Height() const { return bottom - top; } bool Empty() const { return (Height() <= 0) || (Width() <= 0); } }; /** * Holds a desired RGB colour. */ class ColourDesired { long co; public: ColourDesired(long lcol=0) { co = lcol; } ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { Set(red, green, blue); } bool operator==(const ColourDesired &other) const { return co == other.co; } void Set(long lcol) { co = lcol; } void Set(unsigned int red, unsigned int green, unsigned int blue) { co = red | (green << 8) | (blue << 16); } static inline unsigned int ValueOfHex(const char ch) { if (ch >= '0' && ch <= '9') return ch - '0'; else if (ch >= 'A' && ch <= 'F') return ch - 'A' + 10; else if (ch >= 'a' && ch <= 'f') return ch - 'a' + 10; else return 0; } void Set(const char *val) { if (*val == '#') { val++; } unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); Set(r, g, b); } long AsLong() const { return co; } unsigned int GetRed() const { return co & 0xff; } unsigned int GetGreen() const { return (co >> 8) & 0xff; } unsigned int GetBlue() const { return (co >> 16) & 0xff; } }; /** * Font management. */ struct FontParameters { const char *faceName; float size; int weight; bool italic; int extraFontFlag; int technology; int characterSet; FontParameters( const char *faceName_, float size_=10, int weight_=400, bool italic_=false, int extraFontFlag_=0, int technology_=0, int characterSet_=0) : faceName(faceName_), size(size_), weight(weight_), italic(italic_), extraFontFlag(extraFontFlag_), technology(technology_), characterSet(characterSet_) { } }; class Font { protected: FontID fid; // Private so Font objects can not be copied Font(const Font &); Font &operator=(const Font &); public: Font(); virtual ~Font(); virtual void Create(const FontParameters &fp); virtual void Release(); FontID GetID() { return fid; } // Alias another font - caller guarantees not to Release void SetID(FontID fid_) { fid = fid_; } friend class Surface; friend class SurfaceImpl; }; /** * A surface abstracts a place to draw. */ #if defined(PLAT_QT) class XPM; #endif class Surface { private: // Private so Surface objects can not be copied Surface(const Surface &) {} Surface &operator=(const Surface &) { return *this; } public: Surface() {} virtual ~Surface() {} static Surface *Allocate(int technology); virtual void Init(WindowID wid)=0; virtual void Init(SurfaceID sid, WindowID wid)=0; virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; virtual void Release()=0; virtual bool Initialised()=0; virtual void PenColour(ColourDesired fore)=0; virtual int LogPixelsY()=0; virtual int DeviceHeightFont(int points)=0; virtual void MoveTo(int x_, int y_)=0; virtual void LineTo(int x_, int y_)=0; virtual void Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back)=0; virtual void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back)=0; virtual void FillRectangle(PRectangle rc, ColourDesired back)=0; virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; virtual void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back)=0; virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill, ColourDesired outline, int alphaOutline, int flags)=0; virtual void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) = 0; virtual void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back)=0; virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; virtual void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0; virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0; virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore)=0; virtual void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions)=0; virtual XYPOSITION WidthText(Font &font_, const char *s, int len)=0; virtual XYPOSITION WidthChar(Font &font_, char ch)=0; virtual XYPOSITION Ascent(Font &font_)=0; virtual XYPOSITION Descent(Font &font_)=0; virtual XYPOSITION InternalLeading(Font &font_)=0; virtual XYPOSITION ExternalLeading(Font &font_)=0; virtual XYPOSITION Height(Font &font_)=0; virtual XYPOSITION AverageCharWidth(Font &font_)=0; virtual void SetClip(PRectangle rc)=0; virtual void FlushCachedState()=0; virtual void SetUnicodeMode(bool unicodeMode_)=0; virtual void SetDBCSMode(int codePage)=0; #if defined(PLAT_QT) virtual void Init(QPainter *p)=0; virtual void DrawXPM(PRectangle rc, const XPM *xpm)=0; #endif }; /** * A simple callback action passing one piece of untyped user data. */ typedef void (*CallBackAction)(void*); /** * Class to hide the details of window manipulation. * Does not own the window which will normally have a longer life than this object. */ class Window { protected: WindowID wid; public: Window() : wid(0), cursorLast(cursorInvalid) { } Window(const Window &source) : wid(source.wid), cursorLast(cursorInvalid) { } virtual ~Window(); Window &operator=(WindowID wid_) { wid = wid_; return *this; } WindowID GetID() const { return wid; } bool Created() const { return wid != 0; } void Destroy(); bool HasFocus(); PRectangle GetPosition(); void SetPosition(PRectangle rc); void SetPositionRelative(PRectangle rc, Window relativeTo); PRectangle GetClientPosition(); void Show(bool show=true); void InvalidateAll(); void InvalidateRectangle(PRectangle rc); virtual void SetFont(Font &font); enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; void SetCursor(Cursor curs); void SetTitle(const char *s); PRectangle GetMonitorRect(Point pt); private: Cursor cursorLast; }; /** * Listbox management. */ class ListBox : public Window { public: ListBox(); virtual ~ListBox(); static ListBox *Allocate(); virtual void SetFont(Font &font)=0; virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_, int technology_)=0; virtual void SetAverageCharWidth(int width)=0; virtual void SetVisibleRows(int rows)=0; virtual int GetVisibleRows() const=0; virtual PRectangle GetDesiredRect()=0; virtual int CaretFromEdge()=0; virtual void Clear()=0; virtual void Append(char *s, int type = -1)=0; virtual int Length()=0; virtual void Select(int n)=0; virtual int GetSelection()=0; virtual int Find(const char *prefix)=0; virtual void GetValue(int n, char *value, int len)=0; virtual void RegisterImage(int type, const char *xpm_data)=0; virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) = 0; virtual void ClearRegisteredImages()=0; virtual void SetDoubleClickAction(CallBackAction, void *)=0; virtual void SetList(const char* list, char separator, char typesep)=0; }; /** * Menu management. */ class Menu { MenuID mid; public: Menu(); MenuID GetID() { return mid; } void CreatePopUp(); void Destroy(); void Show(Point pt, Window &w); }; class ElapsedTime { long bigBit; long littleBit; public: ElapsedTime(); double Duration(bool reset=false); }; /** * Dynamic Library (DLL/SO/...) loading */ class DynamicLibrary { public: virtual ~DynamicLibrary() {} /// @return Pointer to function "name", or NULL on failure. virtual Function FindFunction(const char *name) = 0; /// @return true if the library was loaded successfully. virtual bool IsValid() = 0; /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. static DynamicLibrary *Load(const char *modulePath); }; #if defined(__clang__) # if __has_feature(attribute_analyzer_noreturn) # define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) # else # define CLANG_ANALYZER_NORETURN # endif #else # define CLANG_ANALYZER_NORETURN #endif /** * Platform class used to retrieve system wide parameters such as double click speed * and chrome colour. Not a creatable object, more of a module with several functions. */ class Platform { // Private so Platform objects can not be copied Platform(const Platform &) {} Platform &operator=(const Platform &) { return *this; } public: // Should be private because no new Platforms are ever created // but gcc warns about this Platform() {} ~Platform() {} static ColourDesired Chrome(); static ColourDesired ChromeHighlight(); static const char *DefaultFont(); static int DefaultFontSize(); static unsigned int DoubleClickTime(); static bool MouseButtonBounce(); static void DebugDisplay(const char *s); static bool IsKeyDown(int key); static long SendScintilla( WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0); static long SendScintillaPointer( WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); static bool IsDBCSLeadByte(int codePage, char ch); static int DBCSCharLength(int codePage, const char *s); static int DBCSCharMaxLength(); // These are utility functions not really tied to a platform static int Minimum(int a, int b); static int Maximum(int a, int b); // Next three assume 16 bit shorts and 32 bit longs static long LongFromTwoShorts(short a,short b) { return (a) | ((b) << 16); } static short HighShortFromLong(long x) { return static_cast(x >> 16); } static short LowShortFromLong(long x) { return static_cast(x & 0xffff); } static void DebugPrintf(const char *format, ...); static bool ShowAssertionPopUps(bool assertionPopUps_); static void Assert(const char *c, const char *file, int line) CLANG_ANALYZER_NORETURN; static int Clamp(int val, int minVal, int maxVal); }; #ifdef NDEBUG #define PLATFORM_ASSERT(c) ((void)0) #else #ifdef SCI_NAMESPACE #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__)) #else #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) #endif #endif #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/include/SciLexer.h000066400000000000000000001445641345112435200231270ustar00rootroot00000000000000/* Scintilla source code edit control */ /** @file SciLexer.h ** Interface to the added lexer functions in the SciLexer version of the edit control. **/ /* Copyright 1998-2002 by Neil Hodgson * The License.txt file describes the conditions under which this software may be distributed. */ /* Most of this file is automatically generated from the Scintilla.iface interface definition * file which contains any comments about the definitions. HFacer.py does the generation. */ #ifndef SCILEXER_H #define SCILEXER_H /* SciLexer features - not in standard Scintilla */ /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ #define SCLEX_CONTAINER 0 #define SCLEX_NULL 1 #define SCLEX_PYTHON 2 #define SCLEX_CPP 3 #define SCLEX_HTML 4 #define SCLEX_XML 5 #define SCLEX_PERL 6 #define SCLEX_SQL 7 #define SCLEX_VB 8 #define SCLEX_PROPERTIES 9 #define SCLEX_ERRORLIST 10 #define SCLEX_MAKEFILE 11 #define SCLEX_BATCH 12 #define SCLEX_XCODE 13 #define SCLEX_LATEX 14 #define SCLEX_LUA 15 #define SCLEX_DIFF 16 #define SCLEX_CONF 17 #define SCLEX_PASCAL 18 #define SCLEX_AVE 19 #define SCLEX_ADA 20 #define SCLEX_LISP 21 #define SCLEX_RUBY 22 #define SCLEX_EIFFEL 23 #define SCLEX_EIFFELKW 24 #define SCLEX_TCL 25 #define SCLEX_NNCRONTAB 26 #define SCLEX_BULLANT 27 #define SCLEX_VBSCRIPT 28 #define SCLEX_BAAN 31 #define SCLEX_MATLAB 32 #define SCLEX_SCRIPTOL 33 #define SCLEX_ASM 34 #define SCLEX_CPPNOCASE 35 #define SCLEX_FORTRAN 36 #define SCLEX_F77 37 #define SCLEX_CSS 38 #define SCLEX_POV 39 #define SCLEX_LOUT 40 #define SCLEX_ESCRIPT 41 #define SCLEX_PS 42 #define SCLEX_NSIS 43 #define SCLEX_MMIXAL 44 #define SCLEX_CLW 45 #define SCLEX_CLWNOCASE 46 #define SCLEX_LOT 47 #define SCLEX_YAML 48 #define SCLEX_TEX 49 #define SCLEX_METAPOST 50 #define SCLEX_POWERBASIC 51 #define SCLEX_FORTH 52 #define SCLEX_ERLANG 53 #define SCLEX_OCTAVE 54 #define SCLEX_MSSQL 55 #define SCLEX_VERILOG 56 #define SCLEX_KIX 57 #define SCLEX_GUI4CLI 58 #define SCLEX_SPECMAN 59 #define SCLEX_AU3 60 #define SCLEX_APDL 61 #define SCLEX_BASH 62 #define SCLEX_ASN1 63 #define SCLEX_VHDL 64 #define SCLEX_CAML 65 #define SCLEX_BLITZBASIC 66 #define SCLEX_PUREBASIC 67 #define SCLEX_HASKELL 68 #define SCLEX_PHPSCRIPT 69 #define SCLEX_TADS3 70 #define SCLEX_REBOL 71 #define SCLEX_SMALLTALK 72 #define SCLEX_FLAGSHIP 73 #define SCLEX_CSOUND 74 #define SCLEX_FREEBASIC 75 #define SCLEX_INNOSETUP 76 #define SCLEX_OPAL 77 #define SCLEX_SPICE 78 #define SCLEX_D 79 #define SCLEX_CMAKE 80 #define SCLEX_GAP 81 #define SCLEX_PLM 82 #define SCLEX_PROGRESS 83 #define SCLEX_ABAQUS 84 #define SCLEX_ASYMPTOTE 85 #define SCLEX_R 86 #define SCLEX_MAGIK 87 #define SCLEX_POWERSHELL 88 #define SCLEX_MYSQL 89 #define SCLEX_PO 90 #define SCLEX_TAL 91 #define SCLEX_COBOL 92 #define SCLEX_TACL 93 #define SCLEX_SORCUS 94 #define SCLEX_POWERPRO 95 #define SCLEX_NIMROD 96 #define SCLEX_SML 97 #define SCLEX_MARKDOWN 98 #define SCLEX_TXT2TAGS 99 #define SCLEX_A68K 100 #define SCLEX_MODULA 101 #define SCLEX_COFFEESCRIPT 102 #define SCLEX_TCMD 103 #define SCLEX_AVS 104 #define SCLEX_ECL 105 #define SCLEX_OSCRIPT 106 #define SCLEX_VISUALPROLOG 107 #define SCLEX_LITERATEHASKELL 108 #define SCLEX_STTXT 109 #define SCLEX_KVIRC 110 #define SCLEX_RUST 111 #define SCLEX_DMAP 112 #define SCLEX_AS 113 #define SCLEX_DMIS 114 #define SCLEX_REGISTRY 115 #define SCLEX_BIBTEX 116 #define SCLEX_SREC 117 #define SCLEX_IHEX 118 #define SCLEX_TEHEX 119 #define SCLEX_JSON 120 #define SCLEX_EDIFACT 121 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 #define SCE_P_COMMENTLINE 1 #define SCE_P_NUMBER 2 #define SCE_P_STRING 3 #define SCE_P_CHARACTER 4 #define SCE_P_WORD 5 #define SCE_P_TRIPLE 6 #define SCE_P_TRIPLEDOUBLE 7 #define SCE_P_CLASSNAME 8 #define SCE_P_DEFNAME 9 #define SCE_P_OPERATOR 10 #define SCE_P_IDENTIFIER 11 #define SCE_P_COMMENTBLOCK 12 #define SCE_P_STRINGEOL 13 #define SCE_P_WORD2 14 #define SCE_P_DECORATOR 15 #define SCE_C_DEFAULT 0 #define SCE_C_COMMENT 1 #define SCE_C_COMMENTLINE 2 #define SCE_C_COMMENTDOC 3 #define SCE_C_NUMBER 4 #define SCE_C_WORD 5 #define SCE_C_STRING 6 #define SCE_C_CHARACTER 7 #define SCE_C_UUID 8 #define SCE_C_PREPROCESSOR 9 #define SCE_C_OPERATOR 10 #define SCE_C_IDENTIFIER 11 #define SCE_C_STRINGEOL 12 #define SCE_C_VERBATIM 13 #define SCE_C_REGEX 14 #define SCE_C_COMMENTLINEDOC 15 #define SCE_C_WORD2 16 #define SCE_C_COMMENTDOCKEYWORD 17 #define SCE_C_COMMENTDOCKEYWORDERROR 18 #define SCE_C_GLOBALCLASS 19 #define SCE_C_STRINGRAW 20 #define SCE_C_TRIPLEVERBATIM 21 #define SCE_C_HASHQUOTEDSTRING 22 #define SCE_C_PREPROCESSORCOMMENT 23 #define SCE_C_PREPROCESSORCOMMENTDOC 24 #define SCE_C_USERLITERAL 25 #define SCE_C_TASKMARKER 26 #define SCE_C_ESCAPESEQUENCE 27 #define SCE_D_DEFAULT 0 #define SCE_D_COMMENT 1 #define SCE_D_COMMENTLINE 2 #define SCE_D_COMMENTDOC 3 #define SCE_D_COMMENTNESTED 4 #define SCE_D_NUMBER 5 #define SCE_D_WORD 6 #define SCE_D_WORD2 7 #define SCE_D_WORD3 8 #define SCE_D_TYPEDEF 9 #define SCE_D_STRING 10 #define SCE_D_STRINGEOL 11 #define SCE_D_CHARACTER 12 #define SCE_D_OPERATOR 13 #define SCE_D_IDENTIFIER 14 #define SCE_D_COMMENTLINEDOC 15 #define SCE_D_COMMENTDOCKEYWORD 16 #define SCE_D_COMMENTDOCKEYWORDERROR 17 #define SCE_D_STRINGB 18 #define SCE_D_STRINGR 19 #define SCE_D_WORD5 20 #define SCE_D_WORD6 21 #define SCE_D_WORD7 22 #define SCE_TCL_DEFAULT 0 #define SCE_TCL_COMMENT 1 #define SCE_TCL_COMMENTLINE 2 #define SCE_TCL_NUMBER 3 #define SCE_TCL_WORD_IN_QUOTE 4 #define SCE_TCL_IN_QUOTE 5 #define SCE_TCL_OPERATOR 6 #define SCE_TCL_IDENTIFIER 7 #define SCE_TCL_SUBSTITUTION 8 #define SCE_TCL_SUB_BRACE 9 #define SCE_TCL_MODIFIER 10 #define SCE_TCL_EXPAND 11 #define SCE_TCL_WORD 12 #define SCE_TCL_WORD2 13 #define SCE_TCL_WORD3 14 #define SCE_TCL_WORD4 15 #define SCE_TCL_WORD5 16 #define SCE_TCL_WORD6 17 #define SCE_TCL_WORD7 18 #define SCE_TCL_WORD8 19 #define SCE_TCL_COMMENT_BOX 20 #define SCE_TCL_BLOCK_COMMENT 21 #define SCE_H_DEFAULT 0 #define SCE_H_TAG 1 #define SCE_H_TAGUNKNOWN 2 #define SCE_H_ATTRIBUTE 3 #define SCE_H_ATTRIBUTEUNKNOWN 4 #define SCE_H_NUMBER 5 #define SCE_H_DOUBLESTRING 6 #define SCE_H_SINGLESTRING 7 #define SCE_H_OTHER 8 #define SCE_H_COMMENT 9 #define SCE_H_ENTITY 10 #define SCE_H_TAGEND 11 #define SCE_H_XMLSTART 12 #define SCE_H_XMLEND 13 #define SCE_H_SCRIPT 14 #define SCE_H_ASP 15 #define SCE_H_ASPAT 16 #define SCE_H_CDATA 17 #define SCE_H_QUESTION 18 #define SCE_H_VALUE 19 #define SCE_H_XCCOMMENT 20 #define SCE_H_SGML_DEFAULT 21 #define SCE_H_SGML_COMMAND 22 #define SCE_H_SGML_1ST_PARAM 23 #define SCE_H_SGML_DOUBLESTRING 24 #define SCE_H_SGML_SIMPLESTRING 25 #define SCE_H_SGML_ERROR 26 #define SCE_H_SGML_SPECIAL 27 #define SCE_H_SGML_ENTITY 28 #define SCE_H_SGML_COMMENT 29 #define SCE_H_SGML_1ST_PARAM_COMMENT 30 #define SCE_H_SGML_BLOCK_DEFAULT 31 #define SCE_HJ_START 40 #define SCE_HJ_DEFAULT 41 #define SCE_HJ_COMMENT 42 #define SCE_HJ_COMMENTLINE 43 #define SCE_HJ_COMMENTDOC 44 #define SCE_HJ_NUMBER 45 #define SCE_HJ_WORD 46 #define SCE_HJ_KEYWORD 47 #define SCE_HJ_DOUBLESTRING 48 #define SCE_HJ_SINGLESTRING 49 #define SCE_HJ_SYMBOLS 50 #define SCE_HJ_STRINGEOL 51 #define SCE_HJ_REGEX 52 #define SCE_HJA_START 55 #define SCE_HJA_DEFAULT 56 #define SCE_HJA_COMMENT 57 #define SCE_HJA_COMMENTLINE 58 #define SCE_HJA_COMMENTDOC 59 #define SCE_HJA_NUMBER 60 #define SCE_HJA_WORD 61 #define SCE_HJA_KEYWORD 62 #define SCE_HJA_DOUBLESTRING 63 #define SCE_HJA_SINGLESTRING 64 #define SCE_HJA_SYMBOLS 65 #define SCE_HJA_STRINGEOL 66 #define SCE_HJA_REGEX 67 #define SCE_HB_START 70 #define SCE_HB_DEFAULT 71 #define SCE_HB_COMMENTLINE 72 #define SCE_HB_NUMBER 73 #define SCE_HB_WORD 74 #define SCE_HB_STRING 75 #define SCE_HB_IDENTIFIER 76 #define SCE_HB_STRINGEOL 77 #define SCE_HBA_START 80 #define SCE_HBA_DEFAULT 81 #define SCE_HBA_COMMENTLINE 82 #define SCE_HBA_NUMBER 83 #define SCE_HBA_WORD 84 #define SCE_HBA_STRING 85 #define SCE_HBA_IDENTIFIER 86 #define SCE_HBA_STRINGEOL 87 #define SCE_HP_START 90 #define SCE_HP_DEFAULT 91 #define SCE_HP_COMMENTLINE 92 #define SCE_HP_NUMBER 93 #define SCE_HP_STRING 94 #define SCE_HP_CHARACTER 95 #define SCE_HP_WORD 96 #define SCE_HP_TRIPLE 97 #define SCE_HP_TRIPLEDOUBLE 98 #define SCE_HP_CLASSNAME 99 #define SCE_HP_DEFNAME 100 #define SCE_HP_OPERATOR 101 #define SCE_HP_IDENTIFIER 102 #define SCE_HPHP_COMPLEX_VARIABLE 104 #define SCE_HPA_START 105 #define SCE_HPA_DEFAULT 106 #define SCE_HPA_COMMENTLINE 107 #define SCE_HPA_NUMBER 108 #define SCE_HPA_STRING 109 #define SCE_HPA_CHARACTER 110 #define SCE_HPA_WORD 111 #define SCE_HPA_TRIPLE 112 #define SCE_HPA_TRIPLEDOUBLE 113 #define SCE_HPA_CLASSNAME 114 #define SCE_HPA_DEFNAME 115 #define SCE_HPA_OPERATOR 116 #define SCE_HPA_IDENTIFIER 117 #define SCE_HPHP_DEFAULT 118 #define SCE_HPHP_HSTRING 119 #define SCE_HPHP_SIMPLESTRING 120 #define SCE_HPHP_WORD 121 #define SCE_HPHP_NUMBER 122 #define SCE_HPHP_VARIABLE 123 #define SCE_HPHP_COMMENT 124 #define SCE_HPHP_COMMENTLINE 125 #define SCE_HPHP_HSTRING_VARIABLE 126 #define SCE_HPHP_OPERATOR 127 #define SCE_PL_DEFAULT 0 #define SCE_PL_ERROR 1 #define SCE_PL_COMMENTLINE 2 #define SCE_PL_POD 3 #define SCE_PL_NUMBER 4 #define SCE_PL_WORD 5 #define SCE_PL_STRING 6 #define SCE_PL_CHARACTER 7 #define SCE_PL_PUNCTUATION 8 #define SCE_PL_PREPROCESSOR 9 #define SCE_PL_OPERATOR 10 #define SCE_PL_IDENTIFIER 11 #define SCE_PL_SCALAR 12 #define SCE_PL_ARRAY 13 #define SCE_PL_HASH 14 #define SCE_PL_SYMBOLTABLE 15 #define SCE_PL_VARIABLE_INDEXER 16 #define SCE_PL_REGEX 17 #define SCE_PL_REGSUBST 18 #define SCE_PL_LONGQUOTE 19 #define SCE_PL_BACKTICKS 20 #define SCE_PL_DATASECTION 21 #define SCE_PL_HERE_DELIM 22 #define SCE_PL_HERE_Q 23 #define SCE_PL_HERE_QQ 24 #define SCE_PL_HERE_QX 25 #define SCE_PL_STRING_Q 26 #define SCE_PL_STRING_QQ 27 #define SCE_PL_STRING_QX 28 #define SCE_PL_STRING_QR 29 #define SCE_PL_STRING_QW 30 #define SCE_PL_POD_VERB 31 #define SCE_PL_SUB_PROTOTYPE 40 #define SCE_PL_FORMAT_IDENT 41 #define SCE_PL_FORMAT 42 #define SCE_PL_STRING_VAR 43 #define SCE_PL_XLAT 44 #define SCE_PL_REGEX_VAR 54 #define SCE_PL_REGSUBST_VAR 55 #define SCE_PL_BACKTICKS_VAR 57 #define SCE_PL_HERE_QQ_VAR 61 #define SCE_PL_HERE_QX_VAR 62 #define SCE_PL_STRING_QQ_VAR 64 #define SCE_PL_STRING_QX_VAR 65 #define SCE_PL_STRING_QR_VAR 66 #define SCE_RB_DEFAULT 0 #define SCE_RB_ERROR 1 #define SCE_RB_COMMENTLINE 2 #define SCE_RB_POD 3 #define SCE_RB_NUMBER 4 #define SCE_RB_WORD 5 #define SCE_RB_STRING 6 #define SCE_RB_CHARACTER 7 #define SCE_RB_CLASSNAME 8 #define SCE_RB_DEFNAME 9 #define SCE_RB_OPERATOR 10 #define SCE_RB_IDENTIFIER 11 #define SCE_RB_REGEX 12 #define SCE_RB_GLOBAL 13 #define SCE_RB_SYMBOL 14 #define SCE_RB_MODULE_NAME 15 #define SCE_RB_INSTANCE_VAR 16 #define SCE_RB_CLASS_VAR 17 #define SCE_RB_BACKTICKS 18 #define SCE_RB_DATASECTION 19 #define SCE_RB_HERE_DELIM 20 #define SCE_RB_HERE_Q 21 #define SCE_RB_HERE_QQ 22 #define SCE_RB_HERE_QX 23 #define SCE_RB_STRING_Q 24 #define SCE_RB_STRING_QQ 25 #define SCE_RB_STRING_QX 26 #define SCE_RB_STRING_QR 27 #define SCE_RB_STRING_QW 28 #define SCE_RB_WORD_DEMOTED 29 #define SCE_RB_STDIN 30 #define SCE_RB_STDOUT 31 #define SCE_RB_STDERR 40 #define SCE_RB_UPPER_BOUND 41 #define SCE_B_DEFAULT 0 #define SCE_B_COMMENT 1 #define SCE_B_NUMBER 2 #define SCE_B_KEYWORD 3 #define SCE_B_STRING 4 #define SCE_B_PREPROCESSOR 5 #define SCE_B_OPERATOR 6 #define SCE_B_IDENTIFIER 7 #define SCE_B_DATE 8 #define SCE_B_STRINGEOL 9 #define SCE_B_KEYWORD2 10 #define SCE_B_KEYWORD3 11 #define SCE_B_KEYWORD4 12 #define SCE_B_CONSTANT 13 #define SCE_B_ASM 14 #define SCE_B_LABEL 15 #define SCE_B_ERROR 16 #define SCE_B_HEXNUMBER 17 #define SCE_B_BINNUMBER 18 #define SCE_B_COMMENTBLOCK 19 #define SCE_B_DOCLINE 20 #define SCE_B_DOCBLOCK 21 #define SCE_B_DOCKEYWORD 22 #define SCE_PROPS_DEFAULT 0 #define SCE_PROPS_COMMENT 1 #define SCE_PROPS_SECTION 2 #define SCE_PROPS_ASSIGNMENT 3 #define SCE_PROPS_DEFVAL 4 #define SCE_PROPS_KEY 5 #define SCE_L_DEFAULT 0 #define SCE_L_COMMAND 1 #define SCE_L_TAG 2 #define SCE_L_MATH 3 #define SCE_L_COMMENT 4 #define SCE_L_TAG2 5 #define SCE_L_MATH2 6 #define SCE_L_COMMENT2 7 #define SCE_L_VERBATIM 8 #define SCE_L_SHORTCMD 9 #define SCE_L_SPECIAL 10 #define SCE_L_CMDOPT 11 #define SCE_L_ERROR 12 #define SCE_LUA_DEFAULT 0 #define SCE_LUA_COMMENT 1 #define SCE_LUA_COMMENTLINE 2 #define SCE_LUA_COMMENTDOC 3 #define SCE_LUA_NUMBER 4 #define SCE_LUA_WORD 5 #define SCE_LUA_STRING 6 #define SCE_LUA_CHARACTER 7 #define SCE_LUA_LITERALSTRING 8 #define SCE_LUA_PREPROCESSOR 9 #define SCE_LUA_OPERATOR 10 #define SCE_LUA_IDENTIFIER 11 #define SCE_LUA_STRINGEOL 12 #define SCE_LUA_WORD2 13 #define SCE_LUA_WORD3 14 #define SCE_LUA_WORD4 15 #define SCE_LUA_WORD5 16 #define SCE_LUA_WORD6 17 #define SCE_LUA_WORD7 18 #define SCE_LUA_WORD8 19 #define SCE_LUA_LABEL 20 #define SCE_ERR_DEFAULT 0 #define SCE_ERR_PYTHON 1 #define SCE_ERR_GCC 2 #define SCE_ERR_MS 3 #define SCE_ERR_CMD 4 #define SCE_ERR_BORLAND 5 #define SCE_ERR_PERL 6 #define SCE_ERR_NET 7 #define SCE_ERR_LUA 8 #define SCE_ERR_CTAG 9 #define SCE_ERR_DIFF_CHANGED 10 #define SCE_ERR_DIFF_ADDITION 11 #define SCE_ERR_DIFF_DELETION 12 #define SCE_ERR_DIFF_MESSAGE 13 #define SCE_ERR_PHP 14 #define SCE_ERR_ELF 15 #define SCE_ERR_IFC 16 #define SCE_ERR_IFORT 17 #define SCE_ERR_ABSF 18 #define SCE_ERR_TIDY 19 #define SCE_ERR_JAVA_STACK 20 #define SCE_ERR_VALUE 21 #define SCE_ERR_GCC_INCLUDED_FROM 22 #define SCE_ERR_ESCSEQ 23 #define SCE_ERR_ESCSEQ_UNKNOWN 24 #define SCE_ERR_ES_BLACK 40 #define SCE_ERR_ES_RED 41 #define SCE_ERR_ES_GREEN 42 #define SCE_ERR_ES_BROWN 43 #define SCE_ERR_ES_BLUE 44 #define SCE_ERR_ES_MAGENTA 45 #define SCE_ERR_ES_CYAN 46 #define SCE_ERR_ES_GRAY 47 #define SCE_ERR_ES_DARK_GRAY 48 #define SCE_ERR_ES_BRIGHT_RED 49 #define SCE_ERR_ES_BRIGHT_GREEN 50 #define SCE_ERR_ES_YELLOW 51 #define SCE_ERR_ES_BRIGHT_BLUE 52 #define SCE_ERR_ES_BRIGHT_MAGENTA 53 #define SCE_ERR_ES_BRIGHT_CYAN 54 #define SCE_ERR_ES_WHITE 55 #define SCE_BAT_DEFAULT 0 #define SCE_BAT_COMMENT 1 #define SCE_BAT_WORD 2 #define SCE_BAT_LABEL 3 #define SCE_BAT_HIDE 4 #define SCE_BAT_COMMAND 5 #define SCE_BAT_IDENTIFIER 6 #define SCE_BAT_OPERATOR 7 #define SCE_TCMD_DEFAULT 0 #define SCE_TCMD_COMMENT 1 #define SCE_TCMD_WORD 2 #define SCE_TCMD_LABEL 3 #define SCE_TCMD_HIDE 4 #define SCE_TCMD_COMMAND 5 #define SCE_TCMD_IDENTIFIER 6 #define SCE_TCMD_OPERATOR 7 #define SCE_TCMD_ENVIRONMENT 8 #define SCE_TCMD_EXPANSION 9 #define SCE_TCMD_CLABEL 10 #define SCE_MAKE_DEFAULT 0 #define SCE_MAKE_COMMENT 1 #define SCE_MAKE_PREPROCESSOR 2 #define SCE_MAKE_IDENTIFIER 3 #define SCE_MAKE_OPERATOR 4 #define SCE_MAKE_TARGET 5 #define SCE_MAKE_IDEOL 9 #define SCE_DIFF_DEFAULT 0 #define SCE_DIFF_COMMENT 1 #define SCE_DIFF_COMMAND 2 #define SCE_DIFF_HEADER 3 #define SCE_DIFF_POSITION 4 #define SCE_DIFF_DELETED 5 #define SCE_DIFF_ADDED 6 #define SCE_DIFF_CHANGED 7 #define SCE_CONF_DEFAULT 0 #define SCE_CONF_COMMENT 1 #define SCE_CONF_NUMBER 2 #define SCE_CONF_IDENTIFIER 3 #define SCE_CONF_EXTENSION 4 #define SCE_CONF_PARAMETER 5 #define SCE_CONF_STRING 6 #define SCE_CONF_OPERATOR 7 #define SCE_CONF_IP 8 #define SCE_CONF_DIRECTIVE 9 #define SCE_AVE_DEFAULT 0 #define SCE_AVE_COMMENT 1 #define SCE_AVE_NUMBER 2 #define SCE_AVE_WORD 3 #define SCE_AVE_STRING 6 #define SCE_AVE_ENUM 7 #define SCE_AVE_STRINGEOL 8 #define SCE_AVE_IDENTIFIER 9 #define SCE_AVE_OPERATOR 10 #define SCE_AVE_WORD1 11 #define SCE_AVE_WORD2 12 #define SCE_AVE_WORD3 13 #define SCE_AVE_WORD4 14 #define SCE_AVE_WORD5 15 #define SCE_AVE_WORD6 16 #define SCE_ADA_DEFAULT 0 #define SCE_ADA_WORD 1 #define SCE_ADA_IDENTIFIER 2 #define SCE_ADA_NUMBER 3 #define SCE_ADA_DELIMITER 4 #define SCE_ADA_CHARACTER 5 #define SCE_ADA_CHARACTEREOL 6 #define SCE_ADA_STRING 7 #define SCE_ADA_STRINGEOL 8 #define SCE_ADA_LABEL 9 #define SCE_ADA_COMMENTLINE 10 #define SCE_ADA_ILLEGAL 11 #define SCE_BAAN_DEFAULT 0 #define SCE_BAAN_COMMENT 1 #define SCE_BAAN_COMMENTDOC 2 #define SCE_BAAN_NUMBER 3 #define SCE_BAAN_WORD 4 #define SCE_BAAN_STRING 5 #define SCE_BAAN_PREPROCESSOR 6 #define SCE_BAAN_OPERATOR 7 #define SCE_BAAN_IDENTIFIER 8 #define SCE_BAAN_STRINGEOL 9 #define SCE_BAAN_WORD2 10 #define SCE_BAAN_WORD3 11 #define SCE_BAAN_WORD4 12 #define SCE_BAAN_WORD5 13 #define SCE_BAAN_WORD6 14 #define SCE_BAAN_WORD7 15 #define SCE_BAAN_WORD8 16 #define SCE_BAAN_WORD9 17 #define SCE_BAAN_TABLEDEF 18 #define SCE_BAAN_TABLESQL 19 #define SCE_BAAN_FUNCTION 20 #define SCE_BAAN_DOMDEF 21 #define SCE_BAAN_FUNCDEF 22 #define SCE_BAAN_OBJECTDEF 23 #define SCE_BAAN_DEFINEDEF 24 #define SCE_LISP_DEFAULT 0 #define SCE_LISP_COMMENT 1 #define SCE_LISP_NUMBER 2 #define SCE_LISP_KEYWORD 3 #define SCE_LISP_KEYWORD_KW 4 #define SCE_LISP_SYMBOL 5 #define SCE_LISP_STRING 6 #define SCE_LISP_STRINGEOL 8 #define SCE_LISP_IDENTIFIER 9 #define SCE_LISP_OPERATOR 10 #define SCE_LISP_SPECIAL 11 #define SCE_LISP_MULTI_COMMENT 12 #define SCE_EIFFEL_DEFAULT 0 #define SCE_EIFFEL_COMMENTLINE 1 #define SCE_EIFFEL_NUMBER 2 #define SCE_EIFFEL_WORD 3 #define SCE_EIFFEL_STRING 4 #define SCE_EIFFEL_CHARACTER 5 #define SCE_EIFFEL_OPERATOR 6 #define SCE_EIFFEL_IDENTIFIER 7 #define SCE_EIFFEL_STRINGEOL 8 #define SCE_NNCRONTAB_DEFAULT 0 #define SCE_NNCRONTAB_COMMENT 1 #define SCE_NNCRONTAB_TASK 2 #define SCE_NNCRONTAB_SECTION 3 #define SCE_NNCRONTAB_KEYWORD 4 #define SCE_NNCRONTAB_MODIFIER 5 #define SCE_NNCRONTAB_ASTERISK 6 #define SCE_NNCRONTAB_NUMBER 7 #define SCE_NNCRONTAB_STRING 8 #define SCE_NNCRONTAB_ENVIRONMENT 9 #define SCE_NNCRONTAB_IDENTIFIER 10 #define SCE_FORTH_DEFAULT 0 #define SCE_FORTH_COMMENT 1 #define SCE_FORTH_COMMENT_ML 2 #define SCE_FORTH_IDENTIFIER 3 #define SCE_FORTH_CONTROL 4 #define SCE_FORTH_KEYWORD 5 #define SCE_FORTH_DEFWORD 6 #define SCE_FORTH_PREWORD1 7 #define SCE_FORTH_PREWORD2 8 #define SCE_FORTH_NUMBER 9 #define SCE_FORTH_STRING 10 #define SCE_FORTH_LOCALE 11 #define SCE_MATLAB_DEFAULT 0 #define SCE_MATLAB_COMMENT 1 #define SCE_MATLAB_COMMAND 2 #define SCE_MATLAB_NUMBER 3 #define SCE_MATLAB_KEYWORD 4 #define SCE_MATLAB_STRING 5 #define SCE_MATLAB_OPERATOR 6 #define SCE_MATLAB_IDENTIFIER 7 #define SCE_MATLAB_DOUBLEQUOTESTRING 8 #define SCE_SCRIPTOL_DEFAULT 0 #define SCE_SCRIPTOL_WHITE 1 #define SCE_SCRIPTOL_COMMENTLINE 2 #define SCE_SCRIPTOL_PERSISTENT 3 #define SCE_SCRIPTOL_CSTYLE 4 #define SCE_SCRIPTOL_COMMENTBLOCK 5 #define SCE_SCRIPTOL_NUMBER 6 #define SCE_SCRIPTOL_STRING 7 #define SCE_SCRIPTOL_CHARACTER 8 #define SCE_SCRIPTOL_STRINGEOL 9 #define SCE_SCRIPTOL_KEYWORD 10 #define SCE_SCRIPTOL_OPERATOR 11 #define SCE_SCRIPTOL_IDENTIFIER 12 #define SCE_SCRIPTOL_TRIPLE 13 #define SCE_SCRIPTOL_CLASSNAME 14 #define SCE_SCRIPTOL_PREPROCESSOR 15 #define SCE_ASM_DEFAULT 0 #define SCE_ASM_COMMENT 1 #define SCE_ASM_NUMBER 2 #define SCE_ASM_STRING 3 #define SCE_ASM_OPERATOR 4 #define SCE_ASM_IDENTIFIER 5 #define SCE_ASM_CPUINSTRUCTION 6 #define SCE_ASM_MATHINSTRUCTION 7 #define SCE_ASM_REGISTER 8 #define SCE_ASM_DIRECTIVE 9 #define SCE_ASM_DIRECTIVEOPERAND 10 #define SCE_ASM_COMMENTBLOCK 11 #define SCE_ASM_CHARACTER 12 #define SCE_ASM_STRINGEOL 13 #define SCE_ASM_EXTINSTRUCTION 14 #define SCE_ASM_COMMENTDIRECTIVE 15 #define SCE_F_DEFAULT 0 #define SCE_F_COMMENT 1 #define SCE_F_NUMBER 2 #define SCE_F_STRING1 3 #define SCE_F_STRING2 4 #define SCE_F_STRINGEOL 5 #define SCE_F_OPERATOR 6 #define SCE_F_IDENTIFIER 7 #define SCE_F_WORD 8 #define SCE_F_WORD2 9 #define SCE_F_WORD3 10 #define SCE_F_PREPROCESSOR 11 #define SCE_F_OPERATOR2 12 #define SCE_F_LABEL 13 #define SCE_F_CONTINUATION 14 #define SCE_CSS_DEFAULT 0 #define SCE_CSS_TAG 1 #define SCE_CSS_CLASS 2 #define SCE_CSS_PSEUDOCLASS 3 #define SCE_CSS_UNKNOWN_PSEUDOCLASS 4 #define SCE_CSS_OPERATOR 5 #define SCE_CSS_IDENTIFIER 6 #define SCE_CSS_UNKNOWN_IDENTIFIER 7 #define SCE_CSS_VALUE 8 #define SCE_CSS_COMMENT 9 #define SCE_CSS_ID 10 #define SCE_CSS_IMPORTANT 11 #define SCE_CSS_DIRECTIVE 12 #define SCE_CSS_DOUBLESTRING 13 #define SCE_CSS_SINGLESTRING 14 #define SCE_CSS_IDENTIFIER2 15 #define SCE_CSS_ATTRIBUTE 16 #define SCE_CSS_IDENTIFIER3 17 #define SCE_CSS_PSEUDOELEMENT 18 #define SCE_CSS_EXTENDED_IDENTIFIER 19 #define SCE_CSS_EXTENDED_PSEUDOCLASS 20 #define SCE_CSS_EXTENDED_PSEUDOELEMENT 21 #define SCE_CSS_MEDIA 22 #define SCE_CSS_VARIABLE 23 #define SCE_POV_DEFAULT 0 #define SCE_POV_COMMENT 1 #define SCE_POV_COMMENTLINE 2 #define SCE_POV_NUMBER 3 #define SCE_POV_OPERATOR 4 #define SCE_POV_IDENTIFIER 5 #define SCE_POV_STRING 6 #define SCE_POV_STRINGEOL 7 #define SCE_POV_DIRECTIVE 8 #define SCE_POV_BADDIRECTIVE 9 #define SCE_POV_WORD2 10 #define SCE_POV_WORD3 11 #define SCE_POV_WORD4 12 #define SCE_POV_WORD5 13 #define SCE_POV_WORD6 14 #define SCE_POV_WORD7 15 #define SCE_POV_WORD8 16 #define SCE_LOUT_DEFAULT 0 #define SCE_LOUT_COMMENT 1 #define SCE_LOUT_NUMBER 2 #define SCE_LOUT_WORD 3 #define SCE_LOUT_WORD2 4 #define SCE_LOUT_WORD3 5 #define SCE_LOUT_WORD4 6 #define SCE_LOUT_STRING 7 #define SCE_LOUT_OPERATOR 8 #define SCE_LOUT_IDENTIFIER 9 #define SCE_LOUT_STRINGEOL 10 #define SCE_ESCRIPT_DEFAULT 0 #define SCE_ESCRIPT_COMMENT 1 #define SCE_ESCRIPT_COMMENTLINE 2 #define SCE_ESCRIPT_COMMENTDOC 3 #define SCE_ESCRIPT_NUMBER 4 #define SCE_ESCRIPT_WORD 5 #define SCE_ESCRIPT_STRING 6 #define SCE_ESCRIPT_OPERATOR 7 #define SCE_ESCRIPT_IDENTIFIER 8 #define SCE_ESCRIPT_BRACE 9 #define SCE_ESCRIPT_WORD2 10 #define SCE_ESCRIPT_WORD3 11 #define SCE_PS_DEFAULT 0 #define SCE_PS_COMMENT 1 #define SCE_PS_DSC_COMMENT 2 #define SCE_PS_DSC_VALUE 3 #define SCE_PS_NUMBER 4 #define SCE_PS_NAME 5 #define SCE_PS_KEYWORD 6 #define SCE_PS_LITERAL 7 #define SCE_PS_IMMEVAL 8 #define SCE_PS_PAREN_ARRAY 9 #define SCE_PS_PAREN_DICT 10 #define SCE_PS_PAREN_PROC 11 #define SCE_PS_TEXT 12 #define SCE_PS_HEXSTRING 13 #define SCE_PS_BASE85STRING 14 #define SCE_PS_BADSTRINGCHAR 15 #define SCE_NSIS_DEFAULT 0 #define SCE_NSIS_COMMENT 1 #define SCE_NSIS_STRINGDQ 2 #define SCE_NSIS_STRINGLQ 3 #define SCE_NSIS_STRINGRQ 4 #define SCE_NSIS_FUNCTION 5 #define SCE_NSIS_VARIABLE 6 #define SCE_NSIS_LABEL 7 #define SCE_NSIS_USERDEFINED 8 #define SCE_NSIS_SECTIONDEF 9 #define SCE_NSIS_SUBSECTIONDEF 10 #define SCE_NSIS_IFDEFINEDEF 11 #define SCE_NSIS_MACRODEF 12 #define SCE_NSIS_STRINGVAR 13 #define SCE_NSIS_NUMBER 14 #define SCE_NSIS_SECTIONGROUP 15 #define SCE_NSIS_PAGEEX 16 #define SCE_NSIS_FUNCTIONDEF 17 #define SCE_NSIS_COMMENTBOX 18 #define SCE_MMIXAL_LEADWS 0 #define SCE_MMIXAL_COMMENT 1 #define SCE_MMIXAL_LABEL 2 #define SCE_MMIXAL_OPCODE 3 #define SCE_MMIXAL_OPCODE_PRE 4 #define SCE_MMIXAL_OPCODE_VALID 5 #define SCE_MMIXAL_OPCODE_UNKNOWN 6 #define SCE_MMIXAL_OPCODE_POST 7 #define SCE_MMIXAL_OPERANDS 8 #define SCE_MMIXAL_NUMBER 9 #define SCE_MMIXAL_REF 10 #define SCE_MMIXAL_CHAR 11 #define SCE_MMIXAL_STRING 12 #define SCE_MMIXAL_REGISTER 13 #define SCE_MMIXAL_HEX 14 #define SCE_MMIXAL_OPERATOR 15 #define SCE_MMIXAL_SYMBOL 16 #define SCE_MMIXAL_INCLUDE 17 #define SCE_CLW_DEFAULT 0 #define SCE_CLW_LABEL 1 #define SCE_CLW_COMMENT 2 #define SCE_CLW_STRING 3 #define SCE_CLW_USER_IDENTIFIER 4 #define SCE_CLW_INTEGER_CONSTANT 5 #define SCE_CLW_REAL_CONSTANT 6 #define SCE_CLW_PICTURE_STRING 7 #define SCE_CLW_KEYWORD 8 #define SCE_CLW_COMPILER_DIRECTIVE 9 #define SCE_CLW_RUNTIME_EXPRESSIONS 10 #define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 11 #define SCE_CLW_STRUCTURE_DATA_TYPE 12 #define SCE_CLW_ATTRIBUTE 13 #define SCE_CLW_STANDARD_EQUATE 14 #define SCE_CLW_ERROR 15 #define SCE_CLW_DEPRECATED 16 #define SCE_LOT_DEFAULT 0 #define SCE_LOT_HEADER 1 #define SCE_LOT_BREAK 2 #define SCE_LOT_SET 3 #define SCE_LOT_PASS 4 #define SCE_LOT_FAIL 5 #define SCE_LOT_ABORT 6 #define SCE_YAML_DEFAULT 0 #define SCE_YAML_COMMENT 1 #define SCE_YAML_IDENTIFIER 2 #define SCE_YAML_KEYWORD 3 #define SCE_YAML_NUMBER 4 #define SCE_YAML_REFERENCE 5 #define SCE_YAML_DOCUMENT 6 #define SCE_YAML_TEXT 7 #define SCE_YAML_ERROR 8 #define SCE_YAML_OPERATOR 9 #define SCE_TEX_DEFAULT 0 #define SCE_TEX_SPECIAL 1 #define SCE_TEX_GROUP 2 #define SCE_TEX_SYMBOL 3 #define SCE_TEX_COMMAND 4 #define SCE_TEX_TEXT 5 #define SCE_METAPOST_DEFAULT 0 #define SCE_METAPOST_SPECIAL 1 #define SCE_METAPOST_GROUP 2 #define SCE_METAPOST_SYMBOL 3 #define SCE_METAPOST_COMMAND 4 #define SCE_METAPOST_TEXT 5 #define SCE_METAPOST_EXTRA 6 #define SCE_ERLANG_DEFAULT 0 #define SCE_ERLANG_COMMENT 1 #define SCE_ERLANG_VARIABLE 2 #define SCE_ERLANG_NUMBER 3 #define SCE_ERLANG_KEYWORD 4 #define SCE_ERLANG_STRING 5 #define SCE_ERLANG_OPERATOR 6 #define SCE_ERLANG_ATOM 7 #define SCE_ERLANG_FUNCTION_NAME 8 #define SCE_ERLANG_CHARACTER 9 #define SCE_ERLANG_MACRO 10 #define SCE_ERLANG_RECORD 11 #define SCE_ERLANG_PREPROC 12 #define SCE_ERLANG_NODE_NAME 13 #define SCE_ERLANG_COMMENT_FUNCTION 14 #define SCE_ERLANG_COMMENT_MODULE 15 #define SCE_ERLANG_COMMENT_DOC 16 #define SCE_ERLANG_COMMENT_DOC_MACRO 17 #define SCE_ERLANG_ATOM_QUOTED 18 #define SCE_ERLANG_MACRO_QUOTED 19 #define SCE_ERLANG_RECORD_QUOTED 20 #define SCE_ERLANG_NODE_NAME_QUOTED 21 #define SCE_ERLANG_BIFS 22 #define SCE_ERLANG_MODULES 23 #define SCE_ERLANG_MODULES_ATT 24 #define SCE_ERLANG_UNKNOWN 31 #define SCE_MSSQL_DEFAULT 0 #define SCE_MSSQL_COMMENT 1 #define SCE_MSSQL_LINE_COMMENT 2 #define SCE_MSSQL_NUMBER 3 #define SCE_MSSQL_STRING 4 #define SCE_MSSQL_OPERATOR 5 #define SCE_MSSQL_IDENTIFIER 6 #define SCE_MSSQL_VARIABLE 7 #define SCE_MSSQL_COLUMN_NAME 8 #define SCE_MSSQL_STATEMENT 9 #define SCE_MSSQL_DATATYPE 10 #define SCE_MSSQL_SYSTABLE 11 #define SCE_MSSQL_GLOBAL_VARIABLE 12 #define SCE_MSSQL_FUNCTION 13 #define SCE_MSSQL_STORED_PROCEDURE 14 #define SCE_MSSQL_DEFAULT_PREF_DATATYPE 15 #define SCE_MSSQL_COLUMN_NAME_2 16 #define SCE_V_DEFAULT 0 #define SCE_V_COMMENT 1 #define SCE_V_COMMENTLINE 2 #define SCE_V_COMMENTLINEBANG 3 #define SCE_V_NUMBER 4 #define SCE_V_WORD 5 #define SCE_V_STRING 6 #define SCE_V_WORD2 7 #define SCE_V_WORD3 8 #define SCE_V_PREPROCESSOR 9 #define SCE_V_OPERATOR 10 #define SCE_V_IDENTIFIER 11 #define SCE_V_STRINGEOL 12 #define SCE_V_USER 19 #define SCE_V_COMMENT_WORD 20 #define SCE_V_INPUT 21 #define SCE_V_OUTPUT 22 #define SCE_V_INOUT 23 #define SCE_V_PORT_CONNECT 24 #define SCE_KIX_DEFAULT 0 #define SCE_KIX_COMMENT 1 #define SCE_KIX_STRING1 2 #define SCE_KIX_STRING2 3 #define SCE_KIX_NUMBER 4 #define SCE_KIX_VAR 5 #define SCE_KIX_MACRO 6 #define SCE_KIX_KEYWORD 7 #define SCE_KIX_FUNCTIONS 8 #define SCE_KIX_OPERATOR 9 #define SCE_KIX_COMMENTSTREAM 10 #define SCE_KIX_IDENTIFIER 31 #define SCE_GC_DEFAULT 0 #define SCE_GC_COMMENTLINE 1 #define SCE_GC_COMMENTBLOCK 2 #define SCE_GC_GLOBAL 3 #define SCE_GC_EVENT 4 #define SCE_GC_ATTRIBUTE 5 #define SCE_GC_CONTROL 6 #define SCE_GC_COMMAND 7 #define SCE_GC_STRING 8 #define SCE_GC_OPERATOR 9 #define SCE_SN_DEFAULT 0 #define SCE_SN_CODE 1 #define SCE_SN_COMMENTLINE 2 #define SCE_SN_COMMENTLINEBANG 3 #define SCE_SN_NUMBER 4 #define SCE_SN_WORD 5 #define SCE_SN_STRING 6 #define SCE_SN_WORD2 7 #define SCE_SN_WORD3 8 #define SCE_SN_PREPROCESSOR 9 #define SCE_SN_OPERATOR 10 #define SCE_SN_IDENTIFIER 11 #define SCE_SN_STRINGEOL 12 #define SCE_SN_REGEXTAG 13 #define SCE_SN_SIGNAL 14 #define SCE_SN_USER 19 #define SCE_AU3_DEFAULT 0 #define SCE_AU3_COMMENT 1 #define SCE_AU3_COMMENTBLOCK 2 #define SCE_AU3_NUMBER 3 #define SCE_AU3_FUNCTION 4 #define SCE_AU3_KEYWORD 5 #define SCE_AU3_MACRO 6 #define SCE_AU3_STRING 7 #define SCE_AU3_OPERATOR 8 #define SCE_AU3_VARIABLE 9 #define SCE_AU3_SENT 10 #define SCE_AU3_PREPROCESSOR 11 #define SCE_AU3_SPECIAL 12 #define SCE_AU3_EXPAND 13 #define SCE_AU3_COMOBJ 14 #define SCE_AU3_UDF 15 #define SCE_APDL_DEFAULT 0 #define SCE_APDL_COMMENT 1 #define SCE_APDL_COMMENTBLOCK 2 #define SCE_APDL_NUMBER 3 #define SCE_APDL_STRING 4 #define SCE_APDL_OPERATOR 5 #define SCE_APDL_WORD 6 #define SCE_APDL_PROCESSOR 7 #define SCE_APDL_COMMAND 8 #define SCE_APDL_SLASHCOMMAND 9 #define SCE_APDL_STARCOMMAND 10 #define SCE_APDL_ARGUMENT 11 #define SCE_APDL_FUNCTION 12 #define SCE_SH_DEFAULT 0 #define SCE_SH_ERROR 1 #define SCE_SH_COMMENTLINE 2 #define SCE_SH_NUMBER 3 #define SCE_SH_WORD 4 #define SCE_SH_STRING 5 #define SCE_SH_CHARACTER 6 #define SCE_SH_OPERATOR 7 #define SCE_SH_IDENTIFIER 8 #define SCE_SH_SCALAR 9 #define SCE_SH_PARAM 10 #define SCE_SH_BACKTICKS 11 #define SCE_SH_HERE_DELIM 12 #define SCE_SH_HERE_Q 13 #define SCE_ASN1_DEFAULT 0 #define SCE_ASN1_COMMENT 1 #define SCE_ASN1_IDENTIFIER 2 #define SCE_ASN1_STRING 3 #define SCE_ASN1_OID 4 #define SCE_ASN1_SCALAR 5 #define SCE_ASN1_KEYWORD 6 #define SCE_ASN1_ATTRIBUTE 7 #define SCE_ASN1_DESCRIPTOR 8 #define SCE_ASN1_TYPE 9 #define SCE_ASN1_OPERATOR 10 #define SCE_VHDL_DEFAULT 0 #define SCE_VHDL_COMMENT 1 #define SCE_VHDL_COMMENTLINEBANG 2 #define SCE_VHDL_NUMBER 3 #define SCE_VHDL_STRING 4 #define SCE_VHDL_OPERATOR 5 #define SCE_VHDL_IDENTIFIER 6 #define SCE_VHDL_STRINGEOL 7 #define SCE_VHDL_KEYWORD 8 #define SCE_VHDL_STDOPERATOR 9 #define SCE_VHDL_ATTRIBUTE 10 #define SCE_VHDL_STDFUNCTION 11 #define SCE_VHDL_STDPACKAGE 12 #define SCE_VHDL_STDTYPE 13 #define SCE_VHDL_USERWORD 14 #define SCE_VHDL_BLOCK_COMMENT 15 #define SCE_CAML_DEFAULT 0 #define SCE_CAML_IDENTIFIER 1 #define SCE_CAML_TAGNAME 2 #define SCE_CAML_KEYWORD 3 #define SCE_CAML_KEYWORD2 4 #define SCE_CAML_KEYWORD3 5 #define SCE_CAML_LINENUM 6 #define SCE_CAML_OPERATOR 7 #define SCE_CAML_NUMBER 8 #define SCE_CAML_CHAR 9 #define SCE_CAML_WHITE 10 #define SCE_CAML_STRING 11 #define SCE_CAML_COMMENT 12 #define SCE_CAML_COMMENT1 13 #define SCE_CAML_COMMENT2 14 #define SCE_CAML_COMMENT3 15 #define SCE_HA_DEFAULT 0 #define SCE_HA_IDENTIFIER 1 #define SCE_HA_KEYWORD 2 #define SCE_HA_NUMBER 3 #define SCE_HA_STRING 4 #define SCE_HA_CHARACTER 5 #define SCE_HA_CLASS 6 #define SCE_HA_MODULE 7 #define SCE_HA_CAPITAL 8 #define SCE_HA_DATA 9 #define SCE_HA_IMPORT 10 #define SCE_HA_OPERATOR 11 #define SCE_HA_INSTANCE 12 #define SCE_HA_COMMENTLINE 13 #define SCE_HA_COMMENTBLOCK 14 #define SCE_HA_COMMENTBLOCK2 15 #define SCE_HA_COMMENTBLOCK3 16 #define SCE_HA_PRAGMA 17 #define SCE_HA_PREPROCESSOR 18 #define SCE_HA_STRINGEOL 19 #define SCE_HA_RESERVED_OPERATOR 20 #define SCE_HA_LITERATE_COMMENT 21 #define SCE_HA_LITERATE_CODEDELIM 22 #define SCE_T3_DEFAULT 0 #define SCE_T3_X_DEFAULT 1 #define SCE_T3_PREPROCESSOR 2 #define SCE_T3_BLOCK_COMMENT 3 #define SCE_T3_LINE_COMMENT 4 #define SCE_T3_OPERATOR 5 #define SCE_T3_KEYWORD 6 #define SCE_T3_NUMBER 7 #define SCE_T3_IDENTIFIER 8 #define SCE_T3_S_STRING 9 #define SCE_T3_D_STRING 10 #define SCE_T3_X_STRING 11 #define SCE_T3_LIB_DIRECTIVE 12 #define SCE_T3_MSG_PARAM 13 #define SCE_T3_HTML_TAG 14 #define SCE_T3_HTML_DEFAULT 15 #define SCE_T3_HTML_STRING 16 #define SCE_T3_USER1 17 #define SCE_T3_USER2 18 #define SCE_T3_USER3 19 #define SCE_T3_BRACE 20 #define SCE_REBOL_DEFAULT 0 #define SCE_REBOL_COMMENTLINE 1 #define SCE_REBOL_COMMENTBLOCK 2 #define SCE_REBOL_PREFACE 3 #define SCE_REBOL_OPERATOR 4 #define SCE_REBOL_CHARACTER 5 #define SCE_REBOL_QUOTEDSTRING 6 #define SCE_REBOL_BRACEDSTRING 7 #define SCE_REBOL_NUMBER 8 #define SCE_REBOL_PAIR 9 #define SCE_REBOL_TUPLE 10 #define SCE_REBOL_BINARY 11 #define SCE_REBOL_MONEY 12 #define SCE_REBOL_ISSUE 13 #define SCE_REBOL_TAG 14 #define SCE_REBOL_FILE 15 #define SCE_REBOL_EMAIL 16 #define SCE_REBOL_URL 17 #define SCE_REBOL_DATE 18 #define SCE_REBOL_TIME 19 #define SCE_REBOL_IDENTIFIER 20 #define SCE_REBOL_WORD 21 #define SCE_REBOL_WORD2 22 #define SCE_REBOL_WORD3 23 #define SCE_REBOL_WORD4 24 #define SCE_REBOL_WORD5 25 #define SCE_REBOL_WORD6 26 #define SCE_REBOL_WORD7 27 #define SCE_REBOL_WORD8 28 #define SCE_SQL_DEFAULT 0 #define SCE_SQL_COMMENT 1 #define SCE_SQL_COMMENTLINE 2 #define SCE_SQL_COMMENTDOC 3 #define SCE_SQL_NUMBER 4 #define SCE_SQL_WORD 5 #define SCE_SQL_STRING 6 #define SCE_SQL_CHARACTER 7 #define SCE_SQL_SQLPLUS 8 #define SCE_SQL_SQLPLUS_PROMPT 9 #define SCE_SQL_OPERATOR 10 #define SCE_SQL_IDENTIFIER 11 #define SCE_SQL_SQLPLUS_COMMENT 13 #define SCE_SQL_COMMENTLINEDOC 15 #define SCE_SQL_WORD2 16 #define SCE_SQL_COMMENTDOCKEYWORD 17 #define SCE_SQL_COMMENTDOCKEYWORDERROR 18 #define SCE_SQL_USER1 19 #define SCE_SQL_USER2 20 #define SCE_SQL_USER3 21 #define SCE_SQL_USER4 22 #define SCE_SQL_QUOTEDIDENTIFIER 23 #define SCE_SQL_QOPERATOR 24 #define SCE_ST_DEFAULT 0 #define SCE_ST_STRING 1 #define SCE_ST_NUMBER 2 #define SCE_ST_COMMENT 3 #define SCE_ST_SYMBOL 4 #define SCE_ST_BINARY 5 #define SCE_ST_BOOL 6 #define SCE_ST_SELF 7 #define SCE_ST_SUPER 8 #define SCE_ST_NIL 9 #define SCE_ST_GLOBAL 10 #define SCE_ST_RETURN 11 #define SCE_ST_SPECIAL 12 #define SCE_ST_KWSEND 13 #define SCE_ST_ASSIGN 14 #define SCE_ST_CHARACTER 15 #define SCE_ST_SPEC_SEL 16 #define SCE_FS_DEFAULT 0 #define SCE_FS_COMMENT 1 #define SCE_FS_COMMENTLINE 2 #define SCE_FS_COMMENTDOC 3 #define SCE_FS_COMMENTLINEDOC 4 #define SCE_FS_COMMENTDOCKEYWORD 5 #define SCE_FS_COMMENTDOCKEYWORDERROR 6 #define SCE_FS_KEYWORD 7 #define SCE_FS_KEYWORD2 8 #define SCE_FS_KEYWORD3 9 #define SCE_FS_KEYWORD4 10 #define SCE_FS_NUMBER 11 #define SCE_FS_STRING 12 #define SCE_FS_PREPROCESSOR 13 #define SCE_FS_OPERATOR 14 #define SCE_FS_IDENTIFIER 15 #define SCE_FS_DATE 16 #define SCE_FS_STRINGEOL 17 #define SCE_FS_CONSTANT 18 #define SCE_FS_WORDOPERATOR 19 #define SCE_FS_DISABLEDCODE 20 #define SCE_FS_DEFAULT_C 21 #define SCE_FS_COMMENTDOC_C 22 #define SCE_FS_COMMENTLINEDOC_C 23 #define SCE_FS_KEYWORD_C 24 #define SCE_FS_KEYWORD2_C 25 #define SCE_FS_NUMBER_C 26 #define SCE_FS_STRING_C 27 #define SCE_FS_PREPROCESSOR_C 28 #define SCE_FS_OPERATOR_C 29 #define SCE_FS_IDENTIFIER_C 30 #define SCE_FS_STRINGEOL_C 31 #define SCE_CSOUND_DEFAULT 0 #define SCE_CSOUND_COMMENT 1 #define SCE_CSOUND_NUMBER 2 #define SCE_CSOUND_OPERATOR 3 #define SCE_CSOUND_INSTR 4 #define SCE_CSOUND_IDENTIFIER 5 #define SCE_CSOUND_OPCODE 6 #define SCE_CSOUND_HEADERSTMT 7 #define SCE_CSOUND_USERKEYWORD 8 #define SCE_CSOUND_COMMENTBLOCK 9 #define SCE_CSOUND_PARAM 10 #define SCE_CSOUND_ARATE_VAR 11 #define SCE_CSOUND_KRATE_VAR 12 #define SCE_CSOUND_IRATE_VAR 13 #define SCE_CSOUND_GLOBAL_VAR 14 #define SCE_CSOUND_STRINGEOL 15 #define SCE_INNO_DEFAULT 0 #define SCE_INNO_COMMENT 1 #define SCE_INNO_KEYWORD 2 #define SCE_INNO_PARAMETER 3 #define SCE_INNO_SECTION 4 #define SCE_INNO_PREPROC 5 #define SCE_INNO_INLINE_EXPANSION 6 #define SCE_INNO_COMMENT_PASCAL 7 #define SCE_INNO_KEYWORD_PASCAL 8 #define SCE_INNO_KEYWORD_USER 9 #define SCE_INNO_STRING_DOUBLE 10 #define SCE_INNO_STRING_SINGLE 11 #define SCE_INNO_IDENTIFIER 12 #define SCE_OPAL_SPACE 0 #define SCE_OPAL_COMMENT_BLOCK 1 #define SCE_OPAL_COMMENT_LINE 2 #define SCE_OPAL_INTEGER 3 #define SCE_OPAL_KEYWORD 4 #define SCE_OPAL_SORT 5 #define SCE_OPAL_STRING 6 #define SCE_OPAL_PAR 7 #define SCE_OPAL_BOOL_CONST 8 #define SCE_OPAL_DEFAULT 32 #define SCE_SPICE_DEFAULT 0 #define SCE_SPICE_IDENTIFIER 1 #define SCE_SPICE_KEYWORD 2 #define SCE_SPICE_KEYWORD2 3 #define SCE_SPICE_KEYWORD3 4 #define SCE_SPICE_NUMBER 5 #define SCE_SPICE_DELIMITER 6 #define SCE_SPICE_VALUE 7 #define SCE_SPICE_COMMENTLINE 8 #define SCE_CMAKE_DEFAULT 0 #define SCE_CMAKE_COMMENT 1 #define SCE_CMAKE_STRINGDQ 2 #define SCE_CMAKE_STRINGLQ 3 #define SCE_CMAKE_STRINGRQ 4 #define SCE_CMAKE_COMMANDS 5 #define SCE_CMAKE_PARAMETERS 6 #define SCE_CMAKE_VARIABLE 7 #define SCE_CMAKE_USERDEFINED 8 #define SCE_CMAKE_WHILEDEF 9 #define SCE_CMAKE_FOREACHDEF 10 #define SCE_CMAKE_IFDEFINEDEF 11 #define SCE_CMAKE_MACRODEF 12 #define SCE_CMAKE_STRINGVAR 13 #define SCE_CMAKE_NUMBER 14 #define SCE_GAP_DEFAULT 0 #define SCE_GAP_IDENTIFIER 1 #define SCE_GAP_KEYWORD 2 #define SCE_GAP_KEYWORD2 3 #define SCE_GAP_KEYWORD3 4 #define SCE_GAP_KEYWORD4 5 #define SCE_GAP_STRING 6 #define SCE_GAP_CHAR 7 #define SCE_GAP_OPERATOR 8 #define SCE_GAP_COMMENT 9 #define SCE_GAP_NUMBER 10 #define SCE_GAP_STRINGEOL 11 #define SCE_PLM_DEFAULT 0 #define SCE_PLM_COMMENT 1 #define SCE_PLM_STRING 2 #define SCE_PLM_NUMBER 3 #define SCE_PLM_IDENTIFIER 4 #define SCE_PLM_OPERATOR 5 #define SCE_PLM_CONTROL 6 #define SCE_PLM_KEYWORD 7 #define SCE_ABL_DEFAULT 0 #define SCE_ABL_NUMBER 1 #define SCE_ABL_WORD 2 #define SCE_ABL_STRING 3 #define SCE_ABL_CHARACTER 4 #define SCE_ABL_PREPROCESSOR 5 #define SCE_ABL_OPERATOR 6 #define SCE_ABL_IDENTIFIER 7 #define SCE_ABL_BLOCK 8 #define SCE_ABL_END 9 #define SCE_ABL_COMMENT 10 #define SCE_ABL_TASKMARKER 11 #define SCE_ABL_LINECOMMENT 12 #define SCE_ABAQUS_DEFAULT 0 #define SCE_ABAQUS_COMMENT 1 #define SCE_ABAQUS_COMMENTBLOCK 2 #define SCE_ABAQUS_NUMBER 3 #define SCE_ABAQUS_STRING 4 #define SCE_ABAQUS_OPERATOR 5 #define SCE_ABAQUS_WORD 6 #define SCE_ABAQUS_PROCESSOR 7 #define SCE_ABAQUS_COMMAND 8 #define SCE_ABAQUS_SLASHCOMMAND 9 #define SCE_ABAQUS_STARCOMMAND 10 #define SCE_ABAQUS_ARGUMENT 11 #define SCE_ABAQUS_FUNCTION 12 #define SCE_ASY_DEFAULT 0 #define SCE_ASY_COMMENT 1 #define SCE_ASY_COMMENTLINE 2 #define SCE_ASY_NUMBER 3 #define SCE_ASY_WORD 4 #define SCE_ASY_STRING 5 #define SCE_ASY_CHARACTER 6 #define SCE_ASY_OPERATOR 7 #define SCE_ASY_IDENTIFIER 8 #define SCE_ASY_STRINGEOL 9 #define SCE_ASY_COMMENTLINEDOC 10 #define SCE_ASY_WORD2 11 #define SCE_R_DEFAULT 0 #define SCE_R_COMMENT 1 #define SCE_R_KWORD 2 #define SCE_R_BASEKWORD 3 #define SCE_R_OTHERKWORD 4 #define SCE_R_NUMBER 5 #define SCE_R_STRING 6 #define SCE_R_STRING2 7 #define SCE_R_OPERATOR 8 #define SCE_R_IDENTIFIER 9 #define SCE_R_INFIX 10 #define SCE_R_INFIXEOL 11 #define SCE_MAGIK_DEFAULT 0 #define SCE_MAGIK_COMMENT 1 #define SCE_MAGIK_HYPER_COMMENT 16 #define SCE_MAGIK_STRING 2 #define SCE_MAGIK_CHARACTER 3 #define SCE_MAGIK_NUMBER 4 #define SCE_MAGIK_IDENTIFIER 5 #define SCE_MAGIK_OPERATOR 6 #define SCE_MAGIK_FLOW 7 #define SCE_MAGIK_CONTAINER 8 #define SCE_MAGIK_BRACKET_BLOCK 9 #define SCE_MAGIK_BRACE_BLOCK 10 #define SCE_MAGIK_SQBRACKET_BLOCK 11 #define SCE_MAGIK_UNKNOWN_KEYWORD 12 #define SCE_MAGIK_KEYWORD 13 #define SCE_MAGIK_PRAGMA 14 #define SCE_MAGIK_SYMBOL 15 #define SCE_POWERSHELL_DEFAULT 0 #define SCE_POWERSHELL_COMMENT 1 #define SCE_POWERSHELL_STRING 2 #define SCE_POWERSHELL_CHARACTER 3 #define SCE_POWERSHELL_NUMBER 4 #define SCE_POWERSHELL_VARIABLE 5 #define SCE_POWERSHELL_OPERATOR 6 #define SCE_POWERSHELL_IDENTIFIER 7 #define SCE_POWERSHELL_KEYWORD 8 #define SCE_POWERSHELL_CMDLET 9 #define SCE_POWERSHELL_ALIAS 10 #define SCE_POWERSHELL_FUNCTION 11 #define SCE_POWERSHELL_USER1 12 #define SCE_POWERSHELL_COMMENTSTREAM 13 #define SCE_POWERSHELL_HERE_STRING 14 #define SCE_POWERSHELL_HERE_CHARACTER 15 #define SCE_POWERSHELL_COMMENTDOCKEYWORD 16 #define SCE_MYSQL_DEFAULT 0 #define SCE_MYSQL_COMMENT 1 #define SCE_MYSQL_COMMENTLINE 2 #define SCE_MYSQL_VARIABLE 3 #define SCE_MYSQL_SYSTEMVARIABLE 4 #define SCE_MYSQL_KNOWNSYSTEMVARIABLE 5 #define SCE_MYSQL_NUMBER 6 #define SCE_MYSQL_MAJORKEYWORD 7 #define SCE_MYSQL_KEYWORD 8 #define SCE_MYSQL_DATABASEOBJECT 9 #define SCE_MYSQL_PROCEDUREKEYWORD 10 #define SCE_MYSQL_STRING 11 #define SCE_MYSQL_SQSTRING 12 #define SCE_MYSQL_DQSTRING 13 #define SCE_MYSQL_OPERATOR 14 #define SCE_MYSQL_FUNCTION 15 #define SCE_MYSQL_IDENTIFIER 16 #define SCE_MYSQL_QUOTEDIDENTIFIER 17 #define SCE_MYSQL_USER1 18 #define SCE_MYSQL_USER2 19 #define SCE_MYSQL_USER3 20 #define SCE_MYSQL_HIDDENCOMMAND 21 #define SCE_MYSQL_PLACEHOLDER 22 #define SCE_PO_DEFAULT 0 #define SCE_PO_COMMENT 1 #define SCE_PO_MSGID 2 #define SCE_PO_MSGID_TEXT 3 #define SCE_PO_MSGSTR 4 #define SCE_PO_MSGSTR_TEXT 5 #define SCE_PO_MSGCTXT 6 #define SCE_PO_MSGCTXT_TEXT 7 #define SCE_PO_FUZZY 8 #define SCE_PO_PROGRAMMER_COMMENT 9 #define SCE_PO_REFERENCE 10 #define SCE_PO_FLAGS 11 #define SCE_PO_MSGID_TEXT_EOL 12 #define SCE_PO_MSGSTR_TEXT_EOL 13 #define SCE_PO_MSGCTXT_TEXT_EOL 14 #define SCE_PO_ERROR 15 #define SCE_PAS_DEFAULT 0 #define SCE_PAS_IDENTIFIER 1 #define SCE_PAS_COMMENT 2 #define SCE_PAS_COMMENT2 3 #define SCE_PAS_COMMENTLINE 4 #define SCE_PAS_PREPROCESSOR 5 #define SCE_PAS_PREPROCESSOR2 6 #define SCE_PAS_NUMBER 7 #define SCE_PAS_HEXNUMBER 8 #define SCE_PAS_WORD 9 #define SCE_PAS_STRING 10 #define SCE_PAS_STRINGEOL 11 #define SCE_PAS_CHARACTER 12 #define SCE_PAS_OPERATOR 13 #define SCE_PAS_ASM 14 #define SCE_SORCUS_DEFAULT 0 #define SCE_SORCUS_COMMAND 1 #define SCE_SORCUS_PARAMETER 2 #define SCE_SORCUS_COMMENTLINE 3 #define SCE_SORCUS_STRING 4 #define SCE_SORCUS_STRINGEOL 5 #define SCE_SORCUS_IDENTIFIER 6 #define SCE_SORCUS_OPERATOR 7 #define SCE_SORCUS_NUMBER 8 #define SCE_SORCUS_CONSTANT 9 #define SCE_POWERPRO_DEFAULT 0 #define SCE_POWERPRO_COMMENTBLOCK 1 #define SCE_POWERPRO_COMMENTLINE 2 #define SCE_POWERPRO_NUMBER 3 #define SCE_POWERPRO_WORD 4 #define SCE_POWERPRO_WORD2 5 #define SCE_POWERPRO_WORD3 6 #define SCE_POWERPRO_WORD4 7 #define SCE_POWERPRO_DOUBLEQUOTEDSTRING 8 #define SCE_POWERPRO_SINGLEQUOTEDSTRING 9 #define SCE_POWERPRO_LINECONTINUE 10 #define SCE_POWERPRO_OPERATOR 11 #define SCE_POWERPRO_IDENTIFIER 12 #define SCE_POWERPRO_STRINGEOL 13 #define SCE_POWERPRO_VERBATIM 14 #define SCE_POWERPRO_ALTQUOTE 15 #define SCE_POWERPRO_FUNCTION 16 #define SCE_SML_DEFAULT 0 #define SCE_SML_IDENTIFIER 1 #define SCE_SML_TAGNAME 2 #define SCE_SML_KEYWORD 3 #define SCE_SML_KEYWORD2 4 #define SCE_SML_KEYWORD3 5 #define SCE_SML_LINENUM 6 #define SCE_SML_OPERATOR 7 #define SCE_SML_NUMBER 8 #define SCE_SML_CHAR 9 #define SCE_SML_STRING 11 #define SCE_SML_COMMENT 12 #define SCE_SML_COMMENT1 13 #define SCE_SML_COMMENT2 14 #define SCE_SML_COMMENT3 15 #define SCE_MARKDOWN_DEFAULT 0 #define SCE_MARKDOWN_LINE_BEGIN 1 #define SCE_MARKDOWN_STRONG1 2 #define SCE_MARKDOWN_STRONG2 3 #define SCE_MARKDOWN_EM1 4 #define SCE_MARKDOWN_EM2 5 #define SCE_MARKDOWN_HEADER1 6 #define SCE_MARKDOWN_HEADER2 7 #define SCE_MARKDOWN_HEADER3 8 #define SCE_MARKDOWN_HEADER4 9 #define SCE_MARKDOWN_HEADER5 10 #define SCE_MARKDOWN_HEADER6 11 #define SCE_MARKDOWN_PRECHAR 12 #define SCE_MARKDOWN_ULIST_ITEM 13 #define SCE_MARKDOWN_OLIST_ITEM 14 #define SCE_MARKDOWN_BLOCKQUOTE 15 #define SCE_MARKDOWN_STRIKEOUT 16 #define SCE_MARKDOWN_HRULE 17 #define SCE_MARKDOWN_LINK 18 #define SCE_MARKDOWN_CODE 19 #define SCE_MARKDOWN_CODE2 20 #define SCE_MARKDOWN_CODEBK 21 #define SCE_TXT2TAGS_DEFAULT 0 #define SCE_TXT2TAGS_LINE_BEGIN 1 #define SCE_TXT2TAGS_STRONG1 2 #define SCE_TXT2TAGS_STRONG2 3 #define SCE_TXT2TAGS_EM1 4 #define SCE_TXT2TAGS_EM2 5 #define SCE_TXT2TAGS_HEADER1 6 #define SCE_TXT2TAGS_HEADER2 7 #define SCE_TXT2TAGS_HEADER3 8 #define SCE_TXT2TAGS_HEADER4 9 #define SCE_TXT2TAGS_HEADER5 10 #define SCE_TXT2TAGS_HEADER6 11 #define SCE_TXT2TAGS_PRECHAR 12 #define SCE_TXT2TAGS_ULIST_ITEM 13 #define SCE_TXT2TAGS_OLIST_ITEM 14 #define SCE_TXT2TAGS_BLOCKQUOTE 15 #define SCE_TXT2TAGS_STRIKEOUT 16 #define SCE_TXT2TAGS_HRULE 17 #define SCE_TXT2TAGS_LINK 18 #define SCE_TXT2TAGS_CODE 19 #define SCE_TXT2TAGS_CODE2 20 #define SCE_TXT2TAGS_CODEBK 21 #define SCE_TXT2TAGS_COMMENT 22 #define SCE_TXT2TAGS_OPTION 23 #define SCE_TXT2TAGS_PREPROC 24 #define SCE_TXT2TAGS_POSTPROC 25 #define SCE_A68K_DEFAULT 0 #define SCE_A68K_COMMENT 1 #define SCE_A68K_NUMBER_DEC 2 #define SCE_A68K_NUMBER_BIN 3 #define SCE_A68K_NUMBER_HEX 4 #define SCE_A68K_STRING1 5 #define SCE_A68K_OPERATOR 6 #define SCE_A68K_CPUINSTRUCTION 7 #define SCE_A68K_EXTINSTRUCTION 8 #define SCE_A68K_REGISTER 9 #define SCE_A68K_DIRECTIVE 10 #define SCE_A68K_MACRO_ARG 11 #define SCE_A68K_LABEL 12 #define SCE_A68K_STRING2 13 #define SCE_A68K_IDENTIFIER 14 #define SCE_A68K_MACRO_DECLARATION 15 #define SCE_A68K_COMMENT_WORD 16 #define SCE_A68K_COMMENT_SPECIAL 17 #define SCE_A68K_COMMENT_DOXYGEN 18 #define SCE_MODULA_DEFAULT 0 #define SCE_MODULA_COMMENT 1 #define SCE_MODULA_DOXYCOMM 2 #define SCE_MODULA_DOXYKEY 3 #define SCE_MODULA_KEYWORD 4 #define SCE_MODULA_RESERVED 5 #define SCE_MODULA_NUMBER 6 #define SCE_MODULA_BASENUM 7 #define SCE_MODULA_FLOAT 8 #define SCE_MODULA_STRING 9 #define SCE_MODULA_STRSPEC 10 #define SCE_MODULA_CHAR 11 #define SCE_MODULA_CHARSPEC 12 #define SCE_MODULA_PROC 13 #define SCE_MODULA_PRAGMA 14 #define SCE_MODULA_PRGKEY 15 #define SCE_MODULA_OPERATOR 16 #define SCE_MODULA_BADSTR 17 #define SCE_COFFEESCRIPT_DEFAULT 0 #define SCE_COFFEESCRIPT_COMMENT 1 #define SCE_COFFEESCRIPT_COMMENTLINE 2 #define SCE_COFFEESCRIPT_COMMENTDOC 3 #define SCE_COFFEESCRIPT_NUMBER 4 #define SCE_COFFEESCRIPT_WORD 5 #define SCE_COFFEESCRIPT_STRING 6 #define SCE_COFFEESCRIPT_CHARACTER 7 #define SCE_COFFEESCRIPT_UUID 8 #define SCE_COFFEESCRIPT_PREPROCESSOR 9 #define SCE_COFFEESCRIPT_OPERATOR 10 #define SCE_COFFEESCRIPT_IDENTIFIER 11 #define SCE_COFFEESCRIPT_STRINGEOL 12 #define SCE_COFFEESCRIPT_VERBATIM 13 #define SCE_COFFEESCRIPT_REGEX 14 #define SCE_COFFEESCRIPT_COMMENTLINEDOC 15 #define SCE_COFFEESCRIPT_WORD2 16 #define SCE_COFFEESCRIPT_COMMENTDOCKEYWORD 17 #define SCE_COFFEESCRIPT_COMMENTDOCKEYWORDERROR 18 #define SCE_COFFEESCRIPT_GLOBALCLASS 19 #define SCE_COFFEESCRIPT_STRINGRAW 20 #define SCE_COFFEESCRIPT_TRIPLEVERBATIM 21 #define SCE_COFFEESCRIPT_COMMENTBLOCK 22 #define SCE_COFFEESCRIPT_VERBOSE_REGEX 23 #define SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT 24 #define SCE_COFFEESCRIPT_INSTANCEPROPERTY 25 #define SCE_AVS_DEFAULT 0 #define SCE_AVS_COMMENTBLOCK 1 #define SCE_AVS_COMMENTBLOCKN 2 #define SCE_AVS_COMMENTLINE 3 #define SCE_AVS_NUMBER 4 #define SCE_AVS_OPERATOR 5 #define SCE_AVS_IDENTIFIER 6 #define SCE_AVS_STRING 7 #define SCE_AVS_TRIPLESTRING 8 #define SCE_AVS_KEYWORD 9 #define SCE_AVS_FILTER 10 #define SCE_AVS_PLUGIN 11 #define SCE_AVS_FUNCTION 12 #define SCE_AVS_CLIPPROP 13 #define SCE_AVS_USERDFN 14 #define SCE_ECL_DEFAULT 0 #define SCE_ECL_COMMENT 1 #define SCE_ECL_COMMENTLINE 2 #define SCE_ECL_NUMBER 3 #define SCE_ECL_STRING 4 #define SCE_ECL_WORD0 5 #define SCE_ECL_OPERATOR 6 #define SCE_ECL_CHARACTER 7 #define SCE_ECL_UUID 8 #define SCE_ECL_PREPROCESSOR 9 #define SCE_ECL_UNKNOWN 10 #define SCE_ECL_IDENTIFIER 11 #define SCE_ECL_STRINGEOL 12 #define SCE_ECL_VERBATIM 13 #define SCE_ECL_REGEX 14 #define SCE_ECL_COMMENTLINEDOC 15 #define SCE_ECL_WORD1 16 #define SCE_ECL_COMMENTDOCKEYWORD 17 #define SCE_ECL_COMMENTDOCKEYWORDERROR 18 #define SCE_ECL_WORD2 19 #define SCE_ECL_WORD3 20 #define SCE_ECL_WORD4 21 #define SCE_ECL_WORD5 22 #define SCE_ECL_COMMENTDOC 23 #define SCE_ECL_ADDED 24 #define SCE_ECL_DELETED 25 #define SCE_ECL_CHANGED 26 #define SCE_ECL_MOVED 27 #define SCE_OSCRIPT_DEFAULT 0 #define SCE_OSCRIPT_LINE_COMMENT 1 #define SCE_OSCRIPT_BLOCK_COMMENT 2 #define SCE_OSCRIPT_DOC_COMMENT 3 #define SCE_OSCRIPT_PREPROCESSOR 4 #define SCE_OSCRIPT_NUMBER 5 #define SCE_OSCRIPT_SINGLEQUOTE_STRING 6 #define SCE_OSCRIPT_DOUBLEQUOTE_STRING 7 #define SCE_OSCRIPT_CONSTANT 8 #define SCE_OSCRIPT_IDENTIFIER 9 #define SCE_OSCRIPT_GLOBAL 10 #define SCE_OSCRIPT_KEYWORD 11 #define SCE_OSCRIPT_OPERATOR 12 #define SCE_OSCRIPT_LABEL 13 #define SCE_OSCRIPT_TYPE 14 #define SCE_OSCRIPT_FUNCTION 15 #define SCE_OSCRIPT_OBJECT 16 #define SCE_OSCRIPT_PROPERTY 17 #define SCE_OSCRIPT_METHOD 18 #define SCE_VISUALPROLOG_DEFAULT 0 #define SCE_VISUALPROLOG_KEY_MAJOR 1 #define SCE_VISUALPROLOG_KEY_MINOR 2 #define SCE_VISUALPROLOG_KEY_DIRECTIVE 3 #define SCE_VISUALPROLOG_COMMENT_BLOCK 4 #define SCE_VISUALPROLOG_COMMENT_LINE 5 #define SCE_VISUALPROLOG_COMMENT_KEY 6 #define SCE_VISUALPROLOG_COMMENT_KEY_ERROR 7 #define SCE_VISUALPROLOG_IDENTIFIER 8 #define SCE_VISUALPROLOG_VARIABLE 9 #define SCE_VISUALPROLOG_ANONYMOUS 10 #define SCE_VISUALPROLOG_NUMBER 11 #define SCE_VISUALPROLOG_OPERATOR 12 #define SCE_VISUALPROLOG_CHARACTER 13 #define SCE_VISUALPROLOG_CHARACTER_TOO_MANY 14 #define SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR 15 #define SCE_VISUALPROLOG_STRING 16 #define SCE_VISUALPROLOG_STRING_ESCAPE 17 #define SCE_VISUALPROLOG_STRING_ESCAPE_ERROR 18 #define SCE_VISUALPROLOG_STRING_EOL_OPEN 19 #define SCE_VISUALPROLOG_STRING_VERBATIM 20 #define SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL 21 #define SCE_VISUALPROLOG_STRING_VERBATIM_EOL 22 #define SCE_STTXT_DEFAULT 0 #define SCE_STTXT_COMMENT 1 #define SCE_STTXT_COMMENTLINE 2 #define SCE_STTXT_KEYWORD 3 #define SCE_STTXT_TYPE 4 #define SCE_STTXT_FUNCTION 5 #define SCE_STTXT_FB 6 #define SCE_STTXT_NUMBER 7 #define SCE_STTXT_HEXNUMBER 8 #define SCE_STTXT_PRAGMA 9 #define SCE_STTXT_OPERATOR 10 #define SCE_STTXT_CHARACTER 11 #define SCE_STTXT_STRING1 12 #define SCE_STTXT_STRING2 13 #define SCE_STTXT_STRINGEOL 14 #define SCE_STTXT_IDENTIFIER 15 #define SCE_STTXT_DATETIME 16 #define SCE_STTXT_VARS 17 #define SCE_STTXT_PRAGMAS 18 #define SCE_KVIRC_DEFAULT 0 #define SCE_KVIRC_COMMENT 1 #define SCE_KVIRC_COMMENTBLOCK 2 #define SCE_KVIRC_STRING 3 #define SCE_KVIRC_WORD 4 #define SCE_KVIRC_KEYWORD 5 #define SCE_KVIRC_FUNCTION_KEYWORD 6 #define SCE_KVIRC_FUNCTION 7 #define SCE_KVIRC_VARIABLE 8 #define SCE_KVIRC_NUMBER 9 #define SCE_KVIRC_OPERATOR 10 #define SCE_KVIRC_STRING_FUNCTION 11 #define SCE_KVIRC_STRING_VARIABLE 12 #define SCE_RUST_DEFAULT 0 #define SCE_RUST_COMMENTBLOCK 1 #define SCE_RUST_COMMENTLINE 2 #define SCE_RUST_COMMENTBLOCKDOC 3 #define SCE_RUST_COMMENTLINEDOC 4 #define SCE_RUST_NUMBER 5 #define SCE_RUST_WORD 6 #define SCE_RUST_WORD2 7 #define SCE_RUST_WORD3 8 #define SCE_RUST_WORD4 9 #define SCE_RUST_WORD5 10 #define SCE_RUST_WORD6 11 #define SCE_RUST_WORD7 12 #define SCE_RUST_STRING 13 #define SCE_RUST_STRINGR 14 #define SCE_RUST_CHARACTER 15 #define SCE_RUST_OPERATOR 16 #define SCE_RUST_IDENTIFIER 17 #define SCE_RUST_LIFETIME 18 #define SCE_RUST_MACRO 19 #define SCE_RUST_LEXERROR 20 #define SCE_RUST_BYTESTRING 21 #define SCE_RUST_BYTESTRINGR 22 #define SCE_RUST_BYTECHARACTER 23 #define SCE_DMAP_DEFAULT 0 #define SCE_DMAP_COMMENT 1 #define SCE_DMAP_NUMBER 2 #define SCE_DMAP_STRING1 3 #define SCE_DMAP_STRING2 4 #define SCE_DMAP_STRINGEOL 5 #define SCE_DMAP_OPERATOR 6 #define SCE_DMAP_IDENTIFIER 7 #define SCE_DMAP_WORD 8 #define SCE_DMAP_WORD2 9 #define SCE_DMAP_WORD3 10 #define SCE_DMIS_DEFAULT 0 #define SCE_DMIS_COMMENT 1 #define SCE_DMIS_STRING 2 #define SCE_DMIS_NUMBER 3 #define SCE_DMIS_KEYWORD 4 #define SCE_DMIS_MAJORWORD 5 #define SCE_DMIS_MINORWORD 6 #define SCE_DMIS_UNSUPPORTED_MAJOR 7 #define SCE_DMIS_UNSUPPORTED_MINOR 8 #define SCE_DMIS_LABEL 9 #define SCE_REG_DEFAULT 0 #define SCE_REG_COMMENT 1 #define SCE_REG_VALUENAME 2 #define SCE_REG_STRING 3 #define SCE_REG_HEXDIGIT 4 #define SCE_REG_VALUETYPE 5 #define SCE_REG_ADDEDKEY 6 #define SCE_REG_DELETEDKEY 7 #define SCE_REG_ESCAPED 8 #define SCE_REG_KEYPATH_GUID 9 #define SCE_REG_STRING_GUID 10 #define SCE_REG_PARAMETER 11 #define SCE_REG_OPERATOR 12 #define SCE_BIBTEX_DEFAULT 0 #define SCE_BIBTEX_ENTRY 1 #define SCE_BIBTEX_UNKNOWN_ENTRY 2 #define SCE_BIBTEX_KEY 3 #define SCE_BIBTEX_PARAMETER 4 #define SCE_BIBTEX_VALUE 5 #define SCE_BIBTEX_COMMENT 6 #define SCE_HEX_DEFAULT 0 #define SCE_HEX_RECSTART 1 #define SCE_HEX_RECTYPE 2 #define SCE_HEX_RECTYPE_UNKNOWN 3 #define SCE_HEX_BYTECOUNT 4 #define SCE_HEX_BYTECOUNT_WRONG 5 #define SCE_HEX_NOADDRESS 6 #define SCE_HEX_DATAADDRESS 7 #define SCE_HEX_RECCOUNT 8 #define SCE_HEX_STARTADDRESS 9 #define SCE_HEX_ADDRESSFIELD_UNKNOWN 10 #define SCE_HEX_EXTENDEDADDRESS 11 #define SCE_HEX_DATA_ODD 12 #define SCE_HEX_DATA_EVEN 13 #define SCE_HEX_DATA_UNKNOWN 14 #define SCE_HEX_DATA_EMPTY 15 #define SCE_HEX_CHECKSUM 16 #define SCE_HEX_CHECKSUM_WRONG 17 #define SCE_HEX_GARBAGE 18 #define SCE_JSON_DEFAULT 0 #define SCE_JSON_NUMBER 1 #define SCE_JSON_STRING 2 #define SCE_JSON_STRINGEOL 3 #define SCE_JSON_PROPERTYNAME 4 #define SCE_JSON_ESCAPESEQUENCE 5 #define SCE_JSON_LINECOMMENT 6 #define SCE_JSON_BLOCKCOMMENT 7 #define SCE_JSON_OPERATOR 8 #define SCE_JSON_URI 9 #define SCE_JSON_COMPACTIRI 10 #define SCE_JSON_KEYWORD 11 #define SCE_JSON_LDKEYWORD 12 #define SCE_JSON_ERROR 13 #define SCE_EDI_DEFAULT 0 #define SCE_EDI_SEGMENTSTART 1 #define SCE_EDI_SEGMENTEND 2 #define SCE_EDI_SEP_ELEMENT 3 #define SCE_EDI_SEP_COMPOSITE 4 #define SCE_EDI_SEP_RELEASE 5 #define SCE_EDI_UNA 6 #define SCE_EDI_UNH 7 #define SCE_EDI_BADSEGMENT 8 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ #endif sqlitebrowser-3.11.2/libs/qscintilla/include/Sci_Position.h000066400000000000000000000013231345112435200237740ustar00rootroot00000000000000// Scintilla source code edit control /** @file Sci_Position.h ** Define the Sci_Position type used in Scintilla's external interfaces. ** These need to be available to clients written in C so are not in a C++ namespace. **/ // Copyright 2015 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SCI_POSITION_H #define SCI_POSITION_H // Basic signed type used throughout interface typedef int Sci_Position; // Unsigned variant used for ILexer::Lex and ILexer::Fold typedef unsigned int Sci_PositionU; // For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE typedef long Sci_PositionCR; #endif sqlitebrowser-3.11.2/libs/qscintilla/include/Scintilla.h000066400000000000000000001123621345112435200233220ustar00rootroot00000000000000/* Scintilla source code edit control */ /** @file Scintilla.h ** Interface to the edit control. **/ /* Copyright 1998-2003 by Neil Hodgson * The License.txt file describes the conditions under which this software may be distributed. */ /* Most of this file is automatically generated from the Scintilla.iface interface definition * file which contains any comments about the definitions. HFacer.py does the generation. */ #ifndef SCINTILLA_H #define SCINTILLA_H #ifdef __cplusplus extern "C" { #endif #if defined(_WIN32) /* Return false on failure: */ int Scintilla_RegisterClasses(void *hInstance); int Scintilla_ReleaseResources(void); #endif int Scintilla_LinkLexers(void); #ifdef __cplusplus } #endif // Include header that defines basic numeric types. #if defined(_MSC_VER) // Older releases of MSVC did not have stdint.h. #include #else #include #endif // Define uptr_t, an unsigned integer type large enough to hold a pointer. typedef uintptr_t uptr_t; // Define sptr_t, a signed integer large enough to hold a pointer. typedef intptr_t sptr_t; #include "Sci_Position.h" typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ #define INVALID_POSITION -1 #define SCI_START 2000 #define SCI_OPTIONAL_START 3000 #define SCI_LEXER_START 4000 #define SCI_ADDTEXT 2001 #define SCI_ADDSTYLEDTEXT 2002 #define SCI_INSERTTEXT 2003 #define SCI_CHANGEINSERTION 2672 #define SCI_CLEARALL 2004 #define SCI_DELETERANGE 2645 #define SCI_CLEARDOCUMENTSTYLE 2005 #define SCI_GETLENGTH 2006 #define SCI_GETCHARAT 2007 #define SCI_GETCURRENTPOS 2008 #define SCI_GETANCHOR 2009 #define SCI_GETSTYLEAT 2010 #define SCI_REDO 2011 #define SCI_SETUNDOCOLLECTION 2012 #define SCI_SELECTALL 2013 #define SCI_SETSAVEPOINT 2014 #define SCI_GETSTYLEDTEXT 2015 #define SCI_CANREDO 2016 #define SCI_MARKERLINEFROMHANDLE 2017 #define SCI_MARKERDELETEHANDLE 2018 #define SCI_GETUNDOCOLLECTION 2019 #define SCWS_INVISIBLE 0 #define SCWS_VISIBLEALWAYS 1 #define SCWS_VISIBLEAFTERINDENT 2 #define SCWS_VISIBLEONLYININDENT 3 #define SCI_GETVIEWWS 2020 #define SCI_SETVIEWWS 2021 #define SCTD_LONGARROW 0 #define SCTD_STRIKEOUT 1 #define SCI_GETTABDRAWMODE 2698 #define SCI_SETTABDRAWMODE 2699 #define SCI_POSITIONFROMPOINT 2022 #define SCI_POSITIONFROMPOINTCLOSE 2023 #define SCI_GOTOLINE 2024 #define SCI_GOTOPOS 2025 #define SCI_SETANCHOR 2026 #define SCI_GETCURLINE 2027 #define SCI_GETENDSTYLED 2028 #define SC_EOL_CRLF 0 #define SC_EOL_CR 1 #define SC_EOL_LF 2 #define SCI_CONVERTEOLS 2029 #define SCI_GETEOLMODE 2030 #define SCI_SETEOLMODE 2031 #define SCI_STARTSTYLING 2032 #define SCI_SETSTYLING 2033 #define SCI_GETBUFFEREDDRAW 2034 #define SCI_SETBUFFEREDDRAW 2035 #define SCI_SETTABWIDTH 2036 #define SCI_GETTABWIDTH 2121 #define SCI_CLEARTABSTOPS 2675 #define SCI_ADDTABSTOP 2676 #define SCI_GETNEXTTABSTOP 2677 #define SC_CP_UTF8 65001 #define SCI_SETCODEPAGE 2037 #define SC_IME_WINDOWED 0 #define SC_IME_INLINE 1 #define SCI_GETIMEINTERACTION 2678 #define SCI_SETIMEINTERACTION 2679 #define MARKER_MAX 31 #define SC_MARK_CIRCLE 0 #define SC_MARK_ROUNDRECT 1 #define SC_MARK_ARROW 2 #define SC_MARK_SMALLRECT 3 #define SC_MARK_SHORTARROW 4 #define SC_MARK_EMPTY 5 #define SC_MARK_ARROWDOWN 6 #define SC_MARK_MINUS 7 #define SC_MARK_PLUS 8 #define SC_MARK_VLINE 9 #define SC_MARK_LCORNER 10 #define SC_MARK_TCORNER 11 #define SC_MARK_BOXPLUS 12 #define SC_MARK_BOXPLUSCONNECTED 13 #define SC_MARK_BOXMINUS 14 #define SC_MARK_BOXMINUSCONNECTED 15 #define SC_MARK_LCORNERCURVE 16 #define SC_MARK_TCORNERCURVE 17 #define SC_MARK_CIRCLEPLUS 18 #define SC_MARK_CIRCLEPLUSCONNECTED 19 #define SC_MARK_CIRCLEMINUS 20 #define SC_MARK_CIRCLEMINUSCONNECTED 21 #define SC_MARK_BACKGROUND 22 #define SC_MARK_DOTDOTDOT 23 #define SC_MARK_ARROWS 24 #define SC_MARK_PIXMAP 25 #define SC_MARK_FULLRECT 26 #define SC_MARK_LEFTRECT 27 #define SC_MARK_AVAILABLE 28 #define SC_MARK_UNDERLINE 29 #define SC_MARK_RGBAIMAGE 30 #define SC_MARK_BOOKMARK 31 #define SC_MARK_CHARACTER 10000 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 #define SC_MARKNUM_FOLDERMIDTAIL 27 #define SC_MARKNUM_FOLDERTAIL 28 #define SC_MARKNUM_FOLDERSUB 29 #define SC_MARKNUM_FOLDER 30 #define SC_MARKNUM_FOLDEROPEN 31 #define SC_MASK_FOLDERS 0xFE000000 #define SCI_MARKERDEFINE 2040 #define SCI_MARKERSETFORE 2041 #define SCI_MARKERSETBACK 2042 #define SCI_MARKERSETBACKSELECTED 2292 #define SCI_MARKERENABLEHIGHLIGHT 2293 #define SCI_MARKERADD 2043 #define SCI_MARKERDELETE 2044 #define SCI_MARKERDELETEALL 2045 #define SCI_MARKERGET 2046 #define SCI_MARKERNEXT 2047 #define SCI_MARKERPREVIOUS 2048 #define SCI_MARKERDEFINEPIXMAP 2049 #define SCI_MARKERADDSET 2466 #define SCI_MARKERSETALPHA 2476 #define SC_MAX_MARGIN 4 #define SC_MARGIN_SYMBOL 0 #define SC_MARGIN_NUMBER 1 #define SC_MARGIN_BACK 2 #define SC_MARGIN_FORE 3 #define SC_MARGIN_TEXT 4 #define SC_MARGIN_RTEXT 5 #define SC_MARGIN_COLOUR 6 #define SCI_SETMARGINTYPEN 2240 #define SCI_GETMARGINTYPEN 2241 #define SCI_SETMARGINWIDTHN 2242 #define SCI_GETMARGINWIDTHN 2243 #define SCI_SETMARGINMASKN 2244 #define SCI_GETMARGINMASKN 2245 #define SCI_SETMARGINSENSITIVEN 2246 #define SCI_GETMARGINSENSITIVEN 2247 #define SCI_SETMARGINCURSORN 2248 #define SCI_GETMARGINCURSORN 2249 #define SCI_SETMARGINBACKN 2250 #define SCI_GETMARGINBACKN 2251 #define SCI_SETMARGINS 2252 #define SCI_GETMARGINS 2253 #define STYLE_DEFAULT 32 #define STYLE_LINENUMBER 33 #define STYLE_BRACELIGHT 34 #define STYLE_BRACEBAD 35 #define STYLE_CONTROLCHAR 36 #define STYLE_INDENTGUIDE 37 #define STYLE_CALLTIP 38 #define STYLE_FOLDDISPLAYTEXT 39 #define STYLE_LASTPREDEFINED 39 #define STYLE_MAX 255 #define SC_CHARSET_ANSI 0 #define SC_CHARSET_DEFAULT 1 #define SC_CHARSET_BALTIC 186 #define SC_CHARSET_CHINESEBIG5 136 #define SC_CHARSET_EASTEUROPE 238 #define SC_CHARSET_GB2312 134 #define SC_CHARSET_GREEK 161 #define SC_CHARSET_HANGUL 129 #define SC_CHARSET_MAC 77 #define SC_CHARSET_OEM 255 #define SC_CHARSET_RUSSIAN 204 #define SC_CHARSET_OEM866 866 #define SC_CHARSET_CYRILLIC 1251 #define SC_CHARSET_SHIFTJIS 128 #define SC_CHARSET_SYMBOL 2 #define SC_CHARSET_TURKISH 162 #define SC_CHARSET_JOHAB 130 #define SC_CHARSET_HEBREW 177 #define SC_CHARSET_ARABIC 178 #define SC_CHARSET_VIETNAMESE 163 #define SC_CHARSET_THAI 222 #define SC_CHARSET_8859_15 1000 #define SCI_STYLECLEARALL 2050 #define SCI_STYLESETFORE 2051 #define SCI_STYLESETBACK 2052 #define SCI_STYLESETBOLD 2053 #define SCI_STYLESETITALIC 2054 #define SCI_STYLESETSIZE 2055 #define SCI_STYLESETFONT 2056 #define SCI_STYLESETEOLFILLED 2057 #define SCI_STYLERESETDEFAULT 2058 #define SCI_STYLESETUNDERLINE 2059 #define SC_CASE_MIXED 0 #define SC_CASE_UPPER 1 #define SC_CASE_LOWER 2 #define SC_CASE_CAMEL 3 #define SCI_STYLEGETFORE 2481 #define SCI_STYLEGETBACK 2482 #define SCI_STYLEGETBOLD 2483 #define SCI_STYLEGETITALIC 2484 #define SCI_STYLEGETSIZE 2485 #define SCI_STYLEGETFONT 2486 #define SCI_STYLEGETEOLFILLED 2487 #define SCI_STYLEGETUNDERLINE 2488 #define SCI_STYLEGETCASE 2489 #define SCI_STYLEGETCHARACTERSET 2490 #define SCI_STYLEGETVISIBLE 2491 #define SCI_STYLEGETCHANGEABLE 2492 #define SCI_STYLEGETHOTSPOT 2493 #define SCI_STYLESETCASE 2060 #define SC_FONT_SIZE_MULTIPLIER 100 #define SCI_STYLESETSIZEFRACTIONAL 2061 #define SCI_STYLEGETSIZEFRACTIONAL 2062 #define SC_WEIGHT_NORMAL 400 #define SC_WEIGHT_SEMIBOLD 600 #define SC_WEIGHT_BOLD 700 #define SCI_STYLESETWEIGHT 2063 #define SCI_STYLEGETWEIGHT 2064 #define SCI_STYLESETCHARACTERSET 2066 #define SCI_STYLESETHOTSPOT 2409 #define SCI_SETSELFORE 2067 #define SCI_SETSELBACK 2068 #define SCI_GETSELALPHA 2477 #define SCI_SETSELALPHA 2478 #define SCI_GETSELEOLFILLED 2479 #define SCI_SETSELEOLFILLED 2480 #define SCI_SETCARETFORE 2069 #define SCI_ASSIGNCMDKEY 2070 #define SCI_CLEARCMDKEY 2071 #define SCI_CLEARALLCMDKEYS 2072 #define SCI_SETSTYLINGEX 2073 #define SCI_STYLESETVISIBLE 2074 #define SCI_GETCARETPERIOD 2075 #define SCI_SETCARETPERIOD 2076 #define SCI_SETWORDCHARS 2077 #define SCI_GETWORDCHARS 2646 #define SCI_BEGINUNDOACTION 2078 #define SCI_ENDUNDOACTION 2079 #define INDIC_PLAIN 0 #define INDIC_SQUIGGLE 1 #define INDIC_TT 2 #define INDIC_DIAGONAL 3 #define INDIC_STRIKE 4 #define INDIC_HIDDEN 5 #define INDIC_BOX 6 #define INDIC_ROUNDBOX 7 #define INDIC_STRAIGHTBOX 8 #define INDIC_DASH 9 #define INDIC_DOTS 10 #define INDIC_SQUIGGLELOW 11 #define INDIC_DOTBOX 12 #define INDIC_SQUIGGLEPIXMAP 13 #define INDIC_COMPOSITIONTHICK 14 #define INDIC_COMPOSITIONTHIN 15 #define INDIC_FULLBOX 16 #define INDIC_TEXTFORE 17 #define INDIC_POINT 18 #define INDIC_POINTCHARACTER 19 #define INDIC_IME 32 #define INDIC_IME_MAX 35 #define INDIC_MAX 35 #define INDIC_CONTAINER 8 #define INDIC0_MASK 0x20 #define INDIC1_MASK 0x40 #define INDIC2_MASK 0x80 #define INDICS_MASK 0xE0 #define SCI_INDICSETSTYLE 2080 #define SCI_INDICGETSTYLE 2081 #define SCI_INDICSETFORE 2082 #define SCI_INDICGETFORE 2083 #define SCI_INDICSETUNDER 2510 #define SCI_INDICGETUNDER 2511 #define SCI_INDICSETHOVERSTYLE 2680 #define SCI_INDICGETHOVERSTYLE 2681 #define SCI_INDICSETHOVERFORE 2682 #define SCI_INDICGETHOVERFORE 2683 #define SC_INDICVALUEBIT 0x1000000 #define SC_INDICVALUEMASK 0xFFFFFF #define SC_INDICFLAG_VALUEFORE 1 #define SCI_INDICSETFLAGS 2684 #define SCI_INDICGETFLAGS 2685 #define SCI_SETWHITESPACEFORE 2084 #define SCI_SETWHITESPACEBACK 2085 #define SCI_SETWHITESPACESIZE 2086 #define SCI_GETWHITESPACESIZE 2087 #define SCI_SETSTYLEBITS 2090 #define SCI_GETSTYLEBITS 2091 #define SCI_SETLINESTATE 2092 #define SCI_GETLINESTATE 2093 #define SCI_GETMAXLINESTATE 2094 #define SCI_GETCARETLINEVISIBLE 2095 #define SCI_SETCARETLINEVISIBLE 2096 #define SCI_GETCARETLINEBACK 2097 #define SCI_SETCARETLINEBACK 2098 #define SCI_STYLESETCHANGEABLE 2099 #define SCI_AUTOCSHOW 2100 #define SCI_AUTOCCANCEL 2101 #define SCI_AUTOCACTIVE 2102 #define SCI_AUTOCPOSSTART 2103 #define SCI_AUTOCCOMPLETE 2104 #define SCI_AUTOCSTOPS 2105 #define SCI_AUTOCSETSEPARATOR 2106 #define SCI_AUTOCGETSEPARATOR 2107 #define SCI_AUTOCSELECT 2108 #define SCI_AUTOCSETCANCELATSTART 2110 #define SCI_AUTOCGETCANCELATSTART 2111 #define SCI_AUTOCSETFILLUPS 2112 #define SCI_AUTOCSETCHOOSESINGLE 2113 #define SCI_AUTOCGETCHOOSESINGLE 2114 #define SCI_AUTOCSETIGNORECASE 2115 #define SCI_AUTOCGETIGNORECASE 2116 #define SCI_USERLISTSHOW 2117 #define SCI_AUTOCSETAUTOHIDE 2118 #define SCI_AUTOCGETAUTOHIDE 2119 #define SCI_AUTOCSETDROPRESTOFWORD 2270 #define SCI_AUTOCGETDROPRESTOFWORD 2271 #define SCI_REGISTERIMAGE 2405 #define SCI_CLEARREGISTEREDIMAGES 2408 #define SCI_AUTOCGETTYPESEPARATOR 2285 #define SCI_AUTOCSETTYPESEPARATOR 2286 #define SCI_AUTOCSETMAXWIDTH 2208 #define SCI_AUTOCGETMAXWIDTH 2209 #define SCI_AUTOCSETMAXHEIGHT 2210 #define SCI_AUTOCGETMAXHEIGHT 2211 #define SCI_SETINDENT 2122 #define SCI_GETINDENT 2123 #define SCI_SETUSETABS 2124 #define SCI_GETUSETABS 2125 #define SCI_SETLINEINDENTATION 2126 #define SCI_GETLINEINDENTATION 2127 #define SCI_GETLINEINDENTPOSITION 2128 #define SCI_GETCOLUMN 2129 #define SCI_COUNTCHARACTERS 2633 #define SCI_SETHSCROLLBAR 2130 #define SCI_GETHSCROLLBAR 2131 #define SC_IV_NONE 0 #define SC_IV_REAL 1 #define SC_IV_LOOKFORWARD 2 #define SC_IV_LOOKBOTH 3 #define SCI_SETINDENTATIONGUIDES 2132 #define SCI_GETINDENTATIONGUIDES 2133 #define SCI_SETHIGHLIGHTGUIDE 2134 #define SCI_GETHIGHLIGHTGUIDE 2135 #define SCI_GETLINEENDPOSITION 2136 #define SCI_GETCODEPAGE 2137 #define SCI_GETCARETFORE 2138 #define SCI_GETREADONLY 2140 #define SCI_SETCURRENTPOS 2141 #define SCI_SETSELECTIONSTART 2142 #define SCI_GETSELECTIONSTART 2143 #define SCI_SETSELECTIONEND 2144 #define SCI_GETSELECTIONEND 2145 #define SCI_SETEMPTYSELECTION 2556 #define SCI_SETPRINTMAGNIFICATION 2146 #define SCI_GETPRINTMAGNIFICATION 2147 #define SC_PRINT_NORMAL 0 #define SC_PRINT_INVERTLIGHT 1 #define SC_PRINT_BLACKONWHITE 2 #define SC_PRINT_COLOURONWHITE 3 #define SC_PRINT_COLOURONWHITEDEFAULTBG 4 #define SCI_SETPRINTCOLOURMODE 2148 #define SCI_GETPRINTCOLOURMODE 2149 #define SCFIND_WHOLEWORD 0x2 #define SCFIND_MATCHCASE 0x4 #define SCFIND_WORDSTART 0x00100000 #define SCFIND_REGEXP 0x00200000 #define SCFIND_POSIX 0x00400000 #define SCFIND_CXX11REGEX 0x00800000 #define SCI_FINDTEXT 2150 #define SCI_FORMATRANGE 2151 #define SCI_GETFIRSTVISIBLELINE 2152 #define SCI_GETLINE 2153 #define SCI_GETLINECOUNT 2154 #define SCI_SETMARGINLEFT 2155 #define SCI_GETMARGINLEFT 2156 #define SCI_SETMARGINRIGHT 2157 #define SCI_GETMARGINRIGHT 2158 #define SCI_GETMODIFY 2159 #define SCI_SETSEL 2160 #define SCI_GETSELTEXT 2161 #define SCI_GETTEXTRANGE 2162 #define SCI_HIDESELECTION 2163 #define SCI_POINTXFROMPOSITION 2164 #define SCI_POINTYFROMPOSITION 2165 #define SCI_LINEFROMPOSITION 2166 #define SCI_POSITIONFROMLINE 2167 #define SCI_LINESCROLL 2168 #define SCI_SCROLLCARET 2169 #define SCI_SCROLLRANGE 2569 #define SCI_REPLACESEL 2170 #define SCI_SETREADONLY 2171 #define SCI_NULL 2172 #define SCI_CANPASTE 2173 #define SCI_CANUNDO 2174 #define SCI_EMPTYUNDOBUFFER 2175 #define SCI_UNDO 2176 #define SCI_CUT 2177 #define SCI_COPY 2178 #define SCI_PASTE 2179 #define SCI_CLEAR 2180 #define SCI_SETTEXT 2181 #define SCI_GETTEXT 2182 #define SCI_GETTEXTLENGTH 2183 #define SCI_GETDIRECTFUNCTION 2184 #define SCI_GETDIRECTPOINTER 2185 #define SCI_SETOVERTYPE 2186 #define SCI_GETOVERTYPE 2187 #define SCI_SETCARETWIDTH 2188 #define SCI_GETCARETWIDTH 2189 #define SCI_SETTARGETSTART 2190 #define SCI_GETTARGETSTART 2191 #define SCI_SETTARGETEND 2192 #define SCI_GETTARGETEND 2193 #define SCI_SETTARGETRANGE 2686 #define SCI_GETTARGETTEXT 2687 #define SCI_TARGETFROMSELECTION 2287 #define SCI_TARGETWHOLEDOCUMENT 2690 #define SCI_REPLACETARGET 2194 #define SCI_REPLACETARGETRE 2195 #define SCI_SEARCHINTARGET 2197 #define SCI_SETSEARCHFLAGS 2198 #define SCI_GETSEARCHFLAGS 2199 #define SCI_CALLTIPSHOW 2200 #define SCI_CALLTIPCANCEL 2201 #define SCI_CALLTIPACTIVE 2202 #define SCI_CALLTIPPOSSTART 2203 #define SCI_CALLTIPSETPOSSTART 2214 #define SCI_CALLTIPSETHLT 2204 #define SCI_CALLTIPSETBACK 2205 #define SCI_CALLTIPSETFORE 2206 #define SCI_CALLTIPSETFOREHLT 2207 #define SCI_CALLTIPUSESTYLE 2212 #define SCI_CALLTIPSETPOSITION 2213 #define SCI_VISIBLEFROMDOCLINE 2220 #define SCI_DOCLINEFROMVISIBLE 2221 #define SCI_WRAPCOUNT 2235 #define SC_FOLDLEVELBASE 0x400 #define SC_FOLDLEVELWHITEFLAG 0x1000 #define SC_FOLDLEVELHEADERFLAG 0x2000 #define SC_FOLDLEVELNUMBERMASK 0x0FFF #define SCI_SETFOLDLEVEL 2222 #define SCI_GETFOLDLEVEL 2223 #define SCI_GETLASTCHILD 2224 #define SCI_GETFOLDPARENT 2225 #define SCI_SHOWLINES 2226 #define SCI_HIDELINES 2227 #define SCI_GETLINEVISIBLE 2228 #define SCI_GETALLLINESVISIBLE 2236 #define SCI_SETFOLDEXPANDED 2229 #define SCI_GETFOLDEXPANDED 2230 #define SCI_TOGGLEFOLD 2231 #define SCI_TOGGLEFOLDSHOWTEXT 2700 #define SC_FOLDDISPLAYTEXT_HIDDEN 0 #define SC_FOLDDISPLAYTEXT_STANDARD 1 #define SC_FOLDDISPLAYTEXT_BOXED 2 #define SCI_FOLDDISPLAYTEXTSETSTYLE 2701 #define SC_FOLDACTION_CONTRACT 0 #define SC_FOLDACTION_EXPAND 1 #define SC_FOLDACTION_TOGGLE 2 #define SCI_FOLDLINE 2237 #define SCI_FOLDCHILDREN 2238 #define SCI_EXPANDCHILDREN 2239 #define SCI_FOLDALL 2662 #define SCI_ENSUREVISIBLE 2232 #define SC_AUTOMATICFOLD_SHOW 0x0001 #define SC_AUTOMATICFOLD_CLICK 0x0002 #define SC_AUTOMATICFOLD_CHANGE 0x0004 #define SCI_SETAUTOMATICFOLD 2663 #define SCI_GETAUTOMATICFOLD 2664 #define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 #define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 #define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 #define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 #define SC_FOLDFLAG_LEVELNUMBERS 0x0040 #define SC_FOLDFLAG_LINESTATE 0x0080 #define SCI_SETFOLDFLAGS 2233 #define SCI_ENSUREVISIBLEENFORCEPOLICY 2234 #define SCI_SETTABINDENTS 2260 #define SCI_GETTABINDENTS 2261 #define SCI_SETBACKSPACEUNINDENTS 2262 #define SCI_GETBACKSPACEUNINDENTS 2263 #define SC_TIME_FOREVER 10000000 #define SCI_SETMOUSEDWELLTIME 2264 #define SCI_GETMOUSEDWELLTIME 2265 #define SCI_WORDSTARTPOSITION 2266 #define SCI_WORDENDPOSITION 2267 #define SCI_ISRANGEWORD 2691 #define SC_IDLESTYLING_NONE 0 #define SC_IDLESTYLING_TOVISIBLE 1 #define SC_IDLESTYLING_AFTERVISIBLE 2 #define SC_IDLESTYLING_ALL 3 #define SCI_SETIDLESTYLING 2692 #define SCI_GETIDLESTYLING 2693 #define SC_WRAP_NONE 0 #define SC_WRAP_WORD 1 #define SC_WRAP_CHAR 2 #define SC_WRAP_WHITESPACE 3 #define SCI_SETWRAPMODE 2268 #define SCI_GETWRAPMODE 2269 #define SC_WRAPVISUALFLAG_NONE 0x0000 #define SC_WRAPVISUALFLAG_END 0x0001 #define SC_WRAPVISUALFLAG_START 0x0002 #define SC_WRAPVISUALFLAG_MARGIN 0x0004 #define SCI_SETWRAPVISUALFLAGS 2460 #define SCI_GETWRAPVISUALFLAGS 2461 #define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000 #define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 #define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 #define SCI_SETWRAPVISUALFLAGSLOCATION 2462 #define SCI_GETWRAPVISUALFLAGSLOCATION 2463 #define SCI_SETWRAPSTARTINDENT 2464 #define SCI_GETWRAPSTARTINDENT 2465 #define SC_WRAPINDENT_FIXED 0 #define SC_WRAPINDENT_SAME 1 #define SC_WRAPINDENT_INDENT 2 #define SCI_SETWRAPINDENTMODE 2472 #define SCI_GETWRAPINDENTMODE 2473 #define SC_CACHE_NONE 0 #define SC_CACHE_CARET 1 #define SC_CACHE_PAGE 2 #define SC_CACHE_DOCUMENT 3 #define SCI_SETLAYOUTCACHE 2272 #define SCI_GETLAYOUTCACHE 2273 #define SCI_SETSCROLLWIDTH 2274 #define SCI_GETSCROLLWIDTH 2275 #define SCI_SETSCROLLWIDTHTRACKING 2516 #define SCI_GETSCROLLWIDTHTRACKING 2517 #define SCI_TEXTWIDTH 2276 #define SCI_SETENDATLASTLINE 2277 #define SCI_GETENDATLASTLINE 2278 #define SCI_TEXTHEIGHT 2279 #define SCI_SETVSCROLLBAR 2280 #define SCI_GETVSCROLLBAR 2281 #define SCI_APPENDTEXT 2282 #define SCI_GETTWOPHASEDRAW 2283 #define SCI_SETTWOPHASEDRAW 2284 #define SC_PHASES_ONE 0 #define SC_PHASES_TWO 1 #define SC_PHASES_MULTIPLE 2 #define SCI_GETPHASESDRAW 2673 #define SCI_SETPHASESDRAW 2674 #define SC_EFF_QUALITY_MASK 0xF #define SC_EFF_QUALITY_DEFAULT 0 #define SC_EFF_QUALITY_NON_ANTIALIASED 1 #define SC_EFF_QUALITY_ANTIALIASED 2 #define SC_EFF_QUALITY_LCD_OPTIMIZED 3 #define SCI_SETFONTQUALITY 2611 #define SCI_GETFONTQUALITY 2612 #define SCI_SETFIRSTVISIBLELINE 2613 #define SC_MULTIPASTE_ONCE 0 #define SC_MULTIPASTE_EACH 1 #define SCI_SETMULTIPASTE 2614 #define SCI_GETMULTIPASTE 2615 #define SCI_GETTAG 2616 #define SCI_LINESJOIN 2288 #define SCI_LINESSPLIT 2289 #define SCI_SETFOLDMARGINCOLOUR 2290 #define SCI_SETFOLDMARGINHICOLOUR 2291 #define SCI_LINEDOWN 2300 #define SCI_LINEDOWNEXTEND 2301 #define SCI_LINEUP 2302 #define SCI_LINEUPEXTEND 2303 #define SCI_CHARLEFT 2304 #define SCI_CHARLEFTEXTEND 2305 #define SCI_CHARRIGHT 2306 #define SCI_CHARRIGHTEXTEND 2307 #define SCI_WORDLEFT 2308 #define SCI_WORDLEFTEXTEND 2309 #define SCI_WORDRIGHT 2310 #define SCI_WORDRIGHTEXTEND 2311 #define SCI_HOME 2312 #define SCI_HOMEEXTEND 2313 #define SCI_LINEEND 2314 #define SCI_LINEENDEXTEND 2315 #define SCI_DOCUMENTSTART 2316 #define SCI_DOCUMENTSTARTEXTEND 2317 #define SCI_DOCUMENTEND 2318 #define SCI_DOCUMENTENDEXTEND 2319 #define SCI_PAGEUP 2320 #define SCI_PAGEUPEXTEND 2321 #define SCI_PAGEDOWN 2322 #define SCI_PAGEDOWNEXTEND 2323 #define SCI_EDITTOGGLEOVERTYPE 2324 #define SCI_CANCEL 2325 #define SCI_DELETEBACK 2326 #define SCI_TAB 2327 #define SCI_BACKTAB 2328 #define SCI_NEWLINE 2329 #define SCI_FORMFEED 2330 #define SCI_VCHOME 2331 #define SCI_VCHOMEEXTEND 2332 #define SCI_ZOOMIN 2333 #define SCI_ZOOMOUT 2334 #define SCI_DELWORDLEFT 2335 #define SCI_DELWORDRIGHT 2336 #define SCI_DELWORDRIGHTEND 2518 #define SCI_LINECUT 2337 #define SCI_LINEDELETE 2338 #define SCI_LINETRANSPOSE 2339 #define SCI_LINEDUPLICATE 2404 #define SCI_LOWERCASE 2340 #define SCI_UPPERCASE 2341 #define SCI_LINESCROLLDOWN 2342 #define SCI_LINESCROLLUP 2343 #define SCI_DELETEBACKNOTLINE 2344 #define SCI_HOMEDISPLAY 2345 #define SCI_HOMEDISPLAYEXTEND 2346 #define SCI_LINEENDDISPLAY 2347 #define SCI_LINEENDDISPLAYEXTEND 2348 #define SCI_HOMEWRAP 2349 #define SCI_HOMEWRAPEXTEND 2450 #define SCI_LINEENDWRAP 2451 #define SCI_LINEENDWRAPEXTEND 2452 #define SCI_VCHOMEWRAP 2453 #define SCI_VCHOMEWRAPEXTEND 2454 #define SCI_LINECOPY 2455 #define SCI_MOVECARETINSIDEVIEW 2401 #define SCI_LINELENGTH 2350 #define SCI_BRACEHIGHLIGHT 2351 #define SCI_BRACEHIGHLIGHTINDICATOR 2498 #define SCI_BRACEBADLIGHT 2352 #define SCI_BRACEBADLIGHTINDICATOR 2499 #define SCI_BRACEMATCH 2353 #define SCI_GETVIEWEOL 2355 #define SCI_SETVIEWEOL 2356 #define SCI_GETDOCPOINTER 2357 #define SCI_SETDOCPOINTER 2358 #define SCI_SETMODEVENTMASK 2359 #define EDGE_NONE 0 #define EDGE_LINE 1 #define EDGE_BACKGROUND 2 #define EDGE_MULTILINE 3 #define SCI_GETEDGECOLUMN 2360 #define SCI_SETEDGECOLUMN 2361 #define SCI_GETEDGEMODE 2362 #define SCI_SETEDGEMODE 2363 #define SCI_GETEDGECOLOUR 2364 #define SCI_SETEDGECOLOUR 2365 #define SCI_MULTIEDGEADDLINE 2694 #define SCI_MULTIEDGECLEARALL 2695 #define SCI_SEARCHANCHOR 2366 #define SCI_SEARCHNEXT 2367 #define SCI_SEARCHPREV 2368 #define SCI_LINESONSCREEN 2370 #define SC_POPUP_NEVER 0 #define SC_POPUP_ALL 1 #define SC_POPUP_TEXT 2 #define SCI_USEPOPUP 2371 #define SCI_SELECTIONISRECTANGLE 2372 #define SCI_SETZOOM 2373 #define SCI_GETZOOM 2374 #define SCI_CREATEDOCUMENT 2375 #define SCI_ADDREFDOCUMENT 2376 #define SCI_RELEASEDOCUMENT 2377 #define SCI_GETMODEVENTMASK 2378 #define SCI_SETFOCUS 2380 #define SCI_GETFOCUS 2381 #define SC_STATUS_OK 0 #define SC_STATUS_FAILURE 1 #define SC_STATUS_BADALLOC 2 #define SC_STATUS_WARN_START 1000 #define SC_STATUS_WARN_REGEX 1001 #define SCI_SETSTATUS 2382 #define SCI_GETSTATUS 2383 #define SCI_SETMOUSEDOWNCAPTURES 2384 #define SCI_GETMOUSEDOWNCAPTURES 2385 #define SCI_SETMOUSEWHEELCAPTURES 2696 #define SCI_GETMOUSEWHEELCAPTURES 2697 #define SC_CURSORNORMAL -1 #define SC_CURSORARROW 2 #define SC_CURSORWAIT 4 #define SC_CURSORREVERSEARROW 7 #define SCI_SETCURSOR 2386 #define SCI_GETCURSOR 2387 #define SCI_SETCONTROLCHARSYMBOL 2388 #define SCI_GETCONTROLCHARSYMBOL 2389 #define SCI_WORDPARTLEFT 2390 #define SCI_WORDPARTLEFTEXTEND 2391 #define SCI_WORDPARTRIGHT 2392 #define SCI_WORDPARTRIGHTEXTEND 2393 #define VISIBLE_SLOP 0x01 #define VISIBLE_STRICT 0x04 #define SCI_SETVISIBLEPOLICY 2394 #define SCI_DELLINELEFT 2395 #define SCI_DELLINERIGHT 2396 #define SCI_SETXOFFSET 2397 #define SCI_GETXOFFSET 2398 #define SCI_CHOOSECARETX 2399 #define SCI_GRABFOCUS 2400 #define CARET_SLOP 0x01 #define CARET_STRICT 0x04 #define CARET_JUMPS 0x10 #define CARET_EVEN 0x08 #define SCI_SETXCARETPOLICY 2402 #define SCI_SETYCARETPOLICY 2403 #define SCI_SETPRINTWRAPMODE 2406 #define SCI_GETPRINTWRAPMODE 2407 #define SCI_SETHOTSPOTACTIVEFORE 2410 #define SCI_GETHOTSPOTACTIVEFORE 2494 #define SCI_SETHOTSPOTACTIVEBACK 2411 #define SCI_GETHOTSPOTACTIVEBACK 2495 #define SCI_SETHOTSPOTACTIVEUNDERLINE 2412 #define SCI_GETHOTSPOTACTIVEUNDERLINE 2496 #define SCI_SETHOTSPOTSINGLELINE 2421 #define SCI_GETHOTSPOTSINGLELINE 2497 #define SCI_PARADOWN 2413 #define SCI_PARADOWNEXTEND 2414 #define SCI_PARAUP 2415 #define SCI_PARAUPEXTEND 2416 #define SCI_POSITIONBEFORE 2417 #define SCI_POSITIONAFTER 2418 #define SCI_POSITIONRELATIVE 2670 #define SCI_COPYRANGE 2419 #define SCI_COPYTEXT 2420 #define SC_SEL_STREAM 0 #define SC_SEL_RECTANGLE 1 #define SC_SEL_LINES 2 #define SC_SEL_THIN 3 #define SCI_SETSELECTIONMODE 2422 #define SCI_GETSELECTIONMODE 2423 #define SCI_GETLINESELSTARTPOSITION 2424 #define SCI_GETLINESELENDPOSITION 2425 #define SCI_LINEDOWNRECTEXTEND 2426 #define SCI_LINEUPRECTEXTEND 2427 #define SCI_CHARLEFTRECTEXTEND 2428 #define SCI_CHARRIGHTRECTEXTEND 2429 #define SCI_HOMERECTEXTEND 2430 #define SCI_VCHOMERECTEXTEND 2431 #define SCI_LINEENDRECTEXTEND 2432 #define SCI_PAGEUPRECTEXTEND 2433 #define SCI_PAGEDOWNRECTEXTEND 2434 #define SCI_STUTTEREDPAGEUP 2435 #define SCI_STUTTEREDPAGEUPEXTEND 2436 #define SCI_STUTTEREDPAGEDOWN 2437 #define SCI_STUTTEREDPAGEDOWNEXTEND 2438 #define SCI_WORDLEFTEND 2439 #define SCI_WORDLEFTENDEXTEND 2440 #define SCI_WORDRIGHTEND 2441 #define SCI_WORDRIGHTENDEXTEND 2442 #define SCI_SETWHITESPACECHARS 2443 #define SCI_GETWHITESPACECHARS 2647 #define SCI_SETPUNCTUATIONCHARS 2648 #define SCI_GETPUNCTUATIONCHARS 2649 #define SCI_SETCHARSDEFAULT 2444 #define SCI_AUTOCGETCURRENT 2445 #define SCI_AUTOCGETCURRENTTEXT 2610 #define SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE 0 #define SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE 1 #define SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR 2634 #define SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR 2635 #define SC_MULTIAUTOC_ONCE 0 #define SC_MULTIAUTOC_EACH 1 #define SCI_AUTOCSETMULTI 2636 #define SCI_AUTOCGETMULTI 2637 #define SC_ORDER_PRESORTED 0 #define SC_ORDER_PERFORMSORT 1 #define SC_ORDER_CUSTOM 2 #define SCI_AUTOCSETORDER 2660 #define SCI_AUTOCGETORDER 2661 #define SCI_ALLOCATE 2446 #define SCI_TARGETASUTF8 2447 #define SCI_SETLENGTHFORENCODE 2448 #define SCI_ENCODEDFROMUTF8 2449 #define SCI_FINDCOLUMN 2456 #define SCI_GETCARETSTICKY 2457 #define SCI_SETCARETSTICKY 2458 #define SC_CARETSTICKY_OFF 0 #define SC_CARETSTICKY_ON 1 #define SC_CARETSTICKY_WHITESPACE 2 #define SCI_TOGGLECARETSTICKY 2459 #define SCI_SETPASTECONVERTENDINGS 2467 #define SCI_GETPASTECONVERTENDINGS 2468 #define SCI_SELECTIONDUPLICATE 2469 #define SC_ALPHA_TRANSPARENT 0 #define SC_ALPHA_OPAQUE 255 #define SC_ALPHA_NOALPHA 256 #define SCI_SETCARETLINEBACKALPHA 2470 #define SCI_GETCARETLINEBACKALPHA 2471 #define CARETSTYLE_INVISIBLE 0 #define CARETSTYLE_LINE 1 #define CARETSTYLE_BLOCK 2 #define SCI_SETCARETSTYLE 2512 #define SCI_GETCARETSTYLE 2513 #define SCI_SETINDICATORCURRENT 2500 #define SCI_GETINDICATORCURRENT 2501 #define SCI_SETINDICATORVALUE 2502 #define SCI_GETINDICATORVALUE 2503 #define SCI_INDICATORFILLRANGE 2504 #define SCI_INDICATORCLEARRANGE 2505 #define SCI_INDICATORALLONFOR 2506 #define SCI_INDICATORVALUEAT 2507 #define SCI_INDICATORSTART 2508 #define SCI_INDICATOREND 2509 #define SCI_SETPOSITIONCACHE 2514 #define SCI_GETPOSITIONCACHE 2515 #define SCI_COPYALLOWLINE 2519 #define SCI_GETCHARACTERPOINTER 2520 #define SCI_GETRANGEPOINTER 2643 #define SCI_GETGAPPOSITION 2644 #define SCI_INDICSETALPHA 2523 #define SCI_INDICGETALPHA 2524 #define SCI_INDICSETOUTLINEALPHA 2558 #define SCI_INDICGETOUTLINEALPHA 2559 #define SCI_SETEXTRAASCENT 2525 #define SCI_GETEXTRAASCENT 2526 #define SCI_SETEXTRADESCENT 2527 #define SCI_GETEXTRADESCENT 2528 #define SCI_MARKERSYMBOLDEFINED 2529 #define SCI_MARGINSETTEXT 2530 #define SCI_MARGINGETTEXT 2531 #define SCI_MARGINSETSTYLE 2532 #define SCI_MARGINGETSTYLE 2533 #define SCI_MARGINSETSTYLES 2534 #define SCI_MARGINGETSTYLES 2535 #define SCI_MARGINTEXTCLEARALL 2536 #define SCI_MARGINSETSTYLEOFFSET 2537 #define SCI_MARGINGETSTYLEOFFSET 2538 #define SC_MARGINOPTION_NONE 0 #define SC_MARGINOPTION_SUBLINESELECT 1 #define SCI_SETMARGINOPTIONS 2539 #define SCI_GETMARGINOPTIONS 2557 #define SCI_ANNOTATIONSETTEXT 2540 #define SCI_ANNOTATIONGETTEXT 2541 #define SCI_ANNOTATIONSETSTYLE 2542 #define SCI_ANNOTATIONGETSTYLE 2543 #define SCI_ANNOTATIONSETSTYLES 2544 #define SCI_ANNOTATIONGETSTYLES 2545 #define SCI_ANNOTATIONGETLINES 2546 #define SCI_ANNOTATIONCLEARALL 2547 #define ANNOTATION_HIDDEN 0 #define ANNOTATION_STANDARD 1 #define ANNOTATION_BOXED 2 #define ANNOTATION_INDENTED 3 #define SCI_ANNOTATIONSETVISIBLE 2548 #define SCI_ANNOTATIONGETVISIBLE 2549 #define SCI_ANNOTATIONSETSTYLEOFFSET 2550 #define SCI_ANNOTATIONGETSTYLEOFFSET 2551 #define SCI_RELEASEALLEXTENDEDSTYLES 2552 #define SCI_ALLOCATEEXTENDEDSTYLES 2553 #define UNDO_MAY_COALESCE 1 #define SCI_ADDUNDOACTION 2560 #define SCI_CHARPOSITIONFROMPOINT 2561 #define SCI_CHARPOSITIONFROMPOINTCLOSE 2562 #define SCI_SETMOUSESELECTIONRECTANGULARSWITCH 2668 #define SCI_GETMOUSESELECTIONRECTANGULARSWITCH 2669 #define SCI_SETMULTIPLESELECTION 2563 #define SCI_GETMULTIPLESELECTION 2564 #define SCI_SETADDITIONALSELECTIONTYPING 2565 #define SCI_GETADDITIONALSELECTIONTYPING 2566 #define SCI_SETADDITIONALCARETSBLINK 2567 #define SCI_GETADDITIONALCARETSBLINK 2568 #define SCI_SETADDITIONALCARETSVISIBLE 2608 #define SCI_GETADDITIONALCARETSVISIBLE 2609 #define SCI_GETSELECTIONS 2570 #define SCI_GETSELECTIONEMPTY 2650 #define SCI_CLEARSELECTIONS 2571 #define SCI_SETSELECTION 2572 #define SCI_ADDSELECTION 2573 #define SCI_DROPSELECTIONN 2671 #define SCI_SETMAINSELECTION 2574 #define SCI_GETMAINSELECTION 2575 #define SCI_SETSELECTIONNCARET 2576 #define SCI_GETSELECTIONNCARET 2577 #define SCI_SETSELECTIONNANCHOR 2578 #define SCI_GETSELECTIONNANCHOR 2579 #define SCI_SETSELECTIONNCARETVIRTUALSPACE 2580 #define SCI_GETSELECTIONNCARETVIRTUALSPACE 2581 #define SCI_SETSELECTIONNANCHORVIRTUALSPACE 2582 #define SCI_GETSELECTIONNANCHORVIRTUALSPACE 2583 #define SCI_SETSELECTIONNSTART 2584 #define SCI_GETSELECTIONNSTART 2585 #define SCI_SETSELECTIONNEND 2586 #define SCI_GETSELECTIONNEND 2587 #define SCI_SETRECTANGULARSELECTIONCARET 2588 #define SCI_GETRECTANGULARSELECTIONCARET 2589 #define SCI_SETRECTANGULARSELECTIONANCHOR 2590 #define SCI_GETRECTANGULARSELECTIONANCHOR 2591 #define SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE 2592 #define SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE 2593 #define SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2594 #define SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE 2595 #define SCVS_NONE 0 #define SCVS_RECTANGULARSELECTION 1 #define SCVS_USERACCESSIBLE 2 #define SCVS_NOWRAPLINESTART 4 #define SCI_SETVIRTUALSPACEOPTIONS 2596 #define SCI_GETVIRTUALSPACEOPTIONS 2597 #define SCI_SETRECTANGULARSELECTIONMODIFIER 2598 #define SCI_GETRECTANGULARSELECTIONMODIFIER 2599 #define SCI_SETADDITIONALSELFORE 2600 #define SCI_SETADDITIONALSELBACK 2601 #define SCI_SETADDITIONALSELALPHA 2602 #define SCI_GETADDITIONALSELALPHA 2603 #define SCI_SETADDITIONALCARETFORE 2604 #define SCI_GETADDITIONALCARETFORE 2605 #define SCI_ROTATESELECTION 2606 #define SCI_SWAPMAINANCHORCARET 2607 #define SCI_MULTIPLESELECTADDNEXT 2688 #define SCI_MULTIPLESELECTADDEACH 2689 #define SCI_CHANGELEXERSTATE 2617 #define SCI_CONTRACTEDFOLDNEXT 2618 #define SCI_VERTICALCENTRECARET 2619 #define SCI_MOVESELECTEDLINESUP 2620 #define SCI_MOVESELECTEDLINESDOWN 2621 #define SCI_SETIDENTIFIER 2622 #define SCI_GETIDENTIFIER 2623 #define SCI_RGBAIMAGESETWIDTH 2624 #define SCI_RGBAIMAGESETHEIGHT 2625 #define SCI_RGBAIMAGESETSCALE 2651 #define SCI_MARKERDEFINERGBAIMAGE 2626 #define SCI_REGISTERRGBAIMAGE 2627 #define SCI_SCROLLTOSTART 2628 #define SCI_SCROLLTOEND 2629 #define SC_TECHNOLOGY_DEFAULT 0 #define SC_TECHNOLOGY_DIRECTWRITE 1 #define SC_TECHNOLOGY_DIRECTWRITERETAIN 2 #define SC_TECHNOLOGY_DIRECTWRITEDC 3 #define SCI_SETTECHNOLOGY 2630 #define SCI_GETTECHNOLOGY 2631 #define SCI_CREATELOADER 2632 #define SCI_FINDINDICATORSHOW 2640 #define SCI_FINDINDICATORFLASH 2641 #define SCI_FINDINDICATORHIDE 2642 #define SCI_VCHOMEDISPLAY 2652 #define SCI_VCHOMEDISPLAYEXTEND 2653 #define SCI_GETCARETLINEVISIBLEALWAYS 2654 #define SCI_SETCARETLINEVISIBLEALWAYS 2655 #define SC_LINE_END_TYPE_DEFAULT 0 #define SC_LINE_END_TYPE_UNICODE 1 #define SCI_SETLINEENDTYPESALLOWED 2656 #define SCI_GETLINEENDTYPESALLOWED 2657 #define SCI_GETLINEENDTYPESACTIVE 2658 #define SCI_SETREPRESENTATION 2665 #define SCI_GETREPRESENTATION 2666 #define SCI_CLEARREPRESENTATION 2667 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 #define SCI_SETLEXER 4001 #define SCI_GETLEXER 4002 #define SCI_COLOURISE 4003 #define SCI_SETPROPERTY 4004 #define KEYWORDSET_MAX 8 #define SCI_SETKEYWORDS 4005 #define SCI_SETLEXERLANGUAGE 4006 #define SCI_LOADLEXERLIBRARY 4007 #define SCI_GETPROPERTY 4008 #define SCI_GETPROPERTYEXPANDED 4009 #define SCI_GETPROPERTYINT 4010 #define SCI_GETSTYLEBITSNEEDED 4011 #define SCI_GETLEXERLANGUAGE 4012 #define SCI_PRIVATELEXERCALL 4013 #define SCI_PROPERTYNAMES 4014 #define SC_TYPE_BOOLEAN 0 #define SC_TYPE_INTEGER 1 #define SC_TYPE_STRING 2 #define SCI_PROPERTYTYPE 4015 #define SCI_DESCRIBEPROPERTY 4016 #define SCI_DESCRIBEKEYWORDSETS 4017 #define SCI_GETLINEENDTYPESSUPPORTED 4018 #define SCI_ALLOCATESUBSTYLES 4020 #define SCI_GETSUBSTYLESSTART 4021 #define SCI_GETSUBSTYLESLENGTH 4022 #define SCI_GETSTYLEFROMSUBSTYLE 4027 #define SCI_GETPRIMARYSTYLEFROMSTYLE 4028 #define SCI_FREESUBSTYLES 4023 #define SCI_SETIDENTIFIERS 4024 #define SCI_DISTANCETOSECONDARYSTYLES 4025 #define SCI_GETSUBSTYLEBASES 4026 #define SC_MOD_INSERTTEXT 0x1 #define SC_MOD_DELETETEXT 0x2 #define SC_MOD_CHANGESTYLE 0x4 #define SC_MOD_CHANGEFOLD 0x8 #define SC_PERFORMED_USER 0x10 #define SC_PERFORMED_UNDO 0x20 #define SC_PERFORMED_REDO 0x40 #define SC_MULTISTEPUNDOREDO 0x80 #define SC_LASTSTEPINUNDOREDO 0x100 #define SC_MOD_CHANGEMARKER 0x200 #define SC_MOD_BEFOREINSERT 0x400 #define SC_MOD_BEFOREDELETE 0x800 #define SC_MULTILINEUNDOREDO 0x1000 #define SC_STARTACTION 0x2000 #define SC_MOD_CHANGEINDICATOR 0x4000 #define SC_MOD_CHANGELINESTATE 0x8000 #define SC_MOD_CHANGEMARGIN 0x10000 #define SC_MOD_CHANGEANNOTATION 0x20000 #define SC_MOD_CONTAINER 0x40000 #define SC_MOD_LEXERSTATE 0x80000 #define SC_MOD_INSERTCHECK 0x100000 #define SC_MOD_CHANGETABSTOPS 0x200000 #define SC_MODEVENTMASKALL 0x3FFFFF #define SC_UPDATE_CONTENT 0x1 #define SC_UPDATE_SELECTION 0x2 #define SC_UPDATE_V_SCROLL 0x4 #define SC_UPDATE_H_SCROLL 0x8 #define SCEN_CHANGE 768 #define SCEN_SETFOCUS 512 #define SCEN_KILLFOCUS 256 #define SCK_DOWN 300 #define SCK_UP 301 #define SCK_LEFT 302 #define SCK_RIGHT 303 #define SCK_HOME 304 #define SCK_END 305 #define SCK_PRIOR 306 #define SCK_NEXT 307 #define SCK_DELETE 308 #define SCK_INSERT 309 #define SCK_ESCAPE 7 #define SCK_BACK 8 #define SCK_TAB 9 #define SCK_RETURN 13 #define SCK_ADD 310 #define SCK_SUBTRACT 311 #define SCK_DIVIDE 312 #define SCK_WIN 313 #define SCK_RWIN 314 #define SCK_MENU 315 #define SCMOD_NORM 0 #define SCMOD_SHIFT 1 #define SCMOD_CTRL 2 #define SCMOD_ALT 4 #define SCMOD_SUPER 8 #define SCMOD_META 16 #define SC_AC_FILLUP 1 #define SC_AC_DOUBLECLICK 2 #define SC_AC_TAB 3 #define SC_AC_NEWLINE 4 #define SC_AC_COMMAND 5 #define SCN_STYLENEEDED 2000 #define SCN_CHARADDED 2001 #define SCN_SAVEPOINTREACHED 2002 #define SCN_SAVEPOINTLEFT 2003 #define SCN_MODIFYATTEMPTRO 2004 #define SCN_KEY 2005 #define SCN_DOUBLECLICK 2006 #define SCN_UPDATEUI 2007 #define SCN_MODIFIED 2008 #define SCN_MACRORECORD 2009 #define SCN_MARGINCLICK 2010 #define SCN_NEEDSHOWN 2011 #define SCN_PAINTED 2013 #define SCN_USERLISTSELECTION 2014 #define SCN_URIDROPPED 2015 #define SCN_DWELLSTART 2016 #define SCN_DWELLEND 2017 #define SCN_ZOOM 2018 #define SCN_HOTSPOTCLICK 2019 #define SCN_HOTSPOTDOUBLECLICK 2020 #define SCN_CALLTIPCLICK 2021 #define SCN_AUTOCSELECTION 2022 #define SCN_INDICATORCLICK 2023 #define SCN_INDICATORRELEASE 2024 #define SCN_AUTOCCANCELLED 2025 #define SCN_AUTOCCHARDELETED 2026 #define SCN_HOTSPOTRELEASECLICK 2027 #define SCN_FOCUSIN 2028 #define SCN_FOCUSOUT 2029 #define SCN_AUTOCCOMPLETED 2030 #define SCN_MARGINRIGHTCLICK 2031 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ /* These structures are defined to be exactly the same shape as the Win32 * CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs. * So older code that treats Scintilla as a RichEdit will work. */ struct Sci_CharacterRange { Sci_PositionCR cpMin; Sci_PositionCR cpMax; }; struct Sci_TextRange { struct Sci_CharacterRange chrg; char *lpstrText; }; struct Sci_TextToFind { struct Sci_CharacterRange chrg; const char *lpstrText; struct Sci_CharacterRange chrgText; }; typedef void *Sci_SurfaceID; struct Sci_Rectangle { int left; int top; int right; int bottom; }; /* This structure is used in printing and requires some of the graphics types * from Platform.h. Not needed by most client code. */ struct Sci_RangeToFormat { Sci_SurfaceID hdc; Sci_SurfaceID hdcTarget; struct Sci_Rectangle rc; struct Sci_Rectangle rcPage; struct Sci_CharacterRange chrg; }; #ifndef __cplusplus /* For the GTK+ platform, g-ir-scanner needs to have these typedefs. This * is not required in C++ code and actually seems to break ScintillaEditPy */ typedef struct Sci_NotifyHeader Sci_NotifyHeader; typedef struct SCNotification SCNotification; #endif struct Sci_NotifyHeader { /* Compatible with Windows NMHDR. * hwndFrom is really an environment specific window handle or pointer * but most clients of Scintilla.h do not have this type visible. */ void *hwndFrom; uptr_t idFrom; unsigned int code; }; struct SCNotification { Sci_NotifyHeader nmhdr; Sci_Position position; /* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, */ /* SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, */ /* SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, */ /* SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */ /* SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */ int ch; /* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETED, SCN_AUTOCSELECTION, */ /* SCN_USERLISTSELECTION */ int modifiers; /* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, */ /* SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, */ int modificationType; /* SCN_MODIFIED */ const char *text; /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */ Sci_Position length; /* SCN_MODIFIED */ Sci_Position linesAdded; /* SCN_MODIFIED */ int message; /* SCN_MACRORECORD */ uptr_t wParam; /* SCN_MACRORECORD */ sptr_t lParam; /* SCN_MACRORECORD */ Sci_Position line; /* SCN_MODIFIED */ int foldLevelNow; /* SCN_MODIFIED */ int foldLevelPrev; /* SCN_MODIFIED */ int margin; /* SCN_MARGINCLICK */ int listType; /* SCN_USERLISTSELECTION */ int x; /* SCN_DWELLSTART, SCN_DWELLEND */ int y; /* SCN_DWELLSTART, SCN_DWELLEND */ int token; /* SCN_MODIFIED with SC_MOD_CONTAINER */ Sci_Position annotationLinesAdded; /* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */ int updated; /* SCN_UPDATEUI */ int listCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION, */ }; #ifdef INCLUDE_DEPRECATED_FEATURES #define SCI_SETKEYSUNICODE 2521 #define SCI_GETKEYSUNICODE 2522 #define CharacterRange Sci_CharacterRange #define TextRange Sci_TextRange #define TextToFind Sci_TextToFind #define RangeToFormat Sci_RangeToFormat #define NotifyHeader Sci_NotifyHeader #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/include/Scintilla.iface000066400000000000000000004374511345112435200241530ustar00rootroot00000000000000## First line may be used for shbang ## This file defines the interface to Scintilla ## Copyright 2000-2003 by Neil Hodgson ## The License.txt file describes the conditions under which this software may be distributed. ## A line starting with ## is a pure comment and should be stripped by readers. ## A line starting with #! is for future shbang use ## A line starting with # followed by a space is a documentation comment and refers ## to the next feature definition. ## Each feature is defined by a line starting with fun, get, set, val or evt. ## cat -> start a category ## fun -> a function ## get -> a property get function ## set -> a property set function ## val -> definition of a constant ## evt -> an event ## enu -> associate an enumeration with a set of vals with a prefix ## lex -> associate a lexer with the lexical classes it produces ## ## All other feature names should be ignored. They may be defined in the future. ## A property may have a set function, a get function or both. Each will have ## "Get" or "Set" in their names and the corresponding name will have the obvious switch. ## A property may be subscripted, in which case the first parameter is the subscript. ## fun, get, and set features have a strict syntax: ## [=,) ## where stands for white space. ## param may be empty (null value) or is [=] ## Additional white space is allowed between elements. ## The syntax for evt is [=[,]*]) ## Feature names that contain an underscore are defined by Windows, so in these ## cases, using the Windows definition is preferred where available. ## The feature numbers are stable so features will not be renumbered. ## Features may be removed but they will go through a period of deprecation ## before removal which is signalled by moving them into the Deprecated category. ## ## enu has the syntax enu=[]* where all the val ## features in this file starting with a given are considered part of the ## enumeration. ## ## lex has the syntax lex=[]* ## where name is a reasonably capitalised (Python, XML) identifier or UI name, ## lexerVal is the val used to specify the lexer, and the list of prefixes is similar ## to enu. The name may not be the same as that used within the lexer so the lexerVal ## should be used to tie these entities together. ## Types: ## void ## int ## bool -> integer, 1=true, 0=false ## position -> integer position in a document ## colour -> colour integer containing red, green and blue bytes. ## string -> pointer to const character ## stringresult -> pointer to character, NULL-> return size of result ## cells -> pointer to array of cells, each cell containing a style byte and character byte ## textrange -> range of a min and a max position with an output string ## findtext -> searchrange, text -> foundposition ## keymod -> integer containing key in low half and modifiers in high half ## formatrange ## Types no longer used: ## findtextex -> searchrange ## charrange -> range of a min and a max position ## charrangeresult -> like charrange, but output param ## countedstring ## point -> x,y ## pointresult -> like point, but output param ## rectangle -> left,top,right,bottom ## Client code should ignore definitions containing types it does not understand, except ## for possibly #defining the constants ## Line numbers and positions start at 0. ## String arguments may contain NUL ('\0') characters where the calls provide a length ## argument and retrieve NUL characters. APIs marked as NUL-terminated also have a ## NUL appended but client code should calculate the size that will be returned rather ## than relying upon the NUL whenever possible. Allow for the extra NUL character when ## allocating buffers. The size to allocate for a stringresult (not including NUL) can be ## determined by calling with a NULL (0) pointer. cat Basics ################################################ ## For Scintilla.h val INVALID_POSITION=-1 # Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages # as many EM_ messages can be used although that use is deprecated. val SCI_START=2000 val SCI_OPTIONAL_START=3000 val SCI_LEXER_START=4000 # Add text to the document at current position. fun void AddText=2001(int length, string text) # Add array of cells to document. fun void AddStyledText=2002(int length, cells c) # Insert string at a position. fun void InsertText=2003(position pos, string text) # Change the text that is being inserted in response to SC_MOD_INSERTCHECK fun void ChangeInsertion=2672(int length, string text) # Delete all text in the document. fun void ClearAll=2004(,) # Delete a range of text in the document. fun void DeleteRange=2645(position start, int lengthDelete) # Set all style bytes to 0, remove all folding information. fun void ClearDocumentStyle=2005(,) # Returns the number of bytes in the document. get int GetLength=2006(,) # Returns the character byte at the position. get int GetCharAt=2007(position pos,) # Returns the position of the caret. get position GetCurrentPos=2008(,) # Returns the position of the opposite end of the selection to the caret. get position GetAnchor=2009(,) # Returns the style byte at the position. get int GetStyleAt=2010(position pos,) # Redoes the next action on the undo history. fun void Redo=2011(,) # Choose between collecting actions into the undo # history and discarding them. set void SetUndoCollection=2012(bool collectUndo,) # Select all the text in the document. fun void SelectAll=2013(,) # Remember the current position in the undo history as the position # at which the document was saved. fun void SetSavePoint=2014(,) # Retrieve a buffer of cells. # Returns the number of bytes in the buffer not including terminating NULs. fun int GetStyledText=2015(, textrange tr) # Are there any redoable actions in the undo history? fun bool CanRedo=2016(,) # Retrieve the line number at which a particular marker is located. fun int MarkerLineFromHandle=2017(int markerHandle,) # Delete a marker. fun void MarkerDeleteHandle=2018(int markerHandle,) # Is undo history being collected? get bool GetUndoCollection=2019(,) enu WhiteSpace=SCWS_ val SCWS_INVISIBLE=0 val SCWS_VISIBLEALWAYS=1 val SCWS_VISIBLEAFTERINDENT=2 val SCWS_VISIBLEONLYININDENT=3 # Are white space characters currently visible? # Returns one of SCWS_* constants. get int GetViewWS=2020(,) # Make white space characters invisible, always visible or visible outside indentation. set void SetViewWS=2021(int viewWS,) enu TabDrawMode=SCTD_ val SCTD_LONGARROW=0 val SCTD_STRIKEOUT=1 # Retrieve the current tab draw mode. # Returns one of SCTD_* constants. get int GetTabDrawMode=2698(,) # Set how tabs are drawn when visible. set void SetTabDrawMode=2699(int tabDrawMode,) # Find the position from a point within the window. fun position PositionFromPoint=2022(int x, int y) # Find the position from a point within the window but return # INVALID_POSITION if not close to text. fun position PositionFromPointClose=2023(int x, int y) # Set caret to start of a line and ensure it is visible. fun void GotoLine=2024(int line,) # Set caret to a position and ensure it is visible. fun void GotoPos=2025(position caret,) # Set the selection anchor to a position. The anchor is the opposite # end of the selection from the caret. set void SetAnchor=2026(position anchor,) # Retrieve the text of the line containing the caret. # Returns the index of the caret on the line. # Result is NUL-terminated. fun int GetCurLine=2027(int length, stringresult text) # Retrieve the position of the last correctly styled character. get position GetEndStyled=2028(,) enu EndOfLine=SC_EOL_ val SC_EOL_CRLF=0 val SC_EOL_CR=1 val SC_EOL_LF=2 # Convert all line endings in the document to one mode. fun void ConvertEOLs=2029(int eolMode,) # Retrieve the current end of line mode - one of CRLF, CR, or LF. get int GetEOLMode=2030(,) # Set the current end of line mode. set void SetEOLMode=2031(int eolMode,) # Set the current styling position to start. # The unused parameter is no longer used and should be set to 0. fun void StartStyling=2032(position start, int unused) # Change style from current styling position for length characters to a style # and move the current styling position to after this newly styled segment. fun void SetStyling=2033(int length, int style) # Is drawing done first into a buffer or direct to the screen? get bool GetBufferedDraw=2034(,) # If drawing is buffered then each line of text is drawn into a bitmap buffer # before drawing it to the screen to avoid flicker. set void SetBufferedDraw=2035(bool buffered,) # Change the visible size of a tab to be a multiple of the width of a space character. set void SetTabWidth=2036(int tabWidth,) # Retrieve the visible size of a tab. get int GetTabWidth=2121(,) # Clear explicit tabstops on a line. fun void ClearTabStops=2675(int line,) # Add an explicit tab stop for a line. fun void AddTabStop=2676(int line, int x) # Find the next explicit tab stop position on a line after a position. fun int GetNextTabStop=2677(int line, int x) # The SC_CP_UTF8 value can be used to enter Unicode mode. # This is the same value as CP_UTF8 in Windows val SC_CP_UTF8=65001 # Set the code page used to interpret the bytes of the document as characters. # The SC_CP_UTF8 value can be used to enter Unicode mode. set void SetCodePage=2037(int codePage,) enu IMEInteraction=SC_IME_ val SC_IME_WINDOWED=0 val SC_IME_INLINE=1 # Is the IME displayed in a window or inline? get int GetIMEInteraction=2678(,) # Choose to display the the IME in a winow or inline. set void SetIMEInteraction=2679(int imeInteraction,) enu MarkerSymbol=SC_MARK_ val MARKER_MAX=31 val SC_MARK_CIRCLE=0 val SC_MARK_ROUNDRECT=1 val SC_MARK_ARROW=2 val SC_MARK_SMALLRECT=3 val SC_MARK_SHORTARROW=4 val SC_MARK_EMPTY=5 val SC_MARK_ARROWDOWN=6 val SC_MARK_MINUS=7 val SC_MARK_PLUS=8 # Shapes used for outlining column. val SC_MARK_VLINE=9 val SC_MARK_LCORNER=10 val SC_MARK_TCORNER=11 val SC_MARK_BOXPLUS=12 val SC_MARK_BOXPLUSCONNECTED=13 val SC_MARK_BOXMINUS=14 val SC_MARK_BOXMINUSCONNECTED=15 val SC_MARK_LCORNERCURVE=16 val SC_MARK_TCORNERCURVE=17 val SC_MARK_CIRCLEPLUS=18 val SC_MARK_CIRCLEPLUSCONNECTED=19 val SC_MARK_CIRCLEMINUS=20 val SC_MARK_CIRCLEMINUSCONNECTED=21 # Invisible mark that only sets the line background colour. val SC_MARK_BACKGROUND=22 val SC_MARK_DOTDOTDOT=23 val SC_MARK_ARROWS=24 val SC_MARK_PIXMAP=25 val SC_MARK_FULLRECT=26 val SC_MARK_LEFTRECT=27 val SC_MARK_AVAILABLE=28 val SC_MARK_UNDERLINE=29 val SC_MARK_RGBAIMAGE=30 val SC_MARK_BOOKMARK=31 val SC_MARK_CHARACTER=10000 enu MarkerOutline=SC_MARKNUM_ # Markers used for outlining column. val SC_MARKNUM_FOLDEREND=25 val SC_MARKNUM_FOLDEROPENMID=26 val SC_MARKNUM_FOLDERMIDTAIL=27 val SC_MARKNUM_FOLDERTAIL=28 val SC_MARKNUM_FOLDERSUB=29 val SC_MARKNUM_FOLDER=30 val SC_MARKNUM_FOLDEROPEN=31 val SC_MASK_FOLDERS=0xFE000000 # Set the symbol used for a particular marker number. fun void MarkerDefine=2040(int markerNumber, int markerSymbol) # Set the foreground colour used for a particular marker number. set void MarkerSetFore=2041(int markerNumber, colour fore) # Set the background colour used for a particular marker number. set void MarkerSetBack=2042(int markerNumber, colour back) # Set the background colour used for a particular marker number when its folding block is selected. set void MarkerSetBackSelected=2292(int markerNumber, colour back) # Enable/disable highlight for current folding bloc (smallest one that contains the caret) fun void MarkerEnableHighlight=2293(bool enabled,) # Add a marker to a line, returning an ID which can be used to find or delete the marker. fun int MarkerAdd=2043(int line, int markerNumber) # Delete a marker from a line. fun void MarkerDelete=2044(int line, int markerNumber) # Delete all markers with a particular number from all lines. fun void MarkerDeleteAll=2045(int markerNumber,) # Get a bit mask of all the markers set on a line. fun int MarkerGet=2046(int line,) # Find the next line at or after lineStart that includes a marker in mask. # Return -1 when no more lines. fun int MarkerNext=2047(int lineStart, int markerMask) # Find the previous line before lineStart that includes a marker in mask. fun int MarkerPrevious=2048(int lineStart, int markerMask) # Define a marker from a pixmap. fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap) # Add a set of markers to a line. fun void MarkerAddSet=2466(int line, int markerSet) # Set the alpha used for a marker that is drawn in the text area, not the margin. set void MarkerSetAlpha=2476(int markerNumber, int alpha) val SC_MAX_MARGIN=4 enu MarginType=SC_MARGIN_ val SC_MARGIN_SYMBOL=0 val SC_MARGIN_NUMBER=1 val SC_MARGIN_BACK=2 val SC_MARGIN_FORE=3 val SC_MARGIN_TEXT=4 val SC_MARGIN_RTEXT=5 val SC_MARGIN_COLOUR=6 # Set a margin to be either numeric or symbolic. set void SetMarginTypeN=2240(int margin, int marginType) # Retrieve the type of a margin. get int GetMarginTypeN=2241(int margin,) # Set the width of a margin to a width expressed in pixels. set void SetMarginWidthN=2242(int margin, int pixelWidth) # Retrieve the width of a margin in pixels. get int GetMarginWidthN=2243(int margin,) # Set a mask that determines which markers are displayed in a margin. set void SetMarginMaskN=2244(int margin, int mask) # Retrieve the marker mask of a margin. get int GetMarginMaskN=2245(int margin,) # Make a margin sensitive or insensitive to mouse clicks. set void SetMarginSensitiveN=2246(int margin, bool sensitive) # Retrieve the mouse click sensitivity of a margin. get bool GetMarginSensitiveN=2247(int margin,) # Set the cursor shown when the mouse is inside a margin. set void SetMarginCursorN=2248(int margin, int cursor) # Retrieve the cursor shown in a margin. get int GetMarginCursorN=2249(int margin,) # Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. set void SetMarginBackN=2250(int margin, colour back) # Retrieve the background colour of a margin get colour GetMarginBackN=2251(int margin,) # Allocate a non-standard number of margins. set void SetMargins=2252(int margins,) # How many margins are there?. get int GetMargins=2253(,) # Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles. # Style 39 is for future use. enu StylesCommon=STYLE_ val STYLE_DEFAULT=32 val STYLE_LINENUMBER=33 val STYLE_BRACELIGHT=34 val STYLE_BRACEBAD=35 val STYLE_CONTROLCHAR=36 val STYLE_INDENTGUIDE=37 val STYLE_CALLTIP=38 val STYLE_FOLDDISPLAYTEXT=39 val STYLE_LASTPREDEFINED=39 val STYLE_MAX=255 # Character set identifiers are used in StyleSetCharacterSet. # The values are the same as the Windows *_CHARSET values. enu CharacterSet=SC_CHARSET_ val SC_CHARSET_ANSI=0 val SC_CHARSET_DEFAULT=1 val SC_CHARSET_BALTIC=186 val SC_CHARSET_CHINESEBIG5=136 val SC_CHARSET_EASTEUROPE=238 val SC_CHARSET_GB2312=134 val SC_CHARSET_GREEK=161 val SC_CHARSET_HANGUL=129 val SC_CHARSET_MAC=77 val SC_CHARSET_OEM=255 val SC_CHARSET_RUSSIAN=204 val SC_CHARSET_OEM866=866 val SC_CHARSET_CYRILLIC=1251 val SC_CHARSET_SHIFTJIS=128 val SC_CHARSET_SYMBOL=2 val SC_CHARSET_TURKISH=162 val SC_CHARSET_JOHAB=130 val SC_CHARSET_HEBREW=177 val SC_CHARSET_ARABIC=178 val SC_CHARSET_VIETNAMESE=163 val SC_CHARSET_THAI=222 val SC_CHARSET_8859_15=1000 # Clear all the styles and make equivalent to the global default style. fun void StyleClearAll=2050(,) # Set the foreground colour of a style. set void StyleSetFore=2051(int style, colour fore) # Set the background colour of a style. set void StyleSetBack=2052(int style, colour back) # Set a style to be bold or not. set void StyleSetBold=2053(int style, bool bold) # Set a style to be italic or not. set void StyleSetItalic=2054(int style, bool italic) # Set the size of characters of a style. set void StyleSetSize=2055(int style, int sizePoints) # Set the font of a style. set void StyleSetFont=2056(int style, string fontName) # Set a style to have its end of line filled or not. set void StyleSetEOLFilled=2057(int style, bool eolFilled) # Reset the default style to its state at startup fun void StyleResetDefault=2058(,) # Set a style to be underlined or not. set void StyleSetUnderline=2059(int style, bool underline) enu CaseVisible=SC_CASE_ val SC_CASE_MIXED=0 val SC_CASE_UPPER=1 val SC_CASE_LOWER=2 val SC_CASE_CAMEL=3 # Get the foreground colour of a style. get colour StyleGetFore=2481(int style,) # Get the background colour of a style. get colour StyleGetBack=2482(int style,) # Get is a style bold or not. get bool StyleGetBold=2483(int style,) # Get is a style italic or not. get bool StyleGetItalic=2484(int style,) # Get the size of characters of a style. get int StyleGetSize=2485(int style,) # Get the font of a style. # Returns the length of the fontName # Result is NUL-terminated. get int StyleGetFont=2486(int style, stringresult fontName) # Get is a style to have its end of line filled or not. get bool StyleGetEOLFilled=2487(int style,) # Get is a style underlined or not. get bool StyleGetUnderline=2488(int style,) # Get is a style mixed case, or to force upper or lower case. get int StyleGetCase=2489(int style,) # Get the character get of the font in a style. get int StyleGetCharacterSet=2490(int style,) # Get is a style visible or not. get bool StyleGetVisible=2491(int style,) # Get is a style changeable or not (read only). # Experimental feature, currently buggy. get bool StyleGetChangeable=2492(int style,) # Get is a style a hotspot or not. get bool StyleGetHotSpot=2493(int style,) # Set a style to be mixed case, or to force upper or lower case. set void StyleSetCase=2060(int style, int caseVisible) val SC_FONT_SIZE_MULTIPLIER=100 # Set the size of characters of a style. Size is in points multiplied by 100. set void StyleSetSizeFractional=2061(int style, int sizeHundredthPoints) # Get the size of characters of a style in points multiplied by 100 get int StyleGetSizeFractional=2062(int style,) enu FontWeight=SC_WEIGHT_ val SC_WEIGHT_NORMAL=400 val SC_WEIGHT_SEMIBOLD=600 val SC_WEIGHT_BOLD=700 # Set the weight of characters of a style. set void StyleSetWeight=2063(int style, int weight) # Get the weight of characters of a style. get int StyleGetWeight=2064(int style,) # Set the character set of the font in a style. set void StyleSetCharacterSet=2066(int style, int characterSet) # Set a style to be a hotspot or not. set void StyleSetHotSpot=2409(int style, bool hotspot) # Set the foreground colour of the main and additional selections and whether to use this setting. fun void SetSelFore=2067(bool useSetting, colour fore) # Set the background colour of the main and additional selections and whether to use this setting. fun void SetSelBack=2068(bool useSetting, colour back) # Get the alpha of the selection. get int GetSelAlpha=2477(,) # Set the alpha of the selection. set void SetSelAlpha=2478(int alpha,) # Is the selection end of line filled? get bool GetSelEOLFilled=2479(,) # Set the selection to have its end of line filled or not. set void SetSelEOLFilled=2480(bool filled,) # Set the foreground colour of the caret. set void SetCaretFore=2069(colour fore,) # When key+modifier combination keyDefinition is pressed perform sciCommand. fun void AssignCmdKey=2070(keymod keyDefinition, int sciCommand) # When key+modifier combination keyDefinition is pressed do nothing. fun void ClearCmdKey=2071(keymod keyDefinition,) # Drop all key mappings. fun void ClearAllCmdKeys=2072(,) # Set the styles for a segment of the document. fun void SetStylingEx=2073(int length, string styles) # Set a style to be visible or not. set void StyleSetVisible=2074(int style, bool visible) # Get the time in milliseconds that the caret is on and off. get int GetCaretPeriod=2075(,) # Get the time in milliseconds that the caret is on and off. 0 = steady on. set void SetCaretPeriod=2076(int periodMilliseconds,) # Set the set of characters making up words for when moving or selecting by word. # First sets defaults like SetCharsDefault. set void SetWordChars=2077(, string characters) # Get the set of characters making up words for when moving or selecting by word. # Returns the number of characters get int GetWordChars=2646(, stringresult characters) # Start a sequence of actions that is undone and redone as a unit. # May be nested. fun void BeginUndoAction=2078(,) # End a sequence of actions that is undone and redone as a unit. fun void EndUndoAction=2079(,) # Indicator style enumeration and some constants enu IndicatorStyle=INDIC_ val INDIC_PLAIN=0 val INDIC_SQUIGGLE=1 val INDIC_TT=2 val INDIC_DIAGONAL=3 val INDIC_STRIKE=4 val INDIC_HIDDEN=5 val INDIC_BOX=6 val INDIC_ROUNDBOX=7 val INDIC_STRAIGHTBOX=8 val INDIC_DASH=9 val INDIC_DOTS=10 val INDIC_SQUIGGLELOW=11 val INDIC_DOTBOX=12 val INDIC_SQUIGGLEPIXMAP=13 val INDIC_COMPOSITIONTHICK=14 val INDIC_COMPOSITIONTHIN=15 val INDIC_FULLBOX=16 val INDIC_TEXTFORE=17 val INDIC_POINT=18 val INDIC_POINTCHARACTER=19 val INDIC_IME=32 val INDIC_IME_MAX=35 val INDIC_MAX=35 val INDIC_CONTAINER=8 val INDIC0_MASK=0x20 val INDIC1_MASK=0x40 val INDIC2_MASK=0x80 val INDICS_MASK=0xE0 # Set an indicator to plain, squiggle or TT. set void IndicSetStyle=2080(int indicator, int indicatorStyle) # Retrieve the style of an indicator. get int IndicGetStyle=2081(int indicator,) # Set the foreground colour of an indicator. set void IndicSetFore=2082(int indicator, colour fore) # Retrieve the foreground colour of an indicator. get colour IndicGetFore=2083(int indicator,) # Set an indicator to draw under text or over(default). set void IndicSetUnder=2510(int indicator, bool under) # Retrieve whether indicator drawn under or over text. get bool IndicGetUnder=2511(int indicator,) # Set a hover indicator to plain, squiggle or TT. set void IndicSetHoverStyle=2680(int indicator, int indicatorStyle) # Retrieve the hover style of an indicator. get int IndicGetHoverStyle=2681(int indicator,) # Set the foreground hover colour of an indicator. set void IndicSetHoverFore=2682(int indicator, colour fore) # Retrieve the foreground hover colour of an indicator. get colour IndicGetHoverFore=2683(int indicator,) val SC_INDICVALUEBIT=0x1000000 val SC_INDICVALUEMASK=0xFFFFFF enu IndicFlag=SC_INDICFLAG_ val SC_INDICFLAG_VALUEFORE=1 # Set the attributes of an indicator. set void IndicSetFlags=2684(int indicator, int flags) # Retrieve the attributes of an indicator. get int IndicGetFlags=2685(int indicator,) # Set the foreground colour of all whitespace and whether to use this setting. fun void SetWhitespaceFore=2084(bool useSetting, colour fore) # Set the background colour of all whitespace and whether to use this setting. fun void SetWhitespaceBack=2085(bool useSetting, colour back) # Set the size of the dots used to mark space characters. set void SetWhitespaceSize=2086(int size,) # Get the size of the dots used to mark space characters. get int GetWhitespaceSize=2087(,) # Divide each styling byte into lexical class bits (default: 5) and indicator # bits (default: 3). If a lexer requires more than 32 lexical states, then this # is used to expand the possible states. set void SetStyleBits=2090(int bits,) # Retrieve number of bits in style bytes used to hold the lexical state. get int GetStyleBits=2091(,) # Used to hold extra styling information for each line. set void SetLineState=2092(int line, int state) # Retrieve the extra styling information for a line. get int GetLineState=2093(int line,) # Retrieve the last line number that has line state. get int GetMaxLineState=2094(,) # Is the background of the line containing the caret in a different colour? get bool GetCaretLineVisible=2095(,) # Display the background of the line containing the caret in a different colour. set void SetCaretLineVisible=2096(bool show,) # Get the colour of the background of the line containing the caret. get colour GetCaretLineBack=2097(,) # Set the colour of the background of the line containing the caret. set void SetCaretLineBack=2098(colour back,) # Set a style to be changeable or not (read only). # Experimental feature, currently buggy. set void StyleSetChangeable=2099(int style, bool changeable) # Display a auto-completion list. # The lengthEntered parameter indicates how many characters before # the caret should be used to provide context. fun void AutoCShow=2100(int lengthEntered, string itemList) # Remove the auto-completion list from the screen. fun void AutoCCancel=2101(,) # Is there an auto-completion list visible? fun bool AutoCActive=2102(,) # Retrieve the position of the caret when the auto-completion list was displayed. fun position AutoCPosStart=2103(,) # User has selected an item so remove the list and insert the selection. fun void AutoCComplete=2104(,) # Define a set of character that when typed cancel the auto-completion list. fun void AutoCStops=2105(, string characterSet) # Change the separator character in the string setting up an auto-completion list. # Default is space but can be changed if items contain space. set void AutoCSetSeparator=2106(int separatorCharacter,) # Retrieve the auto-completion list separator character. get int AutoCGetSeparator=2107(,) # Select the item in the auto-completion list that starts with a string. fun void AutoCSelect=2108(, string select) # Should the auto-completion list be cancelled if the user backspaces to a # position before where the box was created. set void AutoCSetCancelAtStart=2110(bool cancel,) # Retrieve whether auto-completion cancelled by backspacing before start. get bool AutoCGetCancelAtStart=2111(,) # Define a set of characters that when typed will cause the autocompletion to # choose the selected item. set void AutoCSetFillUps=2112(, string characterSet) # Should a single item auto-completion list automatically choose the item. set void AutoCSetChooseSingle=2113(bool chooseSingle,) # Retrieve whether a single item auto-completion list automatically choose the item. get bool AutoCGetChooseSingle=2114(,) # Set whether case is significant when performing auto-completion searches. set void AutoCSetIgnoreCase=2115(bool ignoreCase,) # Retrieve state of ignore case flag. get bool AutoCGetIgnoreCase=2116(,) # Display a list of strings and send notification when user chooses one. fun void UserListShow=2117(int listType, string itemList) # Set whether or not autocompletion is hidden automatically when nothing matches. set void AutoCSetAutoHide=2118(bool autoHide,) # Retrieve whether or not autocompletion is hidden automatically when nothing matches. get bool AutoCGetAutoHide=2119(,) # Set whether or not autocompletion deletes any word characters # after the inserted text upon completion. set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,) # Retrieve whether or not autocompletion deletes any word characters # after the inserted text upon completion. get bool AutoCGetDropRestOfWord=2271(,) # Register an XPM image for use in autocompletion lists. fun void RegisterImage=2405(int type, string xpmData) # Clear all the registered XPM images. fun void ClearRegisteredImages=2408(,) # Retrieve the auto-completion list type-separator character. get int AutoCGetTypeSeparator=2285(,) # Change the type-separator character in the string setting up an auto-completion list. # Default is '?' but can be changed if items contain '?'. set void AutoCSetTypeSeparator=2286(int separatorCharacter,) # Set the maximum width, in characters, of auto-completion and user lists. # Set to 0 to autosize to fit longest item, which is the default. set void AutoCSetMaxWidth=2208(int characterCount,) # Get the maximum width, in characters, of auto-completion and user lists. get int AutoCGetMaxWidth=2209(,) # Set the maximum height, in rows, of auto-completion and user lists. # The default is 5 rows. set void AutoCSetMaxHeight=2210(int rowCount,) # Set the maximum height, in rows, of auto-completion and user lists. get int AutoCGetMaxHeight=2211(,) # Set the number of spaces used for one level of indentation. set void SetIndent=2122(int indentSize,) # Retrieve indentation size. get int GetIndent=2123(,) # Indentation will only use space characters if useTabs is false, otherwise # it will use a combination of tabs and spaces. set void SetUseTabs=2124(bool useTabs,) # Retrieve whether tabs will be used in indentation. get bool GetUseTabs=2125(,) # Change the indentation of a line to a number of columns. set void SetLineIndentation=2126(int line, int indentation) # Retrieve the number of columns that a line is indented. get int GetLineIndentation=2127(int line,) # Retrieve the position before the first non indentation character on a line. get position GetLineIndentPosition=2128(int line,) # Retrieve the column number of a position, taking tab width into account. get int GetColumn=2129(position pos,) # Count characters between two positions. fun int CountCharacters=2633(position start, position end) # Show or hide the horizontal scroll bar. set void SetHScrollBar=2130(bool visible,) # Is the horizontal scroll bar visible? get bool GetHScrollBar=2131(,) enu IndentView=SC_IV_ val SC_IV_NONE=0 val SC_IV_REAL=1 val SC_IV_LOOKFORWARD=2 val SC_IV_LOOKBOTH=3 # Show or hide indentation guides. set void SetIndentationGuides=2132(int indentView,) # Are the indentation guides visible? get int GetIndentationGuides=2133(,) # Set the highlighted indentation guide column. # 0 = no highlighted guide. set void SetHighlightGuide=2134(int column,) # Get the highlighted indentation guide column. get int GetHighlightGuide=2135(,) # Get the position after the last visible characters on a line. get position GetLineEndPosition=2136(int line,) # Get the code page used to interpret the bytes of the document as characters. get int GetCodePage=2137(,) # Get the foreground colour of the caret. get colour GetCaretFore=2138(,) # In read-only mode? get bool GetReadOnly=2140(,) # Sets the position of the caret. set void SetCurrentPos=2141(position caret,) # Sets the position that starts the selection - this becomes the anchor. set void SetSelectionStart=2142(position anchor,) # Returns the position at the start of the selection. get position GetSelectionStart=2143(,) # Sets the position that ends the selection - this becomes the caret. set void SetSelectionEnd=2144(position caret,) # Returns the position at the end of the selection. get position GetSelectionEnd=2145(,) # Set caret to a position, while removing any existing selection. fun void SetEmptySelection=2556(position caret,) # Sets the print magnification added to the point size of each style for printing. set void SetPrintMagnification=2146(int magnification,) # Returns the print magnification. get int GetPrintMagnification=2147(,) enu PrintOption=SC_PRINT_ # PrintColourMode - use same colours as screen. val SC_PRINT_NORMAL=0 # PrintColourMode - invert the light value of each style for printing. val SC_PRINT_INVERTLIGHT=1 # PrintColourMode - force black text on white background for printing. val SC_PRINT_BLACKONWHITE=2 # PrintColourMode - text stays coloured, but all background is forced to be white for printing. val SC_PRINT_COLOURONWHITE=3 # PrintColourMode - only the default-background is forced to be white for printing. val SC_PRINT_COLOURONWHITEDEFAULTBG=4 # Modify colours when printing for clearer printed text. set void SetPrintColourMode=2148(int mode,) # Returns the print colour mode. get int GetPrintColourMode=2149(,) enu FindOption=SCFIND_ val SCFIND_WHOLEWORD=0x2 val SCFIND_MATCHCASE=0x4 val SCFIND_WORDSTART=0x00100000 val SCFIND_REGEXP=0x00200000 val SCFIND_POSIX=0x00400000 val SCFIND_CXX11REGEX=0x00800000 # Find some text in the document. fun position FindText=2150(int searchFlags, findtext ft) # On Windows, will draw the document into a display context such as a printer. fun position FormatRange=2151(bool draw, formatrange fr) # Retrieve the display line at the top of the display. get int GetFirstVisibleLine=2152(,) # Retrieve the contents of a line. # Returns the length of the line. fun int GetLine=2153(int line, stringresult text) # Returns the number of lines in the document. There is always at least one. get int GetLineCount=2154(,) # Sets the size in pixels of the left margin. set void SetMarginLeft=2155(, int pixelWidth) # Returns the size in pixels of the left margin. get int GetMarginLeft=2156(,) # Sets the size in pixels of the right margin. set void SetMarginRight=2157(, int pixelWidth) # Returns the size in pixels of the right margin. get int GetMarginRight=2158(,) # Is the document different from when it was last saved? get bool GetModify=2159(,) # Select a range of text. fun void SetSel=2160(position anchor, position caret) # Retrieve the selected text. # Return the length of the text. # Result is NUL-terminated. fun int GetSelText=2161(, stringresult text) # Retrieve a range of text. # Return the length of the text. fun int GetTextRange=2162(, textrange tr) # Draw the selection in normal style or with selection highlighted. fun void HideSelection=2163(bool hide,) # Retrieve the x value of the point in the window where a position is displayed. fun int PointXFromPosition=2164(, position pos) # Retrieve the y value of the point in the window where a position is displayed. fun int PointYFromPosition=2165(, position pos) # Retrieve the line containing a position. fun int LineFromPosition=2166(position pos,) # Retrieve the position at the start of a line. fun position PositionFromLine=2167(int line,) # Scroll horizontally and vertically. fun void LineScroll=2168(int columns, int lines) # Ensure the caret is visible. fun void ScrollCaret=2169(,) # Scroll the argument positions and the range between them into view giving # priority to the primary position then the secondary position. # This may be used to make a search match visible. fun void ScrollRange=2569(position secondary, position primary) # Replace the selected text with the argument text. fun void ReplaceSel=2170(, string text) # Set to read only or read write. set void SetReadOnly=2171(bool readOnly,) # Null operation. fun void Null=2172(,) # Will a paste succeed? fun bool CanPaste=2173(,) # Are there any undoable actions in the undo history? fun bool CanUndo=2174(,) # Delete the undo history. fun void EmptyUndoBuffer=2175(,) # Undo one action in the undo history. fun void Undo=2176(,) # Cut the selection to the clipboard. fun void Cut=2177(,) # Copy the selection to the clipboard. fun void Copy=2178(,) # Paste the contents of the clipboard into the document replacing the selection. fun void Paste=2179(,) # Clear the selection. fun void Clear=2180(,) # Replace the contents of the document with the argument text. fun void SetText=2181(, string text) # Retrieve all the text in the document. # Returns number of characters retrieved. # Result is NUL-terminated. fun int GetText=2182(int length, stringresult text) # Retrieve the number of characters in the document. get int GetTextLength=2183(,) # Retrieve a pointer to a function that processes messages for this Scintilla. get int GetDirectFunction=2184(,) # Retrieve a pointer value to use as the first argument when calling # the function returned by GetDirectFunction. get int GetDirectPointer=2185(,) # Set to overtype (true) or insert mode. set void SetOvertype=2186(bool overType,) # Returns true if overtype mode is active otherwise false is returned. get bool GetOvertype=2187(,) # Set the width of the insert mode caret. set void SetCaretWidth=2188(int pixelWidth,) # Returns the width of the insert mode caret. get int GetCaretWidth=2189(,) # Sets the position that starts the target which is used for updating the # document without affecting the scroll position. set void SetTargetStart=2190(position start,) # Get the position that starts the target. get position GetTargetStart=2191(,) # Sets the position that ends the target which is used for updating the # document without affecting the scroll position. set void SetTargetEnd=2192(position end,) # Get the position that ends the target. get position GetTargetEnd=2193(,) # Sets both the start and end of the target in one call. fun void SetTargetRange=2686(position start, position end) # Retrieve the text in the target. get int GetTargetText=2687(, stringresult text) # Make the target range start and end be the same as the selection range start and end. fun void TargetFromSelection=2287(,) # Sets the target to the whole document. fun void TargetWholeDocument=2690(,) # Replace the target text with the argument text. # Text is counted so it can contain NULs. # Returns the length of the replacement text. fun int ReplaceTarget=2194(int length, string text) # Replace the target text with the argument text after \d processing. # Text is counted so it can contain NULs. # Looks for \d where d is between 1 and 9 and replaces these with the strings # matched in the last search operation which were surrounded by \( and \). # Returns the length of the replacement text including any change # caused by processing the \d patterns. fun int ReplaceTargetRE=2195(int length, string text) # Search for a counted string in the target and set the target to the found # range. Text is counted so it can contain NULs. # Returns length of range or -1 for failure in which case target is not moved. fun int SearchInTarget=2197(int length, string text) # Set the search flags used by SearchInTarget. set void SetSearchFlags=2198(int searchFlags,) # Get the search flags used by SearchInTarget. get int GetSearchFlags=2199(,) # Show a call tip containing a definition near position pos. fun void CallTipShow=2200(position pos, string definition) # Remove the call tip from the screen. fun void CallTipCancel=2201(,) # Is there an active call tip? fun bool CallTipActive=2202(,) # Retrieve the position where the caret was before displaying the call tip. fun position CallTipPosStart=2203(,) # Set the start position in order to change when backspacing removes the calltip. set void CallTipSetPosStart=2214(int posStart,) # Highlight a segment of the definition. fun void CallTipSetHlt=2204(int highlightStart, int highlightEnd) # Set the background colour for the call tip. set void CallTipSetBack=2205(colour back,) # Set the foreground colour for the call tip. set void CallTipSetFore=2206(colour fore,) # Set the foreground colour for the highlighted part of the call tip. set void CallTipSetForeHlt=2207(colour fore,) # Enable use of STYLE_CALLTIP and set call tip tab size in pixels. set void CallTipUseStyle=2212(int tabSize,) # Set position of calltip, above or below text. set void CallTipSetPosition=2213(bool above,) # Find the display line of a document line taking hidden lines into account. fun int VisibleFromDocLine=2220(int docLine,) # Find the document line of a display line taking hidden lines into account. fun int DocLineFromVisible=2221(int displayLine,) # The number of display lines needed to wrap a document line fun int WrapCount=2235(int docLine,) enu FoldLevel=SC_FOLDLEVEL val SC_FOLDLEVELBASE=0x400 val SC_FOLDLEVELWHITEFLAG=0x1000 val SC_FOLDLEVELHEADERFLAG=0x2000 val SC_FOLDLEVELNUMBERMASK=0x0FFF # Set the fold level of a line. # This encodes an integer level along with flags indicating whether the # line is a header and whether it is effectively white space. set void SetFoldLevel=2222(int line, int level) # Retrieve the fold level of a line. get int GetFoldLevel=2223(int line,) # Find the last child line of a header line. get int GetLastChild=2224(int line, int level) # Find the parent line of a child line. get int GetFoldParent=2225(int line,) # Make a range of lines visible. fun void ShowLines=2226(int lineStart, int lineEnd) # Make a range of lines invisible. fun void HideLines=2227(int lineStart, int lineEnd) # Is a line visible? get bool GetLineVisible=2228(int line,) # Are all lines visible? get bool GetAllLinesVisible=2236(,) # Show the children of a header line. set void SetFoldExpanded=2229(int line, bool expanded) # Is a header line expanded? get bool GetFoldExpanded=2230(int line,) # Switch a header line between expanded and contracted. fun void ToggleFold=2231(int line,) # Switch a header line between expanded and contracted and show some text after the line. fun void ToggleFoldShowText=2700(int line, string text) enu foldDisplayTextStyle=SC_FOLDDISPLAYTEXTSTYLE_ val SC_FOLDDISPLAYTEXT_HIDDEN=0 val SC_FOLDDISPLAYTEXT_STANDARD=1 val SC_FOLDDISPLAYTEXT_BOXED=2 # Set the style of fold display text set void FoldDisplayTextSetStyle=2701(int style,) enu FoldAction=SC_FOLDACTION_ val SC_FOLDACTION_CONTRACT=0 val SC_FOLDACTION_EXPAND=1 val SC_FOLDACTION_TOGGLE=2 # Expand or contract a fold header. fun void FoldLine=2237(int line, int action) # Expand or contract a fold header and its children. fun void FoldChildren=2238(int line, int action) # Expand a fold header and all children. Use the level argument instead of the line's current level. fun void ExpandChildren=2239(int line, int level) # Expand or contract all fold headers. fun void FoldAll=2662(int action,) # Ensure a particular line is visible by expanding any header line hiding it. fun void EnsureVisible=2232(int line,) enu AutomaticFold=SC_AUTOMATICFOLD_ val SC_AUTOMATICFOLD_SHOW=0x0001 val SC_AUTOMATICFOLD_CLICK=0x0002 val SC_AUTOMATICFOLD_CHANGE=0x0004 # Set automatic folding behaviours. set void SetAutomaticFold=2663(int automaticFold,) # Get automatic folding behaviours. get int GetAutomaticFold=2664(,) enu FoldFlag=SC_FOLDFLAG_ val SC_FOLDFLAG_LINEBEFORE_EXPANDED=0x0002 val SC_FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004 val SC_FOLDFLAG_LINEAFTER_EXPANDED=0x0008 val SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010 val SC_FOLDFLAG_LEVELNUMBERS=0x0040 val SC_FOLDFLAG_LINESTATE=0x0080 # Set some style options for folding. set void SetFoldFlags=2233(int flags,) # Ensure a particular line is visible by expanding any header line hiding it. # Use the currently set visibility policy to determine which range to display. fun void EnsureVisibleEnforcePolicy=2234(int line,) # Sets whether a tab pressed when caret is within indentation indents. set void SetTabIndents=2260(bool tabIndents,) # Does a tab pressed when caret is within indentation indent? get bool GetTabIndents=2261(,) # Sets whether a backspace pressed when caret is within indentation unindents. set void SetBackSpaceUnIndents=2262(bool bsUnIndents,) # Does a backspace pressed when caret is within indentation unindent? get bool GetBackSpaceUnIndents=2263(,) val SC_TIME_FOREVER=10000000 # Sets the time the mouse must sit still to generate a mouse dwell event. set void SetMouseDwellTime=2264(int periodMilliseconds,) # Retrieve the time the mouse must sit still to generate a mouse dwell event. get int GetMouseDwellTime=2265(,) # Get position of start of word. fun int WordStartPosition=2266(position pos, bool onlyWordCharacters) # Get position of end of word. fun int WordEndPosition=2267(position pos, bool onlyWordCharacters) # Is the range start..end considered a word? fun bool IsRangeWord=2691(position start, position end) enu IdleStyling=SC_IDLESTYLING_ val SC_IDLESTYLING_NONE=0 val SC_IDLESTYLING_TOVISIBLE=1 val SC_IDLESTYLING_AFTERVISIBLE=2 val SC_IDLESTYLING_ALL=3 # Sets limits to idle styling. set void SetIdleStyling=2692(int idleStyling,) # Retrieve the limits to idle styling. get int GetIdleStyling=2693(,) enu Wrap=SC_WRAP_ val SC_WRAP_NONE=0 val SC_WRAP_WORD=1 val SC_WRAP_CHAR=2 val SC_WRAP_WHITESPACE=3 # Sets whether text is word wrapped. set void SetWrapMode=2268(int wrapMode,) # Retrieve whether text is word wrapped. get int GetWrapMode=2269(,) enu WrapVisualFlag=SC_WRAPVISUALFLAG_ val SC_WRAPVISUALFLAG_NONE=0x0000 val SC_WRAPVISUALFLAG_END=0x0001 val SC_WRAPVISUALFLAG_START=0x0002 val SC_WRAPVISUALFLAG_MARGIN=0x0004 # Set the display mode of visual flags for wrapped lines. set void SetWrapVisualFlags=2460(int wrapVisualFlags,) # Retrive the display mode of visual flags for wrapped lines. get int GetWrapVisualFlags=2461(,) enu WrapVisualLocation=SC_WRAPVISUALFLAGLOC_ val SC_WRAPVISUALFLAGLOC_DEFAULT=0x0000 val SC_WRAPVISUALFLAGLOC_END_BY_TEXT=0x0001 val SC_WRAPVISUALFLAGLOC_START_BY_TEXT=0x0002 # Set the location of visual flags for wrapped lines. set void SetWrapVisualFlagsLocation=2462(int wrapVisualFlagsLocation,) # Retrive the location of visual flags for wrapped lines. get int GetWrapVisualFlagsLocation=2463(,) # Set the start indent for wrapped lines. set void SetWrapStartIndent=2464(int indent,) # Retrive the start indent for wrapped lines. get int GetWrapStartIndent=2465(,) enu WrapIndentMode=SC_WRAPINDENT_ val SC_WRAPINDENT_FIXED=0 val SC_WRAPINDENT_SAME=1 val SC_WRAPINDENT_INDENT=2 # Sets how wrapped sublines are placed. Default is fixed. set void SetWrapIndentMode=2472(int wrapIndentMode,) # Retrieve how wrapped sublines are placed. Default is fixed. get int GetWrapIndentMode=2473(,) enu LineCache=SC_CACHE_ val SC_CACHE_NONE=0 val SC_CACHE_CARET=1 val SC_CACHE_PAGE=2 val SC_CACHE_DOCUMENT=3 # Sets the degree of caching of layout information. set void SetLayoutCache=2272(int cacheMode,) # Retrieve the degree of caching of layout information. get int GetLayoutCache=2273(,) # Sets the document width assumed for scrolling. set void SetScrollWidth=2274(int pixelWidth,) # Retrieve the document width assumed for scrolling. get int GetScrollWidth=2275(,) # Sets whether the maximum width line displayed is used to set scroll width. set void SetScrollWidthTracking=2516(bool tracking,) # Retrieve whether the scroll width tracks wide lines. get bool GetScrollWidthTracking=2517(,) # Measure the pixel width of some text in a particular style. # NUL terminated text argument. # Does not handle tab or control characters. fun int TextWidth=2276(int style, string text) # Sets the scroll range so that maximum scroll position has # the last line at the bottom of the view (default). # Setting this to false allows scrolling one page below the last line. set void SetEndAtLastLine=2277(bool endAtLastLine,) # Retrieve whether the maximum scroll position has the last # line at the bottom of the view. get bool GetEndAtLastLine=2278(,) # Retrieve the height of a particular line of text in pixels. fun int TextHeight=2279(int line,) # Show or hide the vertical scroll bar. set void SetVScrollBar=2280(bool visible,) # Is the vertical scroll bar visible? get bool GetVScrollBar=2281(,) # Append a string to the end of the document without changing the selection. fun void AppendText=2282(int length, string text) # Is drawing done in two phases with backgrounds drawn before foregrounds? get bool GetTwoPhaseDraw=2283(,) # In twoPhaseDraw mode, drawing is performed in two phases, first the background # and then the foreground. This avoids chopping off characters that overlap the next run. set void SetTwoPhaseDraw=2284(bool twoPhase,) enu PhasesDraw=SC_PHASES_ val SC_PHASES_ONE=0 val SC_PHASES_TWO=1 val SC_PHASES_MULTIPLE=2 # How many phases is drawing done in? get int GetPhasesDraw=2673(,) # In one phase draw, text is drawn in a series of rectangular blocks with no overlap. # In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. # In multiple phase draw, each element is drawn over the whole drawing area, allowing text # to overlap from one line to the next. set void SetPhasesDraw=2674(int phases,) # Control font anti-aliasing. enu FontQuality=SC_EFF_ val SC_EFF_QUALITY_MASK=0xF val SC_EFF_QUALITY_DEFAULT=0 val SC_EFF_QUALITY_NON_ANTIALIASED=1 val SC_EFF_QUALITY_ANTIALIASED=2 val SC_EFF_QUALITY_LCD_OPTIMIZED=3 # Choose the quality level for text from the FontQuality enumeration. set void SetFontQuality=2611(int fontQuality,) # Retrieve the quality level for text. get int GetFontQuality=2612(,) # Scroll so that a display line is at the top of the display. set void SetFirstVisibleLine=2613(int displayLine,) enu MultiPaste=SC_MULTIPASTE_ val SC_MULTIPASTE_ONCE=0 val SC_MULTIPASTE_EACH=1 # Change the effect of pasting when there are multiple selections. set void SetMultiPaste=2614(int multiPaste,) # Retrieve the effect of pasting when there are multiple selections. get int GetMultiPaste=2615(,) # Retrieve the value of a tag from a regular expression search. # Result is NUL-terminated. get int GetTag=2616(int tagNumber, stringresult tagValue) # Join the lines in the target. fun void LinesJoin=2288(,) # Split the lines in the target into lines that are less wide than pixelWidth # where possible. fun void LinesSplit=2289(int pixelWidth,) # Set one of the colours used as a chequerboard pattern in the fold margin fun void SetFoldMarginColour=2290(bool useSetting, colour back) # Set the other colour used as a chequerboard pattern in the fold margin fun void SetFoldMarginHiColour=2291(bool useSetting, colour fore) ## New messages go here ## Start of key messages # Move caret down one line. fun void LineDown=2300(,) # Move caret down one line extending selection to new caret position. fun void LineDownExtend=2301(,) # Move caret up one line. fun void LineUp=2302(,) # Move caret up one line extending selection to new caret position. fun void LineUpExtend=2303(,) # Move caret left one character. fun void CharLeft=2304(,) # Move caret left one character extending selection to new caret position. fun void CharLeftExtend=2305(,) # Move caret right one character. fun void CharRight=2306(,) # Move caret right one character extending selection to new caret position. fun void CharRightExtend=2307(,) # Move caret left one word. fun void WordLeft=2308(,) # Move caret left one word extending selection to new caret position. fun void WordLeftExtend=2309(,) # Move caret right one word. fun void WordRight=2310(,) # Move caret right one word extending selection to new caret position. fun void WordRightExtend=2311(,) # Move caret to first position on line. fun void Home=2312(,) # Move caret to first position on line extending selection to new caret position. fun void HomeExtend=2313(,) # Move caret to last position on line. fun void LineEnd=2314(,) # Move caret to last position on line extending selection to new caret position. fun void LineEndExtend=2315(,) # Move caret to first position in document. fun void DocumentStart=2316(,) # Move caret to first position in document extending selection to new caret position. fun void DocumentStartExtend=2317(,) # Move caret to last position in document. fun void DocumentEnd=2318(,) # Move caret to last position in document extending selection to new caret position. fun void DocumentEndExtend=2319(,) # Move caret one page up. fun void PageUp=2320(,) # Move caret one page up extending selection to new caret position. fun void PageUpExtend=2321(,) # Move caret one page down. fun void PageDown=2322(,) # Move caret one page down extending selection to new caret position. fun void PageDownExtend=2323(,) # Switch from insert to overtype mode or the reverse. fun void EditToggleOvertype=2324(,) # Cancel any modes such as call tip or auto-completion list display. fun void Cancel=2325(,) # Delete the selection or if no selection, the character before the caret. fun void DeleteBack=2326(,) # If selection is empty or all on one line replace the selection with a tab character. # If more than one line selected, indent the lines. fun void Tab=2327(,) # Dedent the selected lines. fun void BackTab=2328(,) # Insert a new line, may use a CRLF, CR or LF depending on EOL mode. fun void NewLine=2329(,) # Insert a Form Feed character. fun void FormFeed=2330(,) # Move caret to before first visible character on line. # If already there move to first character on line. fun void VCHome=2331(,) # Like VCHome but extending selection to new caret position. fun void VCHomeExtend=2332(,) # Magnify the displayed text by increasing the sizes by 1 point. fun void ZoomIn=2333(,) # Make the displayed text smaller by decreasing the sizes by 1 point. fun void ZoomOut=2334(,) # Delete the word to the left of the caret. fun void DelWordLeft=2335(,) # Delete the word to the right of the caret. fun void DelWordRight=2336(,) # Delete the word to the right of the caret, but not the trailing non-word characters. fun void DelWordRightEnd=2518(,) # Cut the line containing the caret. fun void LineCut=2337(,) # Delete the line containing the caret. fun void LineDelete=2338(,) # Switch the current line with the previous. fun void LineTranspose=2339(,) # Duplicate the current line. fun void LineDuplicate=2404(,) # Transform the selection to lower case. fun void LowerCase=2340(,) # Transform the selection to upper case. fun void UpperCase=2341(,) # Scroll the document down, keeping the caret visible. fun void LineScrollDown=2342(,) # Scroll the document up, keeping the caret visible. fun void LineScrollUp=2343(,) # Delete the selection or if no selection, the character before the caret. # Will not delete the character before at the start of a line. fun void DeleteBackNotLine=2344(,) # Move caret to first position on display line. fun void HomeDisplay=2345(,) # Move caret to first position on display line extending selection to # new caret position. fun void HomeDisplayExtend=2346(,) # Move caret to last position on display line. fun void LineEndDisplay=2347(,) # Move caret to last position on display line extending selection to new # caret position. fun void LineEndDisplayExtend=2348(,) # Like Home but when word-wrap is enabled goes first to start of display line # HomeDisplay, then to start of document line Home. fun void HomeWrap=2349(,) # Like HomeExtend but when word-wrap is enabled extends first to start of display line # HomeDisplayExtend, then to start of document line HomeExtend. fun void HomeWrapExtend=2450(,) # Like LineEnd but when word-wrap is enabled goes first to end of display line # LineEndDisplay, then to start of document line LineEnd. fun void LineEndWrap=2451(,) # Like LineEndExtend but when word-wrap is enabled extends first to end of display line # LineEndDisplayExtend, then to start of document line LineEndExtend. fun void LineEndWrapExtend=2452(,) # Like VCHome but when word-wrap is enabled goes first to start of display line # VCHomeDisplay, then behaves like VCHome. fun void VCHomeWrap=2453(,) # Like VCHomeExtend but when word-wrap is enabled extends first to start of display line # VCHomeDisplayExtend, then behaves like VCHomeExtend. fun void VCHomeWrapExtend=2454(,) # Copy the line containing the caret. fun void LineCopy=2455(,) # Move the caret inside current view if it's not there already. fun void MoveCaretInsideView=2401(,) # How many characters are on a line, including end of line characters? fun int LineLength=2350(int line,) # Highlight the characters at two positions. fun void BraceHighlight=2351(position posA, position posB) # Use specified indicator to highlight matching braces instead of changing their style. fun void BraceHighlightIndicator=2498(bool useSetting, int indicator) # Highlight the character at a position indicating there is no matching brace. fun void BraceBadLight=2352(position pos,) # Use specified indicator to highlight non matching brace instead of changing its style. fun void BraceBadLightIndicator=2499(bool useSetting, int indicator) # Find the position of a matching brace or INVALID_POSITION if no match. # The maxReStyle must be 0 for now. It may be defined in a future release. fun position BraceMatch=2353(position pos, int maxReStyle) # Are the end of line characters visible? get bool GetViewEOL=2355(,) # Make the end of line characters visible or invisible. set void SetViewEOL=2356(bool visible,) # Retrieve a pointer to the document object. get int GetDocPointer=2357(,) # Change the document object used. set void SetDocPointer=2358(, int doc) # Set which document modification events are sent to the container. set void SetModEventMask=2359(int eventMask,) enu EdgeVisualStyle=EDGE_ val EDGE_NONE=0 val EDGE_LINE=1 val EDGE_BACKGROUND=2 val EDGE_MULTILINE=3 # Retrieve the column number which text should be kept within. get int GetEdgeColumn=2360(,) # Set the column number of the edge. # If text goes past the edge then it is highlighted. set void SetEdgeColumn=2361(int column,) # Retrieve the edge highlight mode. get int GetEdgeMode=2362(,) # The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that # goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). set void SetEdgeMode=2363(int edgeMode,) # Retrieve the colour used in edge indication. get colour GetEdgeColour=2364(,) # Change the colour used in edge indication. set void SetEdgeColour=2365(colour edgeColour,) # Add a new vertical edge to the view. fun void MultiEdgeAddLine=2694(int column, colour edgeColour) # Clear all vertical edges. fun void MultiEdgeClearAll=2695(,) # Sets the current caret position to be the search anchor. fun void SearchAnchor=2366(,) # Find some text starting at the search anchor. # Does not ensure the selection is visible. fun int SearchNext=2367(int searchFlags, string text) # Find some text starting at the search anchor and moving backwards. # Does not ensure the selection is visible. fun int SearchPrev=2368(int searchFlags, string text) # Retrieves the number of lines completely visible. get int LinesOnScreen=2370(,) enu PopUp=SC_POPUP_ val SC_POPUP_NEVER=0 val SC_POPUP_ALL=1 val SC_POPUP_TEXT=2 # Set whether a pop up menu is displayed automatically when the user presses # the wrong mouse button on certain areas. fun void UsePopUp=2371(int popUpMode,) # Is the selection rectangular? The alternative is the more common stream selection. get bool SelectionIsRectangle=2372(,) # Set the zoom level. This number of points is added to the size of all fonts. # It may be positive to magnify or negative to reduce. set void SetZoom=2373(int zoomInPoints,) # Retrieve the zoom level. get int GetZoom=2374(,) # Create a new document object. # Starts with reference count of 1 and not selected into editor. fun int CreateDocument=2375(,) # Extend life of document. fun void AddRefDocument=2376(, int doc) # Release a reference to the document, deleting document if it fades to black. fun void ReleaseDocument=2377(, int doc) # Get which document modification events are sent to the container. get int GetModEventMask=2378(,) # Change internal focus flag. set void SetFocus=2380(bool focus,) # Get internal focus flag. get bool GetFocus=2381(,) enu Status=SC_STATUS_ val SC_STATUS_OK=0 val SC_STATUS_FAILURE=1 val SC_STATUS_BADALLOC=2 val SC_STATUS_WARN_START=1000 val SC_STATUS_WARN_REGEX=1001 # Change error status - 0 = OK. set void SetStatus=2382(int status,) # Get error status. get int GetStatus=2383(,) # Set whether the mouse is captured when its button is pressed. set void SetMouseDownCaptures=2384(bool captures,) # Get whether mouse gets captured. get bool GetMouseDownCaptures=2385(,) # Set whether the mouse wheel can be active outside the window. set void SetMouseWheelCaptures=2696(bool captures,) # Get whether mouse wheel can be active outside the window. get bool GetMouseWheelCaptures=2697(,) enu CursorShape=SC_CURSOR val SC_CURSORNORMAL=-1 val SC_CURSORARROW=2 val SC_CURSORWAIT=4 val SC_CURSORREVERSEARROW=7 # Sets the cursor to one of the SC_CURSOR* values. set void SetCursor=2386(int cursorType,) # Get cursor type. get int GetCursor=2387(,) # Change the way control characters are displayed: # If symbol is < 32, keep the drawn way, else, use the given character. set void SetControlCharSymbol=2388(int symbol,) # Get the way control characters are displayed. get int GetControlCharSymbol=2389(,) # Move to the previous change in capitalisation. fun void WordPartLeft=2390(,) # Move to the previous change in capitalisation extending selection # to new caret position. fun void WordPartLeftExtend=2391(,) # Move to the change next in capitalisation. fun void WordPartRight=2392(,) # Move to the next change in capitalisation extending selection # to new caret position. fun void WordPartRightExtend=2393(,) # Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. val VISIBLE_SLOP=0x01 val VISIBLE_STRICT=0x04 # Set the way the display area is determined when a particular line # is to be moved to by Find, FindNext, GotoLine, etc. fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop) # Delete back from the current position to the start of the line. fun void DelLineLeft=2395(,) # Delete forwards from the current position to the end of the line. fun void DelLineRight=2396(,) # Get and Set the xOffset (ie, horizontal scroll position). set void SetXOffset=2397(int xOffset,) get int GetXOffset=2398(,) # Set the last x chosen value to be the caret x position. fun void ChooseCaretX=2399(,) # Set the focus to this Scintilla widget. fun void GrabFocus=2400(,) enu CaretPolicy=CARET_ # Caret policy, used by SetXCaretPolicy and SetYCaretPolicy. # If CARET_SLOP is set, we can define a slop value: caretSlop. # This value defines an unwanted zone (UZ) where the caret is... unwanted. # This zone is defined as a number of pixels near the vertical margins, # and as a number of lines near the horizontal margins. # By keeping the caret away from the edges, it is seen within its context, # so it is likely that the identifier that the caret is on can be completely seen, # and that the current line is seen with some of the lines following it which are # often dependent on that line. val CARET_SLOP=0x01 # If CARET_STRICT is set, the policy is enforced... strictly. # The caret is centred on the display if slop is not set, # and cannot go in the UZ if slop is set. val CARET_STRICT=0x04 # If CARET_JUMPS is set, the display is moved more energetically # so the caret can move in the same direction longer before the policy is applied again. val CARET_JUMPS=0x10 # If CARET_EVEN is not set, instead of having symmetrical UZs, # the left and bottom UZs are extended up to right and top UZs respectively. # This way, we favour the displaying of useful information: the beginning of lines, # where most code reside, and the lines after the caret, eg. the body of a function. val CARET_EVEN=0x08 # Set the way the caret is kept visible when going sideways. # The exclusion zone is given in pixels. fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop) # Set the way the line the caret is on is kept visible. # The exclusion zone is given in lines. fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop) # Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). set void SetPrintWrapMode=2406(int wrapMode,) # Is printing line wrapped? get int GetPrintWrapMode=2407(,) # Set a fore colour for active hotspots. set void SetHotspotActiveFore=2410(bool useSetting, colour fore) # Get the fore colour for active hotspots. get colour GetHotspotActiveFore=2494(,) # Set a back colour for active hotspots. set void SetHotspotActiveBack=2411(bool useSetting, colour back) # Get the back colour for active hotspots. get colour GetHotspotActiveBack=2495(,) # Enable / Disable underlining active hotspots. set void SetHotspotActiveUnderline=2412(bool underline,) # Get whether underlining for active hotspots. get bool GetHotspotActiveUnderline=2496(,) # Limit hotspots to single line so hotspots on two lines don't merge. set void SetHotspotSingleLine=2421(bool singleLine,) # Get the HotspotSingleLine property get bool GetHotspotSingleLine=2497(,) # Move caret down one paragraph (delimited by empty lines). fun void ParaDown=2413(,) # Extend selection down one paragraph (delimited by empty lines). fun void ParaDownExtend=2414(,) # Move caret up one paragraph (delimited by empty lines). fun void ParaUp=2415(,) # Extend selection up one paragraph (delimited by empty lines). fun void ParaUpExtend=2416(,) # Given a valid document position, return the previous position taking code # page into account. Returns 0 if passed 0. fun position PositionBefore=2417(position pos,) # Given a valid document position, return the next position taking code # page into account. Maximum value returned is the last position in the document. fun position PositionAfter=2418(position pos,) # Given a valid document position, return a position that differs in a number # of characters. Returned value is always between 0 and last position in document. fun position PositionRelative=2670(position pos, int relative) # Copy a range of text to the clipboard. Positions are clipped into the document. fun void CopyRange=2419(position start, position end) # Copy argument text to the clipboard. fun void CopyText=2420(int length, string text) enu SelectionMode=SC_SEL_ val SC_SEL_STREAM=0 val SC_SEL_RECTANGLE=1 val SC_SEL_LINES=2 val SC_SEL_THIN=3 # Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or # by lines (SC_SEL_LINES). set void SetSelectionMode=2422(int selectionMode,) # Get the mode of the current selection. get int GetSelectionMode=2423(,) # Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). fun position GetLineSelStartPosition=2424(int line,) # Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). fun position GetLineSelEndPosition=2425(int line,) ## RectExtended rectangular selection moves # Move caret down one line, extending rectangular selection to new caret position. fun void LineDownRectExtend=2426(,) # Move caret up one line, extending rectangular selection to new caret position. fun void LineUpRectExtend=2427(,) # Move caret left one character, extending rectangular selection to new caret position. fun void CharLeftRectExtend=2428(,) # Move caret right one character, extending rectangular selection to new caret position. fun void CharRightRectExtend=2429(,) # Move caret to first position on line, extending rectangular selection to new caret position. fun void HomeRectExtend=2430(,) # Move caret to before first visible character on line. # If already there move to first character on line. # In either case, extend rectangular selection to new caret position. fun void VCHomeRectExtend=2431(,) # Move caret to last position on line, extending rectangular selection to new caret position. fun void LineEndRectExtend=2432(,) # Move caret one page up, extending rectangular selection to new caret position. fun void PageUpRectExtend=2433(,) # Move caret one page down, extending rectangular selection to new caret position. fun void PageDownRectExtend=2434(,) # Move caret to top of page, or one page up if already at top of page. fun void StutteredPageUp=2435(,) # Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. fun void StutteredPageUpExtend=2436(,) # Move caret to bottom of page, or one page down if already at bottom of page. fun void StutteredPageDown=2437(,) # Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. fun void StutteredPageDownExtend=2438(,) # Move caret left one word, position cursor at end of word. fun void WordLeftEnd=2439(,) # Move caret left one word, position cursor at end of word, extending selection to new caret position. fun void WordLeftEndExtend=2440(,) # Move caret right one word, position cursor at end of word. fun void WordRightEnd=2441(,) # Move caret right one word, position cursor at end of word, extending selection to new caret position. fun void WordRightEndExtend=2442(,) # Set the set of characters making up whitespace for when moving or selecting by word. # Should be called after SetWordChars. set void SetWhitespaceChars=2443(, string characters) # Get the set of characters making up whitespace for when moving or selecting by word. get int GetWhitespaceChars=2647(, stringresult characters) # Set the set of characters making up punctuation characters # Should be called after SetWordChars. set void SetPunctuationChars=2648(, string characters) # Get the set of characters making up punctuation characters get int GetPunctuationChars=2649(, stringresult characters) # Reset the set of characters for whitespace and word characters to the defaults. fun void SetCharsDefault=2444(,) # Get currently selected item position in the auto-completion list get int AutoCGetCurrent=2445(,) # Get currently selected item text in the auto-completion list # Returns the length of the item text # Result is NUL-terminated. get int AutoCGetCurrentText=2610(, stringresult text) enu CaseInsensitiveBehaviour=SC_CASEINSENSITIVEBEHAVIOUR_ val SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=0 val SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE=1 # Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. set void AutoCSetCaseInsensitiveBehaviour=2634(int behaviour,) # Get auto-completion case insensitive behaviour. get int AutoCGetCaseInsensitiveBehaviour=2635(,) enu MultiAutoComplete=SC_MULTIAUTOC_ val SC_MULTIAUTOC_ONCE=0 val SC_MULTIAUTOC_EACH=1 # Change the effect of autocompleting when there are multiple selections. set void AutoCSetMulti=2636(int multi,) # Retrieve the effect of autocompleting when there are multiple selections. get int AutoCGetMulti=2637(,) enu Ordering=SC_ORDER_ val SC_ORDER_PRESORTED=0 val SC_ORDER_PERFORMSORT=1 val SC_ORDER_CUSTOM=2 # Set the way autocompletion lists are ordered. set void AutoCSetOrder=2660(int order,) # Get the way autocompletion lists are ordered. get int AutoCGetOrder=2661(,) # Enlarge the document to a particular size of text bytes. fun void Allocate=2446(int bytes,) # Returns the target converted to UTF8. # Return the length in bytes. fun int TargetAsUTF8=2447(, stringresult s) # Set the length of the utf8 argument for calling EncodedFromUTF8. # Set to -1 and the string will be measured to the first nul. fun void SetLengthForEncode=2448(int bytes,) # Translates a UTF8 string into the document encoding. # Return the length of the result in bytes. # On error return 0. fun int EncodedFromUTF8=2449(string utf8, stringresult encoded) # Find the position of a column on a line taking into account tabs and # multi-byte characters. If beyond end of line, return line end position. fun int FindColumn=2456(int line, int column) # Can the caret preferred x position only be changed by explicit movement commands? get int GetCaretSticky=2457(,) # Stop the caret preferred x position changing when the user types. set void SetCaretSticky=2458(int useCaretStickyBehaviour,) enu CaretSticky=SC_CARETSTICKY_ val SC_CARETSTICKY_OFF=0 val SC_CARETSTICKY_ON=1 val SC_CARETSTICKY_WHITESPACE=2 # Switch between sticky and non-sticky: meant to be bound to a key. fun void ToggleCaretSticky=2459(,) # Enable/Disable convert-on-paste for line endings set void SetPasteConvertEndings=2467(bool convert,) # Get convert-on-paste setting get bool GetPasteConvertEndings=2468(,) # Duplicate the selection. If selection empty duplicate the line containing the caret. fun void SelectionDuplicate=2469(,) val SC_ALPHA_TRANSPARENT=0 val SC_ALPHA_OPAQUE=255 val SC_ALPHA_NOALPHA=256 # Set background alpha of the caret line. set void SetCaretLineBackAlpha=2470(int alpha,) # Get the background alpha of the caret line. get int GetCaretLineBackAlpha=2471(,) enu CaretStyle=CARETSTYLE_ val CARETSTYLE_INVISIBLE=0 val CARETSTYLE_LINE=1 val CARETSTYLE_BLOCK=2 # Set the style of the caret to be drawn. set void SetCaretStyle=2512(int caretStyle,) # Returns the current style of the caret. get int GetCaretStyle=2513(,) # Set the indicator used for IndicatorFillRange and IndicatorClearRange set void SetIndicatorCurrent=2500(int indicator,) # Get the current indicator get int GetIndicatorCurrent=2501(,) # Set the value used for IndicatorFillRange set void SetIndicatorValue=2502(int value,) # Get the current indicator value get int GetIndicatorValue=2503(,) # Turn a indicator on over a range. fun void IndicatorFillRange=2504(position start, int lengthFill) # Turn a indicator off over a range. fun void IndicatorClearRange=2505(position start, int lengthClear) # Are any indicators present at pos? fun int IndicatorAllOnFor=2506(position pos,) # What value does a particular indicator have at a position? fun int IndicatorValueAt=2507(int indicator, position pos) # Where does a particular indicator start? fun int IndicatorStart=2508(int indicator, position pos) # Where does a particular indicator end? fun int IndicatorEnd=2509(int indicator, position pos) # Set number of entries in position cache set void SetPositionCache=2514(int size,) # How many entries are allocated to the position cache? get int GetPositionCache=2515(,) # Copy the selection, if selection empty copy the line with the caret fun void CopyAllowLine=2519(,) # Compact the document buffer and return a read-only pointer to the # characters in the document. get int GetCharacterPointer=2520(,) # Return a read-only pointer to a range of characters in the document. # May move the gap so that the range is contiguous, but will only move up # to lengthRange bytes. get int GetRangePointer=2643(position start, int lengthRange) # Return a position which, to avoid performance costs, should not be within # the range of a call to GetRangePointer. get position GetGapPosition=2644(,) # Set the alpha fill colour of the given indicator. set void IndicSetAlpha=2523(int indicator, int alpha) # Get the alpha fill colour of the given indicator. get int IndicGetAlpha=2524(int indicator,) # Set the alpha outline colour of the given indicator. set void IndicSetOutlineAlpha=2558(int indicator, int alpha) # Get the alpha outline colour of the given indicator. get int IndicGetOutlineAlpha=2559(int indicator,) # Set extra ascent for each line set void SetExtraAscent=2525(int extraAscent,) # Get extra ascent for each line get int GetExtraAscent=2526(,) # Set extra descent for each line set void SetExtraDescent=2527(int extraDescent,) # Get extra descent for each line get int GetExtraDescent=2528(,) # Which symbol was defined for markerNumber with MarkerDefine fun int MarkerSymbolDefined=2529(int markerNumber,) # Set the text in the text margin for a line set void MarginSetText=2530(int line, string text) # Get the text in the text margin for a line get int MarginGetText=2531(int line, stringresult text) # Set the style number for the text margin for a line set void MarginSetStyle=2532(int line, int style) # Get the style number for the text margin for a line get int MarginGetStyle=2533(int line,) # Set the style in the text margin for a line set void MarginSetStyles=2534(int line, string styles) # Get the styles in the text margin for a line get int MarginGetStyles=2535(int line, stringresult styles) # Clear the margin text on all lines fun void MarginTextClearAll=2536(,) # Get the start of the range of style numbers used for margin text set void MarginSetStyleOffset=2537(int style,) # Get the start of the range of style numbers used for margin text get int MarginGetStyleOffset=2538(,) enu MarginOption=SC_MARGINOPTION_ val SC_MARGINOPTION_NONE=0 val SC_MARGINOPTION_SUBLINESELECT=1 # Set the margin options. set void SetMarginOptions=2539(int marginOptions,) # Get the margin options. get int GetMarginOptions=2557(,) # Set the annotation text for a line set void AnnotationSetText=2540(int line, string text) # Get the annotation text for a line get int AnnotationGetText=2541(int line, stringresult text) # Set the style number for the annotations for a line set void AnnotationSetStyle=2542(int line, int style) # Get the style number for the annotations for a line get int AnnotationGetStyle=2543(int line,) # Set the annotation styles for a line set void AnnotationSetStyles=2544(int line, string styles) # Get the annotation styles for a line get int AnnotationGetStyles=2545(int line, stringresult styles) # Get the number of annotation lines for a line get int AnnotationGetLines=2546(int line,) # Clear the annotations from all lines fun void AnnotationClearAll=2547(,) enu AnnotationVisible=ANNOTATION_ val ANNOTATION_HIDDEN=0 val ANNOTATION_STANDARD=1 val ANNOTATION_BOXED=2 val ANNOTATION_INDENTED=3 # Set the visibility for the annotations for a view set void AnnotationSetVisible=2548(int visible,) # Get the visibility for the annotations for a view get int AnnotationGetVisible=2549(,) # Get the start of the range of style numbers used for annotations set void AnnotationSetStyleOffset=2550(int style,) # Get the start of the range of style numbers used for annotations get int AnnotationGetStyleOffset=2551(,) # Release all extended (>255) style numbers fun void ReleaseAllExtendedStyles=2552(,) # Allocate some extended (>255) style numbers and return the start of the range fun int AllocateExtendedStyles=2553(int numberStyles,) val UNDO_MAY_COALESCE=1 # Add a container action to the undo stack fun void AddUndoAction=2560(int token, int flags) # Find the position of a character from a point within the window. fun position CharPositionFromPoint=2561(int x, int y) # Find the position of a character from a point within the window. # Return INVALID_POSITION if not close to text. fun position CharPositionFromPointClose=2562(int x, int y) # Set whether switching to rectangular mode while selecting with the mouse is allowed. set void SetMouseSelectionRectangularSwitch=2668(bool mouseSelectionRectangularSwitch,) # Whether switching to rectangular mode while selecting with the mouse is allowed. get bool GetMouseSelectionRectangularSwitch=2669(,) # Set whether multiple selections can be made set void SetMultipleSelection=2563(bool multipleSelection,) # Whether multiple selections can be made get bool GetMultipleSelection=2564(,) # Set whether typing can be performed into multiple selections set void SetAdditionalSelectionTyping=2565(bool additionalSelectionTyping,) # Whether typing can be performed into multiple selections get bool GetAdditionalSelectionTyping=2566(,) # Set whether additional carets will blink set void SetAdditionalCaretsBlink=2567(bool additionalCaretsBlink,) # Whether additional carets will blink get bool GetAdditionalCaretsBlink=2568(,) # Set whether additional carets are visible set void SetAdditionalCaretsVisible=2608(bool additionalCaretsVisible,) # Whether additional carets are visible get bool GetAdditionalCaretsVisible=2609(,) # How many selections are there? get int GetSelections=2570(,) # Is every selected range empty? get bool GetSelectionEmpty=2650(,) # Clear selections to a single empty stream selection fun void ClearSelections=2571(,) # Set a simple selection fun int SetSelection=2572(position caret, position anchor) # Add a selection fun int AddSelection=2573(position caret, position anchor) # Drop one selection fun void DropSelectionN=2671(int selection,) # Set the main selection set void SetMainSelection=2574(int selection,) # Which selection is the main selection get int GetMainSelection=2575(,) # Set the caret position of the nth selection. set void SetSelectionNCaret=2576(int selection, position caret) # Return the caret position of the nth selection. get position GetSelectionNCaret=2577(int selection,) # Set the anchor position of the nth selection. set void SetSelectionNAnchor=2578(int selection, position anchor) # Return the anchor position of the nth selection. get position GetSelectionNAnchor=2579(int selection,) # Set the virtual space of the caret of the nth selection. set void SetSelectionNCaretVirtualSpace=2580(int selection, int space) # Return the virtual space of the caret of the nth selection. get int GetSelectionNCaretVirtualSpace=2581(int selection,) # Set the virtual space of the anchor of the nth selection. set void SetSelectionNAnchorVirtualSpace=2582(int selection, int space) # Return the virtual space of the anchor of the nth selection. get int GetSelectionNAnchorVirtualSpace=2583(int selection,) # Sets the position that starts the selection - this becomes the anchor. set void SetSelectionNStart=2584(int selection, position anchor) # Returns the position at the start of the selection. get position GetSelectionNStart=2585(int selection,) # Sets the position that ends the selection - this becomes the currentPosition. set void SetSelectionNEnd=2586(int selection, position caret) # Returns the position at the end of the selection. get position GetSelectionNEnd=2587(int selection,) # Set the caret position of the rectangular selection. set void SetRectangularSelectionCaret=2588(position caret,) # Return the caret position of the rectangular selection. get position GetRectangularSelectionCaret=2589(,) # Set the anchor position of the rectangular selection. set void SetRectangularSelectionAnchor=2590(position anchor,) # Return the anchor position of the rectangular selection. get position GetRectangularSelectionAnchor=2591(,) # Set the virtual space of the caret of the rectangular selection. set void SetRectangularSelectionCaretVirtualSpace=2592(int space,) # Return the virtual space of the caret of the rectangular selection. get int GetRectangularSelectionCaretVirtualSpace=2593(,) # Set the virtual space of the anchor of the rectangular selection. set void SetRectangularSelectionAnchorVirtualSpace=2594(int space,) # Return the virtual space of the anchor of the rectangular selection. get int GetRectangularSelectionAnchorVirtualSpace=2595(,) enu VirtualSpace=SCVS_ val SCVS_NONE=0 val SCVS_RECTANGULARSELECTION=1 val SCVS_USERACCESSIBLE=2 val SCVS_NOWRAPLINESTART=4 # Set options for virtual space behaviour. set void SetVirtualSpaceOptions=2596(int virtualSpaceOptions,) # Return options for virtual space behaviour. get int GetVirtualSpaceOptions=2597(,) # On GTK+, allow selecting the modifier key to use for mouse-based # rectangular selection. Often the window manager requires Alt+Mouse Drag # for moving windows. # Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. set void SetRectangularSelectionModifier=2598(int modifier,) # Get the modifier key used for rectangular selection. get int GetRectangularSelectionModifier=2599(,) # Set the foreground colour of additional selections. # Must have previously called SetSelFore with non-zero first argument for this to have an effect. set void SetAdditionalSelFore=2600(colour fore,) # Set the background colour of additional selections. # Must have previously called SetSelBack with non-zero first argument for this to have an effect. set void SetAdditionalSelBack=2601(colour back,) # Set the alpha of the selection. set void SetAdditionalSelAlpha=2602(int alpha,) # Get the alpha of the selection. get int GetAdditionalSelAlpha=2603(,) # Set the foreground colour of additional carets. set void SetAdditionalCaretFore=2604(colour fore,) # Get the foreground colour of additional carets. get colour GetAdditionalCaretFore=2605(,) # Set the main selection to the next selection. fun void RotateSelection=2606(,) # Swap that caret and anchor of the main selection. fun void SwapMainAnchorCaret=2607(,) # Add the next occurrence of the main selection to the set of selections as main. # If the current selection is empty then select word around caret. fun void MultipleSelectAddNext=2688(,) # Add each occurrence of the main selection in the target to the set of selections. # If the current selection is empty then select word around caret. fun void MultipleSelectAddEach=2689(,) # Indicate that the internal state of a lexer has changed over a range and therefore # there may be a need to redraw. fun int ChangeLexerState=2617(position start, position end) # Find the next line at or after lineStart that is a contracted fold header line. # Return -1 when no more lines. fun int ContractedFoldNext=2618(int lineStart,) # Centre current line in window. fun void VerticalCentreCaret=2619(,) # Move the selected lines up one line, shifting the line above after the selection fun void MoveSelectedLinesUp=2620(,) # Move the selected lines down one line, shifting the line below before the selection fun void MoveSelectedLinesDown=2621(,) # Set the identifier reported as idFrom in notification messages. set void SetIdentifier=2622(int identifier,) # Get the identifier. get int GetIdentifier=2623(,) # Set the width for future RGBA image data. set void RGBAImageSetWidth=2624(int width,) # Set the height for future RGBA image data. set void RGBAImageSetHeight=2625(int height,) # Set the scale factor in percent for future RGBA image data. set void RGBAImageSetScale=2651(int scalePercent,) # Define a marker from RGBA data. # It has the width and height from RGBAImageSetWidth/Height fun void MarkerDefineRGBAImage=2626(int markerNumber, string pixels) # Register an RGBA image for use in autocompletion lists. # It has the width and height from RGBAImageSetWidth/Height fun void RegisterRGBAImage=2627(int type, string pixels) # Scroll to start of document. fun void ScrollToStart=2628(,) # Scroll to end of document. fun void ScrollToEnd=2629(,) val SC_TECHNOLOGY_DEFAULT=0 val SC_TECHNOLOGY_DIRECTWRITE=1 val SC_TECHNOLOGY_DIRECTWRITERETAIN=2 val SC_TECHNOLOGY_DIRECTWRITEDC=3 # Set the technology used. set void SetTechnology=2630(int technology,) # Get the tech. get int GetTechnology=2631(,) # Create an ILoader*. fun int CreateLoader=2632(int bytes,) # On OS X, show a find indicator. fun void FindIndicatorShow=2640(position start, position end) # On OS X, flash a find indicator, then fade out. fun void FindIndicatorFlash=2641(position start, position end) # On OS X, hide the find indicator. fun void FindIndicatorHide=2642(,) # Move caret to before first visible character on display line. # If already there move to first character on display line. fun void VCHomeDisplay=2652(,) # Like VCHomeDisplay but extending selection to new caret position. fun void VCHomeDisplayExtend=2653(,) # Is the caret line always visible? get bool GetCaretLineVisibleAlways=2654(,) # Sets the caret line to always visible. set void SetCaretLineVisibleAlways=2655(bool alwaysVisible,) # Line end types which may be used in addition to LF, CR, and CRLF # SC_LINE_END_TYPE_UNICODE includes U+2028 Line Separator, # U+2029 Paragraph Separator, and U+0085 Next Line enu LineEndType=SC_LINE_END_TYPE_ val SC_LINE_END_TYPE_DEFAULT=0 val SC_LINE_END_TYPE_UNICODE=1 # Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. set void SetLineEndTypesAllowed=2656(int lineEndBitSet,) # Get the line end types currently allowed. get int GetLineEndTypesAllowed=2657(,) # Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. get int GetLineEndTypesActive=2658(,) # Set the way a character is drawn. set void SetRepresentation=2665(string encodedCharacter, string representation) # Set the way a character is drawn. # Result is NUL-terminated. get int GetRepresentation=2666(string encodedCharacter, stringresult representation) # Remove a character representation. fun void ClearRepresentation=2667(string encodedCharacter,) # Start notifying the container of all key presses and commands. fun void StartRecord=3001(,) # Stop notifying the container of all key presses and commands. fun void StopRecord=3002(,) # Set the lexing language of the document. set void SetLexer=4001(int lexer,) # Retrieve the lexing language of the document. get int GetLexer=4002(,) # Colourise a segment of the document using the current lexing language. fun void Colourise=4003(position start, position end) # Set up a value that may be used by a lexer for some optional feature. set void SetProperty=4004(string key, string value) # Maximum value of keywordSet parameter of SetKeyWords. val KEYWORDSET_MAX=8 # Set up the key words used by the lexer. set void SetKeyWords=4005(int keyWordSet, string keyWords) # Set the lexing language of the document based on string name. set void SetLexerLanguage=4006(, string language) # Load a lexer library (dll / so). fun void LoadLexerLibrary=4007(, string path) # Retrieve a "property" value previously set with SetProperty. # Result is NUL-terminated. get int GetProperty=4008(string key, stringresult value) # Retrieve a "property" value previously set with SetProperty, # with "$()" variable replacement on returned buffer. # Result is NUL-terminated. get int GetPropertyExpanded=4009(string key, stringresult value) # Retrieve a "property" value previously set with SetProperty, # interpreted as an int AFTER any "$()" variable replacement. get int GetPropertyInt=4010(string key, int defaultValue) # Retrieve the number of bits the current lexer needs for styling. get int GetStyleBitsNeeded=4011(,) # Retrieve the name of the lexer. # Return the length of the text. # Result is NUL-terminated. get int GetLexerLanguage=4012(, stringresult language) # For private communication between an application and a known lexer. fun int PrivateLexerCall=4013(int operation, int pointer) # Retrieve a '\n' separated list of properties understood by the current lexer. # Result is NUL-terminated. fun int PropertyNames=4014(, stringresult names) enu TypeProperty=SC_TYPE_ val SC_TYPE_BOOLEAN=0 val SC_TYPE_INTEGER=1 val SC_TYPE_STRING=2 # Retrieve the type of a property. fun int PropertyType=4015(string name,) # Describe a property. # Result is NUL-terminated. fun int DescribeProperty=4016(string name, stringresult description) # Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. # Result is NUL-terminated. fun int DescribeKeyWordSets=4017(, stringresult descriptions) # Bit set of LineEndType enumertion for which line ends beyond the standard # LF, CR, and CRLF are supported by the lexer. get int GetLineEndTypesSupported=4018(,) # Allocate a set of sub styles for a particular base style, returning start of range fun int AllocateSubStyles=4020(int styleBase, int numberStyles) # The starting style number for the sub styles associated with a base style get int GetSubStylesStart=4021(int styleBase,) # The number of sub styles associated with a base style get int GetSubStylesLength=4022(int styleBase,) # For a sub style, return the base style, else return the argument. get int GetStyleFromSubStyle=4027(int subStyle,) # For a secondary style, return the primary style, else return the argument. get int GetPrimaryStyleFromStyle=4028(int style,) # Free allocated sub styles fun void FreeSubStyles=4023(,) # Set the identifiers that are shown in a particular style set void SetIdentifiers=4024(int style, string identifiers) # Where styles are duplicated by a feature such as active/inactive code # return the distance between the two types. get int DistanceToSecondaryStyles=4025(,) # Get the set of base styles that can be extended with sub styles # Result is NUL-terminated. get int GetSubStyleBases=4026(, stringresult styles) # Notifications # Type of modification and the action which caused the modification. # These are defined as a bit mask to make it easy to specify which notifications are wanted. # One bit is set from each of SC_MOD_* and SC_PERFORMED_*. enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_MULTISTEPUNDOREDO SC_LASTSTEPINUNDOREDO SC_MULTILINEUNDOREDO SC_STARTACTION SC_MODEVENTMASKALL val SC_MOD_INSERTTEXT=0x1 val SC_MOD_DELETETEXT=0x2 val SC_MOD_CHANGESTYLE=0x4 val SC_MOD_CHANGEFOLD=0x8 val SC_PERFORMED_USER=0x10 val SC_PERFORMED_UNDO=0x20 val SC_PERFORMED_REDO=0x40 val SC_MULTISTEPUNDOREDO=0x80 val SC_LASTSTEPINUNDOREDO=0x100 val SC_MOD_CHANGEMARKER=0x200 val SC_MOD_BEFOREINSERT=0x400 val SC_MOD_BEFOREDELETE=0x800 val SC_MULTILINEUNDOREDO=0x1000 val SC_STARTACTION=0x2000 val SC_MOD_CHANGEINDICATOR=0x4000 val SC_MOD_CHANGELINESTATE=0x8000 val SC_MOD_CHANGEMARGIN=0x10000 val SC_MOD_CHANGEANNOTATION=0x20000 val SC_MOD_CONTAINER=0x40000 val SC_MOD_LEXERSTATE=0x80000 val SC_MOD_INSERTCHECK=0x100000 val SC_MOD_CHANGETABSTOPS=0x200000 val SC_MODEVENTMASKALL=0x3FFFFF enu Update=SC_UPDATE_ val SC_UPDATE_CONTENT=0x1 val SC_UPDATE_SELECTION=0x2 val SC_UPDATE_V_SCROLL=0x4 val SC_UPDATE_H_SCROLL=0x8 # For compatibility, these go through the COMMAND notification rather than NOTIFY # and should have had exactly the same values as the EN_* constants. # Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_* # As clients depend on these constants, this will not be changed. val SCEN_CHANGE=768 val SCEN_SETFOCUS=512 val SCEN_KILLFOCUS=256 # Symbolic key codes and modifier flags. # ASCII and other printable characters below 256. # Extended keys above 300. enu Keys=SCK_ val SCK_DOWN=300 val SCK_UP=301 val SCK_LEFT=302 val SCK_RIGHT=303 val SCK_HOME=304 val SCK_END=305 val SCK_PRIOR=306 val SCK_NEXT=307 val SCK_DELETE=308 val SCK_INSERT=309 val SCK_ESCAPE=7 val SCK_BACK=8 val SCK_TAB=9 val SCK_RETURN=13 val SCK_ADD=310 val SCK_SUBTRACT=311 val SCK_DIVIDE=312 val SCK_WIN=313 val SCK_RWIN=314 val SCK_MENU=315 enu KeyMod=SCMOD_ val SCMOD_NORM=0 val SCMOD_SHIFT=1 val SCMOD_CTRL=2 val SCMOD_ALT=4 val SCMOD_SUPER=8 val SCMOD_META=16 enu CompletionMethods=SC_AC_ val SC_AC_FILLUP=1 val SC_AC_DOUBLECLICK=2 val SC_AC_TAB=3 val SC_AC_NEWLINE=4 val SC_AC_COMMAND=5 ################################################ # For SciLexer.h enu Lexer=SCLEX_ val SCLEX_CONTAINER=0 val SCLEX_NULL=1 val SCLEX_PYTHON=2 val SCLEX_CPP=3 val SCLEX_HTML=4 val SCLEX_XML=5 val SCLEX_PERL=6 val SCLEX_SQL=7 val SCLEX_VB=8 val SCLEX_PROPERTIES=9 val SCLEX_ERRORLIST=10 val SCLEX_MAKEFILE=11 val SCLEX_BATCH=12 val SCLEX_XCODE=13 val SCLEX_LATEX=14 val SCLEX_LUA=15 val SCLEX_DIFF=16 val SCLEX_CONF=17 val SCLEX_PASCAL=18 val SCLEX_AVE=19 val SCLEX_ADA=20 val SCLEX_LISP=21 val SCLEX_RUBY=22 val SCLEX_EIFFEL=23 val SCLEX_EIFFELKW=24 val SCLEX_TCL=25 val SCLEX_NNCRONTAB=26 val SCLEX_BULLANT=27 val SCLEX_VBSCRIPT=28 val SCLEX_BAAN=31 val SCLEX_MATLAB=32 val SCLEX_SCRIPTOL=33 val SCLEX_ASM=34 val SCLEX_CPPNOCASE=35 val SCLEX_FORTRAN=36 val SCLEX_F77=37 val SCLEX_CSS=38 val SCLEX_POV=39 val SCLEX_LOUT=40 val SCLEX_ESCRIPT=41 val SCLEX_PS=42 val SCLEX_NSIS=43 val SCLEX_MMIXAL=44 val SCLEX_CLW=45 val SCLEX_CLWNOCASE=46 val SCLEX_LOT=47 val SCLEX_YAML=48 val SCLEX_TEX=49 val SCLEX_METAPOST=50 val SCLEX_POWERBASIC=51 val SCLEX_FORTH=52 val SCLEX_ERLANG=53 val SCLEX_OCTAVE=54 val SCLEX_MSSQL=55 val SCLEX_VERILOG=56 val SCLEX_KIX=57 val SCLEX_GUI4CLI=58 val SCLEX_SPECMAN=59 val SCLEX_AU3=60 val SCLEX_APDL=61 val SCLEX_BASH=62 val SCLEX_ASN1=63 val SCLEX_VHDL=64 val SCLEX_CAML=65 val SCLEX_BLITZBASIC=66 val SCLEX_PUREBASIC=67 val SCLEX_HASKELL=68 val SCLEX_PHPSCRIPT=69 val SCLEX_TADS3=70 val SCLEX_REBOL=71 val SCLEX_SMALLTALK=72 val SCLEX_FLAGSHIP=73 val SCLEX_CSOUND=74 val SCLEX_FREEBASIC=75 val SCLEX_INNOSETUP=76 val SCLEX_OPAL=77 val SCLEX_SPICE=78 val SCLEX_D=79 val SCLEX_CMAKE=80 val SCLEX_GAP=81 val SCLEX_PLM=82 val SCLEX_PROGRESS=83 val SCLEX_ABAQUS=84 val SCLEX_ASYMPTOTE=85 val SCLEX_R=86 val SCLEX_MAGIK=87 val SCLEX_POWERSHELL=88 val SCLEX_MYSQL=89 val SCLEX_PO=90 val SCLEX_TAL=91 val SCLEX_COBOL=92 val SCLEX_TACL=93 val SCLEX_SORCUS=94 val SCLEX_POWERPRO=95 val SCLEX_NIMROD=96 val SCLEX_SML=97 val SCLEX_MARKDOWN=98 val SCLEX_TXT2TAGS=99 val SCLEX_A68K=100 val SCLEX_MODULA=101 val SCLEX_COFFEESCRIPT=102 val SCLEX_TCMD=103 val SCLEX_AVS=104 val SCLEX_ECL=105 val SCLEX_OSCRIPT=106 val SCLEX_VISUALPROLOG=107 val SCLEX_LITERATEHASKELL=108 val SCLEX_STTXT=109 val SCLEX_KVIRC=110 val SCLEX_RUST=111 val SCLEX_DMAP=112 val SCLEX_AS=113 val SCLEX_DMIS=114 val SCLEX_REGISTRY=115 val SCLEX_BIBTEX=116 val SCLEX_SREC=117 val SCLEX_IHEX=118 val SCLEX_TEHEX=119 val SCLEX_JSON=120 val SCLEX_EDIFACT=121 # When a lexer specifies its language as SCLEX_AUTOMATIC it receives a # value assigned in sequence from SCLEX_AUTOMATIC+1. val SCLEX_AUTOMATIC=1000 # Lexical states for SCLEX_PYTHON lex Python=SCLEX_PYTHON SCE_P_ lex Nimrod=SCLEX_NIMROD SCE_P_ val SCE_P_DEFAULT=0 val SCE_P_COMMENTLINE=1 val SCE_P_NUMBER=2 val SCE_P_STRING=3 val SCE_P_CHARACTER=4 val SCE_P_WORD=5 val SCE_P_TRIPLE=6 val SCE_P_TRIPLEDOUBLE=7 val SCE_P_CLASSNAME=8 val SCE_P_DEFNAME=9 val SCE_P_OPERATOR=10 val SCE_P_IDENTIFIER=11 val SCE_P_COMMENTBLOCK=12 val SCE_P_STRINGEOL=13 val SCE_P_WORD2=14 val SCE_P_DECORATOR=15 # Lexical states for SCLEX_CPP, SCLEX_BULLANT, SCLEX_COBOL, SCLEX_TACL, SCLEX_TAL lex Cpp=SCLEX_CPP SCE_C_ lex BullAnt=SCLEX_BULLANT SCE_C_ lex COBOL=SCLEX_COBOL SCE_C_ lex TACL=SCLEX_TACL SCE_C_ lex TAL=SCLEX_TAL SCE_C_ val SCE_C_DEFAULT=0 val SCE_C_COMMENT=1 val SCE_C_COMMENTLINE=2 val SCE_C_COMMENTDOC=3 val SCE_C_NUMBER=4 val SCE_C_WORD=5 val SCE_C_STRING=6 val SCE_C_CHARACTER=7 val SCE_C_UUID=8 val SCE_C_PREPROCESSOR=9 val SCE_C_OPERATOR=10 val SCE_C_IDENTIFIER=11 val SCE_C_STRINGEOL=12 val SCE_C_VERBATIM=13 val SCE_C_REGEX=14 val SCE_C_COMMENTLINEDOC=15 val SCE_C_WORD2=16 val SCE_C_COMMENTDOCKEYWORD=17 val SCE_C_COMMENTDOCKEYWORDERROR=18 val SCE_C_GLOBALCLASS=19 val SCE_C_STRINGRAW=20 val SCE_C_TRIPLEVERBATIM=21 val SCE_C_HASHQUOTEDSTRING=22 val SCE_C_PREPROCESSORCOMMENT=23 val SCE_C_PREPROCESSORCOMMENTDOC=24 val SCE_C_USERLITERAL=25 val SCE_C_TASKMARKER=26 val SCE_C_ESCAPESEQUENCE=27 # Lexical states for SCLEX_D lex D=SCLEX_D SCE_D_ val SCE_D_DEFAULT=0 val SCE_D_COMMENT=1 val SCE_D_COMMENTLINE=2 val SCE_D_COMMENTDOC=3 val SCE_D_COMMENTNESTED=4 val SCE_D_NUMBER=5 val SCE_D_WORD=6 val SCE_D_WORD2=7 val SCE_D_WORD3=8 val SCE_D_TYPEDEF=9 val SCE_D_STRING=10 val SCE_D_STRINGEOL=11 val SCE_D_CHARACTER=12 val SCE_D_OPERATOR=13 val SCE_D_IDENTIFIER=14 val SCE_D_COMMENTLINEDOC=15 val SCE_D_COMMENTDOCKEYWORD=16 val SCE_D_COMMENTDOCKEYWORDERROR=17 val SCE_D_STRINGB=18 val SCE_D_STRINGR=19 val SCE_D_WORD5=20 val SCE_D_WORD6=21 val SCE_D_WORD7=22 # Lexical states for SCLEX_TCL lex TCL=SCLEX_TCL SCE_TCL_ val SCE_TCL_DEFAULT=0 val SCE_TCL_COMMENT=1 val SCE_TCL_COMMENTLINE=2 val SCE_TCL_NUMBER=3 val SCE_TCL_WORD_IN_QUOTE=4 val SCE_TCL_IN_QUOTE=5 val SCE_TCL_OPERATOR=6 val SCE_TCL_IDENTIFIER=7 val SCE_TCL_SUBSTITUTION=8 val SCE_TCL_SUB_BRACE=9 val SCE_TCL_MODIFIER=10 val SCE_TCL_EXPAND=11 val SCE_TCL_WORD=12 val SCE_TCL_WORD2=13 val SCE_TCL_WORD3=14 val SCE_TCL_WORD4=15 val SCE_TCL_WORD5=16 val SCE_TCL_WORD6=17 val SCE_TCL_WORD7=18 val SCE_TCL_WORD8=19 val SCE_TCL_COMMENT_BOX=20 val SCE_TCL_BLOCK_COMMENT=21 # Lexical states for SCLEX_HTML, SCLEX_XML lex HTML=SCLEX_HTML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_ lex XML=SCLEX_XML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_ val SCE_H_DEFAULT=0 val SCE_H_TAG=1 val SCE_H_TAGUNKNOWN=2 val SCE_H_ATTRIBUTE=3 val SCE_H_ATTRIBUTEUNKNOWN=4 val SCE_H_NUMBER=5 val SCE_H_DOUBLESTRING=6 val SCE_H_SINGLESTRING=7 val SCE_H_OTHER=8 val SCE_H_COMMENT=9 val SCE_H_ENTITY=10 # XML and ASP val SCE_H_TAGEND=11 val SCE_H_XMLSTART=12 val SCE_H_XMLEND=13 val SCE_H_SCRIPT=14 val SCE_H_ASP=15 val SCE_H_ASPAT=16 val SCE_H_CDATA=17 val SCE_H_QUESTION=18 # More HTML val SCE_H_VALUE=19 # X-Code val SCE_H_XCCOMMENT=20 # SGML val SCE_H_SGML_DEFAULT=21 val SCE_H_SGML_COMMAND=22 val SCE_H_SGML_1ST_PARAM=23 val SCE_H_SGML_DOUBLESTRING=24 val SCE_H_SGML_SIMPLESTRING=25 val SCE_H_SGML_ERROR=26 val SCE_H_SGML_SPECIAL=27 val SCE_H_SGML_ENTITY=28 val SCE_H_SGML_COMMENT=29 val SCE_H_SGML_1ST_PARAM_COMMENT=30 val SCE_H_SGML_BLOCK_DEFAULT=31 # Embedded Javascript val SCE_HJ_START=40 val SCE_HJ_DEFAULT=41 val SCE_HJ_COMMENT=42 val SCE_HJ_COMMENTLINE=43 val SCE_HJ_COMMENTDOC=44 val SCE_HJ_NUMBER=45 val SCE_HJ_WORD=46 val SCE_HJ_KEYWORD=47 val SCE_HJ_DOUBLESTRING=48 val SCE_HJ_SINGLESTRING=49 val SCE_HJ_SYMBOLS=50 val SCE_HJ_STRINGEOL=51 val SCE_HJ_REGEX=52 # ASP Javascript val SCE_HJA_START=55 val SCE_HJA_DEFAULT=56 val SCE_HJA_COMMENT=57 val SCE_HJA_COMMENTLINE=58 val SCE_HJA_COMMENTDOC=59 val SCE_HJA_NUMBER=60 val SCE_HJA_WORD=61 val SCE_HJA_KEYWORD=62 val SCE_HJA_DOUBLESTRING=63 val SCE_HJA_SINGLESTRING=64 val SCE_HJA_SYMBOLS=65 val SCE_HJA_STRINGEOL=66 val SCE_HJA_REGEX=67 # Embedded VBScript val SCE_HB_START=70 val SCE_HB_DEFAULT=71 val SCE_HB_COMMENTLINE=72 val SCE_HB_NUMBER=73 val SCE_HB_WORD=74 val SCE_HB_STRING=75 val SCE_HB_IDENTIFIER=76 val SCE_HB_STRINGEOL=77 # ASP VBScript val SCE_HBA_START=80 val SCE_HBA_DEFAULT=81 val SCE_HBA_COMMENTLINE=82 val SCE_HBA_NUMBER=83 val SCE_HBA_WORD=84 val SCE_HBA_STRING=85 val SCE_HBA_IDENTIFIER=86 val SCE_HBA_STRINGEOL=87 # Embedded Python val SCE_HP_START=90 val SCE_HP_DEFAULT=91 val SCE_HP_COMMENTLINE=92 val SCE_HP_NUMBER=93 val SCE_HP_STRING=94 val SCE_HP_CHARACTER=95 val SCE_HP_WORD=96 val SCE_HP_TRIPLE=97 val SCE_HP_TRIPLEDOUBLE=98 val SCE_HP_CLASSNAME=99 val SCE_HP_DEFNAME=100 val SCE_HP_OPERATOR=101 val SCE_HP_IDENTIFIER=102 # PHP val SCE_HPHP_COMPLEX_VARIABLE=104 # ASP Python val SCE_HPA_START=105 val SCE_HPA_DEFAULT=106 val SCE_HPA_COMMENTLINE=107 val SCE_HPA_NUMBER=108 val SCE_HPA_STRING=109 val SCE_HPA_CHARACTER=110 val SCE_HPA_WORD=111 val SCE_HPA_TRIPLE=112 val SCE_HPA_TRIPLEDOUBLE=113 val SCE_HPA_CLASSNAME=114 val SCE_HPA_DEFNAME=115 val SCE_HPA_OPERATOR=116 val SCE_HPA_IDENTIFIER=117 # PHP val SCE_HPHP_DEFAULT=118 val SCE_HPHP_HSTRING=119 val SCE_HPHP_SIMPLESTRING=120 val SCE_HPHP_WORD=121 val SCE_HPHP_NUMBER=122 val SCE_HPHP_VARIABLE=123 val SCE_HPHP_COMMENT=124 val SCE_HPHP_COMMENTLINE=125 val SCE_HPHP_HSTRING_VARIABLE=126 val SCE_HPHP_OPERATOR=127 # Lexical states for SCLEX_PERL lex Perl=SCLEX_PERL SCE_PL_ val SCE_PL_DEFAULT=0 val SCE_PL_ERROR=1 val SCE_PL_COMMENTLINE=2 val SCE_PL_POD=3 val SCE_PL_NUMBER=4 val SCE_PL_WORD=5 val SCE_PL_STRING=6 val SCE_PL_CHARACTER=7 val SCE_PL_PUNCTUATION=8 val SCE_PL_PREPROCESSOR=9 val SCE_PL_OPERATOR=10 val SCE_PL_IDENTIFIER=11 val SCE_PL_SCALAR=12 val SCE_PL_ARRAY=13 val SCE_PL_HASH=14 val SCE_PL_SYMBOLTABLE=15 val SCE_PL_VARIABLE_INDEXER=16 val SCE_PL_REGEX=17 val SCE_PL_REGSUBST=18 val SCE_PL_LONGQUOTE=19 val SCE_PL_BACKTICKS=20 val SCE_PL_DATASECTION=21 val SCE_PL_HERE_DELIM=22 val SCE_PL_HERE_Q=23 val SCE_PL_HERE_QQ=24 val SCE_PL_HERE_QX=25 val SCE_PL_STRING_Q=26 val SCE_PL_STRING_QQ=27 val SCE_PL_STRING_QX=28 val SCE_PL_STRING_QR=29 val SCE_PL_STRING_QW=30 val SCE_PL_POD_VERB=31 val SCE_PL_SUB_PROTOTYPE=40 val SCE_PL_FORMAT_IDENT=41 val SCE_PL_FORMAT=42 val SCE_PL_STRING_VAR=43 val SCE_PL_XLAT=44 val SCE_PL_REGEX_VAR=54 val SCE_PL_REGSUBST_VAR=55 val SCE_PL_BACKTICKS_VAR=57 val SCE_PL_HERE_QQ_VAR=61 val SCE_PL_HERE_QX_VAR=62 val SCE_PL_STRING_QQ_VAR=64 val SCE_PL_STRING_QX_VAR=65 val SCE_PL_STRING_QR_VAR=66 # Lexical states for SCLEX_RUBY lex Ruby=SCLEX_RUBY SCE_RB_ val SCE_RB_DEFAULT=0 val SCE_RB_ERROR=1 val SCE_RB_COMMENTLINE=2 val SCE_RB_POD=3 val SCE_RB_NUMBER=4 val SCE_RB_WORD=5 val SCE_RB_STRING=6 val SCE_RB_CHARACTER=7 val SCE_RB_CLASSNAME=8 val SCE_RB_DEFNAME=9 val SCE_RB_OPERATOR=10 val SCE_RB_IDENTIFIER=11 val SCE_RB_REGEX=12 val SCE_RB_GLOBAL=13 val SCE_RB_SYMBOL=14 val SCE_RB_MODULE_NAME=15 val SCE_RB_INSTANCE_VAR=16 val SCE_RB_CLASS_VAR=17 val SCE_RB_BACKTICKS=18 val SCE_RB_DATASECTION=19 val SCE_RB_HERE_DELIM=20 val SCE_RB_HERE_Q=21 val SCE_RB_HERE_QQ=22 val SCE_RB_HERE_QX=23 val SCE_RB_STRING_Q=24 val SCE_RB_STRING_QQ=25 val SCE_RB_STRING_QX=26 val SCE_RB_STRING_QR=27 val SCE_RB_STRING_QW=28 val SCE_RB_WORD_DEMOTED=29 val SCE_RB_STDIN=30 val SCE_RB_STDOUT=31 val SCE_RB_STDERR=40 val SCE_RB_UPPER_BOUND=41 # Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC, SCLEX_BLITZBASIC, SCLEX_PUREBASIC, SCLEX_FREEBASIC lex VB=SCLEX_VB SCE_B_ lex VBScript=SCLEX_VBSCRIPT SCE_B_ lex PowerBasic=SCLEX_POWERBASIC SCE_B_ lex BlitzBasic=SCLEX_BLITZBASIC SCE_B_ lex PureBasic=SCLEX_PUREBASIC SCE_B_ lex FreeBasic=SCLEX_FREEBASIC SCE_B_ val SCE_B_DEFAULT=0 val SCE_B_COMMENT=1 val SCE_B_NUMBER=2 val SCE_B_KEYWORD=3 val SCE_B_STRING=4 val SCE_B_PREPROCESSOR=5 val SCE_B_OPERATOR=6 val SCE_B_IDENTIFIER=7 val SCE_B_DATE=8 val SCE_B_STRINGEOL=9 val SCE_B_KEYWORD2=10 val SCE_B_KEYWORD3=11 val SCE_B_KEYWORD4=12 val SCE_B_CONSTANT=13 val SCE_B_ASM=14 val SCE_B_LABEL=15 val SCE_B_ERROR=16 val SCE_B_HEXNUMBER=17 val SCE_B_BINNUMBER=18 val SCE_B_COMMENTBLOCK=19 val SCE_B_DOCLINE=20 val SCE_B_DOCBLOCK=21 val SCE_B_DOCKEYWORD=22 # Lexical states for SCLEX_PROPERTIES lex Properties=SCLEX_PROPERTIES SCE_PROPS_ val SCE_PROPS_DEFAULT=0 val SCE_PROPS_COMMENT=1 val SCE_PROPS_SECTION=2 val SCE_PROPS_ASSIGNMENT=3 val SCE_PROPS_DEFVAL=4 val SCE_PROPS_KEY=5 # Lexical states for SCLEX_LATEX lex LaTeX=SCLEX_LATEX SCE_L_ val SCE_L_DEFAULT=0 val SCE_L_COMMAND=1 val SCE_L_TAG=2 val SCE_L_MATH=3 val SCE_L_COMMENT=4 val SCE_L_TAG2=5 val SCE_L_MATH2=6 val SCE_L_COMMENT2=7 val SCE_L_VERBATIM=8 val SCE_L_SHORTCMD=9 val SCE_L_SPECIAL=10 val SCE_L_CMDOPT=11 val SCE_L_ERROR=12 # Lexical states for SCLEX_LUA lex Lua=SCLEX_LUA SCE_LUA_ val SCE_LUA_DEFAULT=0 val SCE_LUA_COMMENT=1 val SCE_LUA_COMMENTLINE=2 val SCE_LUA_COMMENTDOC=3 val SCE_LUA_NUMBER=4 val SCE_LUA_WORD=5 val SCE_LUA_STRING=6 val SCE_LUA_CHARACTER=7 val SCE_LUA_LITERALSTRING=8 val SCE_LUA_PREPROCESSOR=9 val SCE_LUA_OPERATOR=10 val SCE_LUA_IDENTIFIER=11 val SCE_LUA_STRINGEOL=12 val SCE_LUA_WORD2=13 val SCE_LUA_WORD3=14 val SCE_LUA_WORD4=15 val SCE_LUA_WORD5=16 val SCE_LUA_WORD6=17 val SCE_LUA_WORD7=18 val SCE_LUA_WORD8=19 val SCE_LUA_LABEL=20 # Lexical states for SCLEX_ERRORLIST lex ErrorList=SCLEX_ERRORLIST SCE_ERR_ val SCE_ERR_DEFAULT=0 val SCE_ERR_PYTHON=1 val SCE_ERR_GCC=2 val SCE_ERR_MS=3 val SCE_ERR_CMD=4 val SCE_ERR_BORLAND=5 val SCE_ERR_PERL=6 val SCE_ERR_NET=7 val SCE_ERR_LUA=8 val SCE_ERR_CTAG=9 val SCE_ERR_DIFF_CHANGED=10 val SCE_ERR_DIFF_ADDITION=11 val SCE_ERR_DIFF_DELETION=12 val SCE_ERR_DIFF_MESSAGE=13 val SCE_ERR_PHP=14 val SCE_ERR_ELF=15 val SCE_ERR_IFC=16 val SCE_ERR_IFORT=17 val SCE_ERR_ABSF=18 val SCE_ERR_TIDY=19 val SCE_ERR_JAVA_STACK=20 val SCE_ERR_VALUE=21 val SCE_ERR_GCC_INCLUDED_FROM=22 val SCE_ERR_ESCSEQ=23 val SCE_ERR_ESCSEQ_UNKNOWN=24 val SCE_ERR_ES_BLACK=40 val SCE_ERR_ES_RED=41 val SCE_ERR_ES_GREEN=42 val SCE_ERR_ES_BROWN=43 val SCE_ERR_ES_BLUE=44 val SCE_ERR_ES_MAGENTA=45 val SCE_ERR_ES_CYAN=46 val SCE_ERR_ES_GRAY=47 val SCE_ERR_ES_DARK_GRAY=48 val SCE_ERR_ES_BRIGHT_RED=49 val SCE_ERR_ES_BRIGHT_GREEN=50 val SCE_ERR_ES_YELLOW=51 val SCE_ERR_ES_BRIGHT_BLUE=52 val SCE_ERR_ES_BRIGHT_MAGENTA=53 val SCE_ERR_ES_BRIGHT_CYAN=54 val SCE_ERR_ES_WHITE=55 # Lexical states for SCLEX_BATCH lex Batch=SCLEX_BATCH SCE_BAT_ val SCE_BAT_DEFAULT=0 val SCE_BAT_COMMENT=1 val SCE_BAT_WORD=2 val SCE_BAT_LABEL=3 val SCE_BAT_HIDE=4 val SCE_BAT_COMMAND=5 val SCE_BAT_IDENTIFIER=6 val SCE_BAT_OPERATOR=7 # Lexical states for SCLEX_TCMD lex TCMD=SCLEX_TCMD SCE_TCMD_ val SCE_TCMD_DEFAULT=0 val SCE_TCMD_COMMENT=1 val SCE_TCMD_WORD=2 val SCE_TCMD_LABEL=3 val SCE_TCMD_HIDE=4 val SCE_TCMD_COMMAND=5 val SCE_TCMD_IDENTIFIER=6 val SCE_TCMD_OPERATOR=7 val SCE_TCMD_ENVIRONMENT=8 val SCE_TCMD_EXPANSION=9 val SCE_TCMD_CLABEL=10 # Lexical states for SCLEX_MAKEFILE lex MakeFile=SCLEX_MAKEFILE SCE_MAKE_ val SCE_MAKE_DEFAULT=0 val SCE_MAKE_COMMENT=1 val SCE_MAKE_PREPROCESSOR=2 val SCE_MAKE_IDENTIFIER=3 val SCE_MAKE_OPERATOR=4 val SCE_MAKE_TARGET=5 val SCE_MAKE_IDEOL=9 # Lexical states for SCLEX_DIFF lex Diff=SCLEX_DIFF SCE_DIFF_ val SCE_DIFF_DEFAULT=0 val SCE_DIFF_COMMENT=1 val SCE_DIFF_COMMAND=2 val SCE_DIFF_HEADER=3 val SCE_DIFF_POSITION=4 val SCE_DIFF_DELETED=5 val SCE_DIFF_ADDED=6 val SCE_DIFF_CHANGED=7 # Lexical states for SCLEX_CONF (Apache Configuration Files Lexer) lex Conf=SCLEX_CONF SCE_CONF_ val SCE_CONF_DEFAULT=0 val SCE_CONF_COMMENT=1 val SCE_CONF_NUMBER=2 val SCE_CONF_IDENTIFIER=3 val SCE_CONF_EXTENSION=4 val SCE_CONF_PARAMETER=5 val SCE_CONF_STRING=6 val SCE_CONF_OPERATOR=7 val SCE_CONF_IP=8 val SCE_CONF_DIRECTIVE=9 # Lexical states for SCLEX_AVE, Avenue lex Avenue=SCLEX_AVE SCE_AVE_ val SCE_AVE_DEFAULT=0 val SCE_AVE_COMMENT=1 val SCE_AVE_NUMBER=2 val SCE_AVE_WORD=3 val SCE_AVE_STRING=6 val SCE_AVE_ENUM=7 val SCE_AVE_STRINGEOL=8 val SCE_AVE_IDENTIFIER=9 val SCE_AVE_OPERATOR=10 val SCE_AVE_WORD1=11 val SCE_AVE_WORD2=12 val SCE_AVE_WORD3=13 val SCE_AVE_WORD4=14 val SCE_AVE_WORD5=15 val SCE_AVE_WORD6=16 # Lexical states for SCLEX_ADA lex Ada=SCLEX_ADA SCE_ADA_ val SCE_ADA_DEFAULT=0 val SCE_ADA_WORD=1 val SCE_ADA_IDENTIFIER=2 val SCE_ADA_NUMBER=3 val SCE_ADA_DELIMITER=4 val SCE_ADA_CHARACTER=5 val SCE_ADA_CHARACTEREOL=6 val SCE_ADA_STRING=7 val SCE_ADA_STRINGEOL=8 val SCE_ADA_LABEL=9 val SCE_ADA_COMMENTLINE=10 val SCE_ADA_ILLEGAL=11 # Lexical states for SCLEX_BAAN lex Baan=SCLEX_BAAN SCE_BAAN_ val SCE_BAAN_DEFAULT=0 val SCE_BAAN_COMMENT=1 val SCE_BAAN_COMMENTDOC=2 val SCE_BAAN_NUMBER=3 val SCE_BAAN_WORD=4 val SCE_BAAN_STRING=5 val SCE_BAAN_PREPROCESSOR=6 val SCE_BAAN_OPERATOR=7 val SCE_BAAN_IDENTIFIER=8 val SCE_BAAN_STRINGEOL=9 val SCE_BAAN_WORD2=10 val SCE_BAAN_WORD3=11 val SCE_BAAN_WORD4=12 val SCE_BAAN_WORD5=13 val SCE_BAAN_WORD6=14 val SCE_BAAN_WORD7=15 val SCE_BAAN_WORD8=16 val SCE_BAAN_WORD9=17 val SCE_BAAN_TABLEDEF=18 val SCE_BAAN_TABLESQL=19 val SCE_BAAN_FUNCTION=20 val SCE_BAAN_DOMDEF=21 val SCE_BAAN_FUNCDEF=22 val SCE_BAAN_OBJECTDEF=23 val SCE_BAAN_DEFINEDEF=24 # Lexical states for SCLEX_LISP lex Lisp=SCLEX_LISP SCE_LISP_ val SCE_LISP_DEFAULT=0 val SCE_LISP_COMMENT=1 val SCE_LISP_NUMBER=2 val SCE_LISP_KEYWORD=3 val SCE_LISP_KEYWORD_KW=4 val SCE_LISP_SYMBOL=5 val SCE_LISP_STRING=6 val SCE_LISP_STRINGEOL=8 val SCE_LISP_IDENTIFIER=9 val SCE_LISP_OPERATOR=10 val SCE_LISP_SPECIAL=11 val SCE_LISP_MULTI_COMMENT=12 # Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW lex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_ lex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_ val SCE_EIFFEL_DEFAULT=0 val SCE_EIFFEL_COMMENTLINE=1 val SCE_EIFFEL_NUMBER=2 val SCE_EIFFEL_WORD=3 val SCE_EIFFEL_STRING=4 val SCE_EIFFEL_CHARACTER=5 val SCE_EIFFEL_OPERATOR=6 val SCE_EIFFEL_IDENTIFIER=7 val SCE_EIFFEL_STRINGEOL=8 # Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer) lex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_ val SCE_NNCRONTAB_DEFAULT=0 val SCE_NNCRONTAB_COMMENT=1 val SCE_NNCRONTAB_TASK=2 val SCE_NNCRONTAB_SECTION=3 val SCE_NNCRONTAB_KEYWORD=4 val SCE_NNCRONTAB_MODIFIER=5 val SCE_NNCRONTAB_ASTERISK=6 val SCE_NNCRONTAB_NUMBER=7 val SCE_NNCRONTAB_STRING=8 val SCE_NNCRONTAB_ENVIRONMENT=9 val SCE_NNCRONTAB_IDENTIFIER=10 # Lexical states for SCLEX_FORTH (Forth Lexer) lex Forth=SCLEX_FORTH SCE_FORTH_ val SCE_FORTH_DEFAULT=0 val SCE_FORTH_COMMENT=1 val SCE_FORTH_COMMENT_ML=2 val SCE_FORTH_IDENTIFIER=3 val SCE_FORTH_CONTROL=4 val SCE_FORTH_KEYWORD=5 val SCE_FORTH_DEFWORD=6 val SCE_FORTH_PREWORD1=7 val SCE_FORTH_PREWORD2=8 val SCE_FORTH_NUMBER=9 val SCE_FORTH_STRING=10 val SCE_FORTH_LOCALE=11 # Lexical states for SCLEX_MATLAB lex MatLab=SCLEX_MATLAB SCE_MATLAB_ val SCE_MATLAB_DEFAULT=0 val SCE_MATLAB_COMMENT=1 val SCE_MATLAB_COMMAND=2 val SCE_MATLAB_NUMBER=3 val SCE_MATLAB_KEYWORD=4 # single quoted string val SCE_MATLAB_STRING=5 val SCE_MATLAB_OPERATOR=6 val SCE_MATLAB_IDENTIFIER=7 val SCE_MATLAB_DOUBLEQUOTESTRING=8 # Lexical states for SCLEX_SCRIPTOL lex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_ val SCE_SCRIPTOL_DEFAULT=0 val SCE_SCRIPTOL_WHITE=1 val SCE_SCRIPTOL_COMMENTLINE=2 val SCE_SCRIPTOL_PERSISTENT=3 val SCE_SCRIPTOL_CSTYLE=4 val SCE_SCRIPTOL_COMMENTBLOCK=5 val SCE_SCRIPTOL_NUMBER=6 val SCE_SCRIPTOL_STRING=7 val SCE_SCRIPTOL_CHARACTER=8 val SCE_SCRIPTOL_STRINGEOL=9 val SCE_SCRIPTOL_KEYWORD=10 val SCE_SCRIPTOL_OPERATOR=11 val SCE_SCRIPTOL_IDENTIFIER=12 val SCE_SCRIPTOL_TRIPLE=13 val SCE_SCRIPTOL_CLASSNAME=14 val SCE_SCRIPTOL_PREPROCESSOR=15 # Lexical states for SCLEX_ASM, SCLEX_AS lex Asm=SCLEX_ASM SCE_ASM_ lex As=SCLEX_AS SCE_ASM_ val SCE_ASM_DEFAULT=0 val SCE_ASM_COMMENT=1 val SCE_ASM_NUMBER=2 val SCE_ASM_STRING=3 val SCE_ASM_OPERATOR=4 val SCE_ASM_IDENTIFIER=5 val SCE_ASM_CPUINSTRUCTION=6 val SCE_ASM_MATHINSTRUCTION=7 val SCE_ASM_REGISTER=8 val SCE_ASM_DIRECTIVE=9 val SCE_ASM_DIRECTIVEOPERAND=10 val SCE_ASM_COMMENTBLOCK=11 val SCE_ASM_CHARACTER=12 val SCE_ASM_STRINGEOL=13 val SCE_ASM_EXTINSTRUCTION=14 val SCE_ASM_COMMENTDIRECTIVE=15 # Lexical states for SCLEX_FORTRAN lex Fortran=SCLEX_FORTRAN SCE_F_ lex F77=SCLEX_F77 SCE_F_ val SCE_F_DEFAULT=0 val SCE_F_COMMENT=1 val SCE_F_NUMBER=2 val SCE_F_STRING1=3 val SCE_F_STRING2=4 val SCE_F_STRINGEOL=5 val SCE_F_OPERATOR=6 val SCE_F_IDENTIFIER=7 val SCE_F_WORD=8 val SCE_F_WORD2=9 val SCE_F_WORD3=10 val SCE_F_PREPROCESSOR=11 val SCE_F_OPERATOR2=12 val SCE_F_LABEL=13 val SCE_F_CONTINUATION=14 # Lexical states for SCLEX_CSS lex CSS=SCLEX_CSS SCE_CSS_ val SCE_CSS_DEFAULT=0 val SCE_CSS_TAG=1 val SCE_CSS_CLASS=2 val SCE_CSS_PSEUDOCLASS=3 val SCE_CSS_UNKNOWN_PSEUDOCLASS=4 val SCE_CSS_OPERATOR=5 val SCE_CSS_IDENTIFIER=6 val SCE_CSS_UNKNOWN_IDENTIFIER=7 val SCE_CSS_VALUE=8 val SCE_CSS_COMMENT=9 val SCE_CSS_ID=10 val SCE_CSS_IMPORTANT=11 val SCE_CSS_DIRECTIVE=12 val SCE_CSS_DOUBLESTRING=13 val SCE_CSS_SINGLESTRING=14 val SCE_CSS_IDENTIFIER2=15 val SCE_CSS_ATTRIBUTE=16 val SCE_CSS_IDENTIFIER3=17 val SCE_CSS_PSEUDOELEMENT=18 val SCE_CSS_EXTENDED_IDENTIFIER=19 val SCE_CSS_EXTENDED_PSEUDOCLASS=20 val SCE_CSS_EXTENDED_PSEUDOELEMENT=21 val SCE_CSS_MEDIA=22 val SCE_CSS_VARIABLE=23 # Lexical states for SCLEX_POV lex POV=SCLEX_POV SCE_POV_ val SCE_POV_DEFAULT=0 val SCE_POV_COMMENT=1 val SCE_POV_COMMENTLINE=2 val SCE_POV_NUMBER=3 val SCE_POV_OPERATOR=4 val SCE_POV_IDENTIFIER=5 val SCE_POV_STRING=6 val SCE_POV_STRINGEOL=7 val SCE_POV_DIRECTIVE=8 val SCE_POV_BADDIRECTIVE=9 val SCE_POV_WORD2=10 val SCE_POV_WORD3=11 val SCE_POV_WORD4=12 val SCE_POV_WORD5=13 val SCE_POV_WORD6=14 val SCE_POV_WORD7=15 val SCE_POV_WORD8=16 # Lexical states for SCLEX_LOUT lex LOUT=SCLEX_LOUT SCE_LOUT_ val SCE_LOUT_DEFAULT=0 val SCE_LOUT_COMMENT=1 val SCE_LOUT_NUMBER=2 val SCE_LOUT_WORD=3 val SCE_LOUT_WORD2=4 val SCE_LOUT_WORD3=5 val SCE_LOUT_WORD4=6 val SCE_LOUT_STRING=7 val SCE_LOUT_OPERATOR=8 val SCE_LOUT_IDENTIFIER=9 val SCE_LOUT_STRINGEOL=10 # Lexical states for SCLEX_ESCRIPT lex ESCRIPT=SCLEX_ESCRIPT SCE_ESCRIPT_ val SCE_ESCRIPT_DEFAULT=0 val SCE_ESCRIPT_COMMENT=1 val SCE_ESCRIPT_COMMENTLINE=2 val SCE_ESCRIPT_COMMENTDOC=3 val SCE_ESCRIPT_NUMBER=4 val SCE_ESCRIPT_WORD=5 val SCE_ESCRIPT_STRING=6 val SCE_ESCRIPT_OPERATOR=7 val SCE_ESCRIPT_IDENTIFIER=8 val SCE_ESCRIPT_BRACE=9 val SCE_ESCRIPT_WORD2=10 val SCE_ESCRIPT_WORD3=11 # Lexical states for SCLEX_PS lex PS=SCLEX_PS SCE_PS_ val SCE_PS_DEFAULT=0 val SCE_PS_COMMENT=1 val SCE_PS_DSC_COMMENT=2 val SCE_PS_DSC_VALUE=3 val SCE_PS_NUMBER=4 val SCE_PS_NAME=5 val SCE_PS_KEYWORD=6 val SCE_PS_LITERAL=7 val SCE_PS_IMMEVAL=8 val SCE_PS_PAREN_ARRAY=9 val SCE_PS_PAREN_DICT=10 val SCE_PS_PAREN_PROC=11 val SCE_PS_TEXT=12 val SCE_PS_HEXSTRING=13 val SCE_PS_BASE85STRING=14 val SCE_PS_BADSTRINGCHAR=15 # Lexical states for SCLEX_NSIS lex NSIS=SCLEX_NSIS SCE_NSIS_ val SCE_NSIS_DEFAULT=0 val SCE_NSIS_COMMENT=1 val SCE_NSIS_STRINGDQ=2 val SCE_NSIS_STRINGLQ=3 val SCE_NSIS_STRINGRQ=4 val SCE_NSIS_FUNCTION=5 val SCE_NSIS_VARIABLE=6 val SCE_NSIS_LABEL=7 val SCE_NSIS_USERDEFINED=8 val SCE_NSIS_SECTIONDEF=9 val SCE_NSIS_SUBSECTIONDEF=10 val SCE_NSIS_IFDEFINEDEF=11 val SCE_NSIS_MACRODEF=12 val SCE_NSIS_STRINGVAR=13 val SCE_NSIS_NUMBER=14 val SCE_NSIS_SECTIONGROUP=15 val SCE_NSIS_PAGEEX=16 val SCE_NSIS_FUNCTIONDEF=17 val SCE_NSIS_COMMENTBOX=18 # Lexical states for SCLEX_MMIXAL lex MMIXAL=SCLEX_MMIXAL SCE_MMIXAL_ val SCE_MMIXAL_LEADWS=0 val SCE_MMIXAL_COMMENT=1 val SCE_MMIXAL_LABEL=2 val SCE_MMIXAL_OPCODE=3 val SCE_MMIXAL_OPCODE_PRE=4 val SCE_MMIXAL_OPCODE_VALID=5 val SCE_MMIXAL_OPCODE_UNKNOWN=6 val SCE_MMIXAL_OPCODE_POST=7 val SCE_MMIXAL_OPERANDS=8 val SCE_MMIXAL_NUMBER=9 val SCE_MMIXAL_REF=10 val SCE_MMIXAL_CHAR=11 val SCE_MMIXAL_STRING=12 val SCE_MMIXAL_REGISTER=13 val SCE_MMIXAL_HEX=14 val SCE_MMIXAL_OPERATOR=15 val SCE_MMIXAL_SYMBOL=16 val SCE_MMIXAL_INCLUDE=17 # Lexical states for SCLEX_CLW lex Clarion=SCLEX_CLW SCE_CLW_ val SCE_CLW_DEFAULT=0 val SCE_CLW_LABEL=1 val SCE_CLW_COMMENT=2 val SCE_CLW_STRING=3 val SCE_CLW_USER_IDENTIFIER=4 val SCE_CLW_INTEGER_CONSTANT=5 val SCE_CLW_REAL_CONSTANT=6 val SCE_CLW_PICTURE_STRING=7 val SCE_CLW_KEYWORD=8 val SCE_CLW_COMPILER_DIRECTIVE=9 val SCE_CLW_RUNTIME_EXPRESSIONS=10 val SCE_CLW_BUILTIN_PROCEDURES_FUNCTION=11 val SCE_CLW_STRUCTURE_DATA_TYPE=12 val SCE_CLW_ATTRIBUTE=13 val SCE_CLW_STANDARD_EQUATE=14 val SCE_CLW_ERROR=15 val SCE_CLW_DEPRECATED=16 # Lexical states for SCLEX_LOT lex LOT=SCLEX_LOT SCE_LOT_ val SCE_LOT_DEFAULT=0 val SCE_LOT_HEADER=1 val SCE_LOT_BREAK=2 val SCE_LOT_SET=3 val SCE_LOT_PASS=4 val SCE_LOT_FAIL=5 val SCE_LOT_ABORT=6 # Lexical states for SCLEX_YAML lex YAML=SCLEX_YAML SCE_YAML_ val SCE_YAML_DEFAULT=0 val SCE_YAML_COMMENT=1 val SCE_YAML_IDENTIFIER=2 val SCE_YAML_KEYWORD=3 val SCE_YAML_NUMBER=4 val SCE_YAML_REFERENCE=5 val SCE_YAML_DOCUMENT=6 val SCE_YAML_TEXT=7 val SCE_YAML_ERROR=8 val SCE_YAML_OPERATOR=9 # Lexical states for SCLEX_TEX lex TeX=SCLEX_TEX SCE_TEX_ val SCE_TEX_DEFAULT=0 val SCE_TEX_SPECIAL=1 val SCE_TEX_GROUP=2 val SCE_TEX_SYMBOL=3 val SCE_TEX_COMMAND=4 val SCE_TEX_TEXT=5 lex Metapost=SCLEX_METAPOST SCE_METAPOST_ val SCE_METAPOST_DEFAULT=0 val SCE_METAPOST_SPECIAL=1 val SCE_METAPOST_GROUP=2 val SCE_METAPOST_SYMBOL=3 val SCE_METAPOST_COMMAND=4 val SCE_METAPOST_TEXT=5 val SCE_METAPOST_EXTRA=6 # Lexical states for SCLEX_ERLANG lex Erlang=SCLEX_ERLANG SCE_ERLANG_ val SCE_ERLANG_DEFAULT=0 val SCE_ERLANG_COMMENT=1 val SCE_ERLANG_VARIABLE=2 val SCE_ERLANG_NUMBER=3 val SCE_ERLANG_KEYWORD=4 val SCE_ERLANG_STRING=5 val SCE_ERLANG_OPERATOR=6 val SCE_ERLANG_ATOM=7 val SCE_ERLANG_FUNCTION_NAME=8 val SCE_ERLANG_CHARACTER=9 val SCE_ERLANG_MACRO=10 val SCE_ERLANG_RECORD=11 val SCE_ERLANG_PREPROC=12 val SCE_ERLANG_NODE_NAME=13 val SCE_ERLANG_COMMENT_FUNCTION=14 val SCE_ERLANG_COMMENT_MODULE=15 val SCE_ERLANG_COMMENT_DOC=16 val SCE_ERLANG_COMMENT_DOC_MACRO=17 val SCE_ERLANG_ATOM_QUOTED=18 val SCE_ERLANG_MACRO_QUOTED=19 val SCE_ERLANG_RECORD_QUOTED=20 val SCE_ERLANG_NODE_NAME_QUOTED=21 val SCE_ERLANG_BIFS=22 val SCE_ERLANG_MODULES=23 val SCE_ERLANG_MODULES_ATT=24 val SCE_ERLANG_UNKNOWN=31 # Lexical states for SCLEX_OCTAVE are identical to MatLab lex Octave=SCLEX_OCTAVE SCE_MATLAB_ # Lexical states for SCLEX_MSSQL lex MSSQL=SCLEX_MSSQL SCE_MSSQL_ val SCE_MSSQL_DEFAULT=0 val SCE_MSSQL_COMMENT=1 val SCE_MSSQL_LINE_COMMENT=2 val SCE_MSSQL_NUMBER=3 val SCE_MSSQL_STRING=4 val SCE_MSSQL_OPERATOR=5 val SCE_MSSQL_IDENTIFIER=6 val SCE_MSSQL_VARIABLE=7 val SCE_MSSQL_COLUMN_NAME=8 val SCE_MSSQL_STATEMENT=9 val SCE_MSSQL_DATATYPE=10 val SCE_MSSQL_SYSTABLE=11 val SCE_MSSQL_GLOBAL_VARIABLE=12 val SCE_MSSQL_FUNCTION=13 val SCE_MSSQL_STORED_PROCEDURE=14 val SCE_MSSQL_DEFAULT_PREF_DATATYPE=15 val SCE_MSSQL_COLUMN_NAME_2=16 # Lexical states for SCLEX_VERILOG lex Verilog=SCLEX_VERILOG SCE_V_ val SCE_V_DEFAULT=0 val SCE_V_COMMENT=1 val SCE_V_COMMENTLINE=2 val SCE_V_COMMENTLINEBANG=3 val SCE_V_NUMBER=4 val SCE_V_WORD=5 val SCE_V_STRING=6 val SCE_V_WORD2=7 val SCE_V_WORD3=8 val SCE_V_PREPROCESSOR=9 val SCE_V_OPERATOR=10 val SCE_V_IDENTIFIER=11 val SCE_V_STRINGEOL=12 val SCE_V_USER=19 val SCE_V_COMMENT_WORD=20 val SCE_V_INPUT=21 val SCE_V_OUTPUT=22 val SCE_V_INOUT=23 val SCE_V_PORT_CONNECT=24 # Lexical states for SCLEX_KIX lex Kix=SCLEX_KIX SCE_KIX_ val SCE_KIX_DEFAULT=0 val SCE_KIX_COMMENT=1 val SCE_KIX_STRING1=2 val SCE_KIX_STRING2=3 val SCE_KIX_NUMBER=4 val SCE_KIX_VAR=5 val SCE_KIX_MACRO=6 val SCE_KIX_KEYWORD=7 val SCE_KIX_FUNCTIONS=8 val SCE_KIX_OPERATOR=9 val SCE_KIX_COMMENTSTREAM=10 val SCE_KIX_IDENTIFIER=31 # Lexical states for SCLEX_GUI4CLI lex Gui4Cli=SCLEX_GUI4CLI SCE_GC_ val SCE_GC_DEFAULT=0 val SCE_GC_COMMENTLINE=1 val SCE_GC_COMMENTBLOCK=2 val SCE_GC_GLOBAL=3 val SCE_GC_EVENT=4 val SCE_GC_ATTRIBUTE=5 val SCE_GC_CONTROL=6 val SCE_GC_COMMAND=7 val SCE_GC_STRING=8 val SCE_GC_OPERATOR=9 # Lexical states for SCLEX_SPECMAN lex Specman=SCLEX_SPECMAN SCE_SN_ val SCE_SN_DEFAULT=0 val SCE_SN_CODE=1 val SCE_SN_COMMENTLINE=2 val SCE_SN_COMMENTLINEBANG=3 val SCE_SN_NUMBER=4 val SCE_SN_WORD=5 val SCE_SN_STRING=6 val SCE_SN_WORD2=7 val SCE_SN_WORD3=8 val SCE_SN_PREPROCESSOR=9 val SCE_SN_OPERATOR=10 val SCE_SN_IDENTIFIER=11 val SCE_SN_STRINGEOL=12 val SCE_SN_REGEXTAG=13 val SCE_SN_SIGNAL=14 val SCE_SN_USER=19 # Lexical states for SCLEX_AU3 lex Au3=SCLEX_AU3 SCE_AU3_ val SCE_AU3_DEFAULT=0 val SCE_AU3_COMMENT=1 val SCE_AU3_COMMENTBLOCK=2 val SCE_AU3_NUMBER=3 val SCE_AU3_FUNCTION=4 val SCE_AU3_KEYWORD=5 val SCE_AU3_MACRO=6 val SCE_AU3_STRING=7 val SCE_AU3_OPERATOR=8 val SCE_AU3_VARIABLE=9 val SCE_AU3_SENT=10 val SCE_AU3_PREPROCESSOR=11 val SCE_AU3_SPECIAL=12 val SCE_AU3_EXPAND=13 val SCE_AU3_COMOBJ=14 val SCE_AU3_UDF=15 # Lexical states for SCLEX_APDL lex APDL=SCLEX_APDL SCE_APDL_ val SCE_APDL_DEFAULT=0 val SCE_APDL_COMMENT=1 val SCE_APDL_COMMENTBLOCK=2 val SCE_APDL_NUMBER=3 val SCE_APDL_STRING=4 val SCE_APDL_OPERATOR=5 val SCE_APDL_WORD=6 val SCE_APDL_PROCESSOR=7 val SCE_APDL_COMMAND=8 val SCE_APDL_SLASHCOMMAND=9 val SCE_APDL_STARCOMMAND=10 val SCE_APDL_ARGUMENT=11 val SCE_APDL_FUNCTION=12 # Lexical states for SCLEX_BASH lex Bash=SCLEX_BASH SCE_SH_ val SCE_SH_DEFAULT=0 val SCE_SH_ERROR=1 val SCE_SH_COMMENTLINE=2 val SCE_SH_NUMBER=3 val SCE_SH_WORD=4 val SCE_SH_STRING=5 val SCE_SH_CHARACTER=6 val SCE_SH_OPERATOR=7 val SCE_SH_IDENTIFIER=8 val SCE_SH_SCALAR=9 val SCE_SH_PARAM=10 val SCE_SH_BACKTICKS=11 val SCE_SH_HERE_DELIM=12 val SCE_SH_HERE_Q=13 # Lexical states for SCLEX_ASN1 lex Asn1=SCLEX_ASN1 SCE_ASN1_ val SCE_ASN1_DEFAULT=0 val SCE_ASN1_COMMENT=1 val SCE_ASN1_IDENTIFIER=2 val SCE_ASN1_STRING=3 val SCE_ASN1_OID=4 val SCE_ASN1_SCALAR=5 val SCE_ASN1_KEYWORD=6 val SCE_ASN1_ATTRIBUTE=7 val SCE_ASN1_DESCRIPTOR=8 val SCE_ASN1_TYPE=9 val SCE_ASN1_OPERATOR=10 # Lexical states for SCLEX_VHDL lex VHDL=SCLEX_VHDL SCE_VHDL_ val SCE_VHDL_DEFAULT=0 val SCE_VHDL_COMMENT=1 val SCE_VHDL_COMMENTLINEBANG=2 val SCE_VHDL_NUMBER=3 val SCE_VHDL_STRING=4 val SCE_VHDL_OPERATOR=5 val SCE_VHDL_IDENTIFIER=6 val SCE_VHDL_STRINGEOL=7 val SCE_VHDL_KEYWORD=8 val SCE_VHDL_STDOPERATOR=9 val SCE_VHDL_ATTRIBUTE=10 val SCE_VHDL_STDFUNCTION=11 val SCE_VHDL_STDPACKAGE=12 val SCE_VHDL_STDTYPE=13 val SCE_VHDL_USERWORD=14 val SCE_VHDL_BLOCK_COMMENT=15 # Lexical states for SCLEX_CAML lex Caml=SCLEX_CAML SCE_CAML_ val SCE_CAML_DEFAULT=0 val SCE_CAML_IDENTIFIER=1 val SCE_CAML_TAGNAME=2 val SCE_CAML_KEYWORD=3 val SCE_CAML_KEYWORD2=4 val SCE_CAML_KEYWORD3=5 val SCE_CAML_LINENUM=6 val SCE_CAML_OPERATOR=7 val SCE_CAML_NUMBER=8 val SCE_CAML_CHAR=9 val SCE_CAML_WHITE=10 val SCE_CAML_STRING=11 val SCE_CAML_COMMENT=12 val SCE_CAML_COMMENT1=13 val SCE_CAML_COMMENT2=14 val SCE_CAML_COMMENT3=15 # Lexical states for SCLEX_HASKELL lex Haskell=SCLEX_HASKELL SCE_HA_ val SCE_HA_DEFAULT=0 val SCE_HA_IDENTIFIER=1 val SCE_HA_KEYWORD=2 val SCE_HA_NUMBER=3 val SCE_HA_STRING=4 val SCE_HA_CHARACTER=5 val SCE_HA_CLASS=6 val SCE_HA_MODULE=7 val SCE_HA_CAPITAL=8 val SCE_HA_DATA=9 val SCE_HA_IMPORT=10 val SCE_HA_OPERATOR=11 val SCE_HA_INSTANCE=12 val SCE_HA_COMMENTLINE=13 val SCE_HA_COMMENTBLOCK=14 val SCE_HA_COMMENTBLOCK2=15 val SCE_HA_COMMENTBLOCK3=16 val SCE_HA_PRAGMA=17 val SCE_HA_PREPROCESSOR=18 val SCE_HA_STRINGEOL=19 val SCE_HA_RESERVED_OPERATOR=20 val SCE_HA_LITERATE_COMMENT=21 val SCE_HA_LITERATE_CODEDELIM=22 # Lexical states of SCLEX_TADS3 lex TADS3=SCLEX_TADS3 SCE_T3_ val SCE_T3_DEFAULT=0 val SCE_T3_X_DEFAULT=1 val SCE_T3_PREPROCESSOR=2 val SCE_T3_BLOCK_COMMENT=3 val SCE_T3_LINE_COMMENT=4 val SCE_T3_OPERATOR=5 val SCE_T3_KEYWORD=6 val SCE_T3_NUMBER=7 val SCE_T3_IDENTIFIER=8 val SCE_T3_S_STRING=9 val SCE_T3_D_STRING=10 val SCE_T3_X_STRING=11 val SCE_T3_LIB_DIRECTIVE=12 val SCE_T3_MSG_PARAM=13 val SCE_T3_HTML_TAG=14 val SCE_T3_HTML_DEFAULT=15 val SCE_T3_HTML_STRING=16 val SCE_T3_USER1=17 val SCE_T3_USER2=18 val SCE_T3_USER3=19 val SCE_T3_BRACE=20 # Lexical states for SCLEX_REBOL lex Rebol=SCLEX_REBOL SCE_REBOL_ val SCE_REBOL_DEFAULT=0 val SCE_REBOL_COMMENTLINE=1 val SCE_REBOL_COMMENTBLOCK=2 val SCE_REBOL_PREFACE=3 val SCE_REBOL_OPERATOR=4 val SCE_REBOL_CHARACTER=5 val SCE_REBOL_QUOTEDSTRING=6 val SCE_REBOL_BRACEDSTRING=7 val SCE_REBOL_NUMBER=8 val SCE_REBOL_PAIR=9 val SCE_REBOL_TUPLE=10 val SCE_REBOL_BINARY=11 val SCE_REBOL_MONEY=12 val SCE_REBOL_ISSUE=13 val SCE_REBOL_TAG=14 val SCE_REBOL_FILE=15 val SCE_REBOL_EMAIL=16 val SCE_REBOL_URL=17 val SCE_REBOL_DATE=18 val SCE_REBOL_TIME=19 val SCE_REBOL_IDENTIFIER=20 val SCE_REBOL_WORD=21 val SCE_REBOL_WORD2=22 val SCE_REBOL_WORD3=23 val SCE_REBOL_WORD4=24 val SCE_REBOL_WORD5=25 val SCE_REBOL_WORD6=26 val SCE_REBOL_WORD7=27 val SCE_REBOL_WORD8=28 # Lexical states for SCLEX_SQL lex SQL=SCLEX_SQL SCE_SQL_ val SCE_SQL_DEFAULT=0 val SCE_SQL_COMMENT=1 val SCE_SQL_COMMENTLINE=2 val SCE_SQL_COMMENTDOC=3 val SCE_SQL_NUMBER=4 val SCE_SQL_WORD=5 val SCE_SQL_STRING=6 val SCE_SQL_CHARACTER=7 val SCE_SQL_SQLPLUS=8 val SCE_SQL_SQLPLUS_PROMPT=9 val SCE_SQL_OPERATOR=10 val SCE_SQL_IDENTIFIER=11 val SCE_SQL_SQLPLUS_COMMENT=13 val SCE_SQL_COMMENTLINEDOC=15 val SCE_SQL_WORD2=16 val SCE_SQL_COMMENTDOCKEYWORD=17 val SCE_SQL_COMMENTDOCKEYWORDERROR=18 val SCE_SQL_USER1=19 val SCE_SQL_USER2=20 val SCE_SQL_USER3=21 val SCE_SQL_USER4=22 val SCE_SQL_QUOTEDIDENTIFIER=23 val SCE_SQL_QOPERATOR=24 # Lexical states for SCLEX_SMALLTALK lex Smalltalk=SCLEX_SMALLTALK SCE_ST_ val SCE_ST_DEFAULT=0 val SCE_ST_STRING=1 val SCE_ST_NUMBER=2 val SCE_ST_COMMENT=3 val SCE_ST_SYMBOL=4 val SCE_ST_BINARY=5 val SCE_ST_BOOL=6 val SCE_ST_SELF=7 val SCE_ST_SUPER=8 val SCE_ST_NIL=9 val SCE_ST_GLOBAL=10 val SCE_ST_RETURN=11 val SCE_ST_SPECIAL=12 val SCE_ST_KWSEND=13 val SCE_ST_ASSIGN=14 val SCE_ST_CHARACTER=15 val SCE_ST_SPEC_SEL=16 # Lexical states for SCLEX_FLAGSHIP (clipper) lex FlagShip=SCLEX_FLAGSHIP SCE_FS_ val SCE_FS_DEFAULT=0 val SCE_FS_COMMENT=1 val SCE_FS_COMMENTLINE=2 val SCE_FS_COMMENTDOC=3 val SCE_FS_COMMENTLINEDOC=4 val SCE_FS_COMMENTDOCKEYWORD=5 val SCE_FS_COMMENTDOCKEYWORDERROR=6 val SCE_FS_KEYWORD=7 val SCE_FS_KEYWORD2=8 val SCE_FS_KEYWORD3=9 val SCE_FS_KEYWORD4=10 val SCE_FS_NUMBER=11 val SCE_FS_STRING=12 val SCE_FS_PREPROCESSOR=13 val SCE_FS_OPERATOR=14 val SCE_FS_IDENTIFIER=15 val SCE_FS_DATE=16 val SCE_FS_STRINGEOL=17 val SCE_FS_CONSTANT=18 val SCE_FS_WORDOPERATOR=19 val SCE_FS_DISABLEDCODE=20 val SCE_FS_DEFAULT_C=21 val SCE_FS_COMMENTDOC_C=22 val SCE_FS_COMMENTLINEDOC_C=23 val SCE_FS_KEYWORD_C=24 val SCE_FS_KEYWORD2_C=25 val SCE_FS_NUMBER_C=26 val SCE_FS_STRING_C=27 val SCE_FS_PREPROCESSOR_C=28 val SCE_FS_OPERATOR_C=29 val SCE_FS_IDENTIFIER_C=30 val SCE_FS_STRINGEOL_C=31 # Lexical states for SCLEX_CSOUND lex Csound=SCLEX_CSOUND SCE_CSOUND_ val SCE_CSOUND_DEFAULT=0 val SCE_CSOUND_COMMENT=1 val SCE_CSOUND_NUMBER=2 val SCE_CSOUND_OPERATOR=3 val SCE_CSOUND_INSTR=4 val SCE_CSOUND_IDENTIFIER=5 val SCE_CSOUND_OPCODE=6 val SCE_CSOUND_HEADERSTMT=7 val SCE_CSOUND_USERKEYWORD=8 val SCE_CSOUND_COMMENTBLOCK=9 val SCE_CSOUND_PARAM=10 val SCE_CSOUND_ARATE_VAR=11 val SCE_CSOUND_KRATE_VAR=12 val SCE_CSOUND_IRATE_VAR=13 val SCE_CSOUND_GLOBAL_VAR=14 val SCE_CSOUND_STRINGEOL=15 # Lexical states for SCLEX_INNOSETUP lex Inno=SCLEX_INNOSETUP SCE_INNO_ val SCE_INNO_DEFAULT=0 val SCE_INNO_COMMENT=1 val SCE_INNO_KEYWORD=2 val SCE_INNO_PARAMETER=3 val SCE_INNO_SECTION=4 val SCE_INNO_PREPROC=5 val SCE_INNO_INLINE_EXPANSION=6 val SCE_INNO_COMMENT_PASCAL=7 val SCE_INNO_KEYWORD_PASCAL=8 val SCE_INNO_KEYWORD_USER=9 val SCE_INNO_STRING_DOUBLE=10 val SCE_INNO_STRING_SINGLE=11 val SCE_INNO_IDENTIFIER=12 # Lexical states for SCLEX_OPAL lex Opal=SCLEX_OPAL SCE_OPAL_ val SCE_OPAL_SPACE=0 val SCE_OPAL_COMMENT_BLOCK=1 val SCE_OPAL_COMMENT_LINE=2 val SCE_OPAL_INTEGER=3 val SCE_OPAL_KEYWORD=4 val SCE_OPAL_SORT=5 val SCE_OPAL_STRING=6 val SCE_OPAL_PAR=7 val SCE_OPAL_BOOL_CONST=8 val SCE_OPAL_DEFAULT=32 # Lexical states for SCLEX_SPICE lex Spice=SCLEX_SPICE SCE_SPICE_ val SCE_SPICE_DEFAULT=0 val SCE_SPICE_IDENTIFIER=1 val SCE_SPICE_KEYWORD=2 val SCE_SPICE_KEYWORD2=3 val SCE_SPICE_KEYWORD3=4 val SCE_SPICE_NUMBER=5 val SCE_SPICE_DELIMITER=6 val SCE_SPICE_VALUE=7 val SCE_SPICE_COMMENTLINE=8 # Lexical states for SCLEX_CMAKE lex CMAKE=SCLEX_CMAKE SCE_CMAKE_ val SCE_CMAKE_DEFAULT=0 val SCE_CMAKE_COMMENT=1 val SCE_CMAKE_STRINGDQ=2 val SCE_CMAKE_STRINGLQ=3 val SCE_CMAKE_STRINGRQ=4 val SCE_CMAKE_COMMANDS=5 val SCE_CMAKE_PARAMETERS=6 val SCE_CMAKE_VARIABLE=7 val SCE_CMAKE_USERDEFINED=8 val SCE_CMAKE_WHILEDEF=9 val SCE_CMAKE_FOREACHDEF=10 val SCE_CMAKE_IFDEFINEDEF=11 val SCE_CMAKE_MACRODEF=12 val SCE_CMAKE_STRINGVAR=13 val SCE_CMAKE_NUMBER=14 # Lexical states for SCLEX_GAP lex Gap=SCLEX_GAP SCE_GAP_ val SCE_GAP_DEFAULT=0 val SCE_GAP_IDENTIFIER=1 val SCE_GAP_KEYWORD=2 val SCE_GAP_KEYWORD2=3 val SCE_GAP_KEYWORD3=4 val SCE_GAP_KEYWORD4=5 val SCE_GAP_STRING=6 val SCE_GAP_CHAR=7 val SCE_GAP_OPERATOR=8 val SCE_GAP_COMMENT=9 val SCE_GAP_NUMBER=10 val SCE_GAP_STRINGEOL=11 # Lexical state for SCLEX_PLM lex PLM=SCLEX_PLM SCE_PLM_ val SCE_PLM_DEFAULT=0 val SCE_PLM_COMMENT=1 val SCE_PLM_STRING=2 val SCE_PLM_NUMBER=3 val SCE_PLM_IDENTIFIER=4 val SCE_PLM_OPERATOR=5 val SCE_PLM_CONTROL=6 val SCE_PLM_KEYWORD=7 # Lexical state for SCLEX_PROGRESS lex Progress=SCLEX_PROGRESS SCE_ABL_ val SCE_ABL_DEFAULT=0 val SCE_ABL_NUMBER=1 val SCE_ABL_WORD=2 val SCE_ABL_STRING=3 val SCE_ABL_CHARACTER=4 val SCE_ABL_PREPROCESSOR=5 val SCE_ABL_OPERATOR=6 val SCE_ABL_IDENTIFIER=7 val SCE_ABL_BLOCK=8 val SCE_ABL_END=9 val SCE_ABL_COMMENT=10 val SCE_ABL_TASKMARKER=11 val SCE_ABL_LINECOMMENT=12 # Lexical states for SCLEX_ABAQUS lex ABAQUS=SCLEX_ABAQUS SCE_ABAQUS_ val SCE_ABAQUS_DEFAULT=0 val SCE_ABAQUS_COMMENT=1 val SCE_ABAQUS_COMMENTBLOCK=2 val SCE_ABAQUS_NUMBER=3 val SCE_ABAQUS_STRING=4 val SCE_ABAQUS_OPERATOR=5 val SCE_ABAQUS_WORD=6 val SCE_ABAQUS_PROCESSOR=7 val SCE_ABAQUS_COMMAND=8 val SCE_ABAQUS_SLASHCOMMAND=9 val SCE_ABAQUS_STARCOMMAND=10 val SCE_ABAQUS_ARGUMENT=11 val SCE_ABAQUS_FUNCTION=12 # Lexical states for SCLEX_ASYMPTOTE lex Asymptote=SCLEX_ASYMPTOTE SCE_ASY_ val SCE_ASY_DEFAULT=0 val SCE_ASY_COMMENT=1 val SCE_ASY_COMMENTLINE=2 val SCE_ASY_NUMBER=3 val SCE_ASY_WORD=4 val SCE_ASY_STRING=5 val SCE_ASY_CHARACTER=6 val SCE_ASY_OPERATOR=7 val SCE_ASY_IDENTIFIER=8 val SCE_ASY_STRINGEOL=9 val SCE_ASY_COMMENTLINEDOC=10 val SCE_ASY_WORD2=11 # Lexical states for SCLEX_R lex R=SCLEX_R SCE_R_ val SCE_R_DEFAULT=0 val SCE_R_COMMENT=1 val SCE_R_KWORD=2 val SCE_R_BASEKWORD=3 val SCE_R_OTHERKWORD=4 val SCE_R_NUMBER=5 val SCE_R_STRING=6 val SCE_R_STRING2=7 val SCE_R_OPERATOR=8 val SCE_R_IDENTIFIER=9 val SCE_R_INFIX=10 val SCE_R_INFIXEOL=11 # Lexical state for SCLEX_MAGIK lex MagikSF=SCLEX_MAGIK SCE_MAGIK_ val SCE_MAGIK_DEFAULT=0 val SCE_MAGIK_COMMENT=1 val SCE_MAGIK_HYPER_COMMENT=16 val SCE_MAGIK_STRING=2 val SCE_MAGIK_CHARACTER=3 val SCE_MAGIK_NUMBER=4 val SCE_MAGIK_IDENTIFIER=5 val SCE_MAGIK_OPERATOR=6 val SCE_MAGIK_FLOW=7 val SCE_MAGIK_CONTAINER=8 val SCE_MAGIK_BRACKET_BLOCK=9 val SCE_MAGIK_BRACE_BLOCK=10 val SCE_MAGIK_SQBRACKET_BLOCK=11 val SCE_MAGIK_UNKNOWN_KEYWORD=12 val SCE_MAGIK_KEYWORD=13 val SCE_MAGIK_PRAGMA=14 val SCE_MAGIK_SYMBOL=15 # Lexical state for SCLEX_POWERSHELL lex PowerShell=SCLEX_POWERSHELL SCE_POWERSHELL_ val SCE_POWERSHELL_DEFAULT=0 val SCE_POWERSHELL_COMMENT=1 val SCE_POWERSHELL_STRING=2 val SCE_POWERSHELL_CHARACTER=3 val SCE_POWERSHELL_NUMBER=4 val SCE_POWERSHELL_VARIABLE=5 val SCE_POWERSHELL_OPERATOR=6 val SCE_POWERSHELL_IDENTIFIER=7 val SCE_POWERSHELL_KEYWORD=8 val SCE_POWERSHELL_CMDLET=9 val SCE_POWERSHELL_ALIAS=10 val SCE_POWERSHELL_FUNCTION=11 val SCE_POWERSHELL_USER1=12 val SCE_POWERSHELL_COMMENTSTREAM=13 val SCE_POWERSHELL_HERE_STRING=14 val SCE_POWERSHELL_HERE_CHARACTER=15 val SCE_POWERSHELL_COMMENTDOCKEYWORD=16 # Lexical state for SCLEX_MYSQL lex MySQL=SCLEX_MYSQL SCE_MYSQL_ val SCE_MYSQL_DEFAULT=0 val SCE_MYSQL_COMMENT=1 val SCE_MYSQL_COMMENTLINE=2 val SCE_MYSQL_VARIABLE=3 val SCE_MYSQL_SYSTEMVARIABLE=4 val SCE_MYSQL_KNOWNSYSTEMVARIABLE=5 val SCE_MYSQL_NUMBER=6 val SCE_MYSQL_MAJORKEYWORD=7 val SCE_MYSQL_KEYWORD=8 val SCE_MYSQL_DATABASEOBJECT=9 val SCE_MYSQL_PROCEDUREKEYWORD=10 val SCE_MYSQL_STRING=11 val SCE_MYSQL_SQSTRING=12 val SCE_MYSQL_DQSTRING=13 val SCE_MYSQL_OPERATOR=14 val SCE_MYSQL_FUNCTION=15 val SCE_MYSQL_IDENTIFIER=16 val SCE_MYSQL_QUOTEDIDENTIFIER=17 val SCE_MYSQL_USER1=18 val SCE_MYSQL_USER2=19 val SCE_MYSQL_USER3=20 val SCE_MYSQL_HIDDENCOMMAND=21 val SCE_MYSQL_PLACEHOLDER=22 # Lexical state for SCLEX_PO lex Po=SCLEX_PO SCE_PO_ val SCE_PO_DEFAULT=0 val SCE_PO_COMMENT=1 val SCE_PO_MSGID=2 val SCE_PO_MSGID_TEXT=3 val SCE_PO_MSGSTR=4 val SCE_PO_MSGSTR_TEXT=5 val SCE_PO_MSGCTXT=6 val SCE_PO_MSGCTXT_TEXT=7 val SCE_PO_FUZZY=8 val SCE_PO_PROGRAMMER_COMMENT=9 val SCE_PO_REFERENCE=10 val SCE_PO_FLAGS=11 val SCE_PO_MSGID_TEXT_EOL=12 val SCE_PO_MSGSTR_TEXT_EOL=13 val SCE_PO_MSGCTXT_TEXT_EOL=14 val SCE_PO_ERROR=15 # Lexical states for SCLEX_PASCAL lex Pascal=SCLEX_PASCAL SCE_PAS_ val SCE_PAS_DEFAULT=0 val SCE_PAS_IDENTIFIER=1 val SCE_PAS_COMMENT=2 val SCE_PAS_COMMENT2=3 val SCE_PAS_COMMENTLINE=4 val SCE_PAS_PREPROCESSOR=5 val SCE_PAS_PREPROCESSOR2=6 val SCE_PAS_NUMBER=7 val SCE_PAS_HEXNUMBER=8 val SCE_PAS_WORD=9 val SCE_PAS_STRING=10 val SCE_PAS_STRINGEOL=11 val SCE_PAS_CHARACTER=12 val SCE_PAS_OPERATOR=13 val SCE_PAS_ASM=14 # Lexical state for SCLEX_SORCUS lex SORCUS=SCLEX_SORCUS SCE_SORCUS_ val SCE_SORCUS_DEFAULT=0 val SCE_SORCUS_COMMAND=1 val SCE_SORCUS_PARAMETER=2 val SCE_SORCUS_COMMENTLINE=3 val SCE_SORCUS_STRING=4 val SCE_SORCUS_STRINGEOL=5 val SCE_SORCUS_IDENTIFIER=6 val SCE_SORCUS_OPERATOR=7 val SCE_SORCUS_NUMBER=8 val SCE_SORCUS_CONSTANT=9 # Lexical state for SCLEX_POWERPRO lex PowerPro=SCLEX_POWERPRO SCE_POWERPRO_ val SCE_POWERPRO_DEFAULT=0 val SCE_POWERPRO_COMMENTBLOCK=1 val SCE_POWERPRO_COMMENTLINE=2 val SCE_POWERPRO_NUMBER=3 val SCE_POWERPRO_WORD=4 val SCE_POWERPRO_WORD2=5 val SCE_POWERPRO_WORD3=6 val SCE_POWERPRO_WORD4=7 val SCE_POWERPRO_DOUBLEQUOTEDSTRING=8 val SCE_POWERPRO_SINGLEQUOTEDSTRING=9 val SCE_POWERPRO_LINECONTINUE=10 val SCE_POWERPRO_OPERATOR=11 val SCE_POWERPRO_IDENTIFIER=12 val SCE_POWERPRO_STRINGEOL=13 val SCE_POWERPRO_VERBATIM=14 val SCE_POWERPRO_ALTQUOTE=15 val SCE_POWERPRO_FUNCTION=16 # Lexical states for SCLEX_SML lex SML=SCLEX_SML SCE_SML_ val SCE_SML_DEFAULT=0 val SCE_SML_IDENTIFIER=1 val SCE_SML_TAGNAME=2 val SCE_SML_KEYWORD=3 val SCE_SML_KEYWORD2=4 val SCE_SML_KEYWORD3=5 val SCE_SML_LINENUM=6 val SCE_SML_OPERATOR=7 val SCE_SML_NUMBER=8 val SCE_SML_CHAR=9 val SCE_SML_STRING=11 val SCE_SML_COMMENT=12 val SCE_SML_COMMENT1=13 val SCE_SML_COMMENT2=14 val SCE_SML_COMMENT3=15 # Lexical state for SCLEX_MARKDOWN lex Markdown=SCLEX_MARKDOWN SCE_MARKDOWN_ val SCE_MARKDOWN_DEFAULT=0 val SCE_MARKDOWN_LINE_BEGIN=1 val SCE_MARKDOWN_STRONG1=2 val SCE_MARKDOWN_STRONG2=3 val SCE_MARKDOWN_EM1=4 val SCE_MARKDOWN_EM2=5 val SCE_MARKDOWN_HEADER1=6 val SCE_MARKDOWN_HEADER2=7 val SCE_MARKDOWN_HEADER3=8 val SCE_MARKDOWN_HEADER4=9 val SCE_MARKDOWN_HEADER5=10 val SCE_MARKDOWN_HEADER6=11 val SCE_MARKDOWN_PRECHAR=12 val SCE_MARKDOWN_ULIST_ITEM=13 val SCE_MARKDOWN_OLIST_ITEM=14 val SCE_MARKDOWN_BLOCKQUOTE=15 val SCE_MARKDOWN_STRIKEOUT=16 val SCE_MARKDOWN_HRULE=17 val SCE_MARKDOWN_LINK=18 val SCE_MARKDOWN_CODE=19 val SCE_MARKDOWN_CODE2=20 val SCE_MARKDOWN_CODEBK=21 # Lexical state for SCLEX_TXT2TAGS lex Txt2tags=SCLEX_TXT2TAGS SCE_TXT2TAGS_ val SCE_TXT2TAGS_DEFAULT=0 val SCE_TXT2TAGS_LINE_BEGIN=1 val SCE_TXT2TAGS_STRONG1=2 val SCE_TXT2TAGS_STRONG2=3 val SCE_TXT2TAGS_EM1=4 val SCE_TXT2TAGS_EM2=5 val SCE_TXT2TAGS_HEADER1=6 val SCE_TXT2TAGS_HEADER2=7 val SCE_TXT2TAGS_HEADER3=8 val SCE_TXT2TAGS_HEADER4=9 val SCE_TXT2TAGS_HEADER5=10 val SCE_TXT2TAGS_HEADER6=11 val SCE_TXT2TAGS_PRECHAR=12 val SCE_TXT2TAGS_ULIST_ITEM=13 val SCE_TXT2TAGS_OLIST_ITEM=14 val SCE_TXT2TAGS_BLOCKQUOTE=15 val SCE_TXT2TAGS_STRIKEOUT=16 val SCE_TXT2TAGS_HRULE=17 val SCE_TXT2TAGS_LINK=18 val SCE_TXT2TAGS_CODE=19 val SCE_TXT2TAGS_CODE2=20 val SCE_TXT2TAGS_CODEBK=21 val SCE_TXT2TAGS_COMMENT=22 val SCE_TXT2TAGS_OPTION=23 val SCE_TXT2TAGS_PREPROC=24 val SCE_TXT2TAGS_POSTPROC=25 # Lexical states for SCLEX_A68K lex A68k=SCLEX_A68K SCE_A68K_ val SCE_A68K_DEFAULT=0 val SCE_A68K_COMMENT=1 val SCE_A68K_NUMBER_DEC=2 val SCE_A68K_NUMBER_BIN=3 val SCE_A68K_NUMBER_HEX=4 val SCE_A68K_STRING1=5 val SCE_A68K_OPERATOR=6 val SCE_A68K_CPUINSTRUCTION=7 val SCE_A68K_EXTINSTRUCTION=8 val SCE_A68K_REGISTER=9 val SCE_A68K_DIRECTIVE=10 val SCE_A68K_MACRO_ARG=11 val SCE_A68K_LABEL=12 val SCE_A68K_STRING2=13 val SCE_A68K_IDENTIFIER=14 val SCE_A68K_MACRO_DECLARATION=15 val SCE_A68K_COMMENT_WORD=16 val SCE_A68K_COMMENT_SPECIAL=17 val SCE_A68K_COMMENT_DOXYGEN=18 # Lexical states for SCLEX_MODULA lex Modula=SCLEX_MODULA SCE_MODULA_ val SCE_MODULA_DEFAULT=0 val SCE_MODULA_COMMENT=1 val SCE_MODULA_DOXYCOMM=2 val SCE_MODULA_DOXYKEY=3 val SCE_MODULA_KEYWORD=4 val SCE_MODULA_RESERVED=5 val SCE_MODULA_NUMBER=6 val SCE_MODULA_BASENUM=7 val SCE_MODULA_FLOAT=8 val SCE_MODULA_STRING=9 val SCE_MODULA_STRSPEC=10 val SCE_MODULA_CHAR=11 val SCE_MODULA_CHARSPEC=12 val SCE_MODULA_PROC=13 val SCE_MODULA_PRAGMA=14 val SCE_MODULA_PRGKEY=15 val SCE_MODULA_OPERATOR=16 val SCE_MODULA_BADSTR=17 # Lexical states for SCLEX_COFFEESCRIPT lex CoffeeScript=SCLEX_COFFEESCRIPT SCE_COFFEESCRIPT_ val SCE_COFFEESCRIPT_DEFAULT=0 val SCE_COFFEESCRIPT_COMMENT=1 val SCE_COFFEESCRIPT_COMMENTLINE=2 val SCE_COFFEESCRIPT_COMMENTDOC=3 val SCE_COFFEESCRIPT_NUMBER=4 val SCE_COFFEESCRIPT_WORD=5 val SCE_COFFEESCRIPT_STRING=6 val SCE_COFFEESCRIPT_CHARACTER=7 val SCE_COFFEESCRIPT_UUID=8 val SCE_COFFEESCRIPT_PREPROCESSOR=9 val SCE_COFFEESCRIPT_OPERATOR=10 val SCE_COFFEESCRIPT_IDENTIFIER=11 val SCE_COFFEESCRIPT_STRINGEOL=12 val SCE_COFFEESCRIPT_VERBATIM=13 val SCE_COFFEESCRIPT_REGEX=14 val SCE_COFFEESCRIPT_COMMENTLINEDOC=15 val SCE_COFFEESCRIPT_WORD2=16 val SCE_COFFEESCRIPT_COMMENTDOCKEYWORD=17 val SCE_COFFEESCRIPT_COMMENTDOCKEYWORDERROR=18 val SCE_COFFEESCRIPT_GLOBALCLASS=19 val SCE_COFFEESCRIPT_STRINGRAW=20 val SCE_COFFEESCRIPT_TRIPLEVERBATIM=21 val SCE_COFFEESCRIPT_COMMENTBLOCK=22 val SCE_COFFEESCRIPT_VERBOSE_REGEX=23 val SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT=24 val SCE_COFFEESCRIPT_INSTANCEPROPERTY=25 # Lexical states for SCLEX_AVS lex AVS=SCLEX_AVS SCE_AVS_ val SCE_AVS_DEFAULT=0 val SCE_AVS_COMMENTBLOCK=1 val SCE_AVS_COMMENTBLOCKN=2 val SCE_AVS_COMMENTLINE=3 val SCE_AVS_NUMBER=4 val SCE_AVS_OPERATOR=5 val SCE_AVS_IDENTIFIER=6 val SCE_AVS_STRING=7 val SCE_AVS_TRIPLESTRING=8 val SCE_AVS_KEYWORD=9 val SCE_AVS_FILTER=10 val SCE_AVS_PLUGIN=11 val SCE_AVS_FUNCTION=12 val SCE_AVS_CLIPPROP=13 val SCE_AVS_USERDFN=14 # Lexical states for SCLEX_ECL lex ECL=SCLEX_ECL SCE_ECL_ val SCE_ECL_DEFAULT=0 val SCE_ECL_COMMENT=1 val SCE_ECL_COMMENTLINE=2 val SCE_ECL_NUMBER=3 val SCE_ECL_STRING=4 val SCE_ECL_WORD0=5 val SCE_ECL_OPERATOR=6 val SCE_ECL_CHARACTER=7 val SCE_ECL_UUID=8 val SCE_ECL_PREPROCESSOR=9 val SCE_ECL_UNKNOWN=10 val SCE_ECL_IDENTIFIER=11 val SCE_ECL_STRINGEOL=12 val SCE_ECL_VERBATIM=13 val SCE_ECL_REGEX=14 val SCE_ECL_COMMENTLINEDOC=15 val SCE_ECL_WORD1=16 val SCE_ECL_COMMENTDOCKEYWORD=17 val SCE_ECL_COMMENTDOCKEYWORDERROR=18 val SCE_ECL_WORD2=19 val SCE_ECL_WORD3=20 val SCE_ECL_WORD4=21 val SCE_ECL_WORD5=22 val SCE_ECL_COMMENTDOC=23 val SCE_ECL_ADDED=24 val SCE_ECL_DELETED=25 val SCE_ECL_CHANGED=26 val SCE_ECL_MOVED=27 # Lexical states for SCLEX_OSCRIPT lex OScript=SCLEX_OSCRIPT SCE_OSCRIPT_ val SCE_OSCRIPT_DEFAULT=0 val SCE_OSCRIPT_LINE_COMMENT=1 val SCE_OSCRIPT_BLOCK_COMMENT=2 val SCE_OSCRIPT_DOC_COMMENT=3 val SCE_OSCRIPT_PREPROCESSOR=4 val SCE_OSCRIPT_NUMBER=5 val SCE_OSCRIPT_SINGLEQUOTE_STRING=6 val SCE_OSCRIPT_DOUBLEQUOTE_STRING=7 val SCE_OSCRIPT_CONSTANT=8 val SCE_OSCRIPT_IDENTIFIER=9 val SCE_OSCRIPT_GLOBAL=10 val SCE_OSCRIPT_KEYWORD=11 val SCE_OSCRIPT_OPERATOR=12 val SCE_OSCRIPT_LABEL=13 val SCE_OSCRIPT_TYPE=14 val SCE_OSCRIPT_FUNCTION=15 val SCE_OSCRIPT_OBJECT=16 val SCE_OSCRIPT_PROPERTY=17 val SCE_OSCRIPT_METHOD=18 # Lexical states for SCLEX_VISUALPROLOG lex VisualProlog=SCLEX_VISUALPROLOG SCE_VISUALPROLOG_ val SCE_VISUALPROLOG_DEFAULT=0 val SCE_VISUALPROLOG_KEY_MAJOR=1 val SCE_VISUALPROLOG_KEY_MINOR=2 val SCE_VISUALPROLOG_KEY_DIRECTIVE=3 val SCE_VISUALPROLOG_COMMENT_BLOCK=4 val SCE_VISUALPROLOG_COMMENT_LINE=5 val SCE_VISUALPROLOG_COMMENT_KEY=6 val SCE_VISUALPROLOG_COMMENT_KEY_ERROR=7 val SCE_VISUALPROLOG_IDENTIFIER=8 val SCE_VISUALPROLOG_VARIABLE=9 val SCE_VISUALPROLOG_ANONYMOUS=10 val SCE_VISUALPROLOG_NUMBER=11 val SCE_VISUALPROLOG_OPERATOR=12 val SCE_VISUALPROLOG_CHARACTER=13 val SCE_VISUALPROLOG_CHARACTER_TOO_MANY=14 val SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR=15 val SCE_VISUALPROLOG_STRING=16 val SCE_VISUALPROLOG_STRING_ESCAPE=17 val SCE_VISUALPROLOG_STRING_ESCAPE_ERROR=18 val SCE_VISUALPROLOG_STRING_EOL_OPEN=19 val SCE_VISUALPROLOG_STRING_VERBATIM=20 val SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL=21 val SCE_VISUALPROLOG_STRING_VERBATIM_EOL=22 # Lexical states for SCLEX_STTXT lex StructuredText=SCLEX_STTXT SCE_STTXT_ val SCE_STTXT_DEFAULT=0 val SCE_STTXT_COMMENT=1 val SCE_STTXT_COMMENTLINE=2 val SCE_STTXT_KEYWORD=3 val SCE_STTXT_TYPE=4 val SCE_STTXT_FUNCTION=5 val SCE_STTXT_FB=6 val SCE_STTXT_NUMBER=7 val SCE_STTXT_HEXNUMBER=8 val SCE_STTXT_PRAGMA=9 val SCE_STTXT_OPERATOR=10 val SCE_STTXT_CHARACTER=11 val SCE_STTXT_STRING1=12 val SCE_STTXT_STRING2=13 val SCE_STTXT_STRINGEOL=14 val SCE_STTXT_IDENTIFIER=15 val SCE_STTXT_DATETIME=16 val SCE_STTXT_VARS=17 val SCE_STTXT_PRAGMAS=18 # Lexical states for SCLEX_KVIRC lex KVIrc=SCLEX_KVIRC SCE_KVIRC_ val SCE_KVIRC_DEFAULT=0 val SCE_KVIRC_COMMENT=1 val SCE_KVIRC_COMMENTBLOCK=2 val SCE_KVIRC_STRING=3 val SCE_KVIRC_WORD=4 val SCE_KVIRC_KEYWORD=5 val SCE_KVIRC_FUNCTION_KEYWORD=6 val SCE_KVIRC_FUNCTION=7 val SCE_KVIRC_VARIABLE=8 val SCE_KVIRC_NUMBER=9 val SCE_KVIRC_OPERATOR=10 val SCE_KVIRC_STRING_FUNCTION=11 val SCE_KVIRC_STRING_VARIABLE=12 # Lexical states for SCLEX_RUST lex Rust=SCLEX_RUST SCE_RUST_ val SCE_RUST_DEFAULT=0 val SCE_RUST_COMMENTBLOCK=1 val SCE_RUST_COMMENTLINE=2 val SCE_RUST_COMMENTBLOCKDOC=3 val SCE_RUST_COMMENTLINEDOC=4 val SCE_RUST_NUMBER=5 val SCE_RUST_WORD=6 val SCE_RUST_WORD2=7 val SCE_RUST_WORD3=8 val SCE_RUST_WORD4=9 val SCE_RUST_WORD5=10 val SCE_RUST_WORD6=11 val SCE_RUST_WORD7=12 val SCE_RUST_STRING=13 val SCE_RUST_STRINGR=14 val SCE_RUST_CHARACTER=15 val SCE_RUST_OPERATOR=16 val SCE_RUST_IDENTIFIER=17 val SCE_RUST_LIFETIME=18 val SCE_RUST_MACRO=19 val SCE_RUST_LEXERROR=20 val SCE_RUST_BYTESTRING=21 val SCE_RUST_BYTESTRINGR=22 val SCE_RUST_BYTECHARACTER=23 # Lexical states for SCLEX_DMAP lex DMAP=SCLEX_DMAP SCE_DMAP_ val SCE_DMAP_DEFAULT=0 val SCE_DMAP_COMMENT=1 val SCE_DMAP_NUMBER=2 val SCE_DMAP_STRING1=3 val SCE_DMAP_STRING2=4 val SCE_DMAP_STRINGEOL=5 val SCE_DMAP_OPERATOR=6 val SCE_DMAP_IDENTIFIER=7 val SCE_DMAP_WORD=8 val SCE_DMAP_WORD2=9 val SCE_DMAP_WORD3=10 # Lexical states for SCLEX_DMIS lex DMIS=SCLEX_DMIS SCE_DMIS_ val SCE_DMIS_DEFAULT=0 val SCE_DMIS_COMMENT=1 val SCE_DMIS_STRING=2 val SCE_DMIS_NUMBER=3 val SCE_DMIS_KEYWORD=4 val SCE_DMIS_MAJORWORD=5 val SCE_DMIS_MINORWORD=6 val SCE_DMIS_UNSUPPORTED_MAJOR=7 val SCE_DMIS_UNSUPPORTED_MINOR=8 val SCE_DMIS_LABEL=9 # Lexical states for SCLEX_REGISTRY lex REG=SCLEX_REGISTRY SCE_REG_ val SCE_REG_DEFAULT=0 val SCE_REG_COMMENT=1 val SCE_REG_VALUENAME=2 val SCE_REG_STRING=3 val SCE_REG_HEXDIGIT=4 val SCE_REG_VALUETYPE=5 val SCE_REG_ADDEDKEY=6 val SCE_REG_DELETEDKEY=7 val SCE_REG_ESCAPED=8 val SCE_REG_KEYPATH_GUID=9 val SCE_REG_STRING_GUID=10 val SCE_REG_PARAMETER=11 val SCE_REG_OPERATOR=12 # Lexical state for SCLEX_BIBTEX lex BibTeX=SCLEX_BIBTEX SCE_BIBTEX_ val SCE_BIBTEX_DEFAULT=0 val SCE_BIBTEX_ENTRY=1 val SCE_BIBTEX_UNKNOWN_ENTRY=2 val SCE_BIBTEX_KEY=3 val SCE_BIBTEX_PARAMETER=4 val SCE_BIBTEX_VALUE=5 val SCE_BIBTEX_COMMENT=6 # Lexical state for SCLEX_SREC lex Srec=SCLEX_SREC SCE_HEX_ val SCE_HEX_DEFAULT=0 val SCE_HEX_RECSTART=1 val SCE_HEX_RECTYPE=2 val SCE_HEX_RECTYPE_UNKNOWN=3 val SCE_HEX_BYTECOUNT=4 val SCE_HEX_BYTECOUNT_WRONG=5 val SCE_HEX_NOADDRESS=6 val SCE_HEX_DATAADDRESS=7 val SCE_HEX_RECCOUNT=8 val SCE_HEX_STARTADDRESS=9 val SCE_HEX_ADDRESSFIELD_UNKNOWN=10 val SCE_HEX_EXTENDEDADDRESS=11 val SCE_HEX_DATA_ODD=12 val SCE_HEX_DATA_EVEN=13 val SCE_HEX_DATA_UNKNOWN=14 val SCE_HEX_DATA_EMPTY=15 val SCE_HEX_CHECKSUM=16 val SCE_HEX_CHECKSUM_WRONG=17 val SCE_HEX_GARBAGE=18 # Lexical state for SCLEX_IHEX (shared with Srec) lex IHex=SCLEX_IHEX SCE_HEX_ # Lexical state for SCLEX_TEHEX (shared with Srec) lex TEHex=SCLEX_TEHEX SCE_HEX_ # Lexical states for SCLEX_JSON lex JSON=SCLEX_JSON SCE_JSON_ val SCE_JSON_DEFAULT=0 val SCE_JSON_NUMBER=1 val SCE_JSON_STRING=2 val SCE_JSON_STRINGEOL=3 val SCE_JSON_PROPERTYNAME=4 val SCE_JSON_ESCAPESEQUENCE=5 val SCE_JSON_LINECOMMENT=6 val SCE_JSON_BLOCKCOMMENT=7 val SCE_JSON_OPERATOR=8 val SCE_JSON_URI=9 val SCE_JSON_COMPACTIRI=10 val SCE_JSON_KEYWORD=11 val SCE_JSON_LDKEYWORD=12 val SCE_JSON_ERROR=13 lex EDIFACT=SCLEX_EDIFACT SCE_EDI_ val SCE_EDI_DEFAULT=0 val SCE_EDI_SEGMENTSTART=1 val SCE_EDI_SEGMENTEND=2 val SCE_EDI_SEP_ELEMENT=3 val SCE_EDI_SEP_COMPOSITE=4 val SCE_EDI_SEP_RELEASE=5 val SCE_EDI_UNA=6 val SCE_EDI_UNH=7 val SCE_EDI_BADSEGMENT=8 # Events evt void StyleNeeded=2000(int position) evt void CharAdded=2001(int ch) evt void SavePointReached=2002(void) evt void SavePointLeft=2003(void) evt void ModifyAttemptRO=2004(void) # GTK+ Specific to work around focus and accelerator problems: evt void Key=2005(int ch, int modifiers) evt void DoubleClick=2006(int modifiers, int position, int line) evt void UpdateUI=2007(int updated) evt void Modified=2008(int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev, int token, int annotationLinesAdded) evt void MacroRecord=2009(int message, int wParam, int lParam) evt void MarginClick=2010(int modifiers, int position, int margin) evt void NeedShown=2011(int position, int length) evt void Painted=2013(void) evt void UserListSelection=2014(int listType, string text, int positionint, int ch, CompletionMethods listCompletionMethod) evt void URIDropped=2015(string text) evt void DwellStart=2016(int position, int x, int y) evt void DwellEnd=2017(int position, int x, int y) evt void Zoom=2018(void) evt void HotSpotClick=2019(int modifiers, int position) evt void HotSpotDoubleClick=2020(int modifiers, int position) evt void CallTipClick=2021(int position) evt void AutoCSelection=2022(string text, int position, int ch, CompletionMethods listCompletionMethod) evt void IndicatorClick=2023(int modifiers, int position) evt void IndicatorRelease=2024(int modifiers, int position) evt void AutoCCancelled=2025(void) evt void AutoCCharDeleted=2026(void) evt void HotSpotReleaseClick=2027(int modifiers, int position) evt void FocusIn=2028(void) evt void FocusOut=2029(void) evt void AutoCCompleted=2030(string text, int position, int ch, CompletionMethods listCompletionMethod) evt void MarginRightClick=2031(int modifiers, int position, int margin) # There are no provisional APIs currently, but some arguments to SCI_SETTECHNOLOGY are provisional. cat Provisional cat Deprecated # Deprecated in 3.5.5 # Always interpret keyboard input as Unicode set void SetKeysUnicode=2521(bool keysUnicode,) # Are keys always interpreted as Unicode? get bool GetKeysUnicode=2522(,) sqlitebrowser-3.11.2/libs/qscintilla/include/ScintillaWidget.h000066400000000000000000000051261345112435200244650ustar00rootroot00000000000000/* Scintilla source code edit control */ /* @file ScintillaWidget.h * Definition of Scintilla widget for GTK+. * Only needed by GTK+ code but is harmless on other platforms. * This comment is not a doc-comment as that causes warnings from g-ir-scanner. */ /* Copyright 1998-2001 by Neil Hodgson * The License.txt file describes the conditions under which this software may be distributed. */ #ifndef SCINTILLAWIDGET_H #define SCINTILLAWIDGET_H #if defined(GTK) #ifdef __cplusplus extern "C" { #endif #define SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, scintilla_get_type (), ScintillaObject) #define SCINTILLA_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) #define IS_SCINTILLA(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, scintilla_get_type ()) #define SCINTILLA_TYPE_OBJECT (scintilla_object_get_type()) #define SCINTILLA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SCINTILLA_TYPE_OBJECT, ScintillaObject)) #define SCINTILLA_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCINTILLA_TYPE_OBJECT)) #define SCINTILLA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass)) #define SCINTILLA_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SCINTILLA_TYPE_OBJECT)) #define SCINTILLA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SCINTILLA_TYPE_OBJECT, ScintillaObjectClass)) typedef struct _ScintillaObject ScintillaObject; typedef struct _ScintillaClass ScintillaObjectClass; struct _ScintillaObject { GtkContainer cont; void *pscin; }; struct _ScintillaClass { GtkContainerClass parent_class; void (* command) (ScintillaObject *sci, int cmd, GtkWidget *window); void (* notify) (ScintillaObject *sci, int id, SCNotification *scn); }; GType scintilla_object_get_type (void); GtkWidget* scintilla_object_new (void); gintptr scintilla_object_send_message (ScintillaObject *sci, unsigned int iMessage, guintptr wParam, gintptr lParam); GType scnotification_get_type (void); #define SCINTILLA_TYPE_NOTIFICATION (scnotification_get_type()) #ifndef G_IR_SCANNING /* The legacy names confuse the g-ir-scanner program */ typedef struct _ScintillaClass ScintillaClass; GType scintilla_get_type (void); GtkWidget* scintilla_new (void); void scintilla_set_id (ScintillaObject *sci, uptr_t id); sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); void scintilla_release_resources(void); #endif #define SCINTILLA_NOTIFY "sci-notify" #ifdef __cplusplus } #endif #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexers/000077500000000000000000000000001345112435200211015ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qscintilla/lexers/LexHTML.cpp000066400000000000000000002112061345112435200230240ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexHTML.cxx ** Lexer for HTML. **/ // Copyright 1998-2005 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "StringCopy.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" #include "StyleContext.h" #include "CharacterSet.h" #include "LexerModule.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif #define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START) #define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START) #define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START) enum script_type { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML, eScriptSGML, eScriptSGMLblock, eScriptComment }; enum script_mode { eHtml = 0, eNonHtmlScript, eNonHtmlPreProc, eNonHtmlScriptPreProc }; static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); } static inline bool IsAWordStart(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '_'); } inline bool IsOperator(int ch) { if (IsASCII(ch) && isalnum(ch)) return false; // '.' left out as it is used to make up numbers if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '(' || ch == ')' || ch == '-' || ch == '+' || ch == '=' || ch == '|' || ch == '{' || ch == '}' || ch == '[' || ch == ']' || ch == ':' || ch == ';' || ch == '<' || ch == '>' || ch == ',' || ch == '/' || ch == '?' || ch == '!' || ch == '.' || ch == '~') return true; return false; } static void GetTextSegment(Accessor &styler, Sci_PositionU start, Sci_PositionU end, char *s, size_t len) { Sci_PositionU i = 0; for (; (i < end - start + 1) && (i < len-1); i++) { s[i] = static_cast(MakeLowerCase(styler[start + i])); } s[i] = '\0'; } static const char *GetNextWord(Accessor &styler, Sci_PositionU start, char *s, size_t sLen) { Sci_PositionU i = 0; for (; i < sLen-1; i++) { char ch = static_cast(styler.SafeGetCharAt(start + i)); if ((i == 0) && !IsAWordStart(ch)) break; if ((i > 0) && !IsAWordChar(ch)) break; s[i] = ch; } s[i] = '\0'; return s; } static script_type segIsScriptingIndicator(Accessor &styler, Sci_PositionU start, Sci_PositionU end, script_type prevValue) { char s[100]; GetTextSegment(styler, start, end, s, sizeof(s)); //Platform::DebugPrintf("Scripting indicator [%s]\n", s); if (strstr(s, "src")) // External script return eScriptNone; if (strstr(s, "vbs")) return eScriptVBS; if (strstr(s, "pyth")) return eScriptPython; if (strstr(s, "javas")) return eScriptJS; if (strstr(s, "jscr")) return eScriptJS; if (strstr(s, "php")) return eScriptPHP; if (strstr(s, "xml")) { const char *xml = strstr(s, "xml"); for (const char *t=s; t= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { return eScriptPython; } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { return eScriptVBS; } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { return eScriptJS; } else if ((state >= SCE_HPHP_DEFAULT) && (state <= SCE_HPHP_COMMENTLINE)) { return eScriptPHP; } else if ((state >= SCE_H_SGML_DEFAULT) && (state < SCE_H_SGML_BLOCK_DEFAULT)) { return eScriptSGML; } else if (state == SCE_H_SGML_BLOCK_DEFAULT) { return eScriptSGMLblock; } else { return eScriptNone; } } static int statePrintForState(int state, script_mode inScriptType) { int StateToPrint = state; if (state >= SCE_HJ_START) { if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_PYTHON); } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_VBS); } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_JS); } } return StateToPrint; } static int stateForPrintState(int StateToPrint) { int state; if ((StateToPrint >= SCE_HPA_START) && (StateToPrint <= SCE_HPA_IDENTIFIER)) { state = StateToPrint - SCE_HA_PYTHON; } else if ((StateToPrint >= SCE_HBA_START) && (StateToPrint <= SCE_HBA_STRINGEOL)) { state = StateToPrint - SCE_HA_VBS; } else if ((StateToPrint >= SCE_HJA_START) && (StateToPrint <= SCE_HJA_REGEX)) { state = StateToPrint - SCE_HA_JS; } else { state = StateToPrint; } return state; } static inline bool IsNumber(Sci_PositionU start, Accessor &styler) { return IsADigit(styler[start]) || (styler[start] == '.') || (styler[start] == '-') || (styler[start] == '#'); } static inline bool isStringState(int state) { bool bResult; switch (state) { case SCE_HJ_DOUBLESTRING: case SCE_HJ_SINGLESTRING: case SCE_HJA_DOUBLESTRING: case SCE_HJA_SINGLESTRING: case SCE_HB_STRING: case SCE_HBA_STRING: case SCE_HP_STRING: case SCE_HP_CHARACTER: case SCE_HP_TRIPLE: case SCE_HP_TRIPLEDOUBLE: case SCE_HPA_STRING: case SCE_HPA_CHARACTER: case SCE_HPA_TRIPLE: case SCE_HPA_TRIPLEDOUBLE: case SCE_HPHP_HSTRING: case SCE_HPHP_SIMPLESTRING: case SCE_HPHP_HSTRING_VARIABLE: case SCE_HPHP_COMPLEX_VARIABLE: bResult = true; break; default : bResult = false; break; } return bResult; } static inline bool stateAllowsTermination(int state) { bool allowTermination = !isStringState(state); if (allowTermination) { switch (state) { case SCE_HB_COMMENTLINE: case SCE_HPHP_COMMENT: case SCE_HP_COMMENTLINE: case SCE_HPA_COMMENTLINE: allowTermination = false; } } return allowTermination; } // not really well done, since it's only comments that should lex the %> and <% static inline bool isCommentASPState(int state) { bool bResult; switch (state) { case SCE_HJ_COMMENT: case SCE_HJ_COMMENTLINE: case SCE_HJ_COMMENTDOC: case SCE_HB_COMMENTLINE: case SCE_HP_COMMENTLINE: case SCE_HPHP_COMMENT: case SCE_HPHP_COMMENTLINE: bResult = true; break; default : bResult = false; break; } return bResult; } static void classifyAttribHTML(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler) { bool wordIsNumber = IsNumber(start, styler); char chAttr = SCE_H_ATTRIBUTEUNKNOWN; if (wordIsNumber) { chAttr = SCE_H_NUMBER; } else { char s[100]; GetTextSegment(styler, start, end, s, sizeof(s)); if (keywords.InList(s)) chAttr = SCE_H_ATTRIBUTE; } if ((chAttr == SCE_H_ATTRIBUTEUNKNOWN) && !keywords) // No keywords -> all are known chAttr = SCE_H_ATTRIBUTE; styler.ColourTo(end, chAttr); } static int classifyTagHTML(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler, bool &tagDontFold, bool caseSensitive, bool isXml, bool allowScripts) { char withSpace[30 + 2] = " "; const char *s = withSpace + 1; // Copy after the '<' Sci_PositionU i = 1; for (Sci_PositionU cPos = start; cPos <= end && i < 30; cPos++) { char ch = styler[cPos]; if ((ch != '<') && (ch != '/')) { withSpace[i++] = caseSensitive ? ch : static_cast(MakeLowerCase(ch)); } } //The following is only a quick hack, to see if this whole thing would work //we first need the tagname with a trailing space... withSpace[i] = ' '; withSpace[i+1] = '\0'; // if the current language is XML, I can fold any tag // if the current language is HTML, I don't want to fold certain tags (input, meta, etc.) //...to find it in the list of no-container-tags tagDontFold = (!isXml) && (NULL != strstr(" area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr ", withSpace)); //now we can remove the trailing space withSpace[i] = '\0'; // No keywords -> all are known char chAttr = SCE_H_TAGUNKNOWN; if (s[0] == '!') { chAttr = SCE_H_SGML_DEFAULT; } else if (!keywords || keywords.InList(s)) { chAttr = SCE_H_TAG; } styler.ColourTo(end, chAttr); if (chAttr == SCE_H_TAG) { if (allowScripts && 0 == strcmp(s, "script")) { // check to see if this is a self-closing tag by sniffing ahead bool isSelfClose = false; for (Sci_PositionU cPos = end; cPos <= end + 200; cPos++) { char ch = styler.SafeGetCharAt(cPos, '\0'); if (ch == '\0' || ch == '>') break; else if (ch == '/' && styler.SafeGetCharAt(cPos + 1, '\0') == '>') { isSelfClose = true; break; } } // do not enter a script state if the tag self-closed if (!isSelfClose) chAttr = SCE_H_SCRIPT; } else if (!isXml && 0 == strcmp(s, "comment")) { chAttr = SCE_H_COMMENT; } } return chAttr; } static void classifyWordHTJS(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler, script_mode inScriptType) { char s[30 + 1]; Sci_PositionU i = 0; for (; i < end - start + 1 && i < 30; i++) { s[i] = styler[start + i]; } s[i] = '\0'; char chAttr = SCE_HJ_WORD; bool wordIsNumber = IsADigit(s[0]) || ((s[0] == '.') && IsADigit(s[1])); if (wordIsNumber) { chAttr = SCE_HJ_NUMBER; } else if (keywords.InList(s)) { chAttr = SCE_HJ_KEYWORD; } styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); } static int classifyWordHTVB(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler, script_mode inScriptType) { char chAttr = SCE_HB_IDENTIFIER; bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.'); if (wordIsNumber) { chAttr = SCE_HB_NUMBER; } else { char s[100]; GetTextSegment(styler, start, end, s, sizeof(s)); if (keywords.InList(s)) { chAttr = SCE_HB_WORD; if (strcmp(s, "rem") == 0) chAttr = SCE_HB_COMMENTLINE; } } styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); if (chAttr == SCE_HB_COMMENTLINE) return SCE_HB_COMMENTLINE; else return SCE_HB_DEFAULT; } static void classifyWordHTPy(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler, char *prevWord, script_mode inScriptType, bool isMako) { bool wordIsNumber = IsADigit(styler[start]); char s[30 + 1]; Sci_PositionU i = 0; for (; i < end - start + 1 && i < 30; i++) { s[i] = styler[start + i]; } s[i] = '\0'; char chAttr = SCE_HP_IDENTIFIER; if (0 == strcmp(prevWord, "class")) chAttr = SCE_HP_CLASSNAME; else if (0 == strcmp(prevWord, "def")) chAttr = SCE_HP_DEFNAME; else if (wordIsNumber) chAttr = SCE_HP_NUMBER; else if (keywords.InList(s)) chAttr = SCE_HP_WORD; else if (isMako && 0 == strcmp(s, "block")) chAttr = SCE_HP_WORD; styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); strcpy(prevWord, s); } // Update the word colour to default or keyword // Called when in a PHP word static void classifyWordHTPHP(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler) { char chAttr = SCE_HPHP_DEFAULT; bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.' && start+1 <= end && IsADigit(styler[start+1])); if (wordIsNumber) { chAttr = SCE_HPHP_NUMBER; } else { char s[100]; GetTextSegment(styler, start, end, s, sizeof(s)); if (keywords.InList(s)) chAttr = SCE_HPHP_WORD; } styler.ColourTo(end, chAttr); } static bool isWordHSGML(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler) { char s[30 + 1]; Sci_PositionU i = 0; for (; i < end - start + 1 && i < 30; i++) { s[i] = styler[start + i]; } s[i] = '\0'; return keywords.InList(s); } static bool isWordCdata(Sci_PositionU start, Sci_PositionU end, Accessor &styler) { char s[30 + 1]; Sci_PositionU i = 0; for (; i < end - start + 1 && i < 30; i++) { s[i] = styler[start + i]; } s[i] = '\0'; return (0 == strcmp(s, "[CDATA[")); } // Return the first state to reach when entering a scripting language static int StateForScript(script_type scriptLanguage) { int Result; switch (scriptLanguage) { case eScriptVBS: Result = SCE_HB_START; break; case eScriptPython: Result = SCE_HP_START; break; case eScriptPHP: Result = SCE_HPHP_DEFAULT; break; case eScriptXML: Result = SCE_H_TAGUNKNOWN; break; case eScriptSGML: Result = SCE_H_SGML_DEFAULT; break; case eScriptComment: Result = SCE_H_COMMENT; break; default : Result = SCE_HJ_START; break; } return Result; } static inline bool issgmlwordchar(int ch) { return !IsASCII(ch) || (isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '['); } static inline bool IsPhpWordStart(int ch) { return (IsASCII(ch) && (isalpha(ch) || (ch == '_'))) || (ch >= 0x7f); } static inline bool IsPhpWordChar(int ch) { return IsADigit(ch) || IsPhpWordStart(ch); } static bool InTagState(int state) { return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN || state == SCE_H_SCRIPT || state == SCE_H_ATTRIBUTE || state == SCE_H_ATTRIBUTEUNKNOWN || state == SCE_H_NUMBER || state == SCE_H_OTHER || state == SCE_H_DOUBLESTRING || state == SCE_H_SINGLESTRING; } static bool IsCommentState(const int state) { return state == SCE_H_COMMENT || state == SCE_H_SGML_COMMENT; } static bool IsScriptCommentState(const int state) { return state == SCE_HJ_COMMENT || state == SCE_HJ_COMMENTLINE || state == SCE_HJA_COMMENT || state == SCE_HJA_COMMENTLINE || state == SCE_HB_COMMENTLINE || state == SCE_HBA_COMMENTLINE; } static bool isLineEnd(int ch) { return ch == '\r' || ch == '\n'; } static bool isMakoBlockEnd(const int ch, const int chNext, const char *blockType) { if (strlen(blockType) == 0) { return ((ch == '%') && (chNext == '>')); } else if ((0 == strcmp(blockType, "inherit")) || (0 == strcmp(blockType, "namespace")) || (0 == strcmp(blockType, "include")) || (0 == strcmp(blockType, "page"))) { return ((ch == '/') && (chNext == '>')); } else if (0 == strcmp(blockType, "%")) { if (ch == '/' && isLineEnd(chNext)) return 1; else return isLineEnd(ch); } else if (0 == strcmp(blockType, "{")) { return ch == '}'; } else { return (ch == '>'); } } static bool isDjangoBlockEnd(const int ch, const int chNext, const char *blockType) { if (strlen(blockType) == 0) { return 0; } else if (0 == strcmp(blockType, "%")) { return ((ch == '%') && (chNext == '}')); } else if (0 == strcmp(blockType, "{")) { return ((ch == '}') && (chNext == '}')); } else { return 0; } } static bool isPHPStringState(int state) { return (state == SCE_HPHP_HSTRING) || (state == SCE_HPHP_SIMPLESTRING) || (state == SCE_HPHP_HSTRING_VARIABLE) || (state == SCE_HPHP_COMPLEX_VARIABLE); } static Sci_Position FindPhpStringDelimiter(char *phpStringDelimiter, const int phpStringDelimiterSize, Sci_Position i, const Sci_Position lengthDoc, Accessor &styler, bool &isSimpleString) { Sci_Position j; const Sci_Position beginning = i - 1; bool isValidSimpleString = false; while (i < lengthDoc && (styler[i] == ' ' || styler[i] == '\t')) i++; char ch = styler.SafeGetCharAt(i); const char chNext = styler.SafeGetCharAt(i + 1); if (!IsPhpWordStart(ch)) { if (ch == '\'' && IsPhpWordStart(chNext)) { i++; ch = chNext; isSimpleString = true; } else { phpStringDelimiter[0] = '\0'; return beginning; } } phpStringDelimiter[0] = ch; i++; for (j = i; j < lengthDoc && !isLineEnd(styler[j]); j++) { if (!IsPhpWordChar(styler[j])) { if (isSimpleString && (styler[j] == '\'') && isLineEnd(styler.SafeGetCharAt(j + 1))) { isValidSimpleString = true; j++; break; } else { phpStringDelimiter[0] = '\0'; return beginning; } } if (j - i < phpStringDelimiterSize - 2) phpStringDelimiter[j-i+1] = styler[j]; else i++; } if (isSimpleString && !isValidSimpleString) { phpStringDelimiter[0] = '\0'; return beginning; } phpStringDelimiter[j-i+1 - (isSimpleString ? 1 : 0)] = '\0'; return j - 1; } static void ColouriseHyperTextDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler, bool isXml) { WordList &keywords = *keywordlists[0]; WordList &keywords2 = *keywordlists[1]; WordList &keywords3 = *keywordlists[2]; WordList &keywords4 = *keywordlists[3]; WordList &keywords5 = *keywordlists[4]; WordList &keywords6 = *keywordlists[5]; // SGML (DTD) keywords styler.StartAt(startPos); char prevWord[200]; prevWord[0] = '\0'; char phpStringDelimiter[200]; // PHP is not limited in length, we are phpStringDelimiter[0] = '\0'; int StateToPrint = initStyle; int state = stateForPrintState(StateToPrint); char makoBlockType[200]; makoBlockType[0] = '\0'; int makoComment = 0; char djangoBlockType[2]; djangoBlockType[0] = '\0'; // If inside a tag, it may be a script tag, so reread from the start of line starting tag to ensure any language tags are seen if (InTagState(state)) { while ((startPos > 0) && (InTagState(styler.StyleAt(startPos - 1)))) { Sci_Position backLineStart = styler.LineStart(styler.GetLine(startPos-1)); length += startPos - backLineStart; startPos = backLineStart; } state = SCE_H_DEFAULT; } // String can be heredoc, must find a delimiter first. Reread from beginning of line containing the string, to get the correct lineState if (isPHPStringState(state)) { while (startPos > 0 && (isPHPStringState(state) || !isLineEnd(styler[startPos - 1]))) { startPos--; length++; state = styler.StyleAt(startPos); } if (startPos == 0) state = SCE_H_DEFAULT; } styler.StartAt(startPos); /* Nothing handles getting out of these, so we need not start in any of them. * As we're at line start and they can't span lines, we'll re-detect them anyway */ switch (state) { case SCE_H_QUESTION: case SCE_H_XMLSTART: case SCE_H_XMLEND: case SCE_H_ASP: state = SCE_H_DEFAULT; break; } Sci_Position lineCurrent = styler.GetLine(startPos); int lineState; if (lineCurrent > 0) { lineState = styler.GetLineState(lineCurrent-1); } else { // Default client and ASP scripting language is JavaScript lineState = eScriptJS << 8; // property asp.default.language // Script in ASP code is initially assumed to be in JavaScript. // To change this to VBScript set asp.default.language to 2. Python is 3. lineState |= styler.GetPropertyInt("asp.default.language", eScriptJS) << 4; } script_mode inScriptType = script_mode((lineState >> 0) & 0x03); // 2 bits of scripting mode bool tagOpened = (lineState >> 2) & 0x01; // 1 bit to know if we are in an opened tag bool tagClosing = (lineState >> 3) & 0x01; // 1 bit to know if we are in a closing tag bool tagDontFold = false; //some HTML tags should not be folded script_type aspScript = script_type((lineState >> 4) & 0x0F); // 4 bits of script name script_type clientScript = script_type((lineState >> 8) & 0x0F); // 4 bits of script name int beforePreProc = (lineState >> 12) & 0xFF; // 8 bits of state script_type scriptLanguage = ScriptOfState(state); // If eNonHtmlScript coincides with SCE_H_COMMENT, assume eScriptComment if (inScriptType == eNonHtmlScript && state == SCE_H_COMMENT) { scriptLanguage = eScriptComment; } script_type beforeLanguage = ScriptOfState(beforePreProc); // property fold.html // Folding is turned on or off for HTML and XML files with this option. // The fold option must also be on for folding to occur. const bool foldHTML = styler.GetPropertyInt("fold.html", 0) != 0; const bool fold = foldHTML && styler.GetPropertyInt("fold", 0); // property fold.html.preprocessor // Folding is turned on or off for scripts embedded in HTML files with this option. // The default is on. const bool foldHTMLPreprocessor = foldHTML && styler.GetPropertyInt("fold.html.preprocessor", 1); const bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; // property fold.hypertext.comment // Allow folding for comments in scripts embedded in HTML. // The default is off. const bool foldComment = fold && styler.GetPropertyInt("fold.hypertext.comment", 0) != 0; // property fold.hypertext.heredoc // Allow folding for heredocs in scripts embedded in HTML. // The default is off. const bool foldHeredoc = fold && styler.GetPropertyInt("fold.hypertext.heredoc", 0) != 0; // property html.tags.case.sensitive // For XML and HTML, setting this property to 1 will make tags match in a case // sensitive way which is the expected behaviour for XML and XHTML. const bool caseSensitive = styler.GetPropertyInt("html.tags.case.sensitive", 0) != 0; // property lexer.xml.allow.scripts // Set to 0 to disable scripts in XML. const bool allowScripts = styler.GetPropertyInt("lexer.xml.allow.scripts", 1) != 0; // property lexer.html.mako // Set to 1 to enable the mako template language. const bool isMako = styler.GetPropertyInt("lexer.html.mako", 0) != 0; // property lexer.html.django // Set to 1 to enable the django template language. const bool isDjango = styler.GetPropertyInt("lexer.html.django", 0) != 0; const CharacterSet setHTMLWord(CharacterSet::setAlphaNum, ".-_:!#", 0x80, true); const CharacterSet setTagContinue(CharacterSet::setAlphaNum, ".-_:!#[", 0x80, true); const CharacterSet setAttributeContinue(CharacterSet::setAlphaNum, ".-_:!#/", 0x80, true); // TODO: also handle + and - (except if they're part of ++ or --) and return keywords const CharacterSet setOKBeforeJSRE(CharacterSet::setNone, "([{=,:;!%^&*|?~"); int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; int levelCurrent = levelPrev; int visibleChars = 0; int lineStartVisibleChars = 0; int chPrev = ' '; int ch = ' '; int chPrevNonWhite = ' '; // look back to set chPrevNonWhite properly for better regex colouring if (scriptLanguage == eScriptJS && startPos > 0) { Sci_Position back = startPos; int style = 0; while (--back) { style = styler.StyleAt(back); if (style < SCE_HJ_DEFAULT || style > SCE_HJ_COMMENTDOC) // includes SCE_HJ_COMMENT & SCE_HJ_COMMENTLINE break; } if (style == SCE_HJ_SYMBOLS) { chPrevNonWhite = static_cast(styler.SafeGetCharAt(back)); } } styler.StartSegment(startPos); const Sci_Position lengthDoc = startPos + length; for (Sci_Position i = startPos; i < lengthDoc; i++) { const int chPrev2 = chPrev; chPrev = ch; if (!IsASpace(ch) && state != SCE_HJ_COMMENT && state != SCE_HJ_COMMENTLINE && state != SCE_HJ_COMMENTDOC) chPrevNonWhite = ch; ch = static_cast(styler[i]); int chNext = static_cast(styler.SafeGetCharAt(i + 1)); const int chNext2 = static_cast(styler.SafeGetCharAt(i + 2)); // Handle DBCS codepages if (styler.IsLeadByte(static_cast(ch))) { chPrev = ' '; i += 1; continue; } if ((!IsASpace(ch) || !foldCompact) && fold) visibleChars++; if (!IsASpace(ch)) lineStartVisibleChars++; // decide what is the current state to print (depending of the script tag) StateToPrint = statePrintForState(state, inScriptType); // handle script folding if (fold) { switch (scriptLanguage) { case eScriptJS: case eScriptPHP: //not currently supported case eScriptVBS: if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC) && (!isStringState(state))) { //Platform::DebugPrintf("state=%d, StateToPrint=%d, initStyle=%d\n", state, StateToPrint, initStyle); //if ((state == SCE_HPHP_OPERATOR) || (state == SCE_HPHP_DEFAULT) || (state == SCE_HJ_SYMBOLS) || (state == SCE_HJ_START) || (state == SCE_HJ_DEFAULT)) { if (ch == '#') { Sci_Position j = i + 1; while ((j < lengthDoc) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { j++; } if (styler.Match(j, "region") || styler.Match(j, "if")) { levelCurrent++; } else if (styler.Match(j, "end")) { levelCurrent--; } } else if ((ch == '{') || (ch == '}') || (foldComment && (ch == '/') && (chNext == '*'))) { levelCurrent += (((ch == '{') || (ch == '/')) ? 1 : -1); } } else if (((state == SCE_HPHP_COMMENT) || (state == SCE_HJ_COMMENT)) && foldComment && (ch == '*') && (chNext == '/')) { levelCurrent--; } break; case eScriptPython: if (state != SCE_HP_COMMENTLINE && !isMako) { if ((ch == ':') && ((chNext == '\n') || (chNext == '\r' && chNext2 == '\n'))) { levelCurrent++; } else if ((ch == '\n') && !((chNext == '\r') && (chNext2 == '\n')) && (chNext != '\n')) { // check if the number of tabs is lower than the level int Findlevel = (levelCurrent & ~SC_FOLDLEVELBASE) * 8; for (Sci_Position j = 0; Findlevel > 0; j++) { char chTmp = styler.SafeGetCharAt(i + j + 1); if (chTmp == '\t') { Findlevel -= 8; } else if (chTmp == ' ') { Findlevel--; } else { break; } } if (Findlevel > 0) { levelCurrent -= Findlevel / 8; if (Findlevel % 8) levelCurrent--; } } } break; default: break; } } if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) // Avoid triggering two times on Dos/Win // New line -> record any line state onto /next/ line if (fold) { int lev = levelPrev; if (visibleChars == 0) lev |= SC_FOLDLEVELWHITEFLAG; if ((levelCurrent > levelPrev) && (visibleChars > 0)) lev |= SC_FOLDLEVELHEADERFLAG; styler.SetLevel(lineCurrent, lev); visibleChars = 0; levelPrev = levelCurrent; } styler.SetLineState(lineCurrent, ((inScriptType & 0x03) << 0) | ((tagOpened ? 1 : 0) << 2) | ((tagClosing ? 1 : 0) << 3) | ((aspScript & 0x0F) << 4) | ((clientScript & 0x0F) << 8) | ((beforePreProc & 0xFF) << 12)); lineCurrent++; lineStartVisibleChars = 0; } // handle start of Mako comment line if (isMako && ch == '#' && chNext == '#') { makoComment = 1; state = SCE_HP_COMMENTLINE; } // handle end of Mako comment line else if (isMako && makoComment && (ch == '\r' || ch == '\n')) { makoComment = 0; styler.ColourTo(i - 1, StateToPrint); if (scriptLanguage == eScriptPython) { state = SCE_HP_DEFAULT; } else { state = SCE_H_DEFAULT; } } // Allow falling through to mako handling code if newline is going to end a block if (((ch == '\r' && chNext != '\n') || (ch == '\n')) && (!isMako || (0 != strcmp(makoBlockType, "%")))) { } // Ignore everything in mako comment until the line ends else if (isMako && makoComment) { } // generic end of script processing else if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) { // Check if it's the end of the script tag (or any other HTML tag) switch (state) { // in these cases, you can embed HTML tags (to confirm !!!!!!!!!!!!!!!!!!!!!!) case SCE_H_DOUBLESTRING: case SCE_H_SINGLESTRING: case SCE_HJ_COMMENT: case SCE_HJ_COMMENTDOC: //case SCE_HJ_COMMENTLINE: // removed as this is a common thing done to hide // the end of script marker from some JS interpreters. case SCE_HB_COMMENTLINE: case SCE_HBA_COMMENTLINE: case SCE_HJ_DOUBLESTRING: case SCE_HJ_SINGLESTRING: case SCE_HJ_REGEX: case SCE_HB_STRING: case SCE_HBA_STRING: case SCE_HP_STRING: case SCE_HP_TRIPLE: case SCE_HP_TRIPLEDOUBLE: case SCE_HPHP_HSTRING: case SCE_HPHP_SIMPLESTRING: case SCE_HPHP_COMMENT: case SCE_HPHP_COMMENTLINE: break; default : // check if the closing tag is a script tag if (const char *tag = state == SCE_HJ_COMMENTLINE || isXml ? "script" : state == SCE_H_COMMENT ? "comment" : 0) { Sci_Position j = i + 2; int chr; do { chr = static_cast(*tag++); } while (chr != 0 && chr == MakeLowerCase(styler.SafeGetCharAt(j++))); if (chr != 0) break; } // closing tag of the script (it's a closing HTML tag anyway) styler.ColourTo(i - 1, StateToPrint); state = SCE_H_TAGUNKNOWN; inScriptType = eHtml; scriptLanguage = eScriptNone; clientScript = eScriptJS; i += 2; visibleChars += 2; tagClosing = true; continue; } } ///////////////////////////////////// // handle the start of PHP pre-processor = Non-HTML else if ((state != SCE_H_ASPAT) && !isStringState(state) && (state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (ch == '<') && (chNext == '?') && !IsScriptCommentState(state)) { beforeLanguage = scriptLanguage; scriptLanguage = segIsScriptingIndicator(styler, i + 2, i + 6, isXml ? eScriptXML : eScriptPHP); if ((scriptLanguage != eScriptPHP) && (isStringState(state) || (state==SCE_H_COMMENT))) continue; styler.ColourTo(i - 1, StateToPrint); beforePreProc = state; i++; visibleChars++; i += PrintScriptingIndicatorOffset(styler, styler.GetStartSegment() + 2, i + 6); if (scriptLanguage == eScriptXML) styler.ColourTo(i, SCE_H_XMLSTART); else styler.ColourTo(i, SCE_H_QUESTION); state = StateForScript(scriptLanguage); if (inScriptType == eNonHtmlScript) inScriptType = eNonHtmlScriptPreProc; else inScriptType = eNonHtmlPreProc; // Fold whole script, but not if the XML first tag (all XML-like tags in this case) if (foldHTMLPreprocessor && (scriptLanguage != eScriptXML)) { levelCurrent++; } // should be better ch = static_cast(styler.SafeGetCharAt(i)); continue; } // handle the start Mako template Python code else if (isMako && scriptLanguage == eScriptNone && ((ch == '<' && chNext == '%') || (lineStartVisibleChars == 1 && ch == '%') || (lineStartVisibleChars == 1 && ch == '/' && chNext == '%') || (ch == '$' && chNext == '{') || (ch == '<' && chNext == '/' && chNext2 == '%'))) { if (ch == '%' || ch == '/') StringCopy(makoBlockType, "%"); else if (ch == '$') StringCopy(makoBlockType, "{"); else if (chNext == '/') GetNextWord(styler, i+3, makoBlockType, sizeof(makoBlockType)); else GetNextWord(styler, i+2, makoBlockType, sizeof(makoBlockType)); styler.ColourTo(i - 1, StateToPrint); beforePreProc = state; if (inScriptType == eNonHtmlScript) inScriptType = eNonHtmlScriptPreProc; else inScriptType = eNonHtmlPreProc; if (chNext == '/') { i += 2; visibleChars += 2; } else if (ch != '%') { i++; visibleChars++; } state = SCE_HP_START; scriptLanguage = eScriptPython; styler.ColourTo(i, SCE_H_ASP); if (ch != '%' && ch != '$' && ch != '/') { i += static_cast(strlen(makoBlockType)); visibleChars += static_cast(strlen(makoBlockType)); if (keywords4.InList(makoBlockType)) styler.ColourTo(i, SCE_HP_WORD); else styler.ColourTo(i, SCE_H_TAGUNKNOWN); } ch = static_cast(styler.SafeGetCharAt(i)); continue; } // handle the start/end of Django comment else if (isDjango && state != SCE_H_COMMENT && (ch == '{' && chNext == '#')) { styler.ColourTo(i - 1, StateToPrint); beforePreProc = state; beforeLanguage = scriptLanguage; if (inScriptType == eNonHtmlScript) inScriptType = eNonHtmlScriptPreProc; else inScriptType = eNonHtmlPreProc; i += 1; visibleChars += 1; scriptLanguage = eScriptComment; state = SCE_H_COMMENT; styler.ColourTo(i, SCE_H_ASP); ch = static_cast(styler.SafeGetCharAt(i)); continue; } else if (isDjango && state == SCE_H_COMMENT && (ch == '#' && chNext == '}')) { styler.ColourTo(i - 1, StateToPrint); i += 1; visibleChars += 1; styler.ColourTo(i, SCE_H_ASP); state = beforePreProc; if (inScriptType == eNonHtmlScriptPreProc) inScriptType = eNonHtmlScript; else inScriptType = eHtml; scriptLanguage = beforeLanguage; continue; } // handle the start Django template code else if (isDjango && scriptLanguage != eScriptPython && (ch == '{' && (chNext == '%' || chNext == '{'))) { if (chNext == '%') StringCopy(djangoBlockType, "%"); else StringCopy(djangoBlockType, "{"); styler.ColourTo(i - 1, StateToPrint); beforePreProc = state; if (inScriptType == eNonHtmlScript) inScriptType = eNonHtmlScriptPreProc; else inScriptType = eNonHtmlPreProc; i += 1; visibleChars += 1; state = SCE_HP_START; beforeLanguage = scriptLanguage; scriptLanguage = eScriptPython; styler.ColourTo(i, SCE_H_ASP); ch = static_cast(styler.SafeGetCharAt(i)); continue; } // handle the start of ASP pre-processor = Non-HTML else if (!isMako && !isDjango && !isCommentASPState(state) && (ch == '<') && (chNext == '%') && !isPHPStringState(state)) { styler.ColourTo(i - 1, StateToPrint); beforePreProc = state; if (inScriptType == eNonHtmlScript) inScriptType = eNonHtmlScriptPreProc; else inScriptType = eNonHtmlPreProc; if (chNext2 == '@') { i += 2; // place as if it was the second next char treated visibleChars += 2; state = SCE_H_ASPAT; } else if ((chNext2 == '-') && (styler.SafeGetCharAt(i + 3) == '-')) { styler.ColourTo(i + 3, SCE_H_ASP); state = SCE_H_XCCOMMENT; scriptLanguage = eScriptVBS; continue; } else { if (chNext2 == '=') { i += 2; // place as if it was the second next char treated visibleChars += 2; } else { i++; // place as if it was the next char treated visibleChars++; } state = StateForScript(aspScript); } scriptLanguage = eScriptVBS; styler.ColourTo(i, SCE_H_ASP); // fold whole script if (foldHTMLPreprocessor) levelCurrent++; // should be better ch = static_cast(styler.SafeGetCharAt(i)); continue; } ///////////////////////////////////// // handle the start of SGML language (DTD) else if (((scriptLanguage == eScriptNone) || (scriptLanguage == eScriptXML)) && (chPrev == '<') && (ch == '!') && (StateToPrint != SCE_H_CDATA) && (!IsCommentState(StateToPrint)) && (!IsScriptCommentState(StateToPrint))) { beforePreProc = state; styler.ColourTo(i - 2, StateToPrint); if ((chNext == '-') && (chNext2 == '-')) { state = SCE_H_COMMENT; // wait for a pending command styler.ColourTo(i + 2, SCE_H_COMMENT); i += 2; // follow styling after the -- } else if (isWordCdata(i + 1, i + 7, styler)) { state = SCE_H_CDATA; } else { styler.ColourTo(i, SCE_H_SGML_DEFAULT); // ') { i++; visibleChars++; } else if (0 == strcmp(makoBlockType, "%") && ch == '/') { i++; visibleChars++; } if (0 != strcmp(makoBlockType, "%") || ch == '/') { styler.ColourTo(i, SCE_H_ASP); } state = beforePreProc; if (inScriptType == eNonHtmlScriptPreProc) inScriptType = eNonHtmlScript; else inScriptType = eHtml; scriptLanguage = eScriptNone; continue; } // handle the end of Django template code else if (isDjango && ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) && (scriptLanguage != eScriptNone) && stateAllowsTermination(state) && isDjangoBlockEnd(ch, chNext, djangoBlockType)) { if (state == SCE_H_ASPAT) { aspScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, aspScript); } if (state == SCE_HP_WORD) { classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType, isMako); } else { styler.ColourTo(i - 1, StateToPrint); } i += 1; visibleChars += 1; styler.ColourTo(i, SCE_H_ASP); state = beforePreProc; if (inScriptType == eNonHtmlScriptPreProc) inScriptType = eNonHtmlScript; else inScriptType = eHtml; scriptLanguage = beforeLanguage; continue; } // handle the end of a pre-processor = Non-HTML else if ((!isMako && !isDjango && ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) && (((scriptLanguage != eScriptNone) && stateAllowsTermination(state))) && (((ch == '%') || (ch == '?')) && (chNext == '>'))) || ((scriptLanguage == eScriptSGML) && (ch == '>') && (state != SCE_H_SGML_COMMENT))) { if (state == SCE_H_ASPAT) { aspScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, aspScript); } // Bounce out of any ASP mode switch (state) { case SCE_HJ_WORD: classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); break; case SCE_HB_WORD: classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); break; case SCE_HP_WORD: classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType, isMako); break; case SCE_HPHP_WORD: classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); break; case SCE_H_XCCOMMENT: styler.ColourTo(i - 1, state); break; default : styler.ColourTo(i - 1, StateToPrint); break; } if (scriptLanguage != eScriptSGML) { i++; visibleChars++; } if (ch == '%') styler.ColourTo(i, SCE_H_ASP); else if (scriptLanguage == eScriptXML) styler.ColourTo(i, SCE_H_XMLEND); else if (scriptLanguage == eScriptSGML) styler.ColourTo(i, SCE_H_SGML_DEFAULT); else styler.ColourTo(i, SCE_H_QUESTION); state = beforePreProc; if (inScriptType == eNonHtmlScriptPreProc) inScriptType = eNonHtmlScript; else inScriptType = eHtml; // Unfold all scripting languages, except for XML tag if (foldHTMLPreprocessor && (scriptLanguage != eScriptXML)) { levelCurrent--; } scriptLanguage = beforeLanguage; continue; } ///////////////////////////////////// switch (state) { case SCE_H_DEFAULT: if (ch == '<') { // in HTML, fold on tag open and unfold on tag close tagOpened = true; tagClosing = (chNext == '/'); styler.ColourTo(i - 1, StateToPrint); if (chNext != '!') state = SCE_H_TAGUNKNOWN; } else if (ch == '&') { styler.ColourTo(i - 1, SCE_H_DEFAULT); state = SCE_H_ENTITY; } break; case SCE_H_SGML_DEFAULT: case SCE_H_SGML_BLOCK_DEFAULT: // if (scriptLanguage == eScriptSGMLblock) // StateToPrint = SCE_H_SGML_BLOCK_DEFAULT; if (ch == '\"') { styler.ColourTo(i - 1, StateToPrint); state = SCE_H_SGML_DOUBLESTRING; } else if (ch == '\'') { styler.ColourTo(i - 1, StateToPrint); state = SCE_H_SGML_SIMPLESTRING; } else if ((ch == '-') && (chPrev == '-')) { if (static_cast(styler.GetStartSegment()) <= (i - 2)) { styler.ColourTo(i - 2, StateToPrint); } state = SCE_H_SGML_COMMENT; } else if (IsASCII(ch) && isalpha(ch) && (chPrev == '%')) { styler.ColourTo(i - 2, StateToPrint); state = SCE_H_SGML_ENTITY; } else if (ch == '#') { styler.ColourTo(i - 1, StateToPrint); state = SCE_H_SGML_SPECIAL; } else if (ch == '[') { styler.ColourTo(i - 1, StateToPrint); scriptLanguage = eScriptSGMLblock; state = SCE_H_SGML_BLOCK_DEFAULT; } else if (ch == ']') { if (scriptLanguage == eScriptSGMLblock) { styler.ColourTo(i, StateToPrint); scriptLanguage = eScriptSGML; } else { styler.ColourTo(i - 1, StateToPrint); styler.ColourTo(i, SCE_H_SGML_ERROR); } state = SCE_H_SGML_DEFAULT; } else if (scriptLanguage == eScriptSGMLblock) { if ((ch == '!') && (chPrev == '<')) { styler.ColourTo(i - 2, StateToPrint); styler.ColourTo(i, SCE_H_SGML_DEFAULT); state = SCE_H_SGML_COMMAND; } else if (ch == '>') { styler.ColourTo(i - 1, StateToPrint); styler.ColourTo(i, SCE_H_SGML_DEFAULT); } } break; case SCE_H_SGML_COMMAND: if ((ch == '-') && (chPrev == '-')) { styler.ColourTo(i - 2, StateToPrint); state = SCE_H_SGML_COMMENT; } else if (!issgmlwordchar(ch)) { if (isWordHSGML(styler.GetStartSegment(), i - 1, keywords6, styler)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_H_SGML_1ST_PARAM; } else { state = SCE_H_SGML_ERROR; } } break; case SCE_H_SGML_1ST_PARAM: // wait for the beginning of the word if ((ch == '-') && (chPrev == '-')) { if (scriptLanguage == eScriptSGMLblock) { styler.ColourTo(i - 2, SCE_H_SGML_BLOCK_DEFAULT); } else { styler.ColourTo(i - 2, SCE_H_SGML_DEFAULT); } state = SCE_H_SGML_1ST_PARAM_COMMENT; } else if (issgmlwordchar(ch)) { if (scriptLanguage == eScriptSGMLblock) { styler.ColourTo(i - 1, SCE_H_SGML_BLOCK_DEFAULT); } else { styler.ColourTo(i - 1, SCE_H_SGML_DEFAULT); } // find the length of the word int size = 1; while (setHTMLWord.Contains(static_cast(styler.SafeGetCharAt(i + size)))) size++; styler.ColourTo(i + size - 1, StateToPrint); i += size - 1; visibleChars += size - 1; ch = static_cast(styler.SafeGetCharAt(i)); if (scriptLanguage == eScriptSGMLblock) { state = SCE_H_SGML_BLOCK_DEFAULT; } else { state = SCE_H_SGML_DEFAULT; } continue; } break; case SCE_H_SGML_ERROR: if ((ch == '-') && (chPrev == '-')) { styler.ColourTo(i - 2, StateToPrint); state = SCE_H_SGML_COMMENT; } break; case SCE_H_SGML_DOUBLESTRING: if (ch == '\"') { styler.ColourTo(i, StateToPrint); state = SCE_H_SGML_DEFAULT; } break; case SCE_H_SGML_SIMPLESTRING: if (ch == '\'') { styler.ColourTo(i, StateToPrint); state = SCE_H_SGML_DEFAULT; } break; case SCE_H_SGML_COMMENT: if ((ch == '-') && (chPrev == '-')) { styler.ColourTo(i, StateToPrint); state = SCE_H_SGML_DEFAULT; } break; case SCE_H_CDATA: if ((chPrev2 == ']') && (chPrev == ']') && (ch == '>')) { styler.ColourTo(i, StateToPrint); state = SCE_H_DEFAULT; levelCurrent--; } break; case SCE_H_COMMENT: if ((scriptLanguage != eScriptComment) && (chPrev2 == '-') && (chPrev == '-') && (ch == '>')) { styler.ColourTo(i, StateToPrint); state = SCE_H_DEFAULT; levelCurrent--; } break; case SCE_H_SGML_1ST_PARAM_COMMENT: if ((ch == '-') && (chPrev == '-')) { styler.ColourTo(i, SCE_H_SGML_COMMENT); state = SCE_H_SGML_1ST_PARAM; } break; case SCE_H_SGML_SPECIAL: if (!(IsASCII(ch) && isupper(ch))) { styler.ColourTo(i - 1, StateToPrint); if (isalnum(ch)) { state = SCE_H_SGML_ERROR; } else { state = SCE_H_SGML_DEFAULT; } } break; case SCE_H_SGML_ENTITY: if (ch == ';') { styler.ColourTo(i, StateToPrint); state = SCE_H_SGML_DEFAULT; } else if (!(IsASCII(ch) && isalnum(ch)) && ch != '-' && ch != '.') { styler.ColourTo(i, SCE_H_SGML_ERROR); state = SCE_H_SGML_DEFAULT; } break; case SCE_H_ENTITY: if (ch == ';') { styler.ColourTo(i, StateToPrint); state = SCE_H_DEFAULT; } if (ch != '#' && !(IsASCII(ch) && isalnum(ch)) // Should check that '#' follows '&', but it is unlikely anyway... && ch != '.' && ch != '-' && ch != '_' && ch != ':') { // valid in XML if (!IsASCII(ch)) // Possibly start of a multibyte character so don't allow this byte to be in entity style styler.ColourTo(i-1, SCE_H_TAGUNKNOWN); else styler.ColourTo(i, SCE_H_TAGUNKNOWN); state = SCE_H_DEFAULT; } break; case SCE_H_TAGUNKNOWN: if (!setTagContinue.Contains(ch) && !((ch == '/') && (chPrev == '<'))) { int eClass = classifyTagHTML(styler.GetStartSegment(), i - 1, keywords, styler, tagDontFold, caseSensitive, isXml, allowScripts); if (eClass == SCE_H_SCRIPT || eClass == SCE_H_COMMENT) { if (!tagClosing) { inScriptType = eNonHtmlScript; scriptLanguage = eClass == SCE_H_SCRIPT ? clientScript : eScriptComment; } else { scriptLanguage = eScriptNone; } eClass = SCE_H_TAG; } if (ch == '>') { styler.ColourTo(i, eClass); if (inScriptType == eNonHtmlScript) { state = StateForScript(scriptLanguage); } else { state = SCE_H_DEFAULT; } tagOpened = false; if (!tagDontFold) { if (tagClosing) { levelCurrent--; } else { levelCurrent++; } } tagClosing = false; } else if (ch == '/' && chNext == '>') { if (eClass == SCE_H_TAGUNKNOWN) { styler.ColourTo(i + 1, SCE_H_TAGUNKNOWN); } else { styler.ColourTo(i - 1, StateToPrint); styler.ColourTo(i + 1, SCE_H_TAGEND); } i++; ch = chNext; state = SCE_H_DEFAULT; tagOpened = false; } else { if (eClass != SCE_H_TAGUNKNOWN) { if (eClass == SCE_H_SGML_DEFAULT) { state = SCE_H_SGML_DEFAULT; } else { state = SCE_H_OTHER; } } } } break; case SCE_H_ATTRIBUTE: if (!setAttributeContinue.Contains(ch)) { if (inScriptType == eNonHtmlScript) { int scriptLanguagePrev = scriptLanguage; clientScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, scriptLanguage); scriptLanguage = clientScript; if ((scriptLanguagePrev != scriptLanguage) && (scriptLanguage == eScriptNone)) inScriptType = eHtml; } classifyAttribHTML(styler.GetStartSegment(), i - 1, keywords, styler); if (ch == '>') { styler.ColourTo(i, SCE_H_TAG); if (inScriptType == eNonHtmlScript) { state = StateForScript(scriptLanguage); } else { state = SCE_H_DEFAULT; } tagOpened = false; if (!tagDontFold) { if (tagClosing) { levelCurrent--; } else { levelCurrent++; } } tagClosing = false; } else if (ch == '=') { styler.ColourTo(i, SCE_H_OTHER); state = SCE_H_VALUE; } else { state = SCE_H_OTHER; } } break; case SCE_H_OTHER: if (ch == '>') { styler.ColourTo(i - 1, StateToPrint); styler.ColourTo(i, SCE_H_TAG); if (inScriptType == eNonHtmlScript) { state = StateForScript(scriptLanguage); } else { state = SCE_H_DEFAULT; } tagOpened = false; if (!tagDontFold) { if (tagClosing) { levelCurrent--; } else { levelCurrent++; } } tagClosing = false; } else if (ch == '\"') { styler.ColourTo(i - 1, StateToPrint); state = SCE_H_DOUBLESTRING; } else if (ch == '\'') { styler.ColourTo(i - 1, StateToPrint); state = SCE_H_SINGLESTRING; } else if (ch == '=') { styler.ColourTo(i, StateToPrint); state = SCE_H_VALUE; } else if (ch == '/' && chNext == '>') { styler.ColourTo(i - 1, StateToPrint); styler.ColourTo(i + 1, SCE_H_TAGEND); i++; ch = chNext; state = SCE_H_DEFAULT; tagOpened = false; } else if (ch == '?' && chNext == '>') { styler.ColourTo(i - 1, StateToPrint); styler.ColourTo(i + 1, SCE_H_XMLEND); i++; ch = chNext; state = SCE_H_DEFAULT; } else if (setHTMLWord.Contains(ch)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_H_ATTRIBUTE; } break; case SCE_H_DOUBLESTRING: if (ch == '\"') { if (inScriptType == eNonHtmlScript) { scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); } styler.ColourTo(i, SCE_H_DOUBLESTRING); state = SCE_H_OTHER; } break; case SCE_H_SINGLESTRING: if (ch == '\'') { if (inScriptType == eNonHtmlScript) { scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); } styler.ColourTo(i, SCE_H_SINGLESTRING); state = SCE_H_OTHER; } break; case SCE_H_VALUE: if (!setHTMLWord.Contains(ch)) { if (ch == '\"' && chPrev == '=') { // Should really test for being first character state = SCE_H_DOUBLESTRING; } else if (ch == '\'' && chPrev == '=') { state = SCE_H_SINGLESTRING; } else { if (IsNumber(styler.GetStartSegment(), styler)) { styler.ColourTo(i - 1, SCE_H_NUMBER); } else { styler.ColourTo(i - 1, StateToPrint); } if (ch == '>') { styler.ColourTo(i, SCE_H_TAG); if (inScriptType == eNonHtmlScript) { state = StateForScript(scriptLanguage); } else { state = SCE_H_DEFAULT; } tagOpened = false; if (!tagDontFold) { if (tagClosing) { levelCurrent--; } else { levelCurrent++; } } tagClosing = false; } else { state = SCE_H_OTHER; } } } break; case SCE_HJ_DEFAULT: case SCE_HJ_START: case SCE_HJ_SYMBOLS: if (IsAWordStart(ch)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_WORD; } else if (ch == '/' && chNext == '*') { styler.ColourTo(i - 1, StateToPrint); if (chNext2 == '*') state = SCE_HJ_COMMENTDOC; else state = SCE_HJ_COMMENT; if (chNext2 == '/') { // Eat the * so it isn't used for the end of the comment i++; } } else if (ch == '/' && chNext == '/') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_COMMENTLINE; } else if (ch == '/' && setOKBeforeJSRE.Contains(chPrevNonWhite)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_REGEX; } else if (ch == '\"') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_DOUBLESTRING; } else if (ch == '\'') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_SINGLESTRING; } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && styler.SafeGetCharAt(i + 3) == '-') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_COMMENTLINE; } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_COMMENTLINE; i += 2; } else if (IsOperator(ch)) { styler.ColourTo(i - 1, StateToPrint); styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); state = SCE_HJ_DEFAULT; } else if ((ch == ' ') || (ch == '\t')) { if (state == SCE_HJ_START) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_DEFAULT; } } break; case SCE_HJ_WORD: if (!IsAWordChar(ch)) { classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); //styler.ColourTo(i - 1, eHTJSKeyword); state = SCE_HJ_DEFAULT; if (ch == '/' && chNext == '*') { if (chNext2 == '*') state = SCE_HJ_COMMENTDOC; else state = SCE_HJ_COMMENT; } else if (ch == '/' && chNext == '/') { state = SCE_HJ_COMMENTLINE; } else if (ch == '\"') { state = SCE_HJ_DOUBLESTRING; } else if (ch == '\'') { state = SCE_HJ_SINGLESTRING; } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_COMMENTLINE; i += 2; } else if (IsOperator(ch)) { styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); state = SCE_HJ_DEFAULT; } } break; case SCE_HJ_COMMENT: case SCE_HJ_COMMENTDOC: if (ch == '/' && chPrev == '*') { styler.ColourTo(i, StateToPrint); state = SCE_HJ_DEFAULT; ch = ' '; } break; case SCE_HJ_COMMENTLINE: if (ch == '\r' || ch == '\n') { styler.ColourTo(i - 1, statePrintForState(SCE_HJ_COMMENTLINE, inScriptType)); state = SCE_HJ_DEFAULT; ch = ' '; } break; case SCE_HJ_DOUBLESTRING: if (ch == '\\') { if (chNext == '\"' || chNext == '\'' || chNext == '\\') { i++; } } else if (ch == '\"') { styler.ColourTo(i, statePrintForState(SCE_HJ_DOUBLESTRING, inScriptType)); state = SCE_HJ_DEFAULT; } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_COMMENTLINE; i += 2; } else if (isLineEnd(ch)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_STRINGEOL; } break; case SCE_HJ_SINGLESTRING: if (ch == '\\') { if (chNext == '\"' || chNext == '\'' || chNext == '\\') { i++; } } else if (ch == '\'') { styler.ColourTo(i, statePrintForState(SCE_HJ_SINGLESTRING, inScriptType)); state = SCE_HJ_DEFAULT; } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_COMMENTLINE; i += 2; } else if (isLineEnd(ch)) { styler.ColourTo(i - 1, StateToPrint); if (chPrev != '\\' && (chPrev2 != '\\' || chPrev != '\r' || ch != '\n')) { state = SCE_HJ_STRINGEOL; } } break; case SCE_HJ_STRINGEOL: if (!isLineEnd(ch)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_DEFAULT; } else if (!isLineEnd(chNext)) { styler.ColourTo(i, StateToPrint); state = SCE_HJ_DEFAULT; } break; case SCE_HJ_REGEX: if (ch == '\r' || ch == '\n' || ch == '/') { if (ch == '/') { while (IsASCII(chNext) && islower(chNext)) { // gobble regex flags i++; ch = chNext; chNext = static_cast(styler.SafeGetCharAt(i + 1)); } } styler.ColourTo(i, StateToPrint); state = SCE_HJ_DEFAULT; } else if (ch == '\\') { // Gobble up the quoted character if (chNext == '\\' || chNext == '/') { i++; ch = chNext; chNext = static_cast(styler.SafeGetCharAt(i + 1)); } } break; case SCE_HB_DEFAULT: case SCE_HB_START: if (IsAWordStart(ch)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HB_WORD; } else if (ch == '\'') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HB_COMMENTLINE; } else if (ch == '\"') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HB_STRING; } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && styler.SafeGetCharAt(i + 3) == '-') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HB_COMMENTLINE; } else if (IsOperator(ch)) { styler.ColourTo(i - 1, StateToPrint); styler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType)); state = SCE_HB_DEFAULT; } else if ((ch == ' ') || (ch == '\t')) { if (state == SCE_HB_START) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HB_DEFAULT; } } break; case SCE_HB_WORD: if (!IsAWordChar(ch)) { state = classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); if (state == SCE_HB_DEFAULT) { if (ch == '\"') { state = SCE_HB_STRING; } else if (ch == '\'') { state = SCE_HB_COMMENTLINE; } else if (IsOperator(ch)) { styler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType)); state = SCE_HB_DEFAULT; } } } break; case SCE_HB_STRING: if (ch == '\"') { styler.ColourTo(i, StateToPrint); state = SCE_HB_DEFAULT; } else if (ch == '\r' || ch == '\n') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HB_STRINGEOL; } break; case SCE_HB_COMMENTLINE: if (ch == '\r' || ch == '\n') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HB_DEFAULT; } break; case SCE_HB_STRINGEOL: if (!isLineEnd(ch)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HB_DEFAULT; } else if (!isLineEnd(chNext)) { styler.ColourTo(i, StateToPrint); state = SCE_HB_DEFAULT; } break; case SCE_HP_DEFAULT: case SCE_HP_START: if (IsAWordStart(ch)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HP_WORD; } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && styler.SafeGetCharAt(i + 3) == '-') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HP_COMMENTLINE; } else if (ch == '#') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HP_COMMENTLINE; } else if (ch == '\"') { styler.ColourTo(i - 1, StateToPrint); if (chNext == '\"' && chNext2 == '\"') { i += 2; state = SCE_HP_TRIPLEDOUBLE; ch = ' '; chPrev = ' '; chNext = static_cast(styler.SafeGetCharAt(i + 1)); } else { // state = statePrintForState(SCE_HP_STRING,inScriptType); state = SCE_HP_STRING; } } else if (ch == '\'') { styler.ColourTo(i - 1, StateToPrint); if (chNext == '\'' && chNext2 == '\'') { i += 2; state = SCE_HP_TRIPLE; ch = ' '; chPrev = ' '; chNext = static_cast(styler.SafeGetCharAt(i + 1)); } else { state = SCE_HP_CHARACTER; } } else if (IsOperator(ch)) { styler.ColourTo(i - 1, StateToPrint); styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); } else if ((ch == ' ') || (ch == '\t')) { if (state == SCE_HP_START) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HP_DEFAULT; } } break; case SCE_HP_WORD: if (!IsAWordChar(ch)) { classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType, isMako); state = SCE_HP_DEFAULT; if (ch == '#') { state = SCE_HP_COMMENTLINE; } else if (ch == '\"') { if (chNext == '\"' && chNext2 == '\"') { i += 2; state = SCE_HP_TRIPLEDOUBLE; ch = ' '; chPrev = ' '; chNext = static_cast(styler.SafeGetCharAt(i + 1)); } else { state = SCE_HP_STRING; } } else if (ch == '\'') { if (chNext == '\'' && chNext2 == '\'') { i += 2; state = SCE_HP_TRIPLE; ch = ' '; chPrev = ' '; chNext = static_cast(styler.SafeGetCharAt(i + 1)); } else { state = SCE_HP_CHARACTER; } } else if (IsOperator(ch)) { styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); } } break; case SCE_HP_COMMENTLINE: if (ch == '\r' || ch == '\n') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HP_DEFAULT; } break; case SCE_HP_STRING: if (ch == '\\') { if (chNext == '\"' || chNext == '\'' || chNext == '\\') { i++; ch = chNext; chNext = static_cast(styler.SafeGetCharAt(i + 1)); } } else if (ch == '\"') { styler.ColourTo(i, StateToPrint); state = SCE_HP_DEFAULT; } break; case SCE_HP_CHARACTER: if (ch == '\\') { if (chNext == '\"' || chNext == '\'' || chNext == '\\') { i++; ch = chNext; chNext = static_cast(styler.SafeGetCharAt(i + 1)); } } else if (ch == '\'') { styler.ColourTo(i, StateToPrint); state = SCE_HP_DEFAULT; } break; case SCE_HP_TRIPLE: if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { styler.ColourTo(i, StateToPrint); state = SCE_HP_DEFAULT; } break; case SCE_HP_TRIPLEDOUBLE: if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { styler.ColourTo(i, StateToPrint); state = SCE_HP_DEFAULT; } break; ///////////// start - PHP state handling case SCE_HPHP_WORD: if (!IsAWordChar(ch)) { classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); if (ch == '/' && chNext == '*') { i++; state = SCE_HPHP_COMMENT; } else if (ch == '/' && chNext == '/') { i++; state = SCE_HPHP_COMMENTLINE; } else if (ch == '#') { state = SCE_HPHP_COMMENTLINE; } else if (ch == '\"') { state = SCE_HPHP_HSTRING; StringCopy(phpStringDelimiter, "\""); } else if (styler.Match(i, "<<<")) { bool isSimpleString = false; i = FindPhpStringDelimiter(phpStringDelimiter, sizeof(phpStringDelimiter), i + 3, lengthDoc, styler, isSimpleString); if (strlen(phpStringDelimiter)) { state = (isSimpleString ? SCE_HPHP_SIMPLESTRING : SCE_HPHP_HSTRING); if (foldHeredoc) levelCurrent++; } } else if (ch == '\'') { state = SCE_HPHP_SIMPLESTRING; StringCopy(phpStringDelimiter, "\'"); } else if (ch == '$' && IsPhpWordStart(chNext)) { state = SCE_HPHP_VARIABLE; } else if (IsOperator(ch)) { state = SCE_HPHP_OPERATOR; } else { state = SCE_HPHP_DEFAULT; } } break; case SCE_HPHP_NUMBER: // recognize bases 8,10 or 16 integers OR floating-point numbers if (!IsADigit(ch) && strchr(".xXabcdefABCDEF", ch) == NULL && ((ch != '-' && ch != '+') || (chPrev != 'e' && chPrev != 'E'))) { styler.ColourTo(i - 1, SCE_HPHP_NUMBER); if (IsOperator(ch)) state = SCE_HPHP_OPERATOR; else state = SCE_HPHP_DEFAULT; } break; case SCE_HPHP_VARIABLE: if (!IsPhpWordChar(chNext)) { styler.ColourTo(i, SCE_HPHP_VARIABLE); state = SCE_HPHP_DEFAULT; } break; case SCE_HPHP_COMMENT: if (ch == '/' && chPrev == '*') { styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; } break; case SCE_HPHP_COMMENTLINE: if (ch == '\r' || ch == '\n') { styler.ColourTo(i - 1, StateToPrint); state = SCE_HPHP_DEFAULT; } break; case SCE_HPHP_HSTRING: if (ch == '\\' && (phpStringDelimiter[0] == '\"' || chNext == '$' || chNext == '{')) { // skip the next char i++; } else if (((ch == '{' && chNext == '$') || (ch == '$' && chNext == '{')) && IsPhpWordStart(chNext2)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HPHP_COMPLEX_VARIABLE; } else if (ch == '$' && IsPhpWordStart(chNext)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HPHP_HSTRING_VARIABLE; } else if (styler.Match(i, phpStringDelimiter)) { if (phpStringDelimiter[0] == '\"') { styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; } else if (isLineEnd(chPrev)) { const int psdLength = static_cast(strlen(phpStringDelimiter)); const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); if (isLineEnd(chAfterPsd) || (chAfterPsd == ';' && isLineEnd(chAfterPsd2))) { i += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1; styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; if (foldHeredoc) levelCurrent--; } } } break; case SCE_HPHP_SIMPLESTRING: if (phpStringDelimiter[0] == '\'') { if (ch == '\\') { // skip the next char i++; } else if (ch == '\'') { styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; } } else if (isLineEnd(chPrev) && styler.Match(i, phpStringDelimiter)) { const int psdLength = static_cast(strlen(phpStringDelimiter)); const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); if (isLineEnd(chAfterPsd) || (chAfterPsd == ';' && isLineEnd(chAfterPsd2))) { i += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1; styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; if (foldHeredoc) levelCurrent--; } } break; case SCE_HPHP_HSTRING_VARIABLE: if (!IsPhpWordChar(chNext)) { styler.ColourTo(i, StateToPrint); state = SCE_HPHP_HSTRING; } break; case SCE_HPHP_COMPLEX_VARIABLE: if (ch == '}') { styler.ColourTo(i, StateToPrint); state = SCE_HPHP_HSTRING; } break; case SCE_HPHP_OPERATOR: case SCE_HPHP_DEFAULT: styler.ColourTo(i - 1, StateToPrint); if (IsADigit(ch) || (ch == '.' && IsADigit(chNext))) { state = SCE_HPHP_NUMBER; } else if (IsAWordStart(ch)) { state = SCE_HPHP_WORD; } else if (ch == '/' && chNext == '*') { i++; state = SCE_HPHP_COMMENT; } else if (ch == '/' && chNext == '/') { i++; state = SCE_HPHP_COMMENTLINE; } else if (ch == '#') { state = SCE_HPHP_COMMENTLINE; } else if (ch == '\"') { state = SCE_HPHP_HSTRING; StringCopy(phpStringDelimiter, "\""); } else if (styler.Match(i, "<<<")) { bool isSimpleString = false; i = FindPhpStringDelimiter(phpStringDelimiter, sizeof(phpStringDelimiter), i + 3, lengthDoc, styler, isSimpleString); if (strlen(phpStringDelimiter)) { state = (isSimpleString ? SCE_HPHP_SIMPLESTRING : SCE_HPHP_HSTRING); if (foldHeredoc) levelCurrent++; } } else if (ch == '\'') { state = SCE_HPHP_SIMPLESTRING; StringCopy(phpStringDelimiter, "\'"); } else if (ch == '$' && IsPhpWordStart(chNext)) { state = SCE_HPHP_VARIABLE; } else if (IsOperator(ch)) { state = SCE_HPHP_OPERATOR; } else if ((state == SCE_HPHP_OPERATOR) && (IsASpace(ch))) { state = SCE_HPHP_DEFAULT; } break; ///////////// end - PHP state handling } // Some of the above terminated their lexeme but since the same character starts // the same class again, only reenter if non empty segment. bool nonEmptySegment = i >= static_cast(styler.GetStartSegment()); if (state == SCE_HB_DEFAULT) { // One of the above succeeded if ((ch == '\"') && (nonEmptySegment)) { state = SCE_HB_STRING; } else if (ch == '\'') { state = SCE_HB_COMMENTLINE; } else if (IsAWordStart(ch)) { state = SCE_HB_WORD; } else if (IsOperator(ch)) { styler.ColourTo(i, SCE_HB_DEFAULT); } } else if (state == SCE_HBA_DEFAULT) { // One of the above succeeded if ((ch == '\"') && (nonEmptySegment)) { state = SCE_HBA_STRING; } else if (ch == '\'') { state = SCE_HBA_COMMENTLINE; } else if (IsAWordStart(ch)) { state = SCE_HBA_WORD; } else if (IsOperator(ch)) { styler.ColourTo(i, SCE_HBA_DEFAULT); } } else if (state == SCE_HJ_DEFAULT) { // One of the above succeeded if (ch == '/' && chNext == '*') { if (styler.SafeGetCharAt(i + 2) == '*') state = SCE_HJ_COMMENTDOC; else state = SCE_HJ_COMMENT; } else if (ch == '/' && chNext == '/') { state = SCE_HJ_COMMENTLINE; } else if ((ch == '\"') && (nonEmptySegment)) { state = SCE_HJ_DOUBLESTRING; } else if ((ch == '\'') && (nonEmptySegment)) { state = SCE_HJ_SINGLESTRING; } else if (IsAWordStart(ch)) { state = SCE_HJ_WORD; } else if (IsOperator(ch)) { styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); } } } switch (state) { case SCE_HJ_WORD: classifyWordHTJS(styler.GetStartSegment(), lengthDoc - 1, keywords2, styler, inScriptType); break; case SCE_HB_WORD: classifyWordHTVB(styler.GetStartSegment(), lengthDoc - 1, keywords3, styler, inScriptType); break; case SCE_HP_WORD: classifyWordHTPy(styler.GetStartSegment(), lengthDoc - 1, keywords4, styler, prevWord, inScriptType, isMako); break; case SCE_HPHP_WORD: classifyWordHTPHP(styler.GetStartSegment(), lengthDoc - 1, keywords5, styler); break; default: StateToPrint = statePrintForState(state, inScriptType); if (static_cast(styler.GetStartSegment()) < lengthDoc) styler.ColourTo(lengthDoc - 1, StateToPrint); break; } // Fill in the real level of the next line, keeping the current flags as they will be filled in later if (fold) { int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; styler.SetLevel(lineCurrent, levelPrev | flagsNext); } } static void ColouriseXMLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) { // Passing in true because we're lexing XML ColouriseHyperTextDoc(startPos, length, initStyle, keywordlists, styler, true); } static void ColouriseHTMLDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) { // Passing in false because we're notlexing XML ColouriseHyperTextDoc(startPos, length, initStyle, keywordlists, styler, false); } static void ColourisePHPScriptDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) { if (startPos == 0) initStyle = SCE_HPHP_DEFAULT; ColouriseHTMLDoc(startPos, length, initStyle, keywordlists, styler); } static const char * const htmlWordListDesc[] = { "HTML elements and attributes", "JavaScript keywords", "VBScript keywords", "Python keywords", "PHP keywords", "SGML and DTD keywords", 0, }; static const char * const phpscriptWordListDesc[] = { "", //Unused "", //Unused "", //Unused "", //Unused "PHP keywords", "", //Unused 0, }; LexerModule lmHTML(SCLEX_HTML, ColouriseHTMLDoc, "hypertext", 0, htmlWordListDesc); LexerModule lmXML(SCLEX_XML, ColouriseXMLDoc, "xml", 0, htmlWordListDesc); LexerModule lmPHPSCRIPT(SCLEX_PHPSCRIPT, ColourisePHPScriptDoc, "phpscript", 0, phpscriptWordListDesc); sqlitebrowser-3.11.2/libs/qscintilla/lexers/LexJSON.cpp000066400000000000000000000325711345112435200230370ustar00rootroot00000000000000// Scintilla source code edit control /** * @file LexJSON.cxx * @date February 19, 2016 * @brief Lexer for JSON and JSON-LD formats * @author nkmathew * * The License.txt file describes the conditions under which this software may * be distributed. * */ #include #include #include #include #include #include #include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "WordList.h" #include "LexAccessor.h" #include "StyleContext.h" #include "CharacterSet.h" #include "LexerModule.h" #include "OptionSet.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif static const char *const JSONWordListDesc[] = { "JSON Keywords", "JSON-LD Keywords", 0 }; /** * Used to detect compact IRI/URLs in JSON-LD without first looking ahead for the * colon separating the prefix and suffix * * https://www.w3.org/TR/json-ld/#dfn-compact-iri */ struct CompactIRI { int colonCount; bool foundInvalidChar; CharacterSet setCompactIRI; CompactIRI() { colonCount = 0; foundInvalidChar = false; setCompactIRI = CharacterSet(CharacterSet::setAlpha, "$_-"); } void resetState() { colonCount = 0; foundInvalidChar = false; } void checkChar(int ch) { if (ch == ':') { colonCount++; } else { foundInvalidChar |= !setCompactIRI.Contains(ch); } } bool shouldHighlight() const { return !foundInvalidChar && colonCount == 1; } }; /** * Keeps track of escaped characters in strings as per: * * https://tools.ietf.org/html/rfc7159#section-7 */ struct EscapeSequence { int digitsLeft; CharacterSet setHexDigits; CharacterSet setEscapeChars; EscapeSequence() { digitsLeft = 0; setHexDigits = CharacterSet(CharacterSet::setDigits, "ABCDEFabcdef"); setEscapeChars = CharacterSet(CharacterSet::setNone, "\\\"tnbfru/"); } // Returns true if the following character is a valid escaped character bool newSequence(int nextChar) { digitsLeft = 0; if (nextChar == 'u') { digitsLeft = 5; } else if (!setEscapeChars.Contains(nextChar)) { return false; } return true; } bool atEscapeEnd() const { return digitsLeft <= 0; } bool isInvalidChar(int currChar) const { return !setHexDigits.Contains(currChar); } }; struct OptionsJSON { bool foldCompact; bool fold; bool allowComments; bool escapeSequence; OptionsJSON() { foldCompact = false; fold = false; allowComments = false; escapeSequence = false; } }; struct OptionSetJSON : public OptionSet { OptionSetJSON() { DefineProperty("lexer.json.escape.sequence", &OptionsJSON::escapeSequence, "Set to 1 to enable highlighting of escape sequences in strings"); DefineProperty("lexer.json.allow.comments", &OptionsJSON::allowComments, "Set to 1 to enable highlighting of line/block comments in JSON"); DefineProperty("fold.compact", &OptionsJSON::foldCompact); DefineProperty("fold", &OptionsJSON::fold); DefineWordListSets(JSONWordListDesc); } }; class LexerJSON : public ILexer { OptionsJSON options; OptionSetJSON optSetJSON; EscapeSequence escapeSeq; WordList keywordsJSON; WordList keywordsJSONLD; CharacterSet setOperators; CharacterSet setURL; CharacterSet setKeywordJSONLD; CharacterSet setKeywordJSON; CompactIRI compactIRI; static bool IsNextNonWhitespace(LexAccessor &styler, Sci_Position start, char ch) { Sci_Position i = 0; while (i < 50) { i++; char curr = styler.SafeGetCharAt(start+i, '\0'); char next = styler.SafeGetCharAt(start+i+1, '\0'); bool atEOL = (curr == '\r' && next != '\n') || (curr == '\n'); if (curr == ch) { return true; } else if (!isspacechar(curr) || atEOL) { return false; } } return false; } /** * Looks for the colon following the end quote * * Assumes property names of lengths no longer than a 100 characters. * The colon is also expected to be less than 50 spaces after the end * quote for the string to be considered a property name */ static bool AtPropertyName(LexAccessor &styler, Sci_Position start) { Sci_Position i = 0; bool escaped = false; while (i < 100) { i++; char curr = styler.SafeGetCharAt(start+i, '\0'); if (escaped) { escaped = false; continue; } escaped = curr == '\\'; if (curr == '"') { return IsNextNonWhitespace(styler, start+i, ':'); } else if (!curr) { return false; } } return false; } static bool IsNextWordInList(WordList &keywordList, CharacterSet wordSet, StyleContext &context, LexAccessor &styler) { char word[51]; Sci_Position currPos = (Sci_Position) context.currentPos; int i = 0; while (i < 50) { char ch = styler.SafeGetCharAt(currPos + i); if (!wordSet.Contains(ch)) { break; } word[i] = ch; i++; } word[i] = '\0'; return keywordList.InList(word); } public: LexerJSON() : setOperators(CharacterSet::setNone, "[{}]:,"), setURL(CharacterSet::setAlphaNum, "-._~:/?#[]@!$&'()*+,),="), setKeywordJSONLD(CharacterSet::setAlpha, ":@"), setKeywordJSON(CharacterSet::setAlpha, "$_") { } virtual ~LexerJSON() {} virtual int SCI_METHOD Version() const { return lvOriginal; } virtual void SCI_METHOD Release() { delete this; } virtual const char *SCI_METHOD PropertyNames() { return optSetJSON.PropertyNames(); } virtual int SCI_METHOD PropertyType(const char *name) { return optSetJSON.PropertyType(name); } virtual const char *SCI_METHOD DescribeProperty(const char *name) { return optSetJSON.DescribeProperty(name); } virtual Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) { if (optSetJSON.PropertySet(&options, key, val)) { return 0; } return -1; } virtual Sci_Position SCI_METHOD WordListSet(int n, const char *wl) { WordList *wordListN = 0; switch (n) { case 0: wordListN = &keywordsJSON; break; case 1: wordListN = &keywordsJSONLD; break; } Sci_Position firstModification = -1; if (wordListN) { WordList wlNew; wlNew.Set(wl); if (*wordListN != wlNew) { wordListN->Set(wl); firstModification = 0; } } return firstModification; } virtual void *SCI_METHOD PrivateCall(int, void *) { return 0; } static ILexer *LexerFactoryJSON() { return new LexerJSON; } virtual const char *SCI_METHOD DescribeWordListSets() { return optSetJSON.DescribeWordListSets(); } virtual void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess); virtual void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess); }; void SCI_METHOD LexerJSON::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { LexAccessor styler(pAccess); StyleContext context(startPos, length, initStyle, styler); int stringStyleBefore = SCE_JSON_STRING; while (context.More()) { switch (context.state) { case SCE_JSON_BLOCKCOMMENT: if (context.Match("*/")) { context.Forward(); context.ForwardSetState(SCE_JSON_DEFAULT); } break; case SCE_JSON_LINECOMMENT: if (context.atLineEnd) { context.SetState(SCE_JSON_DEFAULT); } break; case SCE_JSON_STRINGEOL: if (context.atLineStart) { context.SetState(SCE_JSON_DEFAULT); } break; case SCE_JSON_ESCAPESEQUENCE: escapeSeq.digitsLeft--; if (!escapeSeq.atEscapeEnd()) { if (escapeSeq.isInvalidChar(context.ch)) { context.SetState(SCE_JSON_ERROR); } break; } if (context.ch == '"') { context.SetState(stringStyleBefore); context.ForwardSetState(SCE_C_DEFAULT); } else if (context.ch == '\\') { if (!escapeSeq.newSequence(context.chNext)) { context.SetState(SCE_JSON_ERROR); } context.Forward(); } else { context.SetState(stringStyleBefore); if (context.atLineEnd) { context.ChangeState(SCE_JSON_STRINGEOL); } } break; case SCE_JSON_PROPERTYNAME: case SCE_JSON_STRING: if (context.ch == '"') { if (compactIRI.shouldHighlight()) { context.ChangeState(SCE_JSON_COMPACTIRI); context.ForwardSetState(SCE_JSON_DEFAULT); compactIRI.resetState(); } else { context.ForwardSetState(SCE_JSON_DEFAULT); } } else if (context.atLineEnd) { context.ChangeState(SCE_JSON_STRINGEOL); } else if (context.ch == '\\') { stringStyleBefore = context.state; if (options.escapeSequence) { context.SetState(SCE_JSON_ESCAPESEQUENCE); if (!escapeSeq.newSequence(context.chNext)) { context.SetState(SCE_JSON_ERROR); } } context.Forward(); } else if (context.Match("https://") || context.Match("http://") || context.Match("ssh://") || context.Match("git://") || context.Match("svn://") || context.Match("ftp://") || context.Match("mailto:")) { // Handle most common URI schemes only stringStyleBefore = context.state; context.SetState(SCE_JSON_URI); } else if (context.ch == '@') { // https://www.w3.org/TR/json-ld/#dfn-keyword if (IsNextWordInList(keywordsJSONLD, setKeywordJSONLD, context, styler)) { stringStyleBefore = context.state; context.SetState(SCE_JSON_LDKEYWORD); } } else { compactIRI.checkChar(context.ch); } break; case SCE_JSON_LDKEYWORD: case SCE_JSON_URI: if ((!setKeywordJSONLD.Contains(context.ch) && (context.state == SCE_JSON_LDKEYWORD)) || (!setURL.Contains(context.ch))) { context.SetState(stringStyleBefore); } if (context.ch == '"') { context.ForwardSetState(SCE_JSON_DEFAULT); } else if (context.atLineEnd) { context.ChangeState(SCE_JSON_STRINGEOL); } break; case SCE_JSON_OPERATOR: case SCE_JSON_NUMBER: context.SetState(SCE_JSON_DEFAULT); break; case SCE_JSON_ERROR: if (context.atLineEnd) { context.SetState(SCE_JSON_DEFAULT); } break; case SCE_JSON_KEYWORD: if (!setKeywordJSON.Contains(context.ch)) { context.SetState(SCE_JSON_DEFAULT); } break; } if (context.state == SCE_JSON_DEFAULT) { if (context.ch == '"') { compactIRI.resetState(); context.SetState(SCE_JSON_STRING); Sci_Position currPos = static_cast(context.currentPos); if (AtPropertyName(styler, currPos)) { context.SetState(SCE_JSON_PROPERTYNAME); } } else if (setOperators.Contains(context.ch)) { context.SetState(SCE_JSON_OPERATOR); } else if (options.allowComments && context.Match("/*")) { context.SetState(SCE_JSON_BLOCKCOMMENT); context.Forward(); } else if (options.allowComments && context.Match("//")) { context.SetState(SCE_JSON_LINECOMMENT); } else if (setKeywordJSON.Contains(context.ch)) { if (IsNextWordInList(keywordsJSON, setKeywordJSON, context, styler)) { context.SetState(SCE_JSON_KEYWORD); } } bool numberStart = IsADigit(context.ch) && (context.chPrev == '+'|| context.chPrev == '-' || context.atLineStart || IsASpace(context.chPrev) || setOperators.Contains(context.chPrev)); bool exponentPart = tolower(context.ch) == 'e' && IsADigit(context.chPrev) && (IsADigit(context.chNext) || context.chNext == '+' || context.chNext == '-'); bool signPart = (context.ch == '-' || context.ch == '+') && ((tolower(context.chPrev) == 'e' && IsADigit(context.chNext)) || ((IsASpace(context.chPrev) || setOperators.Contains(context.chPrev)) && IsADigit(context.chNext))); bool adjacentDigit = IsADigit(context.ch) && IsADigit(context.chPrev); bool afterExponent = IsADigit(context.ch) && tolower(context.chPrev) == 'e'; bool dotPart = context.ch == '.' && IsADigit(context.chPrev) && IsADigit(context.chNext); bool afterDot = IsADigit(context.ch) && context.chPrev == '.'; if (numberStart || exponentPart || signPart || adjacentDigit || dotPart || afterExponent || afterDot) { context.SetState(SCE_JSON_NUMBER); } else if (context.state == SCE_JSON_DEFAULT && !IsASpace(context.ch)) { context.SetState(SCE_JSON_ERROR); } } context.Forward(); } context.Complete(); } void SCI_METHOD LexerJSON::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) { if (!options.fold) { return; } LexAccessor styler(pAccess); Sci_PositionU currLine = styler.GetLine(startPos); Sci_PositionU endPos = startPos + length; int currLevel = SC_FOLDLEVELBASE; if (currLine > 0) currLevel = styler.LevelAt(currLine - 1) >> 16; int nextLevel = currLevel; int visibleChars = 0; for (Sci_PositionU i = startPos; i < endPos; i++) { char curr = styler.SafeGetCharAt(i); char next = styler.SafeGetCharAt(i+1); bool atEOL = (curr == '\r' && next != '\n') || (curr == '\n'); if (styler.StyleAt(i) == SCE_JSON_OPERATOR) { if (curr == '{' || curr == '[') { nextLevel++; } else if (curr == '}' || curr == ']') { nextLevel--; } } if (atEOL || i == (endPos-1)) { int level = currLevel | nextLevel << 16; if (!visibleChars && options.foldCompact) { level |= SC_FOLDLEVELWHITEFLAG; } else if (nextLevel > currLevel) { level |= SC_FOLDLEVELHEADERFLAG; } if (level != styler.LevelAt(currLine)) { styler.SetLevel(currLine, level); } currLine++; currLevel = nextLevel; visibleChars = 0; } if (!isspacechar(curr)) { visibleChars++; } } } LexerModule lmJSON(SCLEX_JSON, LexerJSON::LexerFactoryJSON, "json", JSONWordListDesc); sqlitebrowser-3.11.2/libs/qscintilla/lexers/LexSQL.cpp000066400000000000000000000745561345112435200227360ustar00rootroot00000000000000//-*- coding: utf-8 -*- // Scintilla source code edit control /** @file LexSQL.cxx ** Lexer for SQL, including PL/SQL and SQL*Plus. ** Improved by Jérôme LAFORGE from 2010 to 2012. **/ // Copyright 1998-2012 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" #include "StyleContext.h" #include "CharacterSet.h" #include "LexerModule.h" #include "OptionSet.h" #include "SparseState.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif static inline bool IsAWordChar(int ch, bool sqlAllowDottedWord) { if (!sqlAllowDottedWord) return (ch < 0x80) && (isalnum(ch) || ch == '_'); else return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); } static inline bool IsAWordStart(int ch) { return (ch < 0x80) && (isalpha(ch) || ch == '_'); } static inline bool IsADoxygenChar(int ch) { return (islower(ch) || ch == '$' || ch == '@' || ch == '\\' || ch == '&' || ch == '<' || ch == '>' || ch == '#' || ch == '{' || ch == '}' || ch == '[' || ch == ']'); } static inline bool IsANumberChar(int ch, int chPrev) { // Not exactly following number definition (several dots are seen as OK, etc.) // but probably enough in most cases. return (ch < 0x80) && (isdigit(ch) || toupper(ch) == 'E' || ch == '.' || ((ch == '-' || ch == '+') && chPrev < 0x80 && toupper(chPrev) == 'E')); } typedef unsigned int sql_state_t; class SQLStates { public : void Set(Sci_Position lineNumber, unsigned short int sqlStatesLine) { sqlStatement.Set(lineNumber, sqlStatesLine); } sql_state_t IgnoreWhen (sql_state_t sqlStatesLine, bool enable) { if (enable) sqlStatesLine |= MASK_IGNORE_WHEN; else sqlStatesLine &= ~MASK_IGNORE_WHEN; return sqlStatesLine; } sql_state_t IntoCondition (sql_state_t sqlStatesLine, bool enable) { if (enable) sqlStatesLine |= MASK_INTO_CONDITION; else sqlStatesLine &= ~MASK_INTO_CONDITION; return sqlStatesLine; } sql_state_t IntoExceptionBlock (sql_state_t sqlStatesLine, bool enable) { if (enable) sqlStatesLine |= MASK_INTO_EXCEPTION; else sqlStatesLine &= ~MASK_INTO_EXCEPTION; return sqlStatesLine; } sql_state_t IntoDeclareBlock (sql_state_t sqlStatesLine, bool enable) { if (enable) sqlStatesLine |= MASK_INTO_DECLARE; else sqlStatesLine &= ~MASK_INTO_DECLARE; return sqlStatesLine; } sql_state_t IntoMergeStatement (sql_state_t sqlStatesLine, bool enable) { if (enable) sqlStatesLine |= MASK_MERGE_STATEMENT; else sqlStatesLine &= ~MASK_MERGE_STATEMENT; return sqlStatesLine; } sql_state_t CaseMergeWithoutWhenFound (sql_state_t sqlStatesLine, bool found) { if (found) sqlStatesLine |= MASK_CASE_MERGE_WITHOUT_WHEN_FOUND; else sqlStatesLine &= ~MASK_CASE_MERGE_WITHOUT_WHEN_FOUND; return sqlStatesLine; } sql_state_t IntoSelectStatementOrAssignment (sql_state_t sqlStatesLine, bool found) { if (found) sqlStatesLine |= MASK_INTO_SELECT_STATEMENT_OR_ASSIGNEMENT; else sqlStatesLine &= ~MASK_INTO_SELECT_STATEMENT_OR_ASSIGNEMENT; return sqlStatesLine; } sql_state_t BeginCaseBlock (sql_state_t sqlStatesLine) { if ((sqlStatesLine & MASK_NESTED_CASES) < MASK_NESTED_CASES) { sqlStatesLine++; } return sqlStatesLine; } sql_state_t EndCaseBlock (sql_state_t sqlStatesLine) { if ((sqlStatesLine & MASK_NESTED_CASES) > 0) { sqlStatesLine--; } return sqlStatesLine; } sql_state_t IntoCreateStatement (sql_state_t sqlStatesLine, bool enable) { if (enable) sqlStatesLine |= MASK_INTO_CREATE; else sqlStatesLine &= ~MASK_INTO_CREATE; return sqlStatesLine; } sql_state_t IntoCreateViewStatement (sql_state_t sqlStatesLine, bool enable) { if (enable) sqlStatesLine |= MASK_INTO_CREATE_VIEW; else sqlStatesLine &= ~MASK_INTO_CREATE_VIEW; return sqlStatesLine; } sql_state_t IntoCreateViewAsStatement (sql_state_t sqlStatesLine, bool enable) { if (enable) sqlStatesLine |= MASK_INTO_CREATE_VIEW_AS_STATEMENT; else sqlStatesLine &= ~MASK_INTO_CREATE_VIEW_AS_STATEMENT; return sqlStatesLine; } bool IsIgnoreWhen (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_IGNORE_WHEN) != 0; } bool IsIntoCondition (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_INTO_CONDITION) != 0; } bool IsIntoCaseBlock (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_NESTED_CASES) != 0; } bool IsIntoExceptionBlock (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_INTO_EXCEPTION) != 0; } bool IsIntoSelectStatementOrAssignment (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_INTO_SELECT_STATEMENT_OR_ASSIGNEMENT) != 0; } bool IsCaseMergeWithoutWhenFound (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_CASE_MERGE_WITHOUT_WHEN_FOUND) != 0; } bool IsIntoDeclareBlock (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_INTO_DECLARE) != 0; } bool IsIntoMergeStatement (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_MERGE_STATEMENT) != 0; } bool IsIntoCreateStatement (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_INTO_CREATE) != 0; } bool IsIntoCreateViewStatement (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_INTO_CREATE_VIEW) != 0; } bool IsIntoCreateViewAsStatement (sql_state_t sqlStatesLine) { return (sqlStatesLine & MASK_INTO_CREATE_VIEW_AS_STATEMENT) != 0; } sql_state_t ForLine(Sci_Position lineNumber) { return sqlStatement.ValueAt(lineNumber); } SQLStates() {} private : SparseState sqlStatement; enum { MASK_NESTED_CASES = 0x0001FF, MASK_INTO_SELECT_STATEMENT_OR_ASSIGNEMENT = 0x000200, MASK_CASE_MERGE_WITHOUT_WHEN_FOUND = 0x000400, MASK_MERGE_STATEMENT = 0x000800, MASK_INTO_DECLARE = 0x001000, MASK_INTO_EXCEPTION = 0x002000, MASK_INTO_CONDITION = 0x004000, MASK_IGNORE_WHEN = 0x008000, MASK_INTO_CREATE = 0x010000, MASK_INTO_CREATE_VIEW = 0x020000, MASK_INTO_CREATE_VIEW_AS_STATEMENT = 0x040000 }; }; // Options used for LexerSQL struct OptionsSQL { bool fold; bool foldAtElse; bool foldComment; bool foldCompact; bool foldOnlyBegin; bool sqlBackticksIdentifier; bool sqlNumbersignComment; bool sqlBackslashEscapes; bool sqlAllowDottedWord; OptionsSQL() { fold = false; foldAtElse = false; foldComment = false; foldCompact = false; foldOnlyBegin = false; sqlBackticksIdentifier = false; sqlNumbersignComment = false; sqlBackslashEscapes = false; sqlAllowDottedWord = false; } }; static const char * const sqlWordListDesc[] = { "Keywords", "Database Objects", "PLDoc", "SQL*Plus", "User Keywords 1", "User Keywords 2", "User Keywords 3", "User Keywords 4", 0 }; struct OptionSetSQL : public OptionSet { OptionSetSQL() { DefineProperty("fold", &OptionsSQL::fold); DefineProperty("fold.sql.at.else", &OptionsSQL::foldAtElse, "This option enables SQL folding on a \"ELSE\" and \"ELSIF\" line of an IF statement."); DefineProperty("fold.comment", &OptionsSQL::foldComment); DefineProperty("fold.compact", &OptionsSQL::foldCompact); DefineProperty("fold.sql.only.begin", &OptionsSQL::foldOnlyBegin); DefineProperty("lexer.sql.backticks.identifier", &OptionsSQL::sqlBackticksIdentifier); DefineProperty("lexer.sql.numbersign.comment", &OptionsSQL::sqlNumbersignComment, "If \"lexer.sql.numbersign.comment\" property is set to 0 a line beginning with '#' will not be a comment."); DefineProperty("sql.backslash.escapes", &OptionsSQL::sqlBackslashEscapes, "Enables backslash as an escape character in SQL."); DefineProperty("lexer.sql.allow.dotted.word", &OptionsSQL::sqlAllowDottedWord, "Set to 1 to colourise recognized words with dots " "(recommended for Oracle PL/SQL objects)."); DefineWordListSets(sqlWordListDesc); } }; class LexerSQL : public ILexer { public : LexerSQL() {} virtual ~LexerSQL() {} int SCI_METHOD Version () const { return lvOriginal; } void SCI_METHOD Release() { delete this; } const char * SCI_METHOD PropertyNames() { return osSQL.PropertyNames(); } int SCI_METHOD PropertyType(const char *name) { return osSQL.PropertyType(name); } const char * SCI_METHOD DescribeProperty(const char *name) { return osSQL.DescribeProperty(name); } Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) { if (osSQL.PropertySet(&options, key, val)) { return 0; } return -1; } const char * SCI_METHOD DescribeWordListSets() { return osSQL.DescribeWordListSets(); } Sci_Position SCI_METHOD WordListSet(int n, const char *wl); void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); void * SCI_METHOD PrivateCall(int, void *) { return 0; } static ILexer *LexerFactorySQL() { return new LexerSQL(); } private: bool IsStreamCommentStyle(int style) { return style == SCE_SQL_COMMENT || style == SCE_SQL_COMMENTDOC || style == SCE_SQL_COMMENTDOCKEYWORD || style == SCE_SQL_COMMENTDOCKEYWORDERROR; } bool IsCommentStyle (int style) { switch (style) { case SCE_SQL_COMMENT : case SCE_SQL_COMMENTDOC : case SCE_SQL_COMMENTLINE : case SCE_SQL_COMMENTLINEDOC : case SCE_SQL_COMMENTDOCKEYWORD : case SCE_SQL_COMMENTDOCKEYWORDERROR : return true; default : return false; } } bool IsCommentLine (Sci_Position line, LexAccessor &styler) { Sci_Position pos = styler.LineStart(line); Sci_Position eol_pos = styler.LineStart(line + 1) - 1; for (Sci_Position i = pos; i + 1 < eol_pos; i++) { int style = styler.StyleAt(i); // MySQL needs -- comments to be followed by space or control char if (style == SCE_SQL_COMMENTLINE && styler.Match(i, "--")) return true; else if (!IsASpaceOrTab(styler[i])) return false; } return false; } OptionsSQL options; OptionSetSQL osSQL; SQLStates sqlStates; WordList keywords1; WordList keywords2; WordList kw_pldoc; WordList kw_sqlplus; WordList kw_user1; WordList kw_user2; WordList kw_user3; WordList kw_user4; }; Sci_Position SCI_METHOD LexerSQL::WordListSet(int n, const char *wl) { WordList *wordListN = 0; switch (n) { case 0: wordListN = &keywords1; break; case 1: wordListN = &keywords2; break; case 2: wordListN = &kw_pldoc; break; case 3: wordListN = &kw_sqlplus; break; case 4: wordListN = &kw_user1; break; case 5: wordListN = &kw_user2; break; case 6: wordListN = &kw_user3; break; case 7: wordListN = &kw_user4; } Sci_Position firstModification = -1; if (wordListN) { WordList wlNew; wlNew.Set(wl); if (*wordListN != wlNew) { wordListN->Set(wl); firstModification = 0; } } return firstModification; } void SCI_METHOD LexerSQL::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { LexAccessor styler(pAccess); StyleContext sc(startPos, length, initStyle, styler); int styleBeforeDCKeyword = SCE_SQL_DEFAULT; Sci_Position offset = 0; for (; sc.More(); sc.Forward(), offset++) { // Determine if the current state should terminate. switch (sc.state) { case SCE_SQL_OPERATOR: sc.SetState(SCE_SQL_DEFAULT); break; case SCE_SQL_NUMBER: // We stop the number definition on non-numerical non-dot non-eE non-sign char if (!IsANumberChar(sc.ch, sc.chPrev)) { sc.SetState(SCE_SQL_DEFAULT); } break; case SCE_SQL_IDENTIFIER: if (!IsAWordChar(sc.ch, options.sqlAllowDottedWord)) { int nextState = SCE_SQL_DEFAULT; char s[1000]; sc.GetCurrentLowered(s, sizeof(s)); if (keywords1.InList(s)) { sc.ChangeState(SCE_SQL_WORD); } else if (keywords2.InList(s)) { sc.ChangeState(SCE_SQL_WORD2); } else if (kw_sqlplus.InListAbbreviated(s, '~')) { sc.ChangeState(SCE_SQL_SQLPLUS); if (strncmp(s, "rem", 3) == 0) { nextState = SCE_SQL_SQLPLUS_COMMENT; } else if (strncmp(s, "pro", 3) == 0) { nextState = SCE_SQL_SQLPLUS_PROMPT; } } else if (kw_user1.InList(s)) { sc.ChangeState(SCE_SQL_USER1); } else if (kw_user2.InList(s)) { sc.ChangeState(SCE_SQL_USER2); } else if (kw_user3.InList(s)) { sc.ChangeState(SCE_SQL_USER3); } else if (kw_user4.InList(s)) { sc.ChangeState(SCE_SQL_USER4); } sc.SetState(nextState); } break; case SCE_SQL_QUOTEDIDENTIFIER: if (sc.ch == 0x60) { if (sc.chNext == 0x60) { sc.Forward(); // Ignore it } else { sc.ForwardSetState(SCE_SQL_DEFAULT); } } break; case SCE_SQL_COMMENT: if (sc.Match('*', '/')) { sc.Forward(); sc.ForwardSetState(SCE_SQL_DEFAULT); } break; case SCE_SQL_COMMENTDOC: if (sc.Match('*', '/')) { sc.Forward(); sc.ForwardSetState(SCE_SQL_DEFAULT); } else if (sc.ch == '@' || sc.ch == '\\') { // Doxygen support // Verify that we have the conditions to mark a comment-doc-keyword if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { styleBeforeDCKeyword = SCE_SQL_COMMENTDOC; sc.SetState(SCE_SQL_COMMENTDOCKEYWORD); } } break; case SCE_SQL_COMMENTLINE: case SCE_SQL_COMMENTLINEDOC: case SCE_SQL_SQLPLUS_COMMENT: case SCE_SQL_SQLPLUS_PROMPT: if (sc.atLineStart) { sc.SetState(SCE_SQL_DEFAULT); } break; case SCE_SQL_COMMENTDOCKEYWORD: if ((styleBeforeDCKeyword == SCE_SQL_COMMENTDOC) && sc.Match('*', '/')) { sc.ChangeState(SCE_SQL_COMMENTDOCKEYWORDERROR); sc.Forward(); sc.ForwardSetState(SCE_SQL_DEFAULT); } else if (!IsADoxygenChar(sc.ch)) { char s[100]; sc.GetCurrentLowered(s, sizeof(s)); if (!isspace(sc.ch) || !kw_pldoc.InList(s + 1)) { sc.ChangeState(SCE_SQL_COMMENTDOCKEYWORDERROR); } sc.SetState(styleBeforeDCKeyword); } break; case SCE_SQL_CHARACTER: if (options.sqlBackslashEscapes && sc.ch == '\\') { sc.Forward(); } else if (sc.ch == '\'') { if (sc.chNext == '\"') { sc.Forward(); } else { sc.ForwardSetState(SCE_SQL_DEFAULT); } } break; case SCE_SQL_STRING: if (options.sqlBackslashEscapes && sc.ch == '\\') { // Escape sequence sc.Forward(); } else if (sc.ch == '\"') { if (sc.chNext == '\"') { sc.Forward(); } else { sc.ForwardSetState(SCE_SQL_DEFAULT); } } break; case SCE_SQL_QOPERATOR: // Locate the unique Q operator character sc.Complete(); char qOperator = 0x00; for (Sci_Position styleStartPos = sc.currentPos; styleStartPos > 0; --styleStartPos) { if (styler.StyleAt(styleStartPos - 1) != SCE_SQL_QOPERATOR) { qOperator = styler.SafeGetCharAt(styleStartPos + 2); break; } } char qComplement = 0x00; if (qOperator == '<') { qComplement = '>'; } else if (qOperator == '(') { qComplement = ')'; } else if (qOperator == '{') { qComplement = '}'; } else if (qOperator == '[') { qComplement = ']'; } else { qComplement = qOperator; } if (sc.Match(qComplement, '\'')) { sc.Forward(); sc.ForwardSetState(SCE_SQL_DEFAULT); } break; } // Determine if a new state should be entered. if (sc.state == SCE_SQL_DEFAULT) { if (sc.Match('q', '\'') || sc.Match('Q', '\'')) { sc.SetState(SCE_SQL_QOPERATOR); sc.Forward(); } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)) || ((sc.ch == '-' || sc.ch == '+') && IsADigit(sc.chNext) && !IsADigit(sc.chPrev))) { sc.SetState(SCE_SQL_NUMBER); } else if (IsAWordStart(sc.ch)) { sc.SetState(SCE_SQL_IDENTIFIER); } else if (sc.ch == 0x60 && options.sqlBackticksIdentifier) { sc.SetState(SCE_SQL_QUOTEDIDENTIFIER); } else if (sc.Match('/', '*')) { if (sc.Match("/**") || sc.Match("/*!")) { // Support of Doxygen doc. style sc.SetState(SCE_SQL_COMMENTDOC); } else { sc.SetState(SCE_SQL_COMMENT); } sc.Forward(); // Eat the * so it isn't used for the end of the comment } else if (sc.Match('-', '-')) { // MySQL requires a space or control char after -- // http://dev.mysql.com/doc/mysql/en/ansi-diff-comments.html // Perhaps we should enforce that with proper property: //~ } else if (sc.Match("-- ")) { sc.SetState(SCE_SQL_COMMENTLINE); } else if (sc.ch == '#' && options.sqlNumbersignComment) { sc.SetState(SCE_SQL_COMMENTLINEDOC); } else if (sc.ch == '\'') { sc.SetState(SCE_SQL_CHARACTER); } else if (sc.ch == '\"') { sc.SetState(SCE_SQL_STRING); } else if (isoperator(static_cast(sc.ch))) { sc.SetState(SCE_SQL_OPERATOR); } } } sc.Complete(); } void SCI_METHOD LexerSQL::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { if (!options.fold) return; LexAccessor styler(pAccess); Sci_PositionU endPos = startPos + length; int visibleChars = 0; Sci_Position lineCurrent = styler.GetLine(startPos); int levelCurrent = SC_FOLDLEVELBASE; if (lineCurrent > 0) { // Backtrack to previous line in case need to fix its fold status for folding block of single-line comments (i.e. '--'). Sci_Position lastNLPos = -1; // And keep going back until we find an operator ';' followed // by white-space and/or comments. This will improve folding. while (--startPos > 0) { char ch = styler[startPos]; if (ch == '\n' || (ch == '\r' && styler[startPos + 1] != '\n')) { lastNLPos = startPos; } else if (ch == ';' && styler.StyleAt(startPos) == SCE_SQL_OPERATOR) { bool isAllClear = true; for (Sci_Position tempPos = startPos + 1; tempPos < lastNLPos; ++tempPos) { int tempStyle = styler.StyleAt(tempPos); if (!IsCommentStyle(tempStyle) && tempStyle != SCE_SQL_DEFAULT) { isAllClear = false; break; } } if (isAllClear) { startPos = lastNLPos + 1; break; } } } lineCurrent = styler.GetLine(startPos); if (lineCurrent > 0) levelCurrent = styler.LevelAt(lineCurrent - 1) >> 16; } // And because folding ends at ';', keep going until we find one // Otherwise if create ... view ... as is split over multiple // lines the folding won't always update immediately. Sci_PositionU docLength = styler.Length(); for (; endPos < docLength; ++endPos) { if (styler.SafeGetCharAt(endPos) == ';') { break; } } int levelNext = levelCurrent; char chNext = styler[startPos]; int styleNext = styler.StyleAt(startPos); int style = initStyle; bool endFound = false; bool isUnfoldingIgnored = false; // this statementFound flag avoids to fold when the statement is on only one line by ignoring ELSE or ELSIF // eg. "IF condition1 THEN ... ELSIF condition2 THEN ... ELSE ... END IF;" bool statementFound = false; sql_state_t sqlStatesCurrentLine = 0; if (!options.foldOnlyBegin) { sqlStatesCurrentLine = sqlStates.ForLine(lineCurrent); } for (Sci_PositionU i = startPos; i < endPos; i++) { char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); int stylePrev = style; style = styleNext; styleNext = styler.StyleAt(i + 1); bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); if (atEOL || (!IsCommentStyle(style) && ch == ';')) { if (endFound) { //Maybe this is the end of "EXCEPTION" BLOCK (eg. "BEGIN ... EXCEPTION ... END;") sqlStatesCurrentLine = sqlStates.IntoExceptionBlock(sqlStatesCurrentLine, false); } // set endFound and isUnfoldingIgnored to false if EOL is reached or ';' is found endFound = false; isUnfoldingIgnored = false; } if ((!IsCommentStyle(style) && ch == ';')) { if (sqlStates.IsIntoMergeStatement(sqlStatesCurrentLine)) { // This is the end of "MERGE" statement. if (!sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine)) levelNext--; sqlStatesCurrentLine = sqlStates.IntoMergeStatement(sqlStatesCurrentLine, false); levelNext--; } if (sqlStates.IsIntoSelectStatementOrAssignment(sqlStatesCurrentLine)) sqlStatesCurrentLine = sqlStates.IntoSelectStatementOrAssignment(sqlStatesCurrentLine, false); if (sqlStates.IsIntoCreateStatement(sqlStatesCurrentLine)) { if (sqlStates.IsIntoCreateViewStatement(sqlStatesCurrentLine)) { if (sqlStates.IsIntoCreateViewAsStatement(sqlStatesCurrentLine)) { levelNext--; sqlStatesCurrentLine = sqlStates.IntoCreateViewAsStatement(sqlStatesCurrentLine, false); } sqlStatesCurrentLine = sqlStates.IntoCreateViewStatement(sqlStatesCurrentLine, false); } sqlStatesCurrentLine = sqlStates.IntoCreateStatement(sqlStatesCurrentLine, false); } } if (ch == ':' && chNext == '=' && !IsCommentStyle(style)) sqlStatesCurrentLine = sqlStates.IntoSelectStatementOrAssignment(sqlStatesCurrentLine, true); if (options.foldComment && IsStreamCommentStyle(style)) { if (!IsStreamCommentStyle(stylePrev)) { levelNext++; } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { // Comments don't end at end of line and the next character may be unstyled. levelNext--; } } if (options.foldComment && (style == SCE_SQL_COMMENTLINE)) { // MySQL needs -- comments to be followed by space or control char if ((ch == '-') && (chNext == '-')) { char chNext2 = styler.SafeGetCharAt(i + 2); char chNext3 = styler.SafeGetCharAt(i + 3); if (chNext2 == '{' || chNext3 == '{') { levelNext++; } else if (chNext2 == '}' || chNext3 == '}') { levelNext--; } } } // Fold block of single-line comments (i.e. '--'). if (options.foldComment && atEOL && IsCommentLine(lineCurrent, styler)) { if (!IsCommentLine(lineCurrent - 1, styler) && IsCommentLine(lineCurrent + 1, styler)) levelNext++; else if (IsCommentLine(lineCurrent - 1, styler) && !IsCommentLine(lineCurrent + 1, styler)) levelNext--; } if (style == SCE_SQL_OPERATOR) { if (ch == '(') { if (levelCurrent > levelNext) levelCurrent--; levelNext++; } else if (ch == ')') { levelNext--; } else if ((!options.foldOnlyBegin) && ch == ';') { sqlStatesCurrentLine = sqlStates.IgnoreWhen(sqlStatesCurrentLine, false); } } // If new keyword (cannot trigger on elseif or nullif, does less tests) if (style == SCE_SQL_WORD && stylePrev != SCE_SQL_WORD) { const int MAX_KW_LEN = 9; // Maximum length of folding keywords char s[MAX_KW_LEN + 2]; unsigned int j = 0; for (; j < MAX_KW_LEN + 1; j++) { if (!iswordchar(styler[i + j])) { break; } s[j] = static_cast(tolower(styler[i + j])); } if (j == MAX_KW_LEN + 1) { // Keyword too long, don't test it s[0] = '\0'; } else { s[j] = '\0'; } if (!options.foldOnlyBegin && strcmp(s, "select") == 0) { sqlStatesCurrentLine = sqlStates.IntoSelectStatementOrAssignment(sqlStatesCurrentLine, true); } else if (strcmp(s, "if") == 0) { if (endFound) { endFound = false; if (options.foldOnlyBegin && !isUnfoldingIgnored) { // this end isn't for begin block, but for if block ("end if;") // so ignore previous "end" by increment levelNext. levelNext++; } } else { if (!options.foldOnlyBegin) sqlStatesCurrentLine = sqlStates.IntoCondition(sqlStatesCurrentLine, true); if (levelCurrent > levelNext) { // doesn't include this line into the folding block // because doesn't hide IF (eg "END; IF") levelCurrent = levelNext; } } } else if (!options.foldOnlyBegin && strcmp(s, "then") == 0 && sqlStates.IsIntoCondition(sqlStatesCurrentLine)) { sqlStatesCurrentLine = sqlStates.IntoCondition(sqlStatesCurrentLine, false); if (!options.foldOnlyBegin) { if (levelCurrent > levelNext) { levelCurrent = levelNext; } if (!statementFound) levelNext++; statementFound = true; } else if (levelCurrent > levelNext) { // doesn't include this line into the folding block // because doesn't hide LOOP or CASE (eg "END; LOOP" or "END; CASE") levelCurrent = levelNext; } } else if (strcmp(s, "loop") == 0 || strcmp(s, "case") == 0) { if (endFound) { endFound = false; if (options.foldOnlyBegin && !isUnfoldingIgnored) { // this end isn't for begin block, but for loop block ("end loop;") or case block ("end case;") // so ignore previous "end" by increment levelNext. levelNext++; } if ((!options.foldOnlyBegin) && strcmp(s, "case") == 0) { sqlStatesCurrentLine = sqlStates.EndCaseBlock(sqlStatesCurrentLine); if (!sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine)) levelNext--; //again for the "end case;" and block when } } else if (!options.foldOnlyBegin) { if (strcmp(s, "case") == 0) { sqlStatesCurrentLine = sqlStates.BeginCaseBlock(sqlStatesCurrentLine); sqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, true); } if (levelCurrent > levelNext) levelCurrent = levelNext; if (!statementFound) levelNext++; statementFound = true; } else if (levelCurrent > levelNext) { // doesn't include this line into the folding block // because doesn't hide LOOP or CASE (eg "END; LOOP" or "END; CASE") levelCurrent = levelNext; } } else if ((!options.foldOnlyBegin) && ( // folding for ELSE and ELSIF block only if foldAtElse is set // and IF or CASE aren't on only one line with ELSE or ELSIF (with flag statementFound) options.foldAtElse && !statementFound) && strcmp(s, "elsif") == 0) { sqlStatesCurrentLine = sqlStates.IntoCondition(sqlStatesCurrentLine, true); levelCurrent--; levelNext--; } else if ((!options.foldOnlyBegin) && ( // folding for ELSE and ELSIF block only if foldAtElse is set // and IF or CASE aren't on only one line with ELSE or ELSIF (with flag statementFound) options.foldAtElse && !statementFound) && strcmp(s, "else") == 0) { // prevent also ELSE is on the same line (eg. "ELSE ... END IF;") statementFound = true; if (sqlStates.IsIntoCaseBlock(sqlStatesCurrentLine) && sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine)) { sqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, false); levelNext++; } else { // we are in same case "} ELSE {" in C language levelCurrent--; } } else if (strcmp(s, "begin") == 0) { levelNext++; sqlStatesCurrentLine = sqlStates.IntoDeclareBlock(sqlStatesCurrentLine, false); } else if ((strcmp(s, "end") == 0) || // SQL Anywhere permits IF ... ELSE ... ENDIF // will only be active if "endif" appears in the // keyword list. (strcmp(s, "endif") == 0)) { endFound = true; levelNext--; if (sqlStates.IsIntoSelectStatementOrAssignment(sqlStatesCurrentLine) && !sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine)) levelNext--; if (levelNext < SC_FOLDLEVELBASE) { levelNext = SC_FOLDLEVELBASE; isUnfoldingIgnored = true; } } else if ((!options.foldOnlyBegin) && strcmp(s, "when") == 0 && !sqlStates.IsIgnoreWhen(sqlStatesCurrentLine) && !sqlStates.IsIntoExceptionBlock(sqlStatesCurrentLine) && ( sqlStates.IsIntoCaseBlock(sqlStatesCurrentLine) || sqlStates.IsIntoMergeStatement(sqlStatesCurrentLine) ) ) { sqlStatesCurrentLine = sqlStates.IntoCondition(sqlStatesCurrentLine, true); // Don't foldind when CASE and WHEN are on the same line (with flag statementFound) (eg. "CASE selector WHEN expression1 THEN sequence_of_statements1;\n") // and same way for MERGE statement. if (!statementFound) { if (!sqlStates.IsCaseMergeWithoutWhenFound(sqlStatesCurrentLine)) { levelCurrent--; levelNext--; } sqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, false); } } else if ((!options.foldOnlyBegin) && strcmp(s, "exit") == 0) { sqlStatesCurrentLine = sqlStates.IgnoreWhen(sqlStatesCurrentLine, true); } else if ((!options.foldOnlyBegin) && !sqlStates.IsIntoDeclareBlock(sqlStatesCurrentLine) && strcmp(s, "exception") == 0) { sqlStatesCurrentLine = sqlStates.IntoExceptionBlock(sqlStatesCurrentLine, true); } else if ((!options.foldOnlyBegin) && (strcmp(s, "declare") == 0 || strcmp(s, "function") == 0 || strcmp(s, "procedure") == 0 || strcmp(s, "package") == 0)) { sqlStatesCurrentLine = sqlStates.IntoDeclareBlock(sqlStatesCurrentLine, true); } else if ((!options.foldOnlyBegin) && strcmp(s, "merge") == 0) { sqlStatesCurrentLine = sqlStates.IntoMergeStatement(sqlStatesCurrentLine, true); sqlStatesCurrentLine = sqlStates.CaseMergeWithoutWhenFound(sqlStatesCurrentLine, true); levelNext++; statementFound = true; } else if ((!options.foldOnlyBegin) && strcmp(s, "create") == 0) { sqlStatesCurrentLine = sqlStates.IntoCreateStatement(sqlStatesCurrentLine, true); } else if ((!options.foldOnlyBegin) && strcmp(s, "view") == 0 && sqlStates.IsIntoCreateStatement(sqlStatesCurrentLine)) { sqlStatesCurrentLine = sqlStates.IntoCreateViewStatement(sqlStatesCurrentLine, true); } else if ((!options.foldOnlyBegin) && strcmp(s, "as") == 0 && sqlStates.IsIntoCreateViewStatement(sqlStatesCurrentLine) && ! sqlStates.IsIntoCreateViewAsStatement(sqlStatesCurrentLine)) { sqlStatesCurrentLine = sqlStates.IntoCreateViewAsStatement(sqlStatesCurrentLine, true); levelNext++; } } if (atEOL) { int levelUse = levelCurrent; int lev = levelUse | levelNext << 16; if (visibleChars == 0 && options.foldCompact) lev |= SC_FOLDLEVELWHITEFLAG; if (levelUse < levelNext) lev |= SC_FOLDLEVELHEADERFLAG; if (lev != styler.LevelAt(lineCurrent)) { styler.SetLevel(lineCurrent, lev); } lineCurrent++; levelCurrent = levelNext; visibleChars = 0; statementFound = false; if (!options.foldOnlyBegin) sqlStates.Set(lineCurrent, sqlStatesCurrentLine); } if (!isspacechar(ch)) { visibleChars++; } } } LexerModule lmSQL(SCLEX_SQL, LexerSQL::LexerFactorySQL, "sql", sqlWordListDesc); sqlitebrowser-3.11.2/libs/qscintilla/lexers/License.txt000066400000000000000000000015441345112435200232300ustar00rootroot00000000000000License for Scintilla and SciTE Copyright 1998-2003 by Neil Hodgson All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. sqlitebrowser-3.11.2/libs/qscintilla/lexlib/000077500000000000000000000000001345112435200210565ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qscintilla/lexlib/Accessor.cpp000066400000000000000000000043411345112435200233260ustar00rootroot00000000000000// Scintilla source code edit control /** @file Accessor.cxx ** Interfaces between Scintilla and lexers. **/ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "PropSetSimple.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif Accessor::Accessor(IDocument *pAccess_, PropSetSimple *pprops_) : LexAccessor(pAccess_), pprops(pprops_) { } int Accessor::GetPropertyInt(const char *key, int defaultValue) const { return pprops->GetInt(key, defaultValue); } int Accessor::IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { Sci_Position end = Length(); int spaceFlags = 0; // Determines the indentation level of the current line and also checks for consistent // indentation compared to the previous line. // Indentation is judged consistent when the indentation whitespace of each line lines // the same or the indentation of one line is a prefix of the other. Sci_Position pos = LineStart(line); char ch = (*this)[pos]; int indent = 0; bool inPrevPrefix = line > 0; Sci_Position posPrev = inPrevPrefix ? LineStart(line-1) : 0; while ((ch == ' ' || ch == '\t') && (pos < end)) { if (inPrevPrefix) { char chPrev = (*this)[posPrev++]; if (chPrev == ' ' || chPrev == '\t') { if (chPrev != ch) spaceFlags |= wsInconsistent; } else { inPrevPrefix = false; } } if (ch == ' ') { spaceFlags |= wsSpace; indent++; } else { // Tab spaceFlags |= wsTab; if (spaceFlags & wsSpace) spaceFlags |= wsSpaceTab; indent = (indent / 8 + 1) * 8; } ch = (*this)[++pos]; } *flags = spaceFlags; indent += SC_FOLDLEVELBASE; // if completely empty line or the start of a comment... if ((LineStart(line) == Length()) || (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos))) return indent | SC_FOLDLEVELWHITEFLAG; else return indent; } sqlitebrowser-3.11.2/libs/qscintilla/lexlib/Accessor.h000066400000000000000000000015651345112435200230000ustar00rootroot00000000000000// Scintilla source code edit control /** @file Accessor.h ** Interfaces between Scintilla and lexers. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef ACCESSOR_H #define ACCESSOR_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif enum { wsSpace=1, wsTab=2, wsSpaceTab=4, wsInconsistent=8 }; class Accessor; class WordList; class PropSetSimple; typedef bool (*PFNIsCommentLeader)(Accessor &styler, Sci_Position pos, Sci_Position len); class Accessor : public LexAccessor { public: PropSetSimple *pprops; Accessor(IDocument *pAccess_, PropSetSimple *pprops_); int GetPropertyInt(const char *, int defaultValue=0) const; int IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/CharacterCategory.cpp000066400000000000000000000663361345112435200251720ustar00rootroot00000000000000// Scintilla source code edit control /** @file CharacterCategory.cxx ** Returns the Unicode general category of a character. ** Table automatically regenerated by scripts/GenerateCharacterCategory.py ** Should only be rarely regenerated for new versions of Unicode. **/ // Copyright 2013 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include "StringCopy.h" #include "CharacterCategory.h" #ifdef SCI_NAMESPACE namespace Scintilla { #endif namespace { // Use an unnamed namespace to protect the declarations from name conflicts const int catRanges[] = { //++Autogenerated -- start of section automatically generated // Created with Python 3.3.0, Unicode 6.1.0 25, 1046, 1073, 1171, 1201, 1293, 1326, 1361, 1394, 1425, 1452, 1489, 1544, 1873, 1938, 2033, 2080, 2925, 2961, 2990, 3028, 3051, 3092, 3105, 3949, 3986, 4014, 4050, 4089, 5142, 5169, 5203, 5333, 5361, 5396, 5429, 5444, 5487, 5522, 5562, 5589, 5620, 5653, 5682, 5706, 5780, 5793, 5841, 5908, 5930, 5956, 6000, 6026, 6129, 6144, 6898, 6912, 7137, 7922, 7937, 8192, 8225, 8256, 8289, 8320, 8353, 8384, 8417, 8448, 8481, 8512, 8545, 8576, 8609, 8640, 8673, 8704, 8737, 8768, 8801, 8832, 8865, 8896, 8929, 8960, 8993, 9024, 9057, 9088, 9121, 9152, 9185, 9216, 9249, 9280, 9313, 9344, 9377, 9408, 9441, 9472, 9505, 9536, 9569, 9600, 9633, 9664, 9697, 9728, 9761, 9792, 9825, 9856, 9889, 9920, 9953, 10016, 10049, 10080, 10113, 10144, 10177, 10208, 10241, 10272, 10305, 10336, 10369, 10400, 10433, 10464, 10497, 10560, 10593, 10624, 10657, 10688, 10721, 10752, 10785, 10816, 10849, 10880, 10913, 10944, 10977, 11008, 11041, 11072, 11105, 11136, 11169, 11200, 11233, 11264, 11297, 11328, 11361, 11392, 11425, 11456, 11489, 11520, 11553, 11584, 11617, 11648, 11681, 11712, 11745, 11776, 11809, 11840, 11873, 11904, 11937, 11968, 12001, 12032, 12097, 12128, 12161, 12192, 12225, 12320, 12385, 12416, 12449, 12480, 12545, 12576, 12673, 12736, 12865, 12896, 12961, 12992, 13089, 13184, 13249, 13280, 13345, 13376, 13409, 13440, 13473, 13504, 13569, 13600, 13633, 13696, 13729, 13760, 13825, 13856, 13953, 13984, 14017, 14048, 14113, 14180, 14208, 14241, 14340, 14464, 14498, 14529, 14560, 14594, 14625, 14656, 14690, 14721, 14752, 14785, 14816, 14849, 14880, 14913, 14944, 14977, 15008, 15041, 15072, 15105, 15136, 15169, 15200, 15233, 15296, 15329, 15360, 15393, 15424, 15457, 15488, 15521, 15552, 15585, 15616, 15649, 15680, 15713, 15744, 15777, 15808, 15841, 15904, 15938, 15969, 16000, 16033, 16064, 16161, 16192, 16225, 16256, 16289, 16320, 16353, 16384, 16417, 16448, 16481, 16512, 16545, 16576, 16609, 16640, 16673, 16704, 16737, 16768, 16801, 16832, 16865, 16896, 16929, 16960, 16993, 17024, 17057, 17088, 17121, 17152, 17185, 17216, 17249, 17280, 17313, 17344, 17377, 17408, 17441, 17472, 17505, 17536, 17569, 17600, 17633, 17664, 17697, 17728, 17761, 17792, 17825, 17856, 17889, 17920, 17953, 17984, 18017, 18240, 18305, 18336, 18401, 18464, 18497, 18528, 18657, 18688, 18721, 18752, 18785, 18816, 18849, 18880, 18913, 21124, 21153, 22019, 22612, 22723, 23124, 23555, 23732, 23939, 23988, 24003, 24052, 24581, 28160, 28193, 28224, 28257, 28291, 28340, 28352, 28385, 28445, 28483, 28513, 28625, 28669, 28820, 28864, 28913, 28928, 29053, 29056, 29117, 29120, 29185, 29216, 29789, 29792, 30081, 31200, 31233, 31296, 31393, 31488, 31521, 31552, 31585, 31616, 31649, 31680, 31713, 31744, 31777, 31808, 31841, 31872, 31905, 31936, 31969, 32000, 32033, 32064, 32097, 32128, 32161, 32192, 32225, 32384, 32417, 32466, 32480, 32513, 32544, 32609, 32672, 34305, 35840, 35873, 35904, 35937, 35968, 36001, 36032, 36065, 36096, 36129, 36160, 36193, 36224, 36257, 36288, 36321, 36352, 36385, 36416, 36449, 36480, 36513, 36544, 36577, 36608, 36641, 36672, 36705, 36736, 36769, 36800, 36833, 36864, 36897, 36949, 36965, 37127, 37184, 37217, 37248, 37281, 37312, 37345, 37376, 37409, 37440, 37473, 37504, 37537, 37568, 37601, 37632, 37665, 37696, 37729, 37760, 37793, 37824, 37857, 37888, 37921, 37952, 37985, 38016, 38049, 38080, 38113, 38144, 38177, 38208, 38241, 38272, 38305, 38336, 38369, 38400, 38433, 38464, 38497, 38528, 38561, 38592, 38625, 38656, 38689, 38720, 38753, 38784, 38817, 38848, 38881, 38912, 38977, 39008, 39041, 39072, 39105, 39136, 39169, 39200, 39233, 39264, 39297, 39328, 39361, 39424, 39457, 39488, 39521, 39552, 39585, 39616, 39649, 39680, 39713, 39744, 39777, 39808, 39841, 39872, 39905, 39936, 39969, 40000, 40033, 40064, 40097, 40128, 40161, 40192, 40225, 40256, 40289, 40320, 40353, 40384, 40417, 40448, 40481, 40512, 40545, 40576, 40609, 40640, 40673, 40704, 40737, 40768, 40801, 40832, 40865, 40896, 40929, 40960, 40993, 41024, 41057, 41088, 41121, 41152, 41185, 41216, 41249, 41280, 41313, 41344, 41377, 41408, 41441, 41472, 41505, 41536, 41569, 41600, 41633, 41664, 41697, 41728, 41761, 41792, 41825, 41856, 41889, 41920, 41953, 41984, 42017, 42048, 42081, 42112, 42145, 42176, 42209, 42269, 42528, 43773, 43811, 43857, 44061, 44065, 45341, 45361, 45388, 45437, 45555, 45597, 45605, 47052, 47077, 47121, 47141, 47217, 47237, 47313, 47333, 47389, 47620, 48509, 48644, 48753, 48829, 49178, 49341, 49362, 49457, 49523, 49553, 49621, 49669, 50033, 50077, 50129, 50180, 51203, 51236, 51557, 52232, 52561, 52676, 52741, 52772, 55953, 55972, 56005, 56250, 56277, 56293, 56483, 56549, 56629, 56645, 56772, 56840, 57156, 57269, 57316, 57361, 57821, 57850, 57860, 57893, 57924, 58885, 59773, 59812, 62661, 63012, 63069, 63496, 63812, 64869, 65155, 65237, 65265, 65347, 65405, 65540, 66245, 66371, 66405, 66691, 66725, 66819, 66853, 67037, 67089, 67581, 67588, 68389, 68509, 68561, 68605, 70660, 70717, 70724, 71101, 72837, 73725, 73733, 73830, 73860, 75589, 75622, 75653, 75684, 75718, 75813, 76070, 76197, 76230, 76292, 76325, 76548, 76869, 76945, 77000, 77329, 77347, 77380, 77597, 77604, 77853, 77861, 77894, 77981, 77988, 78269, 78308, 78397, 78436, 79165, 79172, 79421, 79428, 79485, 79556, 79709, 79749, 79780, 79814, 79909, 80061, 80102, 80189, 80230, 80293, 80324, 80381, 80614, 80669, 80772, 80861, 80868, 80965, 81053, 81096, 81412, 81491, 81546, 81749, 81779, 81821, 81957, 82022, 82077, 82084, 82301, 82404, 82493, 82532, 83261, 83268, 83517, 83524, 83613, 83620, 83709, 83716, 83805, 83845, 83901, 83910, 84005, 84093, 84197, 84285, 84325, 84445, 84517, 84573, 84772, 84925, 84932, 84989, 85192, 85509, 85572, 85669, 85725, 86053, 86118, 86173, 86180, 86493, 86500, 86621, 86628, 87357, 87364, 87613, 87620, 87709, 87716, 87901, 87941, 87972, 88006, 88101, 88285, 88293, 88358, 88413, 88422, 88485, 88541, 88580, 88637, 89092, 89157, 89245, 89288, 89617, 89651, 89693, 90149, 90182, 90269, 90276, 90557, 90596, 90685, 90724, 91453, 91460, 91709, 91716, 91805, 91812, 91997, 92037, 92068, 92102, 92133, 92166, 92197, 92349, 92390, 92477, 92518, 92581, 92637, 92869, 92902, 92957, 93060, 93149, 93156, 93253, 93341, 93384, 93717, 93732, 93770, 93981, 94277, 94308, 94365, 94372, 94589, 94660, 94781, 94788, 94941, 95012, 95101, 95108, 95165, 95172, 95261, 95332, 95421, 95492, 95613, 95684, 96093, 96198, 96261, 96294, 96381, 96454, 96573, 96582, 96677, 96733, 96772, 96829, 96998, 97053, 97480, 97802, 97909, 98099, 98133, 98173, 98342, 98461, 98468, 98749, 98756, 98877, 98884, 99645, 99652, 99997, 100004, 100189, 100260, 100293, 100390, 100541, 100549, 100669, 100677, 100829, 101029, 101117, 101124, 101213, 101380, 101445, 101533, 101576, 101917, 102154, 102389, 102429, 102470, 102557, 102564, 102845, 102852, 102973, 102980, 103741, 103748, 104093, 104100, 104285, 104325, 104356, 104390, 104421, 104454, 104637, 104645, 104678, 104765, 104774, 104837, 104925, 105126, 105213, 105412, 105469, 105476, 105541, 105629, 105672, 106013, 106020, 106109, 106566, 106653, 106660, 106941, 106948, 107069, 107076, 108413, 108452, 108486, 108581, 108733, 108742, 108861, 108870, 108965, 108996, 109053, 109286, 109341, 109572, 109637, 109725, 109768, 110090, 110301, 110389, 110404, 110621, 110662, 110749, 110756, 111357, 111428, 112221, 112228, 112541, 112548, 112605, 112644, 112893, 112965, 113021, 113126, 113221, 113341, 113349, 113405, 113414, 113693, 114246, 114321, 114365, 114724, 116261, 116292, 116357, 116605, 116723, 116740, 116931, 116965, 117233, 117256, 117585, 117661, 118820, 118909, 118916, 118973, 119012, 119101, 119108, 119165, 119204, 119261, 119428, 119581, 119588, 119837, 119844, 119965, 119972, 120029, 120036, 120093, 120132, 120221, 120228, 120357, 120388, 120453, 120669, 120677, 120740, 120797, 120836, 121021, 121027, 121085, 121093, 121309, 121352, 121693, 121732, 121885, 122884, 122933, 123025, 123509, 123537, 123573, 123653, 123733, 123912, 124234, 124565, 124581, 124629, 124645, 124693, 124709, 124749, 124782, 124813, 124846, 124870, 124932, 125213, 125220, 126397, 126501, 126950, 126981, 127153, 127173, 127236, 127397, 127773, 127781, 128957, 128981, 129221, 129269, 129469, 129493, 129553, 129717, 129841, 129917, 131076, 132454, 132517, 132646, 132677, 132870, 132901, 132966, 133029, 133092, 133128, 133457, 133636, 133830, 133893, 133956, 134085, 134180, 134214, 134308, 134374, 134596, 134693, 134820, 135237, 135270, 135333, 135398, 135589, 135620, 135654, 135688, 136006, 136101, 136149, 136192, 137437, 137440, 137501, 137632, 137693, 137732, 139121, 139139, 139172, 149821, 149828, 149981, 150020, 150269, 150276, 150333, 150340, 150493, 150532, 151869, 151876, 152029, 152068, 153149, 153156, 153309, 153348, 153597, 153604, 153661, 153668, 153821, 153860, 154365, 154372, 156221, 156228, 156381, 156420, 158589, 158629, 158737, 159018, 159677, 159748, 160277, 160605, 160772, 163517, 163852, 163876, 183729, 183780, 184342, 184356, 185197, 185230, 185277, 185348, 187761, 187849, 187965, 188420, 188861, 188868, 188997, 189117, 189444, 190021, 190129, 190205, 190468, 191045, 191133, 191492, 191933, 191940, 192061, 192069, 192157, 192516, 194181, 194246, 194277, 194502, 194757, 194790, 194853, 195217, 195299, 195345, 195443, 195460, 195493, 195549, 195592, 195933, 196106, 196445, 196625, 196812, 196849, 196965, 197078, 197117, 197128, 197469, 197636, 198755, 198788, 200477, 200708, 202021, 202052, 202109, 202244, 204509, 204804, 205757, 205829, 205926, 206053, 206118, 206237, 206342, 206405, 206438, 206629, 206749, 206869, 206909, 206993, 207048, 207364, 208349, 208388, 208573, 208900, 210333, 210438, 210980, 211206, 211293, 211464, 211786, 211837, 211925, 212996, 213733, 213798, 213917, 213969, 214020, 215718, 215749, 215782, 215813, 216061, 216069, 216102, 216133, 216166, 216229, 216486, 216677, 217021, 217061, 217096, 217437, 217608, 217949, 218129, 218339, 218385, 218589, 221189, 221318, 221348, 222853, 222886, 222917, 223078, 223109, 223142, 223301, 223334, 223396, 223645, 223752, 224081, 224309, 224613, 224917, 225213, 225285, 225350, 225380, 226342, 226373, 226502, 226565, 226630, 226661, 226694, 226756, 226824, 227140, 228549, 228582, 228613, 228678, 228773, 228806, 228837, 228934, 229021, 229265, 229380, 230534, 230789, 231046, 231109, 231197, 231281, 231432, 231773, 231844, 231944, 232260, 233219, 233425, 233501, 235537, 235805, 236037, 236145, 236165, 236582, 236613, 236836, 236965, 236996, 237126, 237189, 237220, 237309, 237569, 238979, 240993, 241411, 241441, 242531, 243717, 244989, 245637, 245760, 245793, 245824, 245857, 245888, 245921, 245952, 245985, 246016, 246049, 246080, 246113, 246144, 246177, 246208, 246241, 246272, 246305, 246336, 246369, 246400, 246433, 246464, 246497, 246528, 246561, 246592, 246625, 246656, 246689, 246720, 246753, 246784, 246817, 246848, 246881, 246912, 246945, 246976, 247009, 247040, 247073, 247104, 247137, 247168, 247201, 247232, 247265, 247296, 247329, 247360, 247393, 247424, 247457, 247488, 247521, 247552, 247585, 247616, 247649, 247680, 247713, 247744, 247777, 247808, 247841, 247872, 247905, 247936, 247969, 248000, 248033, 248064, 248097, 248128, 248161, 248192, 248225, 248256, 248289, 248320, 248353, 248384, 248417, 248448, 248481, 248512, 248545, 248576, 248609, 248640, 248673, 248704, 248737, 248768, 248801, 248832, 248865, 248896, 248929, 248960, 248993, 249024, 249057, 249088, 249121, 249152, 249185, 249216, 249249, 249280, 249313, 249344, 249377, 249408, 249441, 249472, 249505, 249536, 249569, 249600, 249633, 249664, 249697, 249728, 249761, 249792, 249825, 249856, 249889, 249920, 249953, 249984, 250017, 250048, 250081, 250112, 250145, 250176, 250209, 250240, 250273, 250304, 250337, 250368, 250401, 250432, 250465, 250496, 250529, 250816, 250849, 250880, 250913, 250944, 250977, 251008, 251041, 251072, 251105, 251136, 251169, 251200, 251233, 251264, 251297, 251328, 251361, 251392, 251425, 251456, 251489, 251520, 251553, 251584, 251617, 251648, 251681, 251712, 251745, 251776, 251809, 251840, 251873, 251904, 251937, 251968, 252001, 252032, 252065, 252096, 252129, 252160, 252193, 252224, 252257, 252288, 252321, 252352, 252385, 252416, 252449, 252480, 252513, 252544, 252577, 252608, 252641, 252672, 252705, 252736, 252769, 252800, 252833, 252864, 252897, 252928, 252961, 252992, 253025, 253056, 253089, 253120, 253153, 253184, 253217, 253248, 253281, 253312, 253345, 253376, 253409, 253440, 253473, 253504, 253537, 253568, 253601, 253632, 253665, 253696, 253729, 253760, 253793, 253824, 253857, 253888, 253921, 254208, 254465, 254685, 254720, 254941, 254977, 255232, 255489, 255744, 256001, 256221, 256256, 256477, 256513, 256797, 256800, 256861, 256864, 256925, 256928, 256989, 256992, 257025, 257280, 257537, 258013, 258049, 258306, 258561, 258818, 259073, 259330, 259585, 259773, 259777, 259840, 259970, 260020, 260033, 260084, 260161, 260285, 260289, 260352, 260482, 260532, 260609, 260765, 260801, 260864, 261021, 261044, 261121, 261376, 261556, 261661, 261697, 261821, 261825, 261888, 262018, 262068, 262141, 262166, 262522, 262668, 262865, 262927, 262960, 262989, 263023, 263088, 263117, 263151, 263185, 263447, 263480, 263514, 263670, 263697, 263983, 264016, 264049, 264171, 264241, 264338, 264365, 264398, 264433, 264786, 264817, 264843, 264881, 265206, 265242, 265405, 265562, 265738, 265763, 265821, 265866, 266066, 266157, 266190, 266211, 266250, 266578, 266669, 266702, 266749, 266755, 267197, 267283, 268125, 268805, 269223, 269349, 269383, 269477, 269885, 270357, 270400, 270453, 270560, 270613, 270657, 270688, 270785, 270848, 270945, 270997, 271008, 271061, 271122, 271136, 271317, 271488, 271541, 271552, 271605, 271616, 271669, 271680, 271829, 271841, 271872, 272001, 272036, 272161, 272213, 272257, 272320, 272402, 272544, 272577, 272725, 272754, 272789, 272833, 272885, 272906, 273417, 274528, 274561, 274601, 274730, 274781, 274962, 275125, 275282, 275349, 275474, 275509, 275570, 275605, 275666, 275701, 275922, 275957, 276946, 277013, 277074, 277109, 277138, 277173, 278162, 286741, 286994, 287125, 287762, 287829, 288045, 288078, 288117, 290706, 290741, 291698, 292501, 293778, 293973, 294557, 294933, 296189, 296981, 297341, 297994, 299925, 302410, 303125, 308978, 309013, 309298, 309333, 311058, 311317, 314866, 314901, 319517, 319541, 322829, 322862, 322893, 322926, 322957, 322990, 323021, 323054, 323085, 323118, 323149, 323182, 323213, 323246, 323274, 324245, 325650, 325805, 325838, 325874, 326861, 326894, 326925, 326958, 326989, 327022, 327053, 327086, 327117, 327150, 327186, 327701, 335890, 340077, 340110, 340141, 340174, 340205, 340238, 340269, 340302, 340333, 340366, 340397, 340430, 340461, 340494, 340525, 340558, 340589, 340622, 340653, 340686, 340717, 340750, 340786, 342797, 342830, 342861, 342894, 342930, 343949, 343982, 344018, 352277, 353810, 354485, 354546, 354749, 354837, 355165, 360448, 361981, 361985, 363517, 363520, 363553, 363584, 363681, 363744, 363777, 363808, 363841, 363872, 363905, 363936, 364065, 364096, 364129, 364192, 364225, 364419, 364480, 364577, 364608, 364641, 364672, 364705, 364736, 364769, 364800, 364833, 364864, 364897, 364928, 364961, 364992, 365025, 365056, 365089, 365120, 365153, 365184, 365217, 365248, 365281, 365312, 365345, 365376, 365409, 365440, 365473, 365504, 365537, 365568, 365601, 365632, 365665, 365696, 365729, 365760, 365793, 365824, 365857, 365888, 365921, 365952, 365985, 366016, 366049, 366080, 366113, 366144, 366177, 366208, 366241, 366272, 366305, 366336, 366369, 366400, 366433, 366464, 366497, 366528, 366561, 366592, 366625, 366656, 366689, 366720, 366753, 366784, 366817, 366848, 366881, 366912, 366945, 366976, 367009, 367040, 367073, 367104, 367137, 367168, 367201, 367232, 367265, 367296, 367329, 367360, 367393, 367424, 367457, 367488, 367521, 367552, 367585, 367616, 367649, 367680, 367713, 367797, 367968, 368001, 368032, 368065, 368101, 368192, 368225, 368285, 368433, 368554, 368593, 368641, 369885, 369889, 369949, 370081, 370141, 370180, 371997, 372195, 372241, 372285, 372709, 372740, 373501, 373764, 374013, 374020, 374269, 374276, 374525, 374532, 374781, 374788, 375037, 375044, 375293, 375300, 375549, 375556, 375805, 375813, 376849, 376911, 376944, 376975, 377008, 377041, 377135, 377168, 377201, 377231, 377264, 377297, 377580, 377617, 377676, 377713, 377743, 377776, 377809, 377871, 377904, 377933, 377966, 377997, 378030, 378061, 378094, 378125, 378158, 378193, 378339, 378385, 378700, 378781, 380949, 381789, 381813, 384669, 385045, 391901, 392725, 393117, 393238, 393265, 393365, 393379, 393412, 393449, 393485, 393518, 393549, 393582, 393613, 393646, 393677, 393710, 393741, 393774, 393813, 393869, 393902, 393933, 393966, 393997, 394030, 394061, 394094, 394124, 394157, 394190, 394261, 394281, 394565, 394694, 394764, 394787, 394965, 395017, 395107, 395140, 395185, 395221, 395293, 395300, 398077, 398117, 398196, 398243, 398308, 398348, 398372, 401265, 401283, 401380, 401437, 401572, 402909, 402980, 406013, 406037, 406090, 406229, 406532, 407421, 407573, 408733, 409092, 409621, 410621, 410634, 410965, 411914, 412181, 412202, 412693, 413706, 414037, 415274, 415765, 417789, 417813, 425988, 636637, 636949, 638980, 1309117, 1310724, 1311395, 1311428, 1348029, 1348117, 1349885, 1350148, 1351427, 1351633, 1351684, 1360259, 1360305, 1360388, 1360904, 1361220, 1361309, 1361920, 1361953, 1361984, 1362017, 1362048, 1362081, 1362112, 1362145, 1362176, 1362209, 1362240, 1362273, 1362304, 1362337, 1362368, 1362401, 1362432, 1362465, 1362496, 1362529, 1362560, 1362593, 1362624, 1362657, 1362688, 1362721, 1362752, 1362785, 1362816, 1362849, 1362880, 1362913, 1362944, 1362977, 1363008, 1363041, 1363072, 1363105, 1363136, 1363169, 1363200, 1363233, 1363264, 1363297, 1363328, 1363361, 1363396, 1363429, 1363463, 1363569, 1363589, 1363921, 1363939, 1363968, 1364001, 1364032, 1364065, 1364096, 1364129, 1364160, 1364193, 1364224, 1364257, 1364288, 1364321, 1364352, 1364385, 1364416, 1364449, 1364480, 1364513, 1364544, 1364577, 1364608, 1364641, 1364672, 1364705, 1364765, 1364965, 1364996, 1367241, 1367557, 1367633, 1367837, 1368084, 1368803, 1369108, 1369152, 1369185, 1369216, 1369249, 1369280, 1369313, 1369344, 1369377, 1369408, 1369441, 1369472, 1369505, 1369536, 1369569, 1369664, 1369697, 1369728, 1369761, 1369792, 1369825, 1369856, 1369889, 1369920, 1369953, 1369984, 1370017, 1370048, 1370081, 1370112, 1370145, 1370176, 1370209, 1370240, 1370273, 1370304, 1370337, 1370368, 1370401, 1370432, 1370465, 1370496, 1370529, 1370560, 1370593, 1370624, 1370657, 1370688, 1370721, 1370752, 1370785, 1370816, 1370849, 1370880, 1370913, 1370944, 1370977, 1371008, 1371041, 1371072, 1371105, 1371136, 1371169, 1371200, 1371233, 1371264, 1371297, 1371328, 1371361, 1371392, 1371425, 1371456, 1371489, 1371520, 1371553, 1371584, 1371617, 1371651, 1371681, 1371936, 1371969, 1372000, 1372033, 1372064, 1372129, 1372160, 1372193, 1372224, 1372257, 1372288, 1372321, 1372352, 1372385, 1372419, 1372468, 1372512, 1372545, 1372576, 1372609, 1372669, 1372672, 1372705, 1372736, 1372769, 1372829, 1373184, 1373217, 1373248, 1373281, 1373312, 1373345, 1373376, 1373409, 1373440, 1373473, 1373504, 1373565, 1376003, 1376065, 1376100, 1376325, 1376356, 1376453, 1376484, 1376613, 1376644, 1377382, 1377445, 1377510, 1377557, 1377693, 1377802, 1378005, 1378067, 1378101, 1378141, 1378308, 1379985, 1380125, 1380358, 1380420, 1382022, 1382533, 1382589, 1382865, 1382920, 1383261, 1383429, 1384004, 1384209, 1384292, 1384349, 1384456, 1384772, 1385669, 1385937, 1385988, 1386725, 1387078, 1387165, 1387505, 1387524, 1388477, 1388549, 1388646, 1388676, 1390181, 1390214, 1390277, 1390406, 1390469, 1390502, 1390641, 1391069, 1391075, 1391112, 1391453, 1391569, 1391645, 1392644, 1393957, 1394150, 1394213, 1394278, 1394341, 1394429, 1394692, 1394789, 1394820, 1395077, 1395110, 1395165, 1395208, 1395549, 1395601, 1395716, 1396227, 1396260, 1396469, 1396548, 1396582, 1396637, 1396740, 1398277, 1398308, 1398341, 1398436, 1398501, 1398564, 1398725, 1398788, 1398821, 1398852, 1398909, 1399652, 1399715, 1399761, 1399812, 1400166, 1400197, 1400262, 1400337, 1400388, 1400419, 1400486, 1400517, 1400573, 1400868, 1401085, 1401124, 1401341, 1401380, 1401597, 1401860, 1402109, 1402116, 1402365, 1406980, 1408102, 1408165, 1408198, 1408261, 1408294, 1408369, 1408390, 1408421, 1408477, 1408520, 1408861, 1409028, 1766557, 1766916, 1767677, 1767780, 1769373, 1769499, 1835036, 2039812, 2051549, 2051588, 2055005, 2056193, 2056445, 2056801, 2056989, 2057124, 2057157, 2057188, 2057522, 2057540, 2057981, 2057988, 2058173, 2058180, 2058237, 2058244, 2058333, 2058340, 2058429, 2058436, 2061908, 2062429, 2062948, 2074573, 2074606, 2074653, 2075140, 2077213, 2077252, 2079005, 2080260, 2080659, 2080693, 2080733, 2080773, 2081297, 2081517, 2081550, 2081585, 2081629, 2081797, 2082045, 2082321, 2082348, 2082411, 2082477, 2082510, 2082541, 2082574, 2082605, 2082638, 2082669, 2082702, 2082733, 2082766, 2082797, 2082830, 2082861, 2082894, 2082925, 2082958, 2082993, 2083053, 2083086, 2083121, 2083243, 2083345, 2083453, 2083473, 2083596, 2083629, 2083662, 2083693, 2083726, 2083757, 2083790, 2083825, 2083922, 2083948, 2083986, 2084093, 2084113, 2084147, 2084177, 2084253, 2084356, 2084541, 2084548, 2088893, 2088954, 2088989, 2089009, 2089107, 2089137, 2089229, 2089262, 2089297, 2089330, 2089361, 2089388, 2089425, 2089480, 2089809, 2089874, 2089969, 2090016, 2090861, 2090897, 2090926, 2090964, 2090987, 2091028, 2091041, 2091885, 2091922, 2091950, 2091986, 2092013, 2092046, 2092081, 2092109, 2092142, 2092177, 2092228, 2092547, 2092580, 2094019, 2094084, 2095101, 2095172, 2095389, 2095428, 2095645, 2095684, 2095901, 2095940, 2096061, 2096147, 2096210, 2096244, 2096277, 2096307, 2096381, 2096405, 2096434, 2096565, 2096637, 2096954, 2097045, 2097117, 2097156, 2097565, 2097572, 2098429, 2098436, 2099069, 2099076, 2099165, 2099172, 2099677, 2099716, 2100189, 2101252, 2105213, 2105361, 2105469, 2105578, 2107037, 2107125, 2107401, 2109098, 2109237, 2109770, 2109821, 2109973, 2110365, 2112021, 2113445, 2113501, 2117636, 2118589, 2118660, 2120253, 2121732, 2122749, 2122762, 2122909, 2123268, 2123817, 2123844, 2124105, 2124157, 2125828, 2126813, 2126833, 2126852, 2128029, 2128132, 2128401, 2128425, 2128605, 2129920, 2131201, 2132484, 2135005, 2135048, 2135389, 2162692, 2162909, 2162948, 2163005, 2163012, 2164445, 2164452, 2164541, 2164612, 2164669, 2164708, 2165469, 2165489, 2165514, 2165789, 2170884, 2171594, 2171805, 2171889, 2171908, 2172765, 2172913, 2172957, 2174980, 2176797, 2176964, 2177053, 2179076, 2179109, 2179229, 2179237, 2179325, 2179461, 2179588, 2179741, 2179748, 2179869, 2179876, 2180765, 2180869, 2180989, 2181093, 2181130, 2181405, 2181649, 2181949, 2182148, 2183082, 2183153, 2183197, 2187268, 2189021, 2189105, 2189316, 2190045, 2190090, 2190340, 2190973, 2191114, 2191389, 2195460, 2197821, 2214922, 2215933, 2228230, 2228261, 2228294, 2228324, 2230021, 2230513, 2230749, 2230858, 2231496, 2231837, 2232325, 2232390, 2232420, 2233862, 2233957, 2234086, 2234149, 2234225, 2234298, 2234321, 2234461, 2234884, 2235709, 2235912, 2236253, 2236421, 2236516, 2237669, 2237830, 2237861, 2238141, 2238152, 2238481, 2238621, 2240517, 2240582, 2240612, 2242150, 2242245, 2242534, 2242596, 2242737, 2242877, 2243080, 2243421, 2281476, 2282853, 2282886, 2282917, 2282950, 2283013, 2283206, 2283237, 2283293, 2283528, 2283869, 2359300, 2387453, 2392073, 2395261, 2395665, 2395805, 2490372, 2524669, 2949124, 2967357, 3006468, 3008701, 3009028, 3009062, 3010557, 3011045, 3011171, 3011613, 3538948, 3539037, 3801109, 3808989, 3809301, 3810557, 3810613, 3812518, 3812581, 3812693, 3812774, 3812986, 3813221, 3813493, 3813541, 3813781, 3814725, 3814869, 3816413, 3817493, 3819589, 3819701, 3819741, 3825685, 3828477, 3828746, 3829341, 3833856, 3834689, 3835520, 3836353, 3836605, 3836609, 3837184, 3838017, 3838848, 3838909, 3838912, 3839005, 3839040, 3839101, 3839136, 3839229, 3839264, 3839421, 3839424, 3839681, 3839837, 3839841, 3839901, 3839905, 3840157, 3840161, 3840512, 3841345, 3842176, 3842269, 3842272, 3842429, 3842464, 3842749, 3842752, 3843005, 3843009, 3843840, 3843933, 3843936, 3844093, 3844096, 3844285, 3844288, 3844349, 3844416, 3844669, 3844673, 3845504, 3846337, 3847168, 3848001, 3848832, 3849665, 3850496, 3851329, 3852160, 3852993, 3853824, 3854657, 3855581, 3855616, 3856434, 3856449, 3857266, 3857281, 3857472, 3858290, 3858305, 3859122, 3859137, 3859328, 3860146, 3860161, 3860978, 3860993, 3861184, 3862002, 3862017, 3862834, 3862849, 3863040, 3863858, 3863873, 3864690, 3864705, 3864896, 3864929, 3864989, 3865032, 3866653, 4046852, 4047005, 4047012, 4047901, 4047908, 4047997, 4048004, 4048061, 4048100, 4048157, 4048164, 4048509, 4048516, 4048669, 4048676, 4048733, 4048740, 4048797, 4048964, 4049021, 4049124, 4049181, 4049188, 4049245, 4049252, 4049309, 4049316, 4049437, 4049444, 4049533, 4049540, 4049597, 4049636, 4049693, 4049700, 4049757, 4049764, 4049821, 4049828, 4049885, 4049892, 4049949, 4049956, 4050045, 4050052, 4050109, 4050148, 4050301, 4050308, 4050557, 4050564, 4050717, 4050724, 4050877, 4050884, 4050941, 4050948, 4051293, 4051300, 4051869, 4052004, 4052125, 4052132, 4052317, 4052324, 4052893, 4054546, 4054621, 4063253, 4064669, 4064789, 4067997, 4068373, 4068861, 4068917, 4069373, 4069429, 4069917, 4069941, 4070429, 4071434, 4071805, 4071957, 4072957, 4072981, 4074909, 4075029, 4076413, 4078805, 4079741, 4080149, 4081533, 4081685, 4081981, 4082197, 4082269, 4087829, 4088893, 4089365, 4089565, 4089589, 4091837, 4091925, 4092573, 4092949, 4094141, 4094165, 4094333, 4094997, 4095549, 4096021, 4098045, 4098069, 4098109, 4098133, 4103965, 4103989, 4104125, 4104213, 4106205, 4106261, 4106397, 4106773, 4107549, 4112245, 4114493, 4114613, 4114973, 4116501, 4118749, 4120597, 4124317, 4194308, 5561085, 5562372, 5695165, 5695492, 5702621, 6225924, 6243293, 29360186, 29360221, 29361178, 29364253, 29368325, 29376029, 31457308, 33554397, 33554460, 35651549, //--Autogenerated -- end of section automatically generated }; const int maxUnicode = 0x10ffff; const int maskCategory = 0x1F; const int nRanges = ELEMENTS(catRanges); } // Each element in catRanges is the start of a range of Unicode characters in // one general category. // The value is comprised of a 21-bit character value shifted 5 bits and a 5 bit // category matching the CharacterCategory enumeration. // Initial version has 3249 entries and adds about 13K to the executable. // The array is in ascending order so can be searched using binary search. // Therefore the average call takes log2(3249) = 12 comparisons. // For speed, it may be useful to make a linear table for the common values, // possibly for 0..0xff for most Western European text or 0..0xfff for most // alphabetic languages. CharacterCategory CategoriseCharacter(int character) { if (character < 0 || character > maxUnicode) return ccCn; const int baseValue = character * (maskCategory+1) + maskCategory; const int *placeAfter = std::lower_bound(catRanges, catRanges+nRanges, baseValue); return static_cast(*(placeAfter-1) & maskCategory); } #ifdef SCI_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/CharacterCategory.h000066400000000000000000000012721345112435200246230ustar00rootroot00000000000000// Scintilla source code edit control /** @file CharacterCategory.h ** Returns the Unicode general category of a character. **/ // Copyright 2013 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CHARACTERCATEGORY_H #define CHARACTERCATEGORY_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif enum CharacterCategory { ccLu, ccLl, ccLt, ccLm, ccLo, ccMn, ccMc, ccMe, ccNd, ccNl, ccNo, ccPc, ccPd, ccPs, ccPe, ccPi, ccPf, ccPo, ccSm, ccSc, ccSk, ccSo, ccZs, ccZl, ccZp, ccCc, ccCf, ccCs, ccCo, ccCn }; CharacterCategory CategoriseCharacter(int character); #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/CharacterSet.cpp000066400000000000000000000023711345112435200241350ustar00rootroot00000000000000// Scintilla source code edit control /** @file CharacterSet.cxx ** Simple case functions for ASCII. ** Lexer infrastructure. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include "CharacterSet.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif #ifdef SCI_NAMESPACE namespace Scintilla { #endif int CompareCaseInsensitive(const char *a, const char *b) { while (*a && *b) { if (*a != *b) { char upperA = static_cast(MakeUpperCase(*a)); char upperB = static_cast(MakeUpperCase(*b)); if (upperA != upperB) return upperA - upperB; } a++; b++; } // Either *a or *b is nul return *a - *b; } int CompareNCaseInsensitive(const char *a, const char *b, size_t len) { while (*a && *b && len) { if (*a != *b) { char upperA = static_cast(MakeUpperCase(*a)); char upperB = static_cast(MakeUpperCase(*b)); if (upperA != upperB) return upperA - upperB; } a++; b++; len--; } if (len == 0) return 0; else // Either *a or *b is nul return *a - *b; } #ifdef SCI_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/CharacterSet.h000066400000000000000000000103171345112435200236010ustar00rootroot00000000000000// Scintilla source code edit control /** @file CharacterSet.h ** Encapsulates a set of characters. Used to test if a character is within a set. **/ // Copyright 2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CHARACTERSET_H #define CHARACTERSET_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class CharacterSet { int size; bool valueAfter; bool *bset; public: enum setBase { setNone=0, setLower=1, setUpper=2, setDigits=4, setAlpha=setLower|setUpper, setAlphaNum=setAlpha|setDigits }; CharacterSet(setBase base=setNone, const char *initialSet="", int size_=0x80, bool valueAfter_=false) { size = size_; valueAfter = valueAfter_; bset = new bool[size]; for (int i=0; i < size; i++) { bset[i] = false; } AddString(initialSet); if (base & setLower) AddString("abcdefghijklmnopqrstuvwxyz"); if (base & setUpper) AddString("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); if (base & setDigits) AddString("0123456789"); } CharacterSet(const CharacterSet &other) { size = other.size; valueAfter = other.valueAfter; bset = new bool[size]; for (int i=0; i < size; i++) { bset[i] = other.bset[i]; } } ~CharacterSet() { delete []bset; bset = 0; size = 0; } CharacterSet &operator=(const CharacterSet &other) { if (this != &other) { bool *bsetNew = new bool[other.size]; for (int i=0; i < other.size; i++) { bsetNew[i] = other.bset[i]; } delete []bset; size = other.size; valueAfter = other.valueAfter; bset = bsetNew; } return *this; } void Add(int val) { assert(val >= 0); assert(val < size); bset[val] = true; } void AddString(const char *setToAdd) { for (const char *cp=setToAdd; *cp; cp++) { int val = static_cast(*cp); assert(val >= 0); assert(val < size); bset[val] = true; } } bool Contains(int val) const { // val being -ve is valid (or there is a sign extension bug elsewhere. //assert(val >= 0); if (val < 0) return false; return (val < size) ? bset[val] : valueAfter; } }; // Functions for classifying characters inline bool IsASpace(int ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } inline bool IsASpaceOrTab(int ch) { return (ch == ' ') || (ch == '\t'); } inline bool IsADigit(int ch) { return (ch >= '0') && (ch <= '9'); } inline bool IsADigit(int ch, int base) { if (base <= 10) { return (ch >= '0') && (ch < '0' + base); } else { return ((ch >= '0') && (ch <= '9')) || ((ch >= 'A') && (ch < 'A' + base - 10)) || ((ch >= 'a') && (ch < 'a' + base - 10)); } } inline bool IsASCII(int ch) { return (ch >= 0) && (ch < 0x80); } inline bool IsLowerCase(int ch) { return (ch >= 'a') && (ch <= 'z'); } inline bool IsUpperCase(int ch) { return (ch >= 'A') && (ch <= 'Z'); } inline bool IsAlphaNumeric(int ch) { return ((ch >= '0') && (ch <= '9')) || ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z')); } /** * Check if a character is a space. * This is ASCII specific but is safe with chars >= 0x80. */ inline bool isspacechar(int ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } inline bool iswordchar(int ch) { return IsAlphaNumeric(ch) || ch == '.' || ch == '_'; } inline bool iswordstart(int ch) { return IsAlphaNumeric(ch) || ch == '_'; } inline bool isoperator(int ch) { if (IsAlphaNumeric(ch)) return false; if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || ch == '(' || ch == ')' || ch == '-' || ch == '+' || ch == '=' || ch == '|' || ch == '{' || ch == '}' || ch == '[' || ch == ']' || ch == ':' || ch == ';' || ch == '<' || ch == '>' || ch == ',' || ch == '/' || ch == '?' || ch == '!' || ch == '.' || ch == '~') return true; return false; } // Simple case functions for ASCII. inline int MakeUpperCase(int ch) { if (ch < 'a' || ch > 'z') return ch; else return static_cast(ch - 'a' + 'A'); } inline int MakeLowerCase(int ch) { if (ch < 'A' || ch > 'Z') return ch; else return ch - 'A' + 'a'; } int CompareCaseInsensitive(const char *a, const char *b); int CompareNCaseInsensitive(const char *a, const char *b, size_t len); #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/LexAccessor.h000066400000000000000000000125631345112435200234510ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexAccessor.h ** Interfaces between Scintilla and lexers. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef LEXACCESSOR_H #define LEXACCESSOR_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif enum EncodingType { enc8bit, encUnicode, encDBCS }; class LexAccessor { private: IDocument *pAccess; enum {extremePosition=0x7FFFFFFF}; /** @a bufferSize is a trade off between time taken to copy the characters * and retrieval overhead. * @a slopSize positions the buffer before the desired position * in case there is some backtracking. */ enum {bufferSize=4000, slopSize=bufferSize/8}; char buf[bufferSize+1]; Sci_Position startPos; Sci_Position endPos; int codePage; enum EncodingType encodingType; Sci_Position lenDoc; char styleBuf[bufferSize]; Sci_Position validLen; Sci_PositionU startSeg; Sci_Position startPosStyling; int documentVersion; void Fill(Sci_Position position) { startPos = position - slopSize; if (startPos + bufferSize > lenDoc) startPos = lenDoc - bufferSize; if (startPos < 0) startPos = 0; endPos = startPos + bufferSize; if (endPos > lenDoc) endPos = lenDoc; pAccess->GetCharRange(buf, startPos, endPos-startPos); buf[endPos-startPos] = '\0'; } public: explicit LexAccessor(IDocument *pAccess_) : pAccess(pAccess_), startPos(extremePosition), endPos(0), codePage(pAccess->CodePage()), encodingType(enc8bit), lenDoc(pAccess->Length()), validLen(0), startSeg(0), startPosStyling(0), documentVersion(pAccess->Version()) { // Prevent warnings by static analyzers about uninitialized buf and styleBuf. buf[0] = 0; styleBuf[0] = 0; switch (codePage) { case 65001: encodingType = encUnicode; break; case 932: case 936: case 949: case 950: case 1361: encodingType = encDBCS; } } char operator[](Sci_Position position) { if (position < startPos || position >= endPos) { Fill(position); } return buf[position - startPos]; } IDocumentWithLineEnd *MultiByteAccess() const { if (documentVersion >= dvLineEnd) { return static_cast(pAccess); } return 0; } /** Safe version of operator[], returning a defined value for invalid position. */ char SafeGetCharAt(Sci_Position position, char chDefault=' ') { if (position < startPos || position >= endPos) { Fill(position); if (position < startPos || position >= endPos) { // Position is outside range of document return chDefault; } } return buf[position - startPos]; } bool IsLeadByte(char ch) const { return pAccess->IsDBCSLeadByte(ch); } EncodingType Encoding() const { return encodingType; } bool Match(Sci_Position pos, const char *s) { for (int i=0; *s; i++) { if (*s != SafeGetCharAt(pos+i)) return false; s++; } return true; } char StyleAt(Sci_Position position) const { return static_cast(pAccess->StyleAt(position)); } Sci_Position GetLine(Sci_Position position) const { return pAccess->LineFromPosition(position); } Sci_Position LineStart(Sci_Position line) const { return pAccess->LineStart(line); } Sci_Position LineEnd(Sci_Position line) { if (documentVersion >= dvLineEnd) { return (static_cast(pAccess))->LineEnd(line); } else { // Old interface means only '\r', '\n' and '\r\n' line ends. Sci_Position startNext = pAccess->LineStart(line+1); char chLineEnd = SafeGetCharAt(startNext-1); if (chLineEnd == '\n' && (SafeGetCharAt(startNext-2) == '\r')) return startNext - 2; else return startNext - 1; } } int LevelAt(Sci_Position line) const { return pAccess->GetLevel(line); } Sci_Position Length() const { return lenDoc; } void Flush() { if (validLen > 0) { pAccess->SetStyles(validLen, styleBuf); startPosStyling += validLen; validLen = 0; } } int GetLineState(Sci_Position line) const { return pAccess->GetLineState(line); } int SetLineState(Sci_Position line, int state) { return pAccess->SetLineState(line, state); } // Style setting void StartAt(Sci_PositionU start) { pAccess->StartStyling(start, '\377'); startPosStyling = start; } Sci_PositionU GetStartSegment() const { return startSeg; } void StartSegment(Sci_PositionU pos) { startSeg = pos; } void ColourTo(Sci_PositionU pos, int chAttr) { // Only perform styling if non empty range if (pos != startSeg - 1) { assert(pos >= startSeg); if (pos < startSeg) { return; } if (validLen + (pos - startSeg + 1) >= bufferSize) Flush(); if (validLen + (pos - startSeg + 1) >= bufferSize) { // Too big for buffer so send directly pAccess->SetStyleFor(pos - startSeg + 1, static_cast(chAttr)); } else { for (Sci_PositionU i = startSeg; i <= pos; i++) { assert((startPosStyling + validLen) < Length()); styleBuf[validLen++] = static_cast(chAttr); } } } startSeg = pos+1; } void SetLevel(Sci_Position line, int level) { pAccess->SetLevel(line, level); } void IndicatorFill(Sci_Position start, Sci_Position end, int indicator, int value) { pAccess->DecorationSetCurrentIndicator(indicator); pAccess->DecorationFillRange(start, value, end - start); } void ChangeLexerState(Sci_Position start, Sci_Position end) { pAccess->ChangeLexerState(start, end); } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/LexerBase.cpp000066400000000000000000000035461345112435200234440ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexerBase.cxx ** A simple lexer with no state. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "PropSetSimple.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" #include "LexerModule.h" #include "LexerBase.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif LexerBase::LexerBase() { for (int wl = 0; wl < numWordLists; wl++) keyWordLists[wl] = new WordList; keyWordLists[numWordLists] = 0; } LexerBase::~LexerBase() { for (int wl = 0; wl < numWordLists; wl++) { delete keyWordLists[wl]; keyWordLists[wl] = 0; } keyWordLists[numWordLists] = 0; } void SCI_METHOD LexerBase::Release() { delete this; } int SCI_METHOD LexerBase::Version() const { return lvOriginal; } const char * SCI_METHOD LexerBase::PropertyNames() { return ""; } int SCI_METHOD LexerBase::PropertyType(const char *) { return SC_TYPE_BOOLEAN; } const char * SCI_METHOD LexerBase::DescribeProperty(const char *) { return ""; } Sci_Position SCI_METHOD LexerBase::PropertySet(const char *key, const char *val) { const char *valOld = props.Get(key); if (strcmp(val, valOld) != 0) { props.Set(key, val); return 0; } else { return -1; } } const char * SCI_METHOD LexerBase::DescribeWordListSets() { return ""; } Sci_Position SCI_METHOD LexerBase::WordListSet(int n, const char *wl) { if (n < numWordLists) { WordList wlNew; wlNew.Set(wl); if (*keyWordLists[n] != wlNew) { keyWordLists[n]->Set(wl); return 0; } } return -1; } void * SCI_METHOD LexerBase::PrivateCall(int, void *) { return 0; } sqlitebrowser-3.11.2/libs/qscintilla/lexlib/LexerBase.h000066400000000000000000000024111345112435200230770ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexerBase.h ** A simple lexer with no state. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef LEXERBASE_H #define LEXERBASE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif // A simple lexer with no state class LexerBase : public ILexer { protected: PropSetSimple props; enum {numWordLists=KEYWORDSET_MAX+1}; WordList *keyWordLists[numWordLists+1]; public: LexerBase(); virtual ~LexerBase(); void SCI_METHOD Release(); int SCI_METHOD Version() const; const char * SCI_METHOD PropertyNames(); int SCI_METHOD PropertyType(const char *name); const char * SCI_METHOD DescribeProperty(const char *name); Sci_Position SCI_METHOD PropertySet(const char *key, const char *val); const char * SCI_METHOD DescribeWordListSets(); Sci_Position SCI_METHOD WordListSet(int n, const char *wl); void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; void * SCI_METHOD PrivateCall(int operation, void *pointer); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/LexerModule.cpp000066400000000000000000000053001345112435200240050ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexerModule.cxx ** Colourise for particular languages. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "PropSetSimple.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" #include "LexerModule.h" #include "LexerBase.h" #include "LexerSimple.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif LexerModule::LexerModule(int language_, LexerFunction fnLexer_, const char *languageName_, LexerFunction fnFolder_, const char *const wordListDescriptions_[]) : language(language_), fnLexer(fnLexer_), fnFolder(fnFolder_), fnFactory(0), wordListDescriptions(wordListDescriptions_), languageName(languageName_) { } LexerModule::LexerModule(int language_, LexerFactoryFunction fnFactory_, const char *languageName_, const char * const wordListDescriptions_[]) : language(language_), fnLexer(0), fnFolder(0), fnFactory(fnFactory_), wordListDescriptions(wordListDescriptions_), languageName(languageName_) { } int LexerModule::GetNumWordLists() const { if (wordListDescriptions == NULL) { return -1; } else { int numWordLists = 0; while (wordListDescriptions[numWordLists]) { ++numWordLists; } return numWordLists; } } const char *LexerModule::GetWordListDescription(int index) const { assert(index < GetNumWordLists()); if (!wordListDescriptions || (index >= GetNumWordLists())) { return ""; } else { return wordListDescriptions[index]; } } ILexer *LexerModule::Create() const { if (fnFactory) return fnFactory(); else return new LexerSimple(this); } void LexerModule::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const { if (fnLexer) fnLexer(startPos, lengthDoc, initStyle, keywordlists, styler); } void LexerModule::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const { if (fnFolder) { Sci_Position lineCurrent = styler.GetLine(startPos); // Move back one line in case deletion wrecked current line fold state if (lineCurrent > 0) { lineCurrent--; Sci_Position newStartPos = styler.LineStart(lineCurrent); lengthDoc += startPos - newStartPos; startPos = newStartPos; initStyle = 0; if (startPos > 0) { initStyle = styler.StyleAt(startPos - 1); } } fnFolder(startPos, lengthDoc, initStyle, keywordlists, styler); } } sqlitebrowser-3.11.2/libs/qscintilla/lexlib/LexerModule.h000066400000000000000000000043071345112435200234600ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexerModule.h ** Colourise for particular languages. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef LEXERMODULE_H #define LEXERMODULE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class Accessor; class WordList; typedef void (*LexerFunction)(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler); typedef ILexer *(*LexerFactoryFunction)(); /** * A LexerModule is responsible for lexing and folding a particular language. * The class maintains a list of LexerModules which can be searched to find a * module appropriate to a particular language. */ class LexerModule { protected: int language; LexerFunction fnLexer; LexerFunction fnFolder; LexerFactoryFunction fnFactory; const char * const * wordListDescriptions; public: const char *languageName; LexerModule(int language_, LexerFunction fnLexer_, const char *languageName_=0, LexerFunction fnFolder_=0, const char * const wordListDescriptions_[] = NULL); LexerModule(int language_, LexerFactoryFunction fnFactory_, const char *languageName_, const char * const wordListDescriptions_[] = NULL); virtual ~LexerModule() { } int GetLanguage() const { return language; } // -1 is returned if no WordList information is available int GetNumWordLists() const; const char *GetWordListDescription(int index) const; ILexer *Create() const; virtual void Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) const; virtual void Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) const; friend class Catalogue; }; inline int Maximum(int a, int b) { return (a > b) ? a : b; } // Shut up annoying Visual C++ warnings: #ifdef _MSC_VER #pragma warning(disable: 4244 4456 4457) #endif // Turn off shadow warnings for lexers as may be maintained by others #if defined(__GNUC__) #pragma GCC diagnostic ignored "-Wshadow" #endif #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/LexerNoExceptions.cpp000066400000000000000000000040131345112435200251760ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexerNoExceptions.cxx ** A simple lexer with no state which does not throw exceptions so can be used in an external lexer. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "PropSetSimple.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" #include "LexerModule.h" #include "LexerBase.h" #include "LexerNoExceptions.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif Sci_Position SCI_METHOD LexerNoExceptions::PropertySet(const char *key, const char *val) { try { return LexerBase::PropertySet(key, val); } catch (...) { // Should not throw into caller as may be compiled with different compiler or options } return -1; } Sci_Position SCI_METHOD LexerNoExceptions::WordListSet(int n, const char *wl) { try { return LexerBase::WordListSet(n, wl); } catch (...) { // Should not throw into caller as may be compiled with different compiler or options } return -1; } void SCI_METHOD LexerNoExceptions::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { try { Accessor astyler(pAccess, &props); Lexer(startPos, length, initStyle, pAccess, astyler); astyler.Flush(); } catch (...) { // Should not throw into caller as may be compiled with different compiler or options pAccess->SetErrorStatus(SC_STATUS_FAILURE); } } void SCI_METHOD LexerNoExceptions::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { try { Accessor astyler(pAccess, &props); Folder(startPos, length, initStyle, pAccess, astyler); astyler.Flush(); } catch (...) { // Should not throw into caller as may be compiled with different compiler or options pAccess->SetErrorStatus(SC_STATUS_FAILURE); } } sqlitebrowser-3.11.2/libs/qscintilla/lexlib/LexerNoExceptions.h000066400000000000000000000022031345112435200246420ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexerNoExceptions.h ** A simple lexer with no state. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef LEXERNOEXCEPTIONS_H #define LEXERNOEXCEPTIONS_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif // A simple lexer with no state class LexerNoExceptions : public LexerBase { public: // TODO Also need to prevent exceptions in constructor and destructor Sci_Position SCI_METHOD PropertySet(const char *key, const char *val); Sci_Position SCI_METHOD WordListSet(int n, const char *wl); void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *); virtual void Lexer(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0; virtual void Folder(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/LexerSimple.cpp000066400000000000000000000030061345112435200240120ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexerSimple.cxx ** A simple lexer with no state. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "PropSetSimple.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" #include "LexerModule.h" #include "LexerBase.h" #include "LexerSimple.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif LexerSimple::LexerSimple(const LexerModule *module_) : module(module_) { for (int wl = 0; wl < module->GetNumWordLists(); wl++) { if (!wordLists.empty()) wordLists += "\n"; wordLists += module->GetWordListDescription(wl); } } const char * SCI_METHOD LexerSimple::DescribeWordListSets() { return wordLists.c_str(); } void SCI_METHOD LexerSimple::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) { Accessor astyler(pAccess, &props); module->Lex(startPos, lengthDoc, initStyle, keyWordLists, astyler); astyler.Flush(); } void SCI_METHOD LexerSimple::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) { if (props.GetInt("fold")) { Accessor astyler(pAccess, &props); module->Fold(startPos, lengthDoc, initStyle, keyWordLists, astyler); astyler.Flush(); } } sqlitebrowser-3.11.2/libs/qscintilla/lexlib/LexerSimple.h000066400000000000000000000015061345112435200234620ustar00rootroot00000000000000// Scintilla source code edit control /** @file LexerSimple.h ** A simple lexer with no state. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef LEXERSIMPLE_H #define LEXERSIMPLE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif // A simple lexer with no state class LexerSimple : public LexerBase { const LexerModule *module; std::string wordLists; public: explicit LexerSimple(const LexerModule *module_); const char * SCI_METHOD DescribeWordListSets(); void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/License.txt000066400000000000000000000015441345112435200232050ustar00rootroot00000000000000License for Scintilla and SciTE Copyright 1998-2003 by Neil Hodgson All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. sqlitebrowser-3.11.2/libs/qscintilla/lexlib/OptionSet.h000066400000000000000000000066651345112435200231700ustar00rootroot00000000000000// Scintilla source code edit control /** @file OptionSet.h ** Manage descriptive information about an options struct for a lexer. ** Hold the names, positions, and descriptions of boolean, integer and string options and ** allow setting options and retrieving metadata about the options. **/ // Copyright 2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef OPTIONSET_H #define OPTIONSET_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif template class OptionSet { typedef T Target; typedef bool T::*plcob; typedef int T::*plcoi; typedef std::string T::*plcos; struct Option { int opType; union { plcob pb; plcoi pi; plcos ps; }; std::string description; Option() : opType(SC_TYPE_BOOLEAN), pb(0), description("") { } Option(plcob pb_, std::string description_="") : opType(SC_TYPE_BOOLEAN), pb(pb_), description(description_) { } Option(plcoi pi_, std::string description_) : opType(SC_TYPE_INTEGER), pi(pi_), description(description_) { } Option(plcos ps_, std::string description_) : opType(SC_TYPE_STRING), ps(ps_), description(description_) { } bool Set(T *base, const char *val) const { switch (opType) { case SC_TYPE_BOOLEAN: { bool option = atoi(val) != 0; if ((*base).*pb != option) { (*base).*pb = option; return true; } break; } case SC_TYPE_INTEGER: { int option = atoi(val); if ((*base).*pi != option) { (*base).*pi = option; return true; } break; } case SC_TYPE_STRING: { if ((*base).*ps != val) { (*base).*ps = val; return true; } break; } } return false; } }; typedef std::map OptionMap; OptionMap nameToDef; std::string names; std::string wordLists; void AppendName(const char *name) { if (!names.empty()) names += "\n"; names += name; } public: virtual ~OptionSet() { } void DefineProperty(const char *name, plcob pb, std::string description="") { nameToDef[name] = Option(pb, description); AppendName(name); } void DefineProperty(const char *name, plcoi pi, std::string description="") { nameToDef[name] = Option(pi, description); AppendName(name); } void DefineProperty(const char *name, plcos ps, std::string description="") { nameToDef[name] = Option(ps, description); AppendName(name); } const char *PropertyNames() const { return names.c_str(); } int PropertyType(const char *name) { typename OptionMap::iterator it = nameToDef.find(name); if (it != nameToDef.end()) { return it->second.opType; } return SC_TYPE_BOOLEAN; } const char *DescribeProperty(const char *name) { typename OptionMap::iterator it = nameToDef.find(name); if (it != nameToDef.end()) { return it->second.description.c_str(); } return ""; } bool PropertySet(T *base, const char *name, const char *val) { typename OptionMap::iterator it = nameToDef.find(name); if (it != nameToDef.end()) { return it->second.Set(base, val); } return false; } void DefineWordListSets(const char * const wordListDescriptions[]) { if (wordListDescriptions) { for (size_t wl = 0; wordListDescriptions[wl]; wl++) { if (!wordLists.empty()) wordLists += "\n"; wordLists += wordListDescriptions[wl]; } } } const char *DescribeWordListSets() const { return wordLists.c_str(); } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/PropSetSimple.cpp000066400000000000000000000105631345112435200243350ustar00rootroot00000000000000// SciTE - Scintilla based Text Editor /** @file PropSetSimple.cxx ** A Java style properties file module. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. // Maintain a dictionary of properties #include #include #include #include #include #include "PropSetSimple.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif typedef std::map mapss; PropSetSimple::PropSetSimple() { mapss *props = new mapss; impl = static_cast(props); } PropSetSimple::~PropSetSimple() { mapss *props = static_cast(impl); delete props; impl = 0; } void PropSetSimple::Set(const char *key, const char *val, int lenKey, int lenVal) { mapss *props = static_cast(impl); if (!*key) // Empty keys are not supported return; if (lenKey == -1) lenKey = static_cast(strlen(key)); if (lenVal == -1) lenVal = static_cast(strlen(val)); (*props)[std::string(key, lenKey)] = std::string(val, lenVal); } static bool IsASpaceCharacter(unsigned int ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } void PropSetSimple::Set(const char *keyVal) { while (IsASpaceCharacter(*keyVal)) keyVal++; const char *endVal = keyVal; while (*endVal && (*endVal != '\n')) endVal++; const char *eqAt = strchr(keyVal, '='); if (eqAt) { Set(keyVal, eqAt + 1, static_cast(eqAt-keyVal), static_cast(endVal - eqAt - 1)); } else if (*keyVal) { // No '=' so assume '=1' Set(keyVal, "1", static_cast(endVal-keyVal), 1); } } void PropSetSimple::SetMultiple(const char *s) { const char *eol = strchr(s, '\n'); while (eol) { Set(s); s = eol + 1; eol = strchr(s, '\n'); } Set(s); } const char *PropSetSimple::Get(const char *key) const { mapss *props = static_cast(impl); mapss::const_iterator keyPos = props->find(std::string(key)); if (keyPos != props->end()) { return keyPos->second.c_str(); } else { return ""; } } // There is some inconsistency between GetExpanded("foo") and Expand("$(foo)"). // A solution is to keep a stack of variables that have been expanded, so that // recursive expansions can be skipped. For now I'll just use the C++ stack // for that, through a recursive function and a simple chain of pointers. struct VarChain { VarChain(const char *var_=NULL, const VarChain *link_=NULL): var(var_), link(link_) {} bool contains(const char *testVar) const { return (var && (0 == strcmp(var, testVar))) || (link && link->contains(testVar)); } const char *var; const VarChain *link; }; static int ExpandAllInPlace(const PropSetSimple &props, std::string &withVars, int maxExpands, const VarChain &blankVars) { size_t varStart = withVars.find("$("); while ((varStart != std::string::npos) && (maxExpands > 0)) { size_t varEnd = withVars.find(")", varStart+2); if (varEnd == std::string::npos) { break; } // For consistency, when we see '$(ab$(cde))', expand the inner variable first, // regardless whether there is actually a degenerate variable named 'ab$(cde'. size_t innerVarStart = withVars.find("$(", varStart+2); while ((innerVarStart != std::string::npos) && (innerVarStart > varStart) && (innerVarStart < varEnd)) { varStart = innerVarStart; innerVarStart = withVars.find("$(", varStart+2); } std::string var(withVars.c_str(), varStart + 2, varEnd - varStart - 2); std::string val = props.Get(var.c_str()); if (blankVars.contains(var.c_str())) { val = ""; // treat blankVar as an empty string (e.g. to block self-reference) } if (--maxExpands >= 0) { maxExpands = ExpandAllInPlace(props, val, maxExpands, VarChain(var.c_str(), &blankVars)); } withVars.erase(varStart, varEnd-varStart+1); withVars.insert(varStart, val.c_str(), val.length()); varStart = withVars.find("$("); } return maxExpands; } int PropSetSimple::GetExpanded(const char *key, char *result) const { std::string val = Get(key); ExpandAllInPlace(*this, val, 100, VarChain(key)); const int n = static_cast(val.size()); if (result) { memcpy(result, val.c_str(), n+1); } return n; // Not including NUL } int PropSetSimple::GetInt(const char *key, int defaultValue) const { std::string val = Get(key); ExpandAllInPlace(*this, val, 100, VarChain(key)); if (!val.empty()) { return atoi(val.c_str()); } return defaultValue; } sqlitebrowser-3.11.2/libs/qscintilla/lexlib/PropSetSimple.h000066400000000000000000000014151345112435200237760ustar00rootroot00000000000000// Scintilla source code edit control /** @file PropSetSimple.h ** A basic string to string map. **/ // Copyright 1998-2009 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef PROPSETSIMPLE_H #define PROPSETSIMPLE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class PropSetSimple { void *impl; void Set(const char *keyVal); public: PropSetSimple(); virtual ~PropSetSimple(); void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); void SetMultiple(const char *); const char *Get(const char *key) const; int GetExpanded(const char *key, char *result) const; int GetInt(const char *key, int defaultValue=0) const; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/SparseState.h000066400000000000000000000056421345112435200234740ustar00rootroot00000000000000// Scintilla source code edit control /** @file SparseState.h ** Hold lexer state that may change rarely. ** This is often per-line state such as whether a particular type of section has been entered. ** A state continues until it is changed. **/ // Copyright 2011 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SPARSESTATE_H #define SPARSESTATE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif template class SparseState { struct State { int position; T value; State(int position_, T value_) : position(position_), value(value_) { } inline bool operator<(const State &other) const { return position < other.position; } inline bool operator==(const State &other) const { return (position == other.position) && (value == other.value); } }; int positionFirst; typedef std::vector stateVector; stateVector states; typename stateVector::iterator Find(int position) { State searchValue(position, T()); return std::lower_bound(states.begin(), states.end(), searchValue); } public: explicit SparseState(int positionFirst_=-1) { positionFirst = positionFirst_; } void Set(int position, T value) { Delete(position); if (states.empty() || (value != states[states.size()-1].value)) { states.push_back(State(position, value)); } } T ValueAt(int position) { if (states.empty()) return T(); if (position < states[0].position) return T(); typename stateVector::iterator low = Find(position); if (low == states.end()) { return states[states.size()-1].value; } else { if (low->position > position) { --low; } return low->value; } } bool Delete(int position) { typename stateVector::iterator low = Find(position); if (low != states.end()) { states.erase(low, states.end()); return true; } return false; } size_t size() const { return states.size(); } // Returns true if Merge caused a significant change bool Merge(const SparseState &other, int ignoreAfter) { // Changes caused beyond ignoreAfter are not significant Delete(ignoreAfter+1); bool different = true; bool changed = false; typename stateVector::iterator low = Find(other.positionFirst); if (static_cast(states.end() - low) == other.states.size()) { // Same number in other as after positionFirst in this different = !std::equal(low, states.end(), other.states.begin()); } if (different) { if (low != states.end()) { states.erase(low, states.end()); changed = true; } typename stateVector::const_iterator startOther = other.states.begin(); if (!states.empty() && !other.states.empty() && states.back().value == startOther->value) ++startOther; if (startOther != other.states.end()) { states.insert(states.end(), startOther, other.states.end()); changed = true; } } return changed; } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/StringCopy.h000066400000000000000000000016151345112435200233330ustar00rootroot00000000000000// Scintilla source code edit control /** @file StringCopy.h ** Safe string copy function which always NUL terminates. ** ELEMENTS macro for determining array sizes. **/ // Copyright 2013 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef STRINGCOPY_H #define STRINGCOPY_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif // Safer version of string copy functions like strcpy, wcsncpy, etc. // Instantiate over fixed length strings of both char and wchar_t. // May truncate if source doesn't fit into dest with room for NUL. template void StringCopy(T (&dest)[count], const T* source) { for (size_t i=0; i // This file is in the public domain. #include #include #include #include #include #include "ILexer.h" #include "LexAccessor.h" #include "Accessor.h" #include "StyleContext.h" #include "CharacterSet.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif bool StyleContext::MatchIgnoreCase(const char *s) { if (MakeLowerCase(ch) != static_cast(*s)) return false; s++; if (MakeLowerCase(chNext) != static_cast(*s)) return false; s++; for (int n = 2; *s; n++) { if (static_cast(*s) != MakeLowerCase(static_cast(styler.SafeGetCharAt(currentPos + n, 0)))) return false; s++; } return true; } static void getRange(Sci_PositionU start, Sci_PositionU end, LexAccessor &styler, char *s, Sci_PositionU len) { Sci_PositionU i = 0; while ((i < end - start + 1) && (i < len-1)) { s[i] = styler[start + i]; i++; } s[i] = '\0'; } void StyleContext::GetCurrent(char *s, Sci_PositionU len) { getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len); } static void getRangeLowered(Sci_PositionU start, Sci_PositionU end, LexAccessor &styler, char *s, Sci_PositionU len) { Sci_PositionU i = 0; while ((i < end - start + 1) && (i < len-1)) { s[i] = static_cast(tolower(styler[start + i])); i++; } s[i] = '\0'; } void StyleContext::GetCurrentLowered(char *s, Sci_PositionU len) { getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len); } sqlitebrowser-3.11.2/libs/qscintilla/lexlib/StyleContext.h000066400000000000000000000132601345112435200236760ustar00rootroot00000000000000// Scintilla source code edit control /** @file StyleContext.h ** Lexer infrastructure. **/ // Copyright 1998-2004 by Neil Hodgson // This file is in the public domain. #ifndef STYLECONTEXT_H #define STYLECONTEXT_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif // All languages handled so far can treat all characters >= 0x80 as one class // which just continues the current token or starts an identifier if in default. // DBCS treated specially as the second character can be < 0x80 and hence // syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80 class StyleContext { LexAccessor &styler; IDocumentWithLineEnd *multiByteAccess; Sci_PositionU endPos; Sci_PositionU lengthDocument; // Used for optimizing GetRelativeCharacter Sci_PositionU posRelative; Sci_PositionU currentPosLastRelative; Sci_Position offsetRelative; StyleContext &operator=(const StyleContext &); void GetNextChar() { if (multiByteAccess) { chNext = multiByteAccess->GetCharacterAndWidth(currentPos+width, &widthNext); } else { chNext = static_cast(styler.SafeGetCharAt(currentPos+width, 0)); widthNext = 1; } // End of line determined from line end position, allowing CR, LF, // CRLF and Unicode line ends as set by document. if (currentLine < lineDocEnd) atLineEnd = static_cast(currentPos) >= (lineStartNext-1); else // Last line atLineEnd = static_cast(currentPos) >= lineStartNext; } public: Sci_PositionU currentPos; Sci_Position currentLine; Sci_Position lineDocEnd; Sci_Position lineStartNext; bool atLineStart; bool atLineEnd; int state; int chPrev; int ch; Sci_Position width; int chNext; Sci_Position widthNext; StyleContext(Sci_PositionU startPos, Sci_PositionU length, int initStyle, LexAccessor &styler_, char chMask='\377') : styler(styler_), multiByteAccess(0), endPos(startPos + length), posRelative(0), currentPosLastRelative(0x7FFFFFFF), offsetRelative(0), currentPos(startPos), currentLine(-1), lineStartNext(-1), atLineEnd(false), state(initStyle & chMask), // Mask off all bits which aren't in the chMask. chPrev(0), ch(0), width(0), chNext(0), widthNext(1) { if (styler.Encoding() != enc8bit) { multiByteAccess = styler.MultiByteAccess(); } styler.StartAt(startPos /*, chMask*/); styler.StartSegment(startPos); currentLine = styler.GetLine(startPos); lineStartNext = styler.LineStart(currentLine+1); lengthDocument = static_cast(styler.Length()); if (endPos == lengthDocument) endPos++; lineDocEnd = styler.GetLine(lengthDocument); atLineStart = static_cast(styler.LineStart(currentLine)) == startPos; // Variable width is now 0 so GetNextChar gets the char at currentPos into chNext/widthNext width = 0; GetNextChar(); ch = chNext; width = widthNext; GetNextChar(); } void Complete() { styler.ColourTo(currentPos - ((currentPos > lengthDocument) ? 2 : 1), state); styler.Flush(); } bool More() const { return currentPos < endPos; } void Forward() { if (currentPos < endPos) { atLineStart = atLineEnd; if (atLineStart) { currentLine++; lineStartNext = styler.LineStart(currentLine+1); } chPrev = ch; currentPos += width; ch = chNext; width = widthNext; GetNextChar(); } else { atLineStart = false; chPrev = ' '; ch = ' '; chNext = ' '; atLineEnd = true; } } void Forward(Sci_Position nb) { for (Sci_Position i = 0; i < nb; i++) { Forward(); } } void ForwardBytes(Sci_Position nb) { Sci_PositionU forwardPos = currentPos + nb; while (forwardPos > currentPos) { Forward(); } } void ChangeState(int state_) { state = state_; } void SetState(int state_) { styler.ColourTo(currentPos - ((currentPos > lengthDocument) ? 2 : 1), state); state = state_; } void ForwardSetState(int state_) { Forward(); styler.ColourTo(currentPos - ((currentPos > lengthDocument) ? 2 : 1), state); state = state_; } Sci_Position LengthCurrent() const { return currentPos - styler.GetStartSegment(); } int GetRelative(Sci_Position n) { return static_cast(styler.SafeGetCharAt(currentPos+n, 0)); } int GetRelativeCharacter(Sci_Position n) { if (n == 0) return ch; if (multiByteAccess) { if ((currentPosLastRelative != currentPos) || ((n > 0) && ((offsetRelative < 0) || (n < offsetRelative))) || ((n < 0) && ((offsetRelative > 0) || (n > offsetRelative)))) { posRelative = currentPos; offsetRelative = 0; } Sci_Position diffRelative = n - offsetRelative; Sci_Position posNew = multiByteAccess->GetRelativePosition(posRelative, diffRelative); int chReturn = multiByteAccess->GetCharacterAndWidth(posNew, 0); posRelative = posNew; currentPosLastRelative = currentPos; offsetRelative = n; return chReturn; } else { // fast version for single byte encodings return static_cast(styler.SafeGetCharAt(currentPos + n, 0)); } } bool Match(char ch0) const { return ch == static_cast(ch0); } bool Match(char ch0, char ch1) const { return (ch == static_cast(ch0)) && (chNext == static_cast(ch1)); } bool Match(const char *s) { if (ch != static_cast(*s)) return false; s++; if (!*s) return true; if (chNext != static_cast(*s)) return false; s++; for (int n=2; *s; n++) { if (*s != styler.SafeGetCharAt(currentPos+n, 0)) return false; s++; } return true; } // Non-inline bool MatchIgnoreCase(const char *s); void GetCurrent(char *s, Sci_PositionU len); void GetCurrentLowered(char *s, Sci_PositionU len); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/SubStyles.h000066400000000000000000000077421345112435200231760ustar00rootroot00000000000000// Scintilla source code edit control /** @file SubStyles.h ** Manage substyles for a lexer. **/ // Copyright 2012 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SUBSTYLES_H #define SUBSTYLES_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class WordClassifier { int baseStyle; int firstStyle; int lenStyles; std::map wordToStyle; public: explicit WordClassifier(int baseStyle_) : baseStyle(baseStyle_), firstStyle(0), lenStyles(0) { } void Allocate(int firstStyle_, int lenStyles_) { firstStyle = firstStyle_; lenStyles = lenStyles_; wordToStyle.clear(); } int Base() const { return baseStyle; } int Start() const { return firstStyle; } int Length() const { return lenStyles; } void Clear() { firstStyle = 0; lenStyles = 0; wordToStyle.clear(); } int ValueFor(const std::string &s) const { std::map::const_iterator it = wordToStyle.find(s); if (it != wordToStyle.end()) return it->second; else return -1; } bool IncludesStyle(int style) const { return (style >= firstStyle) && (style < (firstStyle + lenStyles)); } void SetIdentifiers(int style, const char *identifiers) { while (*identifiers) { const char *cpSpace = identifiers; while (*cpSpace && !(*cpSpace == ' ' || *cpSpace == '\t' || *cpSpace == '\r' || *cpSpace == '\n')) cpSpace++; if (cpSpace > identifiers) { std::string word(identifiers, cpSpace - identifiers); wordToStyle[word] = style; } identifiers = cpSpace; if (*identifiers) identifiers++; } } }; class SubStyles { int classifications; const char *baseStyles; int styleFirst; int stylesAvailable; int secondaryDistance; int allocated; std::vector classifiers; int BlockFromBaseStyle(int baseStyle) const { for (int b=0; b < classifications; b++) { if (baseStyle == baseStyles[b]) return b; } return -1; } int BlockFromStyle(int style) const { int b = 0; for (std::vector::const_iterator it=classifiers.begin(); it != classifiers.end(); ++it) { if (it->IncludesStyle(style)) return b; b++; } return -1; } public: SubStyles(const char *baseStyles_, int styleFirst_, int stylesAvailable_, int secondaryDistance_) : classifications(0), baseStyles(baseStyles_), styleFirst(styleFirst_), stylesAvailable(stylesAvailable_), secondaryDistance(secondaryDistance_), allocated(0) { while (baseStyles[classifications]) { classifiers.push_back(WordClassifier(baseStyles[classifications])); classifications++; } } int Allocate(int styleBase, int numberStyles) { int block = BlockFromBaseStyle(styleBase); if (block >= 0) { if ((allocated + numberStyles) > stylesAvailable) return -1; int startBlock = styleFirst + allocated; allocated += numberStyles; classifiers[block].Allocate(startBlock, numberStyles); return startBlock; } else { return -1; } } int Start(int styleBase) { int block = BlockFromBaseStyle(styleBase); return (block >= 0) ? classifiers[block].Start() : -1; } int Length(int styleBase) { int block = BlockFromBaseStyle(styleBase); return (block >= 0) ? classifiers[block].Length() : 0; } int BaseStyle(int subStyle) const { int block = BlockFromStyle(subStyle); if (block >= 0) return classifiers[block].Base(); else return subStyle; } int DistanceToSecondaryStyles() const { return secondaryDistance; } void SetIdentifiers(int style, const char *identifiers) { int block = BlockFromStyle(style); if (block >= 0) classifiers[block].SetIdentifiers(style, identifiers); } void Free() { allocated = 0; for (std::vector::iterator it=classifiers.begin(); it != classifiers.end(); ++it) it->Clear(); } const WordClassifier &Classifier(int baseStyle) const { const int block = BlockFromBaseStyle(baseStyle); return classifiers[block >= 0 ? block : 0]; } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/lexlib/WordList.cpp000066400000000000000000000156331345112435200233410ustar00rootroot00000000000000// Scintilla source code edit control /** @file WordList.cxx ** Hold a list of words. **/ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include "StringCopy.h" #include "WordList.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif /** * Creates an array that points into each word in the string and puts \0 terminators * after each word. */ static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) { int prev = '\n'; int words = 0; // For rapid determination of whether a character is a separator, build // a look up table. bool wordSeparator[256]; for (int i=0; i<256; i++) { wordSeparator[i] = false; } wordSeparator[static_cast('\r')] = true; wordSeparator[static_cast('\n')] = true; if (!onlyLineEnds) { wordSeparator[static_cast(' ')] = true; wordSeparator[static_cast('\t')] = true; } for (int j = 0; wordlist[j]; j++) { int curr = static_cast(wordlist[j]); if (!wordSeparator[curr] && wordSeparator[prev]) words++; prev = curr; } char **keywords = new char *[words + 1]; int wordsStore = 0; const size_t slen = strlen(wordlist); if (words) { prev = '\0'; for (size_t k = 0; k < slen; k++) { if (!wordSeparator[static_cast(wordlist[k])]) { if (!prev) { keywords[wordsStore] = &wordlist[k]; wordsStore++; } } else { wordlist[k] = '\0'; } prev = wordlist[k]; } } keywords[wordsStore] = &wordlist[slen]; *len = wordsStore; return keywords; } WordList::WordList(bool onlyLineEnds_) : words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_) { // Prevent warnings by static analyzers about uninitialized starts. starts[0] = -1; } WordList::~WordList() { Clear(); } WordList::operator bool() const { return len ? true : false; } bool WordList::operator!=(const WordList &other) const { if (len != other.len) return true; for (int i=0; i(a), *static_cast(b)); } static void SortWordList(char **words, unsigned int len) { qsort(reinterpret_cast(words), len, sizeof(*words), cmpWords); } #endif void WordList::Set(const char *s) { Clear(); const size_t lenS = strlen(s) + 1; list = new char[lenS]; memcpy(list, s, lenS); words = ArrayFromWordList(list, &len, onlyLineEnds); #ifdef _MSC_VER std::sort(words, words + len, cmpWords); #else SortWordList(words, len); #endif for (unsigned int k = 0; k < ELEMENTS(starts); k++) starts[k] = -1; for (int l = len - 1; l >= 0; l--) { unsigned char indexChar = words[l][0]; starts[indexChar] = l; } } /** Check whether a string is in the list. * List elements are either exact matches or prefixes. * Prefix elements start with '^' and match all strings that start with the rest of the element * so '^GTK_' matches 'GTK_X', 'GTK_MAJOR_VERSION', and 'GTK_'. */ bool WordList::InList(const char *s) const { if (0 == words) return false; unsigned char firstChar = s[0]; int j = starts[firstChar]; if (j >= 0) { while (static_cast(words[j][0]) == firstChar) { if (s[1] == words[j][1]) { const char *a = words[j] + 1; const char *b = s + 1; while (*a && *a == *b) { a++; b++; } if (!*a && !*b) return true; } j++; } } j = starts[static_cast('^')]; if (j >= 0) { while (words[j][0] == '^') { const char *a = words[j] + 1; const char *b = s; while (*a && *a == *b) { a++; b++; } if (!*a) return true; j++; } } return false; } /** similar to InList, but word s can be a substring of keyword. * eg. the keyword define is defined as def~ine. This means the word must start * with def to be a keyword, but also defi, defin and define are valid. * The marker is ~ in this case. */ bool WordList::InListAbbreviated(const char *s, const char marker) const { if (0 == words) return false; unsigned char firstChar = s[0]; int j = starts[firstChar]; if (j >= 0) { while (static_cast(words[j][0]) == firstChar) { bool isSubword = false; int start = 1; if (words[j][1] == marker) { isSubword = true; start++; } if (s[1] == words[j][start]) { const char *a = words[j] + start; const char *b = s + 1; while (*a && *a == *b) { a++; if (*a == marker) { isSubword = true; a++; } b++; } if ((!*a || isSubword) && !*b) return true; } j++; } } j = starts[static_cast('^')]; if (j >= 0) { while (words[j][0] == '^') { const char *a = words[j] + 1; const char *b = s; while (*a && *a == *b) { a++; b++; } if (!*a) return true; j++; } } return false; } /** similar to InListAbbreviated, but word s can be a abridged version of a keyword. * eg. the keyword is defined as "after.~:". This means the word must have a prefix (begins with) of * "after." and suffix (ends with) of ":" to be a keyword, Hence "after.field:" , "after.form.item:" are valid. * Similarly "~.is.valid" keyword is suffix only... hence "field.is.valid" , "form.is.valid" are valid. * The marker is ~ in this case. * No multiple markers check is done and wont work. */ bool WordList::InListAbridged(const char *s, const char marker) const { if (0 == words) return false; unsigned char firstChar = s[0]; int j = starts[firstChar]; if (j >= 0) { while (static_cast(words[j][0]) == firstChar) { const char *a = words[j]; const char *b = s; while (*a && *a == *b) { a++; if (*a == marker) { a++; const size_t suffixLengthA = strlen(a); const size_t suffixLengthB = strlen(b); if (suffixLengthA >= suffixLengthB) break; b = b + suffixLengthB - suffixLengthA - 1; } b++; } if (!*a && !*b) return true; j++; } } j = starts[static_cast(marker)]; if (j >= 0) { while (words[j][0] == marker) { const char *a = words[j] + 1; const char *b = s; const size_t suffixLengthA = strlen(a); const size_t suffixLengthB = strlen(b); if (suffixLengthA > suffixLengthB) { j++; continue; } b = b + suffixLengthB - suffixLengthA; while (*a && *a == *b) { a++; b++; } if (!*a && !*b) return true; j++; } } return false; } const char *WordList::WordAt(int n) const { return words[n]; } sqlitebrowser-3.11.2/libs/qscintilla/lexlib/WordList.h000066400000000000000000000017751345112435200230100ustar00rootroot00000000000000// Scintilla source code edit control /** @file WordList.h ** Hold a list of words. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef WORDLIST_H #define WORDLIST_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /** */ class WordList { // Each word contains at least one character - a empty word acts as sentinel at the end. char **words; char *list; int len; bool onlyLineEnds; ///< Delimited by any white space or only line ends int starts[256]; public: explicit WordList(bool onlyLineEnds_ = false); ~WordList(); operator bool() const; bool operator!=(const WordList &other) const; int Length() const; void Clear(); void Set(const char *s); bool InList(const char *s) const; bool InListAbbreviated(const char *s, const char marker) const; bool InListAbridged(const char *s, const char marker) const; const char *WordAt(int n) const; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/000077500000000000000000000000001345112435200203665ustar00rootroot00000000000000sqlitebrowser-3.11.2/libs/qscintilla/src/AutoComplete.cpp000066400000000000000000000160561345112435200235030ustar00rootroot00000000000000// Scintilla source code edit control /** @file AutoComplete.cxx ** Defines the auto completion list box. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "CharacterSet.h" #include "Position.h" #include "AutoComplete.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif AutoComplete::AutoComplete() : active(false), separator(' '), typesep('?'), ignoreCase(false), chooseSingle(false), lb(0), posStart(0), startLen(0), cancelAtStartPos(true), autoHide(true), dropRestOfWord(false), ignoreCaseBehaviour(SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE), widthLBDefault(100), heightLBDefault(100), autoSort(SC_ORDER_PRESORTED) { lb = ListBox::Allocate(); } AutoComplete::~AutoComplete() { if (lb) { lb->Destroy(); delete lb; lb = 0; } } bool AutoComplete::Active() const { return active; } void AutoComplete::Start(Window &parent, int ctrlID, int position, Point location, int startLen_, int lineHeight, bool unicodeMode, int technology) { if (active) { Cancel(); } lb->Create(parent, ctrlID, location, lineHeight, unicodeMode, technology); lb->Clear(); active = true; startLen = startLen_; posStart = position; } void AutoComplete::SetStopChars(const char *stopChars_) { stopChars = stopChars_; } bool AutoComplete::IsStopChar(char ch) { return ch && (stopChars.find(ch) != std::string::npos); } void AutoComplete::SetFillUpChars(const char *fillUpChars_) { fillUpChars = fillUpChars_; } bool AutoComplete::IsFillUpChar(char ch) { return ch && (fillUpChars.find(ch) != std::string::npos); } void AutoComplete::SetSeparator(char separator_) { separator = separator_; } char AutoComplete::GetSeparator() const { return separator; } void AutoComplete::SetTypesep(char separator_) { typesep = separator_; } char AutoComplete::GetTypesep() const { return typesep; } struct Sorter { AutoComplete *ac; const char *list; std::vector indices; Sorter(AutoComplete *ac_, const char *list_) : ac(ac_), list(list_) { int i = 0; while (list[i]) { indices.push_back(i); // word start while (list[i] != ac->GetTypesep() && list[i] != ac->GetSeparator() && list[i]) ++i; indices.push_back(i); // word end if (list[i] == ac->GetTypesep()) { while (list[i] != ac->GetSeparator() && list[i]) ++i; } if (list[i] == ac->GetSeparator()) { ++i; // preserve trailing separator as blank entry if (!list[i]) { indices.push_back(i); indices.push_back(i); } } } indices.push_back(i); // index of last position } bool operator()(int a, int b) { int lenA = indices[a * 2 + 1] - indices[a * 2]; int lenB = indices[b * 2 + 1] - indices[b * 2]; int len = std::min(lenA, lenB); int cmp; if (ac->ignoreCase) cmp = CompareNCaseInsensitive(list + indices[a * 2], list + indices[b * 2], len); else cmp = strncmp(list + indices[a * 2], list + indices[b * 2], len); if (cmp == 0) cmp = lenA - lenB; return cmp < 0; } }; void AutoComplete::SetList(const char *list) { if (autoSort == SC_ORDER_PRESORTED) { lb->SetList(list, separator, typesep); sortMatrix.clear(); for (int i = 0; i < lb->Length(); ++i) sortMatrix.push_back(i); return; } Sorter IndexSort(this, list); sortMatrix.clear(); for (int i = 0; i < (int)IndexSort.indices.size() / 2; ++i) sortMatrix.push_back(i); std::sort(sortMatrix.begin(), sortMatrix.end(), IndexSort); if (autoSort == SC_ORDER_CUSTOM || sortMatrix.size() < 2) { lb->SetList(list, separator, typesep); PLATFORM_ASSERT(lb->Length() == static_cast(sortMatrix.size())); return; } std::string sortedList; char item[maxItemLen]; for (size_t i = 0; i < sortMatrix.size(); ++i) { int wordLen = IndexSort.indices[sortMatrix[i] * 2 + 2] - IndexSort.indices[sortMatrix[i] * 2]; if (wordLen > maxItemLen-2) wordLen = maxItemLen - 2; memcpy(item, list + IndexSort.indices[sortMatrix[i] * 2], wordLen); if ((i+1) == sortMatrix.size()) { // Last item so remove separator if present if ((wordLen > 0) && (item[wordLen-1] == separator)) wordLen--; } else { // Item before last needs a separator if ((wordLen == 0) || (item[wordLen-1] != separator)) { item[wordLen] = separator; wordLen++; } } item[wordLen] = '\0'; sortedList += item; } for (int i = 0; i < (int)sortMatrix.size(); ++i) sortMatrix[i] = i; lb->SetList(sortedList.c_str(), separator, typesep); } int AutoComplete::GetSelection() const { return lb->GetSelection(); } std::string AutoComplete::GetValue(int item) const { char value[maxItemLen]; lb->GetValue(item, value, sizeof(value)); return std::string(value); } void AutoComplete::Show(bool show) { lb->Show(show); if (show) lb->Select(0); } void AutoComplete::Cancel() { if (lb->Created()) { lb->Clear(); lb->Destroy(); active = false; } } void AutoComplete::Move(int delta) { int count = lb->Length(); int current = lb->GetSelection(); current += delta; if (current >= count) current = count - 1; if (current < 0) current = 0; lb->Select(current); } void AutoComplete::Select(const char *word) { size_t lenWord = strlen(word); int location = -1; int start = 0; // lower bound of the api array block to search int end = lb->Length() - 1; // upper bound of the api array block to search while ((start <= end) && (location == -1)) { // Binary searching loop int pivot = (start + end) / 2; char item[maxItemLen]; lb->GetValue(sortMatrix[pivot], item, maxItemLen); int cond; if (ignoreCase) cond = CompareNCaseInsensitive(word, item, lenWord); else cond = strncmp(word, item, lenWord); if (!cond) { // Find first match while (pivot > start) { lb->GetValue(sortMatrix[pivot-1], item, maxItemLen); if (ignoreCase) cond = CompareNCaseInsensitive(word, item, lenWord); else cond = strncmp(word, item, lenWord); if (0 != cond) break; --pivot; } location = pivot; if (ignoreCase && ignoreCaseBehaviour == SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE) { // Check for exact-case match for (; pivot <= end; pivot++) { lb->GetValue(sortMatrix[pivot], item, maxItemLen); if (!strncmp(word, item, lenWord)) { location = pivot; break; } if (CompareNCaseInsensitive(word, item, lenWord)) break; } } } else if (cond < 0) { end = pivot - 1; } else if (cond > 0) { start = pivot + 1; } } if (location == -1) { if (autoHide) Cancel(); else lb->Select(-1); } else { if (autoSort == SC_ORDER_CUSTOM) { // Check for a logically earlier match char item[maxItemLen]; for (int i = location + 1; i <= end; ++i) { lb->GetValue(sortMatrix[i], item, maxItemLen); if (CompareNCaseInsensitive(word, item, lenWord)) break; if (sortMatrix[i] < sortMatrix[location] && !strncmp(word, item, lenWord)) location = i; } } lb->Select(sortMatrix[location]); } } sqlitebrowser-3.11.2/libs/qscintilla/src/AutoComplete.h000066400000000000000000000052511345112435200231430ustar00rootroot00000000000000// Scintilla source code edit control /** @file AutoComplete.h ** Defines the auto completion list box. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef AUTOCOMPLETE_H #define AUTOCOMPLETE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /** */ class AutoComplete { bool active; std::string stopChars; std::string fillUpChars; char separator; char typesep; // Type seperator enum { maxItemLen=1000 }; std::vector sortMatrix; public: bool ignoreCase; bool chooseSingle; ListBox *lb; int posStart; int startLen; /// Should autocompletion be canceled if editor's currentPos <= startPos? bool cancelAtStartPos; bool autoHide; bool dropRestOfWord; unsigned int ignoreCaseBehaviour; int widthLBDefault; int heightLBDefault; /** SC_ORDER_PRESORTED: Assume the list is presorted; selection will fail if it is not alphabetical
* SC_ORDER_PERFORMSORT: Sort the list alphabetically; start up performance cost for sorting
* SC_ORDER_CUSTOM: Handle non-alphabetical entries; start up performance cost for generating a sorted lookup table */ int autoSort; AutoComplete(); ~AutoComplete(); /// Is the auto completion list displayed? bool Active() const; /// Display the auto completion list positioned to be near a character position void Start(Window &parent, int ctrlID, int position, Point location, int startLen_, int lineHeight, bool unicodeMode, int technology); /// The stop chars are characters which, when typed, cause the auto completion list to disappear void SetStopChars(const char *stopChars_); bool IsStopChar(char ch); /// The fillup chars are characters which, when typed, fill up the selected word void SetFillUpChars(const char *fillUpChars_); bool IsFillUpChar(char ch); /// The separator character is used when interpreting the list in SetList void SetSeparator(char separator_); char GetSeparator() const; /// The typesep character is used for separating the word from the type void SetTypesep(char separator_); char GetTypesep() const; /// The list string contains a sequence of words separated by the separator character void SetList(const char *list); /// Return the position of the currently selected list item int GetSelection() const; /// Return the value of an item in the list std::string GetValue(int item) const; void Show(bool show); void Cancel(); /// Move the current list element by delta, scrolling appropriately void Move(int delta); /// Select a list element that starts with word as the current element void Select(const char *word); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/CallTip.cpp000066400000000000000000000261461345112435200224330ustar00rootroot00000000000000// Scintilla source code edit control /** @file CallTip.cxx ** Code for displaying call tips. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "StringCopy.h" #include "Position.h" #include "CallTip.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif CallTip::CallTip() { wCallTip = 0; inCallTipMode = false; posStartCallTip = 0; rectUp = PRectangle(0,0,0,0); rectDown = PRectangle(0,0,0,0); lineHeight = 1; offsetMain = 0; startHighlight = 0; endHighlight = 0; tabSize = 0; above = false; useStyleCallTip = false; // for backwards compatibility insetX = 5; widthArrow = 14; borderHeight = 2; // Extra line for border and an empty line at top and bottom. verticalOffset = 1; #ifdef __APPLE__ // proper apple colours for the default colourBG = ColourDesired(0xff, 0xff, 0xc6); colourUnSel = ColourDesired(0, 0, 0); #else colourBG = ColourDesired(0xff, 0xff, 0xff); colourUnSel = ColourDesired(0x80, 0x80, 0x80); #endif colourSel = ColourDesired(0, 0, 0x80); colourShade = ColourDesired(0, 0, 0); colourLight = ColourDesired(0xc0, 0xc0, 0xc0); codePage = 0; clickPlace = 0; } CallTip::~CallTip() { font.Release(); wCallTip.Destroy(); } // Although this test includes 0, we should never see a \0 character. static bool IsArrowCharacter(char ch) { return (ch == 0) || (ch == '\001') || (ch == '\002'); } // We ignore tabs unless a tab width has been set. bool CallTip::IsTabCharacter(char ch) const { return (tabSize > 0) && (ch == '\t'); } int CallTip::NextTabPos(int x) const { if (tabSize > 0) { // paranoia... not called unless this is true x -= insetX; // position relative to text x = (x + tabSize) / tabSize; // tab "number" return tabSize*x + insetX; // position of next tab } else { return x + 1; // arbitrary } } // Draw a section of the call tip that does not include \n in one colour. // The text may include up to numEnds tabs or arrow characters. void CallTip::DrawChunk(Surface *surface, int &x, const char *s, int posStart, int posEnd, int ytext, PRectangle rcClient, bool highlight, bool draw) { s += posStart; int len = posEnd - posStart; // Divide the text into sections that are all text, or that are // single arrows or single tab characters (if tabSize > 0). int maxEnd = 0; const int numEnds = 10; int ends[numEnds + 2]; for (int i=0; i 0) ends[maxEnd++] = i; ends[maxEnd++] = i+1; } } ends[maxEnd++] = len; int startSeg = 0; int xEnd; for (int seg = 0; seg startSeg) { if (IsArrowCharacter(s[startSeg])) { xEnd = x + widthArrow; bool upArrow = s[startSeg] == '\001'; rcClient.left = static_cast(x); rcClient.right = static_cast(xEnd); if (draw) { const int halfWidth = widthArrow / 2 - 3; const int quarterWidth = halfWidth / 2; const int centreX = x + widthArrow / 2 - 1; const int centreY = static_cast(rcClient.top + rcClient.bottom) / 2; surface->FillRectangle(rcClient, colourBG); PRectangle rcClientInner(rcClient.left + 1, rcClient.top + 1, rcClient.right - 2, rcClient.bottom - 1); surface->FillRectangle(rcClientInner, colourUnSel); if (upArrow) { // Up arrow Point pts[] = { Point::FromInts(centreX - halfWidth, centreY + quarterWidth), Point::FromInts(centreX + halfWidth, centreY + quarterWidth), Point::FromInts(centreX, centreY - halfWidth + quarterWidth), }; surface->Polygon(pts, ELEMENTS(pts), colourBG, colourBG); } else { // Down arrow Point pts[] = { Point::FromInts(centreX - halfWidth, centreY - quarterWidth), Point::FromInts(centreX + halfWidth, centreY - quarterWidth), Point::FromInts(centreX, centreY + halfWidth - quarterWidth), }; surface->Polygon(pts, ELEMENTS(pts), colourBG, colourBG); } } offsetMain = xEnd; if (upArrow) { rectUp = rcClient; } else { rectDown = rcClient; } } else if (IsTabCharacter(s[startSeg])) { xEnd = NextTabPos(x); } else { xEnd = x + RoundXYPosition(surface->WidthText(font, s + startSeg, endSeg - startSeg)); if (draw) { rcClient.left = static_cast(x); rcClient.right = static_cast(xEnd); surface->DrawTextTransparent(rcClient, font, static_cast(ytext), s+startSeg, endSeg - startSeg, highlight ? colourSel : colourUnSel); } } x = xEnd; startSeg = endSeg; } } } int CallTip::PaintContents(Surface *surfaceWindow, bool draw) { PRectangle rcClientPos = wCallTip.GetClientPosition(); PRectangle rcClientSize(0.0f, 0.0f, rcClientPos.right - rcClientPos.left, rcClientPos.bottom - rcClientPos.top); PRectangle rcClient(1.0f, 1.0f, rcClientSize.right - 1, rcClientSize.bottom - 1); // To make a nice small call tip window, it is only sized to fit most normal characters without accents int ascent = RoundXYPosition(surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font)); // For each line... // Draw the definition in three parts: before highlight, highlighted, after highlight int ytext = static_cast(rcClient.top) + ascent + 1; rcClient.bottom = ytext + surfaceWindow->Descent(font) + 1; const char *chunkVal = val.c_str(); bool moreChunks = true; int maxWidth = 0; while (moreChunks) { const char *chunkEnd = strchr(chunkVal, '\n'); if (chunkEnd == NULL) { chunkEnd = chunkVal + strlen(chunkVal); moreChunks = false; } int chunkOffset = static_cast(chunkVal - val.c_str()); int chunkLength = static_cast(chunkEnd - chunkVal); int chunkEndOffset = chunkOffset + chunkLength; int thisStartHighlight = Platform::Maximum(startHighlight, chunkOffset); thisStartHighlight = Platform::Minimum(thisStartHighlight, chunkEndOffset); thisStartHighlight -= chunkOffset; int thisEndHighlight = Platform::Maximum(endHighlight, chunkOffset); thisEndHighlight = Platform::Minimum(thisEndHighlight, chunkEndOffset); thisEndHighlight -= chunkOffset; rcClient.top = static_cast(ytext - ascent - 1); int x = insetX; // start each line at this inset DrawChunk(surfaceWindow, x, chunkVal, 0, thisStartHighlight, ytext, rcClient, false, draw); DrawChunk(surfaceWindow, x, chunkVal, thisStartHighlight, thisEndHighlight, ytext, rcClient, true, draw); DrawChunk(surfaceWindow, x, chunkVal, thisEndHighlight, chunkLength, ytext, rcClient, false, draw); chunkVal = chunkEnd + 1; ytext += lineHeight; rcClient.bottom += lineHeight; maxWidth = Platform::Maximum(maxWidth, x); } return maxWidth; } void CallTip::PaintCT(Surface *surfaceWindow) { if (val.empty()) return; PRectangle rcClientPos = wCallTip.GetClientPosition(); PRectangle rcClientSize(0.0f, 0.0f, rcClientPos.right - rcClientPos.left, rcClientPos.bottom - rcClientPos.top); PRectangle rcClient(1.0f, 1.0f, rcClientSize.right - 1, rcClientSize.bottom - 1); surfaceWindow->FillRectangle(rcClient, colourBG); offsetMain = insetX; // initial alignment assuming no arrows PaintContents(surfaceWindow, true); #ifndef __APPLE__ // OSX doesn't put borders on "help tags" // Draw a raised border around the edges of the window surfaceWindow->MoveTo(0, static_cast(rcClientSize.bottom) - 1); surfaceWindow->PenColour(colourShade); surfaceWindow->LineTo(static_cast(rcClientSize.right) - 1, static_cast(rcClientSize.bottom) - 1); surfaceWindow->LineTo(static_cast(rcClientSize.right) - 1, 0); surfaceWindow->PenColour(colourLight); surfaceWindow->LineTo(0, 0); surfaceWindow->LineTo(0, static_cast(rcClientSize.bottom) - 1); #endif } void CallTip::MouseClick(Point pt) { clickPlace = 0; if (rectUp.Contains(pt)) clickPlace = 1; if (rectDown.Contains(pt)) clickPlace = 2; } PRectangle CallTip::CallTipStart(int pos, Point pt, int textHeight, const char *defn, const char *faceName, int size, int codePage_, int characterSet, int technology, Window &wParent) { clickPlace = 0; val = defn; codePage = codePage_; Surface *surfaceMeasure = Surface::Allocate(technology); if (!surfaceMeasure) return PRectangle(); surfaceMeasure->Init(wParent.GetID()); surfaceMeasure->SetUnicodeMode(SC_CP_UTF8 == codePage); surfaceMeasure->SetDBCSMode(codePage); startHighlight = 0; endHighlight = 0; inCallTipMode = true; posStartCallTip = pos; XYPOSITION deviceHeight = static_cast(surfaceMeasure->DeviceHeightFont(size)); FontParameters fp(faceName, deviceHeight / SC_FONT_SIZE_MULTIPLIER, SC_WEIGHT_NORMAL, false, 0, technology, characterSet); font.Create(fp); // Look for multiple lines in the text // Only support \n here - simply means container must avoid \r! int numLines = 1; const char *newline; const char *look = val.c_str(); rectUp = PRectangle(0,0,0,0); rectDown = PRectangle(0,0,0,0); offsetMain = insetX; // changed to right edge of any arrows int width = PaintContents(surfaceMeasure, false) + insetX; while ((newline = strchr(look, '\n')) != NULL) { look = newline + 1; numLines++; } lineHeight = RoundXYPosition(surfaceMeasure->Height(font)); // The returned // rectangle is aligned to the right edge of the last arrow encountered in // the tip text, else to the tip text left edge. int height = lineHeight * numLines - static_cast(surfaceMeasure->InternalLeading(font)) + borderHeight * 2; delete surfaceMeasure; if (above) { return PRectangle(pt.x - offsetMain, pt.y - verticalOffset - height, pt.x + width - offsetMain, pt.y - verticalOffset); } else { return PRectangle(pt.x - offsetMain, pt.y + verticalOffset + textHeight, pt.x + width - offsetMain, pt.y + verticalOffset + textHeight + height); } } void CallTip::CallTipCancel() { inCallTipMode = false; if (wCallTip.Created()) { wCallTip.Destroy(); } } void CallTip::SetHighlight(int start, int end) { // Avoid flashing by checking something has really changed if ((start != startHighlight) || (end != endHighlight)) { startHighlight = start; endHighlight = (end > start) ? end : start; if (wCallTip.Created()) { wCallTip.InvalidateAll(); } } } // Set the tab size (sizes > 0 enable the use of tabs). This also enables the // use of the STYLE_CALLTIP. void CallTip::SetTabSize(int tabSz) { tabSize = tabSz; useStyleCallTip = true; } // Set the calltip position, below the text by default or if above is false // else above the text. void CallTip::SetPosition(bool aboveText) { above = aboveText; } // It might be better to have two access functions for this and to use // them for all settings of colours. void CallTip::SetForeBack(const ColourDesired &fore, const ColourDesired &back) { colourBG = back; colourUnSel = fore; } sqlitebrowser-3.11.2/libs/qscintilla/src/CallTip.h000066400000000000000000000053061345112435200220730ustar00rootroot00000000000000// Scintilla source code edit control /** @file CallTip.h ** Interface to the call tip control. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CALLTIP_H #define CALLTIP_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /** */ class CallTip { int startHighlight; // character offset to start and... int endHighlight; // ...end of highlighted text std::string val; Font font; PRectangle rectUp; // rectangle of last up angle in the tip PRectangle rectDown; // rectangle of last down arrow in the tip int lineHeight; // vertical line spacing int offsetMain; // The alignment point of the call tip int tabSize; // Tab size in pixels, <=0 no TAB expand bool useStyleCallTip; // if true, STYLE_CALLTIP should be used bool above; // if true, display calltip above text // Private so CallTip objects can not be copied CallTip(const CallTip &); CallTip &operator=(const CallTip &); void DrawChunk(Surface *surface, int &x, const char *s, int posStart, int posEnd, int ytext, PRectangle rcClient, bool highlight, bool draw); int PaintContents(Surface *surfaceWindow, bool draw); bool IsTabCharacter(char c) const; int NextTabPos(int x) const; public: Window wCallTip; Window wDraw; bool inCallTipMode; int posStartCallTip; ColourDesired colourBG; ColourDesired colourUnSel; ColourDesired colourSel; ColourDesired colourShade; ColourDesired colourLight; int codePage; int clickPlace; int insetX; // text inset in x from calltip border int widthArrow; int borderHeight; int verticalOffset; // pixel offset up or down of the calltip with respect to the line CallTip(); ~CallTip(); void PaintCT(Surface *surfaceWindow); void MouseClick(Point pt); /// Setup the calltip and return a rectangle of the area required. PRectangle CallTipStart(int pos, Point pt, int textHeight, const char *defn, const char *faceName, int size, int codePage_, int characterSet, int technology, Window &wParent); void CallTipCancel(); /// Set a range of characters to be displayed in a highlight style. /// Commonly used to highlight the current parameter. void SetHighlight(int start, int end); /// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand. void SetTabSize(int tabSz); /// Set calltip position. void SetPosition(bool aboveText); /// Used to determine which STYLE_xxxx to use for call tip information bool UseStyleCallTip() const { return useStyleCallTip;} // Modify foreground and background colours void SetForeBack(const ColourDesired &fore, const ColourDesired &back); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/CaseConvert.cpp000066400000000000000000000453761345112435200233250ustar00rootroot00000000000000// Scintilla source code edit control // Encoding: UTF-8 /** @file CaseConvert.cxx ** Case fold characters and convert them to upper or lower case. ** Tables automatically regenerated by scripts/GenerateCaseConvert.py ** Should only be rarely regenerated for new versions of Unicode. **/ // Copyright 2013 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include "StringCopy.h" #include "CaseConvert.h" #include "UniConversion.h" #include "UnicodeFromUTF8.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif namespace { // Use an unnamed namespace to protect the declarations from name conflicts // Unicode code points are ordered by groups and follow patterns. // Most characters (pitch==1) are in ranges for a particular alphabet and their // upper case forms are a fixed distance away. // Another pattern (pitch==2) is where each lower case letter is preceded by // the upper case form. These are also grouped into ranges. int symmetricCaseConversionRanges[] = { //lower, upper, range length, range pitch //++Autogenerated -- start of section automatically generated //**\(\*\n\) 97,65,26,1, 224,192,23,1, 248,216,7,1, 257,256,24,2, 314,313,8,2, 331,330,23,2, 462,461,8,2, 479,478,9,2, 505,504,20,2, 547,546,9,2, 583,582,5,2, 945,913,17,1, 963,931,9,1, 985,984,12,2, 1072,1040,32,1, 1104,1024,16,1, 1121,1120,17,2, 1163,1162,27,2, 1218,1217,7,2, 1233,1232,44,2, 1377,1329,38,1, 7681,7680,75,2, 7841,7840,48,2, 7936,7944,8,1, 7952,7960,6,1, 7968,7976,8,1, 7984,7992,8,1, 8000,8008,6,1, 8032,8040,8,1, 8560,8544,16,1, 9424,9398,26,1, 11312,11264,47,1, 11393,11392,50,2, 11520,4256,38,1, 42561,42560,23,2, 42625,42624,12,2, 42787,42786,7,2, 42803,42802,31,2, 42879,42878,5,2, 42913,42912,5,2, 65345,65313,26,1, 66600,66560,40,1, //--Autogenerated -- end of section automatically generated }; // Code points that are symmetric but don't fit into a range of similar characters // are listed here. int symmetricCaseConversions[] = { //lower, upper //++Autogenerated -- start of section automatically generated //**1 \(\*\n\) 255,376, 307,306, 309,308, 311,310, 378,377, 380,379, 382,381, 384,579, 387,386, 389,388, 392,391, 396,395, 402,401, 405,502, 409,408, 410,573, 414,544, 417,416, 419,418, 421,420, 424,423, 429,428, 432,431, 436,435, 438,437, 441,440, 445,444, 447,503, 454,452, 457,455, 460,458, 477,398, 499,497, 501,500, 572,571, 575,11390, 576,11391, 578,577, 592,11375, 593,11373, 594,11376, 595,385, 596,390, 598,393, 599,394, 601,399, 603,400, 608,403, 611,404, 613,42893, 614,42922, 616,407, 617,406, 619,11362, 623,412, 625,11374, 626,413, 629,415, 637,11364, 640,422, 643,425, 648,430, 649,580, 650,433, 651,434, 652,581, 658,439, 881,880, 883,882, 887,886, 891,1021, 892,1022, 893,1023, 940,902, 941,904, 942,905, 943,906, 972,908, 973,910, 974,911, 983,975, 1010,1017, 1016,1015, 1019,1018, 1231,1216, 7545,42877, 7549,11363, 8017,8025, 8019,8027, 8021,8029, 8023,8031, 8048,8122, 8049,8123, 8050,8136, 8051,8137, 8052,8138, 8053,8139, 8054,8154, 8055,8155, 8056,8184, 8057,8185, 8058,8170, 8059,8171, 8060,8186, 8061,8187, 8112,8120, 8113,8121, 8144,8152, 8145,8153, 8160,8168, 8161,8169, 8165,8172, 8526,8498, 8580,8579, 11361,11360, 11365,570, 11366,574, 11368,11367, 11370,11369, 11372,11371, 11379,11378, 11382,11381, 11500,11499, 11502,11501, 11507,11506, 11559,4295, 11565,4301, 42874,42873, 42876,42875, 42892,42891, 42897,42896, 42899,42898, //--Autogenerated -- end of section automatically generated }; // Characters that have complex case conversions are listed here. // This includes cases where more than one character is needed for a conversion, // folding is different to lowering, or (as appropriate) upper(lower(x)) != x or // lower(upper(x)) != x. const char *complexCaseConversions = // Original | Folded | Upper | Lower | //++Autogenerated -- start of section automatically generated //**2 \(\*\n\) "\xc2\xb5|\xce\xbc|\xce\x9c||" "\xc3\x9f|ss|SS||" "\xc4\xb0|i\xcc\x87||i\xcc\x87|" "\xc4\xb1||I||" "\xc5\x89|\xca\xbcn|\xca\xbcN||" "\xc5\xbf|s|S||" "\xc7\x85|\xc7\x86|\xc7\x84|\xc7\x86|" "\xc7\x88|\xc7\x89|\xc7\x87|\xc7\x89|" "\xc7\x8b|\xc7\x8c|\xc7\x8a|\xc7\x8c|" "\xc7\xb0|j\xcc\x8c|J\xcc\x8c||" "\xc7\xb2|\xc7\xb3|\xc7\xb1|\xc7\xb3|" "\xcd\x85|\xce\xb9|\xce\x99||" "\xce\x90|\xce\xb9\xcc\x88\xcc\x81|\xce\x99\xcc\x88\xcc\x81||" "\xce\xb0|\xcf\x85\xcc\x88\xcc\x81|\xce\xa5\xcc\x88\xcc\x81||" "\xcf\x82|\xcf\x83|\xce\xa3||" "\xcf\x90|\xce\xb2|\xce\x92||" "\xcf\x91|\xce\xb8|\xce\x98||" "\xcf\x95|\xcf\x86|\xce\xa6||" "\xcf\x96|\xcf\x80|\xce\xa0||" "\xcf\xb0|\xce\xba|\xce\x9a||" "\xcf\xb1|\xcf\x81|\xce\xa1||" "\xcf\xb4|\xce\xb8||\xce\xb8|" "\xcf\xb5|\xce\xb5|\xce\x95||" "\xd6\x87|\xd5\xa5\xd6\x82|\xd4\xb5\xd5\x92||" "\xe1\xba\x96|h\xcc\xb1|H\xcc\xb1||" "\xe1\xba\x97|t\xcc\x88|T\xcc\x88||" "\xe1\xba\x98|w\xcc\x8a|W\xcc\x8a||" "\xe1\xba\x99|y\xcc\x8a|Y\xcc\x8a||" "\xe1\xba\x9a|a\xca\xbe|A\xca\xbe||" "\xe1\xba\x9b|\xe1\xb9\xa1|\xe1\xb9\xa0||" "\xe1\xba\x9e|ss||\xc3\x9f|" "\xe1\xbd\x90|\xcf\x85\xcc\x93|\xce\xa5\xcc\x93||" "\xe1\xbd\x92|\xcf\x85\xcc\x93\xcc\x80|\xce\xa5\xcc\x93\xcc\x80||" "\xe1\xbd\x94|\xcf\x85\xcc\x93\xcc\x81|\xce\xa5\xcc\x93\xcc\x81||" "\xe1\xbd\x96|\xcf\x85\xcc\x93\xcd\x82|\xce\xa5\xcc\x93\xcd\x82||" "\xe1\xbe\x80|\xe1\xbc\x80\xce\xb9|\xe1\xbc\x88\xce\x99||" "\xe1\xbe\x81|\xe1\xbc\x81\xce\xb9|\xe1\xbc\x89\xce\x99||" "\xe1\xbe\x82|\xe1\xbc\x82\xce\xb9|\xe1\xbc\x8a\xce\x99||" "\xe1\xbe\x83|\xe1\xbc\x83\xce\xb9|\xe1\xbc\x8b\xce\x99||" "\xe1\xbe\x84|\xe1\xbc\x84\xce\xb9|\xe1\xbc\x8c\xce\x99||" "\xe1\xbe\x85|\xe1\xbc\x85\xce\xb9|\xe1\xbc\x8d\xce\x99||" "\xe1\xbe\x86|\xe1\xbc\x86\xce\xb9|\xe1\xbc\x8e\xce\x99||" "\xe1\xbe\x87|\xe1\xbc\x87\xce\xb9|\xe1\xbc\x8f\xce\x99||" "\xe1\xbe\x88|\xe1\xbc\x80\xce\xb9|\xe1\xbc\x88\xce\x99|\xe1\xbe\x80|" "\xe1\xbe\x89|\xe1\xbc\x81\xce\xb9|\xe1\xbc\x89\xce\x99|\xe1\xbe\x81|" "\xe1\xbe\x8a|\xe1\xbc\x82\xce\xb9|\xe1\xbc\x8a\xce\x99|\xe1\xbe\x82|" "\xe1\xbe\x8b|\xe1\xbc\x83\xce\xb9|\xe1\xbc\x8b\xce\x99|\xe1\xbe\x83|" "\xe1\xbe\x8c|\xe1\xbc\x84\xce\xb9|\xe1\xbc\x8c\xce\x99|\xe1\xbe\x84|" "\xe1\xbe\x8d|\xe1\xbc\x85\xce\xb9|\xe1\xbc\x8d\xce\x99|\xe1\xbe\x85|" "\xe1\xbe\x8e|\xe1\xbc\x86\xce\xb9|\xe1\xbc\x8e\xce\x99|\xe1\xbe\x86|" "\xe1\xbe\x8f|\xe1\xbc\x87\xce\xb9|\xe1\xbc\x8f\xce\x99|\xe1\xbe\x87|" "\xe1\xbe\x90|\xe1\xbc\xa0\xce\xb9|\xe1\xbc\xa8\xce\x99||" "\xe1\xbe\x91|\xe1\xbc\xa1\xce\xb9|\xe1\xbc\xa9\xce\x99||" "\xe1\xbe\x92|\xe1\xbc\xa2\xce\xb9|\xe1\xbc\xaa\xce\x99||" "\xe1\xbe\x93|\xe1\xbc\xa3\xce\xb9|\xe1\xbc\xab\xce\x99||" "\xe1\xbe\x94|\xe1\xbc\xa4\xce\xb9|\xe1\xbc\xac\xce\x99||" "\xe1\xbe\x95|\xe1\xbc\xa5\xce\xb9|\xe1\xbc\xad\xce\x99||" "\xe1\xbe\x96|\xe1\xbc\xa6\xce\xb9|\xe1\xbc\xae\xce\x99||" "\xe1\xbe\x97|\xe1\xbc\xa7\xce\xb9|\xe1\xbc\xaf\xce\x99||" "\xe1\xbe\x98|\xe1\xbc\xa0\xce\xb9|\xe1\xbc\xa8\xce\x99|\xe1\xbe\x90|" "\xe1\xbe\x99|\xe1\xbc\xa1\xce\xb9|\xe1\xbc\xa9\xce\x99|\xe1\xbe\x91|" "\xe1\xbe\x9a|\xe1\xbc\xa2\xce\xb9|\xe1\xbc\xaa\xce\x99|\xe1\xbe\x92|" "\xe1\xbe\x9b|\xe1\xbc\xa3\xce\xb9|\xe1\xbc\xab\xce\x99|\xe1\xbe\x93|" "\xe1\xbe\x9c|\xe1\xbc\xa4\xce\xb9|\xe1\xbc\xac\xce\x99|\xe1\xbe\x94|" "\xe1\xbe\x9d|\xe1\xbc\xa5\xce\xb9|\xe1\xbc\xad\xce\x99|\xe1\xbe\x95|" "\xe1\xbe\x9e|\xe1\xbc\xa6\xce\xb9|\xe1\xbc\xae\xce\x99|\xe1\xbe\x96|" "\xe1\xbe\x9f|\xe1\xbc\xa7\xce\xb9|\xe1\xbc\xaf\xce\x99|\xe1\xbe\x97|" "\xe1\xbe\xa0|\xe1\xbd\xa0\xce\xb9|\xe1\xbd\xa8\xce\x99||" "\xe1\xbe\xa1|\xe1\xbd\xa1\xce\xb9|\xe1\xbd\xa9\xce\x99||" "\xe1\xbe\xa2|\xe1\xbd\xa2\xce\xb9|\xe1\xbd\xaa\xce\x99||" "\xe1\xbe\xa3|\xe1\xbd\xa3\xce\xb9|\xe1\xbd\xab\xce\x99||" "\xe1\xbe\xa4|\xe1\xbd\xa4\xce\xb9|\xe1\xbd\xac\xce\x99||" "\xe1\xbe\xa5|\xe1\xbd\xa5\xce\xb9|\xe1\xbd\xad\xce\x99||" "\xe1\xbe\xa6|\xe1\xbd\xa6\xce\xb9|\xe1\xbd\xae\xce\x99||" "\xe1\xbe\xa7|\xe1\xbd\xa7\xce\xb9|\xe1\xbd\xaf\xce\x99||" "\xe1\xbe\xa8|\xe1\xbd\xa0\xce\xb9|\xe1\xbd\xa8\xce\x99|\xe1\xbe\xa0|" "\xe1\xbe\xa9|\xe1\xbd\xa1\xce\xb9|\xe1\xbd\xa9\xce\x99|\xe1\xbe\xa1|" "\xe1\xbe\xaa|\xe1\xbd\xa2\xce\xb9|\xe1\xbd\xaa\xce\x99|\xe1\xbe\xa2|" "\xe1\xbe\xab|\xe1\xbd\xa3\xce\xb9|\xe1\xbd\xab\xce\x99|\xe1\xbe\xa3|" "\xe1\xbe\xac|\xe1\xbd\xa4\xce\xb9|\xe1\xbd\xac\xce\x99|\xe1\xbe\xa4|" "\xe1\xbe\xad|\xe1\xbd\xa5\xce\xb9|\xe1\xbd\xad\xce\x99|\xe1\xbe\xa5|" "\xe1\xbe\xae|\xe1\xbd\xa6\xce\xb9|\xe1\xbd\xae\xce\x99|\xe1\xbe\xa6|" "\xe1\xbe\xaf|\xe1\xbd\xa7\xce\xb9|\xe1\xbd\xaf\xce\x99|\xe1\xbe\xa7|" "\xe1\xbe\xb2|\xe1\xbd\xb0\xce\xb9|\xe1\xbe\xba\xce\x99||" "\xe1\xbe\xb3|\xce\xb1\xce\xb9|\xce\x91\xce\x99||" "\xe1\xbe\xb4|\xce\xac\xce\xb9|\xce\x86\xce\x99||" "\xe1\xbe\xb6|\xce\xb1\xcd\x82|\xce\x91\xcd\x82||" "\xe1\xbe\xb7|\xce\xb1\xcd\x82\xce\xb9|\xce\x91\xcd\x82\xce\x99||" "\xe1\xbe\xbc|\xce\xb1\xce\xb9|\xce\x91\xce\x99|\xe1\xbe\xb3|" "\xe1\xbe\xbe|\xce\xb9|\xce\x99||" "\xe1\xbf\x82|\xe1\xbd\xb4\xce\xb9|\xe1\xbf\x8a\xce\x99||" "\xe1\xbf\x83|\xce\xb7\xce\xb9|\xce\x97\xce\x99||" "\xe1\xbf\x84|\xce\xae\xce\xb9|\xce\x89\xce\x99||" "\xe1\xbf\x86|\xce\xb7\xcd\x82|\xce\x97\xcd\x82||" "\xe1\xbf\x87|\xce\xb7\xcd\x82\xce\xb9|\xce\x97\xcd\x82\xce\x99||" "\xe1\xbf\x8c|\xce\xb7\xce\xb9|\xce\x97\xce\x99|\xe1\xbf\x83|" "\xe1\xbf\x92|\xce\xb9\xcc\x88\xcc\x80|\xce\x99\xcc\x88\xcc\x80||" "\xe1\xbf\x93|\xce\xb9\xcc\x88\xcc\x81|\xce\x99\xcc\x88\xcc\x81||" "\xe1\xbf\x96|\xce\xb9\xcd\x82|\xce\x99\xcd\x82||" "\xe1\xbf\x97|\xce\xb9\xcc\x88\xcd\x82|\xce\x99\xcc\x88\xcd\x82||" "\xe1\xbf\xa2|\xcf\x85\xcc\x88\xcc\x80|\xce\xa5\xcc\x88\xcc\x80||" "\xe1\xbf\xa3|\xcf\x85\xcc\x88\xcc\x81|\xce\xa5\xcc\x88\xcc\x81||" "\xe1\xbf\xa4|\xcf\x81\xcc\x93|\xce\xa1\xcc\x93||" "\xe1\xbf\xa6|\xcf\x85\xcd\x82|\xce\xa5\xcd\x82||" "\xe1\xbf\xa7|\xcf\x85\xcc\x88\xcd\x82|\xce\xa5\xcc\x88\xcd\x82||" "\xe1\xbf\xb2|\xe1\xbd\xbc\xce\xb9|\xe1\xbf\xba\xce\x99||" "\xe1\xbf\xb3|\xcf\x89\xce\xb9|\xce\xa9\xce\x99||" "\xe1\xbf\xb4|\xcf\x8e\xce\xb9|\xce\x8f\xce\x99||" "\xe1\xbf\xb6|\xcf\x89\xcd\x82|\xce\xa9\xcd\x82||" "\xe1\xbf\xb7|\xcf\x89\xcd\x82\xce\xb9|\xce\xa9\xcd\x82\xce\x99||" "\xe1\xbf\xbc|\xcf\x89\xce\xb9|\xce\xa9\xce\x99|\xe1\xbf\xb3|" "\xe2\x84\xa6|\xcf\x89||\xcf\x89|" "\xe2\x84\xaa|k||k|" "\xe2\x84\xab|\xc3\xa5||\xc3\xa5|" "\xef\xac\x80|ff|FF||" "\xef\xac\x81|fi|FI||" "\xef\xac\x82|fl|FL||" "\xef\xac\x83|ffi|FFI||" "\xef\xac\x84|ffl|FFL||" "\xef\xac\x85|st|ST||" "\xef\xac\x86|st|ST||" "\xef\xac\x93|\xd5\xb4\xd5\xb6|\xd5\x84\xd5\x86||" "\xef\xac\x94|\xd5\xb4\xd5\xa5|\xd5\x84\xd4\xb5||" "\xef\xac\x95|\xd5\xb4\xd5\xab|\xd5\x84\xd4\xbb||" "\xef\xac\x96|\xd5\xbe\xd5\xb6|\xd5\x8e\xd5\x86||" "\xef\xac\x97|\xd5\xb4\xd5\xad|\xd5\x84\xd4\xbd||" //--Autogenerated -- end of section automatically generated ; class CaseConverter : public ICaseConverter { // Maximum length of a case conversion result is 6 bytes in UTF-8 enum { maxConversionLength=6 }; struct ConversionString { char conversion[maxConversionLength+1]; ConversionString() { conversion[0] = '\0'; } }; // Conversions are initially store in a vector of structs but then decomposed into // parallel arrays as that is about 10% faster to search. struct CharacterConversion { int character; ConversionString conversion; CharacterConversion(int character_=0, const char *conversion_="") : character(character_) { StringCopy(conversion.conversion, conversion_); } bool operator<(const CharacterConversion &other) const { return character < other.character; } }; typedef std::vector CharacterToConversion; CharacterToConversion characterToConversion; // The parallel arrays std::vector characters; std::vector conversions; public: CaseConverter() { } bool Initialised() const { return characters.size() > 0; } void Add(int character, const char *conversion) { characterToConversion.push_back(CharacterConversion(character, conversion)); } const char *Find(int character) { const std::vector::iterator it = std::lower_bound(characters.begin(), characters.end(), character); if (it == characters.end()) return 0; else if (*it == character) return conversions[it - characters.begin()].conversion; else return 0; } size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed) { size_t lenConverted = 0; size_t mixedPos = 0; unsigned char bytes[UTF8MaxBytes + 1]; while (mixedPos < lenMixed) { const unsigned char leadByte = static_cast(mixed[mixedPos]); const char *caseConverted = 0; size_t lenMixedChar = 1; if (UTF8IsAscii(leadByte)) { caseConverted = Find(leadByte); } else { bytes[0] = leadByte; const int widthCharBytes = UTF8BytesOfLead[leadByte]; for (int b=1; b= sizeConverted) return 0; } } else { // Character has no conversion so copy the input to output for (size_t i=0; i= sizeConverted) return 0; } } mixedPos += lenMixedChar; } return lenConverted; } void FinishedAdding() { std::sort(characterToConversion.begin(), characterToConversion.end()); characters.reserve(characterToConversion.size()); conversions.reserve(characterToConversion.size()); for (CharacterToConversion::iterator it = characterToConversion.begin(); it != characterToConversion.end(); ++it) { characters.push_back(it->character); conversions.push_back(it->conversion); } // Empty the original calculated data completely CharacterToConversion().swap(characterToConversion); } }; CaseConverter caseConvFold; CaseConverter caseConvUp; CaseConverter caseConvLow; void UTF8FromUTF32Character(int uch, char *putf) { size_t k = 0; if (uch < 0x80) { putf[k++] = static_cast(uch); } else if (uch < 0x800) { putf[k++] = static_cast(0xC0 | (uch >> 6)); putf[k++] = static_cast(0x80 | (uch & 0x3f)); } else if (uch < 0x10000) { putf[k++] = static_cast(0xE0 | (uch >> 12)); putf[k++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); putf[k++] = static_cast(0x80 | (uch & 0x3f)); } else { putf[k++] = static_cast(0xF0 | (uch >> 18)); putf[k++] = static_cast(0x80 | ((uch >> 12) & 0x3f)); putf[k++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); putf[k++] = static_cast(0x80 | (uch & 0x3f)); } putf[k] = 0; } void AddSymmetric(enum CaseConversion conversion, int lower,int upper) { char lowerUTF8[UTF8MaxBytes+1]; UTF8FromUTF32Character(lower, lowerUTF8); char upperUTF8[UTF8MaxBytes+1]; UTF8FromUTF32Character(upper, upperUTF8); switch (conversion) { case CaseConversionFold: caseConvFold.Add(upper, lowerUTF8); break; case CaseConversionUpper: caseConvUp.Add(lower, upperUTF8); break; case CaseConversionLower: caseConvLow.Add(upper, lowerUTF8); break; } } void SetupConversions(enum CaseConversion conversion) { // First initialize for the symmetric ranges for (size_t i=0; i(originUTF8)); if (conversion == CaseConversionFold && foldedUTF8[0]) { caseConvFold.Add(character, foldedUTF8); } if (conversion == CaseConversionUpper && upperUTF8[0]) { caseConvUp.Add(character, upperUTF8); } if (conversion == CaseConversionLower && lowerUTF8[0]) { caseConvLow.Add(character, lowerUTF8); } } switch (conversion) { case CaseConversionFold: caseConvFold.FinishedAdding(); break; case CaseConversionUpper: caseConvUp.FinishedAdding(); break; case CaseConversionLower: caseConvLow.FinishedAdding(); break; } } CaseConverter *ConverterForConversion(enum CaseConversion conversion) { switch (conversion) { case CaseConversionFold: return &caseConvFold; case CaseConversionUpper: return &caseConvUp; case CaseConversionLower: return &caseConvLow; } return 0; } } #ifdef SCI_NAMESPACE namespace Scintilla { #endif ICaseConverter *ConverterFor(enum CaseConversion conversion) { CaseConverter *pCaseConv = ConverterForConversion(conversion); if (!pCaseConv->Initialised()) SetupConversions(conversion); return pCaseConv; } const char *CaseConvert(int character, enum CaseConversion conversion) { CaseConverter *pCaseConv = ConverterForConversion(conversion); if (!pCaseConv->Initialised()) SetupConversions(conversion); return pCaseConv->Find(character); } size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed, enum CaseConversion conversion) { CaseConverter *pCaseConv = ConverterForConversion(conversion); if (!pCaseConv->Initialised()) SetupConversions(conversion); return pCaseConv->CaseConvertString(converted, sizeConverted, mixed, lenMixed); } std::string CaseConvertString(const std::string &s, enum CaseConversion conversion) { std::string retMapped(s.length() * maxExpansionCaseConversion, 0); size_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(), conversion); retMapped.resize(lenMapped); return retMapped; } #ifdef SCI_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/qscintilla/src/CaseConvert.h000066400000000000000000000031711345112435200227550ustar00rootroot00000000000000// Scintilla source code edit control // Encoding: UTF-8 /** @file CaseConvert.h ** Performs Unicode case conversions. ** Does not handle locale-sensitive case conversion. **/ // Copyright 2013 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CASECONVERT_H #define CASECONVERT_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif enum CaseConversion { CaseConversionFold, CaseConversionUpper, CaseConversionLower }; class ICaseConverter { public: virtual size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed) = 0; }; ICaseConverter *ConverterFor(enum CaseConversion conversion); // Returns a UTF-8 string. Empty when no conversion const char *CaseConvert(int character, enum CaseConversion conversion); // When performing CaseConvertString, the converted value may be up to 3 times longer than the input. // Ligatures are often decomposed into multiple characters and long cases include: // ΐ "\xce\x90" folds to ΐ "\xce\xb9\xcc\x88\xcc\x81" const int maxExpansionCaseConversion=3; // Converts a mixed case string using a particular conversion. // Result may be a different length to input and the length is the return value. // If there is not enough space then 0 is returned. size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed, enum CaseConversion conversion); // Converts a mixed case string using a particular conversion. std::string CaseConvertString(const std::string &s, enum CaseConversion conversion); #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/CaseFolder.cpp000066400000000000000000000033311345112435200231010ustar00rootroot00000000000000// Scintilla source code edit control /** @file CaseFolder.cxx ** Classes for case folding. **/ // Copyright 1998-2013 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include "CaseFolder.h" #include "CaseConvert.h" #include "UniConversion.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif CaseFolder::~CaseFolder() { } CaseFolderTable::CaseFolderTable() { for (size_t iChar=0; iChar(iChar); } } CaseFolderTable::~CaseFolderTable() { } size_t CaseFolderTable::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { if (lenMixed > sizeFolded) { return 0; } else { for (size_t i=0; i(mixed[i])]; } return lenMixed; } } void CaseFolderTable::SetTranslation(char ch, char chTranslation) { mapping[static_cast(ch)] = chTranslation; } void CaseFolderTable::StandardASCII() { for (size_t iChar=0; iChar= 'A' && iChar <= 'Z') { mapping[iChar] = static_cast(iChar - 'A' + 'a'); } else { mapping[iChar] = static_cast(iChar); } } } CaseFolderUnicode::CaseFolderUnicode() { StandardASCII(); converter = ConverterFor(CaseConversionFold); } size_t CaseFolderUnicode::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { if ((lenMixed == 1) && (sizeFolded > 0)) { folded[0] = mapping[static_cast(mixed[0])]; return 1; } else { return converter->CaseConvertString(folded, sizeFolded, mixed, lenMixed); } } sqlitebrowser-3.11.2/libs/qscintilla/src/CaseFolder.h000066400000000000000000000020471345112435200225510ustar00rootroot00000000000000// Scintilla source code edit control /** @file CaseFolder.h ** Classes for case folding. **/ // Copyright 1998-2013 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CASEFOLDER_H #define CASEFOLDER_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class CaseFolder { public: virtual ~CaseFolder(); virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) = 0; }; class CaseFolderTable : public CaseFolder { protected: char mapping[256]; public: CaseFolderTable(); virtual ~CaseFolderTable(); virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed); void SetTranslation(char ch, char chTranslation); void StandardASCII(); }; class ICaseConverter; class CaseFolderUnicode : public CaseFolderTable { ICaseConverter *converter; public: CaseFolderUnicode(); virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Catalogue.cpp000066400000000000000000000042371345112435200230040ustar00rootroot00000000000000// Scintilla source code edit control /** @file Catalogue.cxx ** Colourise for particular languages. **/ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "LexerModule.h" #include "Catalogue.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif static std::vector lexerCatalogue; static int nextLanguage = SCLEX_AUTOMATIC+1; const LexerModule *Catalogue::Find(int language) { Scintilla_LinkLexers(); for (std::vector::iterator it=lexerCatalogue.begin(); it != lexerCatalogue.end(); ++it) { if ((*it)->GetLanguage() == language) { return *it; } } return 0; } const LexerModule *Catalogue::Find(const char *languageName) { Scintilla_LinkLexers(); if (languageName) { for (std::vector::iterator it=lexerCatalogue.begin(); it != lexerCatalogue.end(); ++it) { if ((*it)->languageName && (0 == strcmp((*it)->languageName, languageName))) { return *it; } } } return 0; } void Catalogue::AddLexerModule(LexerModule *plm) { if (plm->GetLanguage() == SCLEX_AUTOMATIC) { plm->language = nextLanguage; nextLanguage++; } lexerCatalogue.push_back(plm); } // To add or remove a lexer, add or remove its file and run LexGen.py. // Force a reference to all of the Scintilla lexers so that the linker will // not remove the code of the lexers. int Scintilla_LinkLexers() { static int initialised = 0; if (initialised) return 0; initialised = 1; // Shorten the code that declares a lexer and ensures it is linked in by calling a method. #define LINK_LEXER(lexer) extern LexerModule lexer; Catalogue::AddLexerModule(&lexer); //++Autogenerated -- run scripts/LexGen.py to regenerate //**\(\tLINK_LEXER(\*);\n\) LINK_LEXER(lmSQL); LINK_LEXER(lmJSON); LINK_LEXER(lmHTML); LINK_LEXER(lmXML); //--Autogenerated -- end of automatically generated section return 1; } sqlitebrowser-3.11.2/libs/qscintilla/src/Catalogue.h000066400000000000000000000010611345112435200224410ustar00rootroot00000000000000// Scintilla source code edit control /** @file Catalogue.h ** Lexer infrastructure. **/ // Copyright 1998-2010 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CATALOGUE_H #define CATALOGUE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class Catalogue { public: static const LexerModule *Find(int language); static const LexerModule *Find(const char *languageName); static void AddLexerModule(LexerModule *plm); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/CellBuffer.cpp000066400000000000000000000552441345112435200231150ustar00rootroot00000000000000// Scintilla source code edit control /** @file CellBuffer.cxx ** Manages a buffer of cells. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "CellBuffer.h" #include "UniConversion.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif LineVector::LineVector() : starts(256), perLine(0) { Init(); } LineVector::~LineVector() { starts.DeleteAll(); } void LineVector::Init() { starts.DeleteAll(); if (perLine) { perLine->Init(); } } void LineVector::SetPerLine(PerLine *pl) { perLine = pl; } void LineVector::InsertText(int line, int delta) { starts.InsertText(line, delta); } void LineVector::InsertLine(int line, int position, bool lineStart) { starts.InsertPartition(line, position); if (perLine) { if ((line > 0) && lineStart) line--; perLine->InsertLine(line); } } void LineVector::SetLineStart(int line, int position) { starts.SetPartitionStartPosition(line, position); } void LineVector::RemoveLine(int line) { starts.RemovePartition(line); if (perLine) { perLine->RemoveLine(line); } } int LineVector::LineFromPosition(int pos) const { return starts.PartitionFromPosition(pos); } Action::Action() { at = startAction; position = 0; data = 0; lenData = 0; mayCoalesce = false; } Action::~Action() { Destroy(); } void Action::Create(actionType at_, int position_, const char *data_, int lenData_, bool mayCoalesce_) { delete []data; data = NULL; position = position_; at = at_; if (lenData_) { data = new char[lenData_]; memcpy(data, data_, lenData_); } lenData = lenData_; mayCoalesce = mayCoalesce_; } void Action::Destroy() { delete []data; data = 0; } void Action::Grab(Action *source) { delete []data; position = source->position; at = source->at; data = source->data; lenData = source->lenData; mayCoalesce = source->mayCoalesce; // Ownership of source data transferred to this source->position = 0; source->at = startAction; source->data = 0; source->lenData = 0; source->mayCoalesce = true; } // The undo history stores a sequence of user operations that represent the user's view of the // commands executed on the text. // Each user operation contains a sequence of text insertion and text deletion actions. // All the user operations are stored in a list of individual actions with 'start' actions used // as delimiters between user operations. // Initially there is one start action in the history. // As each action is performed, it is recorded in the history. The action may either become // part of the current user operation or may start a new user operation. If it is to be part of the // current operation, then it overwrites the current last action. If it is to be part of a new // operation, it is appended after the current last action. // After writing the new action, a new start action is appended at the end of the history. // The decision of whether to start a new user operation is based upon two factors. If a // compound operation has been explicitly started by calling BeginUndoAction and no matching // EndUndoAction (these calls nest) has been called, then the action is coalesced into the current // operation. If there is no outstanding BeginUndoAction call then a new operation is started // unless it looks as if the new action is caused by the user typing or deleting a stream of text. // Sequences that look like typing or deletion are coalesced into a single user operation. UndoHistory::UndoHistory() { lenActions = 100; actions = new Action[lenActions]; maxAction = 0; currentAction = 0; undoSequenceDepth = 0; savePoint = 0; tentativePoint = -1; actions[currentAction].Create(startAction); } UndoHistory::~UndoHistory() { delete []actions; actions = 0; } void UndoHistory::EnsureUndoRoom() { // Have to test that there is room for 2 more actions in the array // as two actions may be created by the calling function if (currentAction >= (lenActions - 2)) { // Run out of undo nodes so extend the array int lenActionsNew = lenActions * 2; Action *actionsNew = new Action[lenActionsNew]; for (int act = 0; act <= currentAction; act++) actionsNew[act].Grab(&actions[act]); delete []actions; lenActions = lenActionsNew; actions = actionsNew; } } const char *UndoHistory::AppendAction(actionType at, int position, const char *data, int lengthData, bool &startSequence, bool mayCoalesce) { EnsureUndoRoom(); //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); //Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at, // actions[currentAction - 1].position, actions[currentAction - 1].lenData); if (currentAction < savePoint) { savePoint = -1; } int oldCurrentAction = currentAction; if (currentAction >= 1) { if (0 == undoSequenceDepth) { // Top level actions may not always be coalesced int targetAct = -1; const Action *actPrevious = &(actions[currentAction + targetAct]); // Container actions may forward the coalesce state of Scintilla Actions. while ((actPrevious->at == containerAction) && actPrevious->mayCoalesce) { targetAct--; actPrevious = &(actions[currentAction + targetAct]); } // See if current action can be coalesced into previous action // Will work if both are inserts or deletes and position is same #if defined(_MSC_VER) && defined(_PREFAST_) // Visual Studio 2013 Code Analysis wrongly believes actions can be NULL at its next reference __analysis_assume(actions); #endif if ((currentAction == savePoint) || (currentAction == tentativePoint)) { currentAction++; } else if (!actions[currentAction].mayCoalesce) { // Not allowed to coalesce if this set currentAction++; } else if (!mayCoalesce || !actPrevious->mayCoalesce) { currentAction++; } else if (at == containerAction || actions[currentAction].at == containerAction) { ; // A coalescible containerAction } else if ((at != actPrevious->at) && (actPrevious->at != startAction)) { currentAction++; } else if ((at == insertAction) && (position != (actPrevious->position + actPrevious->lenData))) { // Insertions must be immediately after to coalesce currentAction++; } else if (at == removeAction) { if ((lengthData == 1) || (lengthData == 2)) { if ((position + lengthData) == actPrevious->position) { ; // Backspace -> OK } else if (position == actPrevious->position) { ; // Delete -> OK } else { // Removals must be at same position to coalesce currentAction++; } } else { // Removals must be of one character to coalesce currentAction++; } } else { // Action coalesced. } } else { // Actions not at top level are always coalesced unless this is after return to top level if (!actions[currentAction].mayCoalesce) currentAction++; } } else { currentAction++; } startSequence = oldCurrentAction != currentAction; int actionWithData = currentAction; actions[currentAction].Create(at, position, data, lengthData, mayCoalesce); currentAction++; actions[currentAction].Create(startAction); maxAction = currentAction; return actions[actionWithData].data; } void UndoHistory::BeginUndoAction() { EnsureUndoRoom(); if (undoSequenceDepth == 0) { if (actions[currentAction].at != startAction) { currentAction++; actions[currentAction].Create(startAction); maxAction = currentAction; } actions[currentAction].mayCoalesce = false; } undoSequenceDepth++; } void UndoHistory::EndUndoAction() { PLATFORM_ASSERT(undoSequenceDepth > 0); EnsureUndoRoom(); undoSequenceDepth--; if (0 == undoSequenceDepth) { if (actions[currentAction].at != startAction) { currentAction++; actions[currentAction].Create(startAction); maxAction = currentAction; } actions[currentAction].mayCoalesce = false; } } void UndoHistory::DropUndoSequence() { undoSequenceDepth = 0; } void UndoHistory::DeleteUndoHistory() { for (int i = 1; i < maxAction; i++) actions[i].Destroy(); maxAction = 0; currentAction = 0; actions[currentAction].Create(startAction); savePoint = 0; tentativePoint = -1; } void UndoHistory::SetSavePoint() { savePoint = currentAction; } bool UndoHistory::IsSavePoint() const { return savePoint == currentAction; } void UndoHistory::TentativeStart() { tentativePoint = currentAction; } void UndoHistory::TentativeCommit() { tentativePoint = -1; // Truncate undo history maxAction = currentAction; } int UndoHistory::TentativeSteps() { // Drop any trailing startAction if (actions[currentAction].at == startAction && currentAction > 0) currentAction--; if (tentativePoint >= 0) return currentAction - tentativePoint; else return -1; } bool UndoHistory::CanUndo() const { return (currentAction > 0) && (maxAction > 0); } int UndoHistory::StartUndo() { // Drop any trailing startAction if (actions[currentAction].at == startAction && currentAction > 0) currentAction--; // Count the steps in this action int act = currentAction; while (actions[act].at != startAction && act > 0) { act--; } return currentAction - act; } const Action &UndoHistory::GetUndoStep() const { return actions[currentAction]; } void UndoHistory::CompletedUndoStep() { currentAction--; } bool UndoHistory::CanRedo() const { return maxAction > currentAction; } int UndoHistory::StartRedo() { // Drop any leading startAction if (actions[currentAction].at == startAction && currentAction < maxAction) currentAction++; // Count the steps in this action int act = currentAction; while (actions[act].at != startAction && act < maxAction) { act++; } return act - currentAction; } const Action &UndoHistory::GetRedoStep() const { return actions[currentAction]; } void UndoHistory::CompletedRedoStep() { currentAction++; } CellBuffer::CellBuffer() { readOnly = false; utf8LineEnds = 0; collectingUndo = true; } CellBuffer::~CellBuffer() { } char CellBuffer::CharAt(int position) const { return substance.ValueAt(position); } void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) const { if (lengthRetrieve <= 0) return; if (position < 0) return; if ((position + lengthRetrieve) > substance.Length()) { Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n", position, lengthRetrieve, substance.Length()); return; } substance.GetRange(buffer, position, lengthRetrieve); } char CellBuffer::StyleAt(int position) const { return style.ValueAt(position); } void CellBuffer::GetStyleRange(unsigned char *buffer, int position, int lengthRetrieve) const { if (lengthRetrieve < 0) return; if (position < 0) return; if ((position + lengthRetrieve) > style.Length()) { Platform::DebugPrintf("Bad GetStyleRange %d for %d of %d\n", position, lengthRetrieve, style.Length()); return; } style.GetRange(reinterpret_cast(buffer), position, lengthRetrieve); } const char *CellBuffer::BufferPointer() { return substance.BufferPointer(); } const char *CellBuffer::RangePointer(int position, int rangeLength) { return substance.RangePointer(position, rangeLength); } int CellBuffer::GapPosition() const { return substance.GapPosition(); } // The char* returned is to an allocation owned by the undo history const char *CellBuffer::InsertString(int position, const char *s, int insertLength, bool &startSequence) { // InsertString and DeleteChars are the bottleneck though which all changes occur const char *data = s; if (!readOnly) { if (collectingUndo) { // Save into the undo/redo stack, but only the characters - not the formatting // This takes up about half load time data = uh.AppendAction(insertAction, position, s, insertLength, startSequence); } BasicInsertString(position, s, insertLength); } return data; } bool CellBuffer::SetStyleAt(int position, char styleValue) { char curVal = style.ValueAt(position); if (curVal != styleValue) { style.SetValueAt(position, styleValue); return true; } else { return false; } } bool CellBuffer::SetStyleFor(int position, int lengthStyle, char styleValue) { bool changed = false; PLATFORM_ASSERT(lengthStyle == 0 || (lengthStyle > 0 && lengthStyle + position <= style.Length())); while (lengthStyle--) { char curVal = style.ValueAt(position); if (curVal != styleValue) { style.SetValueAt(position, styleValue); changed = true; } position++; } return changed; } // The char* returned is to an allocation owned by the undo history const char *CellBuffer::DeleteChars(int position, int deleteLength, bool &startSequence) { // InsertString and DeleteChars are the bottleneck though which all changes occur PLATFORM_ASSERT(deleteLength > 0); const char *data = 0; if (!readOnly) { if (collectingUndo) { // Save into the undo/redo stack, but only the characters - not the formatting // The gap would be moved to position anyway for the deletion so this doesn't cost extra data = substance.RangePointer(position, deleteLength); data = uh.AppendAction(removeAction, position, data, deleteLength, startSequence); } BasicDeleteChars(position, deleteLength); } return data; } int CellBuffer::Length() const { return substance.Length(); } void CellBuffer::Allocate(int newSize) { substance.ReAllocate(newSize); style.ReAllocate(newSize); } void CellBuffer::SetLineEndTypes(int utf8LineEnds_) { if (utf8LineEnds != utf8LineEnds_) { utf8LineEnds = utf8LineEnds_; ResetLineEnds(); } } bool CellBuffer::ContainsLineEnd(const char *s, int length) const { unsigned char chBeforePrev = 0; unsigned char chPrev = 0; for (int i = 0; i < length; i++) { const unsigned char ch = s[i]; if ((ch == '\r') || (ch == '\n')) { return true; } else if (utf8LineEnds) { unsigned char back3[3] = { chBeforePrev, chPrev, ch }; if (UTF8IsSeparator(back3) || UTF8IsNEL(back3 + 1)) { return true; } } chBeforePrev = chPrev; chPrev = ch; } return false; } void CellBuffer::SetPerLine(PerLine *pl) { lv.SetPerLine(pl); } int CellBuffer::Lines() const { return lv.Lines(); } int CellBuffer::LineStart(int line) const { if (line < 0) return 0; else if (line >= Lines()) return Length(); else return lv.LineStart(line); } bool CellBuffer::IsReadOnly() const { return readOnly; } void CellBuffer::SetReadOnly(bool set) { readOnly = set; } void CellBuffer::SetSavePoint() { uh.SetSavePoint(); } bool CellBuffer::IsSavePoint() const { return uh.IsSavePoint(); } void CellBuffer::TentativeStart() { uh.TentativeStart(); } void CellBuffer::TentativeCommit() { uh.TentativeCommit(); } int CellBuffer::TentativeSteps() { return uh.TentativeSteps(); } bool CellBuffer::TentativeActive() const { return uh.TentativeActive(); } // Without undo void CellBuffer::InsertLine(int line, int position, bool lineStart) { lv.InsertLine(line, position, lineStart); } void CellBuffer::RemoveLine(int line) { lv.RemoveLine(line); } bool CellBuffer::UTF8LineEndOverlaps(int position) const { unsigned char bytes[] = { static_cast(substance.ValueAt(position-2)), static_cast(substance.ValueAt(position-1)), static_cast(substance.ValueAt(position)), static_cast(substance.ValueAt(position+1)), }; return UTF8IsSeparator(bytes) || UTF8IsSeparator(bytes+1) || UTF8IsNEL(bytes+1); } void CellBuffer::ResetLineEnds() { // Reinitialize line data -- too much work to preserve lv.Init(); int position = 0; int length = Length(); int lineInsert = 1; bool atLineStart = true; lv.InsertText(lineInsert-1, length); unsigned char chBeforePrev = 0; unsigned char chPrev = 0; for (int i = 0; i < length; i++) { unsigned char ch = substance.ValueAt(position + i); if (ch == '\r') { InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; } else if (ch == '\n') { if (chPrev == '\r') { // Patch up what was end of line lv.SetLineStart(lineInsert - 1, (position + i) + 1); } else { InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; } } else if (utf8LineEnds) { unsigned char back3[3] = {chBeforePrev, chPrev, ch}; if (UTF8IsSeparator(back3) || UTF8IsNEL(back3+1)) { InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; } } chBeforePrev = chPrev; chPrev = ch; } } void CellBuffer::BasicInsertString(int position, const char *s, int insertLength) { if (insertLength == 0) return; PLATFORM_ASSERT(insertLength > 0); unsigned char chAfter = substance.ValueAt(position); bool breakingUTF8LineEnd = false; if (utf8LineEnds && UTF8IsTrailByte(chAfter)) { breakingUTF8LineEnd = UTF8LineEndOverlaps(position); } substance.InsertFromArray(position, s, 0, insertLength); style.InsertValue(position, insertLength, 0); int lineInsert = lv.LineFromPosition(position) + 1; bool atLineStart = lv.LineStart(lineInsert-1) == position; // Point all the lines after the insertion point further along in the buffer lv.InsertText(lineInsert-1, insertLength); unsigned char chBeforePrev = substance.ValueAt(position - 2); unsigned char chPrev = substance.ValueAt(position - 1); if (chPrev == '\r' && chAfter == '\n') { // Splitting up a crlf pair at position InsertLine(lineInsert, position, false); lineInsert++; } if (breakingUTF8LineEnd) { RemoveLine(lineInsert); } unsigned char ch = ' '; for (int i = 0; i < insertLength; i++) { ch = s[i]; if (ch == '\r') { InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; } else if (ch == '\n') { if (chPrev == '\r') { // Patch up what was end of line lv.SetLineStart(lineInsert - 1, (position + i) + 1); } else { InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; } } else if (utf8LineEnds) { unsigned char back3[3] = {chBeforePrev, chPrev, ch}; if (UTF8IsSeparator(back3) || UTF8IsNEL(back3+1)) { InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; } } chBeforePrev = chPrev; chPrev = ch; } // Joining two lines where last insertion is cr and following substance starts with lf if (chAfter == '\n') { if (ch == '\r') { // End of line already in buffer so drop the newly created one RemoveLine(lineInsert - 1); } } else if (utf8LineEnds && !UTF8IsAscii(chAfter)) { // May have end of UTF-8 line end in buffer and start in insertion for (int j = 0; j < UTF8SeparatorLength-1; j++) { unsigned char chAt = substance.ValueAt(position + insertLength + j); unsigned char back3[3] = {chBeforePrev, chPrev, chAt}; if (UTF8IsSeparator(back3)) { InsertLine(lineInsert, (position + insertLength + j) + 1, atLineStart); lineInsert++; } if ((j == 0) && UTF8IsNEL(back3+1)) { InsertLine(lineInsert, (position + insertLength + j) + 1, atLineStart); lineInsert++; } chBeforePrev = chPrev; chPrev = chAt; } } } void CellBuffer::BasicDeleteChars(int position, int deleteLength) { if (deleteLength == 0) return; if ((position == 0) && (deleteLength == substance.Length())) { // If whole buffer is being deleted, faster to reinitialise lines data // than to delete each line. lv.Init(); } else { // Have to fix up line positions before doing deletion as looking at text in buffer // to work out which lines have been removed int lineRemove = lv.LineFromPosition(position) + 1; lv.InsertText(lineRemove-1, - (deleteLength)); unsigned char chPrev = substance.ValueAt(position - 1); unsigned char chBefore = chPrev; unsigned char chNext = substance.ValueAt(position); bool ignoreNL = false; if (chPrev == '\r' && chNext == '\n') { // Move back one lv.SetLineStart(lineRemove, position); lineRemove++; ignoreNL = true; // First \n is not real deletion } if (utf8LineEnds && UTF8IsTrailByte(chNext)) { if (UTF8LineEndOverlaps(position)) { RemoveLine(lineRemove); } } unsigned char ch = chNext; for (int i = 0; i < deleteLength; i++) { chNext = substance.ValueAt(position + i + 1); if (ch == '\r') { if (chNext != '\n') { RemoveLine(lineRemove); } } else if (ch == '\n') { if (ignoreNL) { ignoreNL = false; // Further \n are real deletions } else { RemoveLine(lineRemove); } } else if (utf8LineEnds) { if (!UTF8IsAscii(ch)) { unsigned char next3[3] = {ch, chNext, static_cast(substance.ValueAt(position + i + 2))}; if (UTF8IsSeparator(next3) || UTF8IsNEL(next3)) { RemoveLine(lineRemove); } } } ch = chNext; } // May have to fix up end if last deletion causes cr to be next to lf // or removes one of a crlf pair char chAfter = substance.ValueAt(position + deleteLength); if (chBefore == '\r' && chAfter == '\n') { // Using lineRemove-1 as cr ended line before start of deletion RemoveLine(lineRemove - 1); lv.SetLineStart(lineRemove - 1, position + 1); } } substance.DeleteRange(position, deleteLength); style.DeleteRange(position, deleteLength); } bool CellBuffer::SetUndoCollection(bool collectUndo) { collectingUndo = collectUndo; uh.DropUndoSequence(); return collectingUndo; } bool CellBuffer::IsCollectingUndo() const { return collectingUndo; } void CellBuffer::BeginUndoAction() { uh.BeginUndoAction(); } void CellBuffer::EndUndoAction() { uh.EndUndoAction(); } void CellBuffer::AddUndoAction(int token, bool mayCoalesce) { bool startSequence; uh.AppendAction(containerAction, token, 0, 0, startSequence, mayCoalesce); } void CellBuffer::DeleteUndoHistory() { uh.DeleteUndoHistory(); } bool CellBuffer::CanUndo() const { return uh.CanUndo(); } int CellBuffer::StartUndo() { return uh.StartUndo(); } const Action &CellBuffer::GetUndoStep() const { return uh.GetUndoStep(); } void CellBuffer::PerformUndoStep() { const Action &actionStep = uh.GetUndoStep(); if (actionStep.at == insertAction) { if (substance.Length() < actionStep.lenData) { throw std::runtime_error( "CellBuffer::PerformUndoStep: deletion must be less than document length."); } BasicDeleteChars(actionStep.position, actionStep.lenData); } else if (actionStep.at == removeAction) { BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); } uh.CompletedUndoStep(); } bool CellBuffer::CanRedo() const { return uh.CanRedo(); } int CellBuffer::StartRedo() { return uh.StartRedo(); } const Action &CellBuffer::GetRedoStep() const { return uh.GetRedoStep(); } void CellBuffer::PerformRedoStep() { const Action &actionStep = uh.GetRedoStep(); if (actionStep.at == insertAction) { BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); } else if (actionStep.at == removeAction) { BasicDeleteChars(actionStep.position, actionStep.lenData); } uh.CompletedRedoStep(); } sqlitebrowser-3.11.2/libs/qscintilla/src/CellBuffer.h000066400000000000000000000133731345112435200225570ustar00rootroot00000000000000// Scintilla source code edit control /** @file CellBuffer.h ** Manages the text of the document. **/ // Copyright 1998-2004 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CELLBUFFER_H #define CELLBUFFER_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif // Interface to per-line data that wants to see each line insertion and deletion class PerLine { public: virtual ~PerLine() {} virtual void Init()=0; virtual void InsertLine(int line)=0; virtual void RemoveLine(int line)=0; }; /** * The line vector contains information about each of the lines in a cell buffer. */ class LineVector { Partitioning starts; PerLine *perLine; public: LineVector(); ~LineVector(); void Init(); void SetPerLine(PerLine *pl); void InsertText(int line, int delta); void InsertLine(int line, int position, bool lineStart); void SetLineStart(int line, int position); void RemoveLine(int line); int Lines() const { return starts.Partitions(); } int LineFromPosition(int pos) const; int LineStart(int line) const { return starts.PositionFromPartition(line); } }; enum actionType { insertAction, removeAction, startAction, containerAction }; /** * Actions are used to store all the information required to perform one undo/redo step. */ class Action { public: actionType at; int position; char *data; int lenData; bool mayCoalesce; Action(); ~Action(); void Create(actionType at_, int position_=0, const char *data_=0, int lenData_=0, bool mayCoalesce_=true); void Destroy(); void Grab(Action *source); }; /** * */ class UndoHistory { Action *actions; int lenActions; int maxAction; int currentAction; int undoSequenceDepth; int savePoint; int tentativePoint; void EnsureUndoRoom(); // Private so UndoHistory objects can not be copied UndoHistory(const UndoHistory &); public: UndoHistory(); ~UndoHistory(); const char *AppendAction(actionType at, int position, const char *data, int length, bool &startSequence, bool mayCoalesce=true); void BeginUndoAction(); void EndUndoAction(); void DropUndoSequence(); void DeleteUndoHistory(); /// The save point is a marker in the undo stack where the container has stated that /// the buffer was saved. Undo and redo can move over the save point. void SetSavePoint(); bool IsSavePoint() const; // Tentative actions are used for input composition so that it can be undone cleanly void TentativeStart(); void TentativeCommit(); bool TentativeActive() const { return tentativePoint >= 0; } int TentativeSteps(); /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. bool CanUndo() const; int StartUndo(); const Action &GetUndoStep() const; void CompletedUndoStep(); bool CanRedo() const; int StartRedo(); const Action &GetRedoStep() const; void CompletedRedoStep(); }; /** * Holder for an expandable array of characters that supports undo and line markers. * Based on article "Data Structures in a Bit-Mapped Text Editor" * by Wilfred J. Hansen, Byte January 1987, page 183. */ class CellBuffer { private: SplitVector substance; SplitVector style; bool readOnly; int utf8LineEnds; bool collectingUndo; UndoHistory uh; LineVector lv; bool UTF8LineEndOverlaps(int position) const; void ResetLineEnds(); /// Actions without undo void BasicInsertString(int position, const char *s, int insertLength); void BasicDeleteChars(int position, int deleteLength); public: CellBuffer(); ~CellBuffer(); /// Retrieving positions outside the range of the buffer works and returns 0 char CharAt(int position) const; void GetCharRange(char *buffer, int position, int lengthRetrieve) const; char StyleAt(int position) const; void GetStyleRange(unsigned char *buffer, int position, int lengthRetrieve) const; const char *BufferPointer(); const char *RangePointer(int position, int rangeLength); int GapPosition() const; int Length() const; void Allocate(int newSize); int GetLineEndTypes() const { return utf8LineEnds; } void SetLineEndTypes(int utf8LineEnds_); bool ContainsLineEnd(const char *s, int length) const; void SetPerLine(PerLine *pl); int Lines() const; int LineStart(int line) const; int LineFromPosition(int pos) const { return lv.LineFromPosition(pos); } void InsertLine(int line, int position, bool lineStart); void RemoveLine(int line); const char *InsertString(int position, const char *s, int insertLength, bool &startSequence); /// Setting styles for positions outside the range of the buffer is safe and has no effect. /// @return true if the style of a character is changed. bool SetStyleAt(int position, char styleValue); bool SetStyleFor(int position, int length, char styleValue); const char *DeleteChars(int position, int deleteLength, bool &startSequence); bool IsReadOnly() const; void SetReadOnly(bool set); /// The save point is a marker in the undo stack where the container has stated that /// the buffer was saved. Undo and redo can move over the save point. void SetSavePoint(); bool IsSavePoint() const; void TentativeStart(); void TentativeCommit(); bool TentativeActive() const; int TentativeSteps(); bool SetUndoCollection(bool collectUndo); bool IsCollectingUndo() const; void BeginUndoAction(); void EndUndoAction(); void AddUndoAction(int token, bool mayCoalesce); void DeleteUndoHistory(); /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. bool CanUndo() const; int StartUndo(); const Action &GetUndoStep() const; void PerformUndoStep(); bool CanRedo() const; int StartRedo(); const Action &GetRedoStep() const; void PerformRedoStep(); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/CharClassify.cpp000066400000000000000000000031041345112435200234430ustar00rootroot00000000000000// Scintilla source code edit control /** @file CharClassify.cxx ** Character classifications used by Document and RESearch. **/ // Copyright 2006 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include "CharClassify.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif CharClassify::CharClassify() { SetDefaultCharClasses(true); } void CharClassify::SetDefaultCharClasses(bool includeWordClass) { // Initialize all char classes to default values for (int ch = 0; ch < 256; ch++) { if (ch == '\r' || ch == '\n') charClass[ch] = ccNewLine; else if (ch < 0x20 || ch == ' ') charClass[ch] = ccSpace; else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_')) charClass[ch] = ccWord; else charClass[ch] = ccPunctuation; } } void CharClassify::SetCharClasses(const unsigned char *chars, cc newCharClass) { // Apply the newCharClass to the specifed chars if (chars) { while (*chars) { charClass[*chars] = static_cast(newCharClass); chars++; } } } int CharClassify::GetCharsOfClass(cc characterClass, unsigned char *buffer) const { // Get characters belonging to the given char class; return the number // of characters (if the buffer is NULL, don't write to it). int count = 0; for (int ch = maxChar - 1; ch >= 0; --ch) { if (charClass[ch] == characterClass) { ++count; if (buffer) { *buffer = static_cast(ch); buffer++; } } } return count; } sqlitebrowser-3.11.2/libs/qscintilla/src/CharClassify.h000066400000000000000000000017251345112435200231170ustar00rootroot00000000000000// Scintilla source code edit control /** @file CharClassify.h ** Character classifications used by Document and RESearch. **/ // Copyright 2006-2009 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CHARCLASSIFY_H #define CHARCLASSIFY_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class CharClassify { public: CharClassify(); enum cc { ccSpace, ccNewLine, ccWord, ccPunctuation }; void SetDefaultCharClasses(bool includeWordClass); void SetCharClasses(const unsigned char *chars, cc newCharClass); int GetCharsOfClass(cc charClass, unsigned char *buffer) const; cc GetClass(unsigned char ch) const { return static_cast(charClass[ch]);} bool IsWord(unsigned char ch) const { return static_cast(charClass[ch]) == ccWord;} private: enum { maxChar=256 }; unsigned char charClass[maxChar]; // not type cc to save space }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/ContractionState.cpp000066400000000000000000000165521345112435200243670ustar00rootroot00000000000000// Scintilla source code edit control /** @file ContractionState.cxx ** Manages visibility of lines for folding and wrapping. **/ // Copyright 1998-2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "SparseVector.h" #include "ContractionState.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif ContractionState::ContractionState() : visible(0), expanded(0), heights(0), foldDisplayTexts(0), displayLines(0), linesInDocument(1) { //InsertLine(0); } ContractionState::~ContractionState() { Clear(); } void ContractionState::EnsureData() { if (OneToOne()) { visible = new RunStyles(); expanded = new RunStyles(); heights = new RunStyles(); foldDisplayTexts = new SparseVector(); displayLines = new Partitioning(4); InsertLines(0, linesInDocument); } } void ContractionState::Clear() { delete visible; visible = 0; delete expanded; expanded = 0; delete heights; heights = 0; delete foldDisplayTexts; foldDisplayTexts = 0; delete displayLines; displayLines = 0; linesInDocument = 1; } int ContractionState::LinesInDoc() const { if (OneToOne()) { return linesInDocument; } else { return displayLines->Partitions() - 1; } } int ContractionState::LinesDisplayed() const { if (OneToOne()) { return linesInDocument; } else { return displayLines->PositionFromPartition(LinesInDoc()); } } int ContractionState::DisplayFromDoc(int lineDoc) const { if (OneToOne()) { return (lineDoc <= linesInDocument) ? lineDoc : linesInDocument; } else { if (lineDoc > displayLines->Partitions()) lineDoc = displayLines->Partitions(); return displayLines->PositionFromPartition(lineDoc); } } int ContractionState::DisplayLastFromDoc(int lineDoc) const { return DisplayFromDoc(lineDoc) + GetHeight(lineDoc) - 1; } int ContractionState::DocFromDisplay(int lineDisplay) const { if (OneToOne()) { return lineDisplay; } else { if (lineDisplay <= 0) { return 0; } if (lineDisplay > LinesDisplayed()) { return displayLines->PartitionFromPosition(LinesDisplayed()); } int lineDoc = displayLines->PartitionFromPosition(lineDisplay); PLATFORM_ASSERT(GetVisible(lineDoc)); return lineDoc; } } void ContractionState::InsertLine(int lineDoc) { if (OneToOne()) { linesInDocument++; } else { visible->InsertSpace(lineDoc, 1); visible->SetValueAt(lineDoc, 1); expanded->InsertSpace(lineDoc, 1); expanded->SetValueAt(lineDoc, 1); heights->InsertSpace(lineDoc, 1); heights->SetValueAt(lineDoc, 1); foldDisplayTexts->InsertSpace(lineDoc, 1); foldDisplayTexts->SetValueAt(lineDoc, NULL); int lineDisplay = DisplayFromDoc(lineDoc); displayLines->InsertPartition(lineDoc, lineDisplay); displayLines->InsertText(lineDoc, 1); } } void ContractionState::InsertLines(int lineDoc, int lineCount) { for (int l = 0; l < lineCount; l++) { InsertLine(lineDoc + l); } Check(); } void ContractionState::DeleteLine(int lineDoc) { if (OneToOne()) { linesInDocument--; } else { if (GetVisible(lineDoc)) { displayLines->InsertText(lineDoc, -heights->ValueAt(lineDoc)); } displayLines->RemovePartition(lineDoc); visible->DeleteRange(lineDoc, 1); expanded->DeleteRange(lineDoc, 1); heights->DeleteRange(lineDoc, 1); foldDisplayTexts->DeletePosition(lineDoc); } } void ContractionState::DeleteLines(int lineDoc, int lineCount) { for (int l = 0; l < lineCount; l++) { DeleteLine(lineDoc); } Check(); } bool ContractionState::GetVisible(int lineDoc) const { if (OneToOne()) { return true; } else { if (lineDoc >= visible->Length()) return true; return visible->ValueAt(lineDoc) == 1; } } bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool isVisible) { if (OneToOne() && isVisible) { return false; } else { EnsureData(); int delta = 0; Check(); if ((lineDocStart <= lineDocEnd) && (lineDocStart >= 0) && (lineDocEnd < LinesInDoc())) { for (int line = lineDocStart; line <= lineDocEnd; line++) { if (GetVisible(line) != isVisible) { int difference = isVisible ? heights->ValueAt(line) : -heights->ValueAt(line); visible->SetValueAt(line, isVisible ? 1 : 0); displayLines->InsertText(line, difference); delta += difference; } } } else { return false; } Check(); return delta != 0; } } bool ContractionState::HiddenLines() const { if (OneToOne()) { return false; } else { return !visible->AllSameAs(1); } } const char *ContractionState::GetFoldDisplayText(int lineDoc) const { Check(); return foldDisplayTexts->ValueAt(lineDoc); } bool ContractionState::SetFoldDisplayText(int lineDoc, const char *text) { EnsureData(); const char *foldText = foldDisplayTexts->ValueAt(lineDoc); if (!foldText || 0 != strcmp(text, foldText)) { foldDisplayTexts->SetValueAt(lineDoc, text); Check(); return true; } else { Check(); return false; } } bool ContractionState::GetExpanded(int lineDoc) const { if (OneToOne()) { return true; } else { Check(); return expanded->ValueAt(lineDoc) == 1; } } bool ContractionState::SetExpanded(int lineDoc, bool isExpanded) { if (OneToOne() && isExpanded) { return false; } else { EnsureData(); if (isExpanded != (expanded->ValueAt(lineDoc) == 1)) { expanded->SetValueAt(lineDoc, isExpanded ? 1 : 0); Check(); return true; } else { Check(); return false; } } } bool ContractionState::GetFoldDisplayTextShown(int lineDoc) const { return !GetExpanded(lineDoc) && GetFoldDisplayText(lineDoc); } int ContractionState::ContractedNext(int lineDocStart) const { if (OneToOne()) { return -1; } else { Check(); if (!expanded->ValueAt(lineDocStart)) { return lineDocStart; } else { int lineDocNextChange = expanded->EndRun(lineDocStart); if (lineDocNextChange < LinesInDoc()) return lineDocNextChange; else return -1; } } } int ContractionState::GetHeight(int lineDoc) const { if (OneToOne()) { return 1; } else { return heights->ValueAt(lineDoc); } } // Set the number of display lines needed for this line. // Return true if this is a change. bool ContractionState::SetHeight(int lineDoc, int height) { if (OneToOne() && (height == 1)) { return false; } else if (lineDoc < LinesInDoc()) { EnsureData(); if (GetHeight(lineDoc) != height) { if (GetVisible(lineDoc)) { displayLines->InsertText(lineDoc, height - GetHeight(lineDoc)); } heights->SetValueAt(lineDoc, height); Check(); return true; } else { Check(); return false; } } else { return false; } } void ContractionState::ShowAll() { int lines = LinesInDoc(); Clear(); linesInDocument = lines; } // Debugging checks void ContractionState::Check() const { #ifdef CHECK_CORRECTNESS for (int vline = 0; vline < LinesDisplayed(); vline++) { const int lineDoc = DocFromDisplay(vline); PLATFORM_ASSERT(GetVisible(lineDoc)); } for (int lineDoc = 0; lineDoc < LinesInDoc(); lineDoc++) { const int displayThis = DisplayFromDoc(lineDoc); const int displayNext = DisplayFromDoc(lineDoc + 1); const int height = displayNext - displayThis; PLATFORM_ASSERT(height >= 0); if (GetVisible(lineDoc)) { PLATFORM_ASSERT(GetHeight(lineDoc) == height); } else { PLATFORM_ASSERT(0 == height); } } #endif } sqlitebrowser-3.11.2/libs/qscintilla/src/ContractionState.h000066400000000000000000000035021345112435200240230ustar00rootroot00000000000000// Scintilla source code edit control /** @file ContractionState.h ** Manages visibility of lines for folding and wrapping. **/ // Copyright 1998-2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef CONTRACTIONSTATE_H #define CONTRACTIONSTATE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif template class SparseVector; /** */ class ContractionState { // These contain 1 element for every document line. RunStyles *visible; RunStyles *expanded; RunStyles *heights; SparseVector *foldDisplayTexts; Partitioning *displayLines; int linesInDocument; void EnsureData(); bool OneToOne() const { // True when each document line is exactly one display line so need for // complex data structures. return visible == 0; } public: ContractionState(); virtual ~ContractionState(); void Clear(); int LinesInDoc() const; int LinesDisplayed() const; int DisplayFromDoc(int lineDoc) const; int DisplayLastFromDoc(int lineDoc) const; int DocFromDisplay(int lineDisplay) const; void InsertLine(int lineDoc); void InsertLines(int lineDoc, int lineCount); void DeleteLine(int lineDoc); void DeleteLines(int lineDoc, int lineCount); bool GetVisible(int lineDoc) const; bool SetVisible(int lineDocStart, int lineDocEnd, bool isVisible); bool HiddenLines() const; const char *GetFoldDisplayText(int lineDoc) const; bool SetFoldDisplayText(int lineDoc, const char *text); bool GetExpanded(int lineDoc) const; bool SetExpanded(int lineDoc, bool isExpanded); bool GetFoldDisplayTextShown(int lineDoc) const; int ContractedNext(int lineDocStart) const; int GetHeight(int lineDoc) const; bool SetHeight(int lineDoc, int height); void ShowAll(); void Check() const; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Decoration.cpp000066400000000000000000000105501345112435200231620ustar00rootroot00000000000000/** @file Decoration.cxx ** Visual elements added over text. **/ // Copyright 1998-2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "Decoration.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif Decoration::Decoration(int indicator_) : next(0), indicator(indicator_) { } Decoration::~Decoration() { } bool Decoration::Empty() const { return (rs.Runs() == 1) && (rs.AllSameAs(0)); } DecorationList::DecorationList() : currentIndicator(0), currentValue(1), current(0), lengthDocument(0), root(0), clickNotified(false) { } DecorationList::~DecorationList() { Decoration *deco = root; while (deco) { Decoration *decoNext = deco->next; delete deco; deco = decoNext; } root = 0; current = 0; } Decoration *DecorationList::DecorationFromIndicator(int indicator) { for (Decoration *deco=root; deco; deco = deco->next) { if (deco->indicator == indicator) { return deco; } } return 0; } Decoration *DecorationList::Create(int indicator, int length) { currentIndicator = indicator; Decoration *decoNew = new Decoration(indicator); decoNew->rs.InsertSpace(0, length); Decoration *decoPrev = 0; Decoration *deco = root; while (deco && (deco->indicator < indicator)) { decoPrev = deco; deco = deco->next; } if (decoPrev == 0) { decoNew->next = root; root = decoNew; } else { decoNew->next = deco; decoPrev->next = decoNew; } return decoNew; } void DecorationList::Delete(int indicator) { Decoration *decoToDelete = 0; if (root) { if (root->indicator == indicator) { decoToDelete = root; root = root->next; } else { Decoration *deco=root; while (deco->next && !decoToDelete) { if (deco->next && deco->next->indicator == indicator) { decoToDelete = deco->next; deco->next = decoToDelete->next; } else { deco = deco->next; } } } } if (decoToDelete) { delete decoToDelete; current = 0; } } void DecorationList::SetCurrentIndicator(int indicator) { currentIndicator = indicator; current = DecorationFromIndicator(indicator); currentValue = 1; } void DecorationList::SetCurrentValue(int value) { currentValue = value ? value : 1; } bool DecorationList::FillRange(int &position, int value, int &fillLength) { if (!current) { current = DecorationFromIndicator(currentIndicator); if (!current) { current = Create(currentIndicator, lengthDocument); } } bool changed = current->rs.FillRange(position, value, fillLength); if (current->Empty()) { Delete(currentIndicator); } return changed; } void DecorationList::InsertSpace(int position, int insertLength) { const bool atEnd = position == lengthDocument; lengthDocument += insertLength; for (Decoration *deco=root; deco; deco = deco->next) { deco->rs.InsertSpace(position, insertLength); if (atEnd) { deco->rs.FillRange(position, 0, insertLength); } } } void DecorationList::DeleteRange(int position, int deleteLength) { lengthDocument -= deleteLength; Decoration *deco; for (deco=root; deco; deco = deco->next) { deco->rs.DeleteRange(position, deleteLength); } DeleteAnyEmpty(); } void DecorationList::DeleteAnyEmpty() { Decoration *deco = root; while (deco) { if ((lengthDocument == 0) || deco->Empty()) { Delete(deco->indicator); deco = root; } else { deco = deco->next; } } } int DecorationList::AllOnFor(int position) const { int mask = 0; for (Decoration *deco=root; deco; deco = deco->next) { if (deco->rs.ValueAt(position)) { if (deco->indicator < INDIC_IME) { mask |= 1 << deco->indicator; } } } return mask; } int DecorationList::ValueAt(int indicator, int position) { Decoration *deco = DecorationFromIndicator(indicator); if (deco) { return deco->rs.ValueAt(position); } return 0; } int DecorationList::Start(int indicator, int position) { Decoration *deco = DecorationFromIndicator(indicator); if (deco) { return deco->rs.StartRun(position); } return 0; } int DecorationList::End(int indicator, int position) { Decoration *deco = DecorationFromIndicator(indicator); if (deco) { return deco->rs.EndRun(position); } return 0; } sqlitebrowser-3.11.2/libs/qscintilla/src/Decoration.h000066400000000000000000000026301345112435200226270ustar00rootroot00000000000000/** @file Decoration.h ** Visual elements added over text. **/ // Copyright 1998-2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef DECORATION_H #define DECORATION_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class Decoration { public: Decoration *next; RunStyles rs; int indicator; explicit Decoration(int indicator_); ~Decoration(); bool Empty() const; }; class DecorationList { int currentIndicator; int currentValue; Decoration *current; int lengthDocument; Decoration *DecorationFromIndicator(int indicator); Decoration *Create(int indicator, int length); void Delete(int indicator); void DeleteAnyEmpty(); public: Decoration *root; bool clickNotified; DecorationList(); ~DecorationList(); void SetCurrentIndicator(int indicator); int GetCurrentIndicator() const { return currentIndicator; } void SetCurrentValue(int value); int GetCurrentValue() const { return currentValue; } // Returns true if some values may have changed bool FillRange(int &position, int value, int &fillLength); void InsertSpace(int position, int insertLength); void DeleteRange(int position, int deleteLength); int AllOnFor(int position) const; int ValueAt(int indicator, int position); int Start(int indicator, int position); int End(int indicator, int position); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Document.cpp000066400000000000000000002632301345112435200226560ustar00rootroot00000000000000// Scintilla source code edit control /** @file Document.cxx ** Text document that handles notifications, DBCS, styling, words and end of line. **/ // Copyright 1998-2011 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #define NOEXCEPT #ifndef NO_CXX11_REGEX #include #if defined(__GLIBCXX__) // If using the GNU implementation of then have 'noexcept' so can use // when defining regex iterators to keep Clang analyze happy. #undef NOEXCEPT #define NOEXCEPT noexcept #endif #endif #include "Platform.h" #include "ILexer.h" #include "Scintilla.h" #include "CharacterSet.h" #include "CharacterCategory.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "CellBuffer.h" #include "PerLine.h" #include "CharClassify.h" #include "Decoration.h" #include "CaseFolder.h" #include "Document.h" #include "RESearch.h" #include "UniConversion.h" #include "UnicodeFromUTF8.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif void LexInterface::Colourise(int start, int end) { if (pdoc && instance && !performingStyle) { // Protect against reentrance, which may occur, for example, when // fold points are discovered while performing styling and the folding // code looks for child lines which may trigger styling. performingStyle = true; int lengthDoc = pdoc->Length(); if (end == -1) end = lengthDoc; int len = end - start; PLATFORM_ASSERT(len >= 0); PLATFORM_ASSERT(start + len <= lengthDoc); int styleStart = 0; if (start > 0) styleStart = pdoc->StyleAt(start - 1); if (len > 0) { instance->Lex(start, len, styleStart, pdoc); instance->Fold(start, len, styleStart, pdoc); } performingStyle = false; } } int LexInterface::LineEndTypesSupported() { if (instance) { int interfaceVersion = instance->Version(); if (interfaceVersion >= lvSubStyles) { ILexerWithSubStyles *ssinstance = static_cast(instance); return ssinstance->LineEndTypesSupported(); } } return 0; } Document::Document() { refCount = 0; pcf = NULL; #ifdef _WIN32 eolMode = SC_EOL_CRLF; #else eolMode = SC_EOL_LF; #endif dbcsCodePage = 0; lineEndBitSet = SC_LINE_END_TYPE_DEFAULT; endStyled = 0; styleClock = 0; enteredModification = 0; enteredStyling = 0; enteredReadOnlyCount = 0; insertionSet = false; tabInChars = 8; indentInChars = 0; actualIndentInChars = 8; useTabs = true; tabIndents = true; backspaceUnindents = false; durationStyleOneLine = 0.00001; matchesValid = false; regex = 0; UTF8BytesOfLeadInitialise(); perLineData[ldMarkers] = new LineMarkers(); perLineData[ldLevels] = new LineLevels(); perLineData[ldState] = new LineState(); perLineData[ldMargin] = new LineAnnotation(); perLineData[ldAnnotation] = new LineAnnotation(); cb.SetPerLine(this); pli = 0; } Document::~Document() { for (std::vector::iterator it = watchers.begin(); it != watchers.end(); ++it) { it->watcher->NotifyDeleted(this, it->userData); } for (int j=0; jInit(); } } int Document::LineEndTypesSupported() const { if ((SC_CP_UTF8 == dbcsCodePage) && pli) return pli->LineEndTypesSupported(); else return 0; } bool Document::SetDBCSCodePage(int dbcsCodePage_) { if (dbcsCodePage != dbcsCodePage_) { dbcsCodePage = dbcsCodePage_; SetCaseFolder(NULL); cb.SetLineEndTypes(lineEndBitSet & LineEndTypesSupported()); return true; } else { return false; } } bool Document::SetLineEndTypesAllowed(int lineEndBitSet_) { if (lineEndBitSet != lineEndBitSet_) { lineEndBitSet = lineEndBitSet_; int lineEndBitSetActive = lineEndBitSet & LineEndTypesSupported(); if (lineEndBitSetActive != cb.GetLineEndTypes()) { ModifiedAt(0); cb.SetLineEndTypes(lineEndBitSetActive); return true; } else { return false; } } else { return false; } } void Document::InsertLine(int line) { for (int j=0; jInsertLine(line); } } void Document::RemoveLine(int line) { for (int j=0; jRemoveLine(line); } } // Increase reference count and return its previous value. int Document::AddRef() { return refCount++; } // Decrease reference count and return its previous value. // Delete the document if reference count reaches zero. int SCI_METHOD Document::Release() { int curRefCount = --refCount; if (curRefCount == 0) delete this; return curRefCount; } void Document::SetSavePoint() { cb.SetSavePoint(); NotifySavePoint(true); } void Document::TentativeUndo() { if (!TentativeActive()) return; CheckReadOnly(); if (enteredModification == 0) { enteredModification++; if (!cb.IsReadOnly()) { bool startSavePoint = cb.IsSavePoint(); bool multiLine = false; int steps = cb.TentativeSteps(); //Platform::DebugPrintf("Steps=%d\n", steps); for (int step = 0; step < steps; step++) { const int prevLinesTotal = LinesTotal(); const Action &action = cb.GetUndoStep(); if (action.at == removeAction) { NotifyModified(DocModification( SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action)); } else if (action.at == containerAction) { DocModification dm(SC_MOD_CONTAINER | SC_PERFORMED_UNDO); dm.token = action.position; NotifyModified(dm); } else { NotifyModified(DocModification( SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action)); } cb.PerformUndoStep(); if (action.at != containerAction) { ModifiedAt(action.position); } int modFlags = SC_PERFORMED_UNDO; // With undo, an insertion action becomes a deletion notification if (action.at == removeAction) { modFlags |= SC_MOD_INSERTTEXT; } else if (action.at == insertAction) { modFlags |= SC_MOD_DELETETEXT; } if (steps > 1) modFlags |= SC_MULTISTEPUNDOREDO; const int linesAdded = LinesTotal() - prevLinesTotal; if (linesAdded != 0) multiLine = true; if (step == steps - 1) { modFlags |= SC_LASTSTEPINUNDOREDO; if (multiLine) modFlags |= SC_MULTILINEUNDOREDO; } NotifyModified(DocModification(modFlags, action.position, action.lenData, linesAdded, action.data)); } bool endSavePoint = cb.IsSavePoint(); if (startSavePoint != endSavePoint) NotifySavePoint(endSavePoint); cb.TentativeCommit(); } enteredModification--; } } int Document::GetMark(int line) { return static_cast(perLineData[ldMarkers])->MarkValue(line); } int Document::MarkerNext(int lineStart, int mask) const { return static_cast(perLineData[ldMarkers])->MarkerNext(lineStart, mask); } int Document::AddMark(int line, int markerNum) { if (line >= 0 && line <= LinesTotal()) { int prev = static_cast(perLineData[ldMarkers])-> AddMark(line, markerNum, LinesTotal()); DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); NotifyModified(mh); return prev; } else { return 0; } } void Document::AddMarkSet(int line, int valueSet) { if (line < 0 || line > LinesTotal()) { return; } unsigned int m = valueSet; for (int i = 0; m; i++, m >>= 1) if (m & 1) static_cast(perLineData[ldMarkers])-> AddMark(line, i, LinesTotal()); DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); NotifyModified(mh); } void Document::DeleteMark(int line, int markerNum) { static_cast(perLineData[ldMarkers])->DeleteMark(line, markerNum, false); DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); NotifyModified(mh); } void Document::DeleteMarkFromHandle(int markerHandle) { static_cast(perLineData[ldMarkers])->DeleteMarkFromHandle(markerHandle); DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); mh.line = -1; NotifyModified(mh); } void Document::DeleteAllMarks(int markerNum) { bool someChanges = false; for (int line = 0; line < LinesTotal(); line++) { if (static_cast(perLineData[ldMarkers])->DeleteMark(line, markerNum, true)) someChanges = true; } if (someChanges) { DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); mh.line = -1; NotifyModified(mh); } } int Document::LineFromHandle(int markerHandle) { return static_cast(perLineData[ldMarkers])->LineFromHandle(markerHandle); } Sci_Position SCI_METHOD Document::LineStart(Sci_Position line) const { return cb.LineStart(line); } bool Document::IsLineStartPosition(int position) const { return LineStart(LineFromPosition(position)) == position; } Sci_Position SCI_METHOD Document::LineEnd(Sci_Position line) const { if (line >= LinesTotal() - 1) { return LineStart(line + 1); } else { int position = LineStart(line + 1); if (SC_CP_UTF8 == dbcsCodePage) { unsigned char bytes[] = { static_cast(cb.CharAt(position-3)), static_cast(cb.CharAt(position-2)), static_cast(cb.CharAt(position-1)), }; if (UTF8IsSeparator(bytes)) { return position - UTF8SeparatorLength; } if (UTF8IsNEL(bytes+1)) { return position - UTF8NELLength; } } position--; // Back over CR or LF // When line terminator is CR+LF, may need to go back one more if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) { position--; } return position; } } void SCI_METHOD Document::SetErrorStatus(int status) { // Tell the watchers an error has occurred. for (std::vector::iterator it = watchers.begin(); it != watchers.end(); ++it) { it->watcher->NotifyErrorOccurred(this, it->userData, status); } } Sci_Position SCI_METHOD Document::LineFromPosition(Sci_Position pos) const { return cb.LineFromPosition(pos); } int Document::LineEndPosition(int position) const { return LineEnd(LineFromPosition(position)); } bool Document::IsLineEndPosition(int position) const { return LineEnd(LineFromPosition(position)) == position; } bool Document::IsPositionInLineEnd(int position) const { return position >= LineEnd(LineFromPosition(position)); } int Document::VCHomePosition(int position) const { int line = LineFromPosition(position); int startPosition = LineStart(line); int endLine = LineEnd(line); int startText = startPosition; while (startText < endLine && (cb.CharAt(startText) == ' ' || cb.CharAt(startText) == '\t')) startText++; if (position == startText) return startPosition; else return startText; } int SCI_METHOD Document::SetLevel(Sci_Position line, int level) { int prev = static_cast(perLineData[ldLevels])->SetLevel(line, level, LinesTotal()); if (prev != level) { DocModification mh(SC_MOD_CHANGEFOLD | SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); mh.foldLevelNow = level; mh.foldLevelPrev = prev; NotifyModified(mh); } return prev; } int SCI_METHOD Document::GetLevel(Sci_Position line) const { return static_cast(perLineData[ldLevels])->GetLevel(line); } void Document::ClearLevels() { static_cast(perLineData[ldLevels])->ClearLevels(); } static bool IsSubordinate(int levelStart, int levelTry) { if (levelTry & SC_FOLDLEVELWHITEFLAG) return true; else return LevelNumber(levelStart) < LevelNumber(levelTry); } int Document::GetLastChild(int lineParent, int level, int lastLine) { if (level == -1) level = LevelNumber(GetLevel(lineParent)); int maxLine = LinesTotal(); int lookLastLine = (lastLine != -1) ? Platform::Minimum(LinesTotal() - 1, lastLine) : -1; int lineMaxSubord = lineParent; while (lineMaxSubord < maxLine - 1) { EnsureStyledTo(LineStart(lineMaxSubord + 2)); if (!IsSubordinate(level, GetLevel(lineMaxSubord + 1))) break; if ((lookLastLine != -1) && (lineMaxSubord >= lookLastLine) && !(GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG)) break; lineMaxSubord++; } if (lineMaxSubord > lineParent) { if (level > LevelNumber(GetLevel(lineMaxSubord + 1))) { // Have chewed up some whitespace that belongs to a parent so seek back if (GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG) { lineMaxSubord--; } } } return lineMaxSubord; } int Document::GetFoldParent(int line) const { int level = LevelNumber(GetLevel(line)); int lineLook = line - 1; while ((lineLook > 0) && ( (!(GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG)) || (LevelNumber(GetLevel(lineLook)) >= level)) ) { lineLook--; } if ((GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG) && (LevelNumber(GetLevel(lineLook)) < level)) { return lineLook; } else { return -1; } } void Document::GetHighlightDelimiters(HighlightDelimiter &highlightDelimiter, int line, int lastLine) { int level = GetLevel(line); int lookLastLine = Platform::Maximum(line, lastLine) + 1; int lookLine = line; int lookLineLevel = level; int lookLineLevelNum = LevelNumber(lookLineLevel); while ((lookLine > 0) && ((lookLineLevel & SC_FOLDLEVELWHITEFLAG) || ((lookLineLevel & SC_FOLDLEVELHEADERFLAG) && (lookLineLevelNum >= LevelNumber(GetLevel(lookLine + 1)))))) { lookLineLevel = GetLevel(--lookLine); lookLineLevelNum = LevelNumber(lookLineLevel); } int beginFoldBlock = (lookLineLevel & SC_FOLDLEVELHEADERFLAG) ? lookLine : GetFoldParent(lookLine); if (beginFoldBlock == -1) { highlightDelimiter.Clear(); return; } int endFoldBlock = GetLastChild(beginFoldBlock, -1, lookLastLine); int firstChangeableLineBefore = -1; if (endFoldBlock < line) { lookLine = beginFoldBlock - 1; lookLineLevel = GetLevel(lookLine); lookLineLevelNum = LevelNumber(lookLineLevel); while ((lookLine >= 0) && (lookLineLevelNum >= SC_FOLDLEVELBASE)) { if (lookLineLevel & SC_FOLDLEVELHEADERFLAG) { if (GetLastChild(lookLine, -1, lookLastLine) == line) { beginFoldBlock = lookLine; endFoldBlock = line; firstChangeableLineBefore = line - 1; } } if ((lookLine > 0) && (lookLineLevelNum == SC_FOLDLEVELBASE) && (LevelNumber(GetLevel(lookLine - 1)) > lookLineLevelNum)) break; lookLineLevel = GetLevel(--lookLine); lookLineLevelNum = LevelNumber(lookLineLevel); } } if (firstChangeableLineBefore == -1) { for (lookLine = line - 1, lookLineLevel = GetLevel(lookLine), lookLineLevelNum = LevelNumber(lookLineLevel); lookLine >= beginFoldBlock; lookLineLevel = GetLevel(--lookLine), lookLineLevelNum = LevelNumber(lookLineLevel)) { if ((lookLineLevel & SC_FOLDLEVELWHITEFLAG) || (lookLineLevelNum > LevelNumber(level))) { firstChangeableLineBefore = lookLine; break; } } } if (firstChangeableLineBefore == -1) firstChangeableLineBefore = beginFoldBlock - 1; int firstChangeableLineAfter = -1; for (lookLine = line + 1, lookLineLevel = GetLevel(lookLine), lookLineLevelNum = LevelNumber(lookLineLevel); lookLine <= endFoldBlock; lookLineLevel = GetLevel(++lookLine), lookLineLevelNum = LevelNumber(lookLineLevel)) { if ((lookLineLevel & SC_FOLDLEVELHEADERFLAG) && (lookLineLevelNum < LevelNumber(GetLevel(lookLine + 1)))) { firstChangeableLineAfter = lookLine; break; } } if (firstChangeableLineAfter == -1) firstChangeableLineAfter = endFoldBlock + 1; highlightDelimiter.beginFoldBlock = beginFoldBlock; highlightDelimiter.endFoldBlock = endFoldBlock; highlightDelimiter.firstChangeableLineBefore = firstChangeableLineBefore; highlightDelimiter.firstChangeableLineAfter = firstChangeableLineAfter; } int Document::ClampPositionIntoDocument(int pos) const { return Platform::Clamp(pos, 0, Length()); } bool Document::IsCrLf(int pos) const { if (pos < 0) return false; if (pos >= (Length() - 1)) return false; return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); } int Document::LenChar(int pos) { if (pos < 0) { return 1; } else if (IsCrLf(pos)) { return 2; } else if (SC_CP_UTF8 == dbcsCodePage) { const unsigned char leadByte = static_cast(cb.CharAt(pos)); const int widthCharBytes = UTF8BytesOfLead[leadByte]; int lengthDoc = Length(); if ((pos + widthCharBytes) > lengthDoc) return lengthDoc - pos; else return widthCharBytes; } else if (dbcsCodePage) { return IsDBCSLeadByte(cb.CharAt(pos)) ? 2 : 1; } else { return 1; } } bool Document::InGoodUTF8(int pos, int &start, int &end) const { int trail = pos; while ((trail>0) && (pos-trail < UTF8MaxBytes) && UTF8IsTrailByte(static_cast(cb.CharAt(trail-1)))) trail--; start = (trail > 0) ? trail-1 : trail; const unsigned char leadByte = static_cast(cb.CharAt(start)); const int widthCharBytes = UTF8BytesOfLead[leadByte]; if (widthCharBytes == 1) { return false; } else { int trailBytes = widthCharBytes - 1; int len = pos - start; if (len > trailBytes) // pos too far from lead return false; char charBytes[UTF8MaxBytes] = {static_cast(leadByte),0,0,0}; for (int b=1; b(start+b)); int utf8status = UTF8Classify(reinterpret_cast(charBytes), widthCharBytes); if (utf8status & UTF8MaskInvalid) return false; end = start + widthCharBytes; return true; } } // Normalise a position so that it is not halfway through a two byte character. // This can occur in two situations - // When lines are terminated with \r\n pairs which should be treated as one character. // When displaying DBCS text such as Japanese. // If moving, move the position in the indicated direction. int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) const { //Platform::DebugPrintf("NoCRLF %d %d\n", pos, moveDir); // If out of range, just return minimum/maximum value. if (pos <= 0) return 0; if (pos >= Length()) return Length(); // PLATFORM_ASSERT(pos > 0 && pos < Length()); if (checkLineEnd && IsCrLf(pos - 1)) { if (moveDir > 0) return pos + 1; else return pos - 1; } if (dbcsCodePage) { if (SC_CP_UTF8 == dbcsCodePage) { unsigned char ch = static_cast(cb.CharAt(pos)); // If ch is not a trail byte then pos is valid intercharacter position if (UTF8IsTrailByte(ch)) { int startUTF = pos; int endUTF = pos; if (InGoodUTF8(pos, startUTF, endUTF)) { // ch is a trail byte within a UTF-8 character if (moveDir > 0) pos = endUTF; else pos = startUTF; } // Else invalid UTF-8 so return position of isolated trail byte } } else { // Anchor DBCS calculations at start of line because start of line can // not be a DBCS trail byte. int posStartLine = LineStart(LineFromPosition(pos)); if (pos == posStartLine) return pos; // Step back until a non-lead-byte is found. int posCheck = pos; while ((posCheck > posStartLine) && IsDBCSLeadByte(cb.CharAt(posCheck-1))) posCheck--; // Check from known start of character. while (posCheck < pos) { int mbsize = IsDBCSLeadByte(cb.CharAt(posCheck)) ? 2 : 1; if (posCheck + mbsize == pos) { return pos; } else if (posCheck + mbsize > pos) { if (moveDir > 0) { return posCheck + mbsize; } else { return posCheck; } } posCheck += mbsize; } } } return pos; } // NextPosition moves between valid positions - it can not handle a position in the middle of a // multi-byte character. It is used to iterate through text more efficiently than MovePositionOutsideChar. // A \r\n pair is treated as two characters. int Document::NextPosition(int pos, int moveDir) const { // If out of range, just return minimum/maximum value. int increment = (moveDir > 0) ? 1 : -1; if (pos + increment <= 0) return 0; if (pos + increment >= Length()) return Length(); if (dbcsCodePage) { if (SC_CP_UTF8 == dbcsCodePage) { if (increment == 1) { // Simple forward movement case so can avoid some checks const unsigned char leadByte = static_cast(cb.CharAt(pos)); if (UTF8IsAscii(leadByte)) { // Single byte character or invalid pos++; } else { const int widthCharBytes = UTF8BytesOfLead[leadByte]; char charBytes[UTF8MaxBytes] = {static_cast(leadByte),0,0,0}; for (int b=1; b(pos+b)); int utf8status = UTF8Classify(reinterpret_cast(charBytes), widthCharBytes); if (utf8status & UTF8MaskInvalid) pos++; else pos += utf8status & UTF8MaskWidth; } } else { // Examine byte before position pos--; unsigned char ch = static_cast(cb.CharAt(pos)); // If ch is not a trail byte then pos is valid intercharacter position if (UTF8IsTrailByte(ch)) { // If ch is a trail byte in a valid UTF-8 character then return start of character int startUTF = pos; int endUTF = pos; if (InGoodUTF8(pos, startUTF, endUTF)) { pos = startUTF; } // Else invalid UTF-8 so return position of isolated trail byte } } } else { if (moveDir > 0) { int mbsize = IsDBCSLeadByte(cb.CharAt(pos)) ? 2 : 1; pos += mbsize; if (pos > Length()) pos = Length(); } else { // Anchor DBCS calculations at start of line because start of line can // not be a DBCS trail byte. int posStartLine = LineStart(LineFromPosition(pos)); // See http://msdn.microsoft.com/en-us/library/cc194792%28v=MSDN.10%29.aspx // http://msdn.microsoft.com/en-us/library/cc194790.aspx if ((pos - 1) <= posStartLine) { return pos - 1; } else if (IsDBCSLeadByte(cb.CharAt(pos - 1))) { // Must actually be trail byte return pos - 2; } else { // Otherwise, step back until a non-lead-byte is found. int posTemp = pos - 1; while (posStartLine <= --posTemp && IsDBCSLeadByte(cb.CharAt(posTemp))) ; // Now posTemp+1 must point to the beginning of a character, // so figure out whether we went back an even or an odd // number of bytes and go back 1 or 2 bytes, respectively. return (pos - 1 - ((pos - posTemp) & 1)); } } } } else { pos += increment; } return pos; } bool Document::NextCharacter(int &pos, int moveDir) const { // Returns true if pos changed int posNext = NextPosition(pos, moveDir); if (posNext == pos) { return false; } else { pos = posNext; return true; } } Document::CharacterExtracted Document::CharacterAfter(int position) const { if (position >= Length()) { return CharacterExtracted(unicodeReplacementChar, 0); } const unsigned char leadByte = static_cast(cb.CharAt(position)); if (!dbcsCodePage || UTF8IsAscii(leadByte)) { // Common case: ASCII character return CharacterExtracted(leadByte, 1); } if (SC_CP_UTF8 == dbcsCodePage) { const int widthCharBytes = UTF8BytesOfLead[leadByte]; unsigned char charBytes[UTF8MaxBytes] = { leadByte, 0, 0, 0 }; for (int b = 1; b(cb.CharAt(position + b)); int utf8status = UTF8Classify(charBytes, widthCharBytes); if (utf8status & UTF8MaskInvalid) { // Treat as invalid and use up just one byte return CharacterExtracted(unicodeReplacementChar, 1); } else { return CharacterExtracted(UnicodeFromUTF8(charBytes), utf8status & UTF8MaskWidth); } } else { if (IsDBCSLeadByte(leadByte) && ((position + 1) < Length())) { return CharacterExtracted::DBCS(leadByte, static_cast(cb.CharAt(position + 1))); } else { return CharacterExtracted(leadByte, 1); } } } Document::CharacterExtracted Document::CharacterBefore(int position) const { if (position <= 0) { return CharacterExtracted(unicodeReplacementChar, 0); } const unsigned char previousByte = static_cast(cb.CharAt(position - 1)); if (0 == dbcsCodePage) { return CharacterExtracted(previousByte, 1); } if (SC_CP_UTF8 == dbcsCodePage) { if (UTF8IsAscii(previousByte)) { return CharacterExtracted(previousByte, 1); } position--; // If previousByte is not a trail byte then its invalid if (UTF8IsTrailByte(previousByte)) { // If previousByte is a trail byte in a valid UTF-8 character then find start of character int startUTF = position; int endUTF = position; if (InGoodUTF8(position, startUTF, endUTF)) { const int widthCharBytes = endUTF - startUTF; unsigned char charBytes[UTF8MaxBytes] = { 0, 0, 0, 0 }; for (int b = 0; b(cb.CharAt(startUTF + b)); int utf8status = UTF8Classify(charBytes, widthCharBytes); if (utf8status & UTF8MaskInvalid) { // Treat as invalid and use up just one byte return CharacterExtracted(unicodeReplacementChar, 1); } else { return CharacterExtracted(UnicodeFromUTF8(charBytes), utf8status & UTF8MaskWidth); } } // Else invalid UTF-8 so return position of isolated trail byte } return CharacterExtracted(unicodeReplacementChar, 1); } else { // Moving backwards in DBCS is complex so use NextPosition const int posStartCharacter = NextPosition(position, -1); return CharacterAfter(posStartCharacter); } } // Return -1 on out-of-bounds Sci_Position SCI_METHOD Document::GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const { int pos = positionStart; if (dbcsCodePage) { const int increment = (characterOffset > 0) ? 1 : -1; while (characterOffset != 0) { const int posNext = NextPosition(pos, increment); if (posNext == pos) return INVALID_POSITION; pos = posNext; characterOffset -= increment; } } else { pos = positionStart + characterOffset; if ((pos < 0) || (pos > Length())) return INVALID_POSITION; } return pos; } int Document::GetRelativePositionUTF16(int positionStart, int characterOffset) const { int pos = positionStart; if (dbcsCodePage) { const int increment = (characterOffset > 0) ? 1 : -1; while (characterOffset != 0) { const int posNext = NextPosition(pos, increment); if (posNext == pos) return INVALID_POSITION; if (abs(pos-posNext) > 3) // 4 byte character = 2*UTF16. characterOffset -= increment; pos = posNext; characterOffset -= increment; } } else { pos = positionStart + characterOffset; if ((pos < 0) || (pos > Length())) return INVALID_POSITION; } return pos; } int SCI_METHOD Document::GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const { int character; int bytesInCharacter = 1; if (dbcsCodePage) { const unsigned char leadByte = static_cast(cb.CharAt(position)); if (SC_CP_UTF8 == dbcsCodePage) { if (UTF8IsAscii(leadByte)) { // Single byte character or invalid character = leadByte; } else { const int widthCharBytes = UTF8BytesOfLead[leadByte]; unsigned char charBytes[UTF8MaxBytes] = {leadByte,0,0,0}; for (int b=1; b(cb.CharAt(position+b)); int utf8status = UTF8Classify(charBytes, widthCharBytes); if (utf8status & UTF8MaskInvalid) { // Report as singleton surrogate values which are invalid Unicode character = 0xDC80 + leadByte; } else { bytesInCharacter = utf8status & UTF8MaskWidth; character = UnicodeFromUTF8(charBytes); } } } else { if (IsDBCSLeadByte(leadByte)) { bytesInCharacter = 2; character = (leadByte << 8) | static_cast(cb.CharAt(position+1)); } else { character = leadByte; } } } else { character = cb.CharAt(position); } if (pWidth) { *pWidth = bytesInCharacter; } return character; } int SCI_METHOD Document::CodePage() const { return dbcsCodePage; } bool SCI_METHOD Document::IsDBCSLeadByte(char ch) const { // Byte ranges found in Wikipedia articles with relevant search strings in each case unsigned char uch = static_cast(ch); switch (dbcsCodePage) { case 932: // Shift_jis return ((uch >= 0x81) && (uch <= 0x9F)) || ((uch >= 0xE0) && (uch <= 0xFC)); // Lead bytes F0 to FC may be a Microsoft addition. case 936: // GBK return (uch >= 0x81) && (uch <= 0xFE); case 949: // Korean Wansung KS C-5601-1987 return (uch >= 0x81) && (uch <= 0xFE); case 950: // Big5 return (uch >= 0x81) && (uch <= 0xFE); case 1361: // Korean Johab KS C-5601-1992 return ((uch >= 0x84) && (uch <= 0xD3)) || ((uch >= 0xD8) && (uch <= 0xDE)) || ((uch >= 0xE0) && (uch <= 0xF9)); } return false; } static inline bool IsSpaceOrTab(int ch) { return ch == ' ' || ch == '\t'; } // Need to break text into segments near lengthSegment but taking into // account the encoding to not break inside a UTF-8 or DBCS character // and also trying to avoid breaking inside a pair of combining characters. // The segment length must always be long enough (more than 4 bytes) // so that there will be at least one whole character to make a segment. // For UTF-8, text must consist only of valid whole characters. // In preference order from best to worst: // 1) Break after space // 2) Break before punctuation // 3) Break after whole character int Document::SafeSegment(const char *text, int length, int lengthSegment) const { if (length <= lengthSegment) return length; int lastSpaceBreak = -1; int lastPunctuationBreak = -1; int lastEncodingAllowedBreak = 0; for (int j=0; j < lengthSegment;) { unsigned char ch = static_cast(text[j]); if (j > 0) { if (IsSpaceOrTab(text[j - 1]) && !IsSpaceOrTab(text[j])) { lastSpaceBreak = j; } if (ch < 'A') { lastPunctuationBreak = j; } } lastEncodingAllowedBreak = j; if (dbcsCodePage == SC_CP_UTF8) { j += UTF8BytesOfLead[ch]; } else if (dbcsCodePage) { j += IsDBCSLeadByte(ch) ? 2 : 1; } else { j++; } } if (lastSpaceBreak >= 0) { return lastSpaceBreak; } else if (lastPunctuationBreak >= 0) { return lastPunctuationBreak; } return lastEncodingAllowedBreak; } EncodingFamily Document::CodePageFamily() const { if (SC_CP_UTF8 == dbcsCodePage) return efUnicode; else if (dbcsCodePage) return efDBCS; else return efEightBit; } void Document::ModifiedAt(int pos) { if (endStyled > pos) endStyled = pos; } void Document::CheckReadOnly() { if (cb.IsReadOnly() && enteredReadOnlyCount == 0) { enteredReadOnlyCount++; NotifyModifyAttempt(); enteredReadOnlyCount--; } } // Document only modified by gateways DeleteChars, InsertString, Undo, Redo, and SetStyleAt. // SetStyleAt does not change the persistent state of a document bool Document::DeleteChars(int pos, int len) { if (pos < 0) return false; if (len <= 0) return false; if ((pos + len) > Length()) return false; CheckReadOnly(); if (enteredModification != 0) { return false; } else { enteredModification++; if (!cb.IsReadOnly()) { NotifyModified( DocModification( SC_MOD_BEFOREDELETE | SC_PERFORMED_USER, pos, len, 0, 0)); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); bool startSequence = false; const char *text = cb.DeleteChars(pos, len, startSequence); if (startSavePoint && cb.IsCollectingUndo()) NotifySavePoint(!startSavePoint); if ((pos < Length()) || (pos == 0)) ModifiedAt(pos); else ModifiedAt(pos-1); NotifyModified( DocModification( SC_MOD_DELETETEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), pos, len, LinesTotal() - prevLinesTotal, text)); } enteredModification--; } return !cb.IsReadOnly(); } /** * Insert a string with a length. */ int Document::InsertString(int position, const char *s, int insertLength) { if (insertLength <= 0) { return 0; } CheckReadOnly(); // Application may change read only state here if (cb.IsReadOnly()) { return 0; } if (enteredModification != 0) { return 0; } enteredModification++; insertionSet = false; insertion.clear(); NotifyModified( DocModification( SC_MOD_INSERTCHECK, position, insertLength, 0, s)); if (insertionSet) { s = insertion.c_str(); insertLength = static_cast(insertion.length()); } NotifyModified( DocModification( SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, position, insertLength, 0, s)); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); bool startSequence = false; const char *text = cb.InsertString(position, s, insertLength, startSequence); if (startSavePoint && cb.IsCollectingUndo()) NotifySavePoint(!startSavePoint); ModifiedAt(position); NotifyModified( DocModification( SC_MOD_INSERTTEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), position, insertLength, LinesTotal() - prevLinesTotal, text)); if (insertionSet) { // Free memory as could be large std::string().swap(insertion); } enteredModification--; return insertLength; } void Document::ChangeInsertion(const char *s, int length) { insertionSet = true; insertion.assign(s, length); } int SCI_METHOD Document::AddData(char *data, Sci_Position length) { try { int position = Length(); InsertString(position, data, length); } catch (std::bad_alloc &) { return SC_STATUS_BADALLOC; } catch (...) { return SC_STATUS_FAILURE; } return 0; } void * SCI_METHOD Document::ConvertToDocument() { return this; } int Document::Undo() { int newPos = -1; CheckReadOnly(); if ((enteredModification == 0) && (cb.IsCollectingUndo())) { enteredModification++; if (!cb.IsReadOnly()) { bool startSavePoint = cb.IsSavePoint(); bool multiLine = false; int steps = cb.StartUndo(); //Platform::DebugPrintf("Steps=%d\n", steps); int coalescedRemovePos = -1; int coalescedRemoveLen = 0; int prevRemoveActionPos = -1; int prevRemoveActionLen = 0; for (int step = 0; step < steps; step++) { const int prevLinesTotal = LinesTotal(); const Action &action = cb.GetUndoStep(); if (action.at == removeAction) { NotifyModified(DocModification( SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action)); } else if (action.at == containerAction) { DocModification dm(SC_MOD_CONTAINER | SC_PERFORMED_UNDO); dm.token = action.position; NotifyModified(dm); if (!action.mayCoalesce) { coalescedRemovePos = -1; coalescedRemoveLen = 0; prevRemoveActionPos = -1; prevRemoveActionLen = 0; } } else { NotifyModified(DocModification( SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action)); } cb.PerformUndoStep(); if (action.at != containerAction) { ModifiedAt(action.position); newPos = action.position; } int modFlags = SC_PERFORMED_UNDO; // With undo, an insertion action becomes a deletion notification if (action.at == removeAction) { newPos += action.lenData; modFlags |= SC_MOD_INSERTTEXT; if ((coalescedRemoveLen > 0) && (action.position == prevRemoveActionPos || action.position == (prevRemoveActionPos + prevRemoveActionLen))) { coalescedRemoveLen += action.lenData; newPos = coalescedRemovePos + coalescedRemoveLen; } else { coalescedRemovePos = action.position; coalescedRemoveLen = action.lenData; } prevRemoveActionPos = action.position; prevRemoveActionLen = action.lenData; } else if (action.at == insertAction) { modFlags |= SC_MOD_DELETETEXT; coalescedRemovePos = -1; coalescedRemoveLen = 0; prevRemoveActionPos = -1; prevRemoveActionLen = 0; } if (steps > 1) modFlags |= SC_MULTISTEPUNDOREDO; const int linesAdded = LinesTotal() - prevLinesTotal; if (linesAdded != 0) multiLine = true; if (step == steps - 1) { modFlags |= SC_LASTSTEPINUNDOREDO; if (multiLine) modFlags |= SC_MULTILINEUNDOREDO; } NotifyModified(DocModification(modFlags, action.position, action.lenData, linesAdded, action.data)); } bool endSavePoint = cb.IsSavePoint(); if (startSavePoint != endSavePoint) NotifySavePoint(endSavePoint); } enteredModification--; } return newPos; } int Document::Redo() { int newPos = -1; CheckReadOnly(); if ((enteredModification == 0) && (cb.IsCollectingUndo())) { enteredModification++; if (!cb.IsReadOnly()) { bool startSavePoint = cb.IsSavePoint(); bool multiLine = false; int steps = cb.StartRedo(); for (int step = 0; step < steps; step++) { const int prevLinesTotal = LinesTotal(); const Action &action = cb.GetRedoStep(); if (action.at == insertAction) { NotifyModified(DocModification( SC_MOD_BEFOREINSERT | SC_PERFORMED_REDO, action)); } else if (action.at == containerAction) { DocModification dm(SC_MOD_CONTAINER | SC_PERFORMED_REDO); dm.token = action.position; NotifyModified(dm); } else { NotifyModified(DocModification( SC_MOD_BEFOREDELETE | SC_PERFORMED_REDO, action)); } cb.PerformRedoStep(); if (action.at != containerAction) { ModifiedAt(action.position); newPos = action.position; } int modFlags = SC_PERFORMED_REDO; if (action.at == insertAction) { newPos += action.lenData; modFlags |= SC_MOD_INSERTTEXT; } else if (action.at == removeAction) { modFlags |= SC_MOD_DELETETEXT; } if (steps > 1) modFlags |= SC_MULTISTEPUNDOREDO; const int linesAdded = LinesTotal() - prevLinesTotal; if (linesAdded != 0) multiLine = true; if (step == steps - 1) { modFlags |= SC_LASTSTEPINUNDOREDO; if (multiLine) modFlags |= SC_MULTILINEUNDOREDO; } NotifyModified( DocModification(modFlags, action.position, action.lenData, linesAdded, action.data)); } bool endSavePoint = cb.IsSavePoint(); if (startSavePoint != endSavePoint) NotifySavePoint(endSavePoint); } enteredModification--; } return newPos; } void Document::DelChar(int pos) { DeleteChars(pos, LenChar(pos)); } void Document::DelCharBack(int pos) { if (pos <= 0) { return; } else if (IsCrLf(pos - 2)) { DeleteChars(pos - 2, 2); } else if (dbcsCodePage) { int startChar = NextPosition(pos, -1); DeleteChars(startChar, pos - startChar); } else { DeleteChars(pos - 1, 1); } } static int NextTab(int pos, int tabSize) { return ((pos / tabSize) + 1) * tabSize; } static std::string CreateIndentation(int indent, int tabSize, bool insertSpaces) { std::string indentation; if (!insertSpaces) { while (indent >= tabSize) { indentation += '\t'; indent -= tabSize; } } while (indent > 0) { indentation += ' '; indent--; } return indentation; } int SCI_METHOD Document::GetLineIndentation(Sci_Position line) { int indent = 0; if ((line >= 0) && (line < LinesTotal())) { int lineStart = LineStart(line); int length = Length(); for (int i = lineStart; i < length; i++) { char ch = cb.CharAt(i); if (ch == ' ') indent++; else if (ch == '\t') indent = NextTab(indent, tabInChars); else return indent; } } return indent; } int Document::SetLineIndentation(int line, int indent) { int indentOfLine = GetLineIndentation(line); if (indent < 0) indent = 0; if (indent != indentOfLine) { std::string linebuf = CreateIndentation(indent, tabInChars, !useTabs); int thisLineStart = LineStart(line); int indentPos = GetLineIndentPosition(line); UndoGroup ug(this); DeleteChars(thisLineStart, indentPos - thisLineStart); return thisLineStart + InsertString(thisLineStart, linebuf.c_str(), static_cast(linebuf.length())); } else { return GetLineIndentPosition(line); } } int Document::GetLineIndentPosition(int line) const { if (line < 0) return 0; int pos = LineStart(line); int length = Length(); while ((pos < length) && IsSpaceOrTab(cb.CharAt(pos))) { pos++; } return pos; } int Document::GetColumn(int pos) { int column = 0; int line = LineFromPosition(pos); if ((line >= 0) && (line < LinesTotal())) { for (int i = LineStart(line); i < pos;) { char ch = cb.CharAt(i); if (ch == '\t') { column = NextTab(column, tabInChars); i++; } else if (ch == '\r') { return column; } else if (ch == '\n') { return column; } else if (i >= Length()) { return column; } else { column++; i = NextPosition(i, 1); } } } return column; } int Document::CountCharacters(int startPos, int endPos) const { startPos = MovePositionOutsideChar(startPos, 1, false); endPos = MovePositionOutsideChar(endPos, -1, false); int count = 0; int i = startPos; while (i < endPos) { count++; i = NextPosition(i, 1); } return count; } int Document::CountUTF16(int startPos, int endPos) const { startPos = MovePositionOutsideChar(startPos, 1, false); endPos = MovePositionOutsideChar(endPos, -1, false); int count = 0; int i = startPos; while (i < endPos) { count++; const int next = NextPosition(i, 1); if ((next - i) > 3) count++; i = next; } return count; } int Document::FindColumn(int line, int column) { int position = LineStart(line); if ((line >= 0) && (line < LinesTotal())) { int columnCurrent = 0; while ((columnCurrent < column) && (position < Length())) { char ch = cb.CharAt(position); if (ch == '\t') { columnCurrent = NextTab(columnCurrent, tabInChars); if (columnCurrent > column) return position; position++; } else if (ch == '\r') { return position; } else if (ch == '\n') { return position; } else { columnCurrent++; position = NextPosition(position, 1); } } } return position; } void Document::Indent(bool forwards, int lineBottom, int lineTop) { // Dedent - suck white space off the front of the line to dedent by equivalent of a tab for (int line = lineBottom; line >= lineTop; line--) { int indentOfLine = GetLineIndentation(line); if (forwards) { if (LineStart(line) < LineEnd(line)) { SetLineIndentation(line, indentOfLine + IndentSize()); } } else { SetLineIndentation(line, indentOfLine - IndentSize()); } } } // Convert line endings for a piece of text to a particular mode. // Stop at len or when a NUL is found. std::string Document::TransformLineEnds(const char *s, size_t len, int eolModeWanted) { std::string dest; for (size_t i = 0; (i < len) && (s[i]); i++) { if (s[i] == '\n' || s[i] == '\r') { if (eolModeWanted == SC_EOL_CR) { dest.push_back('\r'); } else if (eolModeWanted == SC_EOL_LF) { dest.push_back('\n'); } else { // eolModeWanted == SC_EOL_CRLF dest.push_back('\r'); dest.push_back('\n'); } if ((s[i] == '\r') && (i+1 < len) && (s[i+1] == '\n')) { i++; } } else { dest.push_back(s[i]); } } return dest; } void Document::ConvertLineEnds(int eolModeSet) { UndoGroup ug(this); for (int pos = 0; pos < Length(); pos++) { if (cb.CharAt(pos) == '\r') { if (cb.CharAt(pos + 1) == '\n') { // CRLF if (eolModeSet == SC_EOL_CR) { DeleteChars(pos + 1, 1); // Delete the LF } else if (eolModeSet == SC_EOL_LF) { DeleteChars(pos, 1); // Delete the CR } else { pos++; } } else { // CR if (eolModeSet == SC_EOL_CRLF) { pos += InsertString(pos + 1, "\n", 1); // Insert LF } else if (eolModeSet == SC_EOL_LF) { pos += InsertString(pos, "\n", 1); // Insert LF DeleteChars(pos, 1); // Delete CR pos--; } } } else if (cb.CharAt(pos) == '\n') { // LF if (eolModeSet == SC_EOL_CRLF) { pos += InsertString(pos, "\r", 1); // Insert CR } else if (eolModeSet == SC_EOL_CR) { pos += InsertString(pos, "\r", 1); // Insert CR DeleteChars(pos, 1); // Delete LF pos--; } } } } bool Document::IsWhiteLine(int line) const { int currentChar = LineStart(line); int endLine = LineEnd(line); while (currentChar < endLine) { if (cb.CharAt(currentChar) != ' ' && cb.CharAt(currentChar) != '\t') { return false; } ++currentChar; } return true; } int Document::ParaUp(int pos) const { int line = LineFromPosition(pos); line--; while (line >= 0 && IsWhiteLine(line)) { // skip empty lines line--; } while (line >= 0 && !IsWhiteLine(line)) { // skip non-empty lines line--; } line++; return LineStart(line); } int Document::ParaDown(int pos) const { int line = LineFromPosition(pos); while (line < LinesTotal() && !IsWhiteLine(line)) { // skip non-empty lines line++; } while (line < LinesTotal() && IsWhiteLine(line)) { // skip empty lines line++; } if (line < LinesTotal()) return LineStart(line); else // end of a document return LineEnd(line-1); } bool Document::IsASCIIWordByte(unsigned char ch) const { if (IsASCII(ch)) { return charClass.GetClass(ch) == CharClassify::ccWord; } else { return false; } } CharClassify::cc Document::WordCharacterClass(unsigned int ch) const { if (dbcsCodePage && (!UTF8IsAscii(ch))) { if (SC_CP_UTF8 == dbcsCodePage) { // Use hard coded Unicode class const CharacterCategory cc = CategoriseCharacter(ch); switch (cc) { // Separator, Line/Paragraph case ccZl: case ccZp: return CharClassify::ccNewLine; // Separator, Space case ccZs: // Other case ccCc: case ccCf: case ccCs: case ccCo: case ccCn: return CharClassify::ccSpace; // Letter case ccLu: case ccLl: case ccLt: case ccLm: case ccLo: // Number case ccNd: case ccNl: case ccNo: // Mark - includes combining diacritics case ccMn: case ccMc: case ccMe: return CharClassify::ccWord; // Punctuation case ccPc: case ccPd: case ccPs: case ccPe: case ccPi: case ccPf: case ccPo: // Symbol case ccSm: case ccSc: case ccSk: case ccSo: return CharClassify::ccPunctuation; } } else { // Asian DBCS return CharClassify::ccWord; } } return charClass.GetClass(static_cast(ch)); } /** * Used by commmands that want to select whole words. * Finds the start of word at pos when delta < 0 or the end of the word when delta >= 0. */ int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) const { CharClassify::cc ccStart = CharClassify::ccWord; if (delta < 0) { if (!onlyWordCharacters) { const CharacterExtracted ce = CharacterBefore(pos); ccStart = WordCharacterClass(ce.character); } while (pos > 0) { const CharacterExtracted ce = CharacterBefore(pos); if (WordCharacterClass(ce.character) != ccStart) break; pos -= ce.widthBytes; } } else { if (!onlyWordCharacters && pos < Length()) { const CharacterExtracted ce = CharacterAfter(pos); ccStart = WordCharacterClass(ce.character); } while (pos < Length()) { const CharacterExtracted ce = CharacterAfter(pos); if (WordCharacterClass(ce.character) != ccStart) break; pos += ce.widthBytes; } } return MovePositionOutsideChar(pos, delta, true); } /** * Find the start of the next word in either a forward (delta >= 0) or backwards direction * (delta < 0). * This is looking for a transition between character classes although there is also some * additional movement to transit white space. * Used by cursor movement by word commands. */ int Document::NextWordStart(int pos, int delta) const { if (delta < 0) { while (pos > 0) { const CharacterExtracted ce = CharacterBefore(pos); if (WordCharacterClass(ce.character) != CharClassify::ccSpace) break; pos -= ce.widthBytes; } if (pos > 0) { CharacterExtracted ce = CharacterBefore(pos); const CharClassify::cc ccStart = WordCharacterClass(ce.character); while (pos > 0) { ce = CharacterBefore(pos); if (WordCharacterClass(ce.character) != ccStart) break; pos -= ce.widthBytes; } } } else { CharacterExtracted ce = CharacterAfter(pos); const CharClassify::cc ccStart = WordCharacterClass(ce.character); while (pos < Length()) { ce = CharacterAfter(pos); if (WordCharacterClass(ce.character) != ccStart) break; pos += ce.widthBytes; } while (pos < Length()) { ce = CharacterAfter(pos); if (WordCharacterClass(ce.character) != CharClassify::ccSpace) break; pos += ce.widthBytes; } } return pos; } /** * Find the end of the next word in either a forward (delta >= 0) or backwards direction * (delta < 0). * This is looking for a transition between character classes although there is also some * additional movement to transit white space. * Used by cursor movement by word commands. */ int Document::NextWordEnd(int pos, int delta) const { if (delta < 0) { if (pos > 0) { CharacterExtracted ce = CharacterBefore(pos); CharClassify::cc ccStart = WordCharacterClass(ce.character); if (ccStart != CharClassify::ccSpace) { while (pos > 0) { ce = CharacterBefore(pos); if (WordCharacterClass(ce.character) != ccStart) break; pos -= ce.widthBytes; } } while (pos > 0) { ce = CharacterBefore(pos); if (WordCharacterClass(ce.character) != CharClassify::ccSpace) break; pos -= ce.widthBytes; } } } else { while (pos < Length()) { CharacterExtracted ce = CharacterAfter(pos); if (WordCharacterClass(ce.character) != CharClassify::ccSpace) break; pos += ce.widthBytes; } if (pos < Length()) { CharacterExtracted ce = CharacterAfter(pos); CharClassify::cc ccStart = WordCharacterClass(ce.character); while (pos < Length()) { ce = CharacterAfter(pos); if (WordCharacterClass(ce.character) != ccStart) break; pos += ce.widthBytes; } } } return pos; } /** * Check that the character at the given position is a word or punctuation character and that * the previous character is of a different character class. */ bool Document::IsWordStartAt(int pos) const { if (pos >= Length()) return false; if (pos > 0) { const CharacterExtracted cePos = CharacterAfter(pos); const CharClassify::cc ccPos = WordCharacterClass(cePos.character); const CharacterExtracted cePrev = CharacterBefore(pos); const CharClassify::cc ccPrev = WordCharacterClass(cePrev.character); return (ccPos == CharClassify::ccWord || ccPos == CharClassify::ccPunctuation) && (ccPos != ccPrev); } return true; } /** * Check that the character at the given position is a word or punctuation character and that * the next character is of a different character class. */ bool Document::IsWordEndAt(int pos) const { if (pos <= 0) return false; if (pos < Length()) { const CharacterExtracted cePos = CharacterAfter(pos); const CharClassify::cc ccPos = WordCharacterClass(cePos.character); const CharacterExtracted cePrev = CharacterBefore(pos); const CharClassify::cc ccPrev = WordCharacterClass(cePrev.character); return (ccPrev == CharClassify::ccWord || ccPrev == CharClassify::ccPunctuation) && (ccPrev != ccPos); } return true; } /** * Check that the given range is has transitions between character classes at both * ends and where the characters on the inside are word or punctuation characters. */ bool Document::IsWordAt(int start, int end) const { return (start < end) && IsWordStartAt(start) && IsWordEndAt(end); } bool Document::MatchesWordOptions(bool word, bool wordStart, int pos, int length) const { return (!word && !wordStart) || (word && IsWordAt(pos, pos + length)) || (wordStart && IsWordStartAt(pos)); } bool Document::HasCaseFolder(void) const { return pcf != 0; } void Document::SetCaseFolder(CaseFolder *pcf_) { delete pcf; pcf = pcf_; } Document::CharacterExtracted Document::ExtractCharacter(int position) const { const unsigned char leadByte = static_cast(cb.CharAt(position)); if (UTF8IsAscii(leadByte)) { // Common case: ASCII character return CharacterExtracted(leadByte, 1); } const int widthCharBytes = UTF8BytesOfLead[leadByte]; unsigned char charBytes[UTF8MaxBytes] = { leadByte, 0, 0, 0 }; for (int b=1; b(cb.CharAt(position + b)); int utf8status = UTF8Classify(charBytes, widthCharBytes); if (utf8status & UTF8MaskInvalid) { // Treat as invalid and use up just one byte return CharacterExtracted(unicodeReplacementChar, 1); } else { return CharacterExtracted(UnicodeFromUTF8(charBytes), utf8status & UTF8MaskWidth); } } /** * Find text in document, supporting both forward and backward * searches (just pass minPos > maxPos to do a backward search) * Has not been tested with backwards DBCS searches yet. */ long Document::FindText(int minPos, int maxPos, const char *search, int flags, int *length) { if (*length <= 0) return minPos; const bool caseSensitive = (flags & SCFIND_MATCHCASE) != 0; const bool word = (flags & SCFIND_WHOLEWORD) != 0; const bool wordStart = (flags & SCFIND_WORDSTART) != 0; const bool regExp = (flags & SCFIND_REGEXP) != 0; if (regExp) { if (!regex) regex = CreateRegexSearch(&charClass); return regex->FindText(this, minPos, maxPos, search, caseSensitive, word, wordStart, flags, length); } else { const bool forward = minPos <= maxPos; const int increment = forward ? 1 : -1; // Range endpoints should not be inside DBCS characters, but just in case, move them. const int startPos = MovePositionOutsideChar(minPos, increment, false); const int endPos = MovePositionOutsideChar(maxPos, increment, false); // Compute actual search ranges needed const int lengthFind = *length; //Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind); const int limitPos = Platform::Maximum(startPos, endPos); int pos = startPos; if (!forward) { // Back all of a character pos = NextPosition(pos, increment); } if (caseSensitive) { const int endSearch = (startPos <= endPos) ? endPos - lengthFind + 1 : endPos; const char charStartSearch = search[0]; while (forward ? (pos < endSearch) : (pos >= endSearch)) { if (CharAt(pos) == charStartSearch) { bool found = (pos + lengthFind) <= limitPos; for (int indexSearch = 1; (indexSearch < lengthFind) && found; indexSearch++) { found = CharAt(pos + indexSearch) == search[indexSearch]; } if (found && MatchesWordOptions(word, wordStart, pos, lengthFind)) { return pos; } } if (!NextCharacter(pos, increment)) break; } } else if (SC_CP_UTF8 == dbcsCodePage) { const size_t maxFoldingExpansion = 4; std::vector searchThing(lengthFind * UTF8MaxBytes * maxFoldingExpansion + 1); const int lenSearch = static_cast( pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind)); char bytes[UTF8MaxBytes + 1]; char folded[UTF8MaxBytes * maxFoldingExpansion + 1]; while (forward ? (pos < endPos) : (pos >= endPos)) { int widthFirstCharacter = 0; int posIndexDocument = pos; int indexSearch = 0; bool characterMatches = true; for (;;) { const unsigned char leadByte = static_cast(cb.CharAt(posIndexDocument)); bytes[0] = leadByte; int widthChar = 1; if (!UTF8IsAscii(leadByte)) { const int widthCharBytes = UTF8BytesOfLead[leadByte]; for (int b=1; b(bytes), widthCharBytes) & UTF8MaskWidth; } if (!widthFirstCharacter) widthFirstCharacter = widthChar; if ((posIndexDocument + widthChar) > limitPos) break; const int lenFlat = static_cast(pcf->Fold(folded, sizeof(folded), bytes, widthChar)); folded[lenFlat] = 0; // Does folded match the buffer characterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat); if (!characterMatches) break; posIndexDocument += widthChar; indexSearch += lenFlat; if (indexSearch >= lenSearch) break; } if (characterMatches && (indexSearch == static_cast(lenSearch))) { if (MatchesWordOptions(word, wordStart, pos, posIndexDocument - pos)) { *length = posIndexDocument - pos; return pos; } } if (forward) { pos += widthFirstCharacter; } else { if (!NextCharacter(pos, increment)) break; } } } else if (dbcsCodePage) { const size_t maxBytesCharacter = 2; const size_t maxFoldingExpansion = 4; std::vector searchThing(lengthFind * maxBytesCharacter * maxFoldingExpansion + 1); const int lenSearch = static_cast( pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind)); while (forward ? (pos < endPos) : (pos >= endPos)) { int indexDocument = 0; int indexSearch = 0; bool characterMatches = true; while (characterMatches && ((pos + indexDocument) < limitPos) && (indexSearch < lenSearch)) { char bytes[maxBytesCharacter + 1]; bytes[0] = cb.CharAt(pos + indexDocument); const int widthChar = IsDBCSLeadByte(bytes[0]) ? 2 : 1; if (widthChar == 2) bytes[1] = cb.CharAt(pos + indexDocument + 1); if ((pos + indexDocument + widthChar) > limitPos) break; char folded[maxBytesCharacter * maxFoldingExpansion + 1]; const int lenFlat = static_cast(pcf->Fold(folded, sizeof(folded), bytes, widthChar)); folded[lenFlat] = 0; // Does folded match the buffer characterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat); indexDocument += widthChar; indexSearch += lenFlat; } if (characterMatches && (indexSearch == static_cast(lenSearch))) { if (MatchesWordOptions(word, wordStart, pos, indexDocument)) { *length = indexDocument; return pos; } } if (!NextCharacter(pos, increment)) break; } } else { const int endSearch = (startPos <= endPos) ? endPos - lengthFind + 1 : endPos; std::vector searchThing(lengthFind + 1); pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind); while (forward ? (pos < endSearch) : (pos >= endSearch)) { bool found = (pos + lengthFind) <= limitPos; for (int indexSearch = 0; (indexSearch < lengthFind) && found; indexSearch++) { char ch = CharAt(pos + indexSearch); char folded[2]; pcf->Fold(folded, sizeof(folded), &ch, 1); found = folded[0] == searchThing[indexSearch]; } if (found && MatchesWordOptions(word, wordStart, pos, lengthFind)) { return pos; } if (!NextCharacter(pos, increment)) break; } } } //Platform::DebugPrintf("Not found\n"); return -1; } const char *Document::SubstituteByPosition(const char *text, int *length) { if (regex) return regex->SubstituteByPosition(this, text, length); else return 0; } int Document::LinesTotal() const { return cb.Lines(); } void Document::SetDefaultCharClasses(bool includeWordClass) { charClass.SetDefaultCharClasses(includeWordClass); } void Document::SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass) { charClass.SetCharClasses(chars, newCharClass); } int Document::GetCharsOfClass(CharClassify::cc characterClass, unsigned char *buffer) const { return charClass.GetCharsOfClass(characterClass, buffer); } void SCI_METHOD Document::StartStyling(Sci_Position position, char) { endStyled = position; } bool SCI_METHOD Document::SetStyleFor(Sci_Position length, char style) { if (enteredStyling != 0) { return false; } else { enteredStyling++; int prevEndStyled = endStyled; if (cb.SetStyleFor(endStyled, length, style)) { DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, prevEndStyled, length); NotifyModified(mh); } endStyled += length; enteredStyling--; return true; } } bool SCI_METHOD Document::SetStyles(Sci_Position length, const char *styles) { if (enteredStyling != 0) { return false; } else { enteredStyling++; bool didChange = false; int startMod = 0; int endMod = 0; for (int iPos = 0; iPos < length; iPos++, endStyled++) { PLATFORM_ASSERT(endStyled < Length()); if (cb.SetStyleAt(endStyled, styles[iPos])) { if (!didChange) { startMod = endStyled; } didChange = true; endMod = endStyled; } } if (didChange) { DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, startMod, endMod - startMod + 1); NotifyModified(mh); } enteredStyling--; return true; } } void Document::EnsureStyledTo(int pos) { if ((enteredStyling == 0) && (pos > GetEndStyled())) { IncrementStyleClock(); if (pli && !pli->UseContainerLexing()) { int lineEndStyled = LineFromPosition(GetEndStyled()); int endStyledTo = LineStart(lineEndStyled); pli->Colourise(endStyledTo, pos); } else { // Ask the watchers to style, and stop as soon as one responds. for (std::vector::iterator it = watchers.begin(); (pos > GetEndStyled()) && (it != watchers.end()); ++it) { it->watcher->NotifyStyleNeeded(this, it->userData, pos); } } } } void Document::StyleToAdjustingLineDuration(int pos) { // Place bounds on the duration used to avoid glitches spiking it // and so causing slow styling or non-responsive scrolling const double minDurationOneLine = 0.000001; const double maxDurationOneLine = 0.0001; // Alpha value for exponential smoothing. // Most recent value contributes 25% to smoothed value. const double alpha = 0.25; const Sci_Position lineFirst = LineFromPosition(GetEndStyled()); ElapsedTime etStyling; EnsureStyledTo(pos); const double durationStyling = etStyling.Duration(); const Sci_Position lineLast = LineFromPosition(GetEndStyled()); if (lineLast >= lineFirst + 8) { // Only adjust for styling multiple lines to avoid instability const double durationOneLine = durationStyling / (lineLast - lineFirst); durationStyleOneLine = alpha * durationOneLine + (1.0 - alpha) * durationStyleOneLine; if (durationStyleOneLine < minDurationOneLine) { durationStyleOneLine = minDurationOneLine; } else if (durationStyleOneLine > maxDurationOneLine) { durationStyleOneLine = maxDurationOneLine; } } } void Document::LexerChanged() { // Tell the watchers the lexer has changed. for (std::vector::iterator it = watchers.begin(); it != watchers.end(); ++it) { it->watcher->NotifyLexerChanged(this, it->userData); } } int SCI_METHOD Document::SetLineState(Sci_Position line, int state) { int statePrevious = static_cast(perLineData[ldState])->SetLineState(line, state); if (state != statePrevious) { DocModification mh(SC_MOD_CHANGELINESTATE, LineStart(line), 0, 0, 0, line); NotifyModified(mh); } return statePrevious; } int SCI_METHOD Document::GetLineState(Sci_Position line) const { return static_cast(perLineData[ldState])->GetLineState(line); } int Document::GetMaxLineState() { return static_cast(perLineData[ldState])->GetMaxLineState(); } void SCI_METHOD Document::ChangeLexerState(Sci_Position start, Sci_Position end) { DocModification mh(SC_MOD_LEXERSTATE, start, end-start, 0, 0, 0); NotifyModified(mh); } StyledText Document::MarginStyledText(int line) const { LineAnnotation *pla = static_cast(perLineData[ldMargin]); return StyledText(pla->Length(line), pla->Text(line), pla->MultipleStyles(line), pla->Style(line), pla->Styles(line)); } void Document::MarginSetText(int line, const char *text) { static_cast(perLineData[ldMargin])->SetText(line, text); DocModification mh(SC_MOD_CHANGEMARGIN, LineStart(line), 0, 0, 0, line); NotifyModified(mh); } void Document::MarginSetStyle(int line, int style) { static_cast(perLineData[ldMargin])->SetStyle(line, style); NotifyModified(DocModification(SC_MOD_CHANGEMARGIN, LineStart(line), 0, 0, 0, line)); } void Document::MarginSetStyles(int line, const unsigned char *styles) { static_cast(perLineData[ldMargin])->SetStyles(line, styles); NotifyModified(DocModification(SC_MOD_CHANGEMARGIN, LineStart(line), 0, 0, 0, line)); } void Document::MarginClearAll() { int maxEditorLine = LinesTotal(); for (int l=0; l(perLineData[ldMargin])->ClearAll(); } StyledText Document::AnnotationStyledText(int line) const { LineAnnotation *pla = static_cast(perLineData[ldAnnotation]); return StyledText(pla->Length(line), pla->Text(line), pla->MultipleStyles(line), pla->Style(line), pla->Styles(line)); } void Document::AnnotationSetText(int line, const char *text) { if (line >= 0 && line < LinesTotal()) { const int linesBefore = AnnotationLines(line); static_cast(perLineData[ldAnnotation])->SetText(line, text); const int linesAfter = AnnotationLines(line); DocModification mh(SC_MOD_CHANGEANNOTATION, LineStart(line), 0, 0, 0, line); mh.annotationLinesAdded = linesAfter - linesBefore; NotifyModified(mh); } } void Document::AnnotationSetStyle(int line, int style) { static_cast(perLineData[ldAnnotation])->SetStyle(line, style); DocModification mh(SC_MOD_CHANGEANNOTATION, LineStart(line), 0, 0, 0, line); NotifyModified(mh); } void Document::AnnotationSetStyles(int line, const unsigned char *styles) { if (line >= 0 && line < LinesTotal()) { static_cast(perLineData[ldAnnotation])->SetStyles(line, styles); } } int Document::AnnotationLines(int line) const { return static_cast(perLineData[ldAnnotation])->Lines(line); } void Document::AnnotationClearAll() { int maxEditorLine = LinesTotal(); for (int l=0; l(perLineData[ldAnnotation])->ClearAll(); } void Document::IncrementStyleClock() { styleClock = (styleClock + 1) % 0x100000; } void SCI_METHOD Document::DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) { if (decorations.FillRange(position, value, fillLength)) { DocModification mh(SC_MOD_CHANGEINDICATOR | SC_PERFORMED_USER, position, fillLength); NotifyModified(mh); } } bool Document::AddWatcher(DocWatcher *watcher, void *userData) { WatcherWithUserData wwud(watcher, userData); std::vector::iterator it = std::find(watchers.begin(), watchers.end(), wwud); if (it != watchers.end()) return false; watchers.push_back(wwud); return true; } bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) { std::vector::iterator it = std::find(watchers.begin(), watchers.end(), WatcherWithUserData(watcher, userData)); if (it != watchers.end()) { watchers.erase(it); return true; } return false; } void Document::NotifyModifyAttempt() { for (std::vector::iterator it = watchers.begin(); it != watchers.end(); ++it) { it->watcher->NotifyModifyAttempt(this, it->userData); } } void Document::NotifySavePoint(bool atSavePoint) { for (std::vector::iterator it = watchers.begin(); it != watchers.end(); ++it) { it->watcher->NotifySavePoint(this, it->userData, atSavePoint); } } void Document::NotifyModified(DocModification mh) { if (mh.modificationType & SC_MOD_INSERTTEXT) { decorations.InsertSpace(mh.position, mh.length); } else if (mh.modificationType & SC_MOD_DELETETEXT) { decorations.DeleteRange(mh.position, mh.length); } for (std::vector::iterator it = watchers.begin(); it != watchers.end(); ++it) { it->watcher->NotifyModified(this, mh, it->userData); } } // Used for word part navigation. static bool IsASCIIPunctuationCharacter(unsigned int ch) { switch (ch) { case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': return true; default: return false; } } bool Document::IsWordPartSeparator(unsigned int ch) const { return (WordCharacterClass(ch) == CharClassify::ccWord) && IsASCIIPunctuationCharacter(ch); } int Document::WordPartLeft(int pos) const { if (pos > 0) { pos -= CharacterBefore(pos).widthBytes; CharacterExtracted ceStart = CharacterAfter(pos); if (IsWordPartSeparator(ceStart.character)) { while (pos > 0 && IsWordPartSeparator(CharacterAfter(pos).character)) { pos -= CharacterBefore(pos).widthBytes; } } if (pos > 0) { ceStart = CharacterAfter(pos); pos -= CharacterBefore(pos).widthBytes; if (IsLowerCase(ceStart.character)) { while (pos > 0 && IsLowerCase(CharacterAfter(pos).character)) pos -= CharacterBefore(pos).widthBytes; if (!IsUpperCase(CharacterAfter(pos).character) && !IsLowerCase(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (IsUpperCase(ceStart.character)) { while (pos > 0 && IsUpperCase(CharacterAfter(pos).character)) pos -= CharacterBefore(pos).widthBytes; if (!IsUpperCase(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (IsADigit(ceStart.character)) { while (pos > 0 && IsADigit(CharacterAfter(pos).character)) pos -= CharacterBefore(pos).widthBytes; if (!IsADigit(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (IsASCIIPunctuationCharacter(ceStart.character)) { while (pos > 0 && IsASCIIPunctuationCharacter(CharacterAfter(pos).character)) pos -= CharacterBefore(pos).widthBytes; if (!IsASCIIPunctuationCharacter(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (isspacechar(ceStart.character)) { while (pos > 0 && isspacechar(CharacterAfter(pos).character)) pos -= CharacterBefore(pos).widthBytes; if (!isspacechar(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (!IsASCII(ceStart.character)) { while (pos > 0 && !IsASCII(CharacterAfter(pos).character)) pos -= CharacterBefore(pos).widthBytes; if (IsASCII(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else { pos += CharacterAfter(pos).widthBytes; } } } return pos; } int Document::WordPartRight(int pos) const { CharacterExtracted ceStart = CharacterAfter(pos); const int length = Length(); if (IsWordPartSeparator(ceStart.character)) { while (pos < length && IsWordPartSeparator(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; ceStart = CharacterAfter(pos); } if (!IsASCII(ceStart.character)) { while (pos < length && !IsASCII(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (IsLowerCase(ceStart.character)) { while (pos < length && IsLowerCase(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (IsUpperCase(ceStart.character)) { if (IsLowerCase(CharacterAfter(pos + ceStart.widthBytes).character)) { pos += CharacterAfter(pos).widthBytes; while (pos < length && IsLowerCase(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else { while (pos < length && IsUpperCase(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } if (IsLowerCase(CharacterAfter(pos).character) && IsUpperCase(CharacterBefore(pos).character)) pos -= CharacterBefore(pos).widthBytes; } else if (IsADigit(ceStart.character)) { while (pos < length && IsADigit(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (IsASCIIPunctuationCharacter(ceStart.character)) { while (pos < length && IsASCIIPunctuationCharacter(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (isspacechar(ceStart.character)) { while (pos < length && isspacechar(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else { pos += CharacterAfter(pos).widthBytes; } return pos; } static bool IsLineEndChar(char c) { return (c == '\n' || c == '\r'); } int Document::ExtendStyleRange(int pos, int delta, bool singleLine) { int sStart = cb.StyleAt(pos); if (delta < 0) { while (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos)))) pos--; pos++; } else { while (pos < (Length()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos)))) pos++; } return pos; } static char BraceOpposite(char ch) { switch (ch) { case '(': return ')'; case ')': return '('; case '[': return ']'; case ']': return '['; case '{': return '}'; case '}': return '{'; case '<': return '>'; case '>': return '<'; default: return '\0'; } } // TODO: should be able to extend styled region to find matching brace int Document::BraceMatch(int position, int /*maxReStyle*/) { char chBrace = CharAt(position); char chSeek = BraceOpposite(chBrace); if (chSeek == '\0') return - 1; const int styBrace = StyleIndexAt(position); int direction = -1; if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<') direction = 1; int depth = 1; position = NextPosition(position, direction); while ((position >= 0) && (position < Length())) { char chAtPos = CharAt(position); const int styAtPos = StyleIndexAt(position); if ((position > GetEndStyled()) || (styAtPos == styBrace)) { if (chAtPos == chBrace) depth++; if (chAtPos == chSeek) depth--; if (depth == 0) return position; } int positionBeforeMove = position; position = NextPosition(position, direction); if (position == positionBeforeMove) break; } return - 1; } /** * Implementation of RegexSearchBase for the default built-in regular expression engine */ class BuiltinRegex : public RegexSearchBase { public: explicit BuiltinRegex(CharClassify *charClassTable) : search(charClassTable) {} virtual ~BuiltinRegex() { } virtual long FindText(Document *doc, int minPos, int maxPos, const char *s, bool caseSensitive, bool word, bool wordStart, int flags, int *length); virtual const char *SubstituteByPosition(Document *doc, const char *text, int *length); private: RESearch search; std::string substituted; }; namespace { /** * RESearchRange keeps track of search range. */ class RESearchRange { public: const Document *doc; int increment; int startPos; int endPos; int lineRangeStart; int lineRangeEnd; int lineRangeBreak; RESearchRange(const Document *doc_, int minPos, int maxPos) : doc(doc_) { increment = (minPos <= maxPos) ? 1 : -1; // Range endpoints should not be inside DBCS characters, but just in case, move them. startPos = doc->MovePositionOutsideChar(minPos, 1, false); endPos = doc->MovePositionOutsideChar(maxPos, 1, false); lineRangeStart = doc->LineFromPosition(startPos); lineRangeEnd = doc->LineFromPosition(endPos); if ((increment == 1) && (startPos >= doc->LineEnd(lineRangeStart)) && (lineRangeStart < lineRangeEnd)) { // the start position is at end of line or between line end characters. lineRangeStart++; startPos = doc->LineStart(lineRangeStart); } else if ((increment == -1) && (startPos <= doc->LineStart(lineRangeStart)) && (lineRangeStart > lineRangeEnd)) { // the start position is at beginning of line. lineRangeStart--; startPos = doc->LineEnd(lineRangeStart); } lineRangeBreak = lineRangeEnd + increment; } Range LineRange(int line) const { Range range(doc->LineStart(line), doc->LineEnd(line)); if (increment == 1) { if (line == lineRangeStart) range.start = startPos; if (line == lineRangeEnd) range.end = endPos; } else { if (line == lineRangeEnd) range.start = endPos; if (line == lineRangeStart) range.end = startPos; } return range; } }; // Define a way for the Regular Expression code to access the document class DocumentIndexer : public CharacterIndexer { Document *pdoc; int end; public: DocumentIndexer(Document *pdoc_, int end_) : pdoc(pdoc_), end(end_) { } virtual ~DocumentIndexer() { } virtual char CharAt(int index) { if (index < 0 || index >= end) return 0; else return pdoc->CharAt(index); } }; #ifndef NO_CXX11_REGEX class ByteIterator : public std::iterator { public: const Document *doc; Position position; ByteIterator(const Document *doc_ = 0, Position position_ = 0) : doc(doc_), position(position_) { } ByteIterator(const ByteIterator &other) NOEXCEPT { doc = other.doc; position = other.position; } ByteIterator &operator=(const ByteIterator &other) { if (this != &other) { doc = other.doc; position = other.position; } return *this; } char operator*() const { return doc->CharAt(position); } ByteIterator &operator++() { position++; return *this; } ByteIterator operator++(int) { ByteIterator retVal(*this); position++; return retVal; } ByteIterator &operator--() { position--; return *this; } bool operator==(const ByteIterator &other) const { return doc == other.doc && position == other.position; } bool operator!=(const ByteIterator &other) const { return doc != other.doc || position != other.position; } int Pos() const { return position; } int PosRoundUp() const { return position; } }; // On Windows, wchar_t is 16 bits wide and on Unix it is 32 bits wide. // Would be better to use sizeof(wchar_t) or similar to differentiate // but easier for now to hard-code platforms. // C++11 has char16_t and char32_t but neither Clang nor Visual C++ // appear to allow specializing basic_regex over these. #ifdef _WIN32 #define WCHAR_T_IS_16 1 #else #define WCHAR_T_IS_16 0 #endif #if WCHAR_T_IS_16 // On Windows, report non-BMP characters as 2 separate surrogates as that // matches wregex since it is based on wchar_t. class UTF8Iterator : public std::iterator { // These 3 fields determine the iterator position and are used for comparisons const Document *doc; Position position; size_t characterIndex; // Remaining fields are derived from the determining fields so are excluded in comparisons unsigned int lenBytes; size_t lenCharacters; wchar_t buffered[2]; public: UTF8Iterator(const Document *doc_ = 0, Position position_ = 0) : doc(doc_), position(position_), characterIndex(0), lenBytes(0), lenCharacters(0) { buffered[0] = 0; buffered[1] = 0; if (doc) { ReadCharacter(); } } UTF8Iterator(const UTF8Iterator &other) { doc = other.doc; position = other.position; characterIndex = other.characterIndex; lenBytes = other.lenBytes; lenCharacters = other.lenCharacters; buffered[0] = other.buffered[0]; buffered[1] = other.buffered[1]; } UTF8Iterator &operator=(const UTF8Iterator &other) { if (this != &other) { doc = other.doc; position = other.position; characterIndex = other.characterIndex; lenBytes = other.lenBytes; lenCharacters = other.lenCharacters; buffered[0] = other.buffered[0]; buffered[1] = other.buffered[1]; } return *this; } wchar_t operator*() const { assert(lenCharacters != 0); return buffered[characterIndex]; } UTF8Iterator &operator++() { if ((characterIndex + 1) < (lenCharacters)) { characterIndex++; } else { position += lenBytes; ReadCharacter(); characterIndex = 0; } return *this; } UTF8Iterator operator++(int) { UTF8Iterator retVal(*this); if ((characterIndex + 1) < (lenCharacters)) { characterIndex++; } else { position += lenBytes; ReadCharacter(); characterIndex = 0; } return retVal; } UTF8Iterator &operator--() { if (characterIndex) { characterIndex--; } else { position = doc->NextPosition(position, -1); ReadCharacter(); characterIndex = lenCharacters - 1; } return *this; } bool operator==(const UTF8Iterator &other) const { // Only test the determining fields, not the character widths and values derived from this return doc == other.doc && position == other.position && characterIndex == other.characterIndex; } bool operator!=(const UTF8Iterator &other) const { // Only test the determining fields, not the character widths and values derived from this return doc != other.doc || position != other.position || characterIndex != other.characterIndex; } int Pos() const { return position; } int PosRoundUp() const { if (characterIndex) return position + lenBytes; // Force to end of character else return position; } private: void ReadCharacter() { Document::CharacterExtracted charExtracted = doc->ExtractCharacter(position); lenBytes = charExtracted.widthBytes; if (charExtracted.character == unicodeReplacementChar) { lenCharacters = 1; buffered[0] = static_cast(charExtracted.character); } else { lenCharacters = UTF16FromUTF32Character(charExtracted.character, buffered); } } }; #else // On Unix, report non-BMP characters as single characters class UTF8Iterator : public std::iterator { const Document *doc; Position position; public: UTF8Iterator(const Document *doc_=0, Position position_=0) : doc(doc_), position(position_) { } UTF8Iterator(const UTF8Iterator &other) NOEXCEPT { doc = other.doc; position = other.position; } UTF8Iterator &operator=(const UTF8Iterator &other) { if (this != &other) { doc = other.doc; position = other.position; } return *this; } wchar_t operator*() const { Document::CharacterExtracted charExtracted = doc->ExtractCharacter(position); return charExtracted.character; } UTF8Iterator &operator++() { position = doc->NextPosition(position, 1); return *this; } UTF8Iterator operator++(int) { UTF8Iterator retVal(*this); position = doc->NextPosition(position, 1); return retVal; } UTF8Iterator &operator--() { position = doc->NextPosition(position, -1); return *this; } bool operator==(const UTF8Iterator &other) const { return doc == other.doc && position == other.position; } bool operator!=(const UTF8Iterator &other) const { return doc != other.doc || position != other.position; } int Pos() const { return position; } int PosRoundUp() const { return position; } }; #endif std::regex_constants::match_flag_type MatchFlags(const Document *doc, int startPos, int endPos) { std::regex_constants::match_flag_type flagsMatch = std::regex_constants::match_default; if (!doc->IsLineStartPosition(startPos)) flagsMatch |= std::regex_constants::match_not_bol; if (!doc->IsLineEndPosition(endPos)) flagsMatch |= std::regex_constants::match_not_eol; return flagsMatch; } template bool MatchOnLines(const Document *doc, const Regex ®exp, const RESearchRange &resr, RESearch &search) { bool matched = false; std::match_results match; // MSVC and libc++ have problems with ^ and $ matching line ends inside a range // If they didn't then the line by line iteration could be removed for the forwards // case and replaced with the following 4 lines: // Iterator uiStart(doc, startPos); // Iterator uiEnd(doc, endPos); // flagsMatch = MatchFlags(doc, startPos, endPos); // matched = std::regex_search(uiStart, uiEnd, match, regexp, flagsMatch); // Line by line. for (int line = resr.lineRangeStart; line != resr.lineRangeBreak; line += resr.increment) { const Range lineRange = resr.LineRange(line); Iterator itStart(doc, lineRange.start); Iterator itEnd(doc, lineRange.end); std::regex_constants::match_flag_type flagsMatch = MatchFlags(doc, lineRange.start, lineRange.end); matched = std::regex_search(itStart, itEnd, match, regexp, flagsMatch); // Check for the last match on this line. if (matched) { if (resr.increment == -1) { while (matched) { Iterator itNext(doc, match[0].second.PosRoundUp()); flagsMatch = MatchFlags(doc, itNext.Pos(), lineRange.end); std::match_results matchNext; matched = std::regex_search(itNext, itEnd, matchNext, regexp, flagsMatch); if (matched) { if (match[0].first == match[0].second) { // Empty match means failure so exit return false; } match = matchNext; } } matched = true; } break; } } if (matched) { for (size_t co = 0; co < match.size(); co++) { search.bopat[co] = match[co].first.Pos(); search.eopat[co] = match[co].second.PosRoundUp(); Sci::Position lenMatch = search.eopat[co] - search.bopat[co]; search.pat[co].resize(lenMatch); for (Sci::Position iPos = 0; iPos < lenMatch; iPos++) { search.pat[co][iPos] = doc->CharAt(iPos + search.bopat[co]); } } } return matched; } long Cxx11RegexFindText(Document *doc, int minPos, int maxPos, const char *s, bool caseSensitive, int *length, RESearch &search) { const RESearchRange resr(doc, minPos, maxPos); try { //ElapsedTime et; std::regex::flag_type flagsRe = std::regex::ECMAScript; // Flags that apper to have no effect: // | std::regex::collate | std::regex::extended; if (!caseSensitive) flagsRe = flagsRe | std::regex::icase; // Clear the RESearch so can fill in matches search.Clear(); bool matched = false; if (SC_CP_UTF8 == doc->dbcsCodePage) { unsigned int lenS = static_cast(strlen(s)); std::vector ws(lenS + 1); #if WCHAR_T_IS_16 size_t outLen = UTF16FromUTF8(s, lenS, &ws[0], lenS); #else size_t outLen = UTF32FromUTF8(s, lenS, reinterpret_cast(&ws[0]), lenS); #endif ws[outLen] = 0; std::wregex regexp; #if defined(__APPLE__) // Using a UTF-8 locale doesn't change to Unicode over a byte buffer so '.' // is one byte not one character. // However, on OS X this makes wregex act as Unicode std::locale localeU("en_US.UTF-8"); regexp.imbue(localeU); #endif regexp.assign(&ws[0], flagsRe); matched = MatchOnLines(doc, regexp, resr, search); } else { std::regex regexp; regexp.assign(s, flagsRe); matched = MatchOnLines(doc, regexp, resr, search); } int posMatch = -1; if (matched) { posMatch = search.bopat[0]; *length = search.eopat[0] - search.bopat[0]; } // Example - search in doc/ScintillaHistory.html for // [[:upper:]]eta[[:space:]] // On MacBook, normally around 1 second but with locale imbued -> 14 seconds. //double durSearch = et.Duration(true); //Platform::DebugPrintf("Search:%9.6g \n", durSearch); return posMatch; } catch (std::regex_error &) { // Failed to create regular expression throw RegexError(); } catch (...) { // Failed in some other way return -1; } } #endif } long BuiltinRegex::FindText(Document *doc, int minPos, int maxPos, const char *s, bool caseSensitive, bool, bool, int flags, int *length) { #ifndef NO_CXX11_REGEX if (flags & SCFIND_CXX11REGEX) { return Cxx11RegexFindText(doc, minPos, maxPos, s, caseSensitive, length, search); } #endif const RESearchRange resr(doc, minPos, maxPos); const bool posix = (flags & SCFIND_POSIX) != 0; const char *errmsg = search.Compile(s, *length, caseSensitive, posix); if (errmsg) { return -1; } // Find a variable in a property file: \$(\([A-Za-z0-9_.]+\)) // Replace first '.' with '-' in each property file variable reference: // Search: \$(\([A-Za-z0-9_-]+\)\.\([A-Za-z0-9_.]+\)) // Replace: $(\1-\2) int pos = -1; int lenRet = 0; const char searchEnd = s[*length - 1]; const char searchEndPrev = (*length > 1) ? s[*length - 2] : '\0'; for (int line = resr.lineRangeStart; line != resr.lineRangeBreak; line += resr.increment) { int startOfLine = doc->LineStart(line); int endOfLine = doc->LineEnd(line); if (resr.increment == 1) { if (line == resr.lineRangeStart) { if ((resr.startPos != startOfLine) && (s[0] == '^')) continue; // Can't match start of line if start position after start of line startOfLine = resr.startPos; } if (line == resr.lineRangeEnd) { if ((resr.endPos != endOfLine) && (searchEnd == '$') && (searchEndPrev != '\\')) continue; // Can't match end of line if end position before end of line endOfLine = resr.endPos; } } else { if (line == resr.lineRangeEnd) { if ((resr.endPos != startOfLine) && (s[0] == '^')) continue; // Can't match start of line if end position after start of line startOfLine = resr.endPos; } if (line == resr.lineRangeStart) { if ((resr.startPos != endOfLine) && (searchEnd == '$') && (searchEndPrev != '\\')) continue; // Can't match end of line if start position before end of line endOfLine = resr.startPos; } } DocumentIndexer di(doc, endOfLine); int success = search.Execute(di, startOfLine, endOfLine); if (success) { pos = search.bopat[0]; // Ensure only whole characters selected search.eopat[0] = doc->MovePositionOutsideChar(search.eopat[0], 1, false); lenRet = search.eopat[0] - search.bopat[0]; // There can be only one start of a line, so no need to look for last match in line if ((resr.increment == -1) && (s[0] != '^')) { // Check for the last match on this line. int repetitions = 1000; // Break out of infinite loop while (success && (search.eopat[0] <= endOfLine) && (repetitions--)) { success = search.Execute(di, pos+1, endOfLine); if (success) { if (search.eopat[0] <= minPos) { pos = search.bopat[0]; lenRet = search.eopat[0] - search.bopat[0]; } else { success = 0; } } } } break; } } *length = lenRet; return pos; } const char *BuiltinRegex::SubstituteByPosition(Document *doc, const char *text, int *length) { substituted.clear(); DocumentIndexer di(doc, doc->Length()); search.GrabMatches(di); for (int j = 0; j < *length; j++) { if (text[j] == '\\') { if (text[j + 1] >= '0' && text[j + 1] <= '9') { unsigned int patNum = text[j + 1] - '0'; unsigned int len = search.eopat[patNum] - search.bopat[patNum]; if (!search.pat[patNum].empty()) // Will be null if try for a match that did not occur substituted.append(search.pat[patNum].c_str(), len); j++; } else { j++; switch (text[j]) { case 'a': substituted.push_back('\a'); break; case 'b': substituted.push_back('\b'); break; case 'f': substituted.push_back('\f'); break; case 'n': substituted.push_back('\n'); break; case 'r': substituted.push_back('\r'); break; case 't': substituted.push_back('\t'); break; case 'v': substituted.push_back('\v'); break; case '\\': substituted.push_back('\\'); break; default: substituted.push_back('\\'); j--; } } } else { substituted.push_back(text[j]); } } *length = static_cast(substituted.length()); return substituted.c_str(); } #ifndef SCI_OWNREGEX #ifdef SCI_NAMESPACE RegexSearchBase *Scintilla::CreateRegexSearch(CharClassify *charClassTable) { return new BuiltinRegex(charClassTable); } #else RegexSearchBase *CreateRegexSearch(CharClassify *charClassTable) { return new BuiltinRegex(charClassTable); } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Document.h000066400000000000000000000425541345112435200223270ustar00rootroot00000000000000// Scintilla source code edit control /** @file Document.h ** Text document that handles notifications, DBCS, styling, words and end of line. **/ // Copyright 1998-2011 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef DOCUMENT_H #define DOCUMENT_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /** * A Position is a position within a document between two characters or at the beginning or end. * Sometimes used as a character index where it identifies the character after the position. */ typedef int Position; const Position invalidPosition = -1; enum EncodingFamily { efEightBit, efUnicode, efDBCS }; /** * The range class represents a range of text in a document. * The two values are not sorted as one end may be more significant than the other * as is the case for the selection where the end position is the position of the caret. * If either position is invalidPosition then the range is invalid and most operations will fail. */ class Range { public: Position start; Position end; explicit Range(Position pos=0) : start(pos), end(pos) { } Range(Position start_, Position end_) : start(start_), end(end_) { } bool operator==(const Range &other) const { return (start == other.start) && (end == other.end); } bool Valid() const { return (start != invalidPosition) && (end != invalidPosition); } Position First() const { return (start <= end) ? start : end; } Position Last() const { return (start > end) ? start : end; } // Is the position within the range? bool Contains(Position pos) const { if (start < end) { return (pos >= start && pos <= end); } else { return (pos <= start && pos >= end); } } // Is the character after pos within the range? bool ContainsCharacter(Position pos) const { if (start < end) { return (pos >= start && pos < end); } else { return (pos < start && pos >= end); } } bool Contains(Range other) const { return Contains(other.start) && Contains(other.end); } bool Overlaps(Range other) const { return Contains(other.start) || Contains(other.end) || other.Contains(start) || other.Contains(end); } }; class DocWatcher; class DocModification; class Document; /** * Interface class for regular expression searching */ class RegexSearchBase { public: virtual ~RegexSearchBase() {} virtual long FindText(Document *doc, int minPos, int maxPos, const char *s, bool caseSensitive, bool word, bool wordStart, int flags, int *length) = 0; ///@return String with the substitutions, must remain valid until the next call or destruction virtual const char *SubstituteByPosition(Document *doc, const char *text, int *length) = 0; }; /// Factory function for RegexSearchBase extern RegexSearchBase *CreateRegexSearch(CharClassify *charClassTable); struct StyledText { size_t length; const char *text; bool multipleStyles; size_t style; const unsigned char *styles; StyledText(size_t length_, const char *text_, bool multipleStyles_, int style_, const unsigned char *styles_) : length(length_), text(text_), multipleStyles(multipleStyles_), style(style_), styles(styles_) { } // Return number of bytes from start to before '\n' or end of text. // Return 1 when start is outside text size_t LineLength(size_t start) const { size_t cur = start; while ((cur < length) && (text[cur] != '\n')) cur++; return cur-start; } size_t StyleAt(size_t i) const { return multipleStyles ? styles[i] : style; } }; class HighlightDelimiter { public: HighlightDelimiter() : isEnabled(false) { Clear(); } void Clear() { beginFoldBlock = -1; endFoldBlock = -1; firstChangeableLineBefore = -1; firstChangeableLineAfter = -1; } bool NeedsDrawing(int line) const { return isEnabled && (line <= firstChangeableLineBefore || line >= firstChangeableLineAfter); } bool IsFoldBlockHighlighted(int line) const { return isEnabled && beginFoldBlock != -1 && beginFoldBlock <= line && line <= endFoldBlock; } bool IsHeadOfFoldBlock(int line) const { return beginFoldBlock == line && line < endFoldBlock; } bool IsBodyOfFoldBlock(int line) const { return beginFoldBlock != -1 && beginFoldBlock < line && line < endFoldBlock; } bool IsTailOfFoldBlock(int line) const { return beginFoldBlock != -1 && beginFoldBlock < line && line == endFoldBlock; } int beginFoldBlock; // Begin of current fold block int endFoldBlock; // End of current fold block int firstChangeableLineBefore; // First line that triggers repaint before starting line that determined current fold block int firstChangeableLineAfter; // First line that triggers repaint after starting line that determined current fold block bool isEnabled; }; class Document; inline int LevelNumber(int level) { return level & SC_FOLDLEVELNUMBERMASK; } class LexInterface { protected: Document *pdoc; ILexer *instance; bool performingStyle; ///< Prevent reentrance public: explicit LexInterface(Document *pdoc_) : pdoc(pdoc_), instance(0), performingStyle(false) { } virtual ~LexInterface() { } void Colourise(int start, int end); int LineEndTypesSupported(); bool UseContainerLexing() const { return instance == 0; } }; struct RegexError : public std::runtime_error { RegexError() : std::runtime_error("regex failure") {} }; /** */ class Document : PerLine, public IDocumentWithLineEnd, public ILoader { public: /** Used to pair watcher pointer with user data. */ struct WatcherWithUserData { DocWatcher *watcher; void *userData; WatcherWithUserData(DocWatcher *watcher_=0, void *userData_=0) : watcher(watcher_), userData(userData_) { } bool operator==(const WatcherWithUserData &other) const { return (watcher == other.watcher) && (userData == other.userData); } }; private: int refCount; CellBuffer cb; CharClassify charClass; CaseFolder *pcf; int endStyled; int styleClock; int enteredModification; int enteredStyling; int enteredReadOnlyCount; bool insertionSet; std::string insertion; std::vector watchers; // ldSize is not real data - it is for dimensions and loops enum lineData { ldMarkers, ldLevels, ldState, ldMargin, ldAnnotation, ldSize }; PerLine *perLineData[ldSize]; bool matchesValid; RegexSearchBase *regex; public: struct CharacterExtracted { unsigned int character; unsigned int widthBytes; CharacterExtracted(unsigned int character_, unsigned int widthBytes_) : character(character_), widthBytes(widthBytes_) { } // For DBCS characters turn 2 bytes into an int static CharacterExtracted DBCS(unsigned char lead, unsigned char trail) { return CharacterExtracted((lead << 8) | trail, 2); } }; LexInterface *pli; int eolMode; /// Can also be SC_CP_UTF8 to enable UTF-8 mode int dbcsCodePage; int lineEndBitSet; int tabInChars; int indentInChars; int actualIndentInChars; bool useTabs; bool tabIndents; bool backspaceUnindents; double durationStyleOneLine; DecorationList decorations; Document(); virtual ~Document(); int AddRef(); int SCI_METHOD Release(); virtual void Init(); int LineEndTypesSupported() const; bool SetDBCSCodePage(int dbcsCodePage_); int GetLineEndTypesAllowed() const { return cb.GetLineEndTypes(); } bool SetLineEndTypesAllowed(int lineEndBitSet_); int GetLineEndTypesActive() const { return cb.GetLineEndTypes(); } virtual void InsertLine(int line); virtual void RemoveLine(int line); int SCI_METHOD Version() const { return dvLineEnd; } void SCI_METHOD SetErrorStatus(int status); Sci_Position SCI_METHOD LineFromPosition(Sci_Position pos) const; int ClampPositionIntoDocument(int pos) const; bool ContainsLineEnd(const char *s, int length) const { return cb.ContainsLineEnd(s, length); } bool IsCrLf(int pos) const; int LenChar(int pos); bool InGoodUTF8(int pos, int &start, int &end) const; int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true) const; int NextPosition(int pos, int moveDir) const; bool NextCharacter(int &pos, int moveDir) const; // Returns true if pos changed Document::CharacterExtracted CharacterAfter(int position) const; Document::CharacterExtracted CharacterBefore(int position) const; Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const; int GetRelativePositionUTF16(int positionStart, int characterOffset) const; int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const; int SCI_METHOD CodePage() const; bool SCI_METHOD IsDBCSLeadByte(char ch) const; int SafeSegment(const char *text, int length, int lengthSegment) const; EncodingFamily CodePageFamily() const; // Gateways to modifying document void ModifiedAt(int pos); void CheckReadOnly(); bool DeleteChars(int pos, int len); int InsertString(int position, const char *s, int insertLength); void ChangeInsertion(const char *s, int length); int SCI_METHOD AddData(char *data, Sci_Position length); void * SCI_METHOD ConvertToDocument(); int Undo(); int Redo(); bool CanUndo() const { return cb.CanUndo(); } bool CanRedo() const { return cb.CanRedo(); } void DeleteUndoHistory() { cb.DeleteUndoHistory(); } bool SetUndoCollection(bool collectUndo) { return cb.SetUndoCollection(collectUndo); } bool IsCollectingUndo() const { return cb.IsCollectingUndo(); } void BeginUndoAction() { cb.BeginUndoAction(); } void EndUndoAction() { cb.EndUndoAction(); } void AddUndoAction(int token, bool mayCoalesce) { cb.AddUndoAction(token, mayCoalesce); } void SetSavePoint(); bool IsSavePoint() const { return cb.IsSavePoint(); } void TentativeStart() { cb.TentativeStart(); } void TentativeCommit() { cb.TentativeCommit(); } void TentativeUndo(); bool TentativeActive() const { return cb.TentativeActive(); } const char * SCI_METHOD BufferPointer() { return cb.BufferPointer(); } const char *RangePointer(int position, int rangeLength) { return cb.RangePointer(position, rangeLength); } int GapPosition() const { return cb.GapPosition(); } int SCI_METHOD GetLineIndentation(Sci_Position line); int SetLineIndentation(int line, int indent); int GetLineIndentPosition(int line) const; int GetColumn(int position); int CountCharacters(int startPos, int endPos) const; int CountUTF16(int startPos, int endPos) const; int FindColumn(int line, int column); void Indent(bool forwards, int lineBottom, int lineTop); static std::string TransformLineEnds(const char *s, size_t len, int eolModeWanted); void ConvertLineEnds(int eolModeSet); void SetReadOnly(bool set) { cb.SetReadOnly(set); } bool IsReadOnly() const { return cb.IsReadOnly(); } void DelChar(int pos); void DelCharBack(int pos); char CharAt(int position) const { return cb.CharAt(position); } void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const { cb.GetCharRange(buffer, position, lengthRetrieve); } char SCI_METHOD StyleAt(Sci_Position position) const { return cb.StyleAt(position); } int StyleIndexAt(Sci_Position position) const { return static_cast(cb.StyleAt(position)); } void GetStyleRange(unsigned char *buffer, int position, int lengthRetrieve) const { cb.GetStyleRange(buffer, position, lengthRetrieve); } int GetMark(int line); int MarkerNext(int lineStart, int mask) const; int AddMark(int line, int markerNum); void AddMarkSet(int line, int valueSet); void DeleteMark(int line, int markerNum); void DeleteMarkFromHandle(int markerHandle); void DeleteAllMarks(int markerNum); int LineFromHandle(int markerHandle); Sci_Position SCI_METHOD LineStart(Sci_Position line) const; bool IsLineStartPosition(int position) const; Sci_Position SCI_METHOD LineEnd(Sci_Position line) const; int LineEndPosition(int position) const; bool IsLineEndPosition(int position) const; bool IsPositionInLineEnd(int position) const; int VCHomePosition(int position) const; int SCI_METHOD SetLevel(Sci_Position line, int level); int SCI_METHOD GetLevel(Sci_Position line) const; void ClearLevels(); int GetLastChild(int lineParent, int level=-1, int lastLine=-1); int GetFoldParent(int line) const; void GetHighlightDelimiters(HighlightDelimiter &hDelimiter, int line, int lastLine); void Indent(bool forwards); int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false) const; int NextWordStart(int pos, int delta) const; int NextWordEnd(int pos, int delta) const; Sci_Position SCI_METHOD Length() const { return cb.Length(); } void Allocate(int newSize) { cb.Allocate(newSize); } CharacterExtracted ExtractCharacter(int position) const; bool IsWordStartAt(int pos) const; bool IsWordEndAt(int pos) const; bool IsWordAt(int start, int end) const; bool MatchesWordOptions(bool word, bool wordStart, int pos, int length) const; bool HasCaseFolder(void) const; void SetCaseFolder(CaseFolder *pcf_); long FindText(int minPos, int maxPos, const char *search, int flags, int *length); const char *SubstituteByPosition(const char *text, int *length); int LinesTotal() const; void SetDefaultCharClasses(bool includeWordClass); void SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass); int GetCharsOfClass(CharClassify::cc characterClass, unsigned char *buffer) const; void SCI_METHOD StartStyling(Sci_Position position, char mask); bool SCI_METHOD SetStyleFor(Sci_Position length, char style); bool SCI_METHOD SetStyles(Sci_Position length, const char *styles); int GetEndStyled() const { return endStyled; } void EnsureStyledTo(int pos); void StyleToAdjustingLineDuration(int pos); void LexerChanged(); int GetStyleClock() const { return styleClock; } void IncrementStyleClock(); void SCI_METHOD DecorationSetCurrentIndicator(int indicator) { decorations.SetCurrentIndicator(indicator); } void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength); int SCI_METHOD SetLineState(Sci_Position line, int state); int SCI_METHOD GetLineState(Sci_Position line) const; int GetMaxLineState(); void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end); StyledText MarginStyledText(int line) const; void MarginSetStyle(int line, int style); void MarginSetStyles(int line, const unsigned char *styles); void MarginSetText(int line, const char *text); void MarginClearAll(); StyledText AnnotationStyledText(int line) const; void AnnotationSetText(int line, const char *text); void AnnotationSetStyle(int line, int style); void AnnotationSetStyles(int line, const unsigned char *styles); int AnnotationLines(int line) const; void AnnotationClearAll(); bool AddWatcher(DocWatcher *watcher, void *userData); bool RemoveWatcher(DocWatcher *watcher, void *userData); bool IsASCIIWordByte(unsigned char ch) const; CharClassify::cc WordCharacterClass(unsigned int ch) const; bool IsWordPartSeparator(unsigned int ch) const; int WordPartLeft(int pos) const; int WordPartRight(int pos) const; int ExtendStyleRange(int pos, int delta, bool singleLine = false); bool IsWhiteLine(int line) const; int ParaUp(int pos) const; int ParaDown(int pos) const; int IndentSize() const { return actualIndentInChars; } int BraceMatch(int position, int maxReStyle); private: void NotifyModifyAttempt(); void NotifySavePoint(bool atSavePoint); void NotifyModified(DocModification mh); }; class UndoGroup { Document *pdoc; bool groupNeeded; public: UndoGroup(Document *pdoc_, bool groupNeeded_=true) : pdoc(pdoc_), groupNeeded(groupNeeded_) { if (groupNeeded) { pdoc->BeginUndoAction(); } } ~UndoGroup() { if (groupNeeded) { pdoc->EndUndoAction(); } } bool Needed() const { return groupNeeded; } }; /** * To optimise processing of document modifications by DocWatchers, a hint is passed indicating the * scope of the change. * If the DocWatcher is a document view then this can be used to optimise screen updating. */ class DocModification { public: int modificationType; int position; int length; int linesAdded; /**< Negative if lines deleted. */ const char *text; /**< Only valid for changes to text, not for changes to style. */ int line; int foldLevelNow; int foldLevelPrev; int annotationLinesAdded; int token; DocModification(int modificationType_, int position_=0, int length_=0, int linesAdded_=0, const char *text_=0, int line_=0) : modificationType(modificationType_), position(position_), length(length_), linesAdded(linesAdded_), text(text_), line(line_), foldLevelNow(0), foldLevelPrev(0), annotationLinesAdded(0), token(0) {} DocModification(int modificationType_, const Action &act, int linesAdded_=0) : modificationType(modificationType_), position(act.position), length(act.lenData), linesAdded(linesAdded_), text(act.data), line(0), foldLevelNow(0), foldLevelPrev(0), annotationLinesAdded(0), token(0) {} }; /** * A class that wants to receive notifications from a Document must be derived from DocWatcher * and implement the notification methods. It can then be added to the watcher list with AddWatcher. */ class DocWatcher { public: virtual ~DocWatcher() {} virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0; virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; virtual void NotifyDeleted(Document *doc, void *userData) = 0; virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0; virtual void NotifyLexerChanged(Document *doc, void *userData) = 0; virtual void NotifyErrorOccurred(Document *doc, void *userData, int status) = 0; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/EditModel.cpp000066400000000000000000000034051345112435200227420ustar00rootroot00000000000000// Scintilla source code edit control /** @file EditModel.cxx ** Defines the editor state that must be visible to EditorView. **/ // Copyright 1998-2014 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #include #include #include #include "Platform.h" #include "ILexer.h" #include "Scintilla.h" #include "StringCopy.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "ContractionState.h" #include "CellBuffer.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #include "CharClassify.h" #include "Decoration.h" #include "CaseFolder.h" #include "Document.h" #include "UniConversion.h" #include "Selection.h" #include "PositionCache.h" #include "EditModel.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif Caret::Caret() : active(false), on(false), period(500) {} EditModel::EditModel() { inOverstrike = false; xOffset = 0; trackLineWidth = false; posDrag = SelectionPosition(invalidPosition); braces[0] = invalidPosition; braces[1] = invalidPosition; bracesMatchStyle = STYLE_BRACEBAD; highlightGuideColumn = 0; primarySelection = true; imeInteraction = imeWindowed; foldFlags = 0; foldDisplayTextStyle = SC_FOLDDISPLAYTEXT_HIDDEN; hotspot = Range(invalidPosition); hoverIndicatorPos = invalidPosition; wrapWidth = LineLayout::wrapWidthInfinite; pdoc = new Document(); pdoc->AddRef(); } EditModel::~EditModel() { pdoc->Release(); pdoc = 0; } sqlitebrowser-3.11.2/libs/qscintilla/src/EditModel.h000066400000000000000000000025761345112435200224170ustar00rootroot00000000000000// Scintilla source code edit control /** @file EditModel.h ** Defines the editor state that must be visible to EditorView. **/ // Copyright 1998-2014 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef EDITMODEL_H #define EDITMODEL_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /** */ class Caret { public: bool active; bool on; int period; Caret(); }; class EditModel { // Private so EditModel objects can not be copied explicit EditModel(const EditModel &); EditModel &operator=(const EditModel &); public: bool inOverstrike; int xOffset; ///< Horizontal scrolled amount in pixels bool trackLineWidth; SpecialRepresentations reprs; Caret caret; SelectionPosition posDrag; Position braces[2]; int bracesMatchStyle; int highlightGuideColumn; Selection sel; bool primarySelection; enum IMEInteraction { imeWindowed, imeInline } imeInteraction; int foldFlags; int foldDisplayTextStyle; ContractionState cs; // Hotspot support Range hotspot; int hoverIndicatorPos; // Wrapping support int wrapWidth; Document *pdoc; EditModel(); virtual ~EditModel(); virtual int TopLineOfMain() const = 0; virtual Point GetVisibleOriginInMain() const = 0; virtual int LinesOnScreen() const = 0; virtual Range GetHotSpotRange() const = 0; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/EditView.cpp000066400000000000000000002747211345112435200226270ustar00rootroot00000000000000// Scintilla source code edit control /** @file EditView.cxx ** Defines the appearance of the main text area of the editor window. **/ // Copyright 1998-2014 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #include #include #include #include "Platform.h" #include "ILexer.h" #include "Scintilla.h" #include "StringCopy.h" #include "CharacterSet.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "ContractionState.h" #include "CellBuffer.h" #include "PerLine.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #include "CharClassify.h" #include "Decoration.h" #include "CaseFolder.h" #include "Document.h" #include "UniConversion.h" #include "Selection.h" #include "PositionCache.h" #include "EditModel.h" #include "MarginView.h" #include "EditView.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif static inline bool IsControlCharacter(int ch) { // iscntrl returns true for lots of chars > 127 which are displayable return ch >= 0 && ch < ' '; } PrintParameters::PrintParameters() { magnification = 0; colourMode = SC_PRINT_NORMAL; wrapState = eWrapWord; } #ifdef SCI_NAMESPACE namespace Scintilla { #endif bool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st) { if (st.multipleStyles) { for (size_t iStyle = 0; iStyle(styles[endSegment + 1]) == style)) endSegment++; FontAlias fontText = vs.styles[style + styleOffset].font; width += static_cast(surface->WidthText(fontText, text + start, static_cast(endSegment - start + 1))); start = endSegment + 1; } return width; } int WidestLineWidth(Surface *surface, const ViewStyle &vs, int styleOffset, const StyledText &st) { int widthMax = 0; size_t start = 0; while (start < st.length) { size_t lenLine = st.LineLength(start); int widthSubLine; if (st.multipleStyles) { widthSubLine = WidthStyledText(surface, vs, styleOffset, st.text + start, st.styles + start, lenLine); } else { FontAlias fontText = vs.styles[styleOffset + st.style].font; widthSubLine = static_cast(surface->WidthText(fontText, st.text + start, static_cast(lenLine))); } if (widthSubLine > widthMax) widthMax = widthSubLine; start += lenLine + 1; } return widthMax; } void DrawTextNoClipPhase(Surface *surface, PRectangle rc, const Style &style, XYPOSITION ybase, const char *s, int len, DrawPhase phase) { FontAlias fontText = style.font; if (phase & drawBack) { if (phase & drawText) { // Drawing both surface->DrawTextNoClip(rc, fontText, ybase, s, len, style.fore, style.back); } else { surface->FillRectangle(rc, style.back); } } else if (phase & drawText) { surface->DrawTextTransparent(rc, fontText, ybase, s, len, style.fore); } } void DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText, const StyledText &st, size_t start, size_t length, DrawPhase phase) { if (st.multipleStyles) { int x = static_cast(rcText.left); size_t i = 0; while (i < length) { size_t end = i; size_t style = st.styles[i + start]; while (end < length - 1 && st.styles[start + end + 1] == style) end++; style += styleOffset; FontAlias fontText = vs.styles[style].font; const int width = static_cast(surface->WidthText(fontText, st.text + start + i, static_cast(end - i + 1))); PRectangle rcSegment = rcText; rcSegment.left = static_cast(x); rcSegment.right = static_cast(x + width + 1); DrawTextNoClipPhase(surface, rcSegment, vs.styles[style], rcText.top + vs.maxAscent, st.text + start + i, static_cast(end - i + 1), phase); x += width; i = end + 1; } } else { const size_t style = st.style + styleOffset; DrawTextNoClipPhase(surface, rcText, vs.styles[style], rcText.top + vs.maxAscent, st.text + start, static_cast(length), phase); } } #ifdef SCI_NAMESPACE } #endif const XYPOSITION epsilon = 0.0001f; // A small nudge to avoid floating point precision issues EditView::EditView() { ldTabstops = NULL; tabWidthMinimumPixels = 2; // needed for calculating tab stops for fractional proportional fonts hideSelection = false; drawOverstrikeCaret = true; bufferedDraw = true; phasesDraw = phasesTwo; lineWidthMaxSeen = 0; additionalCaretsBlink = true; additionalCaretsVisible = true; imeCaretBlockOverride = false; pixmapLine = 0; pixmapIndentGuide = 0; pixmapIndentGuideHighlight = 0; llc.SetLevel(LineLayoutCache::llcCaret); posCache.SetSize(0x400); tabArrowHeight = 4; customDrawTabArrow = NULL; customDrawWrapMarker = NULL; } EditView::~EditView() { delete ldTabstops; ldTabstops = NULL; } bool EditView::SetTwoPhaseDraw(bool twoPhaseDraw) { const PhasesDraw phasesDrawNew = twoPhaseDraw ? phasesTwo : phasesOne; const bool redraw = phasesDraw != phasesDrawNew; phasesDraw = phasesDrawNew; return redraw; } bool EditView::SetPhasesDraw(int phases) { const PhasesDraw phasesDrawNew = static_cast(phases); const bool redraw = phasesDraw != phasesDrawNew; phasesDraw = phasesDrawNew; return redraw; } bool EditView::LinesOverlap() const { return phasesDraw == phasesMultiple; } void EditView::ClearAllTabstops() { delete ldTabstops; ldTabstops = 0; } XYPOSITION EditView::NextTabstopPos(int line, XYPOSITION x, XYPOSITION tabWidth) const { int next = GetNextTabstop(line, static_cast(x + tabWidthMinimumPixels)); if (next > 0) return static_cast(next); return (static_cast((x + tabWidthMinimumPixels) / tabWidth) + 1) * tabWidth; } bool EditView::ClearTabstops(int line) { LineTabstops *lt = static_cast(ldTabstops); return lt && lt->ClearTabstops(line); } bool EditView::AddTabstop(int line, int x) { if (!ldTabstops) { ldTabstops = new LineTabstops(); } LineTabstops *lt = static_cast(ldTabstops); return lt && lt->AddTabstop(line, x); } int EditView::GetNextTabstop(int line, int x) const { LineTabstops *lt = static_cast(ldTabstops); if (lt) { return lt->GetNextTabstop(line, x); } else { return 0; } } void EditView::LinesAddedOrRemoved(int lineOfPos, int linesAdded) { if (ldTabstops) { if (linesAdded > 0) { for (int line = lineOfPos; line < lineOfPos + linesAdded; line++) { ldTabstops->InsertLine(line); } } else { for (int line = (lineOfPos + -linesAdded) - 1; line >= lineOfPos; line--) { ldTabstops->RemoveLine(line); } } } } void EditView::DropGraphics(bool freeObjects) { if (freeObjects) { delete pixmapLine; pixmapLine = 0; delete pixmapIndentGuide; pixmapIndentGuide = 0; delete pixmapIndentGuideHighlight; pixmapIndentGuideHighlight = 0; } else { if (pixmapLine) pixmapLine->Release(); if (pixmapIndentGuide) pixmapIndentGuide->Release(); if (pixmapIndentGuideHighlight) pixmapIndentGuideHighlight->Release(); } } void EditView::AllocateGraphics(const ViewStyle &vsDraw) { if (!pixmapLine) pixmapLine = Surface::Allocate(vsDraw.technology); if (!pixmapIndentGuide) pixmapIndentGuide = Surface::Allocate(vsDraw.technology); if (!pixmapIndentGuideHighlight) pixmapIndentGuideHighlight = Surface::Allocate(vsDraw.technology); } static const char *ControlCharacterString(unsigned char ch) { const char *reps[] = { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" }; if (ch < ELEMENTS(reps)) { return reps[ch]; } else { return "BAD"; } } static void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid, const ViewStyle &vsDraw) { if ((rcTab.left + 2) < (rcTab.right - 1)) surface->MoveTo(static_cast(rcTab.left) + 2, ymid); else surface->MoveTo(static_cast(rcTab.right) - 1, ymid); surface->LineTo(static_cast(rcTab.right) - 1, ymid); // Draw the arrow head if needed if (vsDraw.tabDrawMode == tdLongArrow) { int ydiff = static_cast(rcTab.bottom - rcTab.top) / 2; int xhead = static_cast(rcTab.right) - 1 - ydiff; if (xhead <= rcTab.left) { ydiff -= static_cast(rcTab.left) - xhead - 1; xhead = static_cast(rcTab.left) - 1; } surface->LineTo(xhead, ymid - ydiff); surface->MoveTo(static_cast(rcTab.right) - 1, ymid); surface->LineTo(xhead, ymid + ydiff); } } void EditView::RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw) { if (!pixmapIndentGuide->Initialised()) { // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line pixmapIndentGuide->InitPixMap(1, vsDraw.lineHeight + 1, surfaceWindow, wid); pixmapIndentGuideHighlight->InitPixMap(1, vsDraw.lineHeight + 1, surfaceWindow, wid); PRectangle rcIG = PRectangle::FromInts(0, 0, 1, vsDraw.lineHeight); pixmapIndentGuide->FillRectangle(rcIG, vsDraw.styles[STYLE_INDENTGUIDE].back); pixmapIndentGuide->PenColour(vsDraw.styles[STYLE_INDENTGUIDE].fore); pixmapIndentGuideHighlight->FillRectangle(rcIG, vsDraw.styles[STYLE_BRACELIGHT].back); pixmapIndentGuideHighlight->PenColour(vsDraw.styles[STYLE_BRACELIGHT].fore); for (int stripe = 1; stripe < vsDraw.lineHeight + 1; stripe += 2) { PRectangle rcPixel = PRectangle::FromInts(0, stripe, 1, stripe + 1); pixmapIndentGuide->FillRectangle(rcPixel, vsDraw.styles[STYLE_INDENTGUIDE].fore); pixmapIndentGuideHighlight->FillRectangle(rcPixel, vsDraw.styles[STYLE_BRACELIGHT].fore); } } } LineLayout *EditView::RetrieveLineLayout(int lineNumber, const EditModel &model) { int posLineStart = model.pdoc->LineStart(lineNumber); int posLineEnd = model.pdoc->LineStart(lineNumber + 1); PLATFORM_ASSERT(posLineEnd >= posLineStart); int lineCaret = model.pdoc->LineFromPosition(model.sel.MainCaret()); return llc.Retrieve(lineNumber, lineCaret, posLineEnd - posLineStart, model.pdoc->GetStyleClock(), model.LinesOnScreen() + 1, model.pdoc->LinesTotal()); } /** * Fill in the LineLayout data for the given line. * Copy the given @a line and its styles from the document into local arrays. * Also determine the x position at which each character starts. */ void EditView::LayoutLine(const EditModel &model, int line, Surface *surface, const ViewStyle &vstyle, LineLayout *ll, int width) { if (!ll) return; PLATFORM_ASSERT(line < model.pdoc->LinesTotal()); PLATFORM_ASSERT(ll->chars != NULL); int posLineStart = model.pdoc->LineStart(line); int posLineEnd = model.pdoc->LineStart(line + 1); // If the line is very long, limit the treatment to a length that should fit in the viewport if (posLineEnd >(posLineStart + ll->maxLineLength)) { posLineEnd = posLineStart + ll->maxLineLength; } if (ll->validity == LineLayout::llCheckTextAndStyle) { int lineLength = posLineEnd - posLineStart; if (!vstyle.viewEOL) { lineLength = model.pdoc->LineEnd(line) - posLineStart; } if (lineLength == ll->numCharsInLine) { // See if chars, styles, indicators, are all the same bool allSame = true; // Check base line layout int styleByte = 0; int numCharsInLine = 0; while (numCharsInLine < lineLength) { int charInDoc = numCharsInLine + posLineStart; char chDoc = model.pdoc->CharAt(charInDoc); styleByte = model.pdoc->StyleIndexAt(charInDoc); allSame = allSame && (ll->styles[numCharsInLine] == styleByte); if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseMixed) allSame = allSame && (ll->chars[numCharsInLine] == chDoc); else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) allSame = allSame && (ll->chars[numCharsInLine] == MakeLowerCase(chDoc)); else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper) allSame = allSame && (ll->chars[numCharsInLine] == MakeUpperCase(chDoc)); else { // Style::caseCamel if ((model.pdoc->IsASCIIWordByte(ll->chars[numCharsInLine])) && ((numCharsInLine == 0) || (!model.pdoc->IsASCIIWordByte(ll->chars[numCharsInLine - 1])))) { allSame = allSame && (ll->chars[numCharsInLine] == MakeUpperCase(chDoc)); } else { allSame = allSame && (ll->chars[numCharsInLine] == MakeLowerCase(chDoc)); } } numCharsInLine++; } allSame = allSame && (ll->styles[numCharsInLine] == styleByte); // For eolFilled if (allSame) { ll->validity = LineLayout::llPositions; } else { ll->validity = LineLayout::llInvalid; } } else { ll->validity = LineLayout::llInvalid; } } if (ll->validity == LineLayout::llInvalid) { ll->widthLine = LineLayout::wrapWidthInfinite; ll->lines = 1; if (vstyle.edgeState == EDGE_BACKGROUND) { ll->edgeColumn = model.pdoc->FindColumn(line, vstyle.theEdge.column); if (ll->edgeColumn >= posLineStart) { ll->edgeColumn -= posLineStart; } } else { ll->edgeColumn = -1; } // Fill base line layout const int lineLength = posLineEnd - posLineStart; model.pdoc->GetCharRange(ll->chars, posLineStart, lineLength); model.pdoc->GetStyleRange(ll->styles, posLineStart, lineLength); int numCharsBeforeEOL = model.pdoc->LineEnd(line) - posLineStart; const int numCharsInLine = (vstyle.viewEOL) ? lineLength : numCharsBeforeEOL; for (int styleInLine = 0; styleInLine < numCharsInLine; styleInLine++) { const unsigned char styleByte = ll->styles[styleInLine]; ll->styles[styleInLine] = styleByte; } const unsigned char styleByteLast = (lineLength > 0) ? ll->styles[lineLength - 1] : 0; if (vstyle.someStylesForceCase) { for (int charInLine = 0; charInLinechars[charInLine]; if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseUpper) ll->chars[charInLine] = static_cast(MakeUpperCase(chDoc)); else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseLower) ll->chars[charInLine] = static_cast(MakeLowerCase(chDoc)); else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseCamel) { if ((model.pdoc->IsASCIIWordByte(ll->chars[charInLine])) && ((charInLine == 0) || (!model.pdoc->IsASCIIWordByte(ll->chars[charInLine - 1])))) { ll->chars[charInLine] = static_cast(MakeUpperCase(chDoc)); } else { ll->chars[charInLine] = static_cast(MakeLowerCase(chDoc)); } } } } ll->xHighlightGuide = 0; // Extra element at the end of the line to hold end x position and act as ll->chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character ll->styles[numCharsInLine] = styleByteLast; // For eolFilled // Layout the line, determining the position of each character, // with an extra element at the end for the end of the line. ll->positions[0] = 0; bool lastSegItalics = false; BreakFinder bfLayout(ll, NULL, Range(0, numCharsInLine), posLineStart, 0, false, model.pdoc, &model.reprs, NULL); while (bfLayout.More()) { const TextSegment ts = bfLayout.Next(); std::fill(&ll->positions[ts.start + 1], &ll->positions[ts.end() + 1], 0.0f); if (vstyle.styles[ll->styles[ts.start]].visible) { if (ts.representation) { XYPOSITION representationWidth = vstyle.controlCharWidth; if (ll->chars[ts.start] == '\t') { // Tab is a special case of representation, taking a variable amount of space const XYPOSITION x = ll->positions[ts.start]; representationWidth = NextTabstopPos(line, x, vstyle.tabWidth) - ll->positions[ts.start]; } else { if (representationWidth <= 0.0) { XYPOSITION positionsRepr[256]; // Should expand when needed posCache.MeasureWidths(surface, vstyle, STYLE_CONTROLCHAR, ts.representation->stringRep.c_str(), static_cast(ts.representation->stringRep.length()), positionsRepr, model.pdoc); representationWidth = positionsRepr[ts.representation->stringRep.length() - 1] + vstyle.ctrlCharPadding; } } for (int ii = 0; ii < ts.length; ii++) ll->positions[ts.start + 1 + ii] = representationWidth; } else { if ((ts.length == 1) && (' ' == ll->chars[ts.start])) { // Over half the segments are single characters and of these about half are space characters. ll->positions[ts.start + 1] = vstyle.styles[ll->styles[ts.start]].spaceWidth; } else { posCache.MeasureWidths(surface, vstyle, ll->styles[ts.start], ll->chars + ts.start, ts.length, ll->positions + ts.start + 1, model.pdoc); } } lastSegItalics = (!ts.representation) && ((ll->chars[ts.end() - 1] != ' ') && vstyle.styles[ll->styles[ts.start]].italic); } for (int posToIncrease = ts.start + 1; posToIncrease <= ts.end(); posToIncrease++) { ll->positions[posToIncrease] += ll->positions[ts.start]; } } // Small hack to make lines that end with italics not cut off the edge of the last character if (lastSegItalics) { ll->positions[numCharsInLine] += vstyle.lastSegItalicsOffset; } ll->numCharsInLine = numCharsInLine; ll->numCharsBeforeEOL = numCharsBeforeEOL; ll->validity = LineLayout::llPositions; } // Hard to cope when too narrow, so just assume there is space if (width < 20) { width = 20; } if ((ll->validity == LineLayout::llPositions) || (ll->widthLine != width)) { ll->widthLine = width; if (width == LineLayout::wrapWidthInfinite) { ll->lines = 1; } else if (width > ll->positions[ll->numCharsInLine]) { // Simple common case where line does not need wrapping. ll->lines = 1; } else { if (vstyle.wrapVisualFlags & SC_WRAPVISUALFLAG_END) { width -= static_cast(vstyle.aveCharWidth); // take into account the space for end wrap mark } XYPOSITION wrapAddIndent = 0; // This will be added to initial indent of line if (vstyle.wrapIndentMode == SC_WRAPINDENT_INDENT) { wrapAddIndent = model.pdoc->IndentSize() * vstyle.spaceWidth; } else if (vstyle.wrapIndentMode == SC_WRAPINDENT_FIXED) { wrapAddIndent = vstyle.wrapVisualStartIndent * vstyle.aveCharWidth; } ll->wrapIndent = wrapAddIndent; if (vstyle.wrapIndentMode != SC_WRAPINDENT_FIXED) for (int i = 0; i < ll->numCharsInLine; i++) { if (!IsSpaceOrTab(ll->chars[i])) { ll->wrapIndent += ll->positions[i]; // Add line indent break; } } // Check for text width minimum if (ll->wrapIndent > width - static_cast(vstyle.aveCharWidth) * 15) ll->wrapIndent = wrapAddIndent; // Check for wrapIndent minimum if ((vstyle.wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (ll->wrapIndent < vstyle.aveCharWidth)) ll->wrapIndent = vstyle.aveCharWidth; // Indent to show start visual ll->lines = 0; // Calculate line start positions based upon width. int lastGoodBreak = 0; int lastLineStart = 0; XYACCUMULATOR startOffset = 0; int p = 0; while (p < ll->numCharsInLine) { if ((ll->positions[p + 1] - startOffset) >= width) { if (lastGoodBreak == lastLineStart) { // Try moving to start of last character if (p > 0) { lastGoodBreak = model.pdoc->MovePositionOutsideChar(p + posLineStart, -1) - posLineStart; } if (lastGoodBreak == lastLineStart) { // Ensure at least one character on line. lastGoodBreak = model.pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1) - posLineStart; } } lastLineStart = lastGoodBreak; ll->lines++; ll->SetLineStart(ll->lines, lastGoodBreak); startOffset = ll->positions[lastGoodBreak]; // take into account the space for start wrap mark and indent startOffset -= ll->wrapIndent; p = lastGoodBreak + 1; continue; } if (p > 0) { if (vstyle.wrapState == eWrapChar) { lastGoodBreak = model.pdoc->MovePositionOutsideChar(p + posLineStart, -1) - posLineStart; p = model.pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart; continue; } else if ((vstyle.wrapState == eWrapWord) && (ll->styles[p] != ll->styles[p - 1])) { lastGoodBreak = p; } else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) { lastGoodBreak = p; } } p++; } ll->lines++; } ll->validity = LineLayout::llLines; } } Point EditView::LocationFromPosition(Surface *surface, const EditModel &model, SelectionPosition pos, int topLine, const ViewStyle &vs, PointEnd pe) { Point pt; if (pos.Position() == INVALID_POSITION) return pt; int lineDoc = model.pdoc->LineFromPosition(pos.Position()); int posLineStart = model.pdoc->LineStart(lineDoc); if ((pe & peLineEnd) && (lineDoc > 0) && (pos.Position() == posLineStart)) { // Want point at end of first line lineDoc--; posLineStart = model.pdoc->LineStart(lineDoc); } const int lineVisible = model.cs.DisplayFromDoc(lineDoc); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); const int posInLine = pos.Position() - posLineStart; pt = ll->PointFromPosition(posInLine, vs.lineHeight, pe); pt.y += (lineVisible - topLine) * vs.lineHeight; pt.x += vs.textStart - model.xOffset; } pt.x += pos.VirtualSpace() * vs.styles[ll->EndLineStyle()].spaceWidth; return pt; } Range EditView::RangeDisplayLine(Surface *surface, const EditModel &model, int lineVisible, const ViewStyle &vs) { Range rangeSubLine = Range(0,0); if (lineVisible < 0) { return rangeSubLine; } const int lineDoc = model.cs.DocFromDisplay(lineVisible); const int positionLineStart = model.pdoc->LineStart(lineDoc); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); const int lineStartSet = model.cs.DisplayFromDoc(lineDoc); const int subLine = lineVisible - lineStartSet; if (subLine < ll->lines) { rangeSubLine = ll->SubLineRange(subLine); if (subLine == ll->lines-1) { rangeSubLine.end = model.pdoc->LineStart(lineDoc + 1) - positionLineStart; } } } rangeSubLine.start += positionLineStart; rangeSubLine.end += positionLineStart; return rangeSubLine; } SelectionPosition EditView::SPositionFromLocation(Surface *surface, const EditModel &model, PointDocument pt, bool canReturnInvalid, bool charPosition, bool virtualSpace, const ViewStyle &vs) { pt.x = pt.x - vs.textStart; int visibleLine = static_cast(floor(pt.y / vs.lineHeight)); if (!canReturnInvalid && (visibleLine < 0)) visibleLine = 0; const int lineDoc = model.cs.DocFromDisplay(visibleLine); if (canReturnInvalid && (lineDoc < 0)) return SelectionPosition(INVALID_POSITION); if (lineDoc >= model.pdoc->LinesTotal()) return SelectionPosition(canReturnInvalid ? INVALID_POSITION : model.pdoc->Length()); const int posLineStart = model.pdoc->LineStart(lineDoc); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); const int lineStartSet = model.cs.DisplayFromDoc(lineDoc); const int subLine = visibleLine - lineStartSet; if (subLine < ll->lines) { const Range rangeSubLine = ll->SubLineRange(subLine); const XYPOSITION subLineStart = ll->positions[rangeSubLine.start]; if (subLine > 0) // Wrapped pt.x -= ll->wrapIndent; const int positionInLine = ll->FindPositionFromX(static_cast(pt.x + subLineStart), rangeSubLine, charPosition); if (positionInLine < rangeSubLine.end) { return SelectionPosition(model.pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1)); } if (virtualSpace) { const XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth; const int spaceOffset = static_cast( (pt.x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) / spaceWidth); return SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset); } else if (canReturnInvalid) { if (pt.x < (ll->positions[rangeSubLine.end] - subLineStart)) { return SelectionPosition(model.pdoc->MovePositionOutsideChar(rangeSubLine.end + posLineStart, 1)); } } else { return SelectionPosition(rangeSubLine.end + posLineStart); } } if (!canReturnInvalid) return SelectionPosition(ll->numCharsInLine + posLineStart); } return SelectionPosition(canReturnInvalid ? INVALID_POSITION : posLineStart); } /** * Find the document position corresponding to an x coordinate on a particular document line. * Ensure is between whole characters when document is in multi-byte or UTF-8 mode. * This method is used for rectangular selections and does not work on wrapped lines. */ SelectionPosition EditView::SPositionFromLineX(Surface *surface, const EditModel &model, int lineDoc, int x, const ViewStyle &vs) { AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { const int posLineStart = model.pdoc->LineStart(lineDoc); LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); const Range rangeSubLine = ll->SubLineRange(0); const XYPOSITION subLineStart = ll->positions[rangeSubLine.start]; const int positionInLine = ll->FindPositionFromX(x + subLineStart, rangeSubLine, false); if (positionInLine < rangeSubLine.end) { return SelectionPosition(model.pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1)); } const XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth; const int spaceOffset = static_cast( (x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) / spaceWidth); return SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset); } return SelectionPosition(0); } int EditView::DisplayFromPosition(Surface *surface, const EditModel &model, int pos, const ViewStyle &vs) { int lineDoc = model.pdoc->LineFromPosition(pos); int lineDisplay = model.cs.DisplayFromDoc(lineDoc); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); unsigned int posLineStart = model.pdoc->LineStart(lineDoc); int posInLine = pos - posLineStart; lineDisplay--; // To make up for first increment ahead. for (int subLine = 0; subLine < ll->lines; subLine++) { if (posInLine >= ll->LineStart(subLine)) { lineDisplay++; } } } return lineDisplay; } int EditView::StartEndDisplayLine(Surface *surface, const EditModel &model, int pos, bool start, const ViewStyle &vs) { int line = model.pdoc->LineFromPosition(pos); AutoLineLayout ll(llc, RetrieveLineLayout(line, model)); int posRet = INVALID_POSITION; if (surface && ll) { unsigned int posLineStart = model.pdoc->LineStart(line); LayoutLine(model, line, surface, vs, ll, model.wrapWidth); int posInLine = pos - posLineStart; if (posInLine <= ll->maxLineLength) { for (int subLine = 0; subLine < ll->lines; subLine++) { if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1)) && (posInLine <= ll->numCharsBeforeEOL)) { if (start) { posRet = ll->LineStart(subLine) + posLineStart; } else { if (subLine == ll->lines - 1) posRet = ll->numCharsBeforeEOL + posLineStart; else posRet = ll->LineStart(subLine + 1) + posLineStart - 1; } } } } } return posRet; } static ColourDesired SelectionBackground(const ViewStyle &vsDraw, bool main, bool primarySelection) { return main ? (primarySelection ? vsDraw.selColours.back : vsDraw.selBackground2) : vsDraw.selAdditionalBackground; } static ColourDesired TextBackground(const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, ColourOptional background, int inSelection, bool inHotspot, int styleMain, int i) { if (inSelection == 1) { if (vsDraw.selColours.back.isSet && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { return SelectionBackground(vsDraw, true, model.primarySelection); } } else if (inSelection == 2) { if (vsDraw.selColours.back.isSet && (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA)) { return SelectionBackground(vsDraw, false, model.primarySelection); } } else { if ((vsDraw.edgeState == EDGE_BACKGROUND) && (i >= ll->edgeColumn) && (i < ll->numCharsBeforeEOL)) return vsDraw.theEdge.colour; if (inHotspot && vsDraw.hotspotColours.back.isSet) return vsDraw.hotspotColours.back; } if (background.isSet && (styleMain != STYLE_BRACELIGHT) && (styleMain != STYLE_BRACEBAD)) { return background; } else { return vsDraw.styles[styleMain].back; } } void EditView::DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight) { Point from = Point::FromInts(0, ((lineVisible & 1) && (lineHeight & 1)) ? 1 : 0); PRectangle rcCopyArea = PRectangle::FromInts(start + 1, static_cast(rcSegment.top), start + 2, static_cast(rcSegment.bottom)); surface->Copy(rcCopyArea, from, highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide); } static void SimpleAlphaRectangle(Surface *surface, PRectangle rc, ColourDesired fill, int alpha) { if (alpha != SC_ALPHA_NOALPHA) { surface->AlphaRectangle(rc, 0, fill, alpha, fill, alpha, 0); } } static void DrawTextBlob(Surface *surface, const ViewStyle &vsDraw, PRectangle rcSegment, const char *s, ColourDesired textBack, ColourDesired textFore, bool fillBackground) { if (rcSegment.Empty()) return; if (fillBackground) { surface->FillRectangle(rcSegment, textBack); } FontAlias ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; int normalCharHeight = static_cast(surface->Ascent(ctrlCharsFont) - surface->InternalLeading(ctrlCharsFont)); PRectangle rcCChar = rcSegment; rcCChar.left = rcCChar.left + 1; rcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight; rcCChar.bottom = rcSegment.top + vsDraw.maxAscent + 1; PRectangle rcCentral = rcCChar; rcCentral.top++; rcCentral.bottom--; surface->FillRectangle(rcCentral, textFore); PRectangle rcChar = rcCChar; rcChar.left++; rcChar.right--; surface->DrawTextClipped(rcChar, ctrlCharsFont, rcSegment.top + vsDraw.maxAscent, s, static_cast(s ? strlen(s) : 0), textBack, textFore); } void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart, ColourOptional background) { const int posLineStart = model.pdoc->LineStart(line); PRectangle rcSegment = rcLine; const bool lastSubLine = subLine == (ll->lines - 1); XYPOSITION virtualSpace = 0; if (lastSubLine) { const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; virtualSpace = model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)) * spaceWidth; } XYPOSITION xEol = static_cast(ll->positions[lineEnd] - subLineStart); // Fill the virtual space and show selections within it if (virtualSpace > 0.0f) { rcSegment.left = xEol + xStart; rcSegment.right = xEol + xStart + virtualSpace; surface->FillRectangle(rcSegment, background.isSet ? background : vsDraw.styles[ll->styles[ll->numCharsInLine]].back); if (!hideSelection && ((vsDraw.selAlpha == SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA))) { SelectionSegment virtualSpaceRange(SelectionPosition(model.pdoc->LineEnd(line)), SelectionPosition(model.pdoc->LineEnd(line), model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)))); for (size_t r = 0; rEndLineStyle()].spaceWidth; rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - static_cast(subLineStart)+portion.start.VirtualSpace() * spaceWidth; rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - static_cast(subLineStart)+portion.end.VirtualSpace() * spaceWidth; rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection)); } } } } } int eolInSelection = 0; int alpha = SC_ALPHA_NOALPHA; if (!hideSelection) { int posAfterLineEnd = model.pdoc->LineStart(line + 1); eolInSelection = (lastSubLine == true) ? model.sel.InSelectionForEOL(posAfterLineEnd) : 0; alpha = (eolInSelection == 1) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; } // Draw the [CR], [LF], or [CR][LF] blobs if visible line ends are on XYPOSITION blobsWidth = 0; if (lastSubLine) { for (int eolPos = ll->numCharsBeforeEOL; eolPosnumCharsInLine; eolPos++) { rcSegment.left = xStart + ll->positions[eolPos] - static_cast(subLineStart)+virtualSpace; rcSegment.right = xStart + ll->positions[eolPos + 1] - static_cast(subLineStart)+virtualSpace; blobsWidth += rcSegment.Width(); char hexits[4]; const char *ctrlChar; unsigned char chEOL = ll->chars[eolPos]; int styleMain = ll->styles[eolPos]; ColourDesired textBack = TextBackground(model, vsDraw, ll, background, eolInSelection, false, styleMain, eolPos); if (UTF8IsAscii(chEOL)) { ctrlChar = ControlCharacterString(chEOL); } else { const Representation *repr = model.reprs.RepresentationFromCharacter(ll->chars + eolPos, ll->numCharsInLine - eolPos); if (repr) { ctrlChar = repr->stringRep.c_str(); eolPos = ll->numCharsInLine; } else { sprintf(hexits, "x%2X", chEOL); ctrlChar = hexits; } } ColourDesired textFore = vsDraw.styles[styleMain].fore; if (eolInSelection && vsDraw.selColours.fore.isSet) { textFore = (eolInSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; } if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1)) { if (alpha == SC_ALPHA_NOALPHA) { surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection)); } else { surface->FillRectangle(rcSegment, textBack); } } else { surface->FillRectangle(rcSegment, textBack); } DrawTextBlob(surface, vsDraw, rcSegment, ctrlChar, textBack, textFore, phasesDraw == phasesOne); if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); } } } // Draw the eol-is-selected rectangle rcSegment.left = xEol + xStart + virtualSpace + blobsWidth; rcSegment.right = rcSegment.left + vsDraw.aveCharWidth; if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha == SC_ALPHA_NOALPHA)) { surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection)); } else { if (background.isSet) { surface->FillRectangle(rcSegment, background); } else if (line < model.pdoc->LinesTotal() - 1) { surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); } else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) { surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); } else { surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back); } if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); } } rcSegment.left = rcSegment.right; if (rcSegment.left < rcLine.left) rcSegment.left = rcLine.left; rcSegment.right = rcLine.right; bool fillRemainder = !lastSubLine || model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_HIDDEN || !model.cs.GetFoldDisplayTextShown(line); if (fillRemainder) { // Fill the remainder of the line FillLineRemainder(surface, model, vsDraw, ll, line, rcSegment, subLine); } bool drawWrapMarkEnd = false; if (vsDraw.wrapVisualFlags & SC_WRAPVISUALFLAG_END) { if (subLine + 1 < ll->lines) { drawWrapMarkEnd = ll->LineStart(subLine + 1) != 0; } } if (drawWrapMarkEnd) { PRectangle rcPlace = rcSegment; if (vsDraw.wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_END_BY_TEXT) { rcPlace.left = xEol + xStart + virtualSpace; rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; } else { // rcLine is clipped to text area rcPlace.right = rcLine.right; rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; } if (customDrawWrapMarker == NULL) { DrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour()); } else { customDrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour()); } } } static void DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, int xStart, PRectangle rcLine, int secondCharacter, int subLine, Indicator::DrawState drawState, int value) { const XYPOSITION subLineStart = ll->positions[ll->LineStart(subLine)]; PRectangle rcIndic( ll->positions[startPos] + xStart - subLineStart, rcLine.top + vsDraw.maxAscent, ll->positions[endPos] + xStart - subLineStart, rcLine.top + vsDraw.maxAscent + 3); PRectangle rcFirstCharacter = rcIndic; // Allow full descent space for character indicators rcFirstCharacter.bottom = rcLine.top + vsDraw.maxAscent + vsDraw.maxDescent; if (secondCharacter >= 0) { rcFirstCharacter.right = ll->positions[secondCharacter] + xStart - subLineStart; } else { // Indicator continued from earlier line so make an empty box and don't draw rcFirstCharacter.right = rcFirstCharacter.left; } vsDraw.indicators[indicNum].Draw(surface, rcIndic, rcLine, rcFirstCharacter, drawState, value); } static void DrawIndicators(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int xStart, PRectangle rcLine, int subLine, int lineEnd, bool under, int hoverIndicatorPos) { // Draw decorators const int posLineStart = model.pdoc->LineStart(line); const int lineStart = ll->LineStart(subLine); const int posLineEnd = posLineStart + lineEnd; for (Decoration *deco = model.pdoc->decorations.root; deco; deco = deco->next) { if (under == vsDraw.indicators[deco->indicator].under) { int startPos = posLineStart + lineStart; if (!deco->rs.ValueAt(startPos)) { startPos = deco->rs.EndRun(startPos); } while ((startPos < posLineEnd) && (deco->rs.ValueAt(startPos))) { const Range rangeRun(deco->rs.StartRun(startPos), deco->rs.EndRun(startPos)); const int endPos = std::min(rangeRun.end, posLineEnd); const bool hover = vsDraw.indicators[deco->indicator].IsDynamic() && rangeRun.ContainsCharacter(hoverIndicatorPos); const int value = deco->rs.ValueAt(startPos); Indicator::DrawState drawState = hover ? Indicator::drawHover : Indicator::drawNormal; const int posSecond = model.pdoc->MovePositionOutsideChar(rangeRun.First() + 1, 1); DrawIndicator(deco->indicator, startPos - posLineStart, endPos - posLineStart, surface, vsDraw, ll, xStart, rcLine, posSecond - posLineStart, subLine, drawState, value); startPos = endPos; if (!deco->rs.ValueAt(startPos)) { startPos = deco->rs.EndRun(startPos); } } } } // Use indicators to highlight matching braces if ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACELIGHT)) || (vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACEBAD))) { int braceIndicator = (model.bracesMatchStyle == STYLE_BRACELIGHT) ? vsDraw.braceHighlightIndicator : vsDraw.braceBadLightIndicator; if (under == vsDraw.indicators[braceIndicator].under) { Range rangeLine(posLineStart + lineStart, posLineEnd); if (rangeLine.ContainsCharacter(model.braces[0])) { int braceOffset = model.braces[0] - posLineStart; if (braceOffset < ll->numCharsInLine) { const int secondOffset = model.pdoc->MovePositionOutsideChar(model.braces[0] + 1, 1) - posLineStart; DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, ll, xStart, rcLine, secondOffset, subLine, Indicator::drawNormal, 1); } } if (rangeLine.ContainsCharacter(model.braces[1])) { int braceOffset = model.braces[1] - posLineStart; if (braceOffset < ll->numCharsInLine) { const int secondOffset = model.pdoc->MovePositionOutsideChar(model.braces[1] + 1, 1) - posLineStart; DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, ll, xStart, rcLine, secondOffset, subLine, Indicator::drawNormal, 1); } } } } } void EditView::DrawFoldDisplayText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int xStart, PRectangle rcLine, int subLine, XYACCUMULATOR subLineStart, DrawPhase phase) { const bool lastSubLine = subLine == (ll->lines - 1); if (!lastSubLine) return; if ((model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_HIDDEN) || !model.cs.GetFoldDisplayTextShown(line)) return; PRectangle rcSegment = rcLine; const char *foldDisplayText = model.cs.GetFoldDisplayText(line); const int lengthFoldDisplayText = static_cast(strlen(foldDisplayText)); FontAlias fontText = vsDraw.styles[STYLE_FOLDDISPLAYTEXT].font; const int widthFoldDisplayText = static_cast(surface->WidthText(fontText, foldDisplayText, lengthFoldDisplayText)); int eolInSelection = 0; int alpha = SC_ALPHA_NOALPHA; if (!hideSelection) { int posAfterLineEnd = model.pdoc->LineStart(line + 1); eolInSelection = (subLine == (ll->lines - 1)) ? model.sel.InSelectionForEOL(posAfterLineEnd) : 0; alpha = (eolInSelection == 1) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; } const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; XYPOSITION virtualSpace = model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)) * spaceWidth; rcSegment.left = xStart + static_cast(ll->positions[ll->numCharsInLine] - subLineStart) + spaceWidth + virtualSpace; rcSegment.right = rcSegment.left + static_cast(widthFoldDisplayText); ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); FontAlias textFont = vsDraw.styles[STYLE_FOLDDISPLAYTEXT].font; ColourDesired textFore = vsDraw.styles[STYLE_FOLDDISPLAYTEXT].fore; if (eolInSelection && (vsDraw.selColours.fore.isSet)) { textFore = (eolInSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; } ColourDesired textBack = TextBackground(model, vsDraw, ll, background, eolInSelection, false, STYLE_FOLDDISPLAYTEXT, -1); if (model.trackLineWidth) { if (rcSegment.right + 1> lineWidthMaxSeen) { // Fold display text border drawn on rcSegment.right with width 1 is the last visble object of the line lineWidthMaxSeen = static_cast(rcSegment.right + 1); } } if ((phasesDraw != phasesOne) && (phase & drawBack)) { surface->FillRectangle(rcSegment, textBack); // Fill Remainder of the line PRectangle rcRemainder = rcSegment; rcRemainder.left = rcRemainder.right + 1; if (rcRemainder.left < rcLine.left) rcRemainder.left = rcLine.left; rcRemainder.right = rcLine.right; FillLineRemainder(surface, model, vsDraw, ll, line, rcRemainder, subLine); } if (phase & drawText) { if (phasesDraw != phasesOne) { surface->DrawTextTransparent(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, foldDisplayText, lengthFoldDisplayText, textFore); } else { surface->DrawTextNoClip(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, foldDisplayText, lengthFoldDisplayText, textFore, textBack); } } if (phase & drawIndicatorsFore) { if (model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_BOXED) { surface->PenColour(textFore); surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); surface->LineTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom)); surface->MoveTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom)); surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom - 1)); surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom - 1)); } } if (phase & drawSelectionTranslucent) { if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && alpha != SC_ALPHA_NOALPHA) { SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); } } } static bool AnnotationBoxedOrIndented(int annotationVisible) { return annotationVisible == ANNOTATION_BOXED || annotationVisible == ANNOTATION_INDENTED; } void EditView::DrawAnnotation(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int xStart, PRectangle rcLine, int subLine, DrawPhase phase) { int indent = static_cast(model.pdoc->GetLineIndentation(line) * vsDraw.spaceWidth); PRectangle rcSegment = rcLine; int annotationLine = subLine - ll->lines; const StyledText stAnnotation = model.pdoc->AnnotationStyledText(line); if (stAnnotation.text && ValidStyledText(vsDraw, vsDraw.annotationStyleOffset, stAnnotation)) { if (phase & drawBack) { surface->FillRectangle(rcSegment, vsDraw.styles[0].back); } rcSegment.left = static_cast(xStart); if (model.trackLineWidth || AnnotationBoxedOrIndented(vsDraw.annotationVisible)) { // Only care about calculating width if tracking or need to draw indented box int widthAnnotation = WidestLineWidth(surface, vsDraw, vsDraw.annotationStyleOffset, stAnnotation); if (AnnotationBoxedOrIndented(vsDraw.annotationVisible)) { widthAnnotation += static_cast(vsDraw.spaceWidth * 2); // Margins rcSegment.left = static_cast(xStart + indent); rcSegment.right = rcSegment.left + widthAnnotation; } if (widthAnnotation > lineWidthMaxSeen) lineWidthMaxSeen = widthAnnotation; } const int annotationLines = model.pdoc->AnnotationLines(line); size_t start = 0; size_t lengthAnnotation = stAnnotation.LineLength(start); int lineInAnnotation = 0; while ((lineInAnnotation < annotationLine) && (start < stAnnotation.length)) { start += lengthAnnotation + 1; lengthAnnotation = stAnnotation.LineLength(start); lineInAnnotation++; } PRectangle rcText = rcSegment; if ((phase & drawBack) && AnnotationBoxedOrIndented(vsDraw.annotationVisible)) { surface->FillRectangle(rcText, vsDraw.styles[stAnnotation.StyleAt(start) + vsDraw.annotationStyleOffset].back); rcText.left += vsDraw.spaceWidth; } DrawStyledText(surface, vsDraw, vsDraw.annotationStyleOffset, rcText, stAnnotation, start, lengthAnnotation, phase); if ((phase & drawBack) && (vsDraw.annotationVisible == ANNOTATION_BOXED)) { surface->PenColour(vsDraw.styles[vsDraw.annotationStyleOffset].fore); surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); surface->LineTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom)); surface->MoveTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom)); if (subLine == ll->lines) { surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.top)); surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.top)); } if (subLine == ll->lines + annotationLines - 1) { surface->MoveTo(static_cast(rcSegment.left), static_cast(rcSegment.bottom - 1)); surface->LineTo(static_cast(rcSegment.right), static_cast(rcSegment.bottom - 1)); } } } } static void DrawBlockCaret(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int subLine, int xStart, int offset, int posCaret, PRectangle rcCaret, ColourDesired caretColour) { int lineStart = ll->LineStart(subLine); int posBefore = posCaret; int posAfter = model.pdoc->MovePositionOutsideChar(posCaret + 1, 1); int numCharsToDraw = posAfter - posCaret; // Work out where the starting and ending offsets are. We need to // see if the previous character shares horizontal space, such as a // glyph / combining character. If so we'll need to draw that too. int offsetFirstChar = offset; int offsetLastChar = offset + (posAfter - posCaret); while ((posBefore > 0) && ((offsetLastChar - numCharsToDraw) >= lineStart)) { if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - numCharsToDraw]) > 0) { // The char does not share horizontal space break; } // Char shares horizontal space, update the numChars to draw // Update posBefore to point to the prev char posBefore = model.pdoc->MovePositionOutsideChar(posBefore - 1, -1); numCharsToDraw = posAfter - posBefore; offsetFirstChar = offset - (posCaret - posBefore); } // See if the next character shares horizontal space, if so we'll // need to draw that too. if (offsetFirstChar < 0) offsetFirstChar = 0; numCharsToDraw = offsetLastChar - offsetFirstChar; while ((offsetLastChar < ll->LineStart(subLine + 1)) && (offsetLastChar <= ll->numCharsInLine)) { // Update posAfter to point to the 2nd next char, this is where // the next character ends, and 2nd next begins. We'll need // to compare these two posBefore = posAfter; posAfter = model.pdoc->MovePositionOutsideChar(posAfter + 1, 1); offsetLastChar = offset + (posAfter - posCaret); if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - (posAfter - posBefore)]) > 0) { // The char does not share horizontal space break; } // Char shares horizontal space, update the numChars to draw numCharsToDraw = offsetLastChar - offsetFirstChar; } // We now know what to draw, update the caret drawing rectangle rcCaret.left = ll->positions[offsetFirstChar] - ll->positions[lineStart] + xStart; rcCaret.right = ll->positions[offsetFirstChar + numCharsToDraw] - ll->positions[lineStart] + xStart; // Adjust caret position to take into account any word wrapping symbols. if ((ll->wrapIndent != 0) && (lineStart != 0)) { XYPOSITION wordWrapCharWidth = ll->wrapIndent; rcCaret.left += wordWrapCharWidth; rcCaret.right += wordWrapCharWidth; } // This character is where the caret block is, we override the colours // (inversed) for drawing the caret here. int styleMain = ll->styles[offsetFirstChar]; FontAlias fontText = vsDraw.styles[styleMain].font; surface->DrawTextClipped(rcCaret, fontText, rcCaret.top + vsDraw.maxAscent, ll->chars + offsetFirstChar, numCharsToDraw, vsDraw.styles[styleMain].back, caretColour); } void EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int lineDoc, int xStart, PRectangle rcLine, int subLine) const { // When drag is active it is the only caret drawn bool drawDrag = model.posDrag.IsValid(); if (hideSelection && !drawDrag) return; const int posLineStart = model.pdoc->LineStart(lineDoc); // For each selection draw for (size_t r = 0; (rEndLineStyle()].spaceWidth; const XYPOSITION virtualOffset = posCaret.VirtualSpace() * spaceWidth; if (ll->InLine(offset, subLine) && offset <= ll->numCharsBeforeEOL) { XYPOSITION xposCaret = ll->positions[offset] + virtualOffset - ll->positions[ll->LineStart(subLine)]; if (ll->wrapIndent != 0) { int lineStart = ll->LineStart(subLine); if (lineStart != 0) // Wrapped xposCaret += ll->wrapIndent; } bool caretBlinkState = (model.caret.active && model.caret.on) || (!additionalCaretsBlink && !mainCaret); bool caretVisibleState = additionalCaretsVisible || mainCaret; if ((xposCaret >= 0) && (vsDraw.caretWidth > 0) && (vsDraw.caretStyle != CARETSTYLE_INVISIBLE) && ((model.posDrag.IsValid()) || (caretBlinkState && caretVisibleState))) { bool caretAtEOF = false; bool caretAtEOL = false; bool drawBlockCaret = false; XYPOSITION widthOverstrikeCaret; XYPOSITION caretWidthOffset = 0; PRectangle rcCaret = rcLine; if (posCaret.Position() == model.pdoc->Length()) { // At end of document caretAtEOF = true; widthOverstrikeCaret = vsDraw.aveCharWidth; } else if ((posCaret.Position() - posLineStart) >= ll->numCharsInLine) { // At end of line caretAtEOL = true; widthOverstrikeCaret = vsDraw.aveCharWidth; } else { const int widthChar = model.pdoc->LenChar(posCaret.Position()); widthOverstrikeCaret = ll->positions[offset + widthChar] - ll->positions[offset]; } if (widthOverstrikeCaret < 3) // Make sure its visible widthOverstrikeCaret = 3; if (xposCaret > 0) caretWidthOffset = 0.51f; // Move back so overlaps both character cells. xposCaret += xStart; if (model.posDrag.IsValid()) { /* Dragging text, use a line caret */ rcCaret.left = static_cast(RoundXYPosition(xposCaret - caretWidthOffset)); rcCaret.right = rcCaret.left + vsDraw.caretWidth; } else if (model.inOverstrike && drawOverstrikeCaret) { /* Overstrike (insert mode), use a modified bar caret */ rcCaret.top = rcCaret.bottom - 2; rcCaret.left = xposCaret + 1; rcCaret.right = rcCaret.left + widthOverstrikeCaret - 1; } else if ((vsDraw.caretStyle == CARETSTYLE_BLOCK) || imeCaretBlockOverride) { /* Block caret */ rcCaret.left = xposCaret; if (!caretAtEOL && !caretAtEOF && (ll->chars[offset] != '\t') && !(IsControlCharacter(ll->chars[offset]))) { drawBlockCaret = true; rcCaret.right = xposCaret + widthOverstrikeCaret; } else { rcCaret.right = xposCaret + vsDraw.aveCharWidth; } } else { /* Line caret */ rcCaret.left = static_cast(RoundXYPosition(xposCaret - caretWidthOffset)); rcCaret.right = rcCaret.left + vsDraw.caretWidth; } ColourDesired caretColour = mainCaret ? vsDraw.caretcolour : vsDraw.additionalCaretColour; if (drawBlockCaret) { DrawBlockCaret(surface, model, vsDraw, ll, subLine, xStart, offset, posCaret.Position(), rcCaret, caretColour); } else { surface->FillRectangle(rcCaret, caretColour); } } } if (drawDrag) break; } } static void DrawWrapIndentAndMarker(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, int xStart, PRectangle rcLine, ColourOptional background, DrawWrapMarkerFn customDrawWrapMarker) { // default bgnd here.. surface->FillRectangle(rcLine, background.isSet ? background : vsDraw.styles[STYLE_DEFAULT].back); if (vsDraw.wrapVisualFlags & SC_WRAPVISUALFLAG_START) { // draw continuation rect PRectangle rcPlace = rcLine; rcPlace.left = static_cast(xStart); rcPlace.right = rcPlace.left + ll->wrapIndent; if (vsDraw.wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_START_BY_TEXT) rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; else rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; if (customDrawWrapMarker == NULL) { DrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour()); } else { customDrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour()); } } } void EditView::DrawBackground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, Range lineRange, int posLineStart, int xStart, int subLine, ColourOptional background) const { const bool selBackDrawn = vsDraw.SelectionBackgroundDrawn(); bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; // Does not take margin into account but not significant const int xStartVisible = static_cast(subLineStart)-xStart; BreakFinder bfBack(ll, &model.sel, lineRange, posLineStart, xStartVisible, selBackDrawn, model.pdoc, &model.reprs, NULL); const bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background.isSet; // Background drawing loop while (bfBack.More()) { const TextSegment ts = bfBack.Next(); const int i = ts.end() - 1; const int iDoc = i + posLineStart; PRectangle rcSegment = rcLine; rcSegment.left = ll->positions[ts.start] + xStart - static_cast(subLineStart); rcSegment.right = ll->positions[ts.end()] + xStart - static_cast(subLineStart); // Only try to draw if really visible - enhances performance by not calling environment to // draw strings that are completely past the right side of the window. if (!rcSegment.Empty() && rcSegment.Intersects(rcLine)) { // Clip to line rectangle, since may have a huge position which will not work with some platforms if (rcSegment.left < rcLine.left) rcSegment.left = rcLine.left; if (rcSegment.right > rcLine.right) rcSegment.right = rcLine.right; const int inSelection = hideSelection ? 0 : model.sel.CharacterInSelection(iDoc); const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); ColourDesired textBack = TextBackground(model, vsDraw, ll, background, inSelection, inHotspot, ll->styles[i], i); if (ts.representation) { if (ll->chars[i] == '\t') { // Tab display if (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation)) textBack = vsDraw.whitespaceColours.back; } else { // Blob display inIndentation = false; } surface->FillRectangle(rcSegment, textBack); } else { // Normal text display surface->FillRectangle(rcSegment, textBack); if (vsDraw.viewWhitespace != wsInvisible) { for (int cpos = 0; cpos <= i - ts.start; cpos++) { if (ll->chars[cpos + ts.start] == ' ') { if (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation)) { PRectangle rcSpace( ll->positions[cpos + ts.start] + xStart - static_cast(subLineStart), rcSegment.top, ll->positions[cpos + ts.start + 1] + xStart - static_cast(subLineStart), rcSegment.bottom); surface->FillRectangle(rcSpace, vsDraw.whitespaceColours.back); } } else { inIndentation = false; } } } } } else if (rcSegment.left > rcLine.right) { break; } } } static void DrawEdgeLine(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, Range lineRange, int xStart) { if (vsDraw.edgeState == EDGE_LINE) { PRectangle rcSegment = rcLine; int edgeX = static_cast(vsDraw.theEdge.column * vsDraw.spaceWidth); rcSegment.left = static_cast(edgeX + xStart); if ((ll->wrapIndent != 0) && (lineRange.start != 0)) rcSegment.left -= ll->wrapIndent; rcSegment.right = rcSegment.left + 1; surface->FillRectangle(rcSegment, vsDraw.theEdge.colour); } else if (vsDraw.edgeState == EDGE_MULTILINE) { for (size_t edge = 0; edge < vsDraw.theMultiEdge.size(); edge++) { if (vsDraw.theMultiEdge[edge].column >= 0) { PRectangle rcSegment = rcLine; int edgeX = static_cast(vsDraw.theMultiEdge[edge].column * vsDraw.spaceWidth); rcSegment.left = static_cast(edgeX + xStart); if ((ll->wrapIndent != 0) && (lineRange.start != 0)) rcSegment.left -= ll->wrapIndent; rcSegment.right = rcSegment.left + 1; surface->FillRectangle(rcSegment, vsDraw.theMultiEdge[edge].colour); } } } } // Draw underline mark as part of background if not transparent static void DrawMarkUnderline(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, int line, PRectangle rcLine) { int marks = model.pdoc->GetMark(line); for (int markBit = 0; (markBit < 32) && marks; markBit++) { if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE) && (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { PRectangle rcUnderline = rcLine; rcUnderline.top = rcUnderline.bottom - 2; surface->FillRectangle(rcUnderline, vsDraw.markers[markBit].back); } marks >>= 1; } } static void DrawTranslucentSelection(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, PRectangle rcLine, int subLine, Range lineRange, int xStart) { if ((vsDraw.selAlpha != SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha != SC_ALPHA_NOALPHA)) { const int posLineStart = model.pdoc->LineStart(line); const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; // For each selection draw int virtualSpaces = 0; if (subLine == (ll->lines - 1)) { virtualSpaces = model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)); } SelectionPosition posStart(posLineStart + lineRange.start); SelectionPosition posEnd(posLineStart + lineRange.end, virtualSpaces); SelectionSegment virtualSpaceRange(posStart, posEnd); for (size_t r = 0; r < model.sel.Count(); r++) { int alpha = (r == model.sel.Main()) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; if (alpha != SC_ALPHA_NOALPHA) { SelectionSegment portion = model.sel.Range(r).Intersect(virtualSpaceRange); if (!portion.Empty()) { const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; PRectangle rcSegment = rcLine; rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - static_cast(subLineStart)+portion.start.VirtualSpace() * spaceWidth; rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - static_cast(subLineStart)+portion.end.VirtualSpace() * spaceWidth; if ((ll->wrapIndent != 0) && (lineRange.start != 0)) { if ((portion.start.Position() - posLineStart) == lineRange.start && model.sel.Range(r).ContainsCharacter(portion.start.Position() - 1)) rcSegment.left -= static_cast(ll->wrapIndent); // indentation added to xStart was truncated to int, so we do the same here } rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; if (rcSegment.right > rcLine.left) SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection), alpha); } } } } } // Draw any translucent whole line states static void DrawTranslucentLineState(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, PRectangle rcLine) { if ((model.caret.active || vsDraw.alwaysShowCaretLineBackground) && vsDraw.showCaretLineBackground && ll->containsCaret) { SimpleAlphaRectangle(surface, rcLine, vsDraw.caretLineBackground, vsDraw.caretLineAlpha); } const int marksOfLine = model.pdoc->GetMark(line); int marksDrawnInText = marksOfLine & vsDraw.maskDrawInText; for (int markBit = 0; (markBit < 32) && marksDrawnInText; markBit++) { if (marksDrawnInText & 1) { if (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND) { SimpleAlphaRectangle(surface, rcLine, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); } else if (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE) { PRectangle rcUnderline = rcLine; rcUnderline.top = rcUnderline.bottom - 2; SimpleAlphaRectangle(surface, rcUnderline, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); } } marksDrawnInText >>= 1; } int marksDrawnInLine = marksOfLine & vsDraw.maskInLine; for (int markBit = 0; (markBit < 32) && marksDrawnInLine; markBit++) { if (marksDrawnInLine & 1) { SimpleAlphaRectangle(surface, rcLine, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); } marksDrawnInLine >>= 1; } } void EditView::DrawForeground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int lineVisible, PRectangle rcLine, Range lineRange, int posLineStart, int xStart, int subLine, ColourOptional background) { const bool selBackDrawn = vsDraw.SelectionBackgroundDrawn(); const bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background.isSet; bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; const XYPOSITION indentWidth = model.pdoc->IndentSize() * vsDraw.spaceWidth; // Does not take margin into account but not significant const int xStartVisible = static_cast(subLineStart)-xStart; // Foreground drawing loop BreakFinder bfFore(ll, &model.sel, lineRange, posLineStart, xStartVisible, (((phasesDraw == phasesOne) && selBackDrawn) || vsDraw.selColours.fore.isSet), model.pdoc, &model.reprs, &vsDraw); while (bfFore.More()) { const TextSegment ts = bfFore.Next(); const int i = ts.end() - 1; const int iDoc = i + posLineStart; PRectangle rcSegment = rcLine; rcSegment.left = ll->positions[ts.start] + xStart - static_cast(subLineStart); rcSegment.right = ll->positions[ts.end()] + xStart - static_cast(subLineStart); // Only try to draw if really visible - enhances performance by not calling environment to // draw strings that are completely past the right side of the window. if (rcSegment.Intersects(rcLine)) { int styleMain = ll->styles[i]; ColourDesired textFore = vsDraw.styles[styleMain].fore; FontAlias textFont = vsDraw.styles[styleMain].font; //hotspot foreground const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); if (inHotspot) { if (vsDraw.hotspotColours.fore.isSet) textFore = vsDraw.hotspotColours.fore; } if (vsDraw.indicatorsSetFore > 0) { // At least one indicator sets the text colour so see if it applies to this segment for (Decoration *deco = model.pdoc->decorations.root; deco; deco = deco->next) { const int indicatorValue = deco->rs.ValueAt(ts.start + posLineStart); if (indicatorValue) { const Indicator &indicator = vsDraw.indicators[deco->indicator]; const bool hover = indicator.IsDynamic() && ((model.hoverIndicatorPos >= ts.start + posLineStart) && (model.hoverIndicatorPos <= ts.end() + posLineStart)); if (hover) { if (indicator.sacHover.style == INDIC_TEXTFORE) { textFore = indicator.sacHover.fore; } } else { if (indicator.sacNormal.style == INDIC_TEXTFORE) { if (indicator.Flags() & SC_INDICFLAG_VALUEFORE) textFore = indicatorValue & SC_INDICVALUEMASK; else textFore = indicator.sacNormal.fore; } } } } } const int inSelection = hideSelection ? 0 : model.sel.CharacterInSelection(iDoc); if (inSelection && (vsDraw.selColours.fore.isSet)) { textFore = (inSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; } ColourDesired textBack = TextBackground(model, vsDraw, ll, background, inSelection, inHotspot, styleMain, i); if (ts.representation) { if (ll->chars[i] == '\t') { // Tab display if (phasesDraw == phasesOne) { if (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation)) textBack = vsDraw.whitespaceColours.back; surface->FillRectangle(rcSegment, textBack); } if (inIndentation && vsDraw.viewIndentationGuides == ivReal) { for (int indentCount = static_cast((ll->positions[i] + epsilon) / indentWidth); indentCount <= (ll->positions[i + 1] - epsilon) / indentWidth; indentCount++) { if (indentCount > 0) { int xIndent = static_cast(indentCount * indentWidth); DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment, (ll->xHighlightGuide == xIndent)); } } } if (vsDraw.viewWhitespace != wsInvisible) { if (vsDraw.WhiteSpaceVisible(inIndentation)) { if (vsDraw.whitespaceColours.fore.isSet) textFore = vsDraw.whitespaceColours.fore; surface->PenColour(textFore); PRectangle rcTab(rcSegment.left + 1, rcSegment.top + tabArrowHeight, rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); if (customDrawTabArrow == NULL) DrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2), vsDraw); else customDrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2)); } } } else { inIndentation = false; if (vsDraw.controlCharSymbol >= 32) { // Using one font for all control characters so it can be controlled independently to ensure // the box goes around the characters tightly. Seems to be no way to work out what height // is taken by an individual character - internal leading gives varying results. FontAlias ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; char cc[2] = { static_cast(vsDraw.controlCharSymbol), '\0' }; surface->DrawTextNoClip(rcSegment, ctrlCharsFont, rcSegment.top + vsDraw.maxAscent, cc, 1, textBack, textFore); } else { DrawTextBlob(surface, vsDraw, rcSegment, ts.representation->stringRep.c_str(), textBack, textFore, phasesDraw == phasesOne); } } } else { // Normal text display if (vsDraw.styles[styleMain].visible) { if (phasesDraw != phasesOne) { surface->DrawTextTransparent(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, ll->chars + ts.start, i - ts.start + 1, textFore); } else { surface->DrawTextNoClip(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, ll->chars + ts.start, i - ts.start + 1, textFore, textBack); } } if (vsDraw.viewWhitespace != wsInvisible || (inIndentation && vsDraw.viewIndentationGuides != ivNone)) { for (int cpos = 0; cpos <= i - ts.start; cpos++) { if (ll->chars[cpos + ts.start] == ' ') { if (vsDraw.viewWhitespace != wsInvisible) { if (vsDraw.whitespaceColours.fore.isSet) textFore = vsDraw.whitespaceColours.fore; if (vsDraw.WhiteSpaceVisible(inIndentation)) { XYPOSITION xmid = (ll->positions[cpos + ts.start] + ll->positions[cpos + ts.start + 1]) / 2; if ((phasesDraw == phasesOne) && drawWhitespaceBackground) { textBack = vsDraw.whitespaceColours.back; PRectangle rcSpace( ll->positions[cpos + ts.start] + xStart - static_cast(subLineStart), rcSegment.top, ll->positions[cpos + ts.start + 1] + xStart - static_cast(subLineStart), rcSegment.bottom); surface->FillRectangle(rcSpace, textBack); } const int halfDotWidth = vsDraw.whitespaceSize / 2; PRectangle rcDot(xmid + xStart - halfDotWidth - static_cast(subLineStart), rcSegment.top + vsDraw.lineHeight / 2, 0.0f, 0.0f); rcDot.right = rcDot.left + vsDraw.whitespaceSize; rcDot.bottom = rcDot.top + vsDraw.whitespaceSize; surface->FillRectangle(rcDot, textFore); } } if (inIndentation && vsDraw.viewIndentationGuides == ivReal) { for (int indentCount = static_cast((ll->positions[cpos + ts.start] + epsilon) / indentWidth); indentCount <= (ll->positions[cpos + ts.start + 1] - epsilon) / indentWidth; indentCount++) { if (indentCount > 0) { int xIndent = static_cast(indentCount * indentWidth); DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment, (ll->xHighlightGuide == xIndent)); } } } } else { inIndentation = false; } } } } if (ll->hotspot.Valid() && vsDraw.hotspotUnderline && ll->hotspot.ContainsCharacter(iDoc)) { PRectangle rcUL = rcSegment; rcUL.top = rcUL.top + vsDraw.maxAscent + 1; rcUL.bottom = rcUL.top + 1; if (vsDraw.hotspotColours.fore.isSet) surface->FillRectangle(rcUL, vsDraw.hotspotColours.fore); else surface->FillRectangle(rcUL, textFore); } else if (vsDraw.styles[styleMain].underline) { PRectangle rcUL = rcSegment; rcUL.top = rcUL.top + vsDraw.maxAscent + 1; rcUL.bottom = rcUL.top + 1; surface->FillRectangle(rcUL, textFore); } } else if (rcSegment.left > rcLine.right) { break; } } } void EditView::DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int lineVisible, PRectangle rcLine, int xStart, int subLine) { if ((vsDraw.viewIndentationGuides == ivLookForward || vsDraw.viewIndentationGuides == ivLookBoth) && (subLine == 0)) { const int posLineStart = model.pdoc->LineStart(line); int indentSpace = model.pdoc->GetLineIndentation(line); int xStartText = static_cast(ll->positions[model.pdoc->GetLineIndentPosition(line) - posLineStart]); // Find the most recent line with some text int lineLastWithText = line; while (lineLastWithText > Platform::Maximum(line - 20, 0) && model.pdoc->IsWhiteLine(lineLastWithText)) { lineLastWithText--; } if (lineLastWithText < line) { xStartText = 100000; // Don't limit to visible indentation on empty line // This line is empty, so use indentation of last line with text int indentLastWithText = model.pdoc->GetLineIndentation(lineLastWithText); int isFoldHeader = model.pdoc->GetLevel(lineLastWithText) & SC_FOLDLEVELHEADERFLAG; if (isFoldHeader) { // Level is one more level than parent indentLastWithText += model.pdoc->IndentSize(); } if (vsDraw.viewIndentationGuides == ivLookForward) { // In viLookForward mode, previous line only used if it is a fold header if (isFoldHeader) { indentSpace = Platform::Maximum(indentSpace, indentLastWithText); } } else { // viLookBoth indentSpace = Platform::Maximum(indentSpace, indentLastWithText); } } int lineNextWithText = line; while (lineNextWithText < Platform::Minimum(line + 20, model.pdoc->LinesTotal()) && model.pdoc->IsWhiteLine(lineNextWithText)) { lineNextWithText++; } if (lineNextWithText > line) { xStartText = 100000; // Don't limit to visible indentation on empty line // This line is empty, so use indentation of first next line with text indentSpace = Platform::Maximum(indentSpace, model.pdoc->GetLineIndentation(lineNextWithText)); } for (int indentPos = model.pdoc->IndentSize(); indentPos < indentSpace; indentPos += model.pdoc->IndentSize()) { int xIndent = static_cast(indentPos * vsDraw.spaceWidth); if (xIndent < xStartText) { DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcLine, (ll->xHighlightGuide == xIndent)); } } } } void EditView::DrawLine(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int lineVisible, int xStart, PRectangle rcLine, int subLine, DrawPhase phase) { if (subLine >= ll->lines) { DrawAnnotation(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, phase); return; // No further drawing } // See if something overrides the line background color. const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); const int posLineStart = model.pdoc->LineStart(line); const Range lineRange = ll->SubLineRange(subLine); const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; if ((ll->wrapIndent != 0) && (subLine > 0)) { if (phase & drawBack) { DrawWrapIndentAndMarker(surface, vsDraw, ll, xStart, rcLine, background, customDrawWrapMarker); } xStart += static_cast(ll->wrapIndent); } if ((phasesDraw != phasesOne) && (phase & drawBack)) { DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart, subLine, background); DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end, xStart, subLine, subLineStart, background); } if (phase & drawIndicatorsBack) { DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true, model.hoverIndicatorPos); DrawEdgeLine(surface, vsDraw, ll, rcLine, lineRange, xStart); DrawMarkUnderline(surface, model, vsDraw, line, rcLine); } if (phase & drawText) { DrawForeground(surface, model, vsDraw, ll, lineVisible, rcLine, lineRange, posLineStart, xStart, subLine, background); } if (phase & drawIndentationGuides) { DrawIndentGuidesOverEmpty(surface, model, vsDraw, ll, line, lineVisible, rcLine, xStart, subLine); } if (phase & drawIndicatorsFore) { DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, false, model.hoverIndicatorPos); } // End of the drawing of the current line if (phasesDraw == phasesOne) { DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end, xStart, subLine, subLineStart, background); } DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, phase); if (!hideSelection && (phase & drawSelectionTranslucent)) { DrawTranslucentSelection(surface, model, vsDraw, ll, line, rcLine, subLine, lineRange, xStart); } if (phase & drawLineTranslucent) { DrawTranslucentLineState(surface, model, vsDraw, ll, line, rcLine); } } static void DrawFoldLines(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, int line, PRectangle rcLine) { bool expanded = model.cs.GetExpanded(line); const int level = model.pdoc->GetLevel(line); const int levelNext = model.pdoc->GetLevel(line + 1); if ((level & SC_FOLDLEVELHEADERFLAG) && (LevelNumber(level) < LevelNumber(levelNext))) { // Paint the line above the fold if ((expanded && (model.foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED)) || (!expanded && (model.foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) { PRectangle rcFoldLine = rcLine; rcFoldLine.bottom = rcFoldLine.top + 1; surface->FillRectangle(rcFoldLine, vsDraw.styles[STYLE_DEFAULT].fore); } // Paint the line below the fold if ((expanded && (model.foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED)) || (!expanded && (model.foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { PRectangle rcFoldLine = rcLine; rcFoldLine.top = rcFoldLine.bottom - 1; surface->FillRectangle(rcFoldLine, vsDraw.styles[STYLE_DEFAULT].fore); } } } void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectangle rcArea, PRectangle rcClient, const ViewStyle &vsDraw) { // Allow text at start of line to overlap 1 pixel into the margin as this displays // serifs and italic stems for aliased text. const int leftTextOverlap = ((model.xOffset == 0) && (vsDraw.leftMarginWidth > 0)) ? 1 : 0; // Do the painting if (rcArea.right > vsDraw.textStart - leftTextOverlap) { Surface *surface = surfaceWindow; if (bufferedDraw) { surface = pixmapLine; PLATFORM_ASSERT(pixmapLine->Initialised()); } surface->SetUnicodeMode(SC_CP_UTF8 == model.pdoc->dbcsCodePage); surface->SetDBCSMode(model.pdoc->dbcsCodePage); const Point ptOrigin = model.GetVisibleOriginInMain(); const int screenLinePaintFirst = static_cast(rcArea.top) / vsDraw.lineHeight; const int xStart = vsDraw.textStart - model.xOffset + static_cast(ptOrigin.x); SelectionPosition posCaret = model.sel.RangeMain().caret; if (model.posDrag.IsValid()) posCaret = model.posDrag; const int lineCaret = model.pdoc->LineFromPosition(posCaret.Position()); PRectangle rcTextArea = rcClient; if (vsDraw.marginInside) { rcTextArea.left += vsDraw.textStart; rcTextArea.right -= vsDraw.rightMarginWidth; } else { rcTextArea = rcArea; } // Remove selection margin from drawing area so text will not be drawn // on it in unbuffered mode. if (!bufferedDraw && vsDraw.marginInside) { PRectangle rcClipText = rcTextArea; rcClipText.left -= leftTextOverlap; surfaceWindow->SetClip(rcClipText); } // Loop on visible lines //double durLayout = 0.0; //double durPaint = 0.0; //double durCopy = 0.0; //ElapsedTime etWhole; const bool bracesIgnoreStyle = ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACELIGHT)) || (vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACEBAD))); int lineDocPrevious = -1; // Used to avoid laying out one document line multiple times AutoLineLayout ll(llc, 0); std::vector phases; if ((phasesDraw == phasesMultiple) && !bufferedDraw) { for (DrawPhase phase = drawBack; phase <= drawCarets; phase = static_cast(phase * 2)) { phases.push_back(phase); } } else { phases.push_back(drawAll); } for (std::vector::iterator it = phases.begin(); it != phases.end(); ++it) { int ypos = 0; if (!bufferedDraw) ypos += screenLinePaintFirst * vsDraw.lineHeight; int yposScreen = screenLinePaintFirst * vsDraw.lineHeight; int visibleLine = model.TopLineOfMain() + screenLinePaintFirst; while (visibleLine < model.cs.LinesDisplayed() && yposScreen < rcArea.bottom) { const int lineDoc = model.cs.DocFromDisplay(visibleLine); // Only visible lines should be handled by the code within the loop PLATFORM_ASSERT(model.cs.GetVisible(lineDoc)); const int lineStartSet = model.cs.DisplayFromDoc(lineDoc); const int subLine = visibleLine - lineStartSet; // Copy this line and its styles from the document into local arrays // and determine the x position at which each character starts. //ElapsedTime et; if (lineDoc != lineDocPrevious) { ll.Set(0); ll.Set(RetrieveLineLayout(lineDoc, model)); LayoutLine(model, lineDoc, surface, vsDraw, ll, model.wrapWidth); lineDocPrevious = lineDoc; } //durLayout += et.Duration(true); if (ll) { ll->containsCaret = !hideSelection && (lineDoc == lineCaret); ll->hotspot = model.GetHotSpotRange(); PRectangle rcLine = rcTextArea; rcLine.top = static_cast(ypos); rcLine.bottom = static_cast(ypos + vsDraw.lineHeight); Range rangeLine(model.pdoc->LineStart(lineDoc), model.pdoc->LineStart(lineDoc + 1)); // Highlight the current braces if any ll->SetBracesHighlight(rangeLine, model.braces, static_cast(model.bracesMatchStyle), static_cast(model.highlightGuideColumn * vsDraw.spaceWidth), bracesIgnoreStyle); if (leftTextOverlap && (bufferedDraw || ((phasesDraw < phasesMultiple) && (*it & drawBack)))) { // Clear the left margin PRectangle rcSpacer = rcLine; rcSpacer.right = rcSpacer.left; rcSpacer.left -= 1; surface->FillRectangle(rcSpacer, vsDraw.styles[STYLE_DEFAULT].back); } DrawLine(surface, model, vsDraw, ll, lineDoc, visibleLine, xStart, rcLine, subLine, *it); //durPaint += et.Duration(true); // Restore the previous styles for the brace highlights in case layout is in cache. ll->RestoreBracesHighlight(rangeLine, model.braces, bracesIgnoreStyle); if (*it & drawFoldLines) { DrawFoldLines(surface, model, vsDraw, lineDoc, rcLine); } if (*it & drawCarets) { DrawCarets(surface, model, vsDraw, ll, lineDoc, xStart, rcLine, subLine); } if (bufferedDraw) { Point from = Point::FromInts(vsDraw.textStart - leftTextOverlap, 0); PRectangle rcCopyArea = PRectangle::FromInts(vsDraw.textStart - leftTextOverlap, yposScreen, static_cast(rcClient.right - vsDraw.rightMarginWidth), yposScreen + vsDraw.lineHeight); surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); } lineWidthMaxSeen = Platform::Maximum( lineWidthMaxSeen, static_cast(ll->positions[ll->numCharsInLine])); //durCopy += et.Duration(true); } if (!bufferedDraw) { ypos += vsDraw.lineHeight; } yposScreen += vsDraw.lineHeight; visibleLine++; } } ll.Set(0); //if (durPaint < 0.00000001) // durPaint = 0.00000001; // Right column limit indicator PRectangle rcBeyondEOF = (vsDraw.marginInside) ? rcClient : rcArea; rcBeyondEOF.left = static_cast(vsDraw.textStart); rcBeyondEOF.right = rcBeyondEOF.right - ((vsDraw.marginInside) ? vsDraw.rightMarginWidth : 0); rcBeyondEOF.top = static_cast((model.cs.LinesDisplayed() - model.TopLineOfMain()) * vsDraw.lineHeight); if (rcBeyondEOF.top < rcBeyondEOF.bottom) { surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.styles[STYLE_DEFAULT].back); if (vsDraw.edgeState == EDGE_LINE) { int edgeX = static_cast(vsDraw.theEdge.column * vsDraw.spaceWidth); rcBeyondEOF.left = static_cast(edgeX + xStart); rcBeyondEOF.right = rcBeyondEOF.left + 1; surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.theEdge.colour); } else if (vsDraw.edgeState == EDGE_MULTILINE) { for (size_t edge = 0; edge < vsDraw.theMultiEdge.size(); edge++) { if (vsDraw.theMultiEdge[edge].column >= 0) { int edgeX = static_cast(vsDraw.theMultiEdge[edge].column * vsDraw.spaceWidth); rcBeyondEOF.left = static_cast(edgeX + xStart); rcBeyondEOF.right = rcBeyondEOF.left + 1; surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.theMultiEdge[edge].colour); } } } } //Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset); //Platform::DebugPrintf( //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", //durLayout, durPaint, durLayout / durPaint, durCopy, etWhole.Duration()); } } void EditView::FillLineRemainder(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, PRectangle rcArea, int subLine) { int eolInSelection = 0; int alpha = SC_ALPHA_NOALPHA; if (!hideSelection) { int posAfterLineEnd = model.pdoc->LineStart(line + 1); eolInSelection = (subLine == (ll->lines - 1)) ? model.sel.InSelectionForEOL(posAfterLineEnd) : 0; alpha = (eolInSelection == 1) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; } ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); if (eolInSelection && vsDraw.selEOLFilled && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha == SC_ALPHA_NOALPHA)) { surface->FillRectangle(rcArea, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection)); } else { if (background.isSet) { surface->FillRectangle(rcArea, background); } else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) { surface->FillRectangle(rcArea, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); } else { surface->FillRectangle(rcArea, vsDraw.styles[STYLE_DEFAULT].back); } if (eolInSelection && vsDraw.selEOLFilled && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { SimpleAlphaRectangle(surface, rcArea, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); } } } // Space (3 space characters) between line numbers and text when printing. #define lineNumberPrintSpace " " static ColourDesired InvertedLight(ColourDesired orig) { unsigned int r = orig.GetRed(); unsigned int g = orig.GetGreen(); unsigned int b = orig.GetBlue(); unsigned int l = (r + g + b) / 3; // There is a better calculation for this that matches human eye unsigned int il = 0xff - l; if (l == 0) return ColourDesired(0xff, 0xff, 0xff); r = r * il / l; g = g * il / l; b = b * il / l; return ColourDesired(Platform::Minimum(r, 0xff), Platform::Minimum(g, 0xff), Platform::Minimum(b, 0xff)); } long EditView::FormatRange(bool draw, Sci_RangeToFormat *pfr, Surface *surface, Surface *surfaceMeasure, const EditModel &model, const ViewStyle &vs) { // Can't use measurements cached for screen posCache.Clear(); ViewStyle vsPrint(vs); vsPrint.technology = SC_TECHNOLOGY_DEFAULT; // Modify the view style for printing as do not normally want any of the transient features to be printed // Printing supports only the line number margin. int lineNumberIndex = -1; for (size_t margin = 0; margin < vs.ms.size(); margin++) { if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) { lineNumberIndex = static_cast(margin); } else { vsPrint.ms[margin].width = 0; } } vsPrint.fixedColumnWidth = 0; vsPrint.zoomLevel = printParameters.magnification; // Don't show indentation guides // If this ever gets changed, cached pixmap would need to be recreated if technology != SC_TECHNOLOGY_DEFAULT vsPrint.viewIndentationGuides = ivNone; // Don't show the selection when printing vsPrint.selColours.back.isSet = false; vsPrint.selColours.fore.isSet = false; vsPrint.selAlpha = SC_ALPHA_NOALPHA; vsPrint.selAdditionalAlpha = SC_ALPHA_NOALPHA; vsPrint.whitespaceColours.back.isSet = false; vsPrint.whitespaceColours.fore.isSet = false; vsPrint.showCaretLineBackground = false; vsPrint.alwaysShowCaretLineBackground = false; // Don't highlight matching braces using indicators vsPrint.braceHighlightIndicatorSet = false; vsPrint.braceBadLightIndicatorSet = false; // Set colours for printing according to users settings for (size_t sty = 0; sty < vsPrint.styles.size(); sty++) { if (printParameters.colourMode == SC_PRINT_INVERTLIGHT) { vsPrint.styles[sty].fore = InvertedLight(vsPrint.styles[sty].fore); vsPrint.styles[sty].back = InvertedLight(vsPrint.styles[sty].back); } else if (printParameters.colourMode == SC_PRINT_BLACKONWHITE) { vsPrint.styles[sty].fore = ColourDesired(0, 0, 0); vsPrint.styles[sty].back = ColourDesired(0xff, 0xff, 0xff); } else if (printParameters.colourMode == SC_PRINT_COLOURONWHITE) { vsPrint.styles[sty].back = ColourDesired(0xff, 0xff, 0xff); } else if (printParameters.colourMode == SC_PRINT_COLOURONWHITEDEFAULTBG) { if (sty <= STYLE_DEFAULT) { vsPrint.styles[sty].back = ColourDesired(0xff, 0xff, 0xff); } } } // White background for the line numbers vsPrint.styles[STYLE_LINENUMBER].back = ColourDesired(0xff, 0xff, 0xff); // Printing uses different margins, so reset screen margins vsPrint.leftMarginWidth = 0; vsPrint.rightMarginWidth = 0; vsPrint.Refresh(*surfaceMeasure, model.pdoc->tabInChars); // Determining width must happen after fonts have been realised in Refresh int lineNumberWidth = 0; if (lineNumberIndex >= 0) { lineNumberWidth = static_cast(surfaceMeasure->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, "99999" lineNumberPrintSpace, 5 + static_cast(strlen(lineNumberPrintSpace)))); vsPrint.ms[lineNumberIndex].width = lineNumberWidth; vsPrint.Refresh(*surfaceMeasure, model.pdoc->tabInChars); // Recalculate fixedColumnWidth } int linePrintStart = model.pdoc->LineFromPosition(static_cast(pfr->chrg.cpMin)); int linePrintLast = linePrintStart + (pfr->rc.bottom - pfr->rc.top) / vsPrint.lineHeight - 1; if (linePrintLast < linePrintStart) linePrintLast = linePrintStart; int linePrintMax = model.pdoc->LineFromPosition(static_cast(pfr->chrg.cpMax)); if (linePrintLast > linePrintMax) linePrintLast = linePrintMax; //Platform::DebugPrintf("Formatting lines=[%0d,%0d,%0d] top=%0d bottom=%0d line=%0d %0d\n", // linePrintStart, linePrintLast, linePrintMax, pfr->rc.top, pfr->rc.bottom, vsPrint.lineHeight, // surfaceMeasure->Height(vsPrint.styles[STYLE_LINENUMBER].font)); int endPosPrint = model.pdoc->Length(); if (linePrintLast < model.pdoc->LinesTotal()) endPosPrint = model.pdoc->LineStart(linePrintLast + 1); // Ensure we are styled to where we are formatting. model.pdoc->EnsureStyledTo(endPosPrint); int xStart = vsPrint.fixedColumnWidth + pfr->rc.left; int ypos = pfr->rc.top; int lineDoc = linePrintStart; int nPrintPos = static_cast(pfr->chrg.cpMin); int visibleLine = 0; int widthPrint = pfr->rc.right - pfr->rc.left - vsPrint.fixedColumnWidth; if (printParameters.wrapState == eWrapNone) widthPrint = LineLayout::wrapWidthInfinite; while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) { // When printing, the hdc and hdcTarget may be the same, so // changing the state of surfaceMeasure may change the underlying // state of surface. Therefore, any cached state is discarded before // using each surface. surfaceMeasure->FlushCachedState(); // Copy this line and its styles from the document into local arrays // and determine the x position at which each character starts. LineLayout ll(model.pdoc->LineStart(lineDoc + 1) - model.pdoc->LineStart(lineDoc) + 1); LayoutLine(model, lineDoc, surfaceMeasure, vsPrint, &ll, widthPrint); ll.containsCaret = false; PRectangle rcLine = PRectangle::FromInts( pfr->rc.left, ypos, pfr->rc.right - 1, ypos + vsPrint.lineHeight); // When document line is wrapped over multiple display lines, find where // to start printing from to ensure a particular position is on the first // line of the page. if (visibleLine == 0) { int startWithinLine = nPrintPos - model.pdoc->LineStart(lineDoc); for (int iwl = 0; iwl < ll.lines - 1; iwl++) { if (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) { visibleLine = -iwl; } } if (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) { visibleLine = -(ll.lines - 1); } } if (draw && lineNumberWidth && (ypos + vsPrint.lineHeight <= pfr->rc.bottom) && (visibleLine >= 0)) { char number[100]; sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1); PRectangle rcNumber = rcLine; rcNumber.right = rcNumber.left + lineNumberWidth; // Right justify rcNumber.left = rcNumber.right - surfaceMeasure->WidthText( vsPrint.styles[STYLE_LINENUMBER].font, number, static_cast(strlen(number))); surface->FlushCachedState(); surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, static_cast(ypos + vsPrint.maxAscent), number, static_cast(strlen(number)), vsPrint.styles[STYLE_LINENUMBER].fore, vsPrint.styles[STYLE_LINENUMBER].back); } // Draw the line surface->FlushCachedState(); for (int iwl = 0; iwl < ll.lines; iwl++) { if (ypos + vsPrint.lineHeight <= pfr->rc.bottom) { if (visibleLine >= 0) { if (draw) { rcLine.top = static_cast(ypos); rcLine.bottom = static_cast(ypos + vsPrint.lineHeight); DrawLine(surface, model, vsPrint, &ll, lineDoc, visibleLine, xStart, rcLine, iwl, drawAll); } ypos += vsPrint.lineHeight; } visibleLine++; if (iwl == ll.lines - 1) nPrintPos = model.pdoc->LineStart(lineDoc + 1); else nPrintPos += ll.LineStart(iwl + 1) - ll.LineStart(iwl); } } ++lineDoc; } // Clear cache so measurements are not used for screen posCache.Clear(); return nPrintPos; } sqlitebrowser-3.11.2/libs/qscintilla/src/EditView.h000066400000000000000000000161361345112435200222660ustar00rootroot00000000000000// Scintilla source code edit control /** @file EditView.h ** Defines the appearance of the main text area of the editor window. **/ // Copyright 1998-2014 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef EDITVIEW_H #define EDITVIEW_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif struct PrintParameters { int magnification; int colourMode; WrapMode wrapState; PrintParameters(); }; /** * The view may be drawn in separate phases. */ enum DrawPhase { drawBack = 0x1, drawIndicatorsBack = 0x2, drawText = 0x4, drawIndentationGuides = 0x8, drawIndicatorsFore = 0x10, drawSelectionTranslucent = 0x20, drawLineTranslucent = 0x40, drawFoldLines = 0x80, drawCarets = 0x100, drawAll = 0x1FF }; bool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st); int WidestLineWidth(Surface *surface, const ViewStyle &vs, int styleOffset, const StyledText &st); void DrawTextNoClipPhase(Surface *surface, PRectangle rc, const Style &style, XYPOSITION ybase, const char *s, int len, DrawPhase phase); void DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText, const StyledText &st, size_t start, size_t length, DrawPhase phase); typedef void (*DrawTabArrowFn)(Surface *surface, PRectangle rcTab, int ymid); /** * EditView draws the main text area. */ class EditView { public: PrintParameters printParameters; PerLine *ldTabstops; int tabWidthMinimumPixels; bool hideSelection; bool drawOverstrikeCaret; /** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to * the screen. This avoids flashing but is about 30% slower. */ bool bufferedDraw; /** In phasesTwo mode, drawing is performed in two phases, first the background * and then the foreground. This avoids chopping off characters that overlap the next run. * In multiPhaseDraw mode, drawing is performed in multiple phases with each phase drawing * one feature over the whole drawing area, instead of within one line. This allows text to * overlap from one line to the next. */ enum PhasesDraw { phasesOne, phasesTwo, phasesMultiple }; PhasesDraw phasesDraw; int lineWidthMaxSeen; bool additionalCaretsBlink; bool additionalCaretsVisible; bool imeCaretBlockOverride; Surface *pixmapLine; Surface *pixmapIndentGuide; Surface *pixmapIndentGuideHighlight; LineLayoutCache llc; PositionCache posCache; int tabArrowHeight; // draw arrow heads this many pixels above/below line midpoint /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native * DrawTabArrow function for drawing tab characters. Allow those platforms to * override it instead of creating a new method in the Surface class that * existing platforms must implement as empty. */ DrawTabArrowFn customDrawTabArrow; DrawWrapMarkerFn customDrawWrapMarker; EditView(); virtual ~EditView(); bool SetTwoPhaseDraw(bool twoPhaseDraw); bool SetPhasesDraw(int phases); bool LinesOverlap() const; void ClearAllTabstops(); XYPOSITION NextTabstopPos(int line, XYPOSITION x, XYPOSITION tabWidth) const; bool ClearTabstops(int line); bool AddTabstop(int line, int x); int GetNextTabstop(int line, int x) const; void LinesAddedOrRemoved(int lineOfPos, int linesAdded); void DropGraphics(bool freeObjects); void AllocateGraphics(const ViewStyle &vsDraw); void RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw); LineLayout *RetrieveLineLayout(int lineNumber, const EditModel &model); void LayoutLine(const EditModel &model, int line, Surface *surface, const ViewStyle &vstyle, LineLayout *ll, int width = LineLayout::wrapWidthInfinite); Point LocationFromPosition(Surface *surface, const EditModel &model, SelectionPosition pos, int topLine, const ViewStyle &vs, PointEnd pe); Range RangeDisplayLine(Surface *surface, const EditModel &model, int lineVisible, const ViewStyle &vs); SelectionPosition SPositionFromLocation(Surface *surface, const EditModel &model, PointDocument pt, bool canReturnInvalid, bool charPosition, bool virtualSpace, const ViewStyle &vs); SelectionPosition SPositionFromLineX(Surface *surface, const EditModel &model, int lineDoc, int x, const ViewStyle &vs); int DisplayFromPosition(Surface *surface, const EditModel &model, int pos, const ViewStyle &vs); int StartEndDisplayLine(Surface *surface, const EditModel &model, int pos, bool start, const ViewStyle &vs); void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight); void DrawEOL(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart, ColourOptional background); void DrawFoldDisplayText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int xStart, PRectangle rcLine, int subLine, XYACCUMULATOR subLineStart, DrawPhase phase); void DrawAnnotation(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int xStart, PRectangle rcLine, int subLine, DrawPhase phase); void DrawCarets(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int xStart, PRectangle rcLine, int subLine) const; void DrawBackground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, Range lineRange, int posLineStart, int xStart, int subLine, ColourOptional background) const; void DrawForeground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int lineVisible, PRectangle rcLine, Range lineRange, int posLineStart, int xStart, int subLine, ColourOptional background); void DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int lineVisible, PRectangle rcLine, int xStart, int subLine); void DrawLine(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, int lineVisible, int xStart, PRectangle rcLine, int subLine, DrawPhase phase); void PaintText(Surface *surfaceWindow, const EditModel &model, PRectangle rcArea, PRectangle rcClient, const ViewStyle &vsDraw); void FillLineRemainder(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, int line, PRectangle rcArea, int subLine); long FormatRange(bool draw, Sci_RangeToFormat *pfr, Surface *surface, Surface *surfaceMeasure, const EditModel &model, const ViewStyle &vs); }; /** * Convenience class to ensure LineLayout objects are always disposed. */ class AutoLineLayout { LineLayoutCache &llc; LineLayout *ll; AutoLineLayout &operator=(const AutoLineLayout &); public: AutoLineLayout(LineLayoutCache &llc_, LineLayout *ll_) : llc(llc_), ll(ll_) {} ~AutoLineLayout() { llc.Dispose(ll); ll = 0; } LineLayout *operator->() const { return ll; } operator LineLayout *() const { return ll; } void Set(LineLayout *ll_) { llc.Dispose(ll); ll = ll_; } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Editor.cpp000066400000000000000000007266101345112435200223340ustar00rootroot00000000000000// Scintilla source code edit control /** @file Editor.cxx ** Main code for the edit control. **/ // Copyright 1998-2011 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #include #include #include #include "Platform.h" #include "ILexer.h" #include "Scintilla.h" #include "StringCopy.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "ContractionState.h" #include "CellBuffer.h" #include "PerLine.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #include "CharClassify.h" #include "Decoration.h" #include "CaseFolder.h" #include "Document.h" #include "UniConversion.h" #include "Selection.h" #include "PositionCache.h" #include "EditModel.h" #include "MarginView.h" #include "EditView.h" #include "Editor.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif /* return whether this modification represents an operation that may reasonably be deferred (not done now OR [possibly] at all) */ static bool CanDeferToLastStep(const DocModification &mh) { if (mh.modificationType & (SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE)) return true; // CAN skip if (!(mh.modificationType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO))) return false; // MUST do if (mh.modificationType & SC_MULTISTEPUNDOREDO) return true; // CAN skip return false; // PRESUMABLY must do } static bool CanEliminate(const DocModification &mh) { return (mh.modificationType & (SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE)) != 0; } /* return whether this modification represents the FINAL step in a [possibly lengthy] multi-step Undo/Redo sequence */ static bool IsLastStep(const DocModification &mh) { return (mh.modificationType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO)) != 0 && (mh.modificationType & SC_MULTISTEPUNDOREDO) != 0 && (mh.modificationType & SC_LASTSTEPINUNDOREDO) != 0 && (mh.modificationType & SC_MULTILINEUNDOREDO) != 0; } Timer::Timer() : ticking(false), ticksToWait(0), tickerID(0) {} Idler::Idler() : state(false), idlerID(0) {} static inline bool IsAllSpacesOrTabs(const char *s, unsigned int len) { for (unsigned int i = 0; i < len; i++) { // This is safe because IsSpaceOrTab() will return false for null terminators if (!IsSpaceOrTab(s[i])) return false; } return true; } Editor::Editor() { ctrlID = 0; stylesValid = false; technology = SC_TECHNOLOGY_DEFAULT; scaleRGBAImage = 100.0f; cursorMode = SC_CURSORNORMAL; hasFocus = false; errorStatus = 0; mouseDownCaptures = true; mouseWheelCaptures = true; lastClickTime = 0; doubleClickCloseThreshold = Point(3, 3); dwellDelay = SC_TIME_FOREVER; ticksToDwell = SC_TIME_FOREVER; dwelling = false; ptMouseLast.x = 0; ptMouseLast.y = 0; inDragDrop = ddNone; dropWentOutside = false; posDrop = SelectionPosition(invalidPosition); hotSpotClickPos = INVALID_POSITION; selectionType = selChar; lastXChosen = 0; lineAnchorPos = 0; originalAnchorPos = 0; wordSelectAnchorStartPos = 0; wordSelectAnchorEndPos = 0; wordSelectInitialCaretPos = -1; caretXPolicy = CARET_SLOP | CARET_EVEN; caretXSlop = 50; caretYPolicy = CARET_EVEN; caretYSlop = 0; visiblePolicy = 0; visibleSlop = 0; searchAnchor = 0; xCaretMargin = 50; horizontalScrollBarVisible = true; scrollWidth = 2000; verticalScrollBarVisible = true; endAtLastLine = true; caretSticky = SC_CARETSTICKY_OFF; marginOptions = SC_MARGINOPTION_NONE; mouseSelectionRectangularSwitch = false; multipleSelection = false; additionalSelectionTyping = false; multiPasteMode = SC_MULTIPASTE_ONCE; virtualSpaceOptions = SCVS_NONE; targetStart = 0; targetEnd = 0; searchFlags = 0; topLine = 0; posTopLine = 0; lengthForEncode = -1; needUpdateUI = 0; ContainerNeedsUpdate(SC_UPDATE_CONTENT); paintState = notPainting; paintAbandonedByStyling = false; paintingAllText = false; willRedrawAll = false; idleStyling = SC_IDLESTYLING_NONE; needIdleStyling = false; modEventMask = SC_MODEVENTMASKALL; pdoc->AddWatcher(this, 0); recordingMacro = false; foldAutomatic = 0; convertPastes = true; SetRepresentations(); } Editor::~Editor() { pdoc->RemoveWatcher(this, 0); DropGraphics(true); } void Editor::Finalise() { SetIdle(false); CancelModes(); } void Editor::SetRepresentations() { reprs.Clear(); // C0 control set const char *reps[] = { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" }; for (size_t j=0; j < ELEMENTS(reps); j++) { char c[2] = { static_cast(j), 0 }; reprs.SetRepresentation(c, reps[j]); } // C1 control set // As well as Unicode mode, ISO-8859-1 should use these if (IsUnicodeMode()) { const char *repsC1[] = { "PAD", "HOP", "BPH", "NBH", "IND", "NEL", "SSA", "ESA", "HTS", "HTJ", "VTS", "PLD", "PLU", "RI", "SS2", "SS3", "DCS", "PU1", "PU2", "STS", "CCH", "MW", "SPA", "EPA", "SOS", "SGCI", "SCI", "CSI", "ST", "OSC", "PM", "APC" }; for (size_t j=0; j < ELEMENTS(repsC1); j++) { char c1[3] = { '\xc2', static_cast(0x80+j), 0 }; reprs.SetRepresentation(c1, repsC1[j]); } reprs.SetRepresentation("\xe2\x80\xa8", "LS"); reprs.SetRepresentation("\xe2\x80\xa9", "PS"); } // UTF-8 invalid bytes if (IsUnicodeMode()) { for (int k=0x80; k < 0x100; k++) { char hiByte[2] = { static_cast(k), 0 }; char hexits[4]; sprintf(hexits, "x%2X", k); reprs.SetRepresentation(hiByte, hexits); } } } void Editor::DropGraphics(bool freeObjects) { marginView.DropGraphics(freeObjects); view.DropGraphics(freeObjects); } void Editor::AllocateGraphics() { marginView.AllocateGraphics(vs); view.AllocateGraphics(vs); } void Editor::InvalidateStyleData() { stylesValid = false; vs.technology = technology; DropGraphics(false); AllocateGraphics(); view.llc.Invalidate(LineLayout::llInvalid); view.posCache.Clear(); } void Editor::InvalidateStyleRedraw() { NeedWrapping(); InvalidateStyleData(); Redraw(); } void Editor::RefreshStyleData() { if (!stylesValid) { stylesValid = true; AutoSurface surface(this); if (surface) { vs.Refresh(*surface, pdoc->tabInChars); } SetScrollBars(); SetRectangularRange(); } } Point Editor::GetVisibleOriginInMain() const { return Point(0,0); } PointDocument Editor::DocumentPointFromView(Point ptView) const { PointDocument ptDocument(ptView); if (wMargin.GetID()) { Point ptOrigin = GetVisibleOriginInMain(); ptDocument.x += ptOrigin.x; ptDocument.y += ptOrigin.y; } else { ptDocument.x += xOffset; ptDocument.y += topLine * vs.lineHeight; } return ptDocument; } int Editor::TopLineOfMain() const { if (wMargin.GetID()) return 0; else return topLine; } PRectangle Editor::GetClientRectangle() const { Window win = wMain; return win.GetClientPosition(); } PRectangle Editor::GetClientDrawingRectangle() { return GetClientRectangle(); } PRectangle Editor::GetTextRectangle() const { PRectangle rc = GetClientRectangle(); rc.left += vs.textStart; rc.right -= vs.rightMarginWidth; return rc; } int Editor::LinesOnScreen() const { PRectangle rcClient = GetClientRectangle(); int htClient = static_cast(rcClient.bottom - rcClient.top); //Platform::DebugPrintf("lines on screen = %d\n", htClient / lineHeight + 1); return htClient / vs.lineHeight; } int Editor::LinesToScroll() const { int retVal = LinesOnScreen() - 1; if (retVal < 1) return 1; else return retVal; } int Editor::MaxScrollPos() const { //Platform::DebugPrintf("Lines %d screen = %d maxScroll = %d\n", //LinesTotal(), LinesOnScreen(), LinesTotal() - LinesOnScreen() + 1); int retVal = cs.LinesDisplayed(); if (endAtLastLine) { retVal -= LinesOnScreen(); } else { retVal--; } if (retVal < 0) { return 0; } else { return retVal; } } SelectionPosition Editor::ClampPositionIntoDocument(SelectionPosition sp) const { if (sp.Position() < 0) { return SelectionPosition(0); } else if (sp.Position() > pdoc->Length()) { return SelectionPosition(pdoc->Length()); } else { // If not at end of line then set offset to 0 if (!pdoc->IsLineEndPosition(sp.Position())) sp.SetVirtualSpace(0); return sp; } } Point Editor::LocationFromPosition(SelectionPosition pos, PointEnd pe) { RefreshStyleData(); AutoSurface surface(this); return view.LocationFromPosition(surface, *this, pos, topLine, vs, pe); } Point Editor::LocationFromPosition(int pos, PointEnd pe) { return LocationFromPosition(SelectionPosition(pos), pe); } int Editor::XFromPosition(int pos) { Point pt = LocationFromPosition(pos); return static_cast(pt.x) - vs.textStart + xOffset; } int Editor::XFromPosition(SelectionPosition sp) { Point pt = LocationFromPosition(sp); return static_cast(pt.x) - vs.textStart + xOffset; } SelectionPosition Editor::SPositionFromLocation(Point pt, bool canReturnInvalid, bool charPosition, bool virtualSpace) { RefreshStyleData(); AutoSurface surface(this); if (canReturnInvalid) { PRectangle rcClient = GetTextRectangle(); // May be in scroll view coordinates so translate back to main view Point ptOrigin = GetVisibleOriginInMain(); rcClient.Move(-ptOrigin.x, -ptOrigin.y); if (!rcClient.Contains(pt)) return SelectionPosition(INVALID_POSITION); if (pt.x < vs.textStart) return SelectionPosition(INVALID_POSITION); if (pt.y < 0) return SelectionPosition(INVALID_POSITION); } PointDocument ptdoc = DocumentPointFromView(pt); return view.SPositionFromLocation(surface, *this, ptdoc, canReturnInvalid, charPosition, virtualSpace, vs); } int Editor::PositionFromLocation(Point pt, bool canReturnInvalid, bool charPosition) { return SPositionFromLocation(pt, canReturnInvalid, charPosition, false).Position(); } /** * Find the document position corresponding to an x coordinate on a particular document line. * Ensure is between whole characters when document is in multi-byte or UTF-8 mode. * This method is used for rectangular selections and does not work on wrapped lines. */ SelectionPosition Editor::SPositionFromLineX(int lineDoc, int x) { RefreshStyleData(); if (lineDoc >= pdoc->LinesTotal()) return SelectionPosition(pdoc->Length()); //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); AutoSurface surface(this); return view.SPositionFromLineX(surface, *this, lineDoc, x, vs); } int Editor::PositionFromLineX(int lineDoc, int x) { return SPositionFromLineX(lineDoc, x).Position(); } int Editor::LineFromLocation(Point pt) const { return cs.DocFromDisplay(static_cast(pt.y) / vs.lineHeight + topLine); } void Editor::SetTopLine(int topLineNew) { if ((topLine != topLineNew) && (topLineNew >= 0)) { topLine = topLineNew; ContainerNeedsUpdate(SC_UPDATE_V_SCROLL); } posTopLine = pdoc->LineStart(cs.DocFromDisplay(topLine)); } /** * If painting then abandon the painting because a wider redraw is needed. * @return true if calling code should stop drawing. */ bool Editor::AbandonPaint() { if ((paintState == painting) && !paintingAllText) { paintState = paintAbandoned; } return paintState == paintAbandoned; } void Editor::RedrawRect(PRectangle rc) { //Platform::DebugPrintf("Redraw %0d,%0d - %0d,%0d\n", rc.left, rc.top, rc.right, rc.bottom); // Clip the redraw rectangle into the client area PRectangle rcClient = GetClientRectangle(); if (rc.top < rcClient.top) rc.top = rcClient.top; if (rc.bottom > rcClient.bottom) rc.bottom = rcClient.bottom; if (rc.left < rcClient.left) rc.left = rcClient.left; if (rc.right > rcClient.right) rc.right = rcClient.right; if ((rc.bottom > rc.top) && (rc.right > rc.left)) { wMain.InvalidateRectangle(rc); } } void Editor::DiscardOverdraw() { // Overridden on platforms that may draw outside visible area. } void Editor::Redraw() { //Platform::DebugPrintf("Redraw all\n"); PRectangle rcClient = GetClientRectangle(); wMain.InvalidateRectangle(rcClient); if (wMargin.GetID()) wMargin.InvalidateAll(); //wMain.InvalidateAll(); } void Editor::RedrawSelMargin(int line, bool allAfter) { const bool markersInText = vs.maskInLine || vs.maskDrawInText; if (!wMargin.GetID() || markersInText) { // May affect text area so may need to abandon and retry if (AbandonPaint()) { return; } } if (wMargin.GetID() && markersInText) { Redraw(); return; } PRectangle rcMarkers = GetClientRectangle(); if (!markersInText) { // Normal case: just draw the margin rcMarkers.right = rcMarkers.left + vs.fixedColumnWidth; } if (line != -1) { PRectangle rcLine = RectangleFromRange(Range(pdoc->LineStart(line)), 0); // Inflate line rectangle if there are image markers with height larger than line height if (vs.largestMarkerHeight > vs.lineHeight) { int delta = (vs.largestMarkerHeight - vs.lineHeight + 1) / 2; rcLine.top -= delta; rcLine.bottom += delta; if (rcLine.top < rcMarkers.top) rcLine.top = rcMarkers.top; if (rcLine.bottom > rcMarkers.bottom) rcLine.bottom = rcMarkers.bottom; } rcMarkers.top = rcLine.top; if (!allAfter) rcMarkers.bottom = rcLine.bottom; if (rcMarkers.Empty()) return; } if (wMargin.GetID()) { Point ptOrigin = GetVisibleOriginInMain(); rcMarkers.Move(-ptOrigin.x, -ptOrigin.y); wMargin.InvalidateRectangle(rcMarkers); } else { wMain.InvalidateRectangle(rcMarkers); } } PRectangle Editor::RectangleFromRange(Range r, int overlap) { const int minLine = cs.DisplayFromDoc(pdoc->LineFromPosition(r.First())); const int maxLine = cs.DisplayLastFromDoc(pdoc->LineFromPosition(r.Last())); const PRectangle rcClientDrawing = GetClientDrawingRectangle(); PRectangle rc; const int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0; rc.left = static_cast(vs.textStart - leftTextOverlap); rc.top = static_cast((minLine - TopLineOfMain()) * vs.lineHeight - overlap); if (rc.top < rcClientDrawing.top) rc.top = rcClientDrawing.top; // Extend to right of prepared area if any to prevent artifacts from caret line highlight rc.right = rcClientDrawing.right; rc.bottom = static_cast((maxLine - TopLineOfMain() + 1) * vs.lineHeight + overlap); return rc; } void Editor::InvalidateRange(int start, int end) { RedrawRect(RectangleFromRange(Range(start, end), view.LinesOverlap() ? vs.lineOverlap : 0)); } int Editor::CurrentPosition() const { return sel.MainCaret(); } bool Editor::SelectionEmpty() const { return sel.Empty(); } SelectionPosition Editor::SelectionStart() { return sel.RangeMain().Start(); } SelectionPosition Editor::SelectionEnd() { return sel.RangeMain().End(); } void Editor::SetRectangularRange() { if (sel.IsRectangular()) { int xAnchor = XFromPosition(sel.Rectangular().anchor); int xCaret = XFromPosition(sel.Rectangular().caret); if (sel.selType == Selection::selThin) { xCaret = xAnchor; } int lineAnchorRect = pdoc->LineFromPosition(sel.Rectangular().anchor.Position()); int lineCaret = pdoc->LineFromPosition(sel.Rectangular().caret.Position()); int increment = (lineCaret > lineAnchorRect) ? 1 : -1; for (int line=lineAnchorRect; line != lineCaret+increment; line += increment) { SelectionRange range(SPositionFromLineX(line, xCaret), SPositionFromLineX(line, xAnchor)); if ((virtualSpaceOptions & SCVS_RECTANGULARSELECTION) == 0) range.ClearVirtualSpace(); if (line == lineAnchorRect) sel.SetSelection(range); else sel.AddSelectionWithoutTrim(range); } } } void Editor::ThinRectangularRange() { if (sel.IsRectangular()) { sel.selType = Selection::selThin; if (sel.Rectangular().caret < sel.Rectangular().anchor) { sel.Rectangular() = SelectionRange(sel.Range(sel.Count()-1).caret, sel.Range(0).anchor); } else { sel.Rectangular() = SelectionRange(sel.Range(sel.Count()-1).anchor, sel.Range(0).caret); } SetRectangularRange(); } } void Editor::InvalidateSelection(SelectionRange newMain, bool invalidateWholeSelection) { if (sel.Count() > 1 || !(sel.RangeMain().anchor == newMain.anchor) || sel.IsRectangular()) { invalidateWholeSelection = true; } int firstAffected = Platform::Minimum(sel.RangeMain().Start().Position(), newMain.Start().Position()); // +1 for lastAffected ensures caret repainted int lastAffected = Platform::Maximum(newMain.caret.Position()+1, newMain.anchor.Position()); lastAffected = Platform::Maximum(lastAffected, sel.RangeMain().End().Position()); if (invalidateWholeSelection) { for (size_t r=0; rLineFromPosition(currentPos_.Position()); /* For Line selection - ensure the anchor and caret are always at the beginning and end of the region lines. */ if (sel.selType == Selection::selLines) { if (currentPos_ > anchor_) { anchor_ = SelectionPosition(pdoc->LineStart(pdoc->LineFromPosition(anchor_.Position()))); currentPos_ = SelectionPosition(pdoc->LineEnd(pdoc->LineFromPosition(currentPos_.Position()))); } else { currentPos_ = SelectionPosition(pdoc->LineStart(pdoc->LineFromPosition(currentPos_.Position()))); anchor_ = SelectionPosition(pdoc->LineEnd(pdoc->LineFromPosition(anchor_.Position()))); } } SelectionRange rangeNew(currentPos_, anchor_); if (sel.Count() > 1 || !(sel.RangeMain() == rangeNew)) { InvalidateSelection(rangeNew); } sel.RangeMain() = rangeNew; SetRectangularRange(); ClaimSelection(); SetHoverIndicatorPosition(sel.MainCaret()); if (marginView.highlightDelimiter.NeedsDrawing(currentLine)) { RedrawSelMargin(); } QueueIdleWork(WorkNeeded::workUpdateUI); } void Editor::SetSelection(int currentPos_, int anchor_) { SetSelection(SelectionPosition(currentPos_), SelectionPosition(anchor_)); } // Just move the caret on the main selection void Editor::SetSelection(SelectionPosition currentPos_) { currentPos_ = ClampPositionIntoDocument(currentPos_); int currentLine = pdoc->LineFromPosition(currentPos_.Position()); if (sel.Count() > 1 || !(sel.RangeMain().caret == currentPos_)) { InvalidateSelection(SelectionRange(currentPos_)); } if (sel.IsRectangular()) { sel.Rectangular() = SelectionRange(SelectionPosition(currentPos_), sel.Rectangular().anchor); SetRectangularRange(); } else { sel.RangeMain() = SelectionRange(SelectionPosition(currentPos_), sel.RangeMain().anchor); } ClaimSelection(); SetHoverIndicatorPosition(sel.MainCaret()); if (marginView.highlightDelimiter.NeedsDrawing(currentLine)) { RedrawSelMargin(); } QueueIdleWork(WorkNeeded::workUpdateUI); } void Editor::SetSelection(int currentPos_) { SetSelection(SelectionPosition(currentPos_)); } void Editor::SetEmptySelection(SelectionPosition currentPos_) { int currentLine = pdoc->LineFromPosition(currentPos_.Position()); SelectionRange rangeNew(ClampPositionIntoDocument(currentPos_)); if (sel.Count() > 1 || !(sel.RangeMain() == rangeNew)) { InvalidateSelection(rangeNew); } sel.Clear(); sel.RangeMain() = rangeNew; SetRectangularRange(); ClaimSelection(); SetHoverIndicatorPosition(sel.MainCaret()); if (marginView.highlightDelimiter.NeedsDrawing(currentLine)) { RedrawSelMargin(); } QueueIdleWork(WorkNeeded::workUpdateUI); } void Editor::SetEmptySelection(int currentPos_) { SetEmptySelection(SelectionPosition(currentPos_)); } void Editor::MultipleSelectAdd(AddNumber addNumber) { if (SelectionEmpty() || !multipleSelection) { // Select word at caret const int startWord = pdoc->ExtendWordSelect(sel.MainCaret(), -1, true); const int endWord = pdoc->ExtendWordSelect(startWord, 1, true); TrimAndSetSelection(endWord, startWord); } else { if (!pdoc->HasCaseFolder()) pdoc->SetCaseFolder(CaseFolderForEncoding()); const Range rangeMainSelection(sel.RangeMain().Start().Position(), sel.RangeMain().End().Position()); const std::string selectedText = RangeText(rangeMainSelection.start, rangeMainSelection.end); const Range rangeTarget(targetStart, targetEnd); std::vector searchRanges; // Search should be over the target range excluding the current selection so // may need to search 2 ranges, after the selection then before the selection. if (rangeTarget.Overlaps(rangeMainSelection)) { // Common case is that the selection is completely within the target but // may also have overlap at start or end. if (rangeMainSelection.end < rangeTarget.end) searchRanges.push_back(Range(rangeMainSelection.end, rangeTarget.end)); if (rangeTarget.start < rangeMainSelection.start) searchRanges.push_back(Range(rangeTarget.start, rangeMainSelection.start)); } else { // No overlap searchRanges.push_back(rangeTarget); } for (std::vector::const_iterator it = searchRanges.begin(); it != searchRanges.end(); ++it) { int searchStart = it->start; const int searchEnd = it->end; for (;;) { int lengthFound = static_cast(selectedText.length()); int pos = static_cast(pdoc->FindText(searchStart, searchEnd, selectedText.c_str(), searchFlags, &lengthFound)); if (pos >= 0) { sel.AddSelection(SelectionRange(pos + lengthFound, pos)); ScrollRange(sel.RangeMain()); Redraw(); if (addNumber == addOne) return; searchStart = pos + lengthFound; } else { break; } } } } } bool Editor::RangeContainsProtected(int start, int end) const { if (vs.ProtectionActive()) { if (start > end) { int t = start; start = end; end = t; } for (int pos = start; pos < end; pos++) { if (vs.styles[pdoc->StyleIndexAt(pos)].IsProtected()) return true; } } return false; } bool Editor::SelectionContainsProtected() { for (size_t r=0; rMovePositionOutsideChar(pos.Position(), moveDir, checkLineEnd); if (posMoved != pos.Position()) pos.SetPosition(posMoved); if (vs.ProtectionActive()) { if (moveDir > 0) { if ((pos.Position() > 0) && vs.styles[pdoc->StyleIndexAt(pos.Position() - 1)].IsProtected()) { while ((pos.Position() < pdoc->Length()) && (vs.styles[pdoc->StyleIndexAt(pos.Position())].IsProtected())) pos.Add(1); } } else if (moveDir < 0) { if (vs.styles[pdoc->StyleIndexAt(pos.Position())].IsProtected()) { while ((pos.Position() > 0) && (vs.styles[pdoc->StyleIndexAt(pos.Position() - 1)].IsProtected())) pos.Add(-1); } } } return pos; } void Editor::MovedCaret(SelectionPosition newPos, SelectionPosition previousPos, bool ensureVisible) { const int currentLine = pdoc->LineFromPosition(newPos.Position()); if (ensureVisible) { // In case in need of wrapping to ensure DisplayFromDoc works. if (currentLine >= wrapPending.start) WrapLines(wsAll); XYScrollPosition newXY = XYScrollToMakeVisible( SelectionRange(posDrag.IsValid() ? posDrag : newPos), xysDefault); if (previousPos.IsValid() && (newXY.xOffset == xOffset)) { // simple vertical scroll then invalidate ScrollTo(newXY.topLine); InvalidateSelection(SelectionRange(previousPos), true); } else { SetXYScroll(newXY); } } ShowCaretAtCurrentPosition(); NotifyCaretMove(); ClaimSelection(); SetHoverIndicatorPosition(sel.MainCaret()); QueueIdleWork(WorkNeeded::workUpdateUI); if (marginView.highlightDelimiter.NeedsDrawing(currentLine)) { RedrawSelMargin(); } } void Editor::MovePositionTo(SelectionPosition newPos, Selection::selTypes selt, bool ensureVisible) { const SelectionPosition spCaret = ((sel.Count() == 1) && sel.Empty()) ? sel.Last() : SelectionPosition(INVALID_POSITION); int delta = newPos.Position() - sel.MainCaret(); newPos = ClampPositionIntoDocument(newPos); newPos = MovePositionOutsideChar(newPos, delta); if (!multipleSelection && sel.IsRectangular() && (selt == Selection::selStream)) { // Can't turn into multiple selection so clear additional selections InvalidateSelection(SelectionRange(newPos), true); sel.DropAdditionalRanges(); } if (!sel.IsRectangular() && (selt == Selection::selRectangle)) { // Switching to rectangular InvalidateSelection(sel.RangeMain(), false); SelectionRange rangeMain = sel.RangeMain(); sel.Clear(); sel.Rectangular() = rangeMain; } if (selt != Selection::noSel) { sel.selType = selt; } if (selt != Selection::noSel || sel.MoveExtends()) { SetSelection(newPos); } else { SetEmptySelection(newPos); } MovedCaret(newPos, spCaret, ensureVisible); } void Editor::MovePositionTo(int newPos, Selection::selTypes selt, bool ensureVisible) { MovePositionTo(SelectionPosition(newPos), selt, ensureVisible); } SelectionPosition Editor::MovePositionSoVisible(SelectionPosition pos, int moveDir) { pos = ClampPositionIntoDocument(pos); pos = MovePositionOutsideChar(pos, moveDir); int lineDoc = pdoc->LineFromPosition(pos.Position()); if (cs.GetVisible(lineDoc)) { return pos; } else { int lineDisplay = cs.DisplayFromDoc(lineDoc); if (moveDir > 0) { // lineDisplay is already line before fold as lines in fold use display line of line after fold lineDisplay = Platform::Clamp(lineDisplay, 0, cs.LinesDisplayed()); return SelectionPosition(pdoc->LineStart(cs.DocFromDisplay(lineDisplay))); } else { lineDisplay = Platform::Clamp(lineDisplay - 1, 0, cs.LinesDisplayed()); return SelectionPosition(pdoc->LineEnd(cs.DocFromDisplay(lineDisplay))); } } } SelectionPosition Editor::MovePositionSoVisible(int pos, int moveDir) { return MovePositionSoVisible(SelectionPosition(pos), moveDir); } Point Editor::PointMainCaret() { return LocationFromPosition(sel.Range(sel.Main()).caret); } /** * Choose the x position that the caret will try to stick to * as it moves up and down. */ void Editor::SetLastXChosen() { Point pt = PointMainCaret(); lastXChosen = static_cast(pt.x) + xOffset; } void Editor::ScrollTo(int line, bool moveThumb) { int topLineNew = Platform::Clamp(line, 0, MaxScrollPos()); if (topLineNew != topLine) { // Try to optimise small scrolls #ifndef UNDER_CE int linesToMove = topLine - topLineNew; bool performBlit = (abs(linesToMove) <= 10) && (paintState == notPainting); willRedrawAll = !performBlit; #endif SetTopLine(topLineNew); // Optimize by styling the view as this will invalidate any needed area // which could abort the initial paint if discovered later. StyleAreaBounded(GetClientRectangle(), true); #ifndef UNDER_CE // Perform redraw rather than scroll if many lines would be redrawn anyway. if (performBlit) { ScrollText(linesToMove); } else { Redraw(); } willRedrawAll = false; #else Redraw(); #endif if (moveThumb) { SetVerticalScrollPos(); } } } void Editor::ScrollText(int /* linesToMove */) { //Platform::DebugPrintf("Editor::ScrollText %d\n", linesToMove); Redraw(); } void Editor::HorizontalScrollTo(int xPos) { //Platform::DebugPrintf("HorizontalScroll %d\n", xPos); if (xPos < 0) xPos = 0; if (!Wrapping() && (xOffset != xPos)) { xOffset = xPos; ContainerNeedsUpdate(SC_UPDATE_H_SCROLL); SetHorizontalScrollPos(); RedrawRect(GetClientRectangle()); } } void Editor::VerticalCentreCaret() { int lineDoc = pdoc->LineFromPosition(sel.IsRectangular() ? sel.Rectangular().caret.Position() : sel.MainCaret()); int lineDisplay = cs.DisplayFromDoc(lineDoc); int newTop = lineDisplay - (LinesOnScreen() / 2); if (topLine != newTop) { SetTopLine(newTop > 0 ? newTop : 0); RedrawRect(GetClientRectangle()); } } // Avoid 64 bit compiler warnings. // Scintilla does not support text buffers larger than 2**31 static int istrlen(const char *s) { return static_cast(s ? strlen(s) : 0); } void Editor::MoveSelectedLines(int lineDelta) { // if selection doesn't start at the beginning of the line, set the new start int selectionStart = SelectionStart().Position(); int startLine = pdoc->LineFromPosition(selectionStart); int beginningOfStartLine = pdoc->LineStart(startLine); selectionStart = beginningOfStartLine; // if selection doesn't end at the beginning of a line greater than that of the start, // then set it at the beginning of the next one int selectionEnd = SelectionEnd().Position(); int endLine = pdoc->LineFromPosition(selectionEnd); int beginningOfEndLine = pdoc->LineStart(endLine); bool appendEol = false; if (selectionEnd > beginningOfEndLine || selectionStart == selectionEnd) { selectionEnd = pdoc->LineStart(endLine + 1); appendEol = (selectionEnd == pdoc->Length() && pdoc->LineFromPosition(selectionEnd) == endLine); } // if there's nowhere for the selection to move // (i.e. at the beginning going up or at the end going down), // stop it right there! if ((selectionStart == 0 && lineDelta < 0) || (selectionEnd == pdoc->Length() && lineDelta > 0) || selectionStart == selectionEnd) { return; } UndoGroup ug(pdoc); if (lineDelta > 0 && selectionEnd == pdoc->LineStart(pdoc->LinesTotal() - 1)) { SetSelection(pdoc->MovePositionOutsideChar(selectionEnd - 1, -1), selectionEnd); ClearSelection(); selectionEnd = CurrentPosition(); } SetSelection(selectionStart, selectionEnd); SelectionText selectedText; CopySelectionRange(&selectedText); int selectionLength = SelectionRange(selectionStart, selectionEnd).Length(); Point currentLocation = LocationFromPosition(CurrentPosition()); int currentLine = LineFromLocation(currentLocation); if (appendEol) SetSelection(pdoc->MovePositionOutsideChar(selectionStart - 1, -1), selectionEnd); ClearSelection(); const char *eol = StringFromEOLMode(pdoc->eolMode); if (currentLine + lineDelta >= pdoc->LinesTotal()) pdoc->InsertString(pdoc->Length(), eol, istrlen(eol)); GoToLine(currentLine + lineDelta); selectionLength = pdoc->InsertString(CurrentPosition(), selectedText.Data(), selectionLength); if (appendEol) { const int lengthInserted = pdoc->InsertString(CurrentPosition() + selectionLength, eol, istrlen(eol)); selectionLength += lengthInserted; } SetSelection(CurrentPosition(), CurrentPosition() + selectionLength); } void Editor::MoveSelectedLinesUp() { MoveSelectedLines(-1); } void Editor::MoveSelectedLinesDown() { MoveSelectedLines(1); } void Editor::MoveCaretInsideView(bool ensureVisible) { PRectangle rcClient = GetTextRectangle(); Point pt = PointMainCaret(); if (pt.y < rcClient.top) { MovePositionTo(SPositionFromLocation( Point::FromInts(lastXChosen - xOffset, static_cast(rcClient.top)), false, false, UserVirtualSpace()), Selection::noSel, ensureVisible); } else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) { int yOfLastLineFullyDisplayed = static_cast(rcClient.top) + (LinesOnScreen() - 1) * vs.lineHeight; MovePositionTo(SPositionFromLocation( Point::FromInts(lastXChosen - xOffset, static_cast(rcClient.top) + yOfLastLineFullyDisplayed), false, false, UserVirtualSpace()), Selection::noSel, ensureVisible); } } int Editor::DisplayFromPosition(int pos) { AutoSurface surface(this); return view.DisplayFromPosition(surface, *this, pos, vs); } /** * Ensure the caret is reasonably visible in context. * Caret policy in SciTE If slop is set, we can define a slop value. This value defines an unwanted zone (UZ) where the caret is... unwanted. This zone is defined as a number of pixels near the vertical margins, and as a number of lines near the horizontal margins. By keeping the caret away from the edges, it is seen within its context, so it is likely that the identifier that the caret is on can be completely seen, and that the current line is seen with some of the lines following it which are often dependent on that line. If strict is set, the policy is enforced... strictly. The caret is centred on the display if slop is not set, and cannot go in the UZ if slop is set. If jumps is set, the display is moved more energetically so the caret can move in the same direction longer before the policy is applied again. '3UZ' notation is used to indicate three time the size of the UZ as a distance to the margin. If even is not set, instead of having symmetrical UZs, the left and bottom UZs are extended up to right and top UZs respectively. This way, we favour the displaying of useful information: the beginning of lines, where most code reside, and the lines after the caret, eg. the body of a function. | | | | | slop | strict | jumps | even | Caret can go to the margin | When reaching limit (caret going out of | | | | | visibility or going into the UZ) display is... -----+--------+-------+------+--------------------------------------------+-------------------------------------------------------------- 0 | 0 | 0 | 0 | Yes | moved to put caret on top/on right 0 | 0 | 0 | 1 | Yes | moved by one position 0 | 0 | 1 | 0 | Yes | moved to put caret on top/on right 0 | 0 | 1 | 1 | Yes | centred on the caret 0 | 1 | - | 0 | Caret is always on top/on right of display | - 0 | 1 | - | 1 | No, caret is always centred | - 1 | 0 | 0 | 0 | Yes | moved to put caret out of the asymmetrical UZ 1 | 0 | 0 | 1 | Yes | moved to put caret out of the UZ 1 | 0 | 1 | 0 | Yes | moved to put caret at 3UZ of the top or right margin 1 | 0 | 1 | 1 | Yes | moved to put caret at 3UZ of the margin 1 | 1 | - | 0 | Caret is always at UZ of top/right margin | - 1 | 1 | 0 | 1 | No, kept out of UZ | moved by one position 1 | 1 | 1 | 1 | No, kept out of UZ | moved to put caret at 3UZ of the margin */ Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange &range, const XYScrollOptions options) { PRectangle rcClient = GetTextRectangle(); Point pt = LocationFromPosition(range.caret); Point ptAnchor = LocationFromPosition(range.anchor); const Point ptOrigin = GetVisibleOriginInMain(); pt.x += ptOrigin.x; pt.y += ptOrigin.y; ptAnchor.x += ptOrigin.x; ptAnchor.y += ptOrigin.y; const Point ptBottomCaret(pt.x, pt.y + vs.lineHeight - 1); XYScrollPosition newXY(xOffset, topLine); if (rcClient.Empty()) { return newXY; } // Vertical positioning if ((options & xysVertical) && (pt.y < rcClient.top || ptBottomCaret.y >= rcClient.bottom || (caretYPolicy & CARET_STRICT) != 0)) { const int lineCaret = DisplayFromPosition(range.caret.Position()); const int linesOnScreen = LinesOnScreen(); const int halfScreen = Platform::Maximum(linesOnScreen - 1, 2) / 2; const bool bSlop = (caretYPolicy & CARET_SLOP) != 0; const bool bStrict = (caretYPolicy & CARET_STRICT) != 0; const bool bJump = (caretYPolicy & CARET_JUMPS) != 0; const bool bEven = (caretYPolicy & CARET_EVEN) != 0; // It should be possible to scroll the window to show the caret, // but this fails to remove the caret on GTK+ if (bSlop) { // A margin is defined int yMoveT, yMoveB; if (bStrict) { int yMarginT, yMarginB; if (!(options & xysUseMargin)) { // In drag mode, avoid moves // otherwise, a double click will select several lines. yMarginT = yMarginB = 0; } else { // yMarginT must equal to caretYSlop, with a minimum of 1 and // a maximum of slightly less than half the heigth of the text area. yMarginT = Platform::Clamp(caretYSlop, 1, halfScreen); if (bEven) { yMarginB = yMarginT; } else { yMarginB = linesOnScreen - yMarginT - 1; } } yMoveT = yMarginT; if (bEven) { if (bJump) { yMoveT = Platform::Clamp(caretYSlop * 3, 1, halfScreen); } yMoveB = yMoveT; } else { yMoveB = linesOnScreen - yMoveT - 1; } if (lineCaret < topLine + yMarginT) { // Caret goes too high newXY.topLine = lineCaret - yMoveT; } else if (lineCaret > topLine + linesOnScreen - 1 - yMarginB) { // Caret goes too low newXY.topLine = lineCaret - linesOnScreen + 1 + yMoveB; } } else { // Not strict yMoveT = bJump ? caretYSlop * 3 : caretYSlop; yMoveT = Platform::Clamp(yMoveT, 1, halfScreen); if (bEven) { yMoveB = yMoveT; } else { yMoveB = linesOnScreen - yMoveT - 1; } if (lineCaret < topLine) { // Caret goes too high newXY.topLine = lineCaret - yMoveT; } else if (lineCaret > topLine + linesOnScreen - 1) { // Caret goes too low newXY.topLine = lineCaret - linesOnScreen + 1 + yMoveB; } } } else { // No slop if (!bStrict && !bJump) { // Minimal move if (lineCaret < topLine) { // Caret goes too high newXY.topLine = lineCaret; } else if (lineCaret > topLine + linesOnScreen - 1) { // Caret goes too low if (bEven) { newXY.topLine = lineCaret - linesOnScreen + 1; } else { newXY.topLine = lineCaret; } } } else { // Strict or going out of display if (bEven) { // Always center caret newXY.topLine = lineCaret - halfScreen; } else { // Always put caret on top of display newXY.topLine = lineCaret; } } } if (!(range.caret == range.anchor)) { const int lineAnchor = DisplayFromPosition(range.anchor.Position()); if (lineAnchor < lineCaret) { // Shift up to show anchor or as much of range as possible newXY.topLine = std::min(newXY.topLine, lineAnchor); newXY.topLine = std::max(newXY.topLine, lineCaret - LinesOnScreen()); } else { // Shift down to show anchor or as much of range as possible newXY.topLine = std::max(newXY.topLine, lineAnchor - LinesOnScreen()); newXY.topLine = std::min(newXY.topLine, lineCaret); } } newXY.topLine = Platform::Clamp(newXY.topLine, 0, MaxScrollPos()); } // Horizontal positioning if ((options & xysHorizontal) && !Wrapping()) { const int halfScreen = Platform::Maximum(static_cast(rcClient.Width()) - 4, 4) / 2; const bool bSlop = (caretXPolicy & CARET_SLOP) != 0; const bool bStrict = (caretXPolicy & CARET_STRICT) != 0; const bool bJump = (caretXPolicy & CARET_JUMPS) != 0; const bool bEven = (caretXPolicy & CARET_EVEN) != 0; if (bSlop) { // A margin is defined int xMoveL, xMoveR; if (bStrict) { int xMarginL, xMarginR; if (!(options & xysUseMargin)) { // In drag mode, avoid moves unless very near of the margin // otherwise, a simple click will select text. xMarginL = xMarginR = 2; } else { // xMargin must equal to caretXSlop, with a minimum of 2 and // a maximum of slightly less than half the width of the text area. xMarginR = Platform::Clamp(caretXSlop, 2, halfScreen); if (bEven) { xMarginL = xMarginR; } else { xMarginL = static_cast(rcClient.Width()) - xMarginR - 4; } } if (bJump && bEven) { // Jump is used only in even mode xMoveL = xMoveR = Platform::Clamp(caretXSlop * 3, 1, halfScreen); } else { xMoveL = xMoveR = 0; // Not used, avoid a warning } if (pt.x < rcClient.left + xMarginL) { // Caret is on the left of the display if (bJump && bEven) { newXY.xOffset -= xMoveL; } else { // Move just enough to allow to display the caret newXY.xOffset -= static_cast((rcClient.left + xMarginL) - pt.x); } } else if (pt.x >= rcClient.right - xMarginR) { // Caret is on the right of the display if (bJump && bEven) { newXY.xOffset += xMoveR; } else { // Move just enough to allow to display the caret newXY.xOffset += static_cast(pt.x - (rcClient.right - xMarginR) + 1); } } } else { // Not strict xMoveR = bJump ? caretXSlop * 3 : caretXSlop; xMoveR = Platform::Clamp(xMoveR, 1, halfScreen); if (bEven) { xMoveL = xMoveR; } else { xMoveL = static_cast(rcClient.Width()) - xMoveR - 4; } if (pt.x < rcClient.left) { // Caret is on the left of the display newXY.xOffset -= xMoveL; } else if (pt.x >= rcClient.right) { // Caret is on the right of the display newXY.xOffset += xMoveR; } } } else { // No slop if (bStrict || (bJump && (pt.x < rcClient.left || pt.x >= rcClient.right))) { // Strict or going out of display if (bEven) { // Center caret newXY.xOffset += static_cast(pt.x - rcClient.left - halfScreen); } else { // Put caret on right newXY.xOffset += static_cast(pt.x - rcClient.right + 1); } } else { // Move just enough to allow to display the caret if (pt.x < rcClient.left) { // Caret is on the left of the display if (bEven) { newXY.xOffset -= static_cast(rcClient.left - pt.x); } else { newXY.xOffset += static_cast(pt.x - rcClient.right) + 1; } } else if (pt.x >= rcClient.right) { // Caret is on the right of the display newXY.xOffset += static_cast(pt.x - rcClient.right) + 1; } } } // In case of a jump (find result) largely out of display, adjust the offset to display the caret if (pt.x + xOffset < rcClient.left + newXY.xOffset) { newXY.xOffset = static_cast(pt.x + xOffset - rcClient.left) - 2; } else if (pt.x + xOffset >= rcClient.right + newXY.xOffset) { newXY.xOffset = static_cast(pt.x + xOffset - rcClient.right) + 2; if ((vs.caretStyle == CARETSTYLE_BLOCK) || view.imeCaretBlockOverride) { // Ensure we can see a good portion of the block caret newXY.xOffset += static_cast(vs.aveCharWidth); } } if (!(range.caret == range.anchor)) { if (ptAnchor.x < pt.x) { // Shift to left to show anchor or as much of range as possible int maxOffset = static_cast(ptAnchor.x + xOffset - rcClient.left) - 1; int minOffset = static_cast(pt.x + xOffset - rcClient.right) + 1; newXY.xOffset = std::min(newXY.xOffset, maxOffset); newXY.xOffset = std::max(newXY.xOffset, minOffset); } else { // Shift to right to show anchor or as much of range as possible int minOffset = static_cast(ptAnchor.x + xOffset - rcClient.right) + 1; int maxOffset = static_cast(pt.x + xOffset - rcClient.left) - 1; newXY.xOffset = std::max(newXY.xOffset, minOffset); newXY.xOffset = std::min(newXY.xOffset, maxOffset); } } if (newXY.xOffset < 0) { newXY.xOffset = 0; } } return newXY; } void Editor::SetXYScroll(XYScrollPosition newXY) { if ((newXY.topLine != topLine) || (newXY.xOffset != xOffset)) { if (newXY.topLine != topLine) { SetTopLine(newXY.topLine); SetVerticalScrollPos(); } if (newXY.xOffset != xOffset) { xOffset = newXY.xOffset; ContainerNeedsUpdate(SC_UPDATE_H_SCROLL); if (newXY.xOffset > 0) { PRectangle rcText = GetTextRectangle(); if (horizontalScrollBarVisible && rcText.Width() + xOffset > scrollWidth) { scrollWidth = xOffset + static_cast(rcText.Width()); SetScrollBars(); } } SetHorizontalScrollPos(); } Redraw(); UpdateSystemCaret(); } } void Editor::ScrollRange(SelectionRange range) { SetXYScroll(XYScrollToMakeVisible(range, xysDefault)); } void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { SetXYScroll(XYScrollToMakeVisible(SelectionRange(posDrag.IsValid() ? posDrag : sel.RangeMain().caret), static_cast((useMargin?xysUseMargin:0)|(vert?xysVertical:0)|(horiz?xysHorizontal:0)))); } void Editor::ShowCaretAtCurrentPosition() { if (hasFocus) { caret.active = true; caret.on = true; if (FineTickerAvailable()) { FineTickerCancel(tickCaret); if (caret.period > 0) FineTickerStart(tickCaret, caret.period, caret.period/10); } else { SetTicking(true); } } else { caret.active = false; caret.on = false; if (FineTickerAvailable()) { FineTickerCancel(tickCaret); } } InvalidateCaret(); } void Editor::DropCaret() { caret.active = false; if (FineTickerAvailable()) { FineTickerCancel(tickCaret); } InvalidateCaret(); } void Editor::CaretSetPeriod(int period) { if (caret.period != period) { caret.period = period; caret.on = true; if (FineTickerAvailable()) { FineTickerCancel(tickCaret); if ((caret.active) && (caret.period > 0)) FineTickerStart(tickCaret, caret.period, caret.period/10); } InvalidateCaret(); } } void Editor::InvalidateCaret() { if (posDrag.IsValid()) { InvalidateRange(posDrag.Position(), posDrag.Position() + 1); } else { for (size_t r=0; rlines; } return cs.SetHeight(lineToWrap, linesWrapped + (vs.annotationVisible ? pdoc->AnnotationLines(lineToWrap) : 0)); } // Perform wrapping for a subset of the lines needing wrapping. // wsAll: wrap all lines which need wrapping in this single call // wsVisible: wrap currently visible lines // wsIdle: wrap one page + 100 lines // Return true if wrapping occurred. bool Editor::WrapLines(enum wrapScope ws) { int goodTopLine = topLine; bool wrapOccurred = false; if (!Wrapping()) { if (wrapWidth != LineLayout::wrapWidthInfinite) { wrapWidth = LineLayout::wrapWidthInfinite; for (int lineDoc = 0; lineDoc < pdoc->LinesTotal(); lineDoc++) { cs.SetHeight(lineDoc, 1 + (vs.annotationVisible ? pdoc->AnnotationLines(lineDoc) : 0)); } wrapOccurred = true; } wrapPending.Reset(); } else if (wrapPending.NeedsWrap()) { wrapPending.start = std::min(wrapPending.start, pdoc->LinesTotal()); if (!SetIdle(true)) { // Idle processing not supported so full wrap required. ws = wsAll; } // Decide where to start wrapping int lineToWrap = wrapPending.start; int lineToWrapEnd = std::min(wrapPending.end, pdoc->LinesTotal()); const int lineDocTop = cs.DocFromDisplay(topLine); const int subLineTop = topLine - cs.DisplayFromDoc(lineDocTop); if (ws == wsVisible) { lineToWrap = Platform::Clamp(lineDocTop-5, wrapPending.start, pdoc->LinesTotal()); // Priority wrap to just after visible area. // Since wrapping could reduce display lines, treat each // as taking only one display line. lineToWrapEnd = lineDocTop; int lines = LinesOnScreen() + 1; while ((lineToWrapEnd < cs.LinesInDoc()) && (lines>0)) { if (cs.GetVisible(lineToWrapEnd)) lines--; lineToWrapEnd++; } // .. and if the paint window is outside pending wraps if ((lineToWrap > wrapPending.end) || (lineToWrapEnd < wrapPending.start)) { // Currently visible text does not need wrapping return false; } } else if (ws == wsIdle) { lineToWrapEnd = lineToWrap + LinesOnScreen() + 100; } const int lineEndNeedWrap = std::min(wrapPending.end, pdoc->LinesTotal()); lineToWrapEnd = std::min(lineToWrapEnd, lineEndNeedWrap); // Ensure all lines being wrapped are styled. pdoc->EnsureStyledTo(pdoc->LineStart(lineToWrapEnd)); if (lineToWrap < lineToWrapEnd) { PRectangle rcTextArea = GetClientRectangle(); rcTextArea.left = static_cast(vs.textStart); rcTextArea.right -= vs.rightMarginWidth; wrapWidth = static_cast(rcTextArea.Width()); RefreshStyleData(); AutoSurface surface(this); if (surface) { //Platform::DebugPrintf("Wraplines: scope=%0d need=%0d..%0d perform=%0d..%0d\n", ws, wrapPending.start, wrapPending.end, lineToWrap, lineToWrapEnd); while (lineToWrap < lineToWrapEnd) { if (WrapOneLine(surface, lineToWrap)) { wrapOccurred = true; } wrapPending.Wrapped(lineToWrap); lineToWrap++; } goodTopLine = cs.DisplayFromDoc(lineDocTop) + std::min(subLineTop, cs.GetHeight(lineDocTop)-1); } } // If wrapping is done, bring it to resting position if (wrapPending.start >= lineEndNeedWrap) { wrapPending.Reset(); } } if (wrapOccurred) { SetScrollBars(); SetTopLine(Platform::Clamp(goodTopLine, 0, MaxScrollPos())); SetVerticalScrollPos(); } return wrapOccurred; } void Editor::LinesJoin() { if (!RangeContainsProtected(targetStart, targetEnd)) { UndoGroup ug(pdoc); bool prevNonWS = true; for (int pos = targetStart; pos < targetEnd; pos++) { if (pdoc->IsPositionInLineEnd(pos)) { targetEnd -= pdoc->LenChar(pos); pdoc->DelChar(pos); if (prevNonWS) { // Ensure at least one space separating previous lines const int lengthInserted = pdoc->InsertString(pos, " ", 1); targetEnd += lengthInserted; } } else { prevNonWS = pdoc->CharAt(pos) != ' '; } } } } const char *Editor::StringFromEOLMode(int eolMode) { if (eolMode == SC_EOL_CRLF) { return "\r\n"; } else if (eolMode == SC_EOL_CR) { return "\r"; } else { return "\n"; } } void Editor::LinesSplit(int pixelWidth) { if (!RangeContainsProtected(targetStart, targetEnd)) { if (pixelWidth == 0) { PRectangle rcText = GetTextRectangle(); pixelWidth = static_cast(rcText.Width()); } int lineStart = pdoc->LineFromPosition(targetStart); int lineEnd = pdoc->LineFromPosition(targetEnd); const char *eol = StringFromEOLMode(pdoc->eolMode); UndoGroup ug(pdoc); for (int line = lineStart; line <= lineEnd; line++) { AutoSurface surface(this); AutoLineLayout ll(view.llc, view.RetrieveLineLayout(line, *this)); if (surface && ll) { unsigned int posLineStart = pdoc->LineStart(line); view.LayoutLine(*this, line, surface, vs, ll, pixelWidth); int lengthInsertedTotal = 0; for (int subLine = 1; subLine < ll->lines; subLine++) { const int lengthInserted = pdoc->InsertString( static_cast(posLineStart + lengthInsertedTotal + ll->LineStart(subLine)), eol, istrlen(eol)); targetEnd += lengthInserted; lengthInsertedTotal += lengthInserted; } } lineEnd = pdoc->LineFromPosition(targetEnd); } } } void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { if (vs.fixedColumnWidth == 0) return; AllocateGraphics(); RefreshStyleData(); RefreshPixMaps(surfWindow); // On GTK+ with Ubuntu overlay scroll bars, the surface may have been finished // at this point. The Initialised call checks for this case and sets the status // to be bad which avoids crashes in following calls. if (!surfWindow->Initialised()) { return; } PRectangle rcMargin = GetClientRectangle(); Point ptOrigin = GetVisibleOriginInMain(); rcMargin.Move(0, -ptOrigin.y); rcMargin.left = 0; rcMargin.right = static_cast(vs.fixedColumnWidth); if (!rc.Intersects(rcMargin)) return; Surface *surface; if (view.bufferedDraw) { surface = marginView.pixmapSelMargin; } else { surface = surfWindow; } // Clip vertically to paint area to avoid drawing line numbers if (rcMargin.bottom > rc.bottom) rcMargin.bottom = rc.bottom; if (rcMargin.top < rc.top) rcMargin.top = rc.top; marginView.PaintMargin(surface, topLine, rc, rcMargin, *this, vs); if (view.bufferedDraw) { surfWindow->Copy(rcMargin, Point(rcMargin.left, rcMargin.top), *marginView.pixmapSelMargin); } } void Editor::RefreshPixMaps(Surface *surfaceWindow) { view.RefreshPixMaps(surfaceWindow, wMain.GetID(), vs); marginView.RefreshPixMaps(surfaceWindow, wMain.GetID(), vs); if (view.bufferedDraw) { PRectangle rcClient = GetClientRectangle(); if (!view.pixmapLine->Initialised()) { view.pixmapLine->InitPixMap(static_cast(rcClient.Width()), vs.lineHeight, surfaceWindow, wMain.GetID()); } if (!marginView.pixmapSelMargin->Initialised()) { marginView.pixmapSelMargin->InitPixMap(vs.fixedColumnWidth, static_cast(rcClient.Height()), surfaceWindow, wMain.GetID()); } } } void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { //Platform::DebugPrintf("Paint:%1d (%3d,%3d) ... (%3d,%3d)\n", // paintingAllText, rcArea.left, rcArea.top, rcArea.right, rcArea.bottom); AllocateGraphics(); RefreshStyleData(); if (paintState == paintAbandoned) return; // Scroll bars may have changed so need redraw RefreshPixMaps(surfaceWindow); paintAbandonedByStyling = false; StyleAreaBounded(rcArea, false); PRectangle rcClient = GetClientRectangle(); //Platform::DebugPrintf("Client: (%3d,%3d) ... (%3d,%3d) %d\n", // rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); if (NotifyUpdateUI()) { RefreshStyleData(); RefreshPixMaps(surfaceWindow); } // Wrap the visible lines if needed. if (WrapLines(wsVisible)) { // The wrapping process has changed the height of some lines so // abandon this paint for a complete repaint. if (AbandonPaint()) { return; } RefreshPixMaps(surfaceWindow); // In case pixmaps invalidated by scrollbar change } PLATFORM_ASSERT(marginView.pixmapSelPattern->Initialised()); if (!view.bufferedDraw) surfaceWindow->SetClip(rcArea); if (paintState != paintAbandoned) { if (vs.marginInside) { PaintSelMargin(surfaceWindow, rcArea); PRectangle rcRightMargin = rcClient; rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth; if (rcArea.Intersects(rcRightMargin)) { surfaceWindow->FillRectangle(rcRightMargin, vs.styles[STYLE_DEFAULT].back); } } else { // Else separate view so separate paint event but leftMargin included to allow overlap PRectangle rcLeftMargin = rcArea; rcLeftMargin.left = 0; rcLeftMargin.right = rcLeftMargin.left + vs.leftMarginWidth; if (rcArea.Intersects(rcLeftMargin)) { surfaceWindow->FillRectangle(rcLeftMargin, vs.styles[STYLE_DEFAULT].back); } } } if (paintState == paintAbandoned) { // Either styling or NotifyUpdateUI noticed that painting is needed // outside the current painting rectangle //Platform::DebugPrintf("Abandoning paint\n"); if (Wrapping()) { if (paintAbandonedByStyling) { // Styling has spilled over a line end, such as occurs by starting a multiline // comment. The width of subsequent text may have changed, so rewrap. NeedWrapping(cs.DocFromDisplay(topLine)); } } return; } view.PaintText(surfaceWindow, *this, rcArea, rcClient, vs); if (horizontalScrollBarVisible && trackLineWidth && (view.lineWidthMaxSeen > scrollWidth)) { if (FineTickerAvailable()) { scrollWidth = view.lineWidthMaxSeen; if (!FineTickerRunning(tickWiden)) { FineTickerStart(tickWiden, 50, 5); } } } NotifyPainted(); } // This is mostly copied from the Paint method but with some things omitted // such as the margin markers, line numbers, selection and caret // Should be merged back into a combined Draw method. long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) { if (!pfr) return 0; AutoSurface surface(pfr->hdc, this, SC_TECHNOLOGY_DEFAULT); if (!surface) return 0; AutoSurface surfaceMeasure(pfr->hdcTarget, this, SC_TECHNOLOGY_DEFAULT); if (!surfaceMeasure) { return 0; } return view.FormatRange(draw, pfr, surface, surfaceMeasure, *this, vs); } int Editor::TextWidth(int style, const char *text) { RefreshStyleData(); AutoSurface surface(this); if (surface) { return static_cast(surface->WidthText(vs.styles[style].font, text, istrlen(text))); } else { return 1; } } // Empty method is overridden on GTK+ to show / hide scrollbars void Editor::ReconfigureScrollBars() {} void Editor::SetScrollBars() { RefreshStyleData(); int nMax = MaxScrollPos(); int nPage = LinesOnScreen(); bool modified = ModifyScrollBars(nMax + nPage - 1, nPage); if (modified) { DwellEnd(true); } // TODO: ensure always showing as many lines as possible // May not be, if, for example, window made larger if (topLine > MaxScrollPos()) { SetTopLine(Platform::Clamp(topLine, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); } if (modified) { if (!AbandonPaint()) Redraw(); } //Platform::DebugPrintf("end max = %d page = %d\n", nMax, nPage); } void Editor::ChangeSize() { DropGraphics(false); SetScrollBars(); if (Wrapping()) { PRectangle rcTextArea = GetClientRectangle(); rcTextArea.left = static_cast(vs.textStart); rcTextArea.right -= vs.rightMarginWidth; if (wrapWidth != rcTextArea.Width()) { NeedWrapping(); Redraw(); } } } int Editor::RealizeVirtualSpace(int position, unsigned int virtualSpace) { if (virtualSpace > 0) { const int line = pdoc->LineFromPosition(position); const int indent = pdoc->GetLineIndentPosition(line); if (indent == position) { return pdoc->SetLineIndentation(line, pdoc->GetLineIndentation(line) + virtualSpace); } else { std::string spaceText(virtualSpace, ' '); const int lengthInserted = pdoc->InsertString(position, spaceText.c_str(), virtualSpace); position += lengthInserted; } } return position; } SelectionPosition Editor::RealizeVirtualSpace(const SelectionPosition &position) { // Return the new position with no virtual space return SelectionPosition(RealizeVirtualSpace(position.Position(), position.VirtualSpace())); } void Editor::AddChar(char ch) { char s[2]; s[0] = ch; s[1] = '\0'; AddCharUTF(s, 1); } void Editor::FilterSelections() { if (!additionalSelectionTyping && (sel.Count() > 1)) { InvalidateWholeSelection(); sel.DropAdditionalRanges(); } } static bool cmpSelPtrs(const SelectionRange *a, const SelectionRange *b) { return *a < *b; } // AddCharUTF inserts an array of bytes which may or may not be in UTF-8. void Editor::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) { FilterSelections(); { UndoGroup ug(pdoc, (sel.Count() > 1) || !sel.Empty() || inOverstrike); // Vector elements point into selection in order to change selection. std::vector selPtrs; for (size_t r = 0; r < sel.Count(); r++) { selPtrs.push_back(&sel.Range(r)); } // Order selections by position in document. std::sort(selPtrs.begin(), selPtrs.end(), cmpSelPtrs); // Loop in reverse to avoid disturbing positions of selections yet to be processed. for (std::vector::reverse_iterator rit = selPtrs.rbegin(); rit != selPtrs.rend(); ++rit) { SelectionRange *currentSel = *rit; if (!RangeContainsProtected(currentSel->Start().Position(), currentSel->End().Position())) { int positionInsert = currentSel->Start().Position(); if (!currentSel->Empty()) { if (currentSel->Length()) { pdoc->DeleteChars(positionInsert, currentSel->Length()); currentSel->ClearVirtualSpace(); } else { // Range is all virtual so collapse to start of virtual space currentSel->MinimizeVirtualSpace(); } } else if (inOverstrike) { if (positionInsert < pdoc->Length()) { if (!pdoc->IsPositionInLineEnd(positionInsert)) { pdoc->DelChar(positionInsert); currentSel->ClearVirtualSpace(); } } } positionInsert = RealizeVirtualSpace(positionInsert, currentSel->caret.VirtualSpace()); const int lengthInserted = pdoc->InsertString(positionInsert, s, len); if (lengthInserted > 0) { currentSel->caret.SetPosition(positionInsert + lengthInserted); currentSel->anchor.SetPosition(positionInsert + lengthInserted); } currentSel->ClearVirtualSpace(); // If in wrap mode rewrap current line so EnsureCaretVisible has accurate information if (Wrapping()) { AutoSurface surface(this); if (surface) { if (WrapOneLine(surface, pdoc->LineFromPosition(positionInsert))) { SetScrollBars(); SetVerticalScrollPos(); Redraw(); } } } } } } if (Wrapping()) { SetScrollBars(); } ThinRectangularRange(); // If in wrap mode rewrap current line so EnsureCaretVisible has accurate information EnsureCaretVisible(); // Avoid blinking during rapid typing: ShowCaretAtCurrentPosition(); if ((caretSticky == SC_CARETSTICKY_OFF) || ((caretSticky == SC_CARETSTICKY_WHITESPACE) && !IsAllSpacesOrTabs(s, len))) { SetLastXChosen(); } if (treatAsDBCS) { NotifyChar((static_cast(s[0]) << 8) | static_cast(s[1])); } else if (len > 0) { int byte = static_cast(s[0]); if ((byte < 0xC0) || (1 == len)) { // Handles UTF-8 characters between 0x01 and 0x7F and single byte // characters when not in UTF-8 mode. // Also treats \0 and naked trail bytes 0x80 to 0xBF as valid // characters representing themselves. } else { unsigned int utf32[1] = { 0 }; UTF32FromUTF8(s, len, utf32, ELEMENTS(utf32)); byte = utf32[0]; } NotifyChar(byte); } if (recordingMacro) { NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast(s)); } } void Editor::ClearBeforeTentativeStart() { // Make positions for the first composition string. FilterSelections(); UndoGroup ug(pdoc, (sel.Count() > 1) || !sel.Empty() || inOverstrike); for (size_t r = 0; rDeleteChars(positionInsert, sel.Range(r).Length()); sel.Range(r).ClearVirtualSpace(); } else { // Range is all virtual so collapse to start of virtual space sel.Range(r).MinimizeVirtualSpace(); } } RealizeVirtualSpace(positionInsert, sel.Range(r).caret.VirtualSpace()); sel.Range(r).ClearVirtualSpace(); } } } void Editor::InsertPaste(const char *text, int len) { if (multiPasteMode == SC_MULTIPASTE_ONCE) { SelectionPosition selStart = sel.Start(); selStart = RealizeVirtualSpace(selStart); const int lengthInserted = pdoc->InsertString(selStart.Position(), text, len); if (lengthInserted > 0) { SetEmptySelection(selStart.Position() + lengthInserted); } } else { // SC_MULTIPASTE_EACH for (size_t r=0; rDeleteChars(positionInsert, sel.Range(r).Length()); sel.Range(r).ClearVirtualSpace(); } else { // Range is all virtual so collapse to start of virtual space sel.Range(r).MinimizeVirtualSpace(); } } positionInsert = RealizeVirtualSpace(positionInsert, sel.Range(r).caret.VirtualSpace()); const int lengthInserted = pdoc->InsertString(positionInsert, text, len); if (lengthInserted > 0) { sel.Range(r).caret.SetPosition(positionInsert + lengthInserted); sel.Range(r).anchor.SetPosition(positionInsert + lengthInserted); } sel.Range(r).ClearVirtualSpace(); } } } } void Editor::InsertPasteShape(const char *text, int len, PasteShape shape) { std::string convertedText; if (convertPastes) { // Convert line endings of the paste into our local line-endings mode convertedText = Document::TransformLineEnds(text, len, pdoc->eolMode); len = static_cast(convertedText.length()); text = convertedText.c_str(); } if (shape == pasteRectangular) { PasteRectangular(sel.Start(), text, len); } else { if (shape == pasteLine) { int insertPos = pdoc->LineStart(pdoc->LineFromPosition(sel.MainCaret())); int lengthInserted = pdoc->InsertString(insertPos, text, len); // add the newline if necessary if ((len > 0) && (text[len - 1] != '\n' && text[len - 1] != '\r')) { const char *endline = StringFromEOLMode(pdoc->eolMode); int length = static_cast(strlen(endline)); lengthInserted += pdoc->InsertString(insertPos + lengthInserted, endline, length); } if (sel.MainCaret() == insertPos) { SetEmptySelection(sel.MainCaret() + lengthInserted); } } else { InsertPaste(text, len); } } } void Editor::ClearSelection(bool retainMultipleSelections) { if (!sel.IsRectangular() && !retainMultipleSelections) FilterSelections(); UndoGroup ug(pdoc); for (size_t r=0; rDeleteChars(sel.Range(r).Start().Position(), sel.Range(r).Length()); sel.Range(r) = SelectionRange(sel.Range(r).Start()); } } } ThinRectangularRange(); sel.RemoveDuplicates(); ClaimSelection(); SetHoverIndicatorPosition(sel.MainCaret()); } void Editor::ClearAll() { { UndoGroup ug(pdoc); if (0 != pdoc->Length()) { pdoc->DeleteChars(0, pdoc->Length()); } if (!pdoc->IsReadOnly()) { cs.Clear(); pdoc->AnnotationClearAll(); pdoc->MarginClearAll(); } } view.ClearAllTabstops(); sel.Clear(); SetTopLine(0); SetVerticalScrollPos(); InvalidateStyleRedraw(); } void Editor::ClearDocumentStyle() { Decoration *deco = pdoc->decorations.root; while (deco) { // Save next in case deco deleted Decoration *decoNext = deco->next; if (deco->indicator < INDIC_CONTAINER) { pdoc->decorations.SetCurrentIndicator(deco->indicator); pdoc->DecorationFillRange(0, 0, pdoc->Length()); } deco = decoNext; } pdoc->StartStyling(0, '\377'); pdoc->SetStyleFor(pdoc->Length(), 0); cs.ShowAll(); SetAnnotationHeights(0, pdoc->LinesTotal()); pdoc->ClearLevels(); } void Editor::CopyAllowLine() { SelectionText selectedText; CopySelectionRange(&selectedText, true); CopyToClipboard(selectedText); } void Editor::Cut() { pdoc->CheckReadOnly(); if (!pdoc->IsReadOnly() && !SelectionContainsProtected()) { Copy(); ClearSelection(); } } void Editor::PasteRectangular(SelectionPosition pos, const char *ptr, int len) { if (pdoc->IsReadOnly() || SelectionContainsProtected()) { return; } sel.Clear(); sel.RangeMain() = SelectionRange(pos); int line = pdoc->LineFromPosition(sel.MainCaret()); UndoGroup ug(pdoc); sel.RangeMain().caret = RealizeVirtualSpace(sel.RangeMain().caret); int xInsert = XFromPosition(sel.RangeMain().caret); bool prevCr = false; while ((len > 0) && IsEOLChar(ptr[len-1])) len--; for (int i = 0; i < len; i++) { if (IsEOLChar(ptr[i])) { if ((ptr[i] == '\r') || (!prevCr)) line++; if (line >= pdoc->LinesTotal()) { if (pdoc->eolMode != SC_EOL_LF) pdoc->InsertString(pdoc->Length(), "\r", 1); if (pdoc->eolMode != SC_EOL_CR) pdoc->InsertString(pdoc->Length(), "\n", 1); } // Pad the end of lines with spaces if required sel.RangeMain().caret.SetPosition(PositionFromLineX(line, xInsert)); if ((XFromPosition(sel.MainCaret()) < xInsert) && (i + 1 < len)) { while (XFromPosition(sel.MainCaret()) < xInsert) { assert(pdoc); const int lengthInserted = pdoc->InsertString(sel.MainCaret(), " ", 1); sel.RangeMain().caret.Add(lengthInserted); } } prevCr = ptr[i] == '\r'; } else { const int lengthInserted = pdoc->InsertString(sel.MainCaret(), ptr + i, 1); sel.RangeMain().caret.Add(lengthInserted); prevCr = false; } } SetEmptySelection(pos); } bool Editor::CanPaste() { return !pdoc->IsReadOnly() && !SelectionContainsProtected(); } void Editor::Clear() { // If multiple selections, don't delete EOLS if (sel.Empty()) { bool singleVirtual = false; if ((sel.Count() == 1) && !RangeContainsProtected(sel.MainCaret(), sel.MainCaret() + 1) && sel.RangeMain().Start().VirtualSpace()) { singleVirtual = true; } UndoGroup ug(pdoc, (sel.Count() > 1) || singleVirtual); for (size_t r=0; rIsPositionInLineEnd(sel.Range(r).caret.Position())) { pdoc->DelChar(sel.Range(r).caret.Position()); sel.Range(r).ClearVirtualSpace(); } // else multiple selection so don't eat line ends } else { sel.Range(r).ClearVirtualSpace(); } } } else { ClearSelection(); } sel.RemoveDuplicates(); ShowCaretAtCurrentPosition(); // Avoid blinking } void Editor::SelectAll() { sel.Clear(); SetSelection(0, pdoc->Length()); Redraw(); } void Editor::Undo() { if (pdoc->CanUndo()) { InvalidateCaret(); int newPos = pdoc->Undo(); if (newPos >= 0) SetEmptySelection(newPos); EnsureCaretVisible(); } } void Editor::Redo() { if (pdoc->CanRedo()) { int newPos = pdoc->Redo(); if (newPos >= 0) SetEmptySelection(newPos); EnsureCaretVisible(); } } void Editor::DelCharBack(bool allowLineStartDeletion) { RefreshStyleData(); if (!sel.IsRectangular()) FilterSelections(); if (sel.IsRectangular()) allowLineStartDeletion = false; UndoGroup ug(pdoc, (sel.Count() > 1) || !sel.Empty()); if (sel.Empty()) { for (size_t r=0; rLineFromPosition(sel.Range(r).caret.Position()); if (allowLineStartDeletion || (pdoc->LineStart(lineCurrentPos) != sel.Range(r).caret.Position())) { if (pdoc->GetColumn(sel.Range(r).caret.Position()) <= pdoc->GetLineIndentation(lineCurrentPos) && pdoc->GetColumn(sel.Range(r).caret.Position()) > 0 && pdoc->backspaceUnindents) { UndoGroup ugInner(pdoc, !ug.Needed()); int indentation = pdoc->GetLineIndentation(lineCurrentPos); int indentationStep = pdoc->IndentSize(); int indentationChange = indentation % indentationStep; if (indentationChange == 0) indentationChange = indentationStep; const int posSelect = pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationChange); // SetEmptySelection sel.Range(r) = SelectionRange(posSelect); } else { pdoc->DelCharBack(sel.Range(r).caret.Position()); } } } } else { sel.Range(r).ClearVirtualSpace(); } } ThinRectangularRange(); } else { ClearSelection(); } sel.RemoveDuplicates(); ContainerNeedsUpdate(SC_UPDATE_SELECTION); // Avoid blinking during rapid typing: ShowCaretAtCurrentPosition(); } int Editor::ModifierFlags(bool shift, bool ctrl, bool alt, bool meta, bool super) { return (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0) | (meta ? SCI_META : 0) | (super ? SCI_SUPER : 0); } void Editor::NotifyFocus(bool focus) { SCNotification scn = {}; scn.nmhdr.code = focus ? SCN_FOCUSIN : SCN_FOCUSOUT; NotifyParent(scn); } void Editor::SetCtrlID(int identifier) { ctrlID = identifier; } void Editor::NotifyStyleToNeeded(int endStyleNeeded) { SCNotification scn = {}; scn.nmhdr.code = SCN_STYLENEEDED; scn.position = endStyleNeeded; NotifyParent(scn); } void Editor::NotifyStyleNeeded(Document *, void *, int endStyleNeeded) { NotifyStyleToNeeded(endStyleNeeded); } void Editor::NotifyLexerChanged(Document *, void *) { } void Editor::NotifyErrorOccurred(Document *, void *, int status) { errorStatus = status; } void Editor::NotifyChar(int ch) { SCNotification scn = {}; scn.nmhdr.code = SCN_CHARADDED; scn.ch = ch; NotifyParent(scn); } void Editor::NotifySavePoint(bool isSavePoint) { SCNotification scn = {}; if (isSavePoint) { scn.nmhdr.code = SCN_SAVEPOINTREACHED; } else { scn.nmhdr.code = SCN_SAVEPOINTLEFT; } NotifyParent(scn); } void Editor::NotifyModifyAttempt() { SCNotification scn = {}; scn.nmhdr.code = SCN_MODIFYATTEMPTRO; NotifyParent(scn); } void Editor::NotifyDoubleClick(Point pt, int modifiers) { SCNotification scn = {}; scn.nmhdr.code = SCN_DOUBLECLICK; scn.line = LineFromLocation(pt); scn.position = PositionFromLocation(pt, true); scn.modifiers = modifiers; NotifyParent(scn); } void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) { NotifyDoubleClick(pt, ModifierFlags(shift, ctrl, alt)); } void Editor::NotifyHotSpotDoubleClicked(int position, int modifiers) { SCNotification scn = {}; scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK; scn.position = position; scn.modifiers = modifiers; NotifyParent(scn); } void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) { NotifyHotSpotDoubleClicked(position, ModifierFlags(shift, ctrl, alt)); } void Editor::NotifyHotSpotClicked(int position, int modifiers) { SCNotification scn = {}; scn.nmhdr.code = SCN_HOTSPOTCLICK; scn.position = position; scn.modifiers = modifiers; NotifyParent(scn); } void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) { NotifyHotSpotClicked(position, ModifierFlags(shift, ctrl, alt)); } void Editor::NotifyHotSpotReleaseClick(int position, int modifiers) { SCNotification scn = {}; scn.nmhdr.code = SCN_HOTSPOTRELEASECLICK; scn.position = position; scn.modifiers = modifiers; NotifyParent(scn); } void Editor::NotifyHotSpotReleaseClick(int position, bool shift, bool ctrl, bool alt) { NotifyHotSpotReleaseClick(position, ModifierFlags(shift, ctrl, alt)); } bool Editor::NotifyUpdateUI() { if (needUpdateUI) { SCNotification scn = {}; scn.nmhdr.code = SCN_UPDATEUI; scn.updated = needUpdateUI; NotifyParent(scn); needUpdateUI = 0; return true; } return false; } void Editor::NotifyPainted() { SCNotification scn = {}; scn.nmhdr.code = SCN_PAINTED; NotifyParent(scn); } void Editor::NotifyIndicatorClick(bool click, int position, int modifiers) { int mask = pdoc->decorations.AllOnFor(position); if ((click && mask) || pdoc->decorations.clickNotified) { SCNotification scn = {}; pdoc->decorations.clickNotified = click; scn.nmhdr.code = click ? SCN_INDICATORCLICK : SCN_INDICATORRELEASE; scn.modifiers = modifiers; scn.position = position; NotifyParent(scn); } } void Editor::NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt) { NotifyIndicatorClick(click, position, ModifierFlags(shift, ctrl, alt)); } bool Editor::NotifyMarginClick(Point pt, int modifiers) { const int marginClicked = vs.MarginFromLocation(pt); if ((marginClicked >= 0) && vs.ms[marginClicked].sensitive) { int position = pdoc->LineStart(LineFromLocation(pt)); if ((vs.ms[marginClicked].mask & SC_MASK_FOLDERS) && (foldAutomatic & SC_AUTOMATICFOLD_CLICK)) { const bool ctrl = (modifiers & SCI_CTRL) != 0; const bool shift = (modifiers & SCI_SHIFT) != 0; int lineClick = pdoc->LineFromPosition(position); if (shift && ctrl) { FoldAll(SC_FOLDACTION_TOGGLE); } else { int levelClick = pdoc->GetLevel(lineClick); if (levelClick & SC_FOLDLEVELHEADERFLAG) { if (shift) { // Ensure all children visible FoldExpand(lineClick, SC_FOLDACTION_EXPAND, levelClick); } else if (ctrl) { FoldExpand(lineClick, SC_FOLDACTION_TOGGLE, levelClick); } else { // Toggle this line FoldLine(lineClick, SC_FOLDACTION_TOGGLE); } } } return true; } SCNotification scn = {}; scn.nmhdr.code = SCN_MARGINCLICK; scn.modifiers = modifiers; scn.position = position; scn.margin = marginClicked; NotifyParent(scn); return true; } else { return false; } } bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) { return NotifyMarginClick(pt, ModifierFlags(shift, ctrl, alt)); } bool Editor::NotifyMarginRightClick(Point pt, int modifiers) { int marginRightClicked = vs.MarginFromLocation(pt); if ((marginRightClicked >= 0) && vs.ms[marginRightClicked].sensitive) { int position = pdoc->LineStart(LineFromLocation(pt)); SCNotification scn = {}; scn.nmhdr.code = SCN_MARGINRIGHTCLICK; scn.modifiers = modifiers; scn.position = position; scn.margin = marginRightClicked; NotifyParent(scn); return true; } else { return false; } } void Editor::NotifyNeedShown(int pos, int len) { SCNotification scn = {}; scn.nmhdr.code = SCN_NEEDSHOWN; scn.position = pos; scn.length = len; NotifyParent(scn); } void Editor::NotifyDwelling(Point pt, bool state) { SCNotification scn = {}; scn.nmhdr.code = state ? SCN_DWELLSTART : SCN_DWELLEND; scn.position = PositionFromLocation(pt, true); scn.x = static_cast(pt.x + vs.ExternalMarginWidth()); scn.y = static_cast(pt.y); NotifyParent(scn); } void Editor::NotifyZoom() { SCNotification scn = {}; scn.nmhdr.code = SCN_ZOOM; NotifyParent(scn); } // Notifications from document void Editor::NotifyModifyAttempt(Document *, void *) { //Platform::DebugPrintf("** Modify Attempt\n"); NotifyModifyAttempt(); } void Editor::NotifySavePoint(Document *, void *, bool atSavePoint) { //Platform::DebugPrintf("** Save Point %s\n", atSavePoint ? "On" : "Off"); NotifySavePoint(atSavePoint); } void Editor::CheckModificationForWrap(DocModification mh) { if (mh.modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) { view.llc.Invalidate(LineLayout::llCheckTextAndStyle); int lineDoc = pdoc->LineFromPosition(mh.position); int lines = Platform::Maximum(0, mh.linesAdded); if (Wrapping()) { NeedWrapping(lineDoc, lineDoc + lines + 1); } RefreshStyleData(); // Fix up annotation heights SetAnnotationHeights(lineDoc, lineDoc + lines + 2); } } // Move a position so it is still after the same character as before the insertion. static inline int MovePositionForInsertion(int position, int startInsertion, int length) { if (position > startInsertion) { return position + length; } return position; } // Move a position so it is still after the same character as before the deletion if that // character is still present else after the previous surviving character. static inline int MovePositionForDeletion(int position, int startDeletion, int length) { if (position > startDeletion) { int endDeletion = startDeletion + length; if (position > endDeletion) { return position - length; } else { return startDeletion; } } else { return position; } } void Editor::NotifyModified(Document *, DocModification mh, void *) { ContainerNeedsUpdate(SC_UPDATE_CONTENT); if (paintState == painting) { CheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length)); } if (mh.modificationType & SC_MOD_CHANGELINESTATE) { if (paintState == painting) { CheckForChangeOutsidePaint( Range(pdoc->LineStart(mh.line), pdoc->LineStart(mh.line + 1))); } else { // Could check that change is before last visible line. Redraw(); } } if (mh.modificationType & SC_MOD_CHANGETABSTOPS) { Redraw(); } if (mh.modificationType & SC_MOD_LEXERSTATE) { if (paintState == painting) { CheckForChangeOutsidePaint( Range(mh.position, mh.position + mh.length)); } else { Redraw(); } } if (mh.modificationType & (SC_MOD_CHANGESTYLE | SC_MOD_CHANGEINDICATOR)) { if (mh.modificationType & SC_MOD_CHANGESTYLE) { pdoc->IncrementStyleClock(); } if (paintState == notPainting) { if (mh.position < pdoc->LineStart(topLine)) { // Styling performed before this view Redraw(); } else { InvalidateRange(mh.position, mh.position + mh.length); } } if (mh.modificationType & SC_MOD_CHANGESTYLE) { view.llc.Invalidate(LineLayout::llCheckTextAndStyle); } } else { // Move selection and brace highlights if (mh.modificationType & SC_MOD_INSERTTEXT) { sel.MovePositions(true, mh.position, mh.length); braces[0] = MovePositionForInsertion(braces[0], mh.position, mh.length); braces[1] = MovePositionForInsertion(braces[1], mh.position, mh.length); } else if (mh.modificationType & SC_MOD_DELETETEXT) { sel.MovePositions(false, mh.position, mh.length); braces[0] = MovePositionForDeletion(braces[0], mh.position, mh.length); braces[1] = MovePositionForDeletion(braces[1], mh.position, mh.length); } if ((mh.modificationType & (SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE)) && cs.HiddenLines()) { // Some lines are hidden so may need shown. const int lineOfPos = pdoc->LineFromPosition(mh.position); int endNeedShown = mh.position; if (mh.modificationType & SC_MOD_BEFOREINSERT) { if (pdoc->ContainsLineEnd(mh.text, mh.length) && (mh.position != pdoc->LineStart(lineOfPos))) endNeedShown = pdoc->LineStart(lineOfPos+1); } else if (mh.modificationType & SC_MOD_BEFOREDELETE) { // Extend the need shown area over any folded lines endNeedShown = mh.position + mh.length; int lineLast = pdoc->LineFromPosition(mh.position+mh.length); for (int line = lineOfPos; line <= lineLast; line++) { const int lineMaxSubord = pdoc->GetLastChild(line, -1, -1); if (lineLast < lineMaxSubord) { lineLast = lineMaxSubord; endNeedShown = pdoc->LineEnd(lineLast); } } } NeedShown(mh.position, endNeedShown - mh.position); } if (mh.linesAdded != 0) { // Update contraction state for inserted and removed lines // lineOfPos should be calculated in context of state before modification, shouldn't it int lineOfPos = pdoc->LineFromPosition(mh.position); if (mh.position > pdoc->LineStart(lineOfPos)) lineOfPos++; // Affecting subsequent lines if (mh.linesAdded > 0) { cs.InsertLines(lineOfPos, mh.linesAdded); } else { cs.DeleteLines(lineOfPos, -mh.linesAdded); } view.LinesAddedOrRemoved(lineOfPos, mh.linesAdded); } if (mh.modificationType & SC_MOD_CHANGEANNOTATION) { int lineDoc = pdoc->LineFromPosition(mh.position); if (vs.annotationVisible) { cs.SetHeight(lineDoc, cs.GetHeight(lineDoc) + mh.annotationLinesAdded); Redraw(); } } CheckModificationForWrap(mh); if (mh.linesAdded != 0) { // Avoid scrolling of display if change before current display if (mh.position < posTopLine && !CanDeferToLastStep(mh)) { int newTop = Platform::Clamp(topLine + mh.linesAdded, 0, MaxScrollPos()); if (newTop != topLine) { SetTopLine(newTop); SetVerticalScrollPos(); } } if (paintState == notPainting && !CanDeferToLastStep(mh)) { QueueIdleWork(WorkNeeded::workStyle, pdoc->Length()); Redraw(); } } else { if (paintState == notPainting && mh.length && !CanEliminate(mh)) { QueueIdleWork(WorkNeeded::workStyle, mh.position + mh.length); InvalidateRange(mh.position, mh.position + mh.length); } } } if (mh.linesAdded != 0 && !CanDeferToLastStep(mh)) { SetScrollBars(); } if ((mh.modificationType & SC_MOD_CHANGEMARKER) || (mh.modificationType & SC_MOD_CHANGEMARGIN)) { if ((!willRedrawAll) && ((paintState == notPainting) || !PaintContainsMargin())) { if (mh.modificationType & SC_MOD_CHANGEFOLD) { // Fold changes can affect the drawing of following lines so redraw whole margin RedrawSelMargin(marginView.highlightDelimiter.isEnabled ? -1 : mh.line - 1, true); } else { RedrawSelMargin(mh.line); } } } if ((mh.modificationType & SC_MOD_CHANGEFOLD) && (foldAutomatic & SC_AUTOMATICFOLD_CHANGE)) { FoldChanged(mh.line, mh.foldLevelNow, mh.foldLevelPrev); } // NOW pay the piper WRT "deferred" visual updates if (IsLastStep(mh)) { SetScrollBars(); Redraw(); } // If client wants to see this modification if (mh.modificationType & modEventMask) { if ((mh.modificationType & (SC_MOD_CHANGESTYLE | SC_MOD_CHANGEINDICATOR)) == 0) { // Real modification made to text of document. NotifyChange(); // Send EN_CHANGE } SCNotification scn = {}; scn.nmhdr.code = SCN_MODIFIED; scn.position = mh.position; scn.modificationType = mh.modificationType; scn.text = mh.text; scn.length = mh.length; scn.linesAdded = mh.linesAdded; scn.line = mh.line; scn.foldLevelNow = mh.foldLevelNow; scn.foldLevelPrev = mh.foldLevelPrev; scn.token = mh.token; scn.annotationLinesAdded = mh.annotationLinesAdded; NotifyParent(scn); } } void Editor::NotifyDeleted(Document *, void *) { /* Do nothing */ } void Editor::NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { // Enumerates all macroable messages switch (iMessage) { case SCI_CUT: case SCI_COPY: case SCI_PASTE: case SCI_CLEAR: case SCI_REPLACESEL: case SCI_ADDTEXT: case SCI_INSERTTEXT: case SCI_APPENDTEXT: case SCI_CLEARALL: case SCI_SELECTALL: case SCI_GOTOLINE: case SCI_GOTOPOS: case SCI_SEARCHANCHOR: case SCI_SEARCHNEXT: case SCI_SEARCHPREV: case SCI_LINEDOWN: case SCI_LINEDOWNEXTEND: case SCI_PARADOWN: case SCI_PARADOWNEXTEND: case SCI_LINEUP: case SCI_LINEUPEXTEND: case SCI_PARAUP: case SCI_PARAUPEXTEND: case SCI_CHARLEFT: case SCI_CHARLEFTEXTEND: case SCI_CHARRIGHT: case SCI_CHARRIGHTEXTEND: case SCI_WORDLEFT: case SCI_WORDLEFTEXTEND: case SCI_WORDRIGHT: case SCI_WORDRIGHTEXTEND: case SCI_WORDPARTLEFT: case SCI_WORDPARTLEFTEXTEND: case SCI_WORDPARTRIGHT: case SCI_WORDPARTRIGHTEXTEND: case SCI_WORDLEFTEND: case SCI_WORDLEFTENDEXTEND: case SCI_WORDRIGHTEND: case SCI_WORDRIGHTENDEXTEND: case SCI_HOME: case SCI_HOMEEXTEND: case SCI_LINEEND: case SCI_LINEENDEXTEND: case SCI_HOMEWRAP: case SCI_HOMEWRAPEXTEND: case SCI_LINEENDWRAP: case SCI_LINEENDWRAPEXTEND: case SCI_DOCUMENTSTART: case SCI_DOCUMENTSTARTEXTEND: case SCI_DOCUMENTEND: case SCI_DOCUMENTENDEXTEND: case SCI_STUTTEREDPAGEUP: case SCI_STUTTEREDPAGEUPEXTEND: case SCI_STUTTEREDPAGEDOWN: case SCI_STUTTEREDPAGEDOWNEXTEND: case SCI_PAGEUP: case SCI_PAGEUPEXTEND: case SCI_PAGEDOWN: case SCI_PAGEDOWNEXTEND: case SCI_EDITTOGGLEOVERTYPE: case SCI_CANCEL: case SCI_DELETEBACK: case SCI_TAB: case SCI_BACKTAB: case SCI_FORMFEED: case SCI_VCHOME: case SCI_VCHOMEEXTEND: case SCI_VCHOMEWRAP: case SCI_VCHOMEWRAPEXTEND: case SCI_VCHOMEDISPLAY: case SCI_VCHOMEDISPLAYEXTEND: case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: case SCI_DELWORDRIGHTEND: case SCI_DELLINELEFT: case SCI_DELLINERIGHT: case SCI_LINECOPY: case SCI_LINECUT: case SCI_LINEDELETE: case SCI_LINETRANSPOSE: case SCI_LINEDUPLICATE: case SCI_LOWERCASE: case SCI_UPPERCASE: case SCI_LINESCROLLDOWN: case SCI_LINESCROLLUP: case SCI_DELETEBACKNOTLINE: case SCI_HOMEDISPLAY: case SCI_HOMEDISPLAYEXTEND: case SCI_LINEENDDISPLAY: case SCI_LINEENDDISPLAYEXTEND: case SCI_SETSELECTIONMODE: case SCI_LINEDOWNRECTEXTEND: case SCI_LINEUPRECTEXTEND: case SCI_CHARLEFTRECTEXTEND: case SCI_CHARRIGHTRECTEXTEND: case SCI_HOMERECTEXTEND: case SCI_VCHOMERECTEXTEND: case SCI_LINEENDRECTEXTEND: case SCI_PAGEUPRECTEXTEND: case SCI_PAGEDOWNRECTEXTEND: case SCI_SELECTIONDUPLICATE: case SCI_COPYALLOWLINE: case SCI_VERTICALCENTRECARET: case SCI_MOVESELECTEDLINESUP: case SCI_MOVESELECTEDLINESDOWN: case SCI_SCROLLTOSTART: case SCI_SCROLLTOEND: break; // Filter out all others like display changes. Also, newlines are redundant // with char insert messages. case SCI_NEWLINE: default: // printf("Filtered out %ld of macro recording\n", iMessage); return; } // Send notification SCNotification scn = {}; scn.nmhdr.code = SCN_MACRORECORD; scn.message = iMessage; scn.wParam = wParam; scn.lParam = lParam; NotifyParent(scn); } // Something has changed that the container should know about void Editor::ContainerNeedsUpdate(int flags) { needUpdateUI |= flags; } /** * Force scroll and keep position relative to top of window. * * If stuttered = true and not already at first/last row, move to first/last row of window. * If stuttered = true and already at first/last row, scroll as normal. */ void Editor::PageMove(int direction, Selection::selTypes selt, bool stuttered) { int topLineNew; SelectionPosition newPos; int currentLine = pdoc->LineFromPosition(sel.MainCaret()); int topStutterLine = topLine + caretYSlop; int bottomStutterLine = pdoc->LineFromPosition(PositionFromLocation( Point::FromInts(lastXChosen - xOffset, direction * vs.lineHeight * LinesToScroll()))) - caretYSlop - 1; if (stuttered && (direction < 0 && currentLine > topStutterLine)) { topLineNew = topLine; newPos = SPositionFromLocation(Point::FromInts(lastXChosen - xOffset, vs.lineHeight * caretYSlop), false, false, UserVirtualSpace()); } else if (stuttered && (direction > 0 && currentLine < bottomStutterLine)) { topLineNew = topLine; newPos = SPositionFromLocation(Point::FromInts(lastXChosen - xOffset, vs.lineHeight * (LinesToScroll() - caretYSlop)), false, false, UserVirtualSpace()); } else { Point pt = LocationFromPosition(sel.MainCaret()); topLineNew = Platform::Clamp( topLine + direction * LinesToScroll(), 0, MaxScrollPos()); newPos = SPositionFromLocation( Point::FromInts(lastXChosen - xOffset, static_cast(pt.y) + direction * (vs.lineHeight * LinesToScroll())), false, false, UserVirtualSpace()); } if (topLineNew != topLine) { SetTopLine(topLineNew); MovePositionTo(newPos, selt); Redraw(); SetVerticalScrollPos(); } else { MovePositionTo(newPos, selt); } } void Editor::ChangeCaseOfSelection(int caseMapping) { UndoGroup ug(pdoc); for (size_t r=0; r 0) { std::string sText = RangeText(currentNoVS.Start().Position(), currentNoVS.End().Position()); std::string sMapped = CaseMapString(sText, caseMapping); if (sMapped != sText) { size_t firstDifference = 0; while (sMapped[firstDifference] == sText[firstDifference]) firstDifference++; size_t lastDifferenceText = sText.size() - 1; size_t lastDifferenceMapped = sMapped.size() - 1; while (sMapped[lastDifferenceMapped] == sText[lastDifferenceText]) { lastDifferenceText--; lastDifferenceMapped--; } size_t endDifferenceText = sText.size() - 1 - lastDifferenceText; pdoc->DeleteChars( static_cast(currentNoVS.Start().Position() + firstDifference), static_cast(rangeBytes - firstDifference - endDifferenceText)); const int lengthChange = static_cast(lastDifferenceMapped - firstDifference + 1); const int lengthInserted = pdoc->InsertString( static_cast(currentNoVS.Start().Position() + firstDifference), sMapped.c_str() + firstDifference, lengthChange); // Automatic movement changes selection so reset to exactly the same as it was. int diffSizes = static_cast(sMapped.size() - sText.size()) + lengthInserted - lengthChange; if (diffSizes != 0) { if (current.anchor > current.caret) current.anchor.Add(diffSizes); else current.caret.Add(diffSizes); } sel.Range(r) = current; } } } } void Editor::LineTranspose() { int line = pdoc->LineFromPosition(sel.MainCaret()); if (line > 0) { UndoGroup ug(pdoc); const int startPrevious = pdoc->LineStart(line - 1); const std::string linePrevious = RangeText(startPrevious, pdoc->LineEnd(line - 1)); int startCurrent = pdoc->LineStart(line); const std::string lineCurrent = RangeText(startCurrent, pdoc->LineEnd(line)); pdoc->DeleteChars(startCurrent, static_cast(lineCurrent.length())); pdoc->DeleteChars(startPrevious, static_cast(linePrevious.length())); startCurrent -= static_cast(linePrevious.length()); startCurrent += pdoc->InsertString(startPrevious, lineCurrent.c_str(), static_cast(lineCurrent.length())); pdoc->InsertString(startCurrent, linePrevious.c_str(), static_cast(linePrevious.length())); // Move caret to start of current line MovePositionTo(SelectionPosition(startCurrent)); } } void Editor::Duplicate(bool forLine) { if (sel.Empty()) { forLine = true; } UndoGroup ug(pdoc); const char *eol = ""; int eolLen = 0; if (forLine) { eol = StringFromEOLMode(pdoc->eolMode); eolLen = istrlen(eol); } for (size_t r=0; rLineFromPosition(sel.Range(r).caret.Position()); start = SelectionPosition(pdoc->LineStart(line)); end = SelectionPosition(pdoc->LineEnd(line)); } std::string text = RangeText(start.Position(), end.Position()); int lengthInserted = eolLen; if (forLine) lengthInserted = pdoc->InsertString(end.Position(), eol, eolLen); pdoc->InsertString(end.Position() + lengthInserted, text.c_str(), static_cast(text.length())); } if (sel.Count() && sel.IsRectangular()) { SelectionPosition last = sel.Last(); if (forLine) { int line = pdoc->LineFromPosition(last.Position()); last = SelectionPosition(last.Position() + pdoc->LineStart(line+1) - pdoc->LineStart(line)); } if (sel.Rectangular().anchor > sel.Rectangular().caret) sel.Rectangular().anchor = last; else sel.Rectangular().caret = last; SetRectangularRange(); } } void Editor::CancelModes() { sel.SetMoveExtends(false); } void Editor::NewLine() { InvalidateWholeSelection(); if (sel.IsRectangular() || !additionalSelectionTyping) { // Remove non-main ranges sel.DropAdditionalRanges(); } UndoGroup ug(pdoc, !sel.Empty() || (sel.Count() > 1)); // Clear each range if (!sel.Empty()) { ClearSelection(); } // Insert each line end size_t countInsertions = 0; for (size_t r = 0; r < sel.Count(); r++) { sel.Range(r).ClearVirtualSpace(); const char *eol = StringFromEOLMode(pdoc->eolMode); const int positionInsert = sel.Range(r).caret.Position(); const int insertLength = pdoc->InsertString(positionInsert, eol, istrlen(eol)); if (insertLength > 0) { sel.Range(r) = SelectionRange(positionInsert + insertLength); countInsertions++; } } // Perform notifications after all the changes as the application may change the // selections in response to the characters. for (size_t i = 0; i < countInsertions; i++) { const char *eol = StringFromEOLMode(pdoc->eolMode); while (*eol) { NotifyChar(*eol); if (recordingMacro) { char txt[2]; txt[0] = *eol; txt[1] = '\0'; NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast(txt)); } eol++; } } SetLastXChosen(); SetScrollBars(); EnsureCaretVisible(); // Avoid blinking during rapid typing: ShowCaretAtCurrentPosition(); } SelectionPosition Editor::PositionUpOrDown(SelectionPosition spStart, int direction, int lastX) { const Point pt = LocationFromPosition(spStart); int skipLines = 0; if (vs.annotationVisible) { const int lineDoc = pdoc->LineFromPosition(spStart.Position()); const Point ptStartLine = LocationFromPosition(pdoc->LineStart(lineDoc)); const int subLine = static_cast(pt.y - ptStartLine.y) / vs.lineHeight; if (direction < 0 && subLine == 0) { const int lineDisplay = cs.DisplayFromDoc(lineDoc); if (lineDisplay > 0) { skipLines = pdoc->AnnotationLines(cs.DocFromDisplay(lineDisplay - 1)); } } else if (direction > 0 && subLine >= (cs.GetHeight(lineDoc) - 1 - pdoc->AnnotationLines(lineDoc))) { skipLines = pdoc->AnnotationLines(lineDoc); } } const int newY = static_cast(pt.y) + (1 + skipLines) * direction * vs.lineHeight; if (lastX < 0) { lastX = static_cast(pt.x) + xOffset; } SelectionPosition posNew = SPositionFromLocation( Point::FromInts(lastX - xOffset, newY), false, false, UserVirtualSpace()); if (direction < 0) { // Line wrapping may lead to a location on the same line, so // seek back if that is the case. Point ptNew = LocationFromPosition(posNew.Position()); while ((posNew.Position() > 0) && (pt.y == ptNew.y)) { posNew.Add(-1); posNew.SetVirtualSpace(0); ptNew = LocationFromPosition(posNew.Position()); } } else if (direction > 0 && posNew.Position() != pdoc->Length()) { // There is an equivalent case when moving down which skips // over a line. Point ptNew = LocationFromPosition(posNew.Position()); while ((posNew.Position() > spStart.Position()) && (ptNew.y > newY)) { posNew.Add(-1); posNew.SetVirtualSpace(0); ptNew = LocationFromPosition(posNew.Position()); } } return posNew; } void Editor::CursorUpOrDown(int direction, Selection::selTypes selt) { SelectionPosition caretToUse = sel.Range(sel.Main()).caret; if (sel.IsRectangular()) { if (selt == Selection::noSel) { caretToUse = (direction > 0) ? sel.Limits().end : sel.Limits().start; } else { caretToUse = sel.Rectangular().caret; } } if (selt == Selection::selRectangle) { const SelectionRange rangeBase = sel.IsRectangular() ? sel.Rectangular() : sel.RangeMain(); if (!sel.IsRectangular()) { InvalidateWholeSelection(); sel.DropAdditionalRanges(); } const SelectionPosition posNew = MovePositionSoVisible( PositionUpOrDown(caretToUse, direction, lastXChosen), direction); sel.selType = Selection::selRectangle; sel.Rectangular() = SelectionRange(posNew, rangeBase.anchor); SetRectangularRange(); MovedCaret(posNew, caretToUse, true); } else { InvalidateWholeSelection(); if (!additionalSelectionTyping || (sel.IsRectangular())) { sel.DropAdditionalRanges(); } sel.selType = Selection::selStream; for (size_t r = 0; r < sel.Count(); r++) { const int lastX = (r == sel.Main()) ? lastXChosen : -1; const SelectionPosition spCaretNow = sel.Range(r).caret; const SelectionPosition posNew = MovePositionSoVisible( PositionUpOrDown(spCaretNow, direction, lastX), direction); sel.Range(r) = selt == Selection::selStream ? SelectionRange(posNew, sel.Range(r).anchor) : SelectionRange(posNew); } sel.RemoveDuplicates(); MovedCaret(sel.RangeMain().caret, caretToUse, true); } } void Editor::ParaUpOrDown(int direction, Selection::selTypes selt) { int lineDoc, savedPos = sel.MainCaret(); do { MovePositionTo(SelectionPosition(direction > 0 ? pdoc->ParaDown(sel.MainCaret()) : pdoc->ParaUp(sel.MainCaret())), selt); lineDoc = pdoc->LineFromPosition(sel.MainCaret()); if (direction > 0) { if (sel.MainCaret() >= pdoc->Length() && !cs.GetVisible(lineDoc)) { if (selt == Selection::noSel) { MovePositionTo(SelectionPosition(pdoc->LineEndPosition(savedPos))); } break; } } } while (!cs.GetVisible(lineDoc)); } Range Editor::RangeDisplayLine(int lineVisible) { RefreshStyleData(); AutoSurface surface(this); return view.RangeDisplayLine(surface, *this, lineVisible, vs); } int Editor::StartEndDisplayLine(int pos, bool start) { RefreshStyleData(); AutoSurface surface(this); int posRet = view.StartEndDisplayLine(surface, *this, pos, start, vs); if (posRet == INVALID_POSITION) { return pos; } else { return posRet; } } namespace { unsigned int WithExtends(unsigned int iMessage) { switch (iMessage) { case SCI_CHARLEFT: return SCI_CHARLEFTEXTEND; case SCI_CHARRIGHT: return SCI_CHARRIGHTEXTEND; case SCI_WORDLEFT: return SCI_WORDLEFTEXTEND; case SCI_WORDRIGHT: return SCI_WORDRIGHTEXTEND; case SCI_WORDLEFTEND: return SCI_WORDLEFTENDEXTEND; case SCI_WORDRIGHTEND: return SCI_WORDRIGHTENDEXTEND; case SCI_WORDPARTLEFT: return SCI_WORDPARTLEFTEXTEND; case SCI_WORDPARTRIGHT: return SCI_WORDPARTRIGHTEXTEND; case SCI_HOME: return SCI_HOMEEXTEND; case SCI_HOMEDISPLAY: return SCI_HOMEDISPLAYEXTEND; case SCI_HOMEWRAP: return SCI_HOMEWRAPEXTEND; case SCI_VCHOME: return SCI_VCHOMEEXTEND; case SCI_VCHOMEDISPLAY: return SCI_VCHOMEDISPLAYEXTEND; case SCI_VCHOMEWRAP: return SCI_VCHOMEWRAPEXTEND; case SCI_LINEEND: return SCI_LINEENDEXTEND; case SCI_LINEENDDISPLAY: return SCI_LINEENDDISPLAYEXTEND; case SCI_LINEENDWRAP: return SCI_LINEENDWRAPEXTEND; default: return iMessage; } } int NaturalDirection(unsigned int iMessage) { switch (iMessage) { case SCI_CHARLEFT: case SCI_CHARLEFTEXTEND: case SCI_CHARLEFTRECTEXTEND: case SCI_WORDLEFT: case SCI_WORDLEFTEXTEND: case SCI_WORDLEFTEND: case SCI_WORDLEFTENDEXTEND: case SCI_WORDPARTLEFT: case SCI_WORDPARTLEFTEXTEND: case SCI_HOME: case SCI_HOMEEXTEND: case SCI_HOMEDISPLAY: case SCI_HOMEDISPLAYEXTEND: case SCI_HOMEWRAP: case SCI_HOMEWRAPEXTEND: // VC_HOME* mostly goes back case SCI_VCHOME: case SCI_VCHOMEEXTEND: case SCI_VCHOMEDISPLAY: case SCI_VCHOMEDISPLAYEXTEND: case SCI_VCHOMEWRAP: case SCI_VCHOMEWRAPEXTEND: return -1; default: return 1; } } bool IsRectExtend(unsigned int iMessage) { switch (iMessage) { case SCI_CHARLEFTRECTEXTEND: case SCI_CHARRIGHTRECTEXTEND: case SCI_HOMERECTEXTEND: case SCI_VCHOMERECTEXTEND: case SCI_LINEENDRECTEXTEND: return true; default: return false; } } } int Editor::VCHomeDisplayPosition(int position) { const int homePos = pdoc->VCHomePosition(position); const int viewLineStart = StartEndDisplayLine(position, true); if (viewLineStart > homePos) return viewLineStart; else return homePos; } int Editor::VCHomeWrapPosition(int position) { const int homePos = pdoc->VCHomePosition(position); const int viewLineStart = StartEndDisplayLine(position, true); if ((viewLineStart < position) && (viewLineStart > homePos)) return viewLineStart; else return homePos; } int Editor::LineEndWrapPosition(int position) { const int endPos = StartEndDisplayLine(position, false); const int realEndPos = pdoc->LineEndPosition(position); if (endPos > realEndPos // if moved past visible EOLs || position >= endPos) // if at end of display line already return realEndPos; else return endPos; } int Editor::HorizontalMove(unsigned int iMessage) { if (sel.MoveExtends()) { iMessage = WithExtends(iMessage); } if (!multipleSelection && !sel.IsRectangular()) { // Simplify selection down to 1 sel.SetSelection(sel.RangeMain()); } // Invalidate each of the current selections InvalidateWholeSelection(); if (IsRectExtend(iMessage)) { const SelectionRange rangeBase = sel.IsRectangular() ? sel.Rectangular() : sel.RangeMain(); if (!sel.IsRectangular()) { sel.DropAdditionalRanges(); } // Will change to rectangular if not currently rectangular SelectionPosition spCaret = rangeBase.caret; switch (iMessage) { case SCI_CHARLEFTRECTEXTEND: if (pdoc->IsLineEndPosition(spCaret.Position()) && spCaret.VirtualSpace()) { spCaret.SetVirtualSpace(spCaret.VirtualSpace() - 1); } else if ((virtualSpaceOptions & SCVS_NOWRAPLINESTART) == 0 || pdoc->GetColumn(spCaret.Position()) > 0) { spCaret = SelectionPosition(spCaret.Position() - 1); } break; case SCI_CHARRIGHTRECTEXTEND: if ((virtualSpaceOptions & SCVS_RECTANGULARSELECTION) && pdoc->IsLineEndPosition(sel.MainCaret())) { spCaret.SetVirtualSpace(spCaret.VirtualSpace() + 1); } else { spCaret = SelectionPosition(spCaret.Position() + 1); } break; case SCI_HOMERECTEXTEND: spCaret = SelectionPosition(pdoc->LineStart(pdoc->LineFromPosition(spCaret.Position()))); break; case SCI_VCHOMERECTEXTEND: spCaret = SelectionPosition(pdoc->VCHomePosition(spCaret.Position())); break; case SCI_LINEENDRECTEXTEND: spCaret = SelectionPosition(pdoc->LineEndPosition(spCaret.Position())); break; } const int directionMove = (spCaret < rangeBase.caret) ? -1 : 1; spCaret = MovePositionSoVisible(spCaret, directionMove); sel.selType = Selection::selRectangle; sel.Rectangular() = SelectionRange(spCaret, rangeBase.anchor); SetRectangularRange(); } else if (sel.IsRectangular()) { // Not a rectangular extension so switch to stream. const SelectionPosition selAtLimit = (NaturalDirection(iMessage) > 0) ? sel.Limits().end : sel.Limits().start; sel.selType = Selection::selStream; sel.SetSelection(SelectionRange(selAtLimit)); } else { if (!additionalSelectionTyping) { InvalidateWholeSelection(); sel.DropAdditionalRanges(); } for (size_t r = 0; r < sel.Count(); r++) { const SelectionPosition spCaretNow = sel.Range(r).caret; SelectionPosition spCaret = spCaretNow; switch (iMessage) { case SCI_CHARLEFT: case SCI_CHARLEFTEXTEND: if (spCaret.VirtualSpace()) { spCaret.SetVirtualSpace(spCaret.VirtualSpace() - 1); } else if ((virtualSpaceOptions & SCVS_NOWRAPLINESTART) == 0 || pdoc->GetColumn(spCaret.Position()) > 0) { spCaret = SelectionPosition(spCaret.Position() - 1); } break; case SCI_CHARRIGHT: case SCI_CHARRIGHTEXTEND: if ((virtualSpaceOptions & SCVS_USERACCESSIBLE) && pdoc->IsLineEndPosition(spCaret.Position())) { spCaret.SetVirtualSpace(spCaret.VirtualSpace() + 1); } else { spCaret = SelectionPosition(spCaret.Position() + 1); } break; case SCI_WORDLEFT: case SCI_WORDLEFTEXTEND: spCaret = SelectionPosition(pdoc->NextWordStart(spCaret.Position(), -1)); break; case SCI_WORDRIGHT: case SCI_WORDRIGHTEXTEND: spCaret = SelectionPosition(pdoc->NextWordStart(spCaret.Position(), 1)); break; case SCI_WORDLEFTEND: case SCI_WORDLEFTENDEXTEND: spCaret = SelectionPosition(pdoc->NextWordEnd(spCaret.Position(), -1)); break; case SCI_WORDRIGHTEND: case SCI_WORDRIGHTENDEXTEND: spCaret = SelectionPosition(pdoc->NextWordEnd(spCaret.Position(), 1)); break; case SCI_WORDPARTLEFT: case SCI_WORDPARTLEFTEXTEND: spCaret = SelectionPosition(pdoc->WordPartLeft(spCaret.Position())); break; case SCI_WORDPARTRIGHT: case SCI_WORDPARTRIGHTEXTEND: spCaret = SelectionPosition(pdoc->WordPartRight(spCaret.Position())); break; case SCI_HOME: case SCI_HOMEEXTEND: spCaret = SelectionPosition(pdoc->LineStart(pdoc->LineFromPosition(spCaret.Position()))); break; case SCI_HOMEDISPLAY: case SCI_HOMEDISPLAYEXTEND: spCaret = SelectionPosition(StartEndDisplayLine(spCaret.Position(), true)); break; case SCI_HOMEWRAP: case SCI_HOMEWRAPEXTEND: spCaret = MovePositionSoVisible(StartEndDisplayLine(spCaret.Position(), true), -1); if (spCaretNow <= spCaret) spCaret = SelectionPosition(pdoc->LineStart(pdoc->LineFromPosition(spCaret.Position()))); break; case SCI_VCHOME: case SCI_VCHOMEEXTEND: // VCHome alternates between beginning of line and beginning of text so may move back or forwards spCaret = SelectionPosition(pdoc->VCHomePosition(spCaret.Position())); break; case SCI_VCHOMEDISPLAY: case SCI_VCHOMEDISPLAYEXTEND: spCaret = SelectionPosition(VCHomeDisplayPosition(spCaret.Position())); break; case SCI_VCHOMEWRAP: case SCI_VCHOMEWRAPEXTEND: spCaret = SelectionPosition(VCHomeWrapPosition(spCaret.Position())); break; case SCI_LINEEND: case SCI_LINEENDEXTEND: spCaret = SelectionPosition(pdoc->LineEndPosition(spCaret.Position())); break; case SCI_LINEENDDISPLAY: case SCI_LINEENDDISPLAYEXTEND: spCaret = SelectionPosition(StartEndDisplayLine(spCaret.Position(), false)); break; case SCI_LINEENDWRAP: case SCI_LINEENDWRAPEXTEND: spCaret = SelectionPosition(LineEndWrapPosition(spCaret.Position())); break; default: PLATFORM_ASSERT(false); } const int directionMove = (spCaret < spCaretNow) ? -1 : 1; spCaret = MovePositionSoVisible(spCaret, directionMove); // Handle move versus extend, and special behaviour for non-empty left/right switch (iMessage) { case SCI_CHARLEFT: case SCI_CHARRIGHT: if (sel.Range(r).Empty()) { sel.Range(r) = SelectionRange(spCaret); } else { sel.Range(r) = SelectionRange( (iMessage == SCI_CHARLEFT) ? sel.Range(r).Start() : sel.Range(r).End()); } break; case SCI_WORDLEFT: case SCI_WORDRIGHT: case SCI_WORDLEFTEND: case SCI_WORDRIGHTEND: case SCI_WORDPARTLEFT: case SCI_WORDPARTRIGHT: case SCI_HOME: case SCI_HOMEDISPLAY: case SCI_HOMEWRAP: case SCI_VCHOME: case SCI_VCHOMEDISPLAY: case SCI_VCHOMEWRAP: case SCI_LINEEND: case SCI_LINEENDDISPLAY: case SCI_LINEENDWRAP: sel.Range(r) = SelectionRange(spCaret); break; case SCI_CHARLEFTEXTEND: case SCI_CHARRIGHTEXTEND: case SCI_WORDLEFTEXTEND: case SCI_WORDRIGHTEXTEND: case SCI_WORDLEFTENDEXTEND: case SCI_WORDRIGHTENDEXTEND: case SCI_WORDPARTLEFTEXTEND: case SCI_WORDPARTRIGHTEXTEND: case SCI_HOMEEXTEND: case SCI_HOMEDISPLAYEXTEND: case SCI_HOMEWRAPEXTEND: case SCI_VCHOMEEXTEND: case SCI_VCHOMEDISPLAYEXTEND: case SCI_VCHOMEWRAPEXTEND: case SCI_LINEENDEXTEND: case SCI_LINEENDDISPLAYEXTEND: case SCI_LINEENDWRAPEXTEND: { SelectionRange rangeNew = SelectionRange(spCaret, sel.Range(r).anchor); sel.TrimOtherSelections(r, SelectionRange(rangeNew)); sel.Range(r) = rangeNew; } break; default: PLATFORM_ASSERT(false); } } } sel.RemoveDuplicates(); MovedCaret(sel.RangeMain().caret, SelectionPosition(INVALID_POSITION), true); // Invalidate the new state of the selection InvalidateWholeSelection(); SetLastXChosen(); // Need the line moving and so forth from MovePositionTo return 0; } int Editor::DelWordOrLine(unsigned int iMessage) { // Virtual space may be realised for SCI_DELWORDRIGHT or SCI_DELWORDRIGHTEND // which means 2 actions so wrap in an undo group. // Rightwards and leftwards deletions differ in treatment of virtual space. // Clear virtual space for leftwards, realise for rightwards. const bool leftwards = (iMessage == SCI_DELWORDLEFT) || (iMessage == SCI_DELLINELEFT); if (!additionalSelectionTyping) { InvalidateWholeSelection(); sel.DropAdditionalRanges(); } UndoGroup ug0(pdoc, (sel.Count() > 1) || !leftwards); for (size_t r = 0; r < sel.Count(); r++) { if (leftwards) { // Delete to the left so first clear the virtual space. sel.Range(r).ClearVirtualSpace(); } else { // Delete to the right so first realise the virtual space. sel.Range(r) = SelectionRange( RealizeVirtualSpace(sel.Range(r).caret)); } Range rangeDelete; switch (iMessage) { case SCI_DELWORDLEFT: rangeDelete = Range( pdoc->NextWordStart(sel.Range(r).caret.Position(), -1), sel.Range(r).caret.Position()); break; case SCI_DELWORDRIGHT: rangeDelete = Range( sel.Range(r).caret.Position(), pdoc->NextWordStart(sel.Range(r).caret.Position(), 1)); break; case SCI_DELWORDRIGHTEND: rangeDelete = Range( sel.Range(r).caret.Position(), pdoc->NextWordEnd(sel.Range(r).caret.Position(), 1)); break; case SCI_DELLINELEFT: rangeDelete = Range( pdoc->LineStart(pdoc->LineFromPosition(sel.Range(r).caret.Position())), sel.Range(r).caret.Position()); break; case SCI_DELLINERIGHT: rangeDelete = Range( sel.Range(r).caret.Position(), pdoc->LineEnd(pdoc->LineFromPosition(sel.Range(r).caret.Position()))); break; } if (!RangeContainsProtected(rangeDelete.start, rangeDelete.end)) { pdoc->DeleteChars(rangeDelete.start, rangeDelete.end - rangeDelete.start); } } // May need something stronger here: can selections overlap at this point? sel.RemoveDuplicates(); MovedCaret(sel.RangeMain().caret, SelectionPosition(INVALID_POSITION), true); // Invalidate the new state of the selection InvalidateWholeSelection(); SetLastXChosen(); return 0; } int Editor::KeyCommand(unsigned int iMessage) { switch (iMessage) { case SCI_LINEDOWN: CursorUpOrDown(1, Selection::noSel); break; case SCI_LINEDOWNEXTEND: CursorUpOrDown(1, Selection::selStream); break; case SCI_LINEDOWNRECTEXTEND: CursorUpOrDown(1, Selection::selRectangle); break; case SCI_PARADOWN: ParaUpOrDown(1, Selection::noSel); break; case SCI_PARADOWNEXTEND: ParaUpOrDown(1, Selection::selStream); break; case SCI_LINESCROLLDOWN: ScrollTo(topLine + 1); MoveCaretInsideView(false); break; case SCI_LINEUP: CursorUpOrDown(-1, Selection::noSel); break; case SCI_LINEUPEXTEND: CursorUpOrDown(-1, Selection::selStream); break; case SCI_LINEUPRECTEXTEND: CursorUpOrDown(-1, Selection::selRectangle); break; case SCI_PARAUP: ParaUpOrDown(-1, Selection::noSel); break; case SCI_PARAUPEXTEND: ParaUpOrDown(-1, Selection::selStream); break; case SCI_LINESCROLLUP: ScrollTo(topLine - 1); MoveCaretInsideView(false); break; case SCI_CHARLEFT: case SCI_CHARLEFTEXTEND: case SCI_CHARLEFTRECTEXTEND: case SCI_CHARRIGHT: case SCI_CHARRIGHTEXTEND: case SCI_CHARRIGHTRECTEXTEND: case SCI_WORDLEFT: case SCI_WORDLEFTEXTEND: case SCI_WORDRIGHT: case SCI_WORDRIGHTEXTEND: case SCI_WORDLEFTEND: case SCI_WORDLEFTENDEXTEND: case SCI_WORDRIGHTEND: case SCI_WORDRIGHTENDEXTEND: case SCI_WORDPARTLEFT: case SCI_WORDPARTLEFTEXTEND: case SCI_WORDPARTRIGHT: case SCI_WORDPARTRIGHTEXTEND: case SCI_HOME: case SCI_HOMEEXTEND: case SCI_HOMERECTEXTEND: case SCI_HOMEDISPLAY: case SCI_HOMEDISPLAYEXTEND: case SCI_HOMEWRAP: case SCI_HOMEWRAPEXTEND: case SCI_VCHOME: case SCI_VCHOMEEXTEND: case SCI_VCHOMERECTEXTEND: case SCI_VCHOMEDISPLAY: case SCI_VCHOMEDISPLAYEXTEND: case SCI_VCHOMEWRAP: case SCI_VCHOMEWRAPEXTEND: case SCI_LINEEND: case SCI_LINEENDEXTEND: case SCI_LINEENDRECTEXTEND: case SCI_LINEENDDISPLAY: case SCI_LINEENDDISPLAYEXTEND: case SCI_LINEENDWRAP: case SCI_LINEENDWRAPEXTEND: return HorizontalMove(iMessage); case SCI_DOCUMENTSTART: MovePositionTo(0); SetLastXChosen(); break; case SCI_DOCUMENTSTARTEXTEND: MovePositionTo(0, Selection::selStream); SetLastXChosen(); break; case SCI_DOCUMENTEND: MovePositionTo(pdoc->Length()); SetLastXChosen(); break; case SCI_DOCUMENTENDEXTEND: MovePositionTo(pdoc->Length(), Selection::selStream); SetLastXChosen(); break; case SCI_STUTTEREDPAGEUP: PageMove(-1, Selection::noSel, true); break; case SCI_STUTTEREDPAGEUPEXTEND: PageMove(-1, Selection::selStream, true); break; case SCI_STUTTEREDPAGEDOWN: PageMove(1, Selection::noSel, true); break; case SCI_STUTTEREDPAGEDOWNEXTEND: PageMove(1, Selection::selStream, true); break; case SCI_PAGEUP: PageMove(-1); break; case SCI_PAGEUPEXTEND: PageMove(-1, Selection::selStream); break; case SCI_PAGEUPRECTEXTEND: PageMove(-1, Selection::selRectangle); break; case SCI_PAGEDOWN: PageMove(1); break; case SCI_PAGEDOWNEXTEND: PageMove(1, Selection::selStream); break; case SCI_PAGEDOWNRECTEXTEND: PageMove(1, Selection::selRectangle); break; case SCI_EDITTOGGLEOVERTYPE: inOverstrike = !inOverstrike; ShowCaretAtCurrentPosition(); ContainerNeedsUpdate(SC_UPDATE_CONTENT); NotifyUpdateUI(); break; case SCI_CANCEL: // Cancel any modes - handled in subclass // Also unselect text CancelModes(); if (sel.Count() > 1) { // Drop additional selections InvalidateWholeSelection(); sel.DropAdditionalRanges(); } break; case SCI_DELETEBACK: DelCharBack(true); if ((caretSticky == SC_CARETSTICKY_OFF) || (caretSticky == SC_CARETSTICKY_WHITESPACE)) { SetLastXChosen(); } EnsureCaretVisible(); break; case SCI_DELETEBACKNOTLINE: DelCharBack(false); if ((caretSticky == SC_CARETSTICKY_OFF) || (caretSticky == SC_CARETSTICKY_WHITESPACE)) { SetLastXChosen(); } EnsureCaretVisible(); break; case SCI_TAB: Indent(true); if (caretSticky == SC_CARETSTICKY_OFF) { SetLastXChosen(); } EnsureCaretVisible(); ShowCaretAtCurrentPosition(); // Avoid blinking break; case SCI_BACKTAB: Indent(false); if ((caretSticky == SC_CARETSTICKY_OFF) || (caretSticky == SC_CARETSTICKY_WHITESPACE)) { SetLastXChosen(); } EnsureCaretVisible(); ShowCaretAtCurrentPosition(); // Avoid blinking break; case SCI_NEWLINE: NewLine(); break; case SCI_FORMFEED: AddChar('\f'); break; case SCI_ZOOMIN: if (vs.zoomLevel < 20) { vs.zoomLevel++; InvalidateStyleRedraw(); NotifyZoom(); } break; case SCI_ZOOMOUT: if (vs.zoomLevel > -10) { vs.zoomLevel--; InvalidateStyleRedraw(); NotifyZoom(); } break; case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: case SCI_DELWORDRIGHTEND: case SCI_DELLINELEFT: case SCI_DELLINERIGHT: return DelWordOrLine(iMessage); case SCI_LINECOPY: { int lineStart = pdoc->LineFromPosition(SelectionStart().Position()); int lineEnd = pdoc->LineFromPosition(SelectionEnd().Position()); CopyRangeToClipboard(pdoc->LineStart(lineStart), pdoc->LineStart(lineEnd + 1)); } break; case SCI_LINECUT: { int lineStart = pdoc->LineFromPosition(SelectionStart().Position()); int lineEnd = pdoc->LineFromPosition(SelectionEnd().Position()); int start = pdoc->LineStart(lineStart); int end = pdoc->LineStart(lineEnd + 1); SetSelection(start, end); Cut(); SetLastXChosen(); } break; case SCI_LINEDELETE: { int line = pdoc->LineFromPosition(sel.MainCaret()); int start = pdoc->LineStart(line); int end = pdoc->LineStart(line + 1); pdoc->DeleteChars(start, end - start); } break; case SCI_LINETRANSPOSE: LineTranspose(); break; case SCI_LINEDUPLICATE: Duplicate(true); break; case SCI_SELECTIONDUPLICATE: Duplicate(false); break; case SCI_LOWERCASE: ChangeCaseOfSelection(cmLower); break; case SCI_UPPERCASE: ChangeCaseOfSelection(cmUpper); break; case SCI_SCROLLTOSTART: ScrollTo(0); break; case SCI_SCROLLTOEND: ScrollTo(MaxScrollPos()); break; } return 0; } int Editor::KeyDefault(int, int) { return 0; } int Editor::KeyDownWithModifiers(int key, int modifiers, bool *consumed) { DwellEnd(false); int msg = kmap.Find(key, modifiers); if (msg) { if (consumed) *consumed = true; return static_cast(WndProc(msg, 0, 0)); } else { if (consumed) *consumed = false; return KeyDefault(key, modifiers); } } int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) { return KeyDownWithModifiers(key, ModifierFlags(shift, ctrl, alt), consumed); } void Editor::Indent(bool forwards) { UndoGroup ug(pdoc); for (size_t r=0; rLineFromPosition(sel.Range(r).anchor.Position()); int caretPosition = sel.Range(r).caret.Position(); int lineCurrentPos = pdoc->LineFromPosition(caretPosition); if (lineOfAnchor == lineCurrentPos) { if (forwards) { pdoc->DeleteChars(sel.Range(r).Start().Position(), sel.Range(r).Length()); caretPosition = sel.Range(r).caret.Position(); if (pdoc->GetColumn(caretPosition) <= pdoc->GetColumn(pdoc->GetLineIndentPosition(lineCurrentPos)) && pdoc->tabIndents) { int indentation = pdoc->GetLineIndentation(lineCurrentPos); int indentationStep = pdoc->IndentSize(); const int posSelect = pdoc->SetLineIndentation( lineCurrentPos, indentation + indentationStep - indentation % indentationStep); sel.Range(r) = SelectionRange(posSelect); } else { if (pdoc->useTabs) { const int lengthInserted = pdoc->InsertString(caretPosition, "\t", 1); sel.Range(r) = SelectionRange(caretPosition + lengthInserted); } else { int numSpaces = (pdoc->tabInChars) - (pdoc->GetColumn(caretPosition) % (pdoc->tabInChars)); if (numSpaces < 1) numSpaces = pdoc->tabInChars; const std::string spaceText(numSpaces, ' '); const int lengthInserted = pdoc->InsertString(caretPosition, spaceText.c_str(), static_cast(spaceText.length())); sel.Range(r) = SelectionRange(caretPosition + lengthInserted); } } } else { if (pdoc->GetColumn(caretPosition) <= pdoc->GetLineIndentation(lineCurrentPos) && pdoc->tabIndents) { int indentation = pdoc->GetLineIndentation(lineCurrentPos); int indentationStep = pdoc->IndentSize(); const int posSelect = pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep); sel.Range(r) = SelectionRange(posSelect); } else { int newColumn = ((pdoc->GetColumn(caretPosition) - 1) / pdoc->tabInChars) * pdoc->tabInChars; if (newColumn < 0) newColumn = 0; int newPos = caretPosition; while (pdoc->GetColumn(newPos) > newColumn) newPos--; sel.Range(r) = SelectionRange(newPos); } } } else { // Multiline int anchorPosOnLine = sel.Range(r).anchor.Position() - pdoc->LineStart(lineOfAnchor); int currentPosPosOnLine = caretPosition - pdoc->LineStart(lineCurrentPos); // Multiple lines selected so indent / dedent int lineTopSel = Platform::Minimum(lineOfAnchor, lineCurrentPos); int lineBottomSel = Platform::Maximum(lineOfAnchor, lineCurrentPos); if (pdoc->LineStart(lineBottomSel) == sel.Range(r).anchor.Position() || pdoc->LineStart(lineBottomSel) == caretPosition) lineBottomSel--; // If not selecting any characters on a line, do not indent pdoc->Indent(forwards, lineBottomSel, lineTopSel); if (lineOfAnchor < lineCurrentPos) { if (currentPosPosOnLine == 0) sel.Range(r) = SelectionRange(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor)); else sel.Range(r) = SelectionRange(pdoc->LineStart(lineCurrentPos + 1), pdoc->LineStart(lineOfAnchor)); } else { if (anchorPosOnLine == 0) sel.Range(r) = SelectionRange(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor)); else sel.Range(r) = SelectionRange(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor + 1)); } } } ContainerNeedsUpdate(SC_UPDATE_SELECTION); } class CaseFolderASCII : public CaseFolderTable { public: CaseFolderASCII() { StandardASCII(); } ~CaseFolderASCII() { } }; CaseFolder *Editor::CaseFolderForEncoding() { // Simple default that only maps ASCII upper case to lower case. return new CaseFolderASCII(); } /** * Search of a text in the document, in the given range. * @return The position of the found text, -1 if not found. */ long Editor::FindText( uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. sptr_t lParam) { ///< @c Sci_TextToFind structure: The text to search for in the given range. Sci_TextToFind *ft = reinterpret_cast(lParam); int lengthFound = istrlen(ft->lpstrText); if (!pdoc->HasCaseFolder()) pdoc->SetCaseFolder(CaseFolderForEncoding()); try { long pos = pdoc->FindText( static_cast(ft->chrg.cpMin), static_cast(ft->chrg.cpMax), ft->lpstrText, static_cast(wParam), &lengthFound); if (pos != -1) { ft->chrgText.cpMin = pos; ft->chrgText.cpMax = pos + lengthFound; } return static_cast(pos); } catch (RegexError &) { errorStatus = SC_STATUS_WARN_REGEX; return -1; } } /** * Relocatable search support : Searches relative to current selection * point and sets the selection to the found text range with * each search. */ /** * Anchor following searches at current selection start: This allows * multiple incremental interactive searches to be macro recorded * while still setting the selection to found text so the find/select * operation is self-contained. */ void Editor::SearchAnchor() { searchAnchor = SelectionStart().Position(); } /** * Find text from current search anchor: Must call @c SearchAnchor first. * Used for next text and previous text requests. * @return The position of the found text, -1 if not found. */ long Editor::SearchText( unsigned int iMessage, ///< Accepts both @c SCI_SEARCHNEXT and @c SCI_SEARCHPREV. uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. sptr_t lParam) { ///< The text to search for. const char *txt = reinterpret_cast(lParam); long pos; int lengthFound = istrlen(txt); if (!pdoc->HasCaseFolder()) pdoc->SetCaseFolder(CaseFolderForEncoding()); try { if (iMessage == SCI_SEARCHNEXT) { pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, static_cast(wParam), &lengthFound); } else { pos = pdoc->FindText(searchAnchor, 0, txt, static_cast(wParam), &lengthFound); } } catch (RegexError &) { errorStatus = SC_STATUS_WARN_REGEX; return -1; } if (pos != -1) { SetSelection(static_cast(pos), static_cast(pos + lengthFound)); } return pos; } std::string Editor::CaseMapString(const std::string &s, int caseMapping) { std::string ret(s); for (size_t i=0; i= 'a' && ret[i] <= 'z') ret[i] = static_cast(ret[i] - 'a' + 'A'); break; case cmLower: if (ret[i] >= 'A' && ret[i] <= 'Z') ret[i] = static_cast(ret[i] - 'A' + 'a'); break; } } return ret; } /** * Search for text in the target range of the document. * @return The position of the found text, -1 if not found. */ long Editor::SearchInTarget(const char *text, int length) { int lengthFound = length; if (!pdoc->HasCaseFolder()) pdoc->SetCaseFolder(CaseFolderForEncoding()); try { long pos = pdoc->FindText(targetStart, targetEnd, text, searchFlags, &lengthFound); if (pos != -1) { targetStart = static_cast(pos); targetEnd = static_cast(pos + lengthFound); } return pos; } catch (RegexError &) { errorStatus = SC_STATUS_WARN_REGEX; return -1; } } void Editor::GoToLine(int lineNo) { if (lineNo > pdoc->LinesTotal()) lineNo = pdoc->LinesTotal(); if (lineNo < 0) lineNo = 0; SetEmptySelection(pdoc->LineStart(lineNo)); ShowCaretAtCurrentPosition(); EnsureCaretVisible(); } static bool Close(Point pt1, Point pt2, Point threshold) { if (std::abs(pt1.x - pt2.x) > threshold.x) return false; if (std::abs(pt1.y - pt2.y) > threshold.y) return false; return true; } std::string Editor::RangeText(int start, int end) const { if (start < end) { int len = end - start; std::string ret(len, '\0'); for (int i = 0; i < len; i++) { ret[i] = pdoc->CharAt(start + i); } return ret; } return std::string(); } void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) { if (sel.Empty()) { if (allowLineCopy) { int currentLine = pdoc->LineFromPosition(sel.MainCaret()); int start = pdoc->LineStart(currentLine); int end = pdoc->LineEnd(currentLine); std::string text = RangeText(start, end); if (pdoc->eolMode != SC_EOL_LF) text.push_back('\r'); if (pdoc->eolMode != SC_EOL_CR) text.push_back('\n'); ss->Copy(text, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false, true); } } else { std::string text; std::vector rangesInOrder = sel.RangesCopy(); if (sel.selType == Selection::selRectangle) std::sort(rangesInOrder.begin(), rangesInOrder.end()); for (size_t r=0; reolMode != SC_EOL_LF) text.push_back('\r'); if (pdoc->eolMode != SC_EOL_CR) text.push_back('\n'); } } ss->Copy(text, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, sel.IsRectangular(), sel.selType == Selection::selLines); } } void Editor::CopyRangeToClipboard(int start, int end) { start = pdoc->ClampPositionIntoDocument(start); end = pdoc->ClampPositionIntoDocument(end); SelectionText selectedText; std::string text = RangeText(start, end); selectedText.Copy(text, pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false, false); CopyToClipboard(selectedText); } void Editor::CopyText(int length, const char *text) { SelectionText selectedText; selectedText.Copy(std::string(text, length), pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false, false); CopyToClipboard(selectedText); } void Editor::SetDragPosition(SelectionPosition newPos) { if (newPos.Position() >= 0) { newPos = MovePositionOutsideChar(newPos, 1); posDrop = newPos; } if (!(posDrag == newPos)) { caret.on = true; if (FineTickerAvailable()) { FineTickerCancel(tickCaret); if ((caret.active) && (caret.period > 0) && (newPos.Position() < 0)) FineTickerStart(tickCaret, caret.period, caret.period/10); } else { SetTicking(true); } InvalidateCaret(); posDrag = newPos; InvalidateCaret(); } } void Editor::DisplayCursor(Window::Cursor c) { if (cursorMode == SC_CURSORNORMAL) wMain.SetCursor(c); else wMain.SetCursor(static_cast(cursorMode)); } bool Editor::DragThreshold(Point ptStart, Point ptNow) { int xMove = static_cast(ptStart.x - ptNow.x); int yMove = static_cast(ptStart.y - ptNow.y); int distanceSquared = xMove * xMove + yMove * yMove; return distanceSquared > 16; } void Editor::StartDrag() { // Always handled by subclasses //SetMouseCapture(true); //DisplayCursor(Window::cursorArrow); } void Editor::DropAt(SelectionPosition position, const char *value, size_t lengthValue, bool moving, bool rectangular) { //Platform::DebugPrintf("DropAt %d %d\n", inDragDrop, position); if (inDragDrop == ddDragging) dropWentOutside = false; bool positionWasInSelection = PositionInSelection(position.Position()); bool positionOnEdgeOfSelection = (position == SelectionStart()) || (position == SelectionEnd()); if ((inDragDrop != ddDragging) || !(positionWasInSelection) || (positionOnEdgeOfSelection && !moving)) { SelectionPosition selStart = SelectionStart(); SelectionPosition selEnd = SelectionEnd(); UndoGroup ug(pdoc); SelectionPosition positionAfterDeletion = position; if ((inDragDrop == ddDragging) && moving) { // Remove dragged out text if (rectangular || sel.selType == Selection::selLines) { for (size_t r=0; r= sel.Range(r).Start()) { if (position > sel.Range(r).End()) { positionAfterDeletion.Add(-sel.Range(r).Length()); } else { positionAfterDeletion.Add(-SelectionRange(position, sel.Range(r).Start()).Length()); } } } } else { if (position > selStart) { positionAfterDeletion.Add(-SelectionRange(selEnd, selStart).Length()); } } ClearSelection(); } position = positionAfterDeletion; std::string convertedText = Document::TransformLineEnds(value, lengthValue, pdoc->eolMode); if (rectangular) { PasteRectangular(position, convertedText.c_str(), static_cast(convertedText.length())); // Should try to select new rectangle but it may not be a rectangle now so just select the drop position SetEmptySelection(position); } else { position = MovePositionOutsideChar(position, sel.MainCaret() - position.Position()); position = RealizeVirtualSpace(position); const int lengthInserted = pdoc->InsertString( position.Position(), convertedText.c_str(), static_cast(convertedText.length())); if (lengthInserted > 0) { SelectionPosition posAfterInsertion = position; posAfterInsertion.Add(lengthInserted); SetSelection(posAfterInsertion, position); } } } else if (inDragDrop == ddDragging) { SetEmptySelection(position); } } void Editor::DropAt(SelectionPosition position, const char *value, bool moving, bool rectangular) { DropAt(position, value, strlen(value), moving, rectangular); } /** * @return true if given position is inside the selection, */ bool Editor::PositionInSelection(int pos) { pos = MovePositionOutsideChar(pos, sel.MainCaret() - pos); for (size_t r=0; r ptPos.x) { hit = false; } } if (hit) return true; } } return false; } bool Editor::PointInSelMargin(Point pt) const { // Really means: "Point in a margin" if (vs.fixedColumnWidth > 0) { // There is a margin PRectangle rcSelMargin = GetClientRectangle(); rcSelMargin.right = static_cast(vs.textStart - vs.leftMarginWidth); rcSelMargin.left = static_cast(vs.textStart - vs.fixedColumnWidth); return rcSelMargin.ContainsWholePixel(pt); } else { return false; } } Window::Cursor Editor::GetMarginCursor(Point pt) const { int x = 0; for (size_t margin = 0; margin < vs.ms.size(); margin++) { if ((pt.x >= x) && (pt.x < x + vs.ms[margin].width)) return static_cast(vs.ms[margin].cursor); x += vs.ms[margin].width; } return Window::cursorReverseArrow; } void Editor::TrimAndSetSelection(int currentPos_, int anchor_) { sel.TrimSelection(SelectionRange(currentPos_, anchor_)); SetSelection(currentPos_, anchor_); } void Editor::LineSelection(int lineCurrentPos_, int lineAnchorPos_, bool wholeLine) { int selCurrentPos, selAnchorPos; if (wholeLine) { int lineCurrent_ = pdoc->LineFromPosition(lineCurrentPos_); int lineAnchor_ = pdoc->LineFromPosition(lineAnchorPos_); if (lineAnchorPos_ < lineCurrentPos_) { selCurrentPos = pdoc->LineStart(lineCurrent_ + 1); selAnchorPos = pdoc->LineStart(lineAnchor_); } else if (lineAnchorPos_ > lineCurrentPos_) { selCurrentPos = pdoc->LineStart(lineCurrent_); selAnchorPos = pdoc->LineStart(lineAnchor_ + 1); } else { // Same line, select it selCurrentPos = pdoc->LineStart(lineAnchor_ + 1); selAnchorPos = pdoc->LineStart(lineAnchor_); } } else { if (lineAnchorPos_ < lineCurrentPos_) { selCurrentPos = StartEndDisplayLine(lineCurrentPos_, false) + 1; selCurrentPos = pdoc->MovePositionOutsideChar(selCurrentPos, 1); selAnchorPos = StartEndDisplayLine(lineAnchorPos_, true); } else if (lineAnchorPos_ > lineCurrentPos_) { selCurrentPos = StartEndDisplayLine(lineCurrentPos_, true); selAnchorPos = StartEndDisplayLine(lineAnchorPos_, false) + 1; selAnchorPos = pdoc->MovePositionOutsideChar(selAnchorPos, 1); } else { // Same line, select it selCurrentPos = StartEndDisplayLine(lineAnchorPos_, false) + 1; selCurrentPos = pdoc->MovePositionOutsideChar(selCurrentPos, 1); selAnchorPos = StartEndDisplayLine(lineAnchorPos_, true); } } TrimAndSetSelection(selCurrentPos, selAnchorPos); } void Editor::WordSelection(int pos) { if (pos < wordSelectAnchorStartPos) { // Extend backward to the word containing pos. // Skip ExtendWordSelect if the line is empty or if pos is after the last character. // This ensures that a series of empty lines isn't counted as a single "word". if (!pdoc->IsLineEndPosition(pos)) pos = pdoc->ExtendWordSelect(pdoc->MovePositionOutsideChar(pos + 1, 1), -1); TrimAndSetSelection(pos, wordSelectAnchorEndPos); } else if (pos > wordSelectAnchorEndPos) { // Extend forward to the word containing the character to the left of pos. // Skip ExtendWordSelect if the line is empty or if pos is the first position on the line. // This ensures that a series of empty lines isn't counted as a single "word". if (pos > pdoc->LineStart(pdoc->LineFromPosition(pos))) pos = pdoc->ExtendWordSelect(pdoc->MovePositionOutsideChar(pos - 1, -1), 1); TrimAndSetSelection(pos, wordSelectAnchorStartPos); } else { // Select only the anchored word if (pos >= originalAnchorPos) TrimAndSetSelection(wordSelectAnchorEndPos, wordSelectAnchorStartPos); else TrimAndSetSelection(wordSelectAnchorStartPos, wordSelectAnchorEndPos); } } void Editor::DwellEnd(bool mouseMoved) { if (mouseMoved) ticksToDwell = dwellDelay; else ticksToDwell = SC_TIME_FOREVER; if (dwelling && (dwellDelay < SC_TIME_FOREVER)) { dwelling = false; NotifyDwelling(ptMouseLast, dwelling); } if (FineTickerAvailable()) { FineTickerCancel(tickDwell); if (mouseMoved && (dwellDelay < SC_TIME_FOREVER)) { //FineTickerStart(tickDwell, dwellDelay, dwellDelay/10); } } } void Editor::MouseLeave() { SetHotSpotRange(NULL); if (!HaveMouseCapture()) { ptMouseLast = Point(-1,-1); DwellEnd(true); } } static bool AllowVirtualSpace(int virtualSpaceOptions, bool rectangular) { return (!rectangular && ((virtualSpaceOptions & SCVS_USERACCESSIBLE) != 0)) || (rectangular && ((virtualSpaceOptions & SCVS_RECTANGULARSELECTION) != 0)); } void Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifiers) { SetHoverIndicatorPoint(pt); //Platform::DebugPrintf("ButtonDown %d %d = %d alt=%d %d\n", curTime, lastClickTime, curTime - lastClickTime, alt, inDragDrop); ptMouseLast = pt; const bool ctrl = (modifiers & SCI_CTRL) != 0; const bool shift = (modifiers & SCI_SHIFT) != 0; const bool alt = (modifiers & SCI_ALT) != 0; SelectionPosition newPos = SPositionFromLocation(pt, false, false, AllowVirtualSpace(virtualSpaceOptions, alt)); newPos = MovePositionOutsideChar(newPos, sel.MainCaret() - newPos.Position()); SelectionPosition newCharPos = SPositionFromLocation(pt, false, true, false); newCharPos = MovePositionOutsideChar(newCharPos, -1); inDragDrop = ddNone; sel.SetMoveExtends(false); if (NotifyMarginClick(pt, modifiers)) return; NotifyIndicatorClick(true, newPos.Position(), modifiers); bool inSelMargin = PointInSelMargin(pt); // In margin ctrl+(double)click should always select everything if (ctrl && inSelMargin) { SelectAll(); lastClickTime = curTime; lastClick = pt; return; } if (shift && !inSelMargin) { SetSelection(newPos); } if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick, doubleClickCloseThreshold)) { //Platform::DebugPrintf("Double click %d %d = %d\n", curTime, lastClickTime, curTime - lastClickTime); SetMouseCapture(true); if (FineTickerAvailable()) { FineTickerStart(tickScroll, 100, 10); } if (!ctrl || !multipleSelection || (selectionType != selChar && selectionType != selWord)) SetEmptySelection(newPos.Position()); bool doubleClick = false; // Stop mouse button bounce changing selection type if (!Platform::MouseButtonBounce() || curTime != lastClickTime) { if (inSelMargin) { // Inside margin selection type should be either selSubLine or selWholeLine. if (selectionType == selSubLine) { // If it is selSubLine, we're inside a *double* click and word wrap is enabled, // so we switch to selWholeLine in order to select whole line. selectionType = selWholeLine; } else if (selectionType != selSubLine && selectionType != selWholeLine) { // If it is neither, reset selection type to line selection. selectionType = (Wrapping() && (marginOptions & SC_MARGINOPTION_SUBLINESELECT)) ? selSubLine : selWholeLine; } } else { if (selectionType == selChar) { selectionType = selWord; doubleClick = true; } else if (selectionType == selWord) { // Since we ended up here, we're inside a *triple* click, which should always select // whole line regardless of word wrap being enabled or not. selectionType = selWholeLine; } else { selectionType = selChar; originalAnchorPos = sel.MainCaret(); } } } if (selectionType == selWord) { int charPos = originalAnchorPos; if (sel.MainCaret() == originalAnchorPos) { charPos = PositionFromLocation(pt, false, true); charPos = MovePositionOutsideChar(charPos, -1); } int startWord, endWord; if ((sel.MainCaret() >= originalAnchorPos) && !pdoc->IsLineEndPosition(charPos)) { startWord = pdoc->ExtendWordSelect(pdoc->MovePositionOutsideChar(charPos + 1, 1), -1); endWord = pdoc->ExtendWordSelect(charPos, 1); } else { // Selecting backwards, or anchor beyond last character on line. In these cases, // we select the word containing the character to the *left* of the anchor. if (charPos > pdoc->LineStart(pdoc->LineFromPosition(charPos))) { startWord = pdoc->ExtendWordSelect(charPos, -1); endWord = pdoc->ExtendWordSelect(startWord, 1); } else { // Anchor at start of line; select nothing to begin with. startWord = charPos; endWord = charPos; } } wordSelectAnchorStartPos = startWord; wordSelectAnchorEndPos = endWord; wordSelectInitialCaretPos = sel.MainCaret(); WordSelection(wordSelectInitialCaretPos); } else if (selectionType == selSubLine || selectionType == selWholeLine) { lineAnchorPos = newPos.Position(); LineSelection(lineAnchorPos, lineAnchorPos, selectionType == selWholeLine); //Platform::DebugPrintf("Triple click: %d - %d\n", anchor, currentPos); } else { SetEmptySelection(sel.MainCaret()); } //Platform::DebugPrintf("Double click: %d - %d\n", anchor, currentPos); if (doubleClick) { NotifyDoubleClick(pt, modifiers); if (PositionIsHotspot(newCharPos.Position())) NotifyHotSpotDoubleClicked(newCharPos.Position(), modifiers); } } else { // Single click if (inSelMargin) { if (sel.IsRectangular() || (sel.Count() > 1)) { InvalidateWholeSelection(); sel.Clear(); } sel.selType = Selection::selStream; if (!shift) { // Single click in margin: select whole line or only subline if word wrap is enabled lineAnchorPos = newPos.Position(); selectionType = (Wrapping() && (marginOptions & SC_MARGINOPTION_SUBLINESELECT)) ? selSubLine : selWholeLine; LineSelection(lineAnchorPos, lineAnchorPos, selectionType == selWholeLine); } else { // Single shift+click in margin: select from line anchor to clicked line if (sel.MainAnchor() > sel.MainCaret()) lineAnchorPos = sel.MainAnchor() - 1; else lineAnchorPos = sel.MainAnchor(); // Reset selection type if there is an empty selection. // This ensures that we don't end up stuck in previous selection mode, which is no longer valid. // Otherwise, if there's a non empty selection, reset selection type only if it differs from selSubLine and selWholeLine. // This ensures that we continue selecting in the same selection mode. if (sel.Empty() || (selectionType != selSubLine && selectionType != selWholeLine)) selectionType = (Wrapping() && (marginOptions & SC_MARGINOPTION_SUBLINESELECT)) ? selSubLine : selWholeLine; LineSelection(newPos.Position(), lineAnchorPos, selectionType == selWholeLine); } SetDragPosition(SelectionPosition(invalidPosition)); SetMouseCapture(true); if (FineTickerAvailable()) { FineTickerStart(tickScroll, 100, 10); } } else { if (PointIsHotspot(pt)) { NotifyHotSpotClicked(newCharPos.Position(), modifiers); hotSpotClickPos = newCharPos.Position(); } if (!shift) { if (PointInSelection(pt) && !SelectionEmpty()) inDragDrop = ddInitial; else inDragDrop = ddNone; } SetMouseCapture(true); if (FineTickerAvailable()) { FineTickerStart(tickScroll, 100, 10); } if (inDragDrop != ddInitial) { SetDragPosition(SelectionPosition(invalidPosition)); if (!shift) { if (ctrl && multipleSelection) { SelectionRange range(newPos); sel.TentativeSelection(range); InvalidateSelection(range, true); } else { InvalidateSelection(SelectionRange(newPos), true); if (sel.Count() > 1) Redraw(); if ((sel.Count() > 1) || (sel.selType != Selection::selStream)) sel.Clear(); sel.selType = alt ? Selection::selRectangle : Selection::selStream; SetSelection(newPos, newPos); } } SelectionPosition anchorCurrent = newPos; if (shift) anchorCurrent = sel.IsRectangular() ? sel.Rectangular().anchor : sel.RangeMain().anchor; sel.selType = alt ? Selection::selRectangle : Selection::selStream; selectionType = selChar; originalAnchorPos = sel.MainCaret(); sel.Rectangular() = SelectionRange(newPos, anchorCurrent); SetRectangularRange(); } } } lastClickTime = curTime; lastClick = pt; lastXChosen = static_cast(pt.x) + xOffset; ShowCaretAtCurrentPosition(); } void Editor::RightButtonDownWithModifiers(Point pt, unsigned int, int modifiers) { if (NotifyMarginRightClick(pt, modifiers)) return; } void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { return ButtonDownWithModifiers(pt, curTime, ModifierFlags(shift, ctrl, alt)); } bool Editor::PositionIsHotspot(int position) const { return vs.styles[pdoc->StyleIndexAt(position)].hotspot; } bool Editor::PointIsHotspot(Point pt) { int pos = PositionFromLocation(pt, true, true); if (pos == INVALID_POSITION) return false; return PositionIsHotspot(pos); } void Editor::SetHoverIndicatorPosition(int position) { int hoverIndicatorPosPrev = hoverIndicatorPos; hoverIndicatorPos = INVALID_POSITION; if (vs.indicatorsDynamic == 0) return; if (position != INVALID_POSITION) { for (Decoration *deco = pdoc->decorations.root; deco; deco = deco->next) { if (vs.indicators[deco->indicator].IsDynamic()) { if (pdoc->decorations.ValueAt(deco->indicator, position)) { hoverIndicatorPos = position; } } } } if (hoverIndicatorPosPrev != hoverIndicatorPos) { Redraw(); } } void Editor::SetHoverIndicatorPoint(Point pt) { if (vs.indicatorsDynamic == 0) { SetHoverIndicatorPosition(INVALID_POSITION); } else { SetHoverIndicatorPosition(PositionFromLocation(pt, true, true)); } } void Editor::SetHotSpotRange(Point *pt) { if (pt) { int pos = PositionFromLocation(*pt, false, true); // If we don't limit this to word characters then the // range can encompass more than the run range and then // the underline will not be drawn properly. Range hsNew; hsNew.start = pdoc->ExtendStyleRange(pos, -1, vs.hotspotSingleLine); hsNew.end = pdoc->ExtendStyleRange(pos, 1, vs.hotspotSingleLine); // Only invalidate the range if the hotspot range has changed... if (!(hsNew == hotspot)) { if (hotspot.Valid()) { InvalidateRange(hotspot.start, hotspot.end); } hotspot = hsNew; InvalidateRange(hotspot.start, hotspot.end); } } else { if (hotspot.Valid()) { InvalidateRange(hotspot.start, hotspot.end); } hotspot = Range(invalidPosition); } } Range Editor::GetHotSpotRange() const { return hotspot; } void Editor::ButtonMoveWithModifiers(Point pt, int modifiers) { if ((ptMouseLast.x != pt.x) || (ptMouseLast.y != pt.y)) { DwellEnd(true); } SelectionPosition movePos = SPositionFromLocation(pt, false, false, AllowVirtualSpace(virtualSpaceOptions, sel.IsRectangular())); movePos = MovePositionOutsideChar(movePos, sel.MainCaret() - movePos.Position()); if (inDragDrop == ddInitial) { if (DragThreshold(ptMouseLast, pt)) { SetMouseCapture(false); if (FineTickerAvailable()) { FineTickerCancel(tickScroll); } SetDragPosition(movePos); CopySelectionRange(&drag); StartDrag(); } return; } ptMouseLast = pt; PRectangle rcClient = GetClientRectangle(); Point ptOrigin = GetVisibleOriginInMain(); rcClient.Move(0, -ptOrigin.y); if (FineTickerAvailable() && (dwellDelay < SC_TIME_FOREVER) && rcClient.Contains(pt)) { FineTickerStart(tickDwell, dwellDelay, dwellDelay/10); } //Platform::DebugPrintf("Move %d %d\n", pt.x, pt.y); if (HaveMouseCapture()) { // Slow down autoscrolling/selection autoScrollTimer.ticksToWait -= timer.tickSize; if (autoScrollTimer.ticksToWait > 0) return; autoScrollTimer.ticksToWait = autoScrollDelay; // Adjust selection if (posDrag.IsValid()) { SetDragPosition(movePos); } else { if (selectionType == selChar) { if (sel.selType == Selection::selStream && (modifiers & SCI_ALT) && mouseSelectionRectangularSwitch) { sel.selType = Selection::selRectangle; } if (sel.IsRectangular()) { sel.Rectangular() = SelectionRange(movePos, sel.Rectangular().anchor); SetSelection(movePos, sel.RangeMain().anchor); } else if (sel.Count() > 1) { InvalidateSelection(sel.RangeMain(), false); SelectionRange range(movePos, sel.RangeMain().anchor); sel.TentativeSelection(range); InvalidateSelection(range, true); } else { SetSelection(movePos, sel.RangeMain().anchor); } } else if (selectionType == selWord) { // Continue selecting by word if (movePos.Position() == wordSelectInitialCaretPos) { // Didn't move // No need to do anything. Previously this case was lumped // in with "Moved forward", but that can be harmful in this // case: a handler for the NotifyDoubleClick re-adjusts // the selection for a fancier definition of "word" (for // example, in Perl it is useful to include the leading // '$', '%' or '@' on variables for word selection). In this // the ButtonMove() called via Tick() for auto-scrolling // could result in the fancier word selection adjustment // being unmade. } else { wordSelectInitialCaretPos = -1; WordSelection(movePos.Position()); } } else { // Continue selecting by line LineSelection(movePos.Position(), lineAnchorPos, selectionType == selWholeLine); } } // Autoscroll int lineMove = DisplayFromPosition(movePos.Position()); if (pt.y > rcClient.bottom) { ScrollTo(lineMove - LinesOnScreen() + 1); Redraw(); } else if (pt.y < rcClient.top) { ScrollTo(lineMove); Redraw(); } EnsureCaretVisible(false, false, true); if (hotspot.Valid() && !PointIsHotspot(pt)) SetHotSpotRange(NULL); if (hotSpotClickPos != INVALID_POSITION && PositionFromLocation(pt,true,true) != hotSpotClickPos) { if (inDragDrop == ddNone) { DisplayCursor(Window::cursorText); } hotSpotClickPos = INVALID_POSITION; } } else { if (vs.fixedColumnWidth > 0) { // There is a margin if (PointInSelMargin(pt)) { DisplayCursor(GetMarginCursor(pt)); SetHotSpotRange(NULL); return; // No need to test for selection } } // Display regular (drag) cursor over selection if (PointInSelection(pt) && !SelectionEmpty()) { DisplayCursor(Window::cursorArrow); } else { SetHoverIndicatorPoint(pt); if (PointIsHotspot(pt)) { DisplayCursor(Window::cursorHand); SetHotSpotRange(&pt); } else { if (hoverIndicatorPos != invalidPosition) DisplayCursor(Window::cursorHand); else DisplayCursor(Window::cursorText); SetHotSpotRange(NULL); } } } } void Editor::ButtonMove(Point pt) { ButtonMoveWithModifiers(pt, 0); } void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { //Platform::DebugPrintf("ButtonUp %d %d\n", HaveMouseCapture(), inDragDrop); SelectionPosition newPos = SPositionFromLocation(pt, false, false, AllowVirtualSpace(virtualSpaceOptions, sel.IsRectangular())); if (hoverIndicatorPos != INVALID_POSITION) InvalidateRange(newPos.Position(), newPos.Position() + 1); newPos = MovePositionOutsideChar(newPos, sel.MainCaret() - newPos.Position()); if (inDragDrop == ddInitial) { inDragDrop = ddNone; SetEmptySelection(newPos); selectionType = selChar; originalAnchorPos = sel.MainCaret(); } if (hotSpotClickPos != INVALID_POSITION && PointIsHotspot(pt)) { hotSpotClickPos = INVALID_POSITION; SelectionPosition newCharPos = SPositionFromLocation(pt, false, true, false); newCharPos = MovePositionOutsideChar(newCharPos, -1); NotifyHotSpotReleaseClick(newCharPos.Position(), ctrl ? SCI_CTRL : 0); } if (HaveMouseCapture()) { if (PointInSelMargin(pt)) { DisplayCursor(GetMarginCursor(pt)); } else { DisplayCursor(Window::cursorText); SetHotSpotRange(NULL); } ptMouseLast = pt; SetMouseCapture(false); if (FineTickerAvailable()) { FineTickerCancel(tickScroll); } NotifyIndicatorClick(false, newPos.Position(), 0); if (inDragDrop == ddDragging) { SelectionPosition selStart = SelectionStart(); SelectionPosition selEnd = SelectionEnd(); if (selStart < selEnd) { if (drag.Length()) { const int length = static_cast(drag.Length()); if (ctrl) { const int lengthInserted = pdoc->InsertString( newPos.Position(), drag.Data(), length); if (lengthInserted > 0) { SetSelection(newPos.Position(), newPos.Position() + lengthInserted); } } else if (newPos < selStart) { pdoc->DeleteChars(selStart.Position(), static_cast(drag.Length())); const int lengthInserted = pdoc->InsertString( newPos.Position(), drag.Data(), length); if (lengthInserted > 0) { SetSelection(newPos.Position(), newPos.Position() + lengthInserted); } } else if (newPos > selEnd) { pdoc->DeleteChars(selStart.Position(), static_cast(drag.Length())); newPos.Add(-static_cast(drag.Length())); const int lengthInserted = pdoc->InsertString( newPos.Position(), drag.Data(), length); if (lengthInserted > 0) { SetSelection(newPos.Position(), newPos.Position() + lengthInserted); } } else { SetEmptySelection(newPos.Position()); } drag.Clear(); } selectionType = selChar; } } else { if (selectionType == selChar) { if (sel.Count() > 1) { sel.RangeMain() = SelectionRange(newPos, sel.Range(sel.Count() - 1).anchor); InvalidateWholeSelection(); } else { SetSelection(newPos, sel.RangeMain().anchor); } } sel.CommitTentative(); } SetRectangularRange(); lastClickTime = curTime; lastClick = pt; lastXChosen = static_cast(pt.x) + xOffset; if (sel.selType == Selection::selStream) { SetLastXChosen(); } inDragDrop = ddNone; EnsureCaretVisible(false); } } // Called frequently to perform background UI including // caret blinking and automatic scrolling. void Editor::Tick() { if (HaveMouseCapture()) { // Auto scroll ButtonMove(ptMouseLast); } if (caret.period > 0) { timer.ticksToWait -= timer.tickSize; if (timer.ticksToWait <= 0) { caret.on = !caret.on; timer.ticksToWait = caret.period; if (caret.active) { InvalidateCaret(); } } } if (horizontalScrollBarVisible && trackLineWidth && (view.lineWidthMaxSeen > scrollWidth)) { scrollWidth = view.lineWidthMaxSeen; SetScrollBars(); } if ((dwellDelay < SC_TIME_FOREVER) && (ticksToDwell > 0) && (!HaveMouseCapture()) && (ptMouseLast.y >= 0)) { ticksToDwell -= timer.tickSize; if (ticksToDwell <= 0) { dwelling = true; NotifyDwelling(ptMouseLast, dwelling); } } } bool Editor::Idle() { bool needWrap = Wrapping() && wrapPending.NeedsWrap(); if (needWrap) { // Wrap lines during idle. WrapLines(wsIdle); // No more wrapping needWrap = wrapPending.NeedsWrap(); } else if (needIdleStyling) { IdleStyling(); } // Add more idle things to do here, but make sure idleDone is // set correctly before the function returns. returning // false will stop calling this idle function until SetIdle() is // called again. const bool idleDone = !needWrap && !needIdleStyling; // && thatDone && theOtherThingDone... return !idleDone; } void Editor::SetTicking(bool) { // SetTicking is deprecated. In the past it was pure virtual and was overridden in each // derived platform class but fine grained timers should now be implemented. // Either way, execution should not arrive here so assert failure. assert(false); } void Editor::TickFor(TickReason reason) { switch (reason) { case tickCaret: caret.on = !caret.on; if (caret.active) { InvalidateCaret(); } break; case tickScroll: // Auto scroll ButtonMove(ptMouseLast); break; case tickWiden: SetScrollBars(); FineTickerCancel(tickWiden); break; case tickDwell: if ((!HaveMouseCapture()) && (ptMouseLast.y >= 0)) { dwelling = true; NotifyDwelling(ptMouseLast, dwelling); } FineTickerCancel(tickDwell); break; default: // tickPlatform handled by subclass break; } } bool Editor::FineTickerAvailable() { return false; } // FineTickerStart is be overridden by subclasses that support fine ticking so // this method should never be called. bool Editor::FineTickerRunning(TickReason) { assert(false); return false; } // FineTickerStart is be overridden by subclasses that support fine ticking so // this method should never be called. void Editor::FineTickerStart(TickReason, int, int) { assert(false); } // FineTickerCancel is be overridden by subclasses that support fine ticking so // this method should never be called. void Editor::FineTickerCancel(TickReason) { assert(false); } void Editor::SetFocusState(bool focusState) { hasFocus = focusState; NotifyFocus(hasFocus); if (!hasFocus) { CancelModes(); } ShowCaretAtCurrentPosition(); } int Editor::PositionAfterArea(PRectangle rcArea) const { // The start of the document line after the display line after the area // This often means that the line after a modification is restyled which helps // detect multiline comment additions and heals single line comments int lineAfter = TopLineOfMain() + static_cast(rcArea.bottom - 1) / vs.lineHeight + 1; if (lineAfter < cs.LinesDisplayed()) return pdoc->LineStart(cs.DocFromDisplay(lineAfter) + 1); else return pdoc->Length(); } // Style to a position within the view. If this causes a change at end of last line then // affects later lines so style all the viewed text. void Editor::StyleToPositionInView(Position pos) { int endWindow = PositionAfterArea(GetClientDrawingRectangle()); if (pos > endWindow) pos = endWindow; const int styleAtEnd = pdoc->StyleIndexAt(pos-1); pdoc->EnsureStyledTo(pos); if ((endWindow > pos) && (styleAtEnd != pdoc->StyleIndexAt(pos-1))) { // Style at end of line changed so is multi-line change like starting a comment // so require rest of window to be styled. DiscardOverdraw(); // Prepared bitmaps may be invalid // DiscardOverdraw may have truncated client drawing area so recalculate endWindow endWindow = PositionAfterArea(GetClientDrawingRectangle()); pdoc->EnsureStyledTo(endWindow); } } int Editor::PositionAfterMaxStyling(int posMax, bool scrolling) const { if ((idleStyling == SC_IDLESTYLING_NONE) || (idleStyling == SC_IDLESTYLING_AFTERVISIBLE)) { // Both states do not limit styling return posMax; } // Try to keep time taken by styling reasonable so interaction remains smooth. // When scrolling, allow less time to ensure responsive const double secondsAllowed = scrolling ? 0.005 : 0.02; const int linesToStyle = Platform::Clamp(static_cast(secondsAllowed / pdoc->durationStyleOneLine), 10, 0x10000); const int stylingMaxLine = std::min( static_cast(pdoc->LineFromPosition(pdoc->GetEndStyled()) + linesToStyle), pdoc->LinesTotal()); return std::min(static_cast(pdoc->LineStart(stylingMaxLine)), posMax); } void Editor::StartIdleStyling(bool truncatedLastStyling) { if ((idleStyling == SC_IDLESTYLING_ALL) || (idleStyling == SC_IDLESTYLING_AFTERVISIBLE)) { if (pdoc->GetEndStyled() < pdoc->Length()) { // Style remainder of document in idle time needIdleStyling = true; } } else if (truncatedLastStyling) { needIdleStyling = true; } if (needIdleStyling) { SetIdle(true); } } // Style for an area but bound the amount of styling to remain responsive void Editor::StyleAreaBounded(PRectangle rcArea, bool scrolling) { const int posAfterArea = PositionAfterArea(rcArea); const int posAfterMax = PositionAfterMaxStyling(posAfterArea, scrolling); if (posAfterMax < posAfterArea) { // Idle styling may be performed before current visible area // Style a bit now then style further in idle time pdoc->StyleToAdjustingLineDuration(posAfterMax); } else { // Can style all wanted now. StyleToPositionInView(posAfterArea); } StartIdleStyling(posAfterMax < posAfterArea); } void Editor::IdleStyling() { const int posAfterArea = PositionAfterArea(GetClientRectangle()); const int endGoal = (idleStyling >= SC_IDLESTYLING_AFTERVISIBLE) ? pdoc->Length() : posAfterArea; const int posAfterMax = PositionAfterMaxStyling(endGoal, false); pdoc->StyleToAdjustingLineDuration(posAfterMax); if (pdoc->GetEndStyled() >= endGoal) { needIdleStyling = false; } } void Editor::IdleWork() { // Style the line after the modification as this allows modifications that change just the // line of the modification to heal instead of propagating to the rest of the window. if (workNeeded.items & WorkNeeded::workStyle) { StyleToPositionInView(pdoc->LineStart(pdoc->LineFromPosition(workNeeded.upTo) + 2)); } NotifyUpdateUI(); workNeeded.Reset(); } void Editor::QueueIdleWork(WorkNeeded::workItems items, int upTo) { workNeeded.Need(items, upTo); } bool Editor::PaintContains(PRectangle rc) { if (rc.Empty()) { return true; } else { return rcPaint.Contains(rc); } } bool Editor::PaintContainsMargin() { if (wMargin.GetID()) { // With separate margin view, paint of text view // never contains margin. return false; } PRectangle rcSelMargin = GetClientRectangle(); rcSelMargin.right = static_cast(vs.textStart); return PaintContains(rcSelMargin); } void Editor::CheckForChangeOutsidePaint(Range r) { if (paintState == painting && !paintingAllText) { //Platform::DebugPrintf("Checking range in paint %d-%d\n", r.start, r.end); if (!r.Valid()) return; PRectangle rcRange = RectangleFromRange(r, 0); PRectangle rcText = GetTextRectangle(); if (rcRange.top < rcText.top) { rcRange.top = rcText.top; } if (rcRange.bottom > rcText.bottom) { rcRange.bottom = rcText.bottom; } if (!PaintContains(rcRange)) { AbandonPaint(); paintAbandonedByStyling = true; } } } void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) { if ((pos0 != braces[0]) || (pos1 != braces[1]) || (matchStyle != bracesMatchStyle)) { if ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) { CheckForChangeOutsidePaint(Range(braces[0])); CheckForChangeOutsidePaint(Range(pos0)); braces[0] = pos0; } if ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) { CheckForChangeOutsidePaint(Range(braces[1])); CheckForChangeOutsidePaint(Range(pos1)); braces[1] = pos1; } bracesMatchStyle = matchStyle; if (paintState == notPainting) { Redraw(); } } } void Editor::SetAnnotationHeights(int start, int end) { if (vs.annotationVisible) { RefreshStyleData(); bool changedHeight = false; for (int line=start; lineLinesTotal(); line++) { int linesWrapped = 1; if (Wrapping()) { AutoSurface surface(this); AutoLineLayout ll(view.llc, view.RetrieveLineLayout(line, *this)); if (surface && ll) { view.LayoutLine(*this, line, surface, vs, ll, wrapWidth); linesWrapped = ll->lines; } } if (cs.SetHeight(line, pdoc->AnnotationLines(line) + linesWrapped)) changedHeight = true; } if (changedHeight) { Redraw(); } } } void Editor::SetDocPointer(Document *document) { //Platform::DebugPrintf("** %x setdoc to %x\n", pdoc, document); pdoc->RemoveWatcher(this, 0); pdoc->Release(); if (document == NULL) { pdoc = new Document(); } else { pdoc = document; } pdoc->AddRef(); // Ensure all positions within document sel.Clear(); targetStart = 0; targetEnd = 0; braces[0] = invalidPosition; braces[1] = invalidPosition; vs.ReleaseAllExtendedStyles(); SetRepresentations(); // Reset the contraction state to fully shown. cs.Clear(); cs.InsertLines(0, pdoc->LinesTotal() - 1); SetAnnotationHeights(0, pdoc->LinesTotal()); view.llc.Deallocate(); NeedWrapping(); hotspot = Range(invalidPosition); hoverIndicatorPos = invalidPosition; view.ClearAllTabstops(); pdoc->AddWatcher(this, 0); SetScrollBars(); Redraw(); } void Editor::SetAnnotationVisible(int visible) { if (vs.annotationVisible != visible) { bool changedFromOrToHidden = ((vs.annotationVisible != 0) != (visible != 0)); vs.annotationVisible = visible; if (changedFromOrToHidden) { int dir = vs.annotationVisible ? 1 : -1; for (int line=0; lineLinesTotal(); line++) { int annotationLines = pdoc->AnnotationLines(line); if (annotationLines > 0) { cs.SetHeight(line, cs.GetHeight(line) + annotationLines * dir); } } } Redraw(); } } /** * Recursively expand a fold, making lines visible except where they have an unexpanded parent. */ int Editor::ExpandLine(int line) { int lineMaxSubord = pdoc->GetLastChild(line); line++; while (line <= lineMaxSubord) { cs.SetVisible(line, line, true); int level = pdoc->GetLevel(line); if (level & SC_FOLDLEVELHEADERFLAG) { if (cs.GetExpanded(line)) { line = ExpandLine(line); } else { line = pdoc->GetLastChild(line); } } line++; } return lineMaxSubord; } void Editor::SetFoldExpanded(int lineDoc, bool expanded) { if (cs.SetExpanded(lineDoc, expanded)) { RedrawSelMargin(); } } void Editor::FoldLine(int line, int action) { if (line >= 0) { if (action == SC_FOLDACTION_TOGGLE) { if ((pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) == 0) { line = pdoc->GetFoldParent(line); if (line < 0) return; } action = (cs.GetExpanded(line)) ? SC_FOLDACTION_CONTRACT : SC_FOLDACTION_EXPAND; } if (action == SC_FOLDACTION_CONTRACT) { int lineMaxSubord = pdoc->GetLastChild(line); if (lineMaxSubord > line) { cs.SetExpanded(line, 0); cs.SetVisible(line + 1, lineMaxSubord, false); int lineCurrent = pdoc->LineFromPosition(sel.MainCaret()); if (lineCurrent > line && lineCurrent <= lineMaxSubord) { // This does not re-expand the fold EnsureCaretVisible(); } } } else { if (!(cs.GetVisible(line))) { EnsureLineVisible(line, false); GoToLine(line); } cs.SetExpanded(line, 1); ExpandLine(line); } SetScrollBars(); Redraw(); } } void Editor::FoldExpand(int line, int action, int level) { bool expanding = action == SC_FOLDACTION_EXPAND; if (action == SC_FOLDACTION_TOGGLE) { expanding = !cs.GetExpanded(line); } // Ensure child lines lexed and fold information extracted before // flipping the state. pdoc->GetLastChild(line, LevelNumber(level)); SetFoldExpanded(line, expanding); if (expanding && (cs.HiddenLines() == 0)) // Nothing to do return; int lineMaxSubord = pdoc->GetLastChild(line, LevelNumber(level)); line++; cs.SetVisible(line, lineMaxSubord, expanding); while (line <= lineMaxSubord) { int levelLine = pdoc->GetLevel(line); if (levelLine & SC_FOLDLEVELHEADERFLAG) { SetFoldExpanded(line, expanding); } line++; } SetScrollBars(); Redraw(); } int Editor::ContractedFoldNext(int lineStart) const { for (int line = lineStart; lineLinesTotal();) { if (!cs.GetExpanded(line) && (pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG)) return line; line = cs.ContractedNext(line+1); if (line < 0) return -1; } return -1; } /** * Recurse up from this line to find any folds that prevent this line from being visible * and unfold them all. */ void Editor::EnsureLineVisible(int lineDoc, bool enforcePolicy) { // In case in need of wrapping to ensure DisplayFromDoc works. if (lineDoc >= wrapPending.start) WrapLines(wsAll); if (!cs.GetVisible(lineDoc)) { // Back up to find a non-blank line int lookLine = lineDoc; int lookLineLevel = pdoc->GetLevel(lookLine); while ((lookLine > 0) && (lookLineLevel & SC_FOLDLEVELWHITEFLAG)) { lookLineLevel = pdoc->GetLevel(--lookLine); } int lineParent = pdoc->GetFoldParent(lookLine); if (lineParent < 0) { // Backed up to a top level line, so try to find parent of initial line lineParent = pdoc->GetFoldParent(lineDoc); } if (lineParent >= 0) { if (lineDoc != lineParent) EnsureLineVisible(lineParent, enforcePolicy); if (!cs.GetExpanded(lineParent)) { cs.SetExpanded(lineParent, 1); ExpandLine(lineParent); } } SetScrollBars(); Redraw(); } if (enforcePolicy) { int lineDisplay = cs.DisplayFromDoc(lineDoc); if (visiblePolicy & VISIBLE_SLOP) { if ((topLine > lineDisplay) || ((visiblePolicy & VISIBLE_STRICT) && (topLine + visibleSlop > lineDisplay))) { SetTopLine(Platform::Clamp(lineDisplay - visibleSlop, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); } else if ((lineDisplay > topLine + LinesOnScreen() - 1) || ((visiblePolicy & VISIBLE_STRICT) && (lineDisplay > topLine + LinesOnScreen() - 1 - visibleSlop))) { SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() + 1 + visibleSlop, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); } } else { if ((topLine > lineDisplay) || (lineDisplay > topLine + LinesOnScreen() - 1) || (visiblePolicy & VISIBLE_STRICT)) { SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() / 2 + 1, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); } } } } void Editor::FoldAll(int action) { pdoc->EnsureStyledTo(pdoc->Length()); int maxLine = pdoc->LinesTotal(); bool expanding = action == SC_FOLDACTION_EXPAND; if (action == SC_FOLDACTION_TOGGLE) { // Discover current state for (int lineSeek = 0; lineSeek < maxLine; lineSeek++) { if (pdoc->GetLevel(lineSeek) & SC_FOLDLEVELHEADERFLAG) { expanding = !cs.GetExpanded(lineSeek); break; } } } if (expanding) { cs.SetVisible(0, maxLine-1, true); for (int line = 0; line < maxLine; line++) { int levelLine = pdoc->GetLevel(line); if (levelLine & SC_FOLDLEVELHEADERFLAG) { SetFoldExpanded(line, true); } } } else { for (int line = 0; line < maxLine; line++) { int level = pdoc->GetLevel(line); if ((level & SC_FOLDLEVELHEADERFLAG) && (SC_FOLDLEVELBASE == LevelNumber(level))) { SetFoldExpanded(line, false); int lineMaxSubord = pdoc->GetLastChild(line, -1); if (lineMaxSubord > line) { cs.SetVisible(line + 1, lineMaxSubord, false); } } } } SetScrollBars(); Redraw(); } void Editor::FoldChanged(int line, int levelNow, int levelPrev) { if (levelNow & SC_FOLDLEVELHEADERFLAG) { if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) { // Adding a fold point. if (cs.SetExpanded(line, true)) { RedrawSelMargin(); } FoldExpand(line, SC_FOLDACTION_EXPAND, levelPrev); } } else if (levelPrev & SC_FOLDLEVELHEADERFLAG) { const int prevLine = line - 1; const int prevLineLevel = pdoc->GetLevel(prevLine); // Combining two blocks where the first block is collapsed (e.g. by deleting the line(s) which separate(s) the two blocks) if ((LevelNumber(prevLineLevel) == LevelNumber(levelNow)) && !cs.GetVisible(prevLine)) FoldLine(pdoc->GetFoldParent(prevLine), SC_FOLDACTION_EXPAND); if (!cs.GetExpanded(line)) { // Removing the fold from one that has been contracted so should expand // otherwise lines are left invisible with no way to make them visible if (cs.SetExpanded(line, true)) { RedrawSelMargin(); } // Combining two blocks where the second one is collapsed (e.g. by adding characters in the line which separates the two blocks) FoldExpand(line, SC_FOLDACTION_EXPAND, levelPrev); } } if (!(levelNow & SC_FOLDLEVELWHITEFLAG) && (LevelNumber(levelPrev) > LevelNumber(levelNow))) { if (cs.HiddenLines()) { // See if should still be hidden int parentLine = pdoc->GetFoldParent(line); if ((parentLine < 0) || (cs.GetExpanded(parentLine) && cs.GetVisible(parentLine))) { cs.SetVisible(line, line, true); SetScrollBars(); Redraw(); } } } // Combining two blocks where the first one is collapsed (e.g. by adding characters in the line which separates the two blocks) if (!(levelNow & SC_FOLDLEVELWHITEFLAG) && (LevelNumber(levelPrev) < LevelNumber(levelNow))) { if (cs.HiddenLines()) { const int parentLine = pdoc->GetFoldParent(line); if (!cs.GetExpanded(parentLine) && cs.GetExpanded(line)) FoldLine(parentLine, SC_FOLDACTION_EXPAND); } } } void Editor::NeedShown(int pos, int len) { if (foldAutomatic & SC_AUTOMATICFOLD_SHOW) { int lineStart = pdoc->LineFromPosition(pos); int lineEnd = pdoc->LineFromPosition(pos+len); for (int line = lineStart; line <= lineEnd; line++) { EnsureLineVisible(line, false); } } else { NotifyNeedShown(pos, len); } } int Editor::GetTag(char *tagValue, int tagNumber) { const char *text = 0; int length = 0; if ((tagNumber >= 1) && (tagNumber <= 9)) { char name[3] = "\\?"; name[1] = static_cast(tagNumber + '0'); length = 2; text = pdoc->SubstituteByPosition(name, &length); } if (tagValue) { if (text) memcpy(tagValue, text, length + 1); else *tagValue = '\0'; } return length; } int Editor::ReplaceTarget(bool replacePatterns, const char *text, int length) { UndoGroup ug(pdoc); if (length == -1) length = istrlen(text); if (replacePatterns) { text = pdoc->SubstituteByPosition(text, &length); if (!text) { return 0; } } if (targetStart != targetEnd) pdoc->DeleteChars(targetStart, targetEnd - targetStart); targetEnd = targetStart; const int lengthInserted = pdoc->InsertString(targetStart, text, length); targetEnd = targetStart + lengthInserted; return length; } bool Editor::IsUnicodeMode() const { return pdoc && (SC_CP_UTF8 == pdoc->dbcsCodePage); } int Editor::CodePage() const { if (pdoc) return pdoc->dbcsCodePage; else return 0; } int Editor::WrapCount(int line) { AutoSurface surface(this); AutoLineLayout ll(view.llc, view.RetrieveLineLayout(line, *this)); if (surface && ll) { view.LayoutLine(*this, line, surface, vs, ll, wrapWidth); return ll->lines; } else { return 1; } } void Editor::AddStyledText(char *buffer, int appendLength) { // The buffer consists of alternating character bytes and style bytes int textLength = appendLength / 2; std::string text(textLength, '\0'); int i; for (i = 0; i < textLength; i++) { text[i] = buffer[i*2]; } const int lengthInserted = pdoc->InsertString(CurrentPosition(), text.c_str(), textLength); for (i = 0; i < textLength; i++) { text[i] = buffer[i*2+1]; } pdoc->StartStyling(CurrentPosition(), static_cast(0xff)); pdoc->SetStyles(textLength, text.c_str()); SetEmptySelection(sel.MainCaret() + lengthInserted); } bool Editor::ValidMargin(uptr_t wParam) const { return wParam < vs.ms.size(); } static char *CharPtrFromSPtr(sptr_t lParam) { return reinterpret_cast(lParam); } void Editor::StyleSetMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { vs.EnsureStyle(wParam); switch (iMessage) { case SCI_STYLESETFORE: vs.styles[wParam].fore = ColourDesired(static_cast(lParam)); break; case SCI_STYLESETBACK: vs.styles[wParam].back = ColourDesired(static_cast(lParam)); break; case SCI_STYLESETBOLD: vs.styles[wParam].weight = lParam != 0 ? SC_WEIGHT_BOLD : SC_WEIGHT_NORMAL; break; case SCI_STYLESETWEIGHT: vs.styles[wParam].weight = static_cast(lParam); break; case SCI_STYLESETITALIC: vs.styles[wParam].italic = lParam != 0; break; case SCI_STYLESETEOLFILLED: vs.styles[wParam].eolFilled = lParam != 0; break; case SCI_STYLESETSIZE: vs.styles[wParam].size = static_cast(lParam * SC_FONT_SIZE_MULTIPLIER); break; case SCI_STYLESETSIZEFRACTIONAL: vs.styles[wParam].size = static_cast(lParam); break; case SCI_STYLESETFONT: if (lParam != 0) { vs.SetStyleFontName(static_cast(wParam), CharPtrFromSPtr(lParam)); } break; case SCI_STYLESETUNDERLINE: vs.styles[wParam].underline = lParam != 0; break; case SCI_STYLESETCASE: vs.styles[wParam].caseForce = static_cast(lParam); break; case SCI_STYLESETCHARACTERSET: vs.styles[wParam].characterSet = static_cast(lParam); pdoc->SetCaseFolder(NULL); break; case SCI_STYLESETVISIBLE: vs.styles[wParam].visible = lParam != 0; break; case SCI_STYLESETCHANGEABLE: vs.styles[wParam].changeable = lParam != 0; break; case SCI_STYLESETHOTSPOT: vs.styles[wParam].hotspot = lParam != 0; break; } InvalidateStyleRedraw(); } sptr_t Editor::StyleGetMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { vs.EnsureStyle(wParam); switch (iMessage) { case SCI_STYLEGETFORE: return vs.styles[wParam].fore.AsLong(); case SCI_STYLEGETBACK: return vs.styles[wParam].back.AsLong(); case SCI_STYLEGETBOLD: return vs.styles[wParam].weight > SC_WEIGHT_NORMAL; case SCI_STYLEGETWEIGHT: return vs.styles[wParam].weight; case SCI_STYLEGETITALIC: return vs.styles[wParam].italic ? 1 : 0; case SCI_STYLEGETEOLFILLED: return vs.styles[wParam].eolFilled ? 1 : 0; case SCI_STYLEGETSIZE: return vs.styles[wParam].size / SC_FONT_SIZE_MULTIPLIER; case SCI_STYLEGETSIZEFRACTIONAL: return vs.styles[wParam].size; case SCI_STYLEGETFONT: return StringResult(lParam, vs.styles[wParam].fontName); case SCI_STYLEGETUNDERLINE: return vs.styles[wParam].underline ? 1 : 0; case SCI_STYLEGETCASE: return static_cast(vs.styles[wParam].caseForce); case SCI_STYLEGETCHARACTERSET: return vs.styles[wParam].characterSet; case SCI_STYLEGETVISIBLE: return vs.styles[wParam].visible ? 1 : 0; case SCI_STYLEGETCHANGEABLE: return vs.styles[wParam].changeable ? 1 : 0; case SCI_STYLEGETHOTSPOT: return vs.styles[wParam].hotspot ? 1 : 0; } return 0; } void Editor::SetSelectionNMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { InvalidateRange(sel.Range(wParam).Start().Position(), sel.Range(wParam).End().Position()); switch (iMessage) { case SCI_SETSELECTIONNCARET: sel.Range(wParam).caret.SetPosition(static_cast(lParam)); break; case SCI_SETSELECTIONNANCHOR: sel.Range(wParam).anchor.SetPosition(static_cast(lParam)); break; case SCI_SETSELECTIONNCARETVIRTUALSPACE: sel.Range(wParam).caret.SetVirtualSpace(static_cast(lParam)); break; case SCI_SETSELECTIONNANCHORVIRTUALSPACE: sel.Range(wParam).anchor.SetVirtualSpace(static_cast(lParam)); break; case SCI_SETSELECTIONNSTART: sel.Range(wParam).anchor.SetPosition(static_cast(lParam)); break; case SCI_SETSELECTIONNEND: sel.Range(wParam).caret.SetPosition(static_cast(lParam)); break; } InvalidateRange(sel.Range(wParam).Start().Position(), sel.Range(wParam).End().Position()); ContainerNeedsUpdate(SC_UPDATE_SELECTION); } sptr_t Editor::StringResult(sptr_t lParam, const char *val) { const size_t len = val ? strlen(val) : 0; if (lParam) { char *ptr = CharPtrFromSPtr(lParam); if (val) memcpy(ptr, val, len+1); else *ptr = 0; } return len; // Not including NUL } sptr_t Editor::BytesResult(sptr_t lParam, const unsigned char *val, size_t len) { // No NUL termination: len is number of valid/displayed bytes if ((lParam) && (len > 0)) { char *ptr = CharPtrFromSPtr(lParam); if (val) memcpy(ptr, val, len); else *ptr = 0; } return val ? len : 0; } sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { //Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam); // Optional macro recording hook if (recordingMacro) NotifyMacroRecord(iMessage, wParam, lParam); switch (iMessage) { case SCI_GETTEXT: { if (lParam == 0) return pdoc->Length() + 1; if (wParam == 0) return 0; char *ptr = CharPtrFromSPtr(lParam); unsigned int iChar = 0; for (; iChar < wParam - 1; iChar++) ptr[iChar] = pdoc->CharAt(iChar); ptr[iChar] = '\0'; return iChar; } case SCI_SETTEXT: { if (lParam == 0) return 0; UndoGroup ug(pdoc); pdoc->DeleteChars(0, pdoc->Length()); SetEmptySelection(0); const char *text = CharPtrFromSPtr(lParam); pdoc->InsertString(0, text, istrlen(text)); return 1; } case SCI_GETTEXTLENGTH: return pdoc->Length(); case SCI_CUT: Cut(); SetLastXChosen(); break; case SCI_COPY: Copy(); break; case SCI_COPYALLOWLINE: CopyAllowLine(); break; case SCI_VERTICALCENTRECARET: VerticalCentreCaret(); break; case SCI_MOVESELECTEDLINESUP: MoveSelectedLinesUp(); break; case SCI_MOVESELECTEDLINESDOWN: MoveSelectedLinesDown(); break; case SCI_COPYRANGE: CopyRangeToClipboard(static_cast(wParam), static_cast(lParam)); break; case SCI_COPYTEXT: CopyText(static_cast(wParam), CharPtrFromSPtr(lParam)); break; case SCI_PASTE: Paste(); if ((caretSticky == SC_CARETSTICKY_OFF) || (caretSticky == SC_CARETSTICKY_WHITESPACE)) { SetLastXChosen(); } EnsureCaretVisible(); break; case SCI_CLEAR: Clear(); SetLastXChosen(); EnsureCaretVisible(); break; case SCI_UNDO: Undo(); SetLastXChosen(); break; case SCI_CANUNDO: return (pdoc->CanUndo() && !pdoc->IsReadOnly()) ? 1 : 0; case SCI_EMPTYUNDOBUFFER: pdoc->DeleteUndoHistory(); return 0; case SCI_GETFIRSTVISIBLELINE: return topLine; case SCI_SETFIRSTVISIBLELINE: ScrollTo(static_cast(wParam)); break; case SCI_GETLINE: { // Risk of overwriting the end of the buffer int lineStart = pdoc->LineStart(static_cast(wParam)); int lineEnd = pdoc->LineStart(static_cast(wParam + 1)); if (lParam == 0) { return lineEnd - lineStart; } char *ptr = CharPtrFromSPtr(lParam); int iPlace = 0; for (int iChar = lineStart; iChar < lineEnd; iChar++) { ptr[iPlace++] = pdoc->CharAt(iChar); } return iPlace; } case SCI_GETLINECOUNT: if (pdoc->LinesTotal() == 0) return 1; else return pdoc->LinesTotal(); case SCI_GETMODIFY: return !pdoc->IsSavePoint(); case SCI_SETSEL: { int nStart = static_cast(wParam); int nEnd = static_cast(lParam); if (nEnd < 0) nEnd = pdoc->Length(); if (nStart < 0) nStart = nEnd; // Remove selection InvalidateSelection(SelectionRange(nStart, nEnd)); sel.Clear(); sel.selType = Selection::selStream; SetSelection(nEnd, nStart); EnsureCaretVisible(); } break; case SCI_GETSELTEXT: { SelectionText selectedText; CopySelectionRange(&selectedText); if (lParam == 0) { return selectedText.LengthWithTerminator(); } else { char *ptr = CharPtrFromSPtr(lParam); unsigned int iChar = 0; if (selectedText.Length()) { for (; iChar < selectedText.LengthWithTerminator(); iChar++) ptr[iChar] = selectedText.Data()[iChar]; } else { ptr[0] = '\0'; } return iChar; } } case SCI_LINEFROMPOSITION: if (static_cast(wParam) < 0) return 0; return pdoc->LineFromPosition(static_cast(wParam)); case SCI_POSITIONFROMLINE: if (static_cast(wParam) < 0) wParam = pdoc->LineFromPosition(SelectionStart().Position()); if (wParam == 0) return 0; // Even if there is no text, there is a first line that starts at 0 if (static_cast(wParam) > pdoc->LinesTotal()) return -1; //if (wParam > pdoc->LineFromPosition(pdoc->Length())) // Useful test, anyway... // return -1; return pdoc->LineStart(static_cast(wParam)); // Replacement of the old Scintilla interpretation of EM_LINELENGTH case SCI_LINELENGTH: if ((static_cast(wParam) < 0) || (static_cast(wParam) > pdoc->LineFromPosition(pdoc->Length()))) return 0; return pdoc->LineStart(static_cast(wParam) + 1) - pdoc->LineStart(static_cast(wParam)); case SCI_REPLACESEL: { if (lParam == 0) return 0; UndoGroup ug(pdoc); ClearSelection(); char *replacement = CharPtrFromSPtr(lParam); const int lengthInserted = pdoc->InsertString( sel.MainCaret(), replacement, istrlen(replacement)); SetEmptySelection(sel.MainCaret() + lengthInserted); EnsureCaretVisible(); } break; case SCI_SETTARGETSTART: targetStart = static_cast(wParam); break; case SCI_GETTARGETSTART: return targetStart; case SCI_SETTARGETEND: targetEnd = static_cast(wParam); break; case SCI_GETTARGETEND: return targetEnd; case SCI_SETTARGETRANGE: targetStart = static_cast(wParam); targetEnd = static_cast(lParam); break; case SCI_TARGETWHOLEDOCUMENT: targetStart = 0; targetEnd = pdoc->Length(); break; case SCI_TARGETFROMSELECTION: if (sel.MainCaret() < sel.MainAnchor()) { targetStart = sel.MainCaret(); targetEnd = sel.MainAnchor(); } else { targetStart = sel.MainAnchor(); targetEnd = sel.MainCaret(); } break; case SCI_GETTARGETTEXT: { std::string text = RangeText(targetStart, targetEnd); return BytesResult(lParam, reinterpret_cast(text.c_str()), text.length()); } case SCI_REPLACETARGET: PLATFORM_ASSERT(lParam); return ReplaceTarget(false, CharPtrFromSPtr(lParam), static_cast(wParam)); case SCI_REPLACETARGETRE: PLATFORM_ASSERT(lParam); return ReplaceTarget(true, CharPtrFromSPtr(lParam), static_cast(wParam)); case SCI_SEARCHINTARGET: PLATFORM_ASSERT(lParam); return SearchInTarget(CharPtrFromSPtr(lParam), static_cast(wParam)); case SCI_SETSEARCHFLAGS: searchFlags = static_cast(wParam); break; case SCI_GETSEARCHFLAGS: return searchFlags; case SCI_GETTAG: return GetTag(CharPtrFromSPtr(lParam), static_cast(wParam)); case SCI_POSITIONBEFORE: return pdoc->MovePositionOutsideChar(static_cast(wParam) - 1, -1, true); case SCI_POSITIONAFTER: return pdoc->MovePositionOutsideChar(static_cast(wParam) + 1, 1, true); case SCI_POSITIONRELATIVE: return Platform::Clamp(pdoc->GetRelativePosition(static_cast(wParam), static_cast(lParam)), 0, pdoc->Length()); case SCI_LINESCROLL: ScrollTo(topLine + static_cast(lParam)); HorizontalScrollTo(xOffset + static_cast(wParam)* static_cast(vs.spaceWidth)); return 1; case SCI_SETXOFFSET: xOffset = static_cast(wParam); ContainerNeedsUpdate(SC_UPDATE_H_SCROLL); SetHorizontalScrollPos(); Redraw(); break; case SCI_GETXOFFSET: return xOffset; case SCI_CHOOSECARETX: SetLastXChosen(); break; case SCI_SCROLLCARET: EnsureCaretVisible(); break; case SCI_SETREADONLY: pdoc->SetReadOnly(wParam != 0); return 1; case SCI_GETREADONLY: return pdoc->IsReadOnly(); case SCI_CANPASTE: return CanPaste(); case SCI_POINTXFROMPOSITION: if (lParam < 0) { return 0; } else { Point pt = LocationFromPosition(static_cast(lParam)); // Convert to view-relative return static_cast(pt.x) - vs.textStart + vs.fixedColumnWidth; } case SCI_POINTYFROMPOSITION: if (lParam < 0) { return 0; } else { Point pt = LocationFromPosition(static_cast(lParam)); return static_cast(pt.y); } case SCI_FINDTEXT: return FindText(wParam, lParam); case SCI_GETTEXTRANGE: { if (lParam == 0) return 0; Sci_TextRange *tr = reinterpret_cast(lParam); int cpMax = static_cast(tr->chrg.cpMax); if (cpMax == -1) cpMax = pdoc->Length(); PLATFORM_ASSERT(cpMax <= pdoc->Length()); int len = static_cast(cpMax - tr->chrg.cpMin); // No -1 as cpMin and cpMax are referring to inter character positions pdoc->GetCharRange(tr->lpstrText, static_cast(tr->chrg.cpMin), len); // Spec says copied text is terminated with a NUL tr->lpstrText[len] = '\0'; return len; // Not including NUL } case SCI_HIDESELECTION: view.hideSelection = wParam != 0; Redraw(); break; case SCI_FORMATRANGE: return FormatRange(wParam != 0, reinterpret_cast(lParam)); case SCI_GETMARGINLEFT: return vs.leftMarginWidth; case SCI_GETMARGINRIGHT: return vs.rightMarginWidth; case SCI_SETMARGINLEFT: lastXChosen += static_cast(lParam) - vs.leftMarginWidth; vs.leftMarginWidth = static_cast(lParam); InvalidateStyleRedraw(); break; case SCI_SETMARGINRIGHT: vs.rightMarginWidth = static_cast(lParam); InvalidateStyleRedraw(); break; // Control specific mesages case SCI_ADDTEXT: { if (lParam == 0) return 0; const int lengthInserted = pdoc->InsertString( CurrentPosition(), CharPtrFromSPtr(lParam), static_cast(wParam)); SetEmptySelection(sel.MainCaret() + lengthInserted); return 0; } case SCI_ADDSTYLEDTEXT: if (lParam) AddStyledText(CharPtrFromSPtr(lParam), static_cast(wParam)); return 0; case SCI_INSERTTEXT: { if (lParam == 0) return 0; int insertPos = static_cast(wParam); if (static_cast(wParam) == -1) insertPos = CurrentPosition(); int newCurrent = CurrentPosition(); char *sz = CharPtrFromSPtr(lParam); const int lengthInserted = pdoc->InsertString(insertPos, sz, istrlen(sz)); if (newCurrent > insertPos) newCurrent += lengthInserted; SetEmptySelection(newCurrent); return 0; } case SCI_CHANGEINSERTION: PLATFORM_ASSERT(lParam); pdoc->ChangeInsertion(CharPtrFromSPtr(lParam), static_cast(wParam)); return 0; case SCI_APPENDTEXT: pdoc->InsertString(pdoc->Length(), CharPtrFromSPtr(lParam), static_cast(wParam)); return 0; case SCI_CLEARALL: ClearAll(); return 0; case SCI_DELETERANGE: pdoc->DeleteChars(static_cast(wParam), static_cast(lParam)); return 0; case SCI_CLEARDOCUMENTSTYLE: ClearDocumentStyle(); return 0; case SCI_SETUNDOCOLLECTION: pdoc->SetUndoCollection(wParam != 0); return 0; case SCI_GETUNDOCOLLECTION: return pdoc->IsCollectingUndo(); case SCI_BEGINUNDOACTION: pdoc->BeginUndoAction(); return 0; case SCI_ENDUNDOACTION: pdoc->EndUndoAction(); return 0; case SCI_GETCARETPERIOD: return caret.period; case SCI_SETCARETPERIOD: CaretSetPeriod(static_cast(wParam)); break; case SCI_GETWORDCHARS: return pdoc->GetCharsOfClass(CharClassify::ccWord, reinterpret_cast(lParam)); case SCI_SETWORDCHARS: { pdoc->SetDefaultCharClasses(false); if (lParam == 0) return 0; pdoc->SetCharClasses(reinterpret_cast(lParam), CharClassify::ccWord); } break; case SCI_GETWHITESPACECHARS: return pdoc->GetCharsOfClass(CharClassify::ccSpace, reinterpret_cast(lParam)); case SCI_SETWHITESPACECHARS: { if (lParam == 0) return 0; pdoc->SetCharClasses(reinterpret_cast(lParam), CharClassify::ccSpace); } break; case SCI_GETPUNCTUATIONCHARS: return pdoc->GetCharsOfClass(CharClassify::ccPunctuation, reinterpret_cast(lParam)); case SCI_SETPUNCTUATIONCHARS: { if (lParam == 0) return 0; pdoc->SetCharClasses(reinterpret_cast(lParam), CharClassify::ccPunctuation); } break; case SCI_SETCHARSDEFAULT: pdoc->SetDefaultCharClasses(true); break; case SCI_GETLENGTH: return pdoc->Length(); case SCI_ALLOCATE: pdoc->Allocate(static_cast(wParam)); break; case SCI_GETCHARAT: return pdoc->CharAt(static_cast(wParam)); case SCI_SETCURRENTPOS: if (sel.IsRectangular()) { sel.Rectangular().caret.SetPosition(static_cast(wParam)); SetRectangularRange(); Redraw(); } else { SetSelection(static_cast(wParam), sel.MainAnchor()); } break; case SCI_GETCURRENTPOS: return sel.IsRectangular() ? sel.Rectangular().caret.Position() : sel.MainCaret(); case SCI_SETANCHOR: if (sel.IsRectangular()) { sel.Rectangular().anchor.SetPosition(static_cast(wParam)); SetRectangularRange(); Redraw(); } else { SetSelection(sel.MainCaret(), static_cast(wParam)); } break; case SCI_GETANCHOR: return sel.IsRectangular() ? sel.Rectangular().anchor.Position() : sel.MainAnchor(); case SCI_SETSELECTIONSTART: SetSelection(Platform::Maximum(sel.MainCaret(), static_cast(wParam)), static_cast(wParam)); break; case SCI_GETSELECTIONSTART: return sel.LimitsForRectangularElseMain().start.Position(); case SCI_SETSELECTIONEND: SetSelection(static_cast(wParam), Platform::Minimum(sel.MainAnchor(), static_cast(wParam))); break; case SCI_GETSELECTIONEND: return sel.LimitsForRectangularElseMain().end.Position(); case SCI_SETEMPTYSELECTION: SetEmptySelection(static_cast(wParam)); break; case SCI_SETPRINTMAGNIFICATION: view.printParameters.magnification = static_cast(wParam); break; case SCI_GETPRINTMAGNIFICATION: return view.printParameters.magnification; case SCI_SETPRINTCOLOURMODE: view.printParameters.colourMode = static_cast(wParam); break; case SCI_GETPRINTCOLOURMODE: return view.printParameters.colourMode; case SCI_SETPRINTWRAPMODE: view.printParameters.wrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone; break; case SCI_GETPRINTWRAPMODE: return view.printParameters.wrapState; case SCI_GETSTYLEAT: if (static_cast(wParam) >= pdoc->Length()) return 0; else return pdoc->StyleAt(static_cast(wParam)); case SCI_REDO: Redo(); break; case SCI_SELECTALL: SelectAll(); break; case SCI_SETSAVEPOINT: pdoc->SetSavePoint(); break; case SCI_GETSTYLEDTEXT: { if (lParam == 0) return 0; Sci_TextRange *tr = reinterpret_cast(lParam); int iPlace = 0; for (long iChar = tr->chrg.cpMin; iChar < tr->chrg.cpMax; iChar++) { tr->lpstrText[iPlace++] = pdoc->CharAt(static_cast(iChar)); tr->lpstrText[iPlace++] = pdoc->StyleAt(static_cast(iChar)); } tr->lpstrText[iPlace] = '\0'; tr->lpstrText[iPlace + 1] = '\0'; return iPlace; } case SCI_CANREDO: return (pdoc->CanRedo() && !pdoc->IsReadOnly()) ? 1 : 0; case SCI_MARKERLINEFROMHANDLE: return pdoc->LineFromHandle(static_cast(wParam)); case SCI_MARKERDELETEHANDLE: pdoc->DeleteMarkFromHandle(static_cast(wParam)); break; case SCI_GETVIEWWS: return vs.viewWhitespace; case SCI_SETVIEWWS: vs.viewWhitespace = static_cast(wParam); Redraw(); break; case SCI_GETTABDRAWMODE: return vs.tabDrawMode; case SCI_SETTABDRAWMODE: vs.tabDrawMode = static_cast(wParam); Redraw(); break; case SCI_GETWHITESPACESIZE: return vs.whitespaceSize; case SCI_SETWHITESPACESIZE: vs.whitespaceSize = static_cast(wParam); Redraw(); break; case SCI_POSITIONFROMPOINT: return PositionFromLocation(Point::FromInts(static_cast(wParam) - vs.ExternalMarginWidth(), static_cast(lParam)), false, false); case SCI_POSITIONFROMPOINTCLOSE: return PositionFromLocation(Point::FromInts(static_cast(wParam) - vs.ExternalMarginWidth(), static_cast(lParam)), true, false); case SCI_CHARPOSITIONFROMPOINT: return PositionFromLocation(Point::FromInts(static_cast(wParam) - vs.ExternalMarginWidth(), static_cast(lParam)), false, true); case SCI_CHARPOSITIONFROMPOINTCLOSE: return PositionFromLocation(Point::FromInts(static_cast(wParam) - vs.ExternalMarginWidth(), static_cast(lParam)), true, true); case SCI_GOTOLINE: GoToLine(static_cast(wParam)); break; case SCI_GOTOPOS: SetEmptySelection(static_cast(wParam)); EnsureCaretVisible(); break; case SCI_GETCURLINE: { int lineCurrentPos = pdoc->LineFromPosition(sel.MainCaret()); int lineStart = pdoc->LineStart(lineCurrentPos); unsigned int lineEnd = pdoc->LineStart(lineCurrentPos + 1); if (lParam == 0) { return 1 + lineEnd - lineStart; } PLATFORM_ASSERT(wParam > 0); char *ptr = CharPtrFromSPtr(lParam); unsigned int iPlace = 0; for (unsigned int iChar = lineStart; iChar < lineEnd && iPlace < wParam - 1; iChar++) { ptr[iPlace++] = pdoc->CharAt(iChar); } ptr[iPlace] = '\0'; return sel.MainCaret() - lineStart; } case SCI_GETENDSTYLED: return pdoc->GetEndStyled(); case SCI_GETEOLMODE: return pdoc->eolMode; case SCI_SETEOLMODE: pdoc->eolMode = static_cast(wParam); break; case SCI_SETLINEENDTYPESALLOWED: if (pdoc->SetLineEndTypesAllowed(static_cast(wParam))) { cs.Clear(); cs.InsertLines(0, pdoc->LinesTotal() - 1); SetAnnotationHeights(0, pdoc->LinesTotal()); InvalidateStyleRedraw(); } break; case SCI_GETLINEENDTYPESALLOWED: return pdoc->GetLineEndTypesAllowed(); case SCI_GETLINEENDTYPESACTIVE: return pdoc->GetLineEndTypesActive(); case SCI_STARTSTYLING: pdoc->StartStyling(static_cast(wParam), static_cast(lParam)); break; case SCI_SETSTYLING: if (static_cast(wParam) < 0) errorStatus = SC_STATUS_FAILURE; else pdoc->SetStyleFor(static_cast(wParam), static_cast(lParam)); break; case SCI_SETSTYLINGEX: // Specify a complete styling buffer if (lParam == 0) return 0; pdoc->SetStyles(static_cast(wParam), CharPtrFromSPtr(lParam)); break; case SCI_SETBUFFEREDDRAW: view.bufferedDraw = wParam != 0; break; case SCI_GETBUFFEREDDRAW: return view.bufferedDraw; case SCI_GETTWOPHASEDRAW: return view.phasesDraw == EditView::phasesTwo; case SCI_SETTWOPHASEDRAW: if (view.SetTwoPhaseDraw(wParam != 0)) InvalidateStyleRedraw(); break; case SCI_GETPHASESDRAW: return view.phasesDraw; case SCI_SETPHASESDRAW: if (view.SetPhasesDraw(static_cast(wParam))) InvalidateStyleRedraw(); break; case SCI_SETFONTQUALITY: vs.extraFontFlag &= ~SC_EFF_QUALITY_MASK; vs.extraFontFlag |= (wParam & SC_EFF_QUALITY_MASK); InvalidateStyleRedraw(); break; case SCI_GETFONTQUALITY: return (vs.extraFontFlag & SC_EFF_QUALITY_MASK); case SCI_SETTABWIDTH: if (wParam > 0) { pdoc->tabInChars = static_cast(wParam); if (pdoc->indentInChars == 0) pdoc->actualIndentInChars = pdoc->tabInChars; } InvalidateStyleRedraw(); break; case SCI_GETTABWIDTH: return pdoc->tabInChars; case SCI_CLEARTABSTOPS: if (view.ClearTabstops(static_cast(wParam))) { DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, 0, static_cast(wParam)); NotifyModified(pdoc, mh, NULL); } break; case SCI_ADDTABSTOP: if (view.AddTabstop(static_cast(wParam), static_cast(lParam))) { DocModification mh(SC_MOD_CHANGETABSTOPS, 0, 0, 0, 0, static_cast(wParam)); NotifyModified(pdoc, mh, NULL); } break; case SCI_GETNEXTTABSTOP: return view.GetNextTabstop(static_cast(wParam), static_cast(lParam)); case SCI_SETINDENT: pdoc->indentInChars = static_cast(wParam); if (pdoc->indentInChars != 0) pdoc->actualIndentInChars = pdoc->indentInChars; else pdoc->actualIndentInChars = pdoc->tabInChars; InvalidateStyleRedraw(); break; case SCI_GETINDENT: return pdoc->indentInChars; case SCI_SETUSETABS: pdoc->useTabs = wParam != 0; InvalidateStyleRedraw(); break; case SCI_GETUSETABS: return pdoc->useTabs; case SCI_SETLINEINDENTATION: pdoc->SetLineIndentation(static_cast(wParam), static_cast(lParam)); break; case SCI_GETLINEINDENTATION: return pdoc->GetLineIndentation(static_cast(wParam)); case SCI_GETLINEINDENTPOSITION: return pdoc->GetLineIndentPosition(static_cast(wParam)); case SCI_SETTABINDENTS: pdoc->tabIndents = wParam != 0; break; case SCI_GETTABINDENTS: return pdoc->tabIndents; case SCI_SETBACKSPACEUNINDENTS: pdoc->backspaceUnindents = wParam != 0; break; case SCI_GETBACKSPACEUNINDENTS: return pdoc->backspaceUnindents; case SCI_SETMOUSEDWELLTIME: dwellDelay = static_cast(wParam); ticksToDwell = dwellDelay; break; case SCI_GETMOUSEDWELLTIME: return dwellDelay; case SCI_WORDSTARTPOSITION: return pdoc->ExtendWordSelect(static_cast(wParam), -1, lParam != 0); case SCI_WORDENDPOSITION: return pdoc->ExtendWordSelect(static_cast(wParam), 1, lParam != 0); case SCI_ISRANGEWORD: return pdoc->IsWordAt(static_cast(wParam), static_cast(lParam)); case SCI_SETIDLESTYLING: idleStyling = static_cast(wParam); break; case SCI_GETIDLESTYLING: return idleStyling; case SCI_SETWRAPMODE: if (vs.SetWrapState(static_cast(wParam))) { xOffset = 0; ContainerNeedsUpdate(SC_UPDATE_H_SCROLL); InvalidateStyleRedraw(); ReconfigureScrollBars(); } break; case SCI_GETWRAPMODE: return vs.wrapState; case SCI_SETWRAPVISUALFLAGS: if (vs.SetWrapVisualFlags(static_cast(wParam))) { InvalidateStyleRedraw(); ReconfigureScrollBars(); } break; case SCI_GETWRAPVISUALFLAGS: return vs.wrapVisualFlags; case SCI_SETWRAPVISUALFLAGSLOCATION: if (vs.SetWrapVisualFlagsLocation(static_cast(wParam))) { InvalidateStyleRedraw(); } break; case SCI_GETWRAPVISUALFLAGSLOCATION: return vs.wrapVisualFlagsLocation; case SCI_SETWRAPSTARTINDENT: if (vs.SetWrapVisualStartIndent(static_cast(wParam))) { InvalidateStyleRedraw(); ReconfigureScrollBars(); } break; case SCI_GETWRAPSTARTINDENT: return vs.wrapVisualStartIndent; case SCI_SETWRAPINDENTMODE: if (vs.SetWrapIndentMode(static_cast(wParam))) { InvalidateStyleRedraw(); ReconfigureScrollBars(); } break; case SCI_GETWRAPINDENTMODE: return vs.wrapIndentMode; case SCI_SETLAYOUTCACHE: view.llc.SetLevel(static_cast(wParam)); break; case SCI_GETLAYOUTCACHE: return view.llc.GetLevel(); case SCI_SETPOSITIONCACHE: view.posCache.SetSize(wParam); break; case SCI_GETPOSITIONCACHE: return view.posCache.GetSize(); case SCI_SETSCROLLWIDTH: PLATFORM_ASSERT(wParam > 0); if ((wParam > 0) && (wParam != static_cast(scrollWidth))) { view.lineWidthMaxSeen = 0; scrollWidth = static_cast(wParam); SetScrollBars(); } break; case SCI_GETSCROLLWIDTH: return scrollWidth; case SCI_SETSCROLLWIDTHTRACKING: trackLineWidth = wParam != 0; break; case SCI_GETSCROLLWIDTHTRACKING: return trackLineWidth; case SCI_LINESJOIN: LinesJoin(); break; case SCI_LINESSPLIT: LinesSplit(static_cast(wParam)); break; case SCI_TEXTWIDTH: PLATFORM_ASSERT(wParam < vs.styles.size()); PLATFORM_ASSERT(lParam); return TextWidth(static_cast(wParam), CharPtrFromSPtr(lParam)); case SCI_TEXTHEIGHT: RefreshStyleData(); return vs.lineHeight; case SCI_SETENDATLASTLINE: PLATFORM_ASSERT((wParam == 0) || (wParam == 1)); if (endAtLastLine != (wParam != 0)) { endAtLastLine = wParam != 0; SetScrollBars(); } break; case SCI_GETENDATLASTLINE: return endAtLastLine; case SCI_SETCARETSTICKY: PLATFORM_ASSERT(wParam <= SC_CARETSTICKY_WHITESPACE); if (wParam <= SC_CARETSTICKY_WHITESPACE) { caretSticky = static_cast(wParam); } break; case SCI_GETCARETSTICKY: return caretSticky; case SCI_TOGGLECARETSTICKY: caretSticky = !caretSticky; break; case SCI_GETCOLUMN: return pdoc->GetColumn(static_cast(wParam)); case SCI_FINDCOLUMN: return pdoc->FindColumn(static_cast(wParam), static_cast(lParam)); case SCI_SETHSCROLLBAR : if (horizontalScrollBarVisible != (wParam != 0)) { horizontalScrollBarVisible = wParam != 0; SetScrollBars(); ReconfigureScrollBars(); } break; case SCI_GETHSCROLLBAR: return horizontalScrollBarVisible; case SCI_SETVSCROLLBAR: if (verticalScrollBarVisible != (wParam != 0)) { verticalScrollBarVisible = wParam != 0; SetScrollBars(); ReconfigureScrollBars(); if (verticalScrollBarVisible) SetVerticalScrollPos(); } break; case SCI_GETVSCROLLBAR: return verticalScrollBarVisible; case SCI_SETINDENTATIONGUIDES: vs.viewIndentationGuides = IndentView(wParam); Redraw(); break; case SCI_GETINDENTATIONGUIDES: return vs.viewIndentationGuides; case SCI_SETHIGHLIGHTGUIDE: if ((highlightGuideColumn != static_cast(wParam)) || (wParam > 0)) { highlightGuideColumn = static_cast(wParam); Redraw(); } break; case SCI_GETHIGHLIGHTGUIDE: return highlightGuideColumn; case SCI_GETLINEENDPOSITION: return pdoc->LineEnd(static_cast(wParam)); case SCI_SETCODEPAGE: if (ValidCodePage(static_cast(wParam))) { if (pdoc->SetDBCSCodePage(static_cast(wParam))) { cs.Clear(); cs.InsertLines(0, pdoc->LinesTotal() - 1); SetAnnotationHeights(0, pdoc->LinesTotal()); InvalidateStyleRedraw(); SetRepresentations(); } } break; case SCI_GETCODEPAGE: return pdoc->dbcsCodePage; case SCI_SETIMEINTERACTION: imeInteraction = static_cast(wParam); break; case SCI_GETIMEINTERACTION: return imeInteraction; // Marker definition and setting case SCI_MARKERDEFINE: if (wParam <= MARKER_MAX) { vs.markers[wParam].markType = static_cast(lParam); vs.CalcLargestMarkerHeight(); } InvalidateStyleData(); RedrawSelMargin(); break; case SCI_MARKERSYMBOLDEFINED: if (wParam <= MARKER_MAX) return vs.markers[wParam].markType; else return 0; case SCI_MARKERSETFORE: if (wParam <= MARKER_MAX) vs.markers[wParam].fore = ColourDesired(static_cast(lParam)); InvalidateStyleData(); RedrawSelMargin(); break; case SCI_MARKERSETBACKSELECTED: if (wParam <= MARKER_MAX) vs.markers[wParam].backSelected = ColourDesired(static_cast(lParam)); InvalidateStyleData(); RedrawSelMargin(); break; case SCI_MARKERENABLEHIGHLIGHT: marginView.highlightDelimiter.isEnabled = wParam == 1; RedrawSelMargin(); break; case SCI_MARKERSETBACK: if (wParam <= MARKER_MAX) vs.markers[wParam].back = ColourDesired(static_cast(lParam)); InvalidateStyleData(); RedrawSelMargin(); break; case SCI_MARKERSETALPHA: if (wParam <= MARKER_MAX) vs.markers[wParam].alpha = static_cast(lParam); InvalidateStyleRedraw(); break; case SCI_MARKERADD: { int markerID = pdoc->AddMark(static_cast(wParam), static_cast(lParam)); return markerID; } case SCI_MARKERADDSET: if (lParam != 0) pdoc->AddMarkSet(static_cast(wParam), static_cast(lParam)); break; case SCI_MARKERDELETE: pdoc->DeleteMark(static_cast(wParam), static_cast(lParam)); break; case SCI_MARKERDELETEALL: pdoc->DeleteAllMarks(static_cast(wParam)); break; case SCI_MARKERGET: return pdoc->GetMark(static_cast(wParam)); case SCI_MARKERNEXT: return pdoc->MarkerNext(static_cast(wParam), static_cast(lParam)); case SCI_MARKERPREVIOUS: { for (int iLine = static_cast(wParam); iLine >= 0; iLine--) { if ((pdoc->GetMark(iLine) & lParam) != 0) return iLine; } } return -1; case SCI_MARKERDEFINEPIXMAP: if (wParam <= MARKER_MAX) { vs.markers[wParam].SetXPM(CharPtrFromSPtr(lParam)); vs.CalcLargestMarkerHeight(); } InvalidateStyleData(); RedrawSelMargin(); break; case SCI_RGBAIMAGESETWIDTH: sizeRGBAImage.x = static_cast(wParam); break; case SCI_RGBAIMAGESETHEIGHT: sizeRGBAImage.y = static_cast(wParam); break; case SCI_RGBAIMAGESETSCALE: scaleRGBAImage = static_cast(wParam); break; case SCI_MARKERDEFINERGBAIMAGE: if (wParam <= MARKER_MAX) { vs.markers[wParam].SetRGBAImage(sizeRGBAImage, scaleRGBAImage / 100.0f, reinterpret_cast(lParam)); vs.CalcLargestMarkerHeight(); } InvalidateStyleData(); RedrawSelMargin(); break; case SCI_SETMARGINTYPEN: if (ValidMargin(wParam)) { vs.ms[wParam].style = static_cast(lParam); InvalidateStyleRedraw(); } break; case SCI_GETMARGINTYPEN: if (ValidMargin(wParam)) return vs.ms[wParam].style; else return 0; case SCI_SETMARGINWIDTHN: if (ValidMargin(wParam)) { // Short-circuit if the width is unchanged, to avoid unnecessary redraw. if (vs.ms[wParam].width != lParam) { lastXChosen += static_cast(lParam) - vs.ms[wParam].width; vs.ms[wParam].width = static_cast(lParam); InvalidateStyleRedraw(); } } break; case SCI_GETMARGINWIDTHN: if (ValidMargin(wParam)) return vs.ms[wParam].width; else return 0; case SCI_SETMARGINMASKN: if (ValidMargin(wParam)) { vs.ms[wParam].mask = static_cast(lParam); InvalidateStyleRedraw(); } break; case SCI_GETMARGINMASKN: if (ValidMargin(wParam)) return vs.ms[wParam].mask; else return 0; case SCI_SETMARGINSENSITIVEN: if (ValidMargin(wParam)) { vs.ms[wParam].sensitive = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_GETMARGINSENSITIVEN: if (ValidMargin(wParam)) return vs.ms[wParam].sensitive ? 1 : 0; else return 0; case SCI_SETMARGINCURSORN: if (ValidMargin(wParam)) vs.ms[wParam].cursor = static_cast(lParam); break; case SCI_GETMARGINCURSORN: if (ValidMargin(wParam)) return vs.ms[wParam].cursor; else return 0; case SCI_SETMARGINBACKN: if (ValidMargin(wParam)) { vs.ms[wParam].back = ColourDesired(static_cast(lParam)); InvalidateStyleRedraw(); } break; case SCI_GETMARGINBACKN: if (ValidMargin(wParam)) return vs.ms[wParam].back.AsLong(); else return 0; case SCI_SETMARGINS: if (wParam < 1000) vs.ms.resize(wParam); break; case SCI_GETMARGINS: return vs.ms.size(); case SCI_STYLECLEARALL: vs.ClearStyles(); InvalidateStyleRedraw(); break; case SCI_STYLESETFORE: case SCI_STYLESETBACK: case SCI_STYLESETBOLD: case SCI_STYLESETWEIGHT: case SCI_STYLESETITALIC: case SCI_STYLESETEOLFILLED: case SCI_STYLESETSIZE: case SCI_STYLESETSIZEFRACTIONAL: case SCI_STYLESETFONT: case SCI_STYLESETUNDERLINE: case SCI_STYLESETCASE: case SCI_STYLESETCHARACTERSET: case SCI_STYLESETVISIBLE: case SCI_STYLESETCHANGEABLE: case SCI_STYLESETHOTSPOT: StyleSetMessage(iMessage, wParam, lParam); break; case SCI_STYLEGETFORE: case SCI_STYLEGETBACK: case SCI_STYLEGETBOLD: case SCI_STYLEGETWEIGHT: case SCI_STYLEGETITALIC: case SCI_STYLEGETEOLFILLED: case SCI_STYLEGETSIZE: case SCI_STYLEGETSIZEFRACTIONAL: case SCI_STYLEGETFONT: case SCI_STYLEGETUNDERLINE: case SCI_STYLEGETCASE: case SCI_STYLEGETCHARACTERSET: case SCI_STYLEGETVISIBLE: case SCI_STYLEGETCHANGEABLE: case SCI_STYLEGETHOTSPOT: return StyleGetMessage(iMessage, wParam, lParam); case SCI_STYLERESETDEFAULT: vs.ResetDefaultStyle(); InvalidateStyleRedraw(); break; case SCI_SETSTYLEBITS: vs.EnsureStyle(0xff); break; case SCI_GETSTYLEBITS: return 8; case SCI_SETLINESTATE: return pdoc->SetLineState(static_cast(wParam), static_cast(lParam)); case SCI_GETLINESTATE: return pdoc->GetLineState(static_cast(wParam)); case SCI_GETMAXLINESTATE: return pdoc->GetMaxLineState(); case SCI_GETCARETLINEVISIBLE: return vs.showCaretLineBackground; case SCI_SETCARETLINEVISIBLE: vs.showCaretLineBackground = wParam != 0; InvalidateStyleRedraw(); break; case SCI_GETCARETLINEVISIBLEALWAYS: return vs.alwaysShowCaretLineBackground; case SCI_SETCARETLINEVISIBLEALWAYS: vs.alwaysShowCaretLineBackground = wParam != 0; InvalidateStyleRedraw(); break; case SCI_GETCARETLINEBACK: return vs.caretLineBackground.AsLong(); case SCI_SETCARETLINEBACK: vs.caretLineBackground = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_GETCARETLINEBACKALPHA: return vs.caretLineAlpha; case SCI_SETCARETLINEBACKALPHA: vs.caretLineAlpha = static_cast(wParam); InvalidateStyleRedraw(); break; // Folding messages case SCI_VISIBLEFROMDOCLINE: return cs.DisplayFromDoc(static_cast(wParam)); case SCI_DOCLINEFROMVISIBLE: return cs.DocFromDisplay(static_cast(wParam)); case SCI_WRAPCOUNT: return WrapCount(static_cast(wParam)); case SCI_SETFOLDLEVEL: { int prev = pdoc->SetLevel(static_cast(wParam), static_cast(lParam)); if (prev != static_cast(lParam)) RedrawSelMargin(); return prev; } case SCI_GETFOLDLEVEL: return pdoc->GetLevel(static_cast(wParam)); case SCI_GETLASTCHILD: return pdoc->GetLastChild(static_cast(wParam), static_cast(lParam)); case SCI_GETFOLDPARENT: return pdoc->GetFoldParent(static_cast(wParam)); case SCI_SHOWLINES: cs.SetVisible(static_cast(wParam), static_cast(lParam), true); SetScrollBars(); Redraw(); break; case SCI_HIDELINES: if (wParam > 0) cs.SetVisible(static_cast(wParam), static_cast(lParam), false); SetScrollBars(); Redraw(); break; case SCI_GETLINEVISIBLE: return cs.GetVisible(static_cast(wParam)); case SCI_GETALLLINESVISIBLE: return cs.HiddenLines() ? 0 : 1; case SCI_SETFOLDEXPANDED: SetFoldExpanded(static_cast(wParam), lParam != 0); break; case SCI_GETFOLDEXPANDED: return cs.GetExpanded(static_cast(wParam)); case SCI_SETAUTOMATICFOLD: foldAutomatic = static_cast(wParam); break; case SCI_GETAUTOMATICFOLD: return foldAutomatic; case SCI_SETFOLDFLAGS: foldFlags = static_cast(wParam); Redraw(); break; case SCI_TOGGLEFOLDSHOWTEXT: cs.SetFoldDisplayText(static_cast(wParam), CharPtrFromSPtr(lParam)); FoldLine(static_cast(wParam), SC_FOLDACTION_TOGGLE); break; case SCI_FOLDDISPLAYTEXTSETSTYLE: foldDisplayTextStyle = static_cast(wParam); Redraw(); break; case SCI_TOGGLEFOLD: FoldLine(static_cast(wParam), SC_FOLDACTION_TOGGLE); break; case SCI_FOLDLINE: FoldLine(static_cast(wParam), static_cast(lParam)); break; case SCI_FOLDCHILDREN: FoldExpand(static_cast(wParam), static_cast(lParam), pdoc->GetLevel(static_cast(wParam))); break; case SCI_FOLDALL: FoldAll(static_cast(wParam)); break; case SCI_EXPANDCHILDREN: FoldExpand(static_cast(wParam), SC_FOLDACTION_EXPAND, static_cast(lParam)); break; case SCI_CONTRACTEDFOLDNEXT: return ContractedFoldNext(static_cast(wParam)); case SCI_ENSUREVISIBLE: EnsureLineVisible(static_cast(wParam), false); break; case SCI_ENSUREVISIBLEENFORCEPOLICY: EnsureLineVisible(static_cast(wParam), true); break; case SCI_SCROLLRANGE: ScrollRange(SelectionRange(static_cast(wParam), static_cast(lParam))); break; case SCI_SEARCHANCHOR: SearchAnchor(); break; case SCI_SEARCHNEXT: case SCI_SEARCHPREV: return SearchText(iMessage, wParam, lParam); case SCI_SETXCARETPOLICY: caretXPolicy = static_cast(wParam); caretXSlop = static_cast(lParam); break; case SCI_SETYCARETPOLICY: caretYPolicy = static_cast(wParam); caretYSlop = static_cast(lParam); break; case SCI_SETVISIBLEPOLICY: visiblePolicy = static_cast(wParam); visibleSlop = static_cast(lParam); break; case SCI_LINESONSCREEN: return LinesOnScreen(); case SCI_SETSELFORE: vs.selColours.fore = ColourOptional(wParam, lParam); vs.selAdditionalForeground = ColourDesired(static_cast(lParam)); InvalidateStyleRedraw(); break; case SCI_SETSELBACK: vs.selColours.back = ColourOptional(wParam, lParam); vs.selAdditionalBackground = ColourDesired(static_cast(lParam)); InvalidateStyleRedraw(); break; case SCI_SETSELALPHA: vs.selAlpha = static_cast(wParam); vs.selAdditionalAlpha = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_GETSELALPHA: return vs.selAlpha; case SCI_GETSELEOLFILLED: return vs.selEOLFilled; case SCI_SETSELEOLFILLED: vs.selEOLFilled = wParam != 0; InvalidateStyleRedraw(); break; case SCI_SETWHITESPACEFORE: vs.whitespaceColours.fore = ColourOptional(wParam, lParam); InvalidateStyleRedraw(); break; case SCI_SETWHITESPACEBACK: vs.whitespaceColours.back = ColourOptional(wParam, lParam); InvalidateStyleRedraw(); break; case SCI_SETCARETFORE: vs.caretcolour = ColourDesired(static_cast(wParam)); InvalidateStyleRedraw(); break; case SCI_GETCARETFORE: return vs.caretcolour.AsLong(); case SCI_SETCARETSTYLE: if (wParam <= CARETSTYLE_BLOCK) vs.caretStyle = static_cast(wParam); else /* Default to the line caret */ vs.caretStyle = CARETSTYLE_LINE; InvalidateStyleRedraw(); break; case SCI_GETCARETSTYLE: return vs.caretStyle; case SCI_SETCARETWIDTH: if (static_cast(wParam) <= 0) vs.caretWidth = 0; else if (wParam >= 3) vs.caretWidth = 3; else vs.caretWidth = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_GETCARETWIDTH: return vs.caretWidth; case SCI_ASSIGNCMDKEY: kmap.AssignCmdKey(Platform::LowShortFromLong(static_cast(wParam)), Platform::HighShortFromLong(static_cast(wParam)), static_cast(lParam)); break; case SCI_CLEARCMDKEY: kmap.AssignCmdKey(Platform::LowShortFromLong(static_cast(wParam)), Platform::HighShortFromLong(static_cast(wParam)), SCI_NULL); break; case SCI_CLEARALLCMDKEYS: kmap.Clear(); break; case SCI_INDICSETSTYLE: if (wParam <= INDIC_MAX) { vs.indicators[wParam].sacNormal.style = static_cast(lParam); vs.indicators[wParam].sacHover.style = static_cast(lParam); InvalidateStyleRedraw(); } break; case SCI_INDICGETSTYLE: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].sacNormal.style : 0; case SCI_INDICSETFORE: if (wParam <= INDIC_MAX) { vs.indicators[wParam].sacNormal.fore = ColourDesired(static_cast(lParam)); vs.indicators[wParam].sacHover.fore = ColourDesired(static_cast(lParam)); InvalidateStyleRedraw(); } break; case SCI_INDICGETFORE: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].sacNormal.fore.AsLong() : 0; case SCI_INDICSETHOVERSTYLE: if (wParam <= INDIC_MAX) { vs.indicators[wParam].sacHover.style = static_cast(lParam); InvalidateStyleRedraw(); } break; case SCI_INDICGETHOVERSTYLE: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].sacHover.style : 0; case SCI_INDICSETHOVERFORE: if (wParam <= INDIC_MAX) { vs.indicators[wParam].sacHover.fore = ColourDesired(static_cast(lParam)); InvalidateStyleRedraw(); } break; case SCI_INDICGETHOVERFORE: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].sacHover.fore.AsLong() : 0; case SCI_INDICSETFLAGS: if (wParam <= INDIC_MAX) { vs.indicators[wParam].SetFlags(static_cast(lParam)); InvalidateStyleRedraw(); } break; case SCI_INDICGETFLAGS: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].Flags() : 0; case SCI_INDICSETUNDER: if (wParam <= INDIC_MAX) { vs.indicators[wParam].under = lParam != 0; InvalidateStyleRedraw(); } break; case SCI_INDICGETUNDER: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].under : 0; case SCI_INDICSETALPHA: if (wParam <= INDIC_MAX && lParam >=0 && lParam <= 255) { vs.indicators[wParam].fillAlpha = static_cast(lParam); InvalidateStyleRedraw(); } break; case SCI_INDICGETALPHA: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fillAlpha : 0; case SCI_INDICSETOUTLINEALPHA: if (wParam <= INDIC_MAX && lParam >=0 && lParam <= 255) { vs.indicators[wParam].outlineAlpha = static_cast(lParam); InvalidateStyleRedraw(); } break; case SCI_INDICGETOUTLINEALPHA: return (wParam <= INDIC_MAX) ? vs.indicators[wParam].outlineAlpha : 0; case SCI_SETINDICATORCURRENT: pdoc->decorations.SetCurrentIndicator(static_cast(wParam)); break; case SCI_GETINDICATORCURRENT: return pdoc->decorations.GetCurrentIndicator(); case SCI_SETINDICATORVALUE: pdoc->decorations.SetCurrentValue(static_cast(wParam)); break; case SCI_GETINDICATORVALUE: return pdoc->decorations.GetCurrentValue(); case SCI_INDICATORFILLRANGE: pdoc->DecorationFillRange(static_cast(wParam), pdoc->decorations.GetCurrentValue(), static_cast(lParam)); break; case SCI_INDICATORCLEARRANGE: pdoc->DecorationFillRange(static_cast(wParam), 0, static_cast(lParam)); break; case SCI_INDICATORALLONFOR: return pdoc->decorations.AllOnFor(static_cast(wParam)); case SCI_INDICATORVALUEAT: return pdoc->decorations.ValueAt(static_cast(wParam), static_cast(lParam)); case SCI_INDICATORSTART: return pdoc->decorations.Start(static_cast(wParam), static_cast(lParam)); case SCI_INDICATOREND: return pdoc->decorations.End(static_cast(wParam), static_cast(lParam)); case SCI_LINEDOWN: case SCI_LINEDOWNEXTEND: case SCI_PARADOWN: case SCI_PARADOWNEXTEND: case SCI_LINEUP: case SCI_LINEUPEXTEND: case SCI_PARAUP: case SCI_PARAUPEXTEND: case SCI_CHARLEFT: case SCI_CHARLEFTEXTEND: case SCI_CHARRIGHT: case SCI_CHARRIGHTEXTEND: case SCI_WORDLEFT: case SCI_WORDLEFTEXTEND: case SCI_WORDRIGHT: case SCI_WORDRIGHTEXTEND: case SCI_WORDLEFTEND: case SCI_WORDLEFTENDEXTEND: case SCI_WORDRIGHTEND: case SCI_WORDRIGHTENDEXTEND: case SCI_HOME: case SCI_HOMEEXTEND: case SCI_LINEEND: case SCI_LINEENDEXTEND: case SCI_HOMEWRAP: case SCI_HOMEWRAPEXTEND: case SCI_LINEENDWRAP: case SCI_LINEENDWRAPEXTEND: case SCI_DOCUMENTSTART: case SCI_DOCUMENTSTARTEXTEND: case SCI_DOCUMENTEND: case SCI_DOCUMENTENDEXTEND: case SCI_SCROLLTOSTART: case SCI_SCROLLTOEND: case SCI_STUTTEREDPAGEUP: case SCI_STUTTEREDPAGEUPEXTEND: case SCI_STUTTEREDPAGEDOWN: case SCI_STUTTEREDPAGEDOWNEXTEND: case SCI_PAGEUP: case SCI_PAGEUPEXTEND: case SCI_PAGEDOWN: case SCI_PAGEDOWNEXTEND: case SCI_EDITTOGGLEOVERTYPE: case SCI_CANCEL: case SCI_DELETEBACK: case SCI_TAB: case SCI_BACKTAB: case SCI_NEWLINE: case SCI_FORMFEED: case SCI_VCHOME: case SCI_VCHOMEEXTEND: case SCI_VCHOMEWRAP: case SCI_VCHOMEWRAPEXTEND: case SCI_VCHOMEDISPLAY: case SCI_VCHOMEDISPLAYEXTEND: case SCI_ZOOMIN: case SCI_ZOOMOUT: case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: case SCI_DELWORDRIGHTEND: case SCI_DELLINELEFT: case SCI_DELLINERIGHT: case SCI_LINECOPY: case SCI_LINECUT: case SCI_LINEDELETE: case SCI_LINETRANSPOSE: case SCI_LINEDUPLICATE: case SCI_LOWERCASE: case SCI_UPPERCASE: case SCI_LINESCROLLDOWN: case SCI_LINESCROLLUP: case SCI_WORDPARTLEFT: case SCI_WORDPARTLEFTEXTEND: case SCI_WORDPARTRIGHT: case SCI_WORDPARTRIGHTEXTEND: case SCI_DELETEBACKNOTLINE: case SCI_HOMEDISPLAY: case SCI_HOMEDISPLAYEXTEND: case SCI_LINEENDDISPLAY: case SCI_LINEENDDISPLAYEXTEND: case SCI_LINEDOWNRECTEXTEND: case SCI_LINEUPRECTEXTEND: case SCI_CHARLEFTRECTEXTEND: case SCI_CHARRIGHTRECTEXTEND: case SCI_HOMERECTEXTEND: case SCI_VCHOMERECTEXTEND: case SCI_LINEENDRECTEXTEND: case SCI_PAGEUPRECTEXTEND: case SCI_PAGEDOWNRECTEXTEND: case SCI_SELECTIONDUPLICATE: return KeyCommand(iMessage); case SCI_BRACEHIGHLIGHT: SetBraceHighlight(static_cast(wParam), static_cast(lParam), STYLE_BRACELIGHT); break; case SCI_BRACEHIGHLIGHTINDICATOR: if (lParam >= 0 && lParam <= INDIC_MAX) { vs.braceHighlightIndicatorSet = wParam != 0; vs.braceHighlightIndicator = static_cast(lParam); } break; case SCI_BRACEBADLIGHT: SetBraceHighlight(static_cast(wParam), -1, STYLE_BRACEBAD); break; case SCI_BRACEBADLIGHTINDICATOR: if (lParam >= 0 && lParam <= INDIC_MAX) { vs.braceBadLightIndicatorSet = wParam != 0; vs.braceBadLightIndicator = static_cast(lParam); } break; case SCI_BRACEMATCH: // wParam is position of char to find brace for, // lParam is maximum amount of text to restyle to find it return pdoc->BraceMatch(static_cast(wParam), static_cast(lParam)); case SCI_GETVIEWEOL: return vs.viewEOL; case SCI_SETVIEWEOL: vs.viewEOL = wParam != 0; InvalidateStyleRedraw(); break; case SCI_SETZOOM: vs.zoomLevel = static_cast(wParam); InvalidateStyleRedraw(); NotifyZoom(); break; case SCI_GETZOOM: return vs.zoomLevel; case SCI_GETEDGECOLUMN: return vs.theEdge.column; case SCI_SETEDGECOLUMN: vs.theEdge.column = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_GETEDGEMODE: return vs.edgeState; case SCI_SETEDGEMODE: vs.edgeState = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_GETEDGECOLOUR: return vs.theEdge.colour.AsLong(); case SCI_SETEDGECOLOUR: vs.theEdge.colour = ColourDesired(static_cast(wParam)); InvalidateStyleRedraw(); break; case SCI_MULTIEDGEADDLINE: vs.theMultiEdge.push_back(EdgeProperties(wParam, lParam)); InvalidateStyleRedraw(); break; case SCI_MULTIEDGECLEARALL: std::vector().swap(vs.theMultiEdge); // Free vector and memory, C++03 compatible InvalidateStyleRedraw(); break; case SCI_GETDOCPOINTER: return reinterpret_cast(pdoc); case SCI_SETDOCPOINTER: CancelModes(); SetDocPointer(reinterpret_cast(lParam)); return 0; case SCI_CREATEDOCUMENT: { Document *doc = new Document(); doc->AddRef(); return reinterpret_cast(doc); } case SCI_ADDREFDOCUMENT: (reinterpret_cast(lParam))->AddRef(); break; case SCI_RELEASEDOCUMENT: (reinterpret_cast(lParam))->Release(); break; case SCI_CREATELOADER: { Document *doc = new Document(); doc->AddRef(); doc->Allocate(static_cast(wParam)); doc->SetUndoCollection(false); return reinterpret_cast(static_cast(doc)); } case SCI_SETMODEVENTMASK: modEventMask = static_cast(wParam); return 0; case SCI_GETMODEVENTMASK: return modEventMask; case SCI_CONVERTEOLS: pdoc->ConvertLineEnds(static_cast(wParam)); SetSelection(sel.MainCaret(), sel.MainAnchor()); // Ensure selection inside document return 0; case SCI_SETLENGTHFORENCODE: lengthForEncode = static_cast(wParam); return 0; case SCI_SELECTIONISRECTANGLE: return sel.selType == Selection::selRectangle ? 1 : 0; case SCI_SETSELECTIONMODE: { switch (wParam) { case SC_SEL_STREAM: sel.SetMoveExtends(!sel.MoveExtends() || (sel.selType != Selection::selStream)); sel.selType = Selection::selStream; break; case SC_SEL_RECTANGLE: sel.SetMoveExtends(!sel.MoveExtends() || (sel.selType != Selection::selRectangle)); sel.selType = Selection::selRectangle; break; case SC_SEL_LINES: sel.SetMoveExtends(!sel.MoveExtends() || (sel.selType != Selection::selLines)); sel.selType = Selection::selLines; break; case SC_SEL_THIN: sel.SetMoveExtends(!sel.MoveExtends() || (sel.selType != Selection::selThin)); sel.selType = Selection::selThin; break; default: sel.SetMoveExtends(!sel.MoveExtends() || (sel.selType != Selection::selStream)); sel.selType = Selection::selStream; } InvalidateWholeSelection(); break; } case SCI_GETSELECTIONMODE: switch (sel.selType) { case Selection::selStream: return SC_SEL_STREAM; case Selection::selRectangle: return SC_SEL_RECTANGLE; case Selection::selLines: return SC_SEL_LINES; case Selection::selThin: return SC_SEL_THIN; default: // ?! return SC_SEL_STREAM; } case SCI_GETLINESELSTARTPOSITION: case SCI_GETLINESELENDPOSITION: { SelectionSegment segmentLine(SelectionPosition(pdoc->LineStart(static_cast(wParam))), SelectionPosition(pdoc->LineEnd(static_cast(wParam)))); for (size_t r=0; r(wParam); break; case SCI_GETSTATUS: return errorStatus; case SCI_SETMOUSEDOWNCAPTURES: mouseDownCaptures = wParam != 0; break; case SCI_GETMOUSEDOWNCAPTURES: return mouseDownCaptures; case SCI_SETMOUSEWHEELCAPTURES: mouseWheelCaptures = wParam != 0; break; case SCI_GETMOUSEWHEELCAPTURES: return mouseWheelCaptures; case SCI_SETCURSOR: cursorMode = static_cast(wParam); DisplayCursor(Window::cursorText); break; case SCI_GETCURSOR: return cursorMode; case SCI_SETCONTROLCHARSYMBOL: vs.controlCharSymbol = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_GETCONTROLCHARSYMBOL: return vs.controlCharSymbol; case SCI_SETREPRESENTATION: reprs.SetRepresentation(reinterpret_cast(wParam), CharPtrFromSPtr(lParam)); break; case SCI_GETREPRESENTATION: { const Representation *repr = reprs.RepresentationFromCharacter( reinterpret_cast(wParam), UTF8MaxBytes); if (repr) { return StringResult(lParam, repr->stringRep.c_str()); } return 0; } case SCI_CLEARREPRESENTATION: reprs.ClearRepresentation(reinterpret_cast(wParam)); break; case SCI_STARTRECORD: recordingMacro = true; return 0; case SCI_STOPRECORD: recordingMacro = false; return 0; case SCI_MOVECARETINSIDEVIEW: MoveCaretInsideView(); break; case SCI_SETFOLDMARGINCOLOUR: vs.foldmarginColour = ColourOptional(wParam, lParam); InvalidateStyleRedraw(); break; case SCI_SETFOLDMARGINHICOLOUR: vs.foldmarginHighlightColour = ColourOptional(wParam, lParam); InvalidateStyleRedraw(); break; case SCI_SETHOTSPOTACTIVEFORE: vs.hotspotColours.fore = ColourOptional(wParam, lParam); InvalidateStyleRedraw(); break; case SCI_GETHOTSPOTACTIVEFORE: return vs.hotspotColours.fore.AsLong(); case SCI_SETHOTSPOTACTIVEBACK: vs.hotspotColours.back = ColourOptional(wParam, lParam); InvalidateStyleRedraw(); break; case SCI_GETHOTSPOTACTIVEBACK: return vs.hotspotColours.back.AsLong(); case SCI_SETHOTSPOTACTIVEUNDERLINE: vs.hotspotUnderline = wParam != 0; InvalidateStyleRedraw(); break; case SCI_GETHOTSPOTACTIVEUNDERLINE: return vs.hotspotUnderline ? 1 : 0; case SCI_SETHOTSPOTSINGLELINE: vs.hotspotSingleLine = wParam != 0; InvalidateStyleRedraw(); break; case SCI_GETHOTSPOTSINGLELINE: return vs.hotspotSingleLine ? 1 : 0; case SCI_SETPASTECONVERTENDINGS: convertPastes = wParam != 0; break; case SCI_GETPASTECONVERTENDINGS: return convertPastes ? 1 : 0; case SCI_GETCHARACTERPOINTER: return reinterpret_cast(pdoc->BufferPointer()); case SCI_GETRANGEPOINTER: return reinterpret_cast(pdoc->RangePointer(static_cast(wParam), static_cast(lParam))); case SCI_GETGAPPOSITION: return pdoc->GapPosition(); case SCI_SETEXTRAASCENT: vs.extraAscent = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_GETEXTRAASCENT: return vs.extraAscent; case SCI_SETEXTRADESCENT: vs.extraDescent = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_GETEXTRADESCENT: return vs.extraDescent; case SCI_MARGINSETSTYLEOFFSET: vs.marginStyleOffset = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_MARGINGETSTYLEOFFSET: return vs.marginStyleOffset; case SCI_SETMARGINOPTIONS: marginOptions = static_cast(wParam); break; case SCI_GETMARGINOPTIONS: return marginOptions; case SCI_MARGINSETTEXT: pdoc->MarginSetText(static_cast(wParam), CharPtrFromSPtr(lParam)); break; case SCI_MARGINGETTEXT: { const StyledText st = pdoc->MarginStyledText(static_cast(wParam)); return BytesResult(lParam, reinterpret_cast(st.text), st.length); } case SCI_MARGINSETSTYLE: pdoc->MarginSetStyle(static_cast(wParam), static_cast(lParam)); break; case SCI_MARGINGETSTYLE: { const StyledText st = pdoc->MarginStyledText(static_cast(wParam)); return st.style; } case SCI_MARGINSETSTYLES: pdoc->MarginSetStyles(static_cast(wParam), reinterpret_cast(lParam)); break; case SCI_MARGINGETSTYLES: { const StyledText st = pdoc->MarginStyledText(static_cast(wParam)); return BytesResult(lParam, st.styles, st.length); } case SCI_MARGINTEXTCLEARALL: pdoc->MarginClearAll(); break; case SCI_ANNOTATIONSETTEXT: pdoc->AnnotationSetText(static_cast(wParam), CharPtrFromSPtr(lParam)); break; case SCI_ANNOTATIONGETTEXT: { const StyledText st = pdoc->AnnotationStyledText(static_cast(wParam)); return BytesResult(lParam, reinterpret_cast(st.text), st.length); } case SCI_ANNOTATIONGETSTYLE: { const StyledText st = pdoc->AnnotationStyledText(static_cast(wParam)); return st.style; } case SCI_ANNOTATIONSETSTYLE: pdoc->AnnotationSetStyle(static_cast(wParam), static_cast(lParam)); break; case SCI_ANNOTATIONSETSTYLES: pdoc->AnnotationSetStyles(static_cast(wParam), reinterpret_cast(lParam)); break; case SCI_ANNOTATIONGETSTYLES: { const StyledText st = pdoc->AnnotationStyledText(static_cast(wParam)); return BytesResult(lParam, st.styles, st.length); } case SCI_ANNOTATIONGETLINES: return pdoc->AnnotationLines(static_cast(wParam)); case SCI_ANNOTATIONCLEARALL: pdoc->AnnotationClearAll(); break; case SCI_ANNOTATIONSETVISIBLE: SetAnnotationVisible(static_cast(wParam)); break; case SCI_ANNOTATIONGETVISIBLE: return vs.annotationVisible; case SCI_ANNOTATIONSETSTYLEOFFSET: vs.annotationStyleOffset = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_ANNOTATIONGETSTYLEOFFSET: return vs.annotationStyleOffset; case SCI_RELEASEALLEXTENDEDSTYLES: vs.ReleaseAllExtendedStyles(); break; case SCI_ALLOCATEEXTENDEDSTYLES: return vs.AllocateExtendedStyles(static_cast(wParam)); case SCI_ADDUNDOACTION: pdoc->AddUndoAction(static_cast(wParam), lParam & UNDO_MAY_COALESCE); break; case SCI_SETMOUSESELECTIONRECTANGULARSWITCH: mouseSelectionRectangularSwitch = wParam != 0; break; case SCI_GETMOUSESELECTIONRECTANGULARSWITCH: return mouseSelectionRectangularSwitch; case SCI_SETMULTIPLESELECTION: multipleSelection = wParam != 0; InvalidateCaret(); break; case SCI_GETMULTIPLESELECTION: return multipleSelection; case SCI_SETADDITIONALSELECTIONTYPING: additionalSelectionTyping = wParam != 0; InvalidateCaret(); break; case SCI_GETADDITIONALSELECTIONTYPING: return additionalSelectionTyping; case SCI_SETMULTIPASTE: multiPasteMode = static_cast(wParam); break; case SCI_GETMULTIPASTE: return multiPasteMode; case SCI_SETADDITIONALCARETSBLINK: view.additionalCaretsBlink = wParam != 0; InvalidateCaret(); break; case SCI_GETADDITIONALCARETSBLINK: return view.additionalCaretsBlink; case SCI_SETADDITIONALCARETSVISIBLE: view.additionalCaretsVisible = wParam != 0; InvalidateCaret(); break; case SCI_GETADDITIONALCARETSVISIBLE: return view.additionalCaretsVisible; case SCI_GETSELECTIONS: return sel.Count(); case SCI_GETSELECTIONEMPTY: return sel.Empty(); case SCI_CLEARSELECTIONS: sel.Clear(); ContainerNeedsUpdate(SC_UPDATE_SELECTION); Redraw(); break; case SCI_SETSELECTION: sel.SetSelection(SelectionRange(static_cast(wParam), static_cast(lParam))); Redraw(); break; case SCI_ADDSELECTION: sel.AddSelection(SelectionRange(static_cast(wParam), static_cast(lParam))); ContainerNeedsUpdate(SC_UPDATE_SELECTION); Redraw(); break; case SCI_DROPSELECTIONN: sel.DropSelection(static_cast(wParam)); ContainerNeedsUpdate(SC_UPDATE_SELECTION); Redraw(); break; case SCI_SETMAINSELECTION: sel.SetMain(static_cast(wParam)); ContainerNeedsUpdate(SC_UPDATE_SELECTION); Redraw(); break; case SCI_GETMAINSELECTION: return sel.Main(); case SCI_SETSELECTIONNCARET: case SCI_SETSELECTIONNANCHOR: case SCI_SETSELECTIONNCARETVIRTUALSPACE: case SCI_SETSELECTIONNANCHORVIRTUALSPACE: case SCI_SETSELECTIONNSTART: case SCI_SETSELECTIONNEND: SetSelectionNMessage(iMessage, wParam, lParam); break; case SCI_GETSELECTIONNCARET: return sel.Range(wParam).caret.Position(); case SCI_GETSELECTIONNANCHOR: return sel.Range(wParam).anchor.Position(); case SCI_GETSELECTIONNCARETVIRTUALSPACE: return sel.Range(wParam).caret.VirtualSpace(); case SCI_GETSELECTIONNANCHORVIRTUALSPACE: return sel.Range(wParam).anchor.VirtualSpace(); case SCI_GETSELECTIONNSTART: return sel.Range(wParam).Start().Position(); case SCI_GETSELECTIONNEND: return sel.Range(wParam).End().Position(); case SCI_SETRECTANGULARSELECTIONCARET: if (!sel.IsRectangular()) sel.Clear(); sel.selType = Selection::selRectangle; sel.Rectangular().caret.SetPosition(static_cast(wParam)); SetRectangularRange(); Redraw(); break; case SCI_GETRECTANGULARSELECTIONCARET: return sel.Rectangular().caret.Position(); case SCI_SETRECTANGULARSELECTIONANCHOR: if (!sel.IsRectangular()) sel.Clear(); sel.selType = Selection::selRectangle; sel.Rectangular().anchor.SetPosition(static_cast(wParam)); SetRectangularRange(); Redraw(); break; case SCI_GETRECTANGULARSELECTIONANCHOR: return sel.Rectangular().anchor.Position(); case SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE: if (!sel.IsRectangular()) sel.Clear(); sel.selType = Selection::selRectangle; sel.Rectangular().caret.SetVirtualSpace(static_cast(wParam)); SetRectangularRange(); Redraw(); break; case SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE: return sel.Rectangular().caret.VirtualSpace(); case SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE: if (!sel.IsRectangular()) sel.Clear(); sel.selType = Selection::selRectangle; sel.Rectangular().anchor.SetVirtualSpace(static_cast(wParam)); SetRectangularRange(); Redraw(); break; case SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE: return sel.Rectangular().anchor.VirtualSpace(); case SCI_SETVIRTUALSPACEOPTIONS: virtualSpaceOptions = static_cast(wParam); break; case SCI_GETVIRTUALSPACEOPTIONS: return virtualSpaceOptions; case SCI_SETADDITIONALSELFORE: vs.selAdditionalForeground = ColourDesired(static_cast(wParam)); InvalidateStyleRedraw(); break; case SCI_SETADDITIONALSELBACK: vs.selAdditionalBackground = ColourDesired(static_cast(wParam)); InvalidateStyleRedraw(); break; case SCI_SETADDITIONALSELALPHA: vs.selAdditionalAlpha = static_cast(wParam); InvalidateStyleRedraw(); break; case SCI_GETADDITIONALSELALPHA: return vs.selAdditionalAlpha; case SCI_SETADDITIONALCARETFORE: vs.additionalCaretColour = ColourDesired(static_cast(wParam)); InvalidateStyleRedraw(); break; case SCI_GETADDITIONALCARETFORE: return vs.additionalCaretColour.AsLong(); case SCI_ROTATESELECTION: sel.RotateMain(); InvalidateWholeSelection(); break; case SCI_SWAPMAINANCHORCARET: InvalidateSelection(sel.RangeMain()); sel.RangeMain().Swap(); break; case SCI_MULTIPLESELECTADDNEXT: MultipleSelectAdd(addOne); break; case SCI_MULTIPLESELECTADDEACH: MultipleSelectAdd(addEach); break; case SCI_CHANGELEXERSTATE: pdoc->ChangeLexerState(static_cast(wParam), static_cast(lParam)); break; case SCI_SETIDENTIFIER: SetCtrlID(static_cast(wParam)); break; case SCI_GETIDENTIFIER: return GetCtrlID(); case SCI_SETTECHNOLOGY: // No action by default break; case SCI_GETTECHNOLOGY: return technology; case SCI_COUNTCHARACTERS: return pdoc->CountCharacters(static_cast(wParam), static_cast(lParam)); default: return DefWndProc(iMessage, wParam, lParam); } //Platform::DebugPrintf("end wnd proc\n"); return 0l; } sqlitebrowser-3.11.2/libs/qscintilla/src/Editor.h000066400000000000000000000516021345112435200217710ustar00rootroot00000000000000// Scintilla source code edit control /** @file Editor.h ** Defines the main editor class. **/ // Copyright 1998-2011 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef EDITOR_H #define EDITOR_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /** */ class Timer { public: bool ticking; int ticksToWait; enum {tickSize = 100}; TickerID tickerID; Timer(); }; /** */ class Idler { public: bool state; IdlerID idlerID; Idler(); }; /** * When platform has a way to generate an event before painting, * accumulate needed styling range and other work items in * WorkNeeded to avoid unnecessary work inside paint handler */ class WorkNeeded { public: enum workItems { workNone=0, workStyle=1, workUpdateUI=2 }; enum workItems items; Position upTo; WorkNeeded() : items(workNone), upTo(0) {} void Reset() { items = workNone; upTo = 0; } void Need(workItems items_, Position pos) { if ((items_ & workStyle) && (upTo < pos)) upTo = pos; items = static_cast(items | items_); } }; /** * Hold a piece of text selected for copying or dragging, along with encoding and selection format information. */ class SelectionText { std::string s; public: bool rectangular; bool lineCopy; int codePage; int characterSet; SelectionText() : rectangular(false), lineCopy(false), codePage(0), characterSet(0) {} ~SelectionText() { } void Clear() { s.clear(); rectangular = false; lineCopy = false; codePage = 0; characterSet = 0; } void Copy(const std::string &s_, int codePage_, int characterSet_, bool rectangular_, bool lineCopy_) { s = s_; codePage = codePage_; characterSet = characterSet_; rectangular = rectangular_; lineCopy = lineCopy_; FixSelectionForClipboard(); } void Copy(const SelectionText &other) { Copy(other.s, other.codePage, other.characterSet, other.rectangular, other.lineCopy); } const char *Data() const { return s.c_str(); } size_t Length() const { return s.length(); } size_t LengthWithTerminator() const { return s.length() + 1; } bool Empty() const { return s.empty(); } private: void FixSelectionForClipboard() { // To avoid truncating the contents of the clipboard when pasted where the // clipboard contains NUL characters, replace NUL characters by spaces. std::replace(s.begin(), s.end(), '\0', ' '); } }; struct WrapPending { // The range of lines that need to be wrapped enum { lineLarge = 0x7ffffff }; int start; // When there are wraps pending, will be in document range int end; // May be lineLarge to indicate all of document after start WrapPending() { start = lineLarge; end = lineLarge; } void Reset() { start = lineLarge; end = lineLarge; } void Wrapped(int line) { if (start == line) start++; } bool NeedsWrap() const { return start < end; } bool AddRange(int lineStart, int lineEnd) { const bool neededWrap = NeedsWrap(); bool changed = false; if (start > lineStart) { start = lineStart; changed = true; } if ((end < lineEnd) || !neededWrap) { end = lineEnd; changed = true; } return changed; } }; /** */ class Editor : public EditModel, public DocWatcher { // Private so Editor objects can not be copied explicit Editor(const Editor &); Editor &operator=(const Editor &); protected: // ScintillaBase subclass needs access to much of Editor /** On GTK+, Scintilla is a container widget holding two scroll bars * whereas on Windows there is just one window with both scroll bars turned on. */ Window wMain; ///< The Scintilla parent window Window wMargin; ///< May be separate when using a scroll view for wMain /** Style resources may be expensive to allocate so are cached between uses. * When a style attribute is changed, this cache is flushed. */ bool stylesValid; ViewStyle vs; int technology; Point sizeRGBAImage; float scaleRGBAImage; MarginView marginView; EditView view; int cursorMode; bool hasFocus; bool mouseDownCaptures; bool mouseWheelCaptures; int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret bool horizontalScrollBarVisible; int scrollWidth; bool verticalScrollBarVisible; bool endAtLastLine; int caretSticky; int marginOptions; bool mouseSelectionRectangularSwitch; bool multipleSelection; bool additionalSelectionTyping; int multiPasteMode; int virtualSpaceOptions; KeyMap kmap; Timer timer; Timer autoScrollTimer; enum { autoScrollDelay = 200 }; Idler idler; Point lastClick; unsigned int lastClickTime; Point doubleClickCloseThreshold; int dwellDelay; int ticksToDwell; bool dwelling; enum { selChar, selWord, selSubLine, selWholeLine } selectionType; Point ptMouseLast; enum { ddNone, ddInitial, ddDragging } inDragDrop; bool dropWentOutside; SelectionPosition posDrop; int hotSpotClickPos; int lastXChosen; int lineAnchorPos; int originalAnchorPos; int wordSelectAnchorStartPos; int wordSelectAnchorEndPos; int wordSelectInitialCaretPos; int targetStart; int targetEnd; int searchFlags; int topLine; int posTopLine; int lengthForEncode; int needUpdateUI; enum { notPainting, painting, paintAbandoned } paintState; bool paintAbandonedByStyling; PRectangle rcPaint; bool paintingAllText; bool willRedrawAll; WorkNeeded workNeeded; int idleStyling; bool needIdleStyling; int modEventMask; SelectionText drag; int caretXPolicy; int caretXSlop; ///< Ensure this many pixels visible on both sides of caret int caretYPolicy; int caretYSlop; ///< Ensure this many lines visible on both sides of caret int visiblePolicy; int visibleSlop; int searchAnchor; bool recordingMacro; int foldAutomatic; // Wrapping support WrapPending wrapPending; bool convertPastes; Editor(); virtual ~Editor(); virtual void Initialise() = 0; virtual void Finalise(); void InvalidateStyleData(); void InvalidateStyleRedraw(); void RefreshStyleData(); void SetRepresentations(); void DropGraphics(bool freeObjects); void AllocateGraphics(); // The top left visible point in main window coordinates. Will be 0,0 except for // scroll views where it will be equivalent to the current scroll position. virtual Point GetVisibleOriginInMain() const; PointDocument DocumentPointFromView(Point ptView) const; // Convert a point from view space to document int TopLineOfMain() const; // Return the line at Main's y coordinate 0 virtual PRectangle GetClientRectangle() const; virtual PRectangle GetClientDrawingRectangle(); PRectangle GetTextRectangle() const; virtual int LinesOnScreen() const; int LinesToScroll() const; int MaxScrollPos() const; SelectionPosition ClampPositionIntoDocument(SelectionPosition sp) const; Point LocationFromPosition(SelectionPosition pos, PointEnd pe=peDefault); Point LocationFromPosition(int pos, PointEnd pe=peDefault); int XFromPosition(int pos); int XFromPosition(SelectionPosition sp); SelectionPosition SPositionFromLocation(Point pt, bool canReturnInvalid=false, bool charPosition=false, bool virtualSpace=true); int PositionFromLocation(Point pt, bool canReturnInvalid = false, bool charPosition = false); SelectionPosition SPositionFromLineX(int lineDoc, int x); int PositionFromLineX(int line, int x); int LineFromLocation(Point pt) const; void SetTopLine(int topLineNew); virtual bool AbandonPaint(); virtual void RedrawRect(PRectangle rc); virtual void DiscardOverdraw(); virtual void Redraw(); void RedrawSelMargin(int line=-1, bool allAfter=false); PRectangle RectangleFromRange(Range r, int overlap); void InvalidateRange(int start, int end); bool UserVirtualSpace() const { return ((virtualSpaceOptions & SCVS_USERACCESSIBLE) != 0); } int CurrentPosition() const; bool SelectionEmpty() const; SelectionPosition SelectionStart(); SelectionPosition SelectionEnd(); void SetRectangularRange(); void ThinRectangularRange(); void InvalidateSelection(SelectionRange newMain, bool invalidateWholeSelection=false); void InvalidateWholeSelection(); void SetSelection(SelectionPosition currentPos_, SelectionPosition anchor_); void SetSelection(int currentPos_, int anchor_); void SetSelection(SelectionPosition currentPos_); void SetSelection(int currentPos_); void SetEmptySelection(SelectionPosition currentPos_); void SetEmptySelection(int currentPos_); enum AddNumber { addOne, addEach }; void MultipleSelectAdd(AddNumber addNumber); bool RangeContainsProtected(int start, int end) const; bool SelectionContainsProtected(); int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true) const; SelectionPosition MovePositionOutsideChar(SelectionPosition pos, int moveDir, bool checkLineEnd=true) const; void MovedCaret(SelectionPosition newPos, SelectionPosition previousPos, bool ensureVisible); void MovePositionTo(SelectionPosition newPos, Selection::selTypes selt=Selection::noSel, bool ensureVisible=true); void MovePositionTo(int newPos, Selection::selTypes selt=Selection::noSel, bool ensureVisible=true); SelectionPosition MovePositionSoVisible(SelectionPosition pos, int moveDir); SelectionPosition MovePositionSoVisible(int pos, int moveDir); Point PointMainCaret(); void SetLastXChosen(); void ScrollTo(int line, bool moveThumb=true); virtual void ScrollText(int linesToMove); void HorizontalScrollTo(int xPos); void VerticalCentreCaret(); void MoveSelectedLines(int lineDelta); void MoveSelectedLinesUp(); void MoveSelectedLinesDown(); void MoveCaretInsideView(bool ensureVisible=true); int DisplayFromPosition(int pos); struct XYScrollPosition { int xOffset; int topLine; XYScrollPosition(int xOffset_, int topLine_) : xOffset(xOffset_), topLine(topLine_) {} bool operator==(const XYScrollPosition &other) const { return (xOffset == other.xOffset) && (topLine == other.topLine); } }; enum XYScrollOptions { xysUseMargin=0x1, xysVertical=0x2, xysHorizontal=0x4, xysDefault=xysUseMargin|xysVertical|xysHorizontal}; XYScrollPosition XYScrollToMakeVisible(const SelectionRange &range, const XYScrollOptions options); void SetXYScroll(XYScrollPosition newXY); void EnsureCaretVisible(bool useMargin=true, bool vert=true, bool horiz=true); void ScrollRange(SelectionRange range); void ShowCaretAtCurrentPosition(); void DropCaret(); void CaretSetPeriod(int period); void InvalidateCaret(); virtual void NotifyCaretMove(); virtual void UpdateSystemCaret(); bool Wrapping() const; void NeedWrapping(int docLineStart=0, int docLineEnd=WrapPending::lineLarge); bool WrapOneLine(Surface *surface, int lineToWrap); enum wrapScope {wsAll, wsVisible, wsIdle}; bool WrapLines(enum wrapScope ws); void LinesJoin(); void LinesSplit(int pixelWidth); void PaintSelMargin(Surface *surface, PRectangle &rc); void RefreshPixMaps(Surface *surfaceWindow); void Paint(Surface *surfaceWindow, PRectangle rcArea); long FormatRange(bool draw, Sci_RangeToFormat *pfr); int TextWidth(int style, const char *text); virtual void SetVerticalScrollPos() = 0; virtual void SetHorizontalScrollPos() = 0; virtual bool ModifyScrollBars(int nMax, int nPage) = 0; virtual void ReconfigureScrollBars(); void SetScrollBars(); void ChangeSize(); void FilterSelections(); int RealizeVirtualSpace(int position, unsigned int virtualSpace); SelectionPosition RealizeVirtualSpace(const SelectionPosition &position); void AddChar(char ch); virtual void AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS=false); void ClearBeforeTentativeStart(); void InsertPaste(const char *text, int len); enum PasteShape { pasteStream=0, pasteRectangular = 1, pasteLine = 2 }; void InsertPasteShape(const char *text, int len, PasteShape shape); void ClearSelection(bool retainMultipleSelections = false); void ClearAll(); void ClearDocumentStyle(); void Cut(); void PasteRectangular(SelectionPosition pos, const char *ptr, int len); virtual void Copy() = 0; virtual void CopyAllowLine(); virtual bool CanPaste(); virtual void Paste() = 0; void Clear(); void SelectAll(); void Undo(); void Redo(); void DelCharBack(bool allowLineStartDeletion); virtual void ClaimSelection() = 0; static int ModifierFlags(bool shift, bool ctrl, bool alt, bool meta=false, bool super=false); virtual void NotifyChange() = 0; virtual void NotifyFocus(bool focus); virtual void SetCtrlID(int identifier); virtual int GetCtrlID() { return ctrlID; } virtual void NotifyParent(SCNotification scn) = 0; virtual void NotifyStyleToNeeded(int endStyleNeeded); void NotifyChar(int ch); void NotifySavePoint(bool isSavePoint); void NotifyModifyAttempt(); virtual void NotifyDoubleClick(Point pt, int modifiers); virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt); void NotifyHotSpotClicked(int position, int modifiers); void NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt); void NotifyHotSpotDoubleClicked(int position, int modifiers); void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt); void NotifyHotSpotReleaseClick(int position, int modifiers); void NotifyHotSpotReleaseClick(int position, bool shift, bool ctrl, bool alt); bool NotifyUpdateUI(); void NotifyPainted(); void NotifyIndicatorClick(bool click, int position, int modifiers); void NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt); bool NotifyMarginClick(Point pt, int modifiers); bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt); bool NotifyMarginRightClick(Point pt, int modifiers); void NotifyNeedShown(int pos, int len); void NotifyDwelling(Point pt, bool state); void NotifyZoom(); void NotifyModifyAttempt(Document *document, void *userData); void NotifySavePoint(Document *document, void *userData, bool atSavePoint); void CheckModificationForWrap(DocModification mh); void NotifyModified(Document *document, DocModification mh, void *userData); void NotifyDeleted(Document *document, void *userData); void NotifyStyleNeeded(Document *doc, void *userData, int endPos); void NotifyLexerChanged(Document *doc, void *userData); void NotifyErrorOccurred(Document *doc, void *userData, int status); void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam); void ContainerNeedsUpdate(int flags); void PageMove(int direction, Selection::selTypes selt=Selection::noSel, bool stuttered = false); enum { cmSame, cmUpper, cmLower }; virtual std::string CaseMapString(const std::string &s, int caseMapping); void ChangeCaseOfSelection(int caseMapping); void LineTranspose(); void Duplicate(bool forLine); virtual void CancelModes(); void NewLine(); SelectionPosition PositionUpOrDown(SelectionPosition spStart, int direction, int lastX); void CursorUpOrDown(int direction, Selection::selTypes selt); void ParaUpOrDown(int direction, Selection::selTypes selt); Range RangeDisplayLine(int lineVisible); int StartEndDisplayLine(int pos, bool start); int VCHomeDisplayPosition(int position); int VCHomeWrapPosition(int position); int LineEndWrapPosition(int position); int HorizontalMove(unsigned int iMessage); int DelWordOrLine(unsigned int iMessage); virtual int KeyCommand(unsigned int iMessage); virtual int KeyDefault(int /* key */, int /*modifiers*/); int KeyDownWithModifiers(int key, int modifiers, bool *consumed); int KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed=0); void Indent(bool forwards); virtual CaseFolder *CaseFolderForEncoding(); long FindText(uptr_t wParam, sptr_t lParam); void SearchAnchor(); long SearchText(unsigned int iMessage, uptr_t wParam, sptr_t lParam); long SearchInTarget(const char *text, int length); void GoToLine(int lineNo); virtual void CopyToClipboard(const SelectionText &selectedText) = 0; std::string RangeText(int start, int end) const; void CopySelectionRange(SelectionText *ss, bool allowLineCopy=false); void CopyRangeToClipboard(int start, int end); void CopyText(int length, const char *text); void SetDragPosition(SelectionPosition newPos); virtual void DisplayCursor(Window::Cursor c); virtual bool DragThreshold(Point ptStart, Point ptNow); virtual void StartDrag(); void DropAt(SelectionPosition position, const char *value, size_t lengthValue, bool moving, bool rectangular); void DropAt(SelectionPosition position, const char *value, bool moving, bool rectangular); /** PositionInSelection returns true if position in selection. */ bool PositionInSelection(int pos); bool PointInSelection(Point pt); bool PointInSelMargin(Point pt) const; Window::Cursor GetMarginCursor(Point pt) const; void TrimAndSetSelection(int currentPos_, int anchor_); void LineSelection(int lineCurrentPos_, int lineAnchorPos_, bool wholeLine); void WordSelection(int pos); void DwellEnd(bool mouseMoved); void MouseLeave(); virtual void ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifiers); virtual void RightButtonDownWithModifiers(Point pt, unsigned int curTime, int modifiers); virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); void ButtonMoveWithModifiers(Point pt, int modifiers); void ButtonMove(Point pt); void ButtonUp(Point pt, unsigned int curTime, bool ctrl); void Tick(); bool Idle(); virtual void SetTicking(bool on); enum TickReason { tickCaret, tickScroll, tickWiden, tickDwell, tickPlatform }; virtual void TickFor(TickReason reason); virtual bool FineTickerAvailable(); virtual bool FineTickerRunning(TickReason reason); virtual void FineTickerStart(TickReason reason, int millis, int tolerance); virtual void FineTickerCancel(TickReason reason); virtual bool SetIdle(bool) { return false; } virtual void SetMouseCapture(bool on) = 0; virtual bool HaveMouseCapture() = 0; void SetFocusState(bool focusState); int PositionAfterArea(PRectangle rcArea) const; void StyleToPositionInView(Position pos); int PositionAfterMaxStyling(int posMax, bool scrolling) const; void StartIdleStyling(bool truncatedLastStyling); void StyleAreaBounded(PRectangle rcArea, bool scrolling); void IdleStyling(); virtual void IdleWork(); virtual void QueueIdleWork(WorkNeeded::workItems items, int upTo=0); virtual bool PaintContains(PRectangle rc); bool PaintContainsMargin(); void CheckForChangeOutsidePaint(Range r); void SetBraceHighlight(Position pos0, Position pos1, int matchStyle); void SetAnnotationHeights(int start, int end); virtual void SetDocPointer(Document *document); void SetAnnotationVisible(int visible); int ExpandLine(int line); void SetFoldExpanded(int lineDoc, bool expanded); void FoldLine(int line, int action); void FoldExpand(int line, int action, int level); int ContractedFoldNext(int lineStart) const; void EnsureLineVisible(int lineDoc, bool enforcePolicy); void FoldChanged(int line, int levelNow, int levelPrev); void NeedShown(int pos, int len); void FoldAll(int action); int GetTag(char *tagValue, int tagNumber); int ReplaceTarget(bool replacePatterns, const char *text, int length=-1); bool PositionIsHotspot(int position) const; bool PointIsHotspot(Point pt); void SetHotSpotRange(Point *pt); Range GetHotSpotRange() const; void SetHoverIndicatorPosition(int position); void SetHoverIndicatorPoint(Point pt); int CodePage() const; virtual bool ValidCodePage(int /* codePage */) const { return true; } int WrapCount(int line); void AddStyledText(char *buffer, int appendLength); virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) = 0; bool ValidMargin(uptr_t wParam) const; void StyleSetMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam); sptr_t StyleGetMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam); void SetSelectionNMessage(unsigned int iMessage, uptr_t wParam, sptr_t lParam); static const char *StringFromEOLMode(int eolMode); static sptr_t StringResult(sptr_t lParam, const char *val); static sptr_t BytesResult(sptr_t lParam, const unsigned char *val, size_t len); public: // Public so the COM thunks can access it. bool IsUnicodeMode() const; // Public so scintilla_send_message can use it. virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); // Public so scintilla_set_id can use it. int ctrlID; // Public so COM methods for drag and drop can set it. int errorStatus; friend class AutoSurface; friend class SelectionLineIterator; }; /** * A smart pointer class to ensure Surfaces are set up and deleted correctly. */ class AutoSurface { private: Surface *surf; public: AutoSurface(Editor *ed, int technology = -1) : surf(0) { if (ed->wMain.GetID()) { surf = Surface::Allocate(technology != -1 ? technology : ed->technology); if (surf) { surf->Init(ed->wMain.GetID()); surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); surf->SetDBCSMode(ed->CodePage()); } } } AutoSurface(SurfaceID sid, Editor *ed, int technology = -1) : surf(0) { if (ed->wMain.GetID()) { surf = Surface::Allocate(technology != -1 ? technology : ed->technology); if (surf) { surf->Init(sid, ed->wMain.GetID()); surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); surf->SetDBCSMode(ed->CodePage()); } } } ~AutoSurface() { delete surf; } Surface *operator->() const { return surf; } operator Surface *() const { return surf; } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/ExternalLexer.cpp000066400000000000000000000101121345112435200236470ustar00rootroot00000000000000// Scintilla source code edit control /** @file ExternalLexer.cxx ** Support external lexers in DLLs. **/ // Copyright 2001 Simon Steele , portions copyright Neil Hodgson. // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include "Platform.h" #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "LexerModule.h" #include "Catalogue.h" #include "ExternalLexer.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif LexerManager *LexerManager::theInstance = NULL; //------------------------------------------ // // ExternalLexerModule // //------------------------------------------ void ExternalLexerModule::SetExternal(GetLexerFactoryFunction fFactory, int index) { fneFactory = fFactory; fnFactory = fFactory(index); } //------------------------------------------ // // LexerLibrary // //------------------------------------------ LexerLibrary::LexerLibrary(const char *ModuleName) { // Initialise some members... first = NULL; last = NULL; // Load the DLL lib = DynamicLibrary::Load(ModuleName); if (lib->IsValid()) { m_sModuleName = ModuleName; //Cannot use reinterpret_cast because: ANSI C++ forbids casting between pointers to functions and objects GetLexerCountFn GetLexerCount = (GetLexerCountFn)(sptr_t)lib->FindFunction("GetLexerCount"); if (GetLexerCount) { ExternalLexerModule *lex; LexerMinder *lm; // Find functions in the DLL GetLexerNameFn GetLexerName = (GetLexerNameFn)(sptr_t)lib->FindFunction("GetLexerName"); GetLexerFactoryFunction fnFactory = (GetLexerFactoryFunction)(sptr_t)lib->FindFunction("GetLexerFactory"); int nl = GetLexerCount(); for (int i = 0; i < nl; i++) { // Assign a buffer for the lexer name. char lexname[100] = ""; GetLexerName(i, lexname, sizeof(lexname)); lex = new ExternalLexerModule(SCLEX_AUTOMATIC, NULL, lexname, NULL); Catalogue::AddLexerModule(lex); // Create a LexerMinder so we don't leak the ExternalLexerModule... lm = new LexerMinder; lm->self = lex; lm->next = NULL; if (first != NULL) { last->next = lm; last = lm; } else { first = lm; last = lm; } // The external lexer needs to know how to call into its DLL to // do its lexing and folding, we tell it here. lex->SetExternal(fnFactory, i); } } } next = NULL; } LexerLibrary::~LexerLibrary() { Release(); delete lib; } void LexerLibrary::Release() { LexerMinder *lm; LexerMinder *lmNext; lm = first; while (NULL != lm) { lmNext = lm->next; delete lm->self; delete lm; lm = lmNext; } first = NULL; last = NULL; } //------------------------------------------ // // LexerManager // //------------------------------------------ /// Return the single LexerManager instance... LexerManager *LexerManager::GetInstance() { if (!theInstance) theInstance = new LexerManager; return theInstance; } /// Delete any LexerManager instance... void LexerManager::DeleteInstance() { delete theInstance; theInstance = NULL; } /// protected constructor - this is a singleton... LexerManager::LexerManager() { first = NULL; last = NULL; } LexerManager::~LexerManager() { Clear(); } void LexerManager::Load(const char *path) { LoadLexerLibrary(path); } void LexerManager::LoadLexerLibrary(const char *module) { for (LexerLibrary *ll = first; ll; ll= ll->next) { if (strcmp(ll->m_sModuleName.c_str(), module) == 0) return; } LexerLibrary *lib = new LexerLibrary(module); if (NULL != first) { last->next = lib; last = lib; } else { first = lib; last = lib; } } void LexerManager::Clear() { if (NULL != first) { LexerLibrary *cur = first; LexerLibrary *next; while (cur) { next = cur->next; delete cur; cur = next; } first = NULL; last = NULL; } } //------------------------------------------ // // LexerManager // //------------------------------------------ LMMinder::~LMMinder() { LexerManager::DeleteInstance(); } LMMinder minder; sqlitebrowser-3.11.2/libs/qscintilla/src/ExternalLexer.h000066400000000000000000000044541345112435200233300ustar00rootroot00000000000000// Scintilla source code edit control /** @file ExternalLexer.h ** Support external lexers in DLLs. **/ // Copyright 2001 Simon Steele , portions copyright Neil Hodgson. // The License.txt file describes the conditions under which this software may be distributed. #ifndef EXTERNALLEXER_H #define EXTERNALLEXER_H #if PLAT_WIN #define EXT_LEXER_DECL __stdcall #elif PLAT_QT #include #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) #define EXT_LEXER_DECL __stdcall #else #define EXT_LEXER_DECL #endif #else #define EXT_LEXER_DECL #endif #ifdef SCI_NAMESPACE namespace Scintilla { #endif typedef void*(EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index); typedef int (EXT_LEXER_DECL *GetLexerCountFn)(); typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name, int buflength); typedef LexerFactoryFunction(EXT_LEXER_DECL *GetLexerFactoryFunction)(unsigned int Index); /// Sub-class of LexerModule to use an external lexer. class ExternalLexerModule : public LexerModule { protected: GetLexerFactoryFunction fneFactory; std::string name; public: ExternalLexerModule(int language_, LexerFunction fnLexer_, const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_), fneFactory(0), name(languageName_){ languageName = name.c_str(); } virtual void SetExternal(GetLexerFactoryFunction fFactory, int index); }; /// LexerMinder points to an ExternalLexerModule - so we don't leak them. class LexerMinder { public: ExternalLexerModule *self; LexerMinder *next; }; /// LexerLibrary exists for every External Lexer DLL, contains LexerMinders. class LexerLibrary { DynamicLibrary *lib; LexerMinder *first; LexerMinder *last; public: explicit LexerLibrary(const char *ModuleName); ~LexerLibrary(); void Release(); LexerLibrary *next; std::string m_sModuleName; }; /// LexerManager manages external lexers, contains LexerLibrarys. class LexerManager { public: ~LexerManager(); static LexerManager *GetInstance(); static void DeleteInstance(); void Load(const char *path); void Clear(); private: LexerManager(); static LexerManager *theInstance; void LoadLexerLibrary(const char *module); LexerLibrary *first; LexerLibrary *last; }; class LMMinder { public: ~LMMinder(); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/FontQuality.h000066400000000000000000000015451345112435200230230ustar00rootroot00000000000000// Scintilla source code edit control /** @file FontQuality.h ** Definitions to control font anti-aliasing. ** Redefine constants from Scintilla.h to avoid including Scintilla.h in PlatWin.cxx. **/ // Copyright 1998-2009 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef FONTQUALITY_H #define FONTQUALITY_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif // These definitions match Scintilla.h #define SC_EFF_QUALITY_MASK 0xF #define SC_EFF_QUALITY_DEFAULT 0 #define SC_EFF_QUALITY_NON_ANTIALIASED 1 #define SC_EFF_QUALITY_ANTIALIASED 2 #define SC_EFF_QUALITY_LCD_OPTIMIZED 3 // These definitions must match SC_TECHNOLOGY_* in Scintilla.h #define SCWIN_TECH_GDI 0 #define SCWIN_TECH_DIRECTWRITE 1 #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Indicator.cpp000066400000000000000000000165461345112435200230220ustar00rootroot00000000000000// Scintilla source code edit control /** @file Indicator.cxx ** Defines the style of indicators which are text decorations such as underlining. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include "Platform.h" #include "Scintilla.h" #include "Indicator.h" #include "XPM.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif static PRectangle PixelGridAlign(const PRectangle &rc) { // Move left and right side to nearest pixel to avoid blurry visuals return PRectangle::FromInts(int(rc.left + 0.5), int(rc.top), int(rc.right + 0.5), int(rc.bottom)); } void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const { StyleAndColour sacDraw = sacNormal; if (Flags() & SC_INDICFLAG_VALUEFORE) { sacDraw.fore = value & SC_INDICVALUEMASK; } if (drawState == drawHover) { sacDraw = sacHover; } surface->PenColour(sacDraw.fore); int ymid = static_cast(rc.bottom + rc.top) / 2; if (sacDraw.style == INDIC_SQUIGGLE) { int x = int(rc.left+0.5); int xLast = int(rc.right+0.5); int y = 0; surface->MoveTo(x, static_cast(rc.top) + y); while (x < xLast) { if ((x + 2) > xLast) { if (xLast > x) y = 1; x = xLast; } else { x += 2; y = 2 - y; } surface->LineTo(x, static_cast(rc.top) + y); } } else if (sacDraw.style == INDIC_SQUIGGLEPIXMAP) { PRectangle rcSquiggle = PixelGridAlign(rc); int width = Platform::Minimum(4000, static_cast(rcSquiggle.Width())); RGBAImage image(width, 3, 1.0, 0); enum { alphaFull = 0xff, alphaSide = 0x2f, alphaSide2=0x5f }; for (int x = 0; x < width; x++) { if (x%2) { // Two halfway columns have a full pixel in middle flanked by light pixels image.SetPixel(x, 0, sacDraw.fore, alphaSide); image.SetPixel(x, 1, sacDraw.fore, alphaFull); image.SetPixel(x, 2, sacDraw.fore, alphaSide); } else { // Extreme columns have a full pixel at bottom or top and a mid-tone pixel in centre image.SetPixel(x, (x % 4) ? 0 : 2, sacDraw.fore, alphaFull); image.SetPixel(x, 1, sacDraw.fore, alphaSide2); } } surface->DrawRGBAImage(rcSquiggle, image.GetWidth(), image.GetHeight(), image.Pixels()); } else if (sacDraw.style == INDIC_SQUIGGLELOW) { surface->MoveTo(static_cast(rc.left), static_cast(rc.top)); int x = static_cast(rc.left) + 3; int y = 0; while (x < rc.right) { surface->LineTo(x - 1, static_cast(rc.top) + y); y = 1 - y; surface->LineTo(x, static_cast(rc.top) + y); x += 3; } surface->LineTo(static_cast(rc.right), static_cast(rc.top) + y); // Finish the line } else if (sacDraw.style == INDIC_TT) { surface->MoveTo(static_cast(rc.left), ymid); int x = static_cast(rc.left) + 5; while (x < rc.right) { surface->LineTo(x, ymid); surface->MoveTo(x-3, ymid); surface->LineTo(x-3, ymid+2); x++; surface->MoveTo(x, ymid); x += 5; } surface->LineTo(static_cast(rc.right), ymid); // Finish the line if (x - 3 <= rc.right) { surface->MoveTo(x-3, ymid); surface->LineTo(x-3, ymid+2); } } else if (sacDraw.style == INDIC_DIAGONAL) { int x = static_cast(rc.left); while (x < rc.right) { surface->MoveTo(x, static_cast(rc.top) + 2); int endX = x+3; int endY = static_cast(rc.top) - 1; if (endX > rc.right) { endY += endX - static_cast(rc.right); endX = static_cast(rc.right); } surface->LineTo(endX, endY); x += 4; } } else if (sacDraw.style == INDIC_STRIKE) { surface->MoveTo(static_cast(rc.left), static_cast(rc.top) - 4); surface->LineTo(static_cast(rc.right), static_cast(rc.top) - 4); } else if ((sacDraw.style == INDIC_HIDDEN) || (sacDraw.style == INDIC_TEXTFORE)) { // Draw nothing } else if (sacDraw.style == INDIC_BOX) { surface->MoveTo(static_cast(rc.left), ymid + 1); surface->LineTo(static_cast(rc.right), ymid + 1); surface->LineTo(static_cast(rc.right), static_cast(rcLine.top) + 1); surface->LineTo(static_cast(rc.left), static_cast(rcLine.top) + 1); surface->LineTo(static_cast(rc.left), ymid + 1); } else if (sacDraw.style == INDIC_ROUNDBOX || sacDraw.style == INDIC_STRAIGHTBOX || sacDraw.style == INDIC_FULLBOX) { PRectangle rcBox = rcLine; if (sacDraw.style != INDIC_FULLBOX) rcBox.top = rcLine.top + 1; rcBox.left = rc.left; rcBox.right = rc.right; surface->AlphaRectangle(rcBox, (sacDraw.style == INDIC_ROUNDBOX) ? 1 : 0, sacDraw.fore, fillAlpha, sacDraw.fore, outlineAlpha, 0); } else if (sacDraw.style == INDIC_DOTBOX) { PRectangle rcBox = PixelGridAlign(rc); rcBox.top = rcLine.top + 1; rcBox.bottom = rcLine.bottom; // Cap width at 4000 to avoid large allocations when mistakes made int width = Platform::Minimum(static_cast(rcBox.Width()), 4000); RGBAImage image(width, static_cast(rcBox.Height()), 1.0, 0); // Draw horizontal lines top and bottom for (int x=0; x(rcBox.Height()); y += static_cast(rcBox.Height()) - 1) { image.SetPixel(x, y, sacDraw.fore, ((x + y) % 2) ? outlineAlpha : fillAlpha); } } // Draw vertical lines left and right for (int y = 1; y(rcBox.Height()); y++) { for (int x=0; xDrawRGBAImage(rcBox, image.GetWidth(), image.GetHeight(), image.Pixels()); } else if (sacDraw.style == INDIC_DASH) { int x = static_cast(rc.left); while (x < rc.right) { surface->MoveTo(x, ymid); surface->LineTo(Platform::Minimum(x + 4, static_cast(rc.right)), ymid); x += 7; } } else if (sacDraw.style == INDIC_DOTS) { int x = static_cast(rc.left); while (x < static_cast(rc.right)) { PRectangle rcDot = PRectangle::FromInts(x, ymid, x + 1, ymid + 1); surface->FillRectangle(rcDot, sacDraw.fore); x += 2; } } else if (sacDraw.style == INDIC_COMPOSITIONTHICK) { PRectangle rcComposition(rc.left+1, rcLine.bottom-2, rc.right-1, rcLine.bottom); surface->FillRectangle(rcComposition, sacDraw.fore); } else if (sacDraw.style == INDIC_COMPOSITIONTHIN) { PRectangle rcComposition(rc.left+1, rcLine.bottom-2, rc.right-1, rcLine.bottom-1); surface->FillRectangle(rcComposition, sacDraw.fore); } else if (sacDraw.style == INDIC_POINT || sacDraw.style == INDIC_POINTCHARACTER) { if (rcCharacter.Width() >= 0.1) { const int pixelHeight = static_cast(rc.Height() - 1.0f); // 1 pixel onto next line if multiphase const XYPOSITION x = (sacDraw.style == INDIC_POINT) ? (rcCharacter.left) : ((rcCharacter.right + rcCharacter.left) / 2); const int ix = static_cast(x + 0.5f); const int iy = static_cast(rc.top + 1.0f); Point pts[] = { Point::FromInts(ix - pixelHeight, iy + pixelHeight), // Left Point::FromInts(ix + pixelHeight, iy + pixelHeight), // Right Point::FromInts(ix, iy) // Top }; surface->Polygon(pts, 3, sacDraw.fore, sacDraw.fore); } } else { // Either INDIC_PLAIN or unknown surface->MoveTo(static_cast(rc.left), ymid); surface->LineTo(static_cast(rc.right), ymid); } } void Indicator::SetFlags(int attributes_) { attributes = attributes_; } sqlitebrowser-3.11.2/libs/qscintilla/src/Indicator.h000066400000000000000000000033021345112435200224510ustar00rootroot00000000000000// Scintilla source code edit control /** @file Indicator.h ** Defines the style of indicators which are text decorations such as underlining. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef INDICATOR_H #define INDICATOR_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif struct StyleAndColour { int style; ColourDesired fore; StyleAndColour() : style(INDIC_PLAIN), fore(0, 0, 0) { } StyleAndColour(int style_, ColourDesired fore_ = ColourDesired(0, 0, 0)) : style(style_), fore(fore_) { } bool operator==(const StyleAndColour &other) const { return (style == other.style) && (fore == other.fore); } }; /** */ class Indicator { public: enum DrawState { drawNormal, drawHover }; StyleAndColour sacNormal; StyleAndColour sacHover; bool under; int fillAlpha; int outlineAlpha; int attributes; Indicator() : under(false), fillAlpha(30), outlineAlpha(50), attributes(0) { } Indicator(int style_, ColourDesired fore_=ColourDesired(0,0,0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) : sacNormal(style_, fore_), sacHover(style_, fore_), under(under_), fillAlpha(fillAlpha_), outlineAlpha(outlineAlpha_), attributes(0) { } void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const; bool IsDynamic() const { return !(sacNormal == sacHover); } bool OverridesTextFore() const { return sacNormal.style == INDIC_TEXTFORE || sacHover.style == INDIC_TEXTFORE; } int Flags() const { return attributes; } void SetFlags(int attributes_); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/KeyMap.cpp000066400000000000000000000123541345112435200222650ustar00rootroot00000000000000// Scintilla source code edit control /** @file KeyMap.cxx ** Defines a mapping between keystrokes and commands. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "KeyMap.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif KeyMap::KeyMap() { for (int i = 0; MapDefault[i].key; i++) { AssignCmdKey(MapDefault[i].key, MapDefault[i].modifiers, MapDefault[i].msg); } } KeyMap::~KeyMap() { Clear(); } void KeyMap::Clear() { kmap.clear(); } void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) { kmap[KeyModifiers(key, modifiers)] = msg; } unsigned int KeyMap::Find(int key, int modifiers) const { std::map::const_iterator it = kmap.find(KeyModifiers(key, modifiers)); return (it == kmap.end()) ? 0 : it->second; } #if PLAT_GTK_MACOSX #define OS_X_KEYS 1 #else #define OS_X_KEYS 0 #endif // Define a modifier that is exactly Ctrl key on all platforms // Most uses of Ctrl map to Cmd on OS X but some can't so use SCI_[S]CTRL_META #if OS_X_KEYS #define SCI_CTRL_META SCI_META #define SCI_SCTRL_META (SCI_META | SCI_SHIFT) #else #define SCI_CTRL_META SCI_CTRL #define SCI_SCTRL_META (SCI_CTRL | SCI_SHIFT) #endif const KeyToCommand KeyMap::MapDefault[] = { #if OS_X_KEYS {SCK_DOWN, SCI_CTRL, SCI_DOCUMENTEND}, {SCK_DOWN, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND}, {SCK_UP, SCI_CTRL, SCI_DOCUMENTSTART}, {SCK_UP, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND}, {SCK_LEFT, SCI_CTRL, SCI_VCHOME}, {SCK_LEFT, SCI_CSHIFT, SCI_VCHOMEEXTEND}, {SCK_RIGHT, SCI_CTRL, SCI_LINEEND}, {SCK_RIGHT, SCI_CSHIFT, SCI_LINEENDEXTEND}, #endif {SCK_DOWN, SCI_NORM, SCI_LINEDOWN}, {SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND}, {SCK_DOWN, SCI_CTRL_META, SCI_LINESCROLLDOWN}, {SCK_DOWN, SCI_ASHIFT, SCI_LINEDOWNRECTEXTEND}, {SCK_UP, SCI_NORM, SCI_LINEUP}, {SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND}, {SCK_UP, SCI_CTRL_META, SCI_LINESCROLLUP}, {SCK_UP, SCI_ASHIFT, SCI_LINEUPRECTEXTEND}, {'[', SCI_CTRL, SCI_PARAUP}, {'[', SCI_CSHIFT, SCI_PARAUPEXTEND}, {']', SCI_CTRL, SCI_PARADOWN}, {']', SCI_CSHIFT, SCI_PARADOWNEXTEND}, {SCK_LEFT, SCI_NORM, SCI_CHARLEFT}, {SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND}, {SCK_LEFT, SCI_CTRL_META, SCI_WORDLEFT}, {SCK_LEFT, SCI_SCTRL_META, SCI_WORDLEFTEXTEND}, {SCK_LEFT, SCI_ASHIFT, SCI_CHARLEFTRECTEXTEND}, {SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT}, {SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND}, {SCK_RIGHT, SCI_CTRL_META, SCI_WORDRIGHT}, {SCK_RIGHT, SCI_SCTRL_META, SCI_WORDRIGHTEXTEND}, {SCK_RIGHT, SCI_ASHIFT, SCI_CHARRIGHTRECTEXTEND}, {'/', SCI_CTRL, SCI_WORDPARTLEFT}, {'/', SCI_CSHIFT, SCI_WORDPARTLEFTEXTEND}, {'\\', SCI_CTRL, SCI_WORDPARTRIGHT}, {'\\', SCI_CSHIFT, SCI_WORDPARTRIGHTEXTEND}, {SCK_HOME, SCI_NORM, SCI_VCHOME}, {SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND}, {SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART}, {SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND}, {SCK_HOME, SCI_ALT, SCI_HOMEDISPLAY}, {SCK_HOME, SCI_ASHIFT, SCI_VCHOMERECTEXTEND}, {SCK_END, SCI_NORM, SCI_LINEEND}, {SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND}, {SCK_END, SCI_CTRL, SCI_DOCUMENTEND}, {SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND}, {SCK_END, SCI_ALT, SCI_LINEENDDISPLAY}, {SCK_END, SCI_ASHIFT, SCI_LINEENDRECTEXTEND}, {SCK_PRIOR, SCI_NORM, SCI_PAGEUP}, {SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND}, {SCK_PRIOR, SCI_ASHIFT, SCI_PAGEUPRECTEXTEND}, {SCK_NEXT, SCI_NORM, SCI_PAGEDOWN}, {SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND}, {SCK_NEXT, SCI_ASHIFT, SCI_PAGEDOWNRECTEXTEND}, {SCK_DELETE, SCI_NORM, SCI_CLEAR}, {SCK_DELETE, SCI_SHIFT, SCI_CUT}, {SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT}, {SCK_DELETE, SCI_CSHIFT, SCI_DELLINERIGHT}, {SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE}, {SCK_INSERT, SCI_SHIFT, SCI_PASTE}, {SCK_INSERT, SCI_CTRL, SCI_COPY}, {SCK_ESCAPE, SCI_NORM, SCI_CANCEL}, {SCK_BACK, SCI_NORM, SCI_DELETEBACK}, {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK}, {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT}, {SCK_BACK, SCI_ALT, SCI_UNDO}, {SCK_BACK, SCI_CSHIFT, SCI_DELLINELEFT}, {'Z', SCI_CTRL, SCI_UNDO}, #if OS_X_KEYS {'Z', SCI_CSHIFT, SCI_REDO}, #else {'Y', SCI_CTRL, SCI_REDO}, #endif {'X', SCI_CTRL, SCI_CUT}, {'C', SCI_CTRL, SCI_COPY}, {'V', SCI_CTRL, SCI_PASTE}, {'A', SCI_CTRL, SCI_SELECTALL}, {SCK_TAB, SCI_NORM, SCI_TAB}, {SCK_TAB, SCI_SHIFT, SCI_BACKTAB}, {SCK_RETURN, SCI_NORM, SCI_NEWLINE}, {SCK_RETURN, SCI_SHIFT, SCI_NEWLINE}, {SCK_ADD, SCI_CTRL, SCI_ZOOMIN}, {SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT}, {SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM}, {'L', SCI_CTRL, SCI_LINECUT}, {'L', SCI_CSHIFT, SCI_LINEDELETE}, {'T', SCI_CSHIFT, SCI_LINECOPY}, {'T', SCI_CTRL, SCI_LINETRANSPOSE}, {'D', SCI_CTRL, SCI_SELECTIONDUPLICATE}, {'U', SCI_CTRL, SCI_LOWERCASE}, {'U', SCI_CSHIFT, SCI_UPPERCASE}, {0,0,0}, }; sqlitebrowser-3.11.2/libs/qscintilla/src/KeyMap.h000066400000000000000000000024531345112435200217310ustar00rootroot00000000000000// Scintilla source code edit control /** @file KeyMap.h ** Defines a mapping between keystrokes and commands. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef KEYMAP_H #define KEYMAP_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif #define SCI_NORM 0 #define SCI_SHIFT SCMOD_SHIFT #define SCI_CTRL SCMOD_CTRL #define SCI_ALT SCMOD_ALT #define SCI_META SCMOD_META #define SCI_SUPER SCMOD_SUPER #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) #define SCI_ASHIFT (SCI_ALT | SCI_SHIFT) /** */ class KeyModifiers { public: int key; int modifiers; KeyModifiers(int key_, int modifiers_) : key(key_), modifiers(modifiers_) { } bool operator<(const KeyModifiers &other) const { if (key == other.key) return modifiers < other.modifiers; else return key < other.key; } }; /** */ class KeyToCommand { public: int key; int modifiers; unsigned int msg; }; /** */ class KeyMap { std::map kmap; static const KeyToCommand MapDefault[]; public: KeyMap(); ~KeyMap(); void Clear(); void AssignCmdKey(int key, int modifiers, unsigned int msg); unsigned int Find(int key, int modifiers) const; // 0 returned on failure }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/License.txt000066400000000000000000000015441345112435200225150ustar00rootroot00000000000000License for Scintilla and SciTE Copyright 1998-2003 by Neil Hodgson All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. sqlitebrowser-3.11.2/libs/qscintilla/src/LineMarker.cpp000066400000000000000000000344151345112435200231320ustar00rootroot00000000000000// Scintilla source code edit control /** @file LineMarker.cxx ** Defines the look of a line marker in the margin. **/ // Copyright 1998-2011 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "StringCopy.h" #include "XPM.h" #include "LineMarker.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif void LineMarker::SetXPM(const char *textForm) { delete pxpm; pxpm = new XPM(textForm); markType = SC_MARK_PIXMAP; } void LineMarker::SetXPM(const char *const *linesForm) { delete pxpm; pxpm = new XPM(linesForm); markType = SC_MARK_PIXMAP; } void LineMarker::SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage) { delete image; image = new RGBAImage(static_cast(sizeRGBAImage.x), static_cast(sizeRGBAImage.y), scale, pixelsRGBAImage); markType = SC_MARK_RGBAIMAGE; } static void DrawBox(Surface *surface, int centreX, int centreY, int armSize, ColourDesired fore, ColourDesired back) { PRectangle rc = PRectangle::FromInts( centreX - armSize, centreY - armSize, centreX + armSize + 1, centreY + armSize + 1); surface->RectangleDraw(rc, back, fore); } static void DrawCircle(Surface *surface, int centreX, int centreY, int armSize, ColourDesired fore, ColourDesired back) { PRectangle rcCircle = PRectangle::FromInts( centreX - armSize, centreY - armSize, centreX + armSize + 1, centreY + armSize + 1); surface->Ellipse(rcCircle, back, fore); } static void DrawPlus(Surface *surface, int centreX, int centreY, int armSize, ColourDesired fore) { PRectangle rcV = PRectangle::FromInts(centreX, centreY - armSize + 2, centreX + 1, centreY + armSize - 2 + 1); surface->FillRectangle(rcV, fore); PRectangle rcH = PRectangle::FromInts(centreX - armSize + 2, centreY, centreX + armSize - 2 + 1, centreY + 1); surface->FillRectangle(rcH, fore); } static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, ColourDesired fore) { PRectangle rcH = PRectangle::FromInts(centreX - armSize + 2, centreY, centreX + armSize - 2 + 1, centreY + 1); surface->FillRectangle(rcH, fore); } void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, typeOfFold tFold, int marginStyle) const { if (customDraw != NULL) { customDraw(surface, rcWhole, fontForCharacter, tFold, marginStyle, this); return; } ColourDesired colourHead = back; ColourDesired colourBody = back; ColourDesired colourTail = back; switch (tFold) { case LineMarker::head : case LineMarker::headWithTail : colourHead = backSelected; colourTail = backSelected; break; case LineMarker::body : colourHead = backSelected; colourBody = backSelected; break; case LineMarker::tail : colourBody = backSelected; colourTail = backSelected; break; default : // LineMarker::undefined break; } if ((markType == SC_MARK_PIXMAP) && (pxpm)) { pxpm->Draw(surface, rcWhole); return; } if ((markType == SC_MARK_RGBAIMAGE) && (image)) { // Make rectangle just large enough to fit image centred on centre of rcWhole PRectangle rcImage; rcImage.top = ((rcWhole.top + rcWhole.bottom) - image->GetScaledHeight()) / 2; rcImage.bottom = rcImage.top + image->GetScaledHeight(); rcImage.left = ((rcWhole.left + rcWhole.right) - image->GetScaledWidth()) / 2; rcImage.right = rcImage.left + image->GetScaledWidth(); surface->DrawRGBAImage(rcImage, image->GetWidth(), image->GetHeight(), image->Pixels()); return; } // Restrict most shapes a bit PRectangle rc = rcWhole; rc.top++; rc.bottom--; int minDim = Platform::Minimum(static_cast(rc.Width()), static_cast(rc.Height())); minDim--; // Ensure does not go beyond edge int centreX = static_cast(floor((rc.right + rc.left) / 2.0)); int centreY = static_cast(floor((rc.bottom + rc.top) / 2.0)); int dimOn2 = minDim / 2; int dimOn4 = minDim / 4; int blobSize = dimOn2-1; int armSize = dimOn2-2; if (marginStyle == SC_MARGIN_NUMBER || marginStyle == SC_MARGIN_TEXT || marginStyle == SC_MARGIN_RTEXT) { // On textual margins move marker to the left to try to avoid overlapping the text centreX = static_cast(rc.left) + dimOn2 + 1; } if (markType == SC_MARK_ROUNDRECT) { PRectangle rcRounded = rc; rcRounded.left = rc.left + 1; rcRounded.right = rc.right - 1; surface->RoundedRectangle(rcRounded, fore, back); } else if (markType == SC_MARK_CIRCLE) { PRectangle rcCircle = PRectangle::FromInts( centreX - dimOn2, centreY - dimOn2, centreX + dimOn2, centreY + dimOn2); surface->Ellipse(rcCircle, fore, back); } else if (markType == SC_MARK_ARROW) { Point pts[] = { Point::FromInts(centreX - dimOn4, centreY - dimOn2), Point::FromInts(centreX - dimOn4, centreY + dimOn2), Point::FromInts(centreX + dimOn2 - dimOn4, centreY), }; surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_ARROWDOWN) { Point pts[] = { Point::FromInts(centreX - dimOn2, centreY - dimOn4), Point::FromInts(centreX + dimOn2, centreY - dimOn4), Point::FromInts(centreX, centreY + dimOn2 - dimOn4), }; surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_PLUS) { Point pts[] = { Point::FromInts(centreX - armSize, centreY - 1), Point::FromInts(centreX - 1, centreY - 1), Point::FromInts(centreX - 1, centreY - armSize), Point::FromInts(centreX + 1, centreY - armSize), Point::FromInts(centreX + 1, centreY - 1), Point::FromInts(centreX + armSize, centreY -1), Point::FromInts(centreX + armSize, centreY +1), Point::FromInts(centreX + 1, centreY + 1), Point::FromInts(centreX + 1, centreY + armSize), Point::FromInts(centreX - 1, centreY + armSize), Point::FromInts(centreX - 1, centreY + 1), Point::FromInts(centreX - armSize, centreY + 1), }; surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_MINUS) { Point pts[] = { Point::FromInts(centreX - armSize, centreY - 1), Point::FromInts(centreX + armSize, centreY -1), Point::FromInts(centreX + armSize, centreY +1), Point::FromInts(centreX - armSize, centreY + 1), }; surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_SMALLRECT) { PRectangle rcSmall; rcSmall.left = rc.left + 1; rcSmall.top = rc.top + 2; rcSmall.right = rc.right - 1; rcSmall.bottom = rc.bottom - 2; surface->RectangleDraw(rcSmall, fore, back); } else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND || markType == SC_MARK_UNDERLINE || markType == SC_MARK_AVAILABLE) { // An invisible marker so don't draw anything } else if (markType == SC_MARK_VLINE) { surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, static_cast(rcWhole.bottom)); } else if (markType == SC_MARK_LCORNER) { surface->PenColour(colourTail); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY); surface->LineTo(static_cast(rc.right) - 1, centreY); } else if (markType == SC_MARK_TCORNER) { surface->PenColour(colourTail); surface->MoveTo(centreX, centreY); surface->LineTo(static_cast(rc.right) - 1, centreY); surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY + 1); surface->PenColour(colourHead); surface->LineTo(centreX, static_cast(rcWhole.bottom)); } else if (markType == SC_MARK_LCORNERCURVE) { surface->PenColour(colourTail); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY-3); surface->LineTo(centreX+3, centreY); surface->LineTo(static_cast(rc.right) - 1, centreY); } else if (markType == SC_MARK_TCORNERCURVE) { surface->PenColour(colourTail); surface->MoveTo(centreX, centreY-3); surface->LineTo(centreX+3, centreY); surface->LineTo(static_cast(rc.right) - 1, centreY); surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY-2); surface->PenColour(colourHead); surface->LineTo(centreX, static_cast(rcWhole.bottom)); } else if (markType == SC_MARK_BOXPLUS) { DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); DrawPlus(surface, centreX, centreY, blobSize, colourTail); } else if (markType == SC_MARK_BOXPLUSCONNECTED) { if (tFold == LineMarker::headWithTail) surface->PenColour(colourTail); else surface->PenColour(colourBody); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY - blobSize); DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); DrawPlus(surface, centreX, centreY, blobSize, colourTail); if (tFold == LineMarker::body) { surface->PenColour(colourTail); surface->MoveTo(centreX + 1, centreY + blobSize); surface->LineTo(centreX + blobSize + 1, centreY + blobSize); surface->MoveTo(centreX + blobSize, centreY + blobSize); surface->LineTo(centreX + blobSize, centreY - blobSize); surface->MoveTo(centreX + 1, centreY - blobSize); surface->LineTo(centreX + blobSize + 1, centreY - blobSize); } } else if (markType == SC_MARK_BOXMINUS) { DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); DrawMinus(surface, centreX, centreY, blobSize, colourTail); surface->PenColour(colourHead); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); } else if (markType == SC_MARK_BOXMINUSCONNECTED) { DrawBox(surface, centreX, centreY, blobSize, fore, colourHead); DrawMinus(surface, centreX, centreY, blobSize, colourTail); surface->PenColour(colourHead); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY - blobSize); if (tFold == LineMarker::body) { surface->PenColour(colourTail); surface->MoveTo(centreX + 1, centreY + blobSize); surface->LineTo(centreX + blobSize + 1, centreY + blobSize); surface->MoveTo(centreX + blobSize, centreY + blobSize); surface->LineTo(centreX + blobSize, centreY - blobSize); surface->MoveTo(centreX + 1, centreY - blobSize); surface->LineTo(centreX + blobSize + 1, centreY - blobSize); } } else if (markType == SC_MARK_CIRCLEPLUS) { DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); DrawPlus(surface, centreX, centreY, blobSize, colourTail); } else if (markType == SC_MARK_CIRCLEPLUSCONNECTED) { if (tFold == LineMarker::headWithTail) surface->PenColour(colourTail); else surface->PenColour(colourBody); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY - blobSize); DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); DrawPlus(surface, centreX, centreY, blobSize, colourTail); } else if (markType == SC_MARK_CIRCLEMINUS) { surface->PenColour(colourHead); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); DrawMinus(surface, centreX, centreY, blobSize, colourTail); } else if (markType == SC_MARK_CIRCLEMINUSCONNECTED) { surface->PenColour(colourHead); surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, static_cast(rcWhole.bottom)); surface->PenColour(colourBody); surface->MoveTo(centreX, static_cast(rcWhole.top)); surface->LineTo(centreX, centreY - blobSize); DrawCircle(surface, centreX, centreY, blobSize, fore, colourHead); DrawMinus(surface, centreX, centreY, blobSize, colourTail); } else if (markType >= SC_MARK_CHARACTER) { char character[1]; character[0] = static_cast(markType - SC_MARK_CHARACTER); XYPOSITION width = surface->WidthText(fontForCharacter, character, 1); rc.left += (rc.Width() - width) / 2; rc.right = rc.left + width; surface->DrawTextClipped(rc, fontForCharacter, rc.bottom - 2, character, 1, fore, back); } else if (markType == SC_MARK_DOTDOTDOT) { XYPOSITION right = static_cast(centreX - 6); for (int b=0; b<3; b++) { PRectangle rcBlob(right, rc.bottom - 4, right + 2, rc.bottom-2); surface->FillRectangle(rcBlob, fore); right += 5.0f; } } else if (markType == SC_MARK_ARROWS) { surface->PenColour(fore); int right = centreX - 2; const int armLength = dimOn2 - 1; for (int b = 0; b<3; b++) { surface->MoveTo(right, centreY); surface->LineTo(right - armLength, centreY - armLength); surface->MoveTo(right, centreY); surface->LineTo(right - armLength, centreY + armLength); right += 4; } } else if (markType == SC_MARK_SHORTARROW) { Point pts[] = { Point::FromInts(centreX, centreY + dimOn2), Point::FromInts(centreX + dimOn2, centreY), Point::FromInts(centreX, centreY - dimOn2), Point::FromInts(centreX, centreY - dimOn4), Point::FromInts(centreX - dimOn4, centreY - dimOn4), Point::FromInts(centreX - dimOn4, centreY + dimOn4), Point::FromInts(centreX, centreY + dimOn4), Point::FromInts(centreX, centreY + dimOn2), }; surface->Polygon(pts, ELEMENTS(pts), fore, back); } else if (markType == SC_MARK_LEFTRECT) { PRectangle rcLeft = rcWhole; rcLeft.right = rcLeft.left + 4; surface->FillRectangle(rcLeft, back); } else if (markType == SC_MARK_BOOKMARK) { int halfHeight = minDim / 3; Point pts[] = { Point::FromInts(static_cast(rc.left), centreY-halfHeight), Point::FromInts(static_cast(rc.right) - 3, centreY - halfHeight), Point::FromInts(static_cast(rc.right) - 3 - halfHeight, centreY), Point::FromInts(static_cast(rc.right) - 3, centreY + halfHeight), Point::FromInts(static_cast(rc.left), centreY + halfHeight), }; surface->Polygon(pts, ELEMENTS(pts), fore, back); } else { // SC_MARK_FULLRECT surface->FillRectangle(rcWhole, back); } } sqlitebrowser-3.11.2/libs/qscintilla/src/LineMarker.h000066400000000000000000000046571345112435200226040ustar00rootroot00000000000000// Scintilla source code edit control /** @file LineMarker.h ** Defines the look of a line marker in the margin . **/ // Copyright 1998-2011 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef LINEMARKER_H #define LINEMARKER_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif typedef void (*DrawLineMarkerFn)(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, int tFold, int marginStyle, const void *lineMarker); /** */ class LineMarker { public: enum typeOfFold { undefined, head, body, tail, headWithTail }; int markType; ColourDesired fore; ColourDesired back; ColourDesired backSelected; int alpha; XPM *pxpm; RGBAImage *image; /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native * Draw function for drawing line markers. Allow those platforms to override * it instead of creating a new method(s) in the Surface class that existing * platforms must implement as empty. */ DrawLineMarkerFn customDraw; LineMarker() { markType = SC_MARK_CIRCLE; fore = ColourDesired(0,0,0); back = ColourDesired(0xff,0xff,0xff); backSelected = ColourDesired(0xff,0x00,0x00); alpha = SC_ALPHA_NOALPHA; pxpm = NULL; image = NULL; customDraw = NULL; } LineMarker(const LineMarker &) { // Defined to avoid pxpm being blindly copied, not as a complete copy constructor markType = SC_MARK_CIRCLE; fore = ColourDesired(0,0,0); back = ColourDesired(0xff,0xff,0xff); backSelected = ColourDesired(0xff,0x00,0x00); alpha = SC_ALPHA_NOALPHA; pxpm = NULL; image = NULL; customDraw = NULL; } ~LineMarker() { delete pxpm; delete image; } LineMarker &operator=(const LineMarker &other) { // Defined to avoid pxpm being blindly copied, not as a complete assignment operator if (this != &other) { markType = SC_MARK_CIRCLE; fore = ColourDesired(0,0,0); back = ColourDesired(0xff,0xff,0xff); backSelected = ColourDesired(0xff,0x00,0x00); alpha = SC_ALPHA_NOALPHA; delete pxpm; pxpm = NULL; delete image; image = NULL; customDraw = NULL; } return *this; } void SetXPM(const char *textForm); void SetXPM(const char *const *linesForm); void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage); void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter, typeOfFold tFold, int marginStyle) const; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/MarginView.cpp000066400000000000000000000406051345112435200231470ustar00rootroot00000000000000// Scintilla source code edit control /** @file MarginView.cxx ** Defines the appearance of the editor margin. **/ // Copyright 1998-2014 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #include #include #include #include "Platform.h" #include "ILexer.h" #include "Scintilla.h" #include "StringCopy.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "ContractionState.h" #include "CellBuffer.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #include "CharClassify.h" #include "Decoration.h" #include "CaseFolder.h" #include "Document.h" #include "UniConversion.h" #include "Selection.h" #include "PositionCache.h" #include "EditModel.h" #include "MarginView.h" #include "EditView.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif #ifdef SCI_NAMESPACE namespace Scintilla { #endif void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour) { surface->PenColour(wrapColour); enum { xa = 1 }; // gap before start int w = static_cast(rcPlace.right - rcPlace.left) - xa - 1; bool xStraight = isEndMarker; // x-mirrored symbol for start marker int x0 = static_cast(xStraight ? rcPlace.left : rcPlace.right - 1); int y0 = static_cast(rcPlace.top); int dy = static_cast(rcPlace.bottom - rcPlace.top) / 5; int y = static_cast(rcPlace.bottom - rcPlace.top) / 2 + dy; struct Relative { Surface *surface; int xBase; int xDir; int yBase; int yDir; void MoveTo(int xRelative, int yRelative) { surface->MoveTo(xBase + xDir * xRelative, yBase + yDir * yRelative); } void LineTo(int xRelative, int yRelative) { surface->LineTo(xBase + xDir * xRelative, yBase + yDir * yRelative); } }; Relative rel = { surface, x0, xStraight ? 1 : -1, y0, 1 }; // arrow head rel.MoveTo(xa, y); rel.LineTo(xa + 2 * w / 3, y - dy); rel.MoveTo(xa, y); rel.LineTo(xa + 2 * w / 3, y + dy); // arrow body rel.MoveTo(xa, y); rel.LineTo(xa + w, y); rel.LineTo(xa + w, y - 2 * dy); rel.LineTo(xa - 1, // on windows lineto is exclusive endpoint, perhaps GTK not... y - 2 * dy); } MarginView::MarginView() { pixmapSelMargin = 0; pixmapSelPattern = 0; pixmapSelPatternOffset1 = 0; wrapMarkerPaddingRight = 3; customDrawWrapMarker = NULL; } void MarginView::DropGraphics(bool freeObjects) { if (freeObjects) { delete pixmapSelMargin; pixmapSelMargin = 0; delete pixmapSelPattern; pixmapSelPattern = 0; delete pixmapSelPatternOffset1; pixmapSelPatternOffset1 = 0; } else { if (pixmapSelMargin) pixmapSelMargin->Release(); if (pixmapSelPattern) pixmapSelPattern->Release(); if (pixmapSelPatternOffset1) pixmapSelPatternOffset1->Release(); } } void MarginView::AllocateGraphics(const ViewStyle &vsDraw) { if (!pixmapSelMargin) pixmapSelMargin = Surface::Allocate(vsDraw.technology); if (!pixmapSelPattern) pixmapSelPattern = Surface::Allocate(vsDraw.technology); if (!pixmapSelPatternOffset1) pixmapSelPatternOffset1 = Surface::Allocate(vsDraw.technology); } void MarginView::RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw) { if (!pixmapSelPattern->Initialised()) { const int patternSize = 8; pixmapSelPattern->InitPixMap(patternSize, patternSize, surfaceWindow, wid); pixmapSelPatternOffset1->InitPixMap(patternSize, patternSize, surfaceWindow, wid); // This complex procedure is to reproduce the checkerboard dithered pattern used by windows // for scroll bars and Visual Studio for its selection margin. The colour of this pattern is half // way between the chrome colour and the chrome highlight colour making a nice transition // between the window chrome and the content area. And it works in low colour depths. PRectangle rcPattern = PRectangle::FromInts(0, 0, patternSize, patternSize); // Initialize default colours based on the chrome colour scheme. Typically the highlight is white. ColourDesired colourFMFill = vsDraw.selbar; ColourDesired colourFMStripes = vsDraw.selbarlight; if (!(vsDraw.selbarlight == ColourDesired(0xff, 0xff, 0xff))) { // User has chosen an unusual chrome colour scheme so just use the highlight edge colour. // (Typically, the highlight colour is white.) colourFMFill = vsDraw.selbarlight; } if (vsDraw.foldmarginColour.isSet) { // override default fold margin colour colourFMFill = vsDraw.foldmarginColour; } if (vsDraw.foldmarginHighlightColour.isSet) { // override default fold margin highlight colour colourFMStripes = vsDraw.foldmarginHighlightColour; } pixmapSelPattern->FillRectangle(rcPattern, colourFMFill); pixmapSelPatternOffset1->FillRectangle(rcPattern, colourFMStripes); for (int y = 0; y < patternSize; y++) { for (int x = y % 2; x < patternSize; x += 2) { PRectangle rcPixel = PRectangle::FromInts(x, y, x + 1, y + 1); pixmapSelPattern->FillRectangle(rcPixel, colourFMStripes); pixmapSelPatternOffset1->FillRectangle(rcPixel, colourFMFill); } } } } static int SubstituteMarkerIfEmpty(int markerCheck, int markerDefault, const ViewStyle &vs) { if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) return markerDefault; return markerCheck; } void MarginView::PaintMargin(Surface *surface, int topLine, PRectangle rc, PRectangle rcMargin, const EditModel &model, const ViewStyle &vs) { PRectangle rcSelMargin = rcMargin; rcSelMargin.right = rcMargin.left; if (rcSelMargin.bottom < rc.bottom) rcSelMargin.bottom = rc.bottom; Point ptOrigin = model.GetVisibleOriginInMain(); FontAlias fontLineNumber = vs.styles[STYLE_LINENUMBER].font; for (size_t margin = 0; margin < vs.ms.size(); margin++) { if (vs.ms[margin].width > 0) { rcSelMargin.left = rcSelMargin.right; rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width; if (vs.ms[margin].style != SC_MARGIN_NUMBER) { if (vs.ms[margin].mask & SC_MASK_FOLDERS) { // Required because of special way brush is created for selection margin // Ensure patterns line up when scrolling with separate margin view // by choosing correctly aligned variant. bool invertPhase = static_cast(ptOrigin.y) & 1; surface->FillRectangle(rcSelMargin, invertPhase ? *pixmapSelPattern : *pixmapSelPatternOffset1); } else { ColourDesired colour; switch (vs.ms[margin].style) { case SC_MARGIN_BACK: colour = vs.styles[STYLE_DEFAULT].back; break; case SC_MARGIN_FORE: colour = vs.styles[STYLE_DEFAULT].fore; break; case SC_MARGIN_COLOUR: colour = vs.ms[margin].back; break; default: colour = vs.styles[STYLE_LINENUMBER].back; break; } surface->FillRectangle(rcSelMargin, colour); } } else { surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back); } const int lineStartPaint = static_cast(rcMargin.top + ptOrigin.y) / vs.lineHeight; int visibleLine = model.TopLineOfMain() + lineStartPaint; int yposScreen = lineStartPaint * vs.lineHeight - static_cast(ptOrigin.y); // Work out whether the top line is whitespace located after a // lessening of fold level which implies a 'fold tail' but which should not // be displayed until the last of a sequence of whitespace. bool needWhiteClosure = false; if (vs.ms[margin].mask & SC_MASK_FOLDERS) { int level = model.pdoc->GetLevel(model.cs.DocFromDisplay(visibleLine)); if (level & SC_FOLDLEVELWHITEFLAG) { int lineBack = model.cs.DocFromDisplay(visibleLine); int levelPrev = level; while ((lineBack > 0) && (levelPrev & SC_FOLDLEVELWHITEFLAG)) { lineBack--; levelPrev = model.pdoc->GetLevel(lineBack); } if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) { if (LevelNumber(level) < LevelNumber(levelPrev)) needWhiteClosure = true; } } if (highlightDelimiter.isEnabled) { int lastLine = model.cs.DocFromDisplay(topLine + model.LinesOnScreen()) + 1; model.pdoc->GetHighlightDelimiters(highlightDelimiter, model.pdoc->LineFromPosition(model.sel.MainCaret()), lastLine); } } // Old code does not know about new markers needed to distinguish all cases const int folderOpenMid = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEROPENMID, SC_MARKNUM_FOLDEROPEN, vs); const int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND, SC_MARKNUM_FOLDER, vs); while ((visibleLine < model.cs.LinesDisplayed()) && yposScreen < rc.bottom) { PLATFORM_ASSERT(visibleLine < model.cs.LinesDisplayed()); const int lineDoc = model.cs.DocFromDisplay(visibleLine); PLATFORM_ASSERT(model.cs.GetVisible(lineDoc)); const int firstVisibleLine = model.cs.DisplayFromDoc(lineDoc); const int lastVisibleLine = model.cs.DisplayLastFromDoc(lineDoc); const bool firstSubLine = visibleLine == firstVisibleLine; const bool lastSubLine = visibleLine == lastVisibleLine; int marks = model.pdoc->GetMark(lineDoc); if (!firstSubLine) marks = 0; bool headWithTail = false; if (vs.ms[margin].mask & SC_MASK_FOLDERS) { // Decide which fold indicator should be displayed const int level = model.pdoc->GetLevel(lineDoc); const int levelNext = model.pdoc->GetLevel(lineDoc + 1); const int levelNum = LevelNumber(level); const int levelNextNum = LevelNumber(levelNext); if (level & SC_FOLDLEVELHEADERFLAG) { if (firstSubLine) { if (levelNum < levelNextNum) { if (model.cs.GetExpanded(lineDoc)) { if (levelNum == SC_FOLDLEVELBASE) marks |= 1 << SC_MARKNUM_FOLDEROPEN; else marks |= 1 << folderOpenMid; } else { if (levelNum == SC_FOLDLEVELBASE) marks |= 1 << SC_MARKNUM_FOLDER; else marks |= 1 << folderEnd; } } else if (levelNum > SC_FOLDLEVELBASE) { marks |= 1 << SC_MARKNUM_FOLDERSUB; } } else { if (levelNum < levelNextNum) { if (model.cs.GetExpanded(lineDoc)) { marks |= 1 << SC_MARKNUM_FOLDERSUB; } else if (levelNum > SC_FOLDLEVELBASE) { marks |= 1 << SC_MARKNUM_FOLDERSUB; } } else if (levelNum > SC_FOLDLEVELBASE) { marks |= 1 << SC_MARKNUM_FOLDERSUB; } } needWhiteClosure = false; const int firstFollowupLine = model.cs.DocFromDisplay(model.cs.DisplayFromDoc(lineDoc + 1)); const int firstFollowupLineLevel = model.pdoc->GetLevel(firstFollowupLine); const int secondFollowupLineLevelNum = LevelNumber(model.pdoc->GetLevel(firstFollowupLine + 1)); if (!model.cs.GetExpanded(lineDoc)) { if ((firstFollowupLineLevel & SC_FOLDLEVELWHITEFLAG) && (levelNum > secondFollowupLineLevelNum)) needWhiteClosure = true; if (highlightDelimiter.IsFoldBlockHighlighted(firstFollowupLine)) headWithTail = true; } } else if (level & SC_FOLDLEVELWHITEFLAG) { if (needWhiteClosure) { if (levelNext & SC_FOLDLEVELWHITEFLAG) { marks |= 1 << SC_MARKNUM_FOLDERSUB; } else if (levelNextNum > SC_FOLDLEVELBASE) { marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; needWhiteClosure = false; } else { marks |= 1 << SC_MARKNUM_FOLDERTAIL; needWhiteClosure = false; } } else if (levelNum > SC_FOLDLEVELBASE) { if (levelNextNum < levelNum) { if (levelNextNum > SC_FOLDLEVELBASE) { marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; } else { marks |= 1 << SC_MARKNUM_FOLDERTAIL; } } else { marks |= 1 << SC_MARKNUM_FOLDERSUB; } } } else if (levelNum > SC_FOLDLEVELBASE) { if (levelNextNum < levelNum) { needWhiteClosure = false; if (levelNext & SC_FOLDLEVELWHITEFLAG) { marks |= 1 << SC_MARKNUM_FOLDERSUB; needWhiteClosure = true; } else if (lastSubLine) { if (levelNextNum > SC_FOLDLEVELBASE) { marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; } else { marks |= 1 << SC_MARKNUM_FOLDERTAIL; } } else { marks |= 1 << SC_MARKNUM_FOLDERSUB; } } else { marks |= 1 << SC_MARKNUM_FOLDERSUB; } } } marks &= vs.ms[margin].mask; PRectangle rcMarker = rcSelMargin; rcMarker.top = static_cast(yposScreen); rcMarker.bottom = static_cast(yposScreen + vs.lineHeight); if (vs.ms[margin].style == SC_MARGIN_NUMBER) { if (firstSubLine) { char number[100] = ""; if (lineDoc >= 0) sprintf(number, "%d", lineDoc + 1); if (model.foldFlags & (SC_FOLDFLAG_LEVELNUMBERS | SC_FOLDFLAG_LINESTATE)) { if (model.foldFlags & SC_FOLDFLAG_LEVELNUMBERS) { int lev = model.pdoc->GetLevel(lineDoc); sprintf(number, "%c%c %03X %03X", (lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_', (lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_', LevelNumber(lev), lev >> 16 ); } else { int state = model.pdoc->GetLineState(lineDoc); sprintf(number, "%0X", state); } } PRectangle rcNumber = rcMarker; // Right justify XYPOSITION width = surface->WidthText(fontLineNumber, number, static_cast(strlen(number))); XYPOSITION xpos = rcNumber.right - width - vs.marginNumberPadding; rcNumber.left = xpos; DrawTextNoClipPhase(surface, rcNumber, vs.styles[STYLE_LINENUMBER], rcNumber.top + vs.maxAscent, number, static_cast(strlen(number)), drawAll); } else if (vs.wrapVisualFlags & SC_WRAPVISUALFLAG_MARGIN) { PRectangle rcWrapMarker = rcMarker; rcWrapMarker.right -= wrapMarkerPaddingRight; rcWrapMarker.left = rcWrapMarker.right - vs.styles[STYLE_LINENUMBER].aveCharWidth; if (customDrawWrapMarker == NULL) { DrawWrapMarker(surface, rcWrapMarker, false, vs.styles[STYLE_LINENUMBER].fore); } else { customDrawWrapMarker(surface, rcWrapMarker, false, vs.styles[STYLE_LINENUMBER].fore); } } } else if (vs.ms[margin].style == SC_MARGIN_TEXT || vs.ms[margin].style == SC_MARGIN_RTEXT) { const StyledText stMargin = model.pdoc->MarginStyledText(lineDoc); if (stMargin.text && ValidStyledText(vs, vs.marginStyleOffset, stMargin)) { if (firstSubLine) { surface->FillRectangle(rcMarker, vs.styles[stMargin.StyleAt(0) + vs.marginStyleOffset].back); if (vs.ms[margin].style == SC_MARGIN_RTEXT) { int width = WidestLineWidth(surface, vs, vs.marginStyleOffset, stMargin); rcMarker.left = rcMarker.right - width - 3; } DrawStyledText(surface, vs, vs.marginStyleOffset, rcMarker, stMargin, 0, stMargin.length, drawAll); } else { // if we're displaying annotation lines, color the margin to match the associated document line const int annotationLines = model.pdoc->AnnotationLines(lineDoc); if (annotationLines && (visibleLine > lastVisibleLine - annotationLines)) { surface->FillRectangle(rcMarker, vs.styles[stMargin.StyleAt(0) + vs.marginStyleOffset].back); } } } } if (marks) { for (int markBit = 0; (markBit < 32) && marks; markBit++) { if (marks & 1) { LineMarker::typeOfFold tFold = LineMarker::undefined; if ((vs.ms[margin].mask & SC_MASK_FOLDERS) && highlightDelimiter.IsFoldBlockHighlighted(lineDoc)) { if (highlightDelimiter.IsBodyOfFoldBlock(lineDoc)) { tFold = LineMarker::body; } else if (highlightDelimiter.IsHeadOfFoldBlock(lineDoc)) { if (firstSubLine) { tFold = headWithTail ? LineMarker::headWithTail : LineMarker::head; } else { if (model.cs.GetExpanded(lineDoc) || headWithTail) { tFold = LineMarker::body; } else { tFold = LineMarker::undefined; } } } else if (highlightDelimiter.IsTailOfFoldBlock(lineDoc)) { tFold = LineMarker::tail; } } vs.markers[markBit].Draw(surface, rcMarker, fontLineNumber, tFold, vs.ms[margin].style); } marks >>= 1; } } visibleLine++; yposScreen += vs.lineHeight; } } } PRectangle rcBlankMargin = rcMargin; rcBlankMargin.left = rcSelMargin.right; surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back); } #ifdef SCI_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/qscintilla/src/MarginView.h000066400000000000000000000030521345112435200226070ustar00rootroot00000000000000// Scintilla source code edit control /** @file MarginView.h ** Defines the appearance of the editor margin. **/ // Copyright 1998-2014 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef MARGINVIEW_H #define MARGINVIEW_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); typedef void (*DrawWrapMarkerFn)(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); /** * MarginView draws the margins. */ class MarginView { public: Surface *pixmapSelMargin; Surface *pixmapSelPattern; Surface *pixmapSelPatternOffset1; // Highlight current folding block HighlightDelimiter highlightDelimiter; int wrapMarkerPaddingRight; // right-most pixel padding of wrap markers /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native * DrawWrapMarker function for drawing wrap markers. Allow those platforms to * override it instead of creating a new method in the Surface class that * existing platforms must implement as empty. */ DrawWrapMarkerFn customDrawWrapMarker; MarginView(); void DropGraphics(bool freeObjects); void AllocateGraphics(const ViewStyle &vsDraw); void RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw); void PaintMargin(Surface *surface, int topLine, PRectangle rc, PRectangle rcMargin, const EditModel &model, const ViewStyle &vs); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Partitioning.h000066400000000000000000000120031345112435200232020ustar00rootroot00000000000000// Scintilla source code edit control /** @file Partitioning.h ** Data structure used to partition an interval. Used for holding line start/end positions. **/ // Copyright 1998-2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef PARTITIONING_H #define PARTITIONING_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /// A split vector of integers with a method for adding a value to all elements /// in a range. /// Used by the Partitioning class. class SplitVectorWithRangeAdd : public SplitVector { public: explicit SplitVectorWithRangeAdd(int growSize_) { SetGrowSize(growSize_); ReAllocate(growSize_); } ~SplitVectorWithRangeAdd() { } void RangeAddDelta(int start, int end, int delta) { // end is 1 past end, so end-start is number of elements to change int i = 0; int rangeLength = end - start; int range1Length = rangeLength; int part1Left = part1Length - start; if (range1Length > part1Left) range1Length = part1Left; while (i < range1Length) { body[start++] += delta; i++; } start += gapLength; while (i < rangeLength) { body[start++] += delta; i++; } } }; /// Divide an interval into multiple partitions. /// Useful for breaking a document down into sections such as lines. /// A 0 length interval has a single 0 length partition, numbered 0 /// If interval not 0 length then each partition non-zero length /// When needed, positions after the interval are considered part of the last partition /// but the end of the last partition can be found with PositionFromPartition(last+1). class Partitioning { private: // To avoid calculating all the partition positions whenever any text is inserted // there may be a step somewhere in the list. int stepPartition; int stepLength; SplitVectorWithRangeAdd *body; // Move step forward void ApplyStep(int partitionUpTo) { if (stepLength != 0) { body->RangeAddDelta(stepPartition+1, partitionUpTo + 1, stepLength); } stepPartition = partitionUpTo; if (stepPartition >= body->Length()-1) { stepPartition = body->Length()-1; stepLength = 0; } } // Move step backward void BackStep(int partitionDownTo) { if (stepLength != 0) { body->RangeAddDelta(partitionDownTo+1, stepPartition+1, -stepLength); } stepPartition = partitionDownTo; } void Allocate(int growSize) { body = new SplitVectorWithRangeAdd(growSize); stepPartition = 0; stepLength = 0; body->Insert(0, 0); // This value stays 0 for ever body->Insert(1, 0); // This is the end of the first partition and will be the start of the second } public: explicit Partitioning(int growSize) { Allocate(growSize); } ~Partitioning() { delete body; body = 0; } int Partitions() const { return body->Length()-1; } void InsertPartition(int partition, int pos) { if (stepPartition < partition) { ApplyStep(partition); } body->Insert(partition, pos); stepPartition++; } void SetPartitionStartPosition(int partition, int pos) { ApplyStep(partition+1); if ((partition < 0) || (partition > body->Length())) { return; } body->SetValueAt(partition, pos); } void InsertText(int partitionInsert, int delta) { // Point all the partitions after the insertion point further along in the buffer if (stepLength != 0) { if (partitionInsert >= stepPartition) { // Fill in up to the new insertion point ApplyStep(partitionInsert); stepLength += delta; } else if (partitionInsert >= (stepPartition - body->Length() / 10)) { // Close to step but before so move step back BackStep(partitionInsert); stepLength += delta; } else { ApplyStep(body->Length()-1); stepPartition = partitionInsert; stepLength = delta; } } else { stepPartition = partitionInsert; stepLength = delta; } } void RemovePartition(int partition) { if (partition > stepPartition) { ApplyStep(partition); stepPartition--; } else { stepPartition--; } body->Delete(partition); } int PositionFromPartition(int partition) const { PLATFORM_ASSERT(partition >= 0); PLATFORM_ASSERT(partition < body->Length()); if ((partition < 0) || (partition >= body->Length())) { return 0; } int pos = body->ValueAt(partition); if (partition > stepPartition) pos += stepLength; return pos; } /// Return value in range [0 .. Partitions() - 1] even for arguments outside interval int PartitionFromPosition(int pos) const { if (body->Length() <= 1) return 0; if (pos >= (PositionFromPartition(body->Length()-1))) return body->Length() - 1 - 1; int lower = 0; int upper = body->Length()-1; do { int middle = (upper + lower + 1) / 2; // Round high int posMiddle = body->ValueAt(middle); if (middle > stepPartition) posMiddle += stepLength; if (pos < posMiddle) { upper = middle - 1; } else { lower = middle; } } while (lower < upper); return lower; } void DeleteAll() { int growSize = body->GetGrowSize(); delete body; Allocate(growSize); } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/PerLine.cpp000066400000000000000000000322331345112435200224330ustar00rootroot00000000000000// Scintilla source code edit control /** @file PerLine.cxx ** Manages data associated with each line of the document **/ // Copyright 1998-2009 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "CellBuffer.h" #include "PerLine.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif MarkerHandleSet::MarkerHandleSet() { root = 0; } MarkerHandleSet::~MarkerHandleSet() { MarkerHandleNumber *mhn = root; while (mhn) { MarkerHandleNumber *mhnToFree = mhn; mhn = mhn->next; delete mhnToFree; } root = 0; } int MarkerHandleSet::Length() const { int c = 0; MarkerHandleNumber *mhn = root; while (mhn) { c++; mhn = mhn->next; } return c; } int MarkerHandleSet::MarkValue() const { unsigned int m = 0; MarkerHandleNumber *mhn = root; while (mhn) { m |= (1 << mhn->number); mhn = mhn->next; } return m; } bool MarkerHandleSet::Contains(int handle) const { MarkerHandleNumber *mhn = root; while (mhn) { if (mhn->handle == handle) { return true; } mhn = mhn->next; } return false; } bool MarkerHandleSet::InsertHandle(int handle, int markerNum) { MarkerHandleNumber *mhn = new MarkerHandleNumber; mhn->handle = handle; mhn->number = markerNum; mhn->next = root; root = mhn; return true; } void MarkerHandleSet::RemoveHandle(int handle) { MarkerHandleNumber **pmhn = &root; while (*pmhn) { MarkerHandleNumber *mhn = *pmhn; if (mhn->handle == handle) { *pmhn = mhn->next; delete mhn; return; } pmhn = &((*pmhn)->next); } } bool MarkerHandleSet::RemoveNumber(int markerNum, bool all) { bool performedDeletion = false; MarkerHandleNumber **pmhn = &root; while (*pmhn) { MarkerHandleNumber *mhn = *pmhn; if (mhn->number == markerNum) { *pmhn = mhn->next; delete mhn; performedDeletion = true; if (!all) break; } else { pmhn = &((*pmhn)->next); } } return performedDeletion; } void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { MarkerHandleNumber **pmhn = &other->root; while (*pmhn) { pmhn = &((*pmhn)->next); } *pmhn = root; root = other->root; other->root = 0; } LineMarkers::~LineMarkers() { Init(); } void LineMarkers::Init() { for (int line = 0; line < markers.Length(); line++) { delete markers[line]; markers[line] = 0; } markers.DeleteAll(); } void LineMarkers::InsertLine(int line) { if (markers.Length()) { markers.Insert(line, 0); } } void LineMarkers::RemoveLine(int line) { // Retain the markers from the deleted line by oring them into the previous line if (markers.Length()) { if (line > 0) { MergeMarkers(line - 1); } markers.Delete(line); } } int LineMarkers::LineFromHandle(int markerHandle) { if (markers.Length()) { for (int line = 0; line < markers.Length(); line++) { if (markers[line]) { if (markers[line]->Contains(markerHandle)) { return line; } } } } return -1; } void LineMarkers::MergeMarkers(int pos) { if (markers[pos + 1] != NULL) { if (markers[pos] == NULL) markers[pos] = new MarkerHandleSet; markers[pos]->CombineWith(markers[pos + 1]); delete markers[pos + 1]; markers[pos + 1] = NULL; } } int LineMarkers::MarkValue(int line) { if (markers.Length() && (line >= 0) && (line < markers.Length()) && markers[line]) return markers[line]->MarkValue(); else return 0; } int LineMarkers::MarkerNext(int lineStart, int mask) const { if (lineStart < 0) lineStart = 0; int length = markers.Length(); for (int iLine = lineStart; iLine < length; iLine++) { MarkerHandleSet *onLine = markers[iLine]; if (onLine && ((onLine->MarkValue() & mask) != 0)) //if ((pdoc->GetMark(iLine) & lParam) != 0) return iLine; } return -1; } int LineMarkers::AddMark(int line, int markerNum, int lines) { handleCurrent++; if (!markers.Length()) { // No existing markers so allocate one element per line markers.InsertValue(0, lines, 0); } if (line >= markers.Length()) { return -1; } if (!markers[line]) { // Need new structure to hold marker handle markers[line] = new MarkerHandleSet(); } markers[line]->InsertHandle(handleCurrent, markerNum); return handleCurrent; } bool LineMarkers::DeleteMark(int line, int markerNum, bool all) { bool someChanges = false; if (markers.Length() && (line >= 0) && (line < markers.Length()) && markers[line]) { if (markerNum == -1) { someChanges = true; delete markers[line]; markers[line] = NULL; } else { someChanges = markers[line]->RemoveNumber(markerNum, all); if (markers[line]->Length() == 0) { delete markers[line]; markers[line] = NULL; } } } return someChanges; } void LineMarkers::DeleteMarkFromHandle(int markerHandle) { int line = LineFromHandle(markerHandle); if (line >= 0) { markers[line]->RemoveHandle(markerHandle); if (markers[line]->Length() == 0) { delete markers[line]; markers[line] = NULL; } } } LineLevels::~LineLevels() { } void LineLevels::Init() { levels.DeleteAll(); } void LineLevels::InsertLine(int line) { if (levels.Length()) { int level = (line < levels.Length()) ? levels[line] : SC_FOLDLEVELBASE; levels.InsertValue(line, 1, level); } } void LineLevels::RemoveLine(int line) { if (levels.Length()) { // Move up following lines but merge header flag from this line // to line before to avoid a temporary disappearence causing expansion. int firstHeader = levels[line] & SC_FOLDLEVELHEADERFLAG; levels.Delete(line); if (line == levels.Length()-1) // Last line loses the header flag levels[line-1] &= ~SC_FOLDLEVELHEADERFLAG; else if (line > 0) levels[line-1] |= firstHeader; } } void LineLevels::ExpandLevels(int sizeNew) { levels.InsertValue(levels.Length(), sizeNew - levels.Length(), SC_FOLDLEVELBASE); } void LineLevels::ClearLevels() { levels.DeleteAll(); } int LineLevels::SetLevel(int line, int level, int lines) { int prev = 0; if ((line >= 0) && (line < lines)) { if (!levels.Length()) { ExpandLevels(lines + 1); } prev = levels[line]; if (prev != level) { levels[line] = level; } } return prev; } int LineLevels::GetLevel(int line) const { if (levels.Length() && (line >= 0) && (line < levels.Length())) { return levels[line]; } else { return SC_FOLDLEVELBASE; } } LineState::~LineState() { } void LineState::Init() { lineStates.DeleteAll(); } void LineState::InsertLine(int line) { if (lineStates.Length()) { lineStates.EnsureLength(line); int val = (line < lineStates.Length()) ? lineStates[line] : 0; lineStates.Insert(line, val); } } void LineState::RemoveLine(int line) { if (lineStates.Length() > line) { lineStates.Delete(line); } } int LineState::SetLineState(int line, int state) { lineStates.EnsureLength(line + 1); int stateOld = lineStates[line]; lineStates[line] = state; return stateOld; } int LineState::GetLineState(int line) { if (line < 0) return 0; lineStates.EnsureLength(line + 1); return lineStates[line]; } int LineState::GetMaxLineState() const { return lineStates.Length(); } static int NumberLines(const char *text) { if (text) { int newLines = 0; while (*text) { if (*text == '\n') newLines++; text++; } return newLines+1; } else { return 0; } } // Each allocated LineAnnotation is a char array which starts with an AnnotationHeader // and then has text and optional styles. static const int IndividualStyles = 0x100; struct AnnotationHeader { short style; // Style IndividualStyles implies array of styles short lines; int length; }; LineAnnotation::~LineAnnotation() { ClearAll(); } void LineAnnotation::Init() { ClearAll(); } void LineAnnotation::InsertLine(int line) { if (annotations.Length()) { annotations.EnsureLength(line); annotations.Insert(line, 0); } } void LineAnnotation::RemoveLine(int line) { if (annotations.Length() && (line > 0) && (line <= annotations.Length())) { delete []annotations[line-1]; annotations.Delete(line-1); } } bool LineAnnotation::MultipleStyles(int line) const { if (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line]) return reinterpret_cast(annotations[line])->style == IndividualStyles; else return 0; } int LineAnnotation::Style(int line) const { if (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line]) return reinterpret_cast(annotations[line])->style; else return 0; } const char *LineAnnotation::Text(int line) const { if (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line]) return annotations[line]+sizeof(AnnotationHeader); else return 0; } const unsigned char *LineAnnotation::Styles(int line) const { if (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line] && MultipleStyles(line)) return reinterpret_cast(annotations[line] + sizeof(AnnotationHeader) + Length(line)); else return 0; } static char *AllocateAnnotation(int length, int style) { size_t len = sizeof(AnnotationHeader) + length + ((style == IndividualStyles) ? length : 0); char *ret = new char[len](); return ret; } void LineAnnotation::SetText(int line, const char *text) { if (text && (line >= 0)) { annotations.EnsureLength(line+1); int style = Style(line); if (annotations[line]) { delete []annotations[line]; } annotations[line] = AllocateAnnotation(static_cast(strlen(text)), style); AnnotationHeader *pah = reinterpret_cast(annotations[line]); pah->style = static_cast(style); pah->length = static_cast(strlen(text)); pah->lines = static_cast(NumberLines(text)); memcpy(annotations[line]+sizeof(AnnotationHeader), text, pah->length); } else { if (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line]) { delete []annotations[line]; annotations[line] = 0; } } } void LineAnnotation::ClearAll() { for (int line = 0; line < annotations.Length(); line++) { delete []annotations[line]; annotations[line] = 0; } annotations.DeleteAll(); } void LineAnnotation::SetStyle(int line, int style) { annotations.EnsureLength(line+1); if (!annotations[line]) { annotations[line] = AllocateAnnotation(0, style); } reinterpret_cast(annotations[line])->style = static_cast(style); } void LineAnnotation::SetStyles(int line, const unsigned char *styles) { if (line >= 0) { annotations.EnsureLength(line+1); if (!annotations[line]) { annotations[line] = AllocateAnnotation(0, IndividualStyles); } else { AnnotationHeader *pahSource = reinterpret_cast(annotations[line]); if (pahSource->style != IndividualStyles) { char *allocation = AllocateAnnotation(pahSource->length, IndividualStyles); AnnotationHeader *pahAlloc = reinterpret_cast(allocation); pahAlloc->length = pahSource->length; pahAlloc->lines = pahSource->lines; memcpy(allocation + sizeof(AnnotationHeader), annotations[line] + sizeof(AnnotationHeader), pahSource->length); delete []annotations[line]; annotations[line] = allocation; } } AnnotationHeader *pah = reinterpret_cast(annotations[line]); pah->style = IndividualStyles; memcpy(annotations[line] + sizeof(AnnotationHeader) + pah->length, styles, pah->length); } } int LineAnnotation::Length(int line) const { if (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line]) return reinterpret_cast(annotations[line])->length; else return 0; } int LineAnnotation::Lines(int line) const { if (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line]) return reinterpret_cast(annotations[line])->lines; else return 0; } LineTabstops::~LineTabstops() { Init(); } void LineTabstops::Init() { for (int line = 0; line < tabstops.Length(); line++) { delete tabstops[line]; } tabstops.DeleteAll(); } void LineTabstops::InsertLine(int line) { if (tabstops.Length()) { tabstops.EnsureLength(line); tabstops.Insert(line, 0); } } void LineTabstops::RemoveLine(int line) { if (tabstops.Length() > line) { delete tabstops[line]; tabstops.Delete(line); } } bool LineTabstops::ClearTabstops(int line) { if (line < tabstops.Length()) { TabstopList *tl = tabstops[line]; if (tl) { tl->clear(); return true; } } return false; } bool LineTabstops::AddTabstop(int line, int x) { tabstops.EnsureLength(line + 1); if (!tabstops[line]) { tabstops[line] = new TabstopList(); } TabstopList *tl = tabstops[line]; if (tl) { // tabstop positions are kept in order - insert in the right place std::vector::iterator it = std::lower_bound(tl->begin(), tl->end(), x); // don't insert duplicates if (it == tl->end() || *it != x) { tl->insert(it, x); return true; } } return false; } int LineTabstops::GetNextTabstop(int line, int x) const { if (line < tabstops.Length()) { TabstopList *tl = tabstops[line]; if (tl) { for (size_t i = 0; i < tl->size(); i++) { if ((*tl)[i] > x) { return (*tl)[i]; } } } } return 0; } sqlitebrowser-3.11.2/libs/qscintilla/src/PerLine.h000066400000000000000000000064131345112435200221010ustar00rootroot00000000000000// Scintilla source code edit control /** @file PerLine.h ** Manages data associated with each line of the document **/ // Copyright 1998-2009 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef PERLINE_H #define PERLINE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /** * This holds the marker identifier and the marker type to display. * MarkerHandleNumbers are members of lists. */ struct MarkerHandleNumber { int handle; int number; MarkerHandleNumber *next; }; /** * A marker handle set contains any number of MarkerHandleNumbers. */ class MarkerHandleSet { MarkerHandleNumber *root; public: MarkerHandleSet(); ~MarkerHandleSet(); int Length() const; int MarkValue() const; ///< Bit set of marker numbers. bool Contains(int handle) const; bool InsertHandle(int handle, int markerNum); void RemoveHandle(int handle); bool RemoveNumber(int markerNum, bool all); void CombineWith(MarkerHandleSet *other); }; class LineMarkers : public PerLine { SplitVector markers; /// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big. int handleCurrent; public: LineMarkers() : handleCurrent(0) { } virtual ~LineMarkers(); virtual void Init(); virtual void InsertLine(int line); virtual void RemoveLine(int line); int MarkValue(int line); int MarkerNext(int lineStart, int mask) const; int AddMark(int line, int marker, int lines); void MergeMarkers(int pos); bool DeleteMark(int line, int markerNum, bool all); void DeleteMarkFromHandle(int markerHandle); int LineFromHandle(int markerHandle); }; class LineLevels : public PerLine { SplitVector levels; public: virtual ~LineLevels(); virtual void Init(); virtual void InsertLine(int line); virtual void RemoveLine(int line); void ExpandLevels(int sizeNew=-1); void ClearLevels(); int SetLevel(int line, int level, int lines); int GetLevel(int line) const; }; class LineState : public PerLine { SplitVector lineStates; public: LineState() { } virtual ~LineState(); virtual void Init(); virtual void InsertLine(int line); virtual void RemoveLine(int line); int SetLineState(int line, int state); int GetLineState(int line); int GetMaxLineState() const; }; class LineAnnotation : public PerLine { SplitVector annotations; public: LineAnnotation() { } virtual ~LineAnnotation(); virtual void Init(); virtual void InsertLine(int line); virtual void RemoveLine(int line); bool MultipleStyles(int line) const; int Style(int line) const; const char *Text(int line) const; const unsigned char *Styles(int line) const; void SetText(int line, const char *text); void ClearAll(); void SetStyle(int line, int style); void SetStyles(int line, const unsigned char *styles); int Length(int line) const; int Lines(int line) const; }; typedef std::vector TabstopList; class LineTabstops : public PerLine { SplitVector tabstops; public: LineTabstops() { } virtual ~LineTabstops(); virtual void Init(); virtual void InsertLine(int line); virtual void RemoveLine(int line); bool ClearTabstops(int line); bool AddTabstop(int line, int x); int GetNextTabstop(int line, int x) const; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Position.h000066400000000000000000000014311345112435200223420ustar00rootroot00000000000000// Scintilla source code edit control /** @file Position.h ** Defines global type name Position in the Sci internal namespace. **/ // Copyright 2015 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef POSITION_H #define POSITION_H /** * A Position is a position within a document between two characters or at the beginning or end. * Sometimes used as a character index where it identifies the character after the position. */ namespace Sci { typedef int Position; // A later version (4.x) of this file may: //#if defined(SCI_LARGE_FILE_SUPPORT) //typedef std::ptrdiff_t Position; // or may allow runtime choice between different position sizes. const Position invalidPosition = -1; } #endif sqlitebrowser-3.11.2/libs/qscintilla/src/PositionCache.cpp000066400000000000000000000462631345112435200236350ustar00rootroot00000000000000// Scintilla source code edit control /** @file PositionCache.cxx ** Classes for caching layout information. **/ // Copyright 1998-2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #include "Platform.h" #include "ILexer.h" #include "Scintilla.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "ContractionState.h" #include "CellBuffer.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #include "CharClassify.h" #include "Decoration.h" #include "CaseFolder.h" #include "Document.h" #include "UniConversion.h" #include "Selection.h" #include "PositionCache.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif LineLayout::LineLayout(int maxLineLength_) : lineStarts(0), lenLineStarts(0), lineNumber(-1), inCache(false), maxLineLength(-1), numCharsInLine(0), numCharsBeforeEOL(0), validity(llInvalid), xHighlightGuide(0), highlightColumn(0), containsCaret(false), edgeColumn(0), chars(0), styles(0), positions(0), hotspot(0,0), widthLine(wrapWidthInfinite), lines(1), wrapIndent(0) { bracePreviousStyles[0] = 0; bracePreviousStyles[1] = 0; Resize(maxLineLength_); } LineLayout::~LineLayout() { Free(); } void LineLayout::Resize(int maxLineLength_) { if (maxLineLength_ > maxLineLength) { Free(); chars = new char[maxLineLength_ + 1]; styles = new unsigned char[maxLineLength_ + 1]; // Extra position allocated as sometimes the Windows // GetTextExtentExPoint API writes an extra element. positions = new XYPOSITION[maxLineLength_ + 1 + 1]; maxLineLength = maxLineLength_; } } void LineLayout::Free() { delete []chars; chars = 0; delete []styles; styles = 0; delete []positions; positions = 0; delete []lineStarts; lineStarts = 0; } void LineLayout::Invalidate(validLevel validity_) { if (validity > validity_) validity = validity_; } int LineLayout::LineStart(int line) const { if (line <= 0) { return 0; } else if ((line >= lines) || !lineStarts) { return numCharsInLine; } else { return lineStarts[line]; } } int LineLayout::LineLastVisible(int line) const { if (line < 0) { return 0; } else if ((line >= lines-1) || !lineStarts) { return numCharsBeforeEOL; } else { return lineStarts[line+1]; } } Range LineLayout::SubLineRange(int subLine) const { return Range(LineStart(subLine), LineLastVisible(subLine)); } bool LineLayout::InLine(int offset, int line) const { return ((offset >= LineStart(line)) && (offset < LineStart(line + 1))) || ((offset == numCharsInLine) && (line == (lines-1))); } void LineLayout::SetLineStart(int line, int start) { if ((line >= lenLineStarts) && (line != 0)) { int newMaxLines = line + 20; int *newLineStarts = new int[newMaxLines]; for (int i = 0; i < newMaxLines; i++) { if (i < lenLineStarts) newLineStarts[i] = lineStarts[i]; else newLineStarts[i] = 0; } delete []lineStarts; lineStarts = newLineStarts; lenLineStarts = newMaxLines; } lineStarts[line] = start; } void LineLayout::SetBracesHighlight(Range rangeLine, const Position braces[], char bracesMatchStyle, int xHighlight, bool ignoreStyle) { if (!ignoreStyle && rangeLine.ContainsCharacter(braces[0])) { int braceOffset = braces[0] - rangeLine.start; if (braceOffset < numCharsInLine) { bracePreviousStyles[0] = styles[braceOffset]; styles[braceOffset] = bracesMatchStyle; } } if (!ignoreStyle && rangeLine.ContainsCharacter(braces[1])) { int braceOffset = braces[1] - rangeLine.start; if (braceOffset < numCharsInLine) { bracePreviousStyles[1] = styles[braceOffset]; styles[braceOffset] = bracesMatchStyle; } } if ((braces[0] >= rangeLine.start && braces[1] <= rangeLine.end) || (braces[1] >= rangeLine.start && braces[0] <= rangeLine.end)) { xHighlightGuide = xHighlight; } } void LineLayout::RestoreBracesHighlight(Range rangeLine, const Position braces[], bool ignoreStyle) { if (!ignoreStyle && rangeLine.ContainsCharacter(braces[0])) { int braceOffset = braces[0] - rangeLine.start; if (braceOffset < numCharsInLine) { styles[braceOffset] = bracePreviousStyles[0]; } } if (!ignoreStyle && rangeLine.ContainsCharacter(braces[1])) { int braceOffset = braces[1] - rangeLine.start; if (braceOffset < numCharsInLine) { styles[braceOffset] = bracePreviousStyles[1]; } } xHighlightGuide = 0; } int LineLayout::FindBefore(XYPOSITION x, int lower, int upper) const { do { int middle = (upper + lower + 1) / 2; // Round high XYPOSITION posMiddle = positions[middle]; if (x < posMiddle) { upper = middle - 1; } else { lower = middle; } } while (lower < upper); return lower; } int LineLayout::FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const { int pos = FindBefore(x, range.start, range.end); while (pos < range.end) { if (charPosition) { if (x < (positions[pos + 1])) { return pos; } } else { if (x < ((positions[pos] + positions[pos + 1]) / 2)) { return pos; } } pos++; } return range.end; } Point LineLayout::PointFromPosition(int posInLine, int lineHeight, PointEnd pe) const { Point pt; // In case of very long line put x at arbitrary large position if (posInLine > maxLineLength) { pt.x = positions[maxLineLength] - positions[LineStart(lines)]; } for (int subLine = 0; subLine < lines; subLine++) { const Range rangeSubLine = SubLineRange(subLine); if (posInLine >= rangeSubLine.start) { pt.y = static_cast(subLine*lineHeight); if (posInLine <= rangeSubLine.end) { pt.x = positions[posInLine] - positions[rangeSubLine.start]; if (rangeSubLine.start != 0) // Wrapped lines may be indented pt.x += wrapIndent; if (pe & peSubLineEnd) // Return end of first subline not start of next break; } else if ((pe & peLineEnd) && (subLine == (lines-1))) { pt.x = positions[numCharsInLine] - positions[rangeSubLine.start]; if (rangeSubLine.start != 0) // Wrapped lines may be indented pt.x += wrapIndent; } } else { break; } } return pt; } int LineLayout::EndLineStyle() const { return styles[numCharsBeforeEOL > 0 ? numCharsBeforeEOL-1 : 0]; } LineLayoutCache::LineLayoutCache() : level(0), allInvalidated(false), styleClock(-1), useCount(0) { Allocate(0); } LineLayoutCache::~LineLayoutCache() { Deallocate(); } void LineLayoutCache::Allocate(size_t length_) { PLATFORM_ASSERT(cache.empty()); allInvalidated = false; cache.resize(length_); } void LineLayoutCache::AllocateForLevel(int linesOnScreen, int linesInDoc) { PLATFORM_ASSERT(useCount == 0); size_t lengthForLevel = 0; if (level == llcCaret) { lengthForLevel = 1; } else if (level == llcPage) { lengthForLevel = linesOnScreen + 1; } else if (level == llcDocument) { lengthForLevel = linesInDoc; } if (lengthForLevel > cache.size()) { Deallocate(); Allocate(lengthForLevel); } else { if (lengthForLevel < cache.size()) { for (size_t i = lengthForLevel; i < cache.size(); i++) { delete cache[i]; cache[i] = 0; } } cache.resize(lengthForLevel); } PLATFORM_ASSERT(cache.size() == lengthForLevel); } void LineLayoutCache::Deallocate() { PLATFORM_ASSERT(useCount == 0); for (size_t i = 0; i < cache.size(); i++) delete cache[i]; cache.clear(); } void LineLayoutCache::Invalidate(LineLayout::validLevel validity_) { if (!cache.empty() && !allInvalidated) { for (size_t i = 0; i < cache.size(); i++) { if (cache[i]) { cache[i]->Invalidate(validity_); } } if (validity_ == LineLayout::llInvalid) { allInvalidated = true; } } } void LineLayoutCache::SetLevel(int level_) { allInvalidated = false; if ((level_ != -1) && (level != level_)) { level = level_; Deallocate(); } } LineLayout *LineLayoutCache::Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_, int linesOnScreen, int linesInDoc) { AllocateForLevel(linesOnScreen, linesInDoc); if (styleClock != styleClock_) { Invalidate(LineLayout::llCheckTextAndStyle); styleClock = styleClock_; } allInvalidated = false; int pos = -1; LineLayout *ret = 0; if (level == llcCaret) { pos = 0; } else if (level == llcPage) { if (lineNumber == lineCaret) { pos = 0; } else if (cache.size() > 1) { pos = 1 + (lineNumber % (cache.size() - 1)); } } else if (level == llcDocument) { pos = lineNumber; } if (pos >= 0) { PLATFORM_ASSERT(useCount == 0); if (!cache.empty() && (pos < static_cast(cache.size()))) { if (cache[pos]) { if ((cache[pos]->lineNumber != lineNumber) || (cache[pos]->maxLineLength < maxChars)) { delete cache[pos]; cache[pos] = 0; } } if (!cache[pos]) { cache[pos] = new LineLayout(maxChars); } cache[pos]->lineNumber = lineNumber; cache[pos]->inCache = true; ret = cache[pos]; useCount++; } } if (!ret) { ret = new LineLayout(maxChars); ret->lineNumber = lineNumber; } return ret; } void LineLayoutCache::Dispose(LineLayout *ll) { allInvalidated = false; if (ll) { if (!ll->inCache) { delete ll; } else { useCount--; } } } // Simply pack the (maximum 4) character bytes into an int static inline int KeyFromString(const char *charBytes, size_t len) { PLATFORM_ASSERT(len <= 4); int k=0; for (size_t i=0; i(charBytes[i]); } return k; } SpecialRepresentations::SpecialRepresentations() { std::fill(startByteHasReprs, startByteHasReprs+0x100, 0); } void SpecialRepresentations::SetRepresentation(const char *charBytes, const char *value) { MapRepresentation::iterator it = mapReprs.find(KeyFromString(charBytes, UTF8MaxBytes)); if (it == mapReprs.end()) { // New entry so increment for first byte startByteHasReprs[static_cast(charBytes[0])]++; } mapReprs[KeyFromString(charBytes, UTF8MaxBytes)] = Representation(value); } void SpecialRepresentations::ClearRepresentation(const char *charBytes) { MapRepresentation::iterator it = mapReprs.find(KeyFromString(charBytes, UTF8MaxBytes)); if (it != mapReprs.end()) { mapReprs.erase(it); startByteHasReprs[static_cast(charBytes[0])]--; } } const Representation *SpecialRepresentations::RepresentationFromCharacter(const char *charBytes, size_t len) const { PLATFORM_ASSERT(len <= 4); if (!startByteHasReprs[static_cast(charBytes[0])]) return 0; MapRepresentation::const_iterator it = mapReprs.find(KeyFromString(charBytes, len)); if (it != mapReprs.end()) { return &(it->second); } return 0; } bool SpecialRepresentations::Contains(const char *charBytes, size_t len) const { PLATFORM_ASSERT(len <= 4); if (!startByteHasReprs[static_cast(charBytes[0])]) return false; MapRepresentation::const_iterator it = mapReprs.find(KeyFromString(charBytes, len)); return it != mapReprs.end(); } void SpecialRepresentations::Clear() { mapReprs.clear(); std::fill(startByteHasReprs, startByteHasReprs+0x100, 0); } void BreakFinder::Insert(int val) { if (val > nextBreak) { const std::vector::iterator it = std::lower_bound(selAndEdge.begin(), selAndEdge.end(), val); if (it == selAndEdge.end()) { selAndEdge.push_back(val); } else if (*it != val) { selAndEdge.insert(it, 1, val); } } } BreakFinder::BreakFinder(const LineLayout *ll_, const Selection *psel, Range lineRange_, int posLineStart_, int xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw) : ll(ll_), lineRange(lineRange_), posLineStart(posLineStart_), nextBreak(lineRange_.start), saeCurrentPos(0), saeNext(0), subBreak(-1), pdoc(pdoc_), encodingFamily(pdoc_->CodePageFamily()), preprs(preprs_) { // Search for first visible break // First find the first visible character if (xStart > 0.0f) nextBreak = ll->FindBefore(static_cast(xStart), lineRange.start, lineRange.end); // Now back to a style break while ((nextBreak > lineRange.start) && (ll->styles[nextBreak] == ll->styles[nextBreak - 1])) { nextBreak--; } if (breakForSelection) { SelectionPosition posStart(posLineStart); SelectionPosition posEnd(posLineStart + lineRange.end); SelectionSegment segmentLine(posStart, posEnd); for (size_t r=0; rCount(); r++) { SelectionSegment portion = psel->Range(r).Intersect(segmentLine); if (!(portion.start == portion.end)) { if (portion.start.IsValid()) Insert(portion.start.Position() - posLineStart); if (portion.end.IsValid()) Insert(portion.end.Position() - posLineStart); } } } if (pvsDraw && pvsDraw->indicatorsSetFore > 0) { for (Decoration *deco = pdoc->decorations.root; deco; deco = deco->next) { if (pvsDraw->indicators[deco->indicator].OverridesTextFore()) { int startPos = deco->rs.EndRun(posLineStart); while (startPos < (posLineStart + lineRange.end)) { Insert(startPos - posLineStart); startPos = deco->rs.EndRun(startPos); } } } } Insert(ll->edgeColumn); Insert(lineRange.end); saeNext = (!selAndEdge.empty()) ? selAndEdge[0] : -1; } BreakFinder::~BreakFinder() { } TextSegment BreakFinder::Next() { if (subBreak == -1) { int prev = nextBreak; while (nextBreak < lineRange.end) { int charWidth = 1; if (encodingFamily == efUnicode) charWidth = UTF8DrawBytes(reinterpret_cast(ll->chars) + nextBreak, lineRange.end - nextBreak); else if (encodingFamily == efDBCS) charWidth = pdoc->IsDBCSLeadByte(ll->chars[nextBreak]) ? 2 : 1; const Representation *repr = preprs->RepresentationFromCharacter(ll->chars + nextBreak, charWidth); if (((nextBreak > 0) && (ll->styles[nextBreak] != ll->styles[nextBreak - 1])) || repr || (nextBreak == saeNext)) { while ((nextBreak >= saeNext) && (saeNext < lineRange.end)) { saeCurrentPos++; saeNext = (saeCurrentPos < selAndEdge.size()) ? selAndEdge[saeCurrentPos] : lineRange.end; } if ((nextBreak > prev) || repr) { // Have a segment to report if (nextBreak == prev) { nextBreak += charWidth; } else { repr = 0; // Optimize -> should remember repr } if ((nextBreak - prev) < lengthStartSubdivision) { return TextSegment(prev, nextBreak - prev, repr); } else { break; } } } nextBreak += charWidth; } if ((nextBreak - prev) < lengthStartSubdivision) { return TextSegment(prev, nextBreak - prev); } subBreak = prev; } // Splitting up a long run from prev to nextBreak in lots of approximately lengthEachSubdivision. // For very long runs add extra breaks after spaces or if no spaces before low punctuation. int startSegment = subBreak; if ((nextBreak - subBreak) <= lengthEachSubdivision) { subBreak = -1; return TextSegment(startSegment, nextBreak - startSegment); } else { subBreak += pdoc->SafeSegment(ll->chars + subBreak, nextBreak-subBreak, lengthEachSubdivision); if (subBreak >= nextBreak) { subBreak = -1; return TextSegment(startSegment, nextBreak - startSegment); } else { return TextSegment(startSegment, subBreak - startSegment); } } } bool BreakFinder::More() const { return (subBreak >= 0) || (nextBreak < lineRange.end); } PositionCacheEntry::PositionCacheEntry() : styleNumber(0), len(0), clock(0), positions(0) { } void PositionCacheEntry::Set(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_, unsigned int clock_) { Clear(); styleNumber = styleNumber_; len = len_; clock = clock_; if (s_ && positions_) { positions = new XYPOSITION[len + (len / 4) + 1]; for (unsigned int i=0; i(reinterpret_cast(positions + len)), s_, len); } } PositionCacheEntry::~PositionCacheEntry() { Clear(); } void PositionCacheEntry::Clear() { delete []positions; positions = 0; styleNumber = 0; len = 0; clock = 0; } bool PositionCacheEntry::Retrieve(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_) const { if ((styleNumber == styleNumber_) && (len == len_) && (memcmp(reinterpret_cast(reinterpret_cast(positions + len)), s_, len)== 0)) { for (unsigned int i=0; i other.clock; } void PositionCacheEntry::ResetClock() { if (clock > 0) { clock = 1; } } PositionCache::PositionCache() { clock = 1; pces.resize(0x400); allClear = true; } PositionCache::~PositionCache() { Clear(); } void PositionCache::Clear() { if (!allClear) { for (size_t i=0; i BreakFinder::lengthStartSubdivision) { // Break up into segments unsigned int startSegment = 0; XYPOSITION xStartSegment = 0; while (startSegment < len) { unsigned int lenSegment = pdoc->SafeSegment(s + startSegment, len - startSegment, BreakFinder::lengthEachSubdivision); FontAlias fontStyle = vstyle.styles[styleNumber].font; surface->MeasureWidths(fontStyle, s + startSegment, lenSegment, positions + startSegment); for (unsigned int inSeg = 0; inSeg < lenSegment; inSeg++) { positions[startSegment + inSeg] += xStartSegment; } xStartSegment = positions[startSegment + lenSegment - 1]; startSegment += lenSegment; } } else { FontAlias fontStyle = vstyle.styles[styleNumber].font; surface->MeasureWidths(fontStyle, s, len, positions); } if (probe < pces.size()) { // Store into cache clock++; if (clock > 60000) { // Since there are only 16 bits for the clock, wrap it round and // reset all cache entries so none get stuck with a high clock. for (size_t i=0; i // The License.txt file describes the conditions under which this software may be distributed. #ifndef POSITIONCACHE_H #define POSITIONCACHE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif static inline bool IsEOLChar(char ch) { return (ch == '\r') || (ch == '\n'); } /** * A point in document space. * Uses double for sufficient resolution in large (>20,000,000 line) documents. */ class PointDocument { public: double x; double y; explicit PointDocument(double x_ = 0, double y_ = 0) : x(x_), y(y_) { } // Conversion from Point. explicit PointDocument(Point pt) : x(pt.x), y(pt.y) { } }; // There are two points for some positions and this enumeration // can choose between the end of the first line or subline // and the start of the next line or subline. enum PointEnd { peDefault = 0x0, peLineEnd = 0x1, peSubLineEnd = 0x2 }; /** */ class LineLayout { private: friend class LineLayoutCache; int *lineStarts; int lenLineStarts; /// Drawing is only performed for @a maxLineLength characters on each line. int lineNumber; bool inCache; public: enum { wrapWidthInfinite = 0x7ffffff }; int maxLineLength; int numCharsInLine; int numCharsBeforeEOL; enum validLevel { llInvalid, llCheckTextAndStyle, llPositions, llLines } validity; int xHighlightGuide; bool highlightColumn; bool containsCaret; int edgeColumn; char *chars; unsigned char *styles; XYPOSITION *positions; char bracePreviousStyles[2]; // Hotspot support Range hotspot; // Wrapped line support int widthLine; int lines; XYPOSITION wrapIndent; // In pixels explicit LineLayout(int maxLineLength_); virtual ~LineLayout(); void Resize(int maxLineLength_); void Free(); void Invalidate(validLevel validity_); int LineStart(int line) const; int LineLastVisible(int line) const; Range SubLineRange(int line) const; bool InLine(int offset, int line) const; void SetLineStart(int line, int start); void SetBracesHighlight(Range rangeLine, const Position braces[], char bracesMatchStyle, int xHighlight, bool ignoreStyle); void RestoreBracesHighlight(Range rangeLine, const Position braces[], bool ignoreStyle); int FindBefore(XYPOSITION x, int lower, int upper) const; int FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const; Point PointFromPosition(int posInLine, int lineHeight, PointEnd pe) const; int EndLineStyle() const; }; /** */ class LineLayoutCache { int level; std::vectorcache; bool allInvalidated; int styleClock; int useCount; void Allocate(size_t length_); void AllocateForLevel(int linesOnScreen, int linesInDoc); public: LineLayoutCache(); virtual ~LineLayoutCache(); void Deallocate(); enum { llcNone=SC_CACHE_NONE, llcCaret=SC_CACHE_CARET, llcPage=SC_CACHE_PAGE, llcDocument=SC_CACHE_DOCUMENT }; void Invalidate(LineLayout::validLevel validity_); void SetLevel(int level_); int GetLevel() const { return level; } LineLayout *Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_, int linesOnScreen, int linesInDoc); void Dispose(LineLayout *ll); }; class PositionCacheEntry { unsigned int styleNumber:8; unsigned int len:8; unsigned int clock:16; XYPOSITION *positions; public: PositionCacheEntry(); ~PositionCacheEntry(); void Set(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_, unsigned int clock_); void Clear(); bool Retrieve(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_) const; static unsigned int Hash(unsigned int styleNumber_, const char *s, unsigned int len); bool NewerThan(const PositionCacheEntry &other) const; void ResetClock(); }; class Representation { public: std::string stringRep; explicit Representation(const char *value="") : stringRep(value) { } }; typedef std::map MapRepresentation; class SpecialRepresentations { MapRepresentation mapReprs; short startByteHasReprs[0x100]; public: SpecialRepresentations(); void SetRepresentation(const char *charBytes, const char *value); void ClearRepresentation(const char *charBytes); const Representation *RepresentationFromCharacter(const char *charBytes, size_t len) const; bool Contains(const char *charBytes, size_t len) const; void Clear(); }; struct TextSegment { int start; int length; const Representation *representation; TextSegment(int start_=0, int length_=0, const Representation *representation_=0) : start(start_), length(length_), representation(representation_) { } int end() const { return start + length; } }; // Class to break a line of text into shorter runs at sensible places. class BreakFinder { const LineLayout *ll; Range lineRange; int posLineStart; int nextBreak; std::vector selAndEdge; unsigned int saeCurrentPos; int saeNext; int subBreak; const Document *pdoc; EncodingFamily encodingFamily; const SpecialRepresentations *preprs; void Insert(int val); // Private so BreakFinder objects can not be copied BreakFinder(const BreakFinder &); public: // If a whole run is longer than lengthStartSubdivision then subdivide // into smaller runs at spaces or punctuation. enum { lengthStartSubdivision = 300 }; // Try to make each subdivided run lengthEachSubdivision or shorter. enum { lengthEachSubdivision = 100 }; BreakFinder(const LineLayout *ll_, const Selection *psel, Range rangeLine_, int posLineStart_, int xStart, bool breakForSelection, const Document *pdoc_, const SpecialRepresentations *preprs_, const ViewStyle *pvsDraw); ~BreakFinder(); TextSegment Next(); bool More() const; }; class PositionCache { std::vector pces; unsigned int clock; bool allClear; // Private so PositionCache objects can not be copied PositionCache(const PositionCache &); public: PositionCache(); ~PositionCache(); void Clear(); void SetSize(size_t size_); size_t GetSize() const { return pces.size(); } void MeasureWidths(Surface *surface, const ViewStyle &vstyle, unsigned int styleNumber, const char *s, unsigned int len, XYPOSITION *positions, Document *pdoc); }; inline bool IsSpaceOrTab(int ch) { return ch == ' ' || ch == '\t'; } #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/RESearch.cpp000066400000000000000000000635041345112435200225360ustar00rootroot00000000000000// Scintilla source code edit control /** @file RESearch.cxx ** Regular expression search library. **/ /* * regex - Regular expression pattern matching and replacement * * By: Ozan S. Yigit (oz) * Dept. of Computer Science * York University * * Original code available from http://www.cs.yorku.ca/~oz/ * Translation to C++ by Neil Hodgson neilh@scintilla.org * Removed all use of register. * Converted to modern function prototypes. * Put all global/static variables into an object so this code can be * used from multiple threads, etc. * Some extensions by Philippe Lhoste PhiLho(a)GMX.net * '?' extensions by Michael Mullin masmullin@gmail.com * * These routines are the PUBLIC DOMAIN equivalents of regex * routines as found in 4.nBSD UN*X, with minor extensions. * * These routines are derived from various implementations found * in software tools books, and Conroy's grep. They are NOT derived * from licensed/restricted software. * For more interesting/academic/complicated implementations, * see Henry Spencer's regexp routines, or GNU Emacs pattern * matching module. * * Modification history removed. * * Interfaces: * RESearch::Compile: compile a regular expression into a NFA. * * const char *RESearch::Compile(const char *pattern, int length, * bool caseSensitive, bool posix) * * Returns a short error string if they fail. * * RESearch::Execute: execute the NFA to match a pattern. * * int RESearch::Execute(characterIndexer &ci, int lp, int endp) * * re_fail: failure routine for RESearch::Execute. (no longer used) * * void re_fail(char *msg, char op) * * Regular Expressions: * * [1] char matches itself, unless it is a special * character (metachar): . \ [ ] * + ? ^ $ * and ( ) if posix option. * * [2] . matches any character. * * [3] \ matches the character following it, except: * - \a, \b, \f, \n, \r, \t, \v match the corresponding C * escape char, respectively BEL, BS, FF, LF, CR, TAB and VT; * Note that \r and \n are never matched because Scintilla * regex searches are made line per line * (stripped of end-of-line chars). * - if not in posix mode, when followed by a * left or right round bracket (see [8]); * - when followed by a digit 1 to 9 (see [9]); * - when followed by a left or right angle bracket * (see [10]); * - when followed by d, D, s, S, w or W (see [11]); * - when followed by x and two hexa digits (see [12]. * Backslash is used as an escape character for all * other meta-characters, and itself. * * [4] [set] matches one of the characters in the set. * If the first character in the set is "^", * it matches the characters NOT in the set, i.e. * complements the set. A shorthand S-E (start dash end) * is used to specify a set of characters S up to * E, inclusive. S and E must be characters, otherwise * the dash is taken literally (eg. in expression [\d-a]). * The special characters "]" and "-" have no special * meaning if they appear as the first chars in the set. * To include both, put - first: [-]A-Z] * (or just backslash them). * examples: match: * * [-]|] matches these 3 chars, * * []-|] matches from ] to | chars * * [a-z] any lowercase alpha * * [^-]] any char except - and ] * * [^A-Z] any char except uppercase * alpha * * [a-zA-Z] any alpha * * [5] * any regular expression form [1] to [4] * (except [8], [9] and [10] forms of [3]), * followed by closure char (*) * matches zero or more matches of that form. * * [6] + same as [5], except it matches one or more. * * [5-6] Both [5] and [6] are greedy (they match as much as possible). * Unless they are followed by the 'lazy' quantifier (?) * In which case both [5] and [6] try to match as little as possible * * [7] ? same as [5] except it matches zero or one. * * [8] a regular expression in the form [1] to [13], enclosed * as \(form\) (or (form) with posix flag) matches what * form matches. The enclosure creates a set of tags, * used for [9] and for pattern substitution. * The tagged forms are numbered starting from 1. * * [9] a \ followed by a digit 1 to 9 matches whatever a * previously tagged regular expression ([8]) matched. * * [10] \< a regular expression starting with a \< construct * \> and/or ending with a \> construct, restricts the * pattern matching to the beginning of a word, and/or * the end of a word. A word is defined to be a character * string beginning and/or ending with the characters * A-Z a-z 0-9 and _. Scintilla extends this definition * by user setting. The word must also be preceded and/or * followed by any character outside those mentioned. * * [11] \l a backslash followed by d, D, s, S, w or W, * becomes a character class (both inside and * outside sets []). * d: decimal digits * D: any char except decimal digits * s: whitespace (space, \t \n \r \f \v) * S: any char except whitespace (see above) * w: alphanumeric & underscore (changed by user setting) * W: any char except alphanumeric & underscore (see above) * * [12] \xHH a backslash followed by x and two hexa digits, * becomes the character whose Ascii code is equal * to these digits. If not followed by two digits, * it is 'x' char itself. * * [13] a composite regular expression xy where x and y * are in the form [1] to [12] matches the longest * match of x followed by a match for y. * * [14] ^ a regular expression starting with a ^ character * $ and/or ending with a $ character, restricts the * pattern matching to the beginning of the line, * or the end of line. [anchors] Elsewhere in the * pattern, ^ and $ are treated as ordinary characters. * * * Acknowledgements: * * HCR's Hugh Redelmeier has been most helpful in various * stages of development. He convinced me to include BOW * and EOW constructs, originally invented by Rob Pike at * the University of Toronto. * * References: * Software tools Kernighan & Plauger * Software tools in Pascal Kernighan & Plauger * Grep [rsx-11 C dist] David Conroy * ed - text editor Un*x Programmer's Manual * Advanced editing on Un*x B. W. Kernighan * RegExp routines Henry Spencer * * Notes: * * This implementation uses a bit-set representation for character * classes for speed and compactness. Each character is represented * by one bit in a 256-bit block. Thus, CCL always takes a * constant 32 bytes in the internal nfa, and RESearch::Execute does a single * bit comparison to locate the character in the set. * * Examples: * * pattern: foo*.* * compile: CHR f CHR o CLO CHR o END CLO ANY END END * matches: fo foo fooo foobar fobar foxx ... * * pattern: fo[ob]a[rz] * compile: CHR f CHR o CCL bitset CHR a CCL bitset END * matches: fobar fooar fobaz fooaz * * pattern: foo\\+ * compile: CHR f CHR o CHR o CHR \ CLO CHR \ END END * matches: foo\ foo\\ foo\\\ ... * * pattern: \(foo\)[1-3]\1 (same as foo[1-3]foo) * compile: BOT 1 CHR f CHR o CHR o EOT 1 CCL bitset REF 1 END * matches: foo1foo foo2foo foo3foo * * pattern: \(fo.*\)-\1 * compile: BOT 1 CHR f CHR o CLO ANY END EOT 1 CHR - REF 1 END * matches: foo-foo fo-fo fob-fob foobar-foobar ... */ #include #include #include #include #include "Position.h" #include "CharClassify.h" #include "RESearch.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif #define OKP 1 #define NOP 0 #define CHR 1 #define ANY 2 #define CCL 3 #define BOL 4 #define EOL 5 #define BOT 6 #define EOT 7 #define BOW 8 #define EOW 9 #define REF 10 #define CLO 11 #define CLQ 12 /* 0 to 1 closure */ #define LCLO 13 /* lazy closure */ #define END 0 /* * The following defines are not meant to be changeable. * They are for readability only. */ #define BLKIND 0370 #define BITIND 07 const char bitarr[] = { 1, 2, 4, 8, 16, 32, 64, '\200' }; #define badpat(x) (*nfa = END, x) /* * Character classification table for word boundary operators BOW * and EOW is passed in by the creator of this object (Scintilla * Document). The Document default state is that word chars are: * 0-9, a-z, A-Z and _ */ RESearch::RESearch(CharClassify *charClassTable) { failure = 0; charClass = charClassTable; sta = NOP; /* status of lastpat */ bol = 0; std::fill(bittab, bittab + BITBLK, 0); std::fill(tagstk, tagstk + MAXTAG, 0); std::fill(nfa, nfa + MAXNFA, 0); Clear(); } RESearch::~RESearch() { Clear(); } void RESearch::Clear() { for (int i = 0; i < MAXTAG; i++) { pat[i].clear(); bopat[i] = NOTFOUND; eopat[i] = NOTFOUND; } } void RESearch::GrabMatches(CharacterIndexer &ci) { for (unsigned int i = 0; i < MAXTAG; i++) { if ((bopat[i] != NOTFOUND) && (eopat[i] != NOTFOUND)) { unsigned int len = eopat[i] - bopat[i]; pat[i].resize(len); for (unsigned int j = 0; j < len; j++) pat[i][j] = ci.CharAt(bopat[i] + j); } } } void RESearch::ChSet(unsigned char c) { bittab[((c) & BLKIND) >> 3] |= bitarr[(c) & BITIND]; } void RESearch::ChSetWithCase(unsigned char c, bool caseSensitive) { if (caseSensitive) { ChSet(c); } else { if ((c >= 'a') && (c <= 'z')) { ChSet(c); ChSet(static_cast(c - 'a' + 'A')); } else if ((c >= 'A') && (c <= 'Z')) { ChSet(c); ChSet(static_cast(c - 'A' + 'a')); } else { ChSet(c); } } } static unsigned char escapeValue(unsigned char ch) { switch (ch) { case 'a': return '\a'; case 'b': return '\b'; case 'f': return '\f'; case 'n': return '\n'; case 'r': return '\r'; case 't': return '\t'; case 'v': return '\v'; } return 0; } static int GetHexaChar(unsigned char hd1, unsigned char hd2) { int hexValue = 0; if (hd1 >= '0' && hd1 <= '9') { hexValue += 16 * (hd1 - '0'); } else if (hd1 >= 'A' && hd1 <= 'F') { hexValue += 16 * (hd1 - 'A' + 10); } else if (hd1 >= 'a' && hd1 <= 'f') { hexValue += 16 * (hd1 - 'a' + 10); } else { return -1; } if (hd2 >= '0' && hd2 <= '9') { hexValue += hd2 - '0'; } else if (hd2 >= 'A' && hd2 <= 'F') { hexValue += hd2 - 'A' + 10; } else if (hd2 >= 'a' && hd2 <= 'f') { hexValue += hd2 - 'a' + 10; } else { return -1; } return hexValue; } /** * Called when the parser finds a backslash not followed * by a valid expression (like \( in non-Posix mode). * @param pattern : pointer on the char after the backslash. * @param incr : (out) number of chars to skip after expression evaluation. * @return the char if it resolves to a simple char, * or -1 for a char class. In this case, bittab is changed. */ int RESearch::GetBackslashExpression( const char *pattern, int &incr) { // Since error reporting is primitive and messages are not used anyway, // I choose to interpret unexpected syntax in a logical way instead // of reporting errors. Otherwise, we can stick on, eg., PCRE behavior. incr = 0; // Most of the time, will skip the char "naturally". int c; int result = -1; unsigned char bsc = *pattern; if (!bsc) { // Avoid overrun result = '\\'; // \ at end of pattern, take it literally return result; } switch (bsc) { case 'a': case 'b': case 'n': case 'f': case 'r': case 't': case 'v': result = escapeValue(bsc); break; case 'x': { unsigned char hd1 = *(pattern + 1); unsigned char hd2 = *(pattern + 2); int hexValue = GetHexaChar(hd1, hd2); if (hexValue >= 0) { result = hexValue; incr = 2; // Must skip the digits } else { result = 'x'; // \x without 2 digits: see it as 'x' } } break; case 'd': for (c = '0'; c <= '9'; c++) { ChSet(static_cast(c)); } break; case 'D': for (c = 0; c < MAXCHR; c++) { if (c < '0' || c > '9') { ChSet(static_cast(c)); } } break; case 's': ChSet(' '); ChSet('\t'); ChSet('\n'); ChSet('\r'); ChSet('\f'); ChSet('\v'); break; case 'S': for (c = 0; c < MAXCHR; c++) { if (c != ' ' && !(c >= 0x09 && c <= 0x0D)) { ChSet(static_cast(c)); } } break; case 'w': for (c = 0; c < MAXCHR; c++) { if (iswordc(static_cast(c))) { ChSet(static_cast(c)); } } break; case 'W': for (c = 0; c < MAXCHR; c++) { if (!iswordc(static_cast(c))) { ChSet(static_cast(c)); } } break; default: result = bsc; } return result; } const char *RESearch::Compile(const char *pattern, int length, bool caseSensitive, bool posix) { char *mp=nfa; /* nfa pointer */ char *lp; /* saved pointer */ char *sp=nfa; /* another one */ char *mpMax = mp + MAXNFA - BITBLK - 10; int tagi = 0; /* tag stack index */ int tagc = 1; /* actual tag count */ int n; char mask; /* xor mask -CCL/NCL */ int c1, c2, prevChar; if (!pattern || !length) { if (sta) return 0; else return badpat("No previous regular expression"); } sta = NOP; const char *p=pattern; /* pattern pointer */ for (int i=0; i mpMax) return badpat("Pattern too long"); lp = mp; switch (*p) { case '.': /* match any char */ *mp++ = ANY; break; case '^': /* match beginning */ if (p == pattern) { *mp++ = BOL; } else { *mp++ = CHR; *mp++ = *p; } break; case '$': /* match endofline */ if (!*(p+1)) { *mp++ = EOL; } else { *mp++ = CHR; *mp++ = *p; } break; case '[': /* match char class */ *mp++ = CCL; prevChar = 0; i++; if (*++p == '^') { mask = '\377'; i++; p++; } else { mask = 0; } if (*p == '-') { /* real dash */ i++; prevChar = *p; ChSet(*p++); } if (*p == ']') { /* real brace */ i++; prevChar = *p; ChSet(*p++); } while (*p && *p != ']') { if (*p == '-') { if (prevChar < 0) { // Previous def. was a char class like \d, take dash literally prevChar = *p; ChSet(*p); } else if (*(p+1)) { if (*(p+1) != ']') { c1 = prevChar + 1; i++; c2 = static_cast(*++p); if (c2 == '\\') { if (!*(p+1)) { // End of RE return badpat("Missing ]"); } else { i++; p++; int incr; c2 = GetBackslashExpression(p, incr); i += incr; p += incr; if (c2 >= 0) { // Convention: \c (c is any char) is case sensitive, whatever the option ChSet(static_cast(c2)); prevChar = c2; } else { // bittab is already changed prevChar = -1; } } } if (prevChar < 0) { // Char after dash is char class like \d, take dash literally prevChar = '-'; ChSet('-'); } else { // Put all chars between c1 and c2 included in the char set while (c1 <= c2) { ChSetWithCase(static_cast(c1++), caseSensitive); } } } else { // Dash before the ], take it literally prevChar = *p; ChSet(*p); } } else { return badpat("Missing ]"); } } else if (*p == '\\' && *(p+1)) { i++; p++; int incr; int c = GetBackslashExpression(p, incr); i += incr; p += incr; if (c >= 0) { // Convention: \c (c is any char) is case sensitive, whatever the option ChSet(static_cast(c)); prevChar = c; } else { // bittab is already changed prevChar = -1; } } else { prevChar = static_cast(*p); ChSetWithCase(*p, caseSensitive); } i++; p++; } if (!*p) return badpat("Missing ]"); for (n = 0; n < BITBLK; bittab[n++] = 0) *mp++ = static_cast(mask ^ bittab[n]); break; case '*': /* match 0 or more... */ case '+': /* match 1 or more... */ case '?': if (p == pattern) return badpat("Empty closure"); lp = sp; /* previous opcode */ if (*lp == CLO || *lp == LCLO) /* equivalence... */ break; switch (*lp) { case BOL: case BOT: case EOT: case BOW: case EOW: case REF: return badpat("Illegal closure"); default: break; } if (*p == '+') for (sp = mp; lp < sp; lp++) *mp++ = *lp; *mp++ = END; *mp++ = END; sp = mp; while (--mp > lp) *mp = mp[-1]; if (*p == '?') *mp = CLQ; else if (*(p+1) == '?') *mp = LCLO; else *mp = CLO; mp = sp; break; case '\\': /* tags, backrefs... */ i++; switch (*++p) { case '<': *mp++ = BOW; break; case '>': if (*sp == BOW) return badpat("Null pattern inside \\<\\>"); *mp++ = EOW; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': n = *p-'0'; if (tagi > 0 && tagstk[tagi] == n) return badpat("Cyclical reference"); if (tagc > n) { *mp++ = static_cast(REF); *mp++ = static_cast(n); } else { return badpat("Undetermined reference"); } break; default: if (!posix && *p == '(') { if (tagc < MAXTAG) { tagstk[++tagi] = tagc; *mp++ = BOT; *mp++ = static_cast(tagc++); } else { return badpat("Too many \\(\\) pairs"); } } else if (!posix && *p == ')') { if (*sp == BOT) return badpat("Null pattern inside \\(\\)"); if (tagi > 0) { *mp++ = static_cast(EOT); *mp++ = static_cast(tagstk[tagi--]); } else { return badpat("Unmatched \\)"); } } else { int incr; int c = GetBackslashExpression(p, incr); i += incr; p += incr; if (c >= 0) { *mp++ = CHR; *mp++ = static_cast(c); } else { *mp++ = CCL; mask = 0; for (n = 0; n < BITBLK; bittab[n++] = 0) *mp++ = static_cast(mask ^ bittab[n]); } } } break; default : /* an ordinary char */ if (posix && *p == '(') { if (tagc < MAXTAG) { tagstk[++tagi] = tagc; *mp++ = BOT; *mp++ = static_cast(tagc++); } else { return badpat("Too many () pairs"); } } else if (posix && *p == ')') { if (*sp == BOT) return badpat("Null pattern inside ()"); if (tagi > 0) { *mp++ = static_cast(EOT); *mp++ = static_cast(tagstk[tagi--]); } else { return badpat("Unmatched )"); } } else { unsigned char c = *p; if (!c) // End of RE c = '\\'; // We take it as raw backslash if (caseSensitive || !iswordc(c)) { *mp++ = CHR; *mp++ = c; } else { *mp++ = CCL; mask = 0; ChSetWithCase(c, false); for (n = 0; n < BITBLK; bittab[n++] = 0) *mp++ = static_cast(mask ^ bittab[n]); } } break; } sp = lp; } if (tagi > 0) return badpat((posix ? "Unmatched (" : "Unmatched \\(")); *mp = END; sta = OKP; return 0; } /* * RESearch::Execute: * execute nfa to find a match. * * special cases: (nfa[0]) * BOL * Match only once, starting from the * beginning. * CHR * First locate the character without * calling PMatch, and if found, call * PMatch for the remaining string. * END * RESearch::Compile failed, poor luser did not * check for it. Fail fast. * * If a match is found, bopat[0] and eopat[0] are set * to the beginning and the end of the matched fragment, * respectively. * */ int RESearch::Execute(CharacterIndexer &ci, int lp, int endp) { unsigned char c; int ep = NOTFOUND; char *ap = nfa; bol = lp; failure = 0; Clear(); switch (*ap) { case BOL: /* anchored: match from BOL only */ ep = PMatch(ci, lp, endp, ap); break; case EOL: /* just searching for end of line normal path doesn't work */ if (*(ap+1) == END) { lp = endp; ep = lp; break; } else { return 0; } case CHR: /* ordinary char: locate it fast */ c = *(ap+1); while ((lp < endp) && (static_cast(ci.CharAt(lp)) != c)) lp++; if (lp >= endp) /* if EOS, fail, else fall through. */ return 0; default: /* regular matching all the way. */ while (lp < endp) { ep = PMatch(ci, lp, endp, ap); if (ep != NOTFOUND) break; lp++; } break; case END: /* munged automaton. fail always */ return 0; } if (ep == NOTFOUND) return 0; bopat[0] = lp; eopat[0] = ep; return 1; } /* * PMatch: internal routine for the hard part * * This code is partly snarfed from an early grep written by * David Conroy. The backref and tag stuff, and various other * innovations are by oz. * * special case optimizations: (nfa[n], nfa[n+1]) * CLO ANY * We KNOW .* will match everything up to the * end of line. Thus, directly go to the end of * line, without recursive PMatch calls. As in * the other closure cases, the remaining pattern * must be matched by moving backwards on the * string recursively, to find a match for xy * (x is ".*" and y is the remaining pattern) * where the match satisfies the LONGEST match for * x followed by a match for y. * CLO CHR * We can again scan the string forward for the * single char and at the point of failure, we * execute the remaining nfa recursively, same as * above. * * At the end of a successful match, bopat[n] and eopat[n] * are set to the beginning and end of subpatterns matched * by tagged expressions (n = 1 to 9). */ extern void re_fail(char *,char); #define isinset(x,y) ((x)[((y)&BLKIND)>>3] & bitarr[(y)&BITIND]) /* * skip values for CLO XXX to skip past the closure */ #define ANYSKIP 2 /* [CLO] ANY END */ #define CHRSKIP 3 /* [CLO] CHR chr END */ #define CCLSKIP 34 /* [CLO] CCL 32 bytes END */ int RESearch::PMatch(CharacterIndexer &ci, int lp, int endp, char *ap) { int op, c, n; int e; /* extra pointer for CLO */ int bp; /* beginning of subpat... */ int ep; /* ending of subpat... */ int are; /* to save the line ptr. */ int llp; /* lazy lp for LCLO */ while ((op = *ap++) != END) switch (op) { case CHR: if (ci.CharAt(lp++) != *ap++) return NOTFOUND; break; case ANY: if (lp++ >= endp) return NOTFOUND; break; case CCL: if (lp >= endp) return NOTFOUND; c = ci.CharAt(lp++); if (!isinset(ap,c)) return NOTFOUND; ap += BITBLK; break; case BOL: if (lp != bol) return NOTFOUND; break; case EOL: if (lp < endp) return NOTFOUND; break; case BOT: bopat[static_cast(*ap++)] = lp; break; case EOT: eopat[static_cast(*ap++)] = lp; break; case BOW: if ((lp!=bol && iswordc(ci.CharAt(lp-1))) || !iswordc(ci.CharAt(lp))) return NOTFOUND; break; case EOW: if (lp==bol || !iswordc(ci.CharAt(lp-1)) || iswordc(ci.CharAt(lp))) return NOTFOUND; break; case REF: n = *ap++; bp = bopat[n]; ep = eopat[n]; while (bp < ep) if (ci.CharAt(bp++) != ci.CharAt(lp++)) return NOTFOUND; break; case LCLO: case CLQ: case CLO: are = lp; switch (*ap) { case ANY: if (op == CLO || op == LCLO) while (lp < endp) lp++; else if (lp < endp) lp++; n = ANYSKIP; break; case CHR: c = *(ap+1); if (op == CLO || op == LCLO) while ((lp < endp) && (c == ci.CharAt(lp))) lp++; else if ((lp < endp) && (c == ci.CharAt(lp))) lp++; n = CHRSKIP; break; case CCL: while ((lp < endp) && isinset(ap+1,ci.CharAt(lp))) lp++; n = CCLSKIP; break; default: failure = true; //re_fail("closure: bad nfa.", *ap); return NOTFOUND; } ap += n; llp = lp; e = NOTFOUND; while (llp >= are) { int q; if ((q = PMatch(ci, llp, endp, ap)) != NOTFOUND) { e = q; lp = llp; if (op != LCLO) return e; } if (*ap == END) return e; --llp; } if (*ap == EOT) PMatch(ci, lp, endp, ap); return e; default: //re_fail("RESearch::Execute: bad nfa.", static_cast(op)); return NOTFOUND; } return lp; } sqlitebrowser-3.11.2/libs/qscintilla/src/RESearch.h000066400000000000000000000030541345112435200221750ustar00rootroot00000000000000// Scintilla source code edit control /** @file RESearch.h ** Interface to the regular expression search library. **/ // Written by Neil Hodgson // Based on the work of Ozan S. Yigit. // This file is in the public domain. #ifndef RESEARCH_H #define RESEARCH_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /* * The following defines are not meant to be changeable. * They are for readability only. */ #define MAXCHR 256 #define CHRBIT 8 #define BITBLK MAXCHR/CHRBIT class CharacterIndexer { public: virtual char CharAt(int index)=0; virtual ~CharacterIndexer() { } }; class RESearch { public: explicit RESearch(CharClassify *charClassTable); ~RESearch(); void Clear(); void GrabMatches(CharacterIndexer &ci); const char *Compile(const char *pattern, int length, bool caseSensitive, bool posix); int Execute(CharacterIndexer &ci, int lp, int endp); enum { MAXTAG=10 }; enum { MAXNFA=4096 }; enum { NOTFOUND=-1 }; int bopat[MAXTAG]; int eopat[MAXTAG]; std::string pat[MAXTAG]; private: void ChSet(unsigned char c); void ChSetWithCase(unsigned char c, bool caseSensitive); int GetBackslashExpression(const char *pattern, int &incr); int PMatch(CharacterIndexer &ci, int lp, int endp, char *ap); int bol; int tagstk[MAXTAG]; /* subpat tag stack */ char nfa[MAXNFA]; /* automaton */ int sta; unsigned char bittab[BITBLK]; /* bit table for CCL pre-set bits */ int failure; CharClassify *charClass; bool iswordc(unsigned char x) const { return charClass->IsWord(x); } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/RunStyles.cpp000066400000000000000000000164621345112435200230530ustar00rootroot00000000000000/** @file RunStyles.cxx ** Data structure used to store sparse styles. **/ // Copyright 1998-2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif // Find the first run at a position int RunStyles::RunFromPosition(int position) const { int run = starts->PartitionFromPosition(position); // Go to first element with this position while ((run > 0) && (position == starts->PositionFromPartition(run-1))) { run--; } return run; } // If there is no run boundary at position, insert one continuing style. int RunStyles::SplitRun(int position) { int run = RunFromPosition(position); int posRun = starts->PositionFromPartition(run); if (posRun < position) { int runStyle = ValueAt(position); run++; starts->InsertPartition(run, position); styles->InsertValue(run, 1, runStyle); } return run; } void RunStyles::RemoveRun(int run) { starts->RemovePartition(run); styles->DeleteRange(run, 1); } void RunStyles::RemoveRunIfEmpty(int run) { if ((run < starts->Partitions()) && (starts->Partitions() > 1)) { if (starts->PositionFromPartition(run) == starts->PositionFromPartition(run+1)) { RemoveRun(run); } } } void RunStyles::RemoveRunIfSameAsPrevious(int run) { if ((run > 0) && (run < starts->Partitions())) { if (styles->ValueAt(run-1) == styles->ValueAt(run)) { RemoveRun(run); } } } RunStyles::RunStyles() { starts = new Partitioning(8); styles = new SplitVector(); styles->InsertValue(0, 2, 0); } RunStyles::~RunStyles() { delete starts; starts = NULL; delete styles; styles = NULL; } int RunStyles::Length() const { return starts->PositionFromPartition(starts->Partitions()); } int RunStyles::ValueAt(int position) const { return styles->ValueAt(starts->PartitionFromPosition(position)); } int RunStyles::FindNextChange(int position, int end) const { int run = starts->PartitionFromPosition(position); if (run < starts->Partitions()) { int runChange = starts->PositionFromPartition(run); if (runChange > position) return runChange; int nextChange = starts->PositionFromPartition(run + 1); if (nextChange > position) { return nextChange; } else if (position < end) { return end; } else { return end + 1; } } else { return end + 1; } } int RunStyles::StartRun(int position) const { return starts->PositionFromPartition(starts->PartitionFromPosition(position)); } int RunStyles::EndRun(int position) const { return starts->PositionFromPartition(starts->PartitionFromPosition(position) + 1); } bool RunStyles::FillRange(int &position, int value, int &fillLength) { if (fillLength <= 0) { return false; } int end = position + fillLength; if (end > Length()) { return false; } int runEnd = RunFromPosition(end); if (styles->ValueAt(runEnd) == value) { // End already has value so trim range. end = starts->PositionFromPartition(runEnd); if (position >= end) { // Whole range is already same as value so no action return false; } fillLength = end - position; } else { runEnd = SplitRun(end); } int runStart = RunFromPosition(position); if (styles->ValueAt(runStart) == value) { // Start is in expected value so trim range. runStart++; position = starts->PositionFromPartition(runStart); fillLength = end - position; } else { if (starts->PositionFromPartition(runStart) < position) { runStart = SplitRun(position); runEnd++; } } if (runStart < runEnd) { styles->SetValueAt(runStart, value); // Remove each old run over the range for (int run=runStart+1; runPositionFromPartition(runStart) == position) { int runStyle = ValueAt(position); // Inserting at start of run so make previous longer if (runStart == 0) { // Inserting at start of document so ensure 0 if (runStyle) { styles->SetValueAt(0, 0); starts->InsertPartition(1, 0); styles->InsertValue(1, 1, runStyle); starts->InsertText(0, insertLength); } else { starts->InsertText(runStart, insertLength); } } else { if (runStyle) { starts->InsertText(runStart-1, insertLength); } else { // Insert at end of run so do not extend style starts->InsertText(runStart, insertLength); } } } else { starts->InsertText(runStart, insertLength); } } void RunStyles::DeleteAll() { delete starts; starts = NULL; delete styles; styles = NULL; starts = new Partitioning(8); styles = new SplitVector(); styles->InsertValue(0, 2, 0); } void RunStyles::DeleteRange(int position, int deleteLength) { int end = position + deleteLength; int runStart = RunFromPosition(position); int runEnd = RunFromPosition(end); if (runStart == runEnd) { // Deleting from inside one run starts->InsertText(runStart, -deleteLength); RemoveRunIfEmpty(runStart); } else { runStart = SplitRun(position); runEnd = SplitRun(end); starts->InsertText(runStart, -deleteLength); // Remove each old run over the range for (int run=runStart; runPartitions(); } bool RunStyles::AllSame() const { for (int run = 1; run < starts->Partitions(); run++) { if (styles->ValueAt(run) != styles->ValueAt(run - 1)) return false; } return true; } bool RunStyles::AllSameAs(int value) const { return AllSame() && (styles->ValueAt(0) == value); } int RunStyles::Find(int value, int start) const { if (start < Length()) { int run = start ? RunFromPosition(start) : 0; if (styles->ValueAt(run) == value) return start; run++; while (run < starts->Partitions()) { if (styles->ValueAt(run) == value) return starts->PositionFromPartition(run); run++; } } return -1; } void RunStyles::Check() const { if (Length() < 0) { throw std::runtime_error("RunStyles: Length can not be negative."); } if (starts->Partitions() < 1) { throw std::runtime_error("RunStyles: Must always have 1 or more partitions."); } if (starts->Partitions() != styles->Length()-1) { throw std::runtime_error("RunStyles: Partitions and styles different lengths."); } int start=0; while (start < Length()) { int end = EndRun(start); if (start >= end) { throw std::runtime_error("RunStyles: Partition is 0 length."); } start = end; } if (styles->ValueAt(styles->Length()-1) != 0) { throw std::runtime_error("RunStyles: Unused style at end changed."); } for (int j=1; jLength()-1; j++) { if (styles->ValueAt(j) == styles->ValueAt(j-1)) { throw std::runtime_error("RunStyles: Style of a partition same as previous."); } } } sqlitebrowser-3.11.2/libs/qscintilla/src/RunStyles.h000066400000000000000000000025771345112435200225220ustar00rootroot00000000000000/** @file RunStyles.h ** Data structure used to store sparse styles. **/ // Copyright 1998-2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. /// Styling buffer using one element for each run rather than using /// a filled buffer. #ifndef RUNSTYLES_H #define RUNSTYLES_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class RunStyles { private: Partitioning *starts; SplitVector *styles; int RunFromPosition(int position) const; int SplitRun(int position); void RemoveRun(int run); void RemoveRunIfEmpty(int run); void RemoveRunIfSameAsPrevious(int run); // Private so RunStyles objects can not be copied RunStyles(const RunStyles &); public: RunStyles(); ~RunStyles(); int Length() const; int ValueAt(int position) const; int FindNextChange(int position, int end) const; int StartRun(int position) const; int EndRun(int position) const; // Returns true if some values may have changed bool FillRange(int &position, int value, int &fillLength); void SetValueAt(int position, int value); void InsertSpace(int position, int insertLength); void DeleteAll(); void DeleteRange(int position, int deleteLength); int Runs() const; bool AllSame() const; bool AllSameAs(int value) const; int Find(int value, int start) const; void Check() const; }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/SciTE.properties000066400000000000000000000004611345112435200234540ustar00rootroot00000000000000# SciTE.properties is the per directory local options file and can be used to override # settings made in SciTEGlobal.properties command.build.directory.*.cxx=..\win32 command.build.directory.*.h=..\win32 command.build.*.cxx=nmake -f scintilla.mak QUIET=1 command.build.*.h=nmake -f scintilla.mak QUIET=1 sqlitebrowser-3.11.2/libs/qscintilla/src/ScintillaBase.cpp000066400000000000000000000700231345112435200236110ustar00rootroot00000000000000// Scintilla source code edit control /** @file ScintillaBase.cxx ** An enhanced subclass of Editor with calltips, autocomplete and context menu. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include #include #include #include #include #include "Platform.h" #include "ILexer.h" #include "Scintilla.h" #ifdef SCI_LEXER #include "SciLexer.h" #endif #include "PropSetSimple.h" #ifdef SCI_LEXER #include "LexerModule.h" #include "Catalogue.h" #endif #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "ContractionState.h" #include "CellBuffer.h" #include "CallTip.h" #include "KeyMap.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #include "CharClassify.h" #include "Decoration.h" #include "CaseFolder.h" #include "Document.h" #include "Selection.h" #include "PositionCache.h" #include "EditModel.h" #include "MarginView.h" #include "EditView.h" #include "Editor.h" #include "AutoComplete.h" #include "ScintillaBase.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif ScintillaBase::ScintillaBase() { displayPopupMenu = SC_POPUP_ALL; listType = 0; maxListWidth = 0; multiAutoCMode = SC_MULTIAUTOC_ONCE; } ScintillaBase::~ScintillaBase() { } void ScintillaBase::Finalise() { Editor::Finalise(); popup.Destroy(); } void ScintillaBase::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) { bool isFillUp = ac.Active() && ac.IsFillUpChar(*s); if (!isFillUp) { Editor::AddCharUTF(s, len, treatAsDBCS); } if (ac.Active()) { AutoCompleteCharacterAdded(s[0]); // For fill ups add the character after the autocompletion has // triggered so containers see the key so can display a calltip. if (isFillUp) { Editor::AddCharUTF(s, len, treatAsDBCS); } } } void ScintillaBase::Command(int cmdId) { switch (cmdId) { case idAutoComplete: // Nothing to do break; case idCallTip: // Nothing to do break; case idcmdUndo: WndProc(SCI_UNDO, 0, 0); break; case idcmdRedo: WndProc(SCI_REDO, 0, 0); break; case idcmdCut: WndProc(SCI_CUT, 0, 0); break; case idcmdCopy: WndProc(SCI_COPY, 0, 0); break; case idcmdPaste: WndProc(SCI_PASTE, 0, 0); break; case idcmdDelete: WndProc(SCI_CLEAR, 0, 0); break; case idcmdSelectAll: WndProc(SCI_SELECTALL, 0, 0); break; } } int ScintillaBase::KeyCommand(unsigned int iMessage) { // Most key commands cancel autocompletion mode if (ac.Active()) { switch (iMessage) { // Except for these case SCI_LINEDOWN: AutoCompleteMove(1); return 0; case SCI_LINEUP: AutoCompleteMove(-1); return 0; case SCI_PAGEDOWN: AutoCompleteMove(ac.lb->GetVisibleRows()); return 0; case SCI_PAGEUP: AutoCompleteMove(-ac.lb->GetVisibleRows()); return 0; case SCI_VCHOME: AutoCompleteMove(-5000); return 0; case SCI_LINEEND: AutoCompleteMove(5000); return 0; case SCI_DELETEBACK: DelCharBack(true); AutoCompleteCharacterDeleted(); EnsureCaretVisible(); return 0; case SCI_DELETEBACKNOTLINE: DelCharBack(false); AutoCompleteCharacterDeleted(); EnsureCaretVisible(); return 0; case SCI_TAB: AutoCompleteCompleted(0, SC_AC_TAB); return 0; case SCI_NEWLINE: AutoCompleteCompleted(0, SC_AC_NEWLINE); return 0; default: AutoCompleteCancel(); } } if (ct.inCallTipMode) { if ( (iMessage != SCI_CHARLEFT) && (iMessage != SCI_CHARLEFTEXTEND) && (iMessage != SCI_CHARRIGHT) && (iMessage != SCI_CHARRIGHTEXTEND) && (iMessage != SCI_EDITTOGGLEOVERTYPE) && (iMessage != SCI_DELETEBACK) && (iMessage != SCI_DELETEBACKNOTLINE) ) { ct.CallTipCancel(); } if ((iMessage == SCI_DELETEBACK) || (iMessage == SCI_DELETEBACKNOTLINE)) { if (sel.MainCaret() <= ct.posStartCallTip) { ct.CallTipCancel(); } } } return Editor::KeyCommand(iMessage); } void ScintillaBase::AutoCompleteDoubleClick(void *p) { ScintillaBase *sci = reinterpret_cast(p); sci->AutoCompleteCompleted(0, SC_AC_DOUBLECLICK); } void ScintillaBase::AutoCompleteInsert(Position startPos, int removeLen, const char *text, int textLen) { UndoGroup ug(pdoc); if (multiAutoCMode == SC_MULTIAUTOC_ONCE) { pdoc->DeleteChars(startPos, removeLen); const int lengthInserted = pdoc->InsertString(startPos, text, textLen); SetEmptySelection(startPos + lengthInserted); } else { // SC_MULTIAUTOC_EACH for (size_t r=0; r= 0) { positionInsert -= removeLen; pdoc->DeleteChars(positionInsert, removeLen); } const int lengthInserted = pdoc->InsertString(positionInsert, text, textLen); if (lengthInserted > 0) { sel.Range(r).caret.SetPosition(positionInsert + lengthInserted); sel.Range(r).anchor.SetPosition(positionInsert + lengthInserted); } sel.Range(r).ClearVirtualSpace(); } } } } void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { //Platform::DebugPrintf("AutoComplete %s\n", list); ct.CallTipCancel(); if (ac.chooseSingle && (listType == 0)) { if (list && !strchr(list, ac.GetSeparator())) { const char *typeSep = strchr(list, ac.GetTypesep()); int lenInsert = typeSep ? static_cast(typeSep-list) : static_cast(strlen(list)); if (ac.ignoreCase) { // May need to convert the case before invocation, so remove lenEntered characters AutoCompleteInsert(sel.MainCaret() - lenEntered, lenEntered, list, lenInsert); } else { AutoCompleteInsert(sel.MainCaret(), 0, list + lenEntered, lenInsert - lenEntered); } ac.Cancel(); return; } } ac.Start(wMain, idAutoComplete, sel.MainCaret(), PointMainCaret(), lenEntered, vs.lineHeight, IsUnicodeMode(), technology); PRectangle rcClient = GetClientRectangle(); Point pt = LocationFromPosition(sel.MainCaret() - lenEntered); PRectangle rcPopupBounds = wMain.GetMonitorRect(pt); if (rcPopupBounds.Height() == 0) rcPopupBounds = rcClient; int heightLB = ac.heightLBDefault; int widthLB = ac.widthLBDefault; if (pt.x >= rcClient.right - widthLB) { HorizontalScrollTo(static_cast(xOffset + pt.x - rcClient.right + widthLB)); Redraw(); pt = PointMainCaret(); } if (wMargin.GetID()) { Point ptOrigin = GetVisibleOriginInMain(); pt.x += ptOrigin.x; pt.y += ptOrigin.y; } PRectangle rcac; rcac.left = pt.x - ac.lb->CaretFromEdge(); if (pt.y >= rcPopupBounds.bottom - heightLB && // Won't fit below. pt.y >= (rcPopupBounds.bottom + rcPopupBounds.top) / 2) { // and there is more room above. rcac.top = pt.y - heightLB; if (rcac.top < rcPopupBounds.top) { heightLB -= static_cast(rcPopupBounds.top - rcac.top); rcac.top = rcPopupBounds.top; } } else { rcac.top = pt.y + vs.lineHeight; } rcac.right = rcac.left + widthLB; rcac.bottom = static_cast(Platform::Minimum(static_cast(rcac.top) + heightLB, static_cast(rcPopupBounds.bottom))); ac.lb->SetPositionRelative(rcac, wMain); ac.lb->SetFont(vs.styles[STYLE_DEFAULT].font); unsigned int aveCharWidth = static_cast(vs.styles[STYLE_DEFAULT].aveCharWidth); ac.lb->SetAverageCharWidth(aveCharWidth); ac.lb->SetDoubleClickAction(AutoCompleteDoubleClick, this); ac.SetList(list ? list : ""); // Fiddle the position of the list so it is right next to the target and wide enough for all its strings PRectangle rcList = ac.lb->GetDesiredRect(); int heightAlloced = static_cast(rcList.bottom - rcList.top); widthLB = Platform::Maximum(widthLB, static_cast(rcList.right - rcList.left)); if (maxListWidth != 0) widthLB = Platform::Minimum(widthLB, aveCharWidth*maxListWidth); // Make an allowance for large strings in list rcList.left = pt.x - ac.lb->CaretFromEdge(); rcList.right = rcList.left + widthLB; if (((pt.y + vs.lineHeight) >= (rcPopupBounds.bottom - heightAlloced)) && // Won't fit below. ((pt.y + vs.lineHeight / 2) >= (rcPopupBounds.bottom + rcPopupBounds.top) / 2)) { // and there is more room above. rcList.top = pt.y - heightAlloced; } else { rcList.top = pt.y + vs.lineHeight; } rcList.bottom = rcList.top + heightAlloced; ac.lb->SetPositionRelative(rcList, wMain); ac.Show(true); if (lenEntered != 0) { AutoCompleteMoveToCurrentWord(); } } void ScintillaBase::AutoCompleteCancel() { if (ac.Active()) { SCNotification scn = {}; scn.nmhdr.code = SCN_AUTOCCANCELLED; scn.wParam = 0; scn.listType = 0; NotifyParent(scn); } ac.Cancel(); } void ScintillaBase::AutoCompleteMove(int delta) { ac.Move(delta); } void ScintillaBase::AutoCompleteMoveToCurrentWord() { std::string wordCurrent = RangeText(ac.posStart - ac.startLen, sel.MainCaret()); ac.Select(wordCurrent.c_str()); } void ScintillaBase::AutoCompleteCharacterAdded(char ch) { if (ac.IsFillUpChar(ch)) { AutoCompleteCompleted(ch, SC_AC_FILLUP); } else if (ac.IsStopChar(ch)) { AutoCompleteCancel(); } else { AutoCompleteMoveToCurrentWord(); } } void ScintillaBase::AutoCompleteCharacterDeleted() { if (sel.MainCaret() < ac.posStart - ac.startLen) { AutoCompleteCancel(); } else if (ac.cancelAtStartPos && (sel.MainCaret() <= ac.posStart)) { AutoCompleteCancel(); } else { AutoCompleteMoveToCurrentWord(); } SCNotification scn = {}; scn.nmhdr.code = SCN_AUTOCCHARDELETED; scn.wParam = 0; scn.listType = 0; NotifyParent(scn); } void ScintillaBase::AutoCompleteCompleted(char ch, unsigned int completionMethod) { int item = ac.GetSelection(); if (item == -1) { AutoCompleteCancel(); return; } const std::string selected = ac.GetValue(item); ac.Show(false); SCNotification scn = {}; scn.nmhdr.code = listType > 0 ? SCN_USERLISTSELECTION : SCN_AUTOCSELECTION; scn.message = 0; scn.ch = ch; scn.listCompletionMethod = completionMethod; scn.wParam = listType; scn.listType = listType; Position firstPos = ac.posStart - ac.startLen; scn.position = firstPos; scn.lParam = firstPos; scn.text = selected.c_str(); NotifyParent(scn); if (!ac.Active()) return; ac.Cancel(); if (listType > 0) return; Position endPos = sel.MainCaret(); if (ac.dropRestOfWord) endPos = pdoc->ExtendWordSelect(endPos, 1, true); if (endPos < firstPos) return; AutoCompleteInsert(firstPos, endPos - firstPos, selected.c_str(), static_cast(selected.length())); SetLastXChosen(); scn.nmhdr.code = SCN_AUTOCCOMPLETED; NotifyParent(scn); } int ScintillaBase::AutoCompleteGetCurrent() const { if (!ac.Active()) return -1; return ac.GetSelection(); } int ScintillaBase::AutoCompleteGetCurrentText(char *buffer) const { if (ac.Active()) { int item = ac.GetSelection(); if (item != -1) { const std::string selected = ac.GetValue(item); if (buffer != NULL) memcpy(buffer, selected.c_str(), selected.length()+1); return static_cast(selected.length()); } } if (buffer != NULL) *buffer = '\0'; return 0; } void ScintillaBase::CallTipShow(Point pt, const char *defn) { ac.Cancel(); // If container knows about STYLE_CALLTIP then use it in place of the // STYLE_DEFAULT for the face name, size and character set. Also use it // for the foreground and background colour. int ctStyle = ct.UseStyleCallTip() ? STYLE_CALLTIP : STYLE_DEFAULT; if (ct.UseStyleCallTip()) { ct.SetForeBack(vs.styles[STYLE_CALLTIP].fore, vs.styles[STYLE_CALLTIP].back); } if (wMargin.GetID()) { Point ptOrigin = GetVisibleOriginInMain(); pt.x += ptOrigin.x; pt.y += ptOrigin.y; } PRectangle rc = ct.CallTipStart(sel.MainCaret(), pt, vs.lineHeight, defn, vs.styles[ctStyle].fontName, vs.styles[ctStyle].sizeZoomed, CodePage(), vs.styles[ctStyle].characterSet, vs.technology, wMain); // If the call-tip window would be out of the client // space PRectangle rcClient = GetClientRectangle(); int offset = vs.lineHeight + static_cast(rc.Height()); // adjust so it displays above the text. if (rc.bottom > rcClient.bottom && rc.Height() < rcClient.Height()) { rc.top -= offset; rc.bottom -= offset; } // adjust so it displays below the text. if (rc.top < rcClient.top && rc.Height() < rcClient.Height()) { rc.top += offset; rc.bottom += offset; } // Now display the window. CreateCallTipWindow(rc); ct.wCallTip.SetPositionRelative(rc, wMain); ct.wCallTip.Show(); } void ScintillaBase::CallTipClick() { SCNotification scn = {}; scn.nmhdr.code = SCN_CALLTIPCLICK; scn.position = ct.clickPlace; NotifyParent(scn); } bool ScintillaBase::ShouldDisplayPopup(Point ptInWindowCoordinates) const { return (displayPopupMenu == SC_POPUP_ALL || (displayPopupMenu == SC_POPUP_TEXT && !PointInSelMargin(ptInWindowCoordinates))); } void ScintillaBase::ContextMenu(Point pt) { if (displayPopupMenu) { bool writable = !WndProc(SCI_GETREADONLY, 0, 0); popup.CreatePopUp(); AddToPopUp("Undo", idcmdUndo, writable && pdoc->CanUndo()); AddToPopUp("Redo", idcmdRedo, writable && pdoc->CanRedo()); AddToPopUp(""); AddToPopUp("Cut", idcmdCut, writable && !sel.Empty()); AddToPopUp("Copy", idcmdCopy, !sel.Empty()); AddToPopUp("Paste", idcmdPaste, writable && WndProc(SCI_CANPASTE, 0, 0)); AddToPopUp("Delete", idcmdDelete, writable && !sel.Empty()); AddToPopUp(""); AddToPopUp("Select All", idcmdSelectAll); popup.Show(pt, wMain); } } void ScintillaBase::CancelModes() { AutoCompleteCancel(); ct.CallTipCancel(); Editor::CancelModes(); } void ScintillaBase::ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifiers) { CancelModes(); Editor::ButtonDownWithModifiers(pt, curTime, modifiers); } void ScintillaBase::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { ButtonDownWithModifiers(pt, curTime, ModifierFlags(shift, ctrl, alt)); } void ScintillaBase::RightButtonDownWithModifiers(Point pt, unsigned int curTime, int modifiers) { CancelModes(); Editor::RightButtonDownWithModifiers(pt, curTime, modifiers); } #ifdef SCI_LEXER #ifdef SCI_NAMESPACE namespace Scintilla { #endif class LexState : public LexInterface { const LexerModule *lexCurrent; void SetLexerModule(const LexerModule *lex); PropSetSimple props; int interfaceVersion; public: int lexLanguage; explicit LexState(Document *pdoc_); virtual ~LexState(); void SetLexer(uptr_t wParam); void SetLexerLanguage(const char *languageName); const char *DescribeWordListSets(); void SetWordList(int n, const char *wl); const char *GetName() const; void *PrivateCall(int operation, void *pointer); const char *PropertyNames(); int PropertyType(const char *name); const char *DescribeProperty(const char *name); void PropSet(const char *key, const char *val); const char *PropGet(const char *key) const; int PropGetInt(const char *key, int defaultValue=0) const; int PropGetExpanded(const char *key, char *result) const; int LineEndTypesSupported(); int AllocateSubStyles(int styleBase, int numberStyles); int SubStylesStart(int styleBase); int SubStylesLength(int styleBase); int StyleFromSubStyle(int subStyle); int PrimaryStyleFromStyle(int style); void FreeSubStyles(); void SetIdentifiers(int style, const char *identifiers); int DistanceToSecondaryStyles(); const char *GetSubStyleBases(); }; #ifdef SCI_NAMESPACE } #endif LexState::LexState(Document *pdoc_) : LexInterface(pdoc_) { lexCurrent = 0; performingStyle = false; interfaceVersion = lvOriginal; lexLanguage = SCLEX_CONTAINER; } LexState::~LexState() { if (instance) { instance->Release(); instance = 0; } } LexState *ScintillaBase::DocumentLexState() { if (!pdoc->pli) { pdoc->pli = new LexState(pdoc); } return static_cast(pdoc->pli); } void LexState::SetLexerModule(const LexerModule *lex) { if (lex != lexCurrent) { if (instance) { instance->Release(); instance = 0; } interfaceVersion = lvOriginal; lexCurrent = lex; if (lexCurrent) { instance = lexCurrent->Create(); interfaceVersion = instance->Version(); } pdoc->LexerChanged(); } } void LexState::SetLexer(uptr_t wParam) { lexLanguage = static_cast(wParam); if (lexLanguage == SCLEX_CONTAINER) { SetLexerModule(0); } else { const LexerModule *lex = Catalogue::Find(lexLanguage); if (!lex) lex = Catalogue::Find(SCLEX_NULL); SetLexerModule(lex); } } void LexState::SetLexerLanguage(const char *languageName) { const LexerModule *lex = Catalogue::Find(languageName); if (!lex) lex = Catalogue::Find(SCLEX_NULL); if (lex) lexLanguage = lex->GetLanguage(); SetLexerModule(lex); } const char *LexState::DescribeWordListSets() { if (instance) { return instance->DescribeWordListSets(); } else { return 0; } } void LexState::SetWordList(int n, const char *wl) { if (instance) { int firstModification = instance->WordListSet(n, wl); if (firstModification >= 0) { pdoc->ModifiedAt(firstModification); } } } const char *LexState::GetName() const { return lexCurrent ? lexCurrent->languageName : ""; } void *LexState::PrivateCall(int operation, void *pointer) { if (pdoc && instance) { return instance->PrivateCall(operation, pointer); } else { return 0; } } const char *LexState::PropertyNames() { if (instance) { return instance->PropertyNames(); } else { return 0; } } int LexState::PropertyType(const char *name) { if (instance) { return instance->PropertyType(name); } else { return SC_TYPE_BOOLEAN; } } const char *LexState::DescribeProperty(const char *name) { if (instance) { return instance->DescribeProperty(name); } else { return 0; } } void LexState::PropSet(const char *key, const char *val) { props.Set(key, val); if (instance) { int firstModification = instance->PropertySet(key, val); if (firstModification >= 0) { pdoc->ModifiedAt(firstModification); } } } const char *LexState::PropGet(const char *key) const { return props.Get(key); } int LexState::PropGetInt(const char *key, int defaultValue) const { return props.GetInt(key, defaultValue); } int LexState::PropGetExpanded(const char *key, char *result) const { return props.GetExpanded(key, result); } int LexState::LineEndTypesSupported() { if (instance && (interfaceVersion >= lvSubStyles)) { return static_cast(instance)->LineEndTypesSupported(); } return 0; } int LexState::AllocateSubStyles(int styleBase, int numberStyles) { if (instance && (interfaceVersion >= lvSubStyles)) { return static_cast(instance)->AllocateSubStyles(styleBase, numberStyles); } return -1; } int LexState::SubStylesStart(int styleBase) { if (instance && (interfaceVersion >= lvSubStyles)) { return static_cast(instance)->SubStylesStart(styleBase); } return -1; } int LexState::SubStylesLength(int styleBase) { if (instance && (interfaceVersion >= lvSubStyles)) { return static_cast(instance)->SubStylesLength(styleBase); } return 0; } int LexState::StyleFromSubStyle(int subStyle) { if (instance && (interfaceVersion >= lvSubStyles)) { return static_cast(instance)->StyleFromSubStyle(subStyle); } return 0; } int LexState::PrimaryStyleFromStyle(int style) { if (instance && (interfaceVersion >= lvSubStyles)) { return static_cast(instance)->PrimaryStyleFromStyle(style); } return 0; } void LexState::FreeSubStyles() { if (instance && (interfaceVersion >= lvSubStyles)) { static_cast(instance)->FreeSubStyles(); } } void LexState::SetIdentifiers(int style, const char *identifiers) { if (instance && (interfaceVersion >= lvSubStyles)) { static_cast(instance)->SetIdentifiers(style, identifiers); pdoc->ModifiedAt(0); } } int LexState::DistanceToSecondaryStyles() { if (instance && (interfaceVersion >= lvSubStyles)) { return static_cast(instance)->DistanceToSecondaryStyles(); } return 0; } const char *LexState::GetSubStyleBases() { if (instance && (interfaceVersion >= lvSubStyles)) { return static_cast(instance)->GetSubStyleBases(); } return ""; } #endif void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) { #ifdef SCI_LEXER if (DocumentLexState()->lexLanguage != SCLEX_CONTAINER) { int lineEndStyled = pdoc->LineFromPosition(pdoc->GetEndStyled()); int endStyled = pdoc->LineStart(lineEndStyled); DocumentLexState()->Colourise(endStyled, endStyleNeeded); return; } #endif Editor::NotifyStyleToNeeded(endStyleNeeded); } void ScintillaBase::NotifyLexerChanged(Document *, void *) { #ifdef SCI_LEXER vs.EnsureStyle(0xff); #endif } sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { switch (iMessage) { case SCI_AUTOCSHOW: listType = 0; AutoCompleteStart(static_cast(wParam), reinterpret_cast(lParam)); break; case SCI_AUTOCCANCEL: ac.Cancel(); break; case SCI_AUTOCACTIVE: return ac.Active(); case SCI_AUTOCPOSSTART: return ac.posStart; case SCI_AUTOCCOMPLETE: AutoCompleteCompleted(0, SC_AC_COMMAND); break; case SCI_AUTOCSETSEPARATOR: ac.SetSeparator(static_cast(wParam)); break; case SCI_AUTOCGETSEPARATOR: return ac.GetSeparator(); case SCI_AUTOCSTOPS: ac.SetStopChars(reinterpret_cast(lParam)); break; case SCI_AUTOCSELECT: ac.Select(reinterpret_cast(lParam)); break; case SCI_AUTOCGETCURRENT: return AutoCompleteGetCurrent(); case SCI_AUTOCGETCURRENTTEXT: return AutoCompleteGetCurrentText(reinterpret_cast(lParam)); case SCI_AUTOCSETCANCELATSTART: ac.cancelAtStartPos = wParam != 0; break; case SCI_AUTOCGETCANCELATSTART: return ac.cancelAtStartPos; case SCI_AUTOCSETFILLUPS: ac.SetFillUpChars(reinterpret_cast(lParam)); break; case SCI_AUTOCSETCHOOSESINGLE: ac.chooseSingle = wParam != 0; break; case SCI_AUTOCGETCHOOSESINGLE: return ac.chooseSingle; case SCI_AUTOCSETIGNORECASE: ac.ignoreCase = wParam != 0; break; case SCI_AUTOCGETIGNORECASE: return ac.ignoreCase; case SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR: ac.ignoreCaseBehaviour = static_cast(wParam); break; case SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR: return ac.ignoreCaseBehaviour; case SCI_AUTOCSETMULTI: multiAutoCMode = static_cast(wParam); break; case SCI_AUTOCGETMULTI: return multiAutoCMode; case SCI_AUTOCSETORDER: ac.autoSort = static_cast(wParam); break; case SCI_AUTOCGETORDER: return ac.autoSort; case SCI_USERLISTSHOW: listType = static_cast(wParam); AutoCompleteStart(0, reinterpret_cast(lParam)); break; case SCI_AUTOCSETAUTOHIDE: ac.autoHide = wParam != 0; break; case SCI_AUTOCGETAUTOHIDE: return ac.autoHide; case SCI_AUTOCSETDROPRESTOFWORD: ac.dropRestOfWord = wParam != 0; break; case SCI_AUTOCGETDROPRESTOFWORD: return ac.dropRestOfWord; case SCI_AUTOCSETMAXHEIGHT: ac.lb->SetVisibleRows(static_cast(wParam)); break; case SCI_AUTOCGETMAXHEIGHT: return ac.lb->GetVisibleRows(); case SCI_AUTOCSETMAXWIDTH: maxListWidth = static_cast(wParam); break; case SCI_AUTOCGETMAXWIDTH: return maxListWidth; case SCI_REGISTERIMAGE: ac.lb->RegisterImage(static_cast(wParam), reinterpret_cast(lParam)); break; case SCI_REGISTERRGBAIMAGE: ac.lb->RegisterRGBAImage(static_cast(wParam), static_cast(sizeRGBAImage.x), static_cast(sizeRGBAImage.y), reinterpret_cast(lParam)); break; case SCI_CLEARREGISTEREDIMAGES: ac.lb->ClearRegisteredImages(); break; case SCI_AUTOCSETTYPESEPARATOR: ac.SetTypesep(static_cast(wParam)); break; case SCI_AUTOCGETTYPESEPARATOR: return ac.GetTypesep(); case SCI_CALLTIPSHOW: CallTipShow(LocationFromPosition(static_cast(wParam)), reinterpret_cast(lParam)); break; case SCI_CALLTIPCANCEL: ct.CallTipCancel(); break; case SCI_CALLTIPACTIVE: return ct.inCallTipMode; case SCI_CALLTIPPOSSTART: return ct.posStartCallTip; case SCI_CALLTIPSETPOSSTART: ct.posStartCallTip = static_cast(wParam); break; case SCI_CALLTIPSETHLT: ct.SetHighlight(static_cast(wParam), static_cast(lParam)); break; case SCI_CALLTIPSETBACK: ct.colourBG = ColourDesired(static_cast(wParam)); vs.styles[STYLE_CALLTIP].back = ct.colourBG; InvalidateStyleRedraw(); break; case SCI_CALLTIPSETFORE: ct.colourUnSel = ColourDesired(static_cast(wParam)); vs.styles[STYLE_CALLTIP].fore = ct.colourUnSel; InvalidateStyleRedraw(); break; case SCI_CALLTIPSETFOREHLT: ct.colourSel = ColourDesired(static_cast(wParam)); InvalidateStyleRedraw(); break; case SCI_CALLTIPUSESTYLE: ct.SetTabSize(static_cast(wParam)); InvalidateStyleRedraw(); break; case SCI_CALLTIPSETPOSITION: ct.SetPosition(wParam != 0); InvalidateStyleRedraw(); break; case SCI_USEPOPUP: displayPopupMenu = static_cast(wParam); break; #ifdef SCI_LEXER case SCI_SETLEXER: DocumentLexState()->SetLexer(static_cast(wParam)); break; case SCI_GETLEXER: return DocumentLexState()->lexLanguage; case SCI_COLOURISE: if (DocumentLexState()->lexLanguage == SCLEX_CONTAINER) { pdoc->ModifiedAt(static_cast(wParam)); NotifyStyleToNeeded((lParam == -1) ? pdoc->Length() : static_cast(lParam)); } else { DocumentLexState()->Colourise(static_cast(wParam), static_cast(lParam)); } Redraw(); break; case SCI_SETPROPERTY: DocumentLexState()->PropSet(reinterpret_cast(wParam), reinterpret_cast(lParam)); break; case SCI_GETPROPERTY: return StringResult(lParam, DocumentLexState()->PropGet(reinterpret_cast(wParam))); case SCI_GETPROPERTYEXPANDED: return DocumentLexState()->PropGetExpanded(reinterpret_cast(wParam), reinterpret_cast(lParam)); case SCI_GETPROPERTYINT: return DocumentLexState()->PropGetInt(reinterpret_cast(wParam), static_cast(lParam)); case SCI_SETKEYWORDS: DocumentLexState()->SetWordList(static_cast(wParam), reinterpret_cast(lParam)); break; case SCI_SETLEXERLANGUAGE: DocumentLexState()->SetLexerLanguage(reinterpret_cast(lParam)); break; case SCI_GETLEXERLANGUAGE: return StringResult(lParam, DocumentLexState()->GetName()); case SCI_PRIVATELEXERCALL: return reinterpret_cast( DocumentLexState()->PrivateCall(static_cast(wParam), reinterpret_cast(lParam))); case SCI_GETSTYLEBITSNEEDED: return 8; case SCI_PROPERTYNAMES: return StringResult(lParam, DocumentLexState()->PropertyNames()); case SCI_PROPERTYTYPE: return DocumentLexState()->PropertyType(reinterpret_cast(wParam)); case SCI_DESCRIBEPROPERTY: return StringResult(lParam, DocumentLexState()->DescribeProperty(reinterpret_cast(wParam))); case SCI_DESCRIBEKEYWORDSETS: return StringResult(lParam, DocumentLexState()->DescribeWordListSets()); case SCI_GETLINEENDTYPESSUPPORTED: return DocumentLexState()->LineEndTypesSupported(); case SCI_ALLOCATESUBSTYLES: return DocumentLexState()->AllocateSubStyles(static_cast(wParam), static_cast(lParam)); case SCI_GETSUBSTYLESSTART: return DocumentLexState()->SubStylesStart(static_cast(wParam)); case SCI_GETSUBSTYLESLENGTH: return DocumentLexState()->SubStylesLength(static_cast(wParam)); case SCI_GETSTYLEFROMSUBSTYLE: return DocumentLexState()->StyleFromSubStyle(static_cast(wParam)); case SCI_GETPRIMARYSTYLEFROMSTYLE: return DocumentLexState()->PrimaryStyleFromStyle(static_cast(wParam)); case SCI_FREESUBSTYLES: DocumentLexState()->FreeSubStyles(); break; case SCI_SETIDENTIFIERS: DocumentLexState()->SetIdentifiers(static_cast(wParam), reinterpret_cast(lParam)); break; case SCI_DISTANCETOSECONDARYSTYLES: return DocumentLexState()->DistanceToSecondaryStyles(); case SCI_GETSUBSTYLEBASES: return StringResult(lParam, DocumentLexState()->GetSubStyleBases()); #endif default: return Editor::WndProc(iMessage, wParam, lParam); } return 0l; } sqlitebrowser-3.11.2/libs/qscintilla/src/ScintillaBase.h000066400000000000000000000057461345112435200232700ustar00rootroot00000000000000// Scintilla source code edit control /** @file ScintillaBase.h ** Defines an enhanced subclass of Editor with calltips, autocomplete and context menu. **/ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SCINTILLABASE_H #define SCINTILLABASE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif #ifdef SCI_LEXER class LexState; #endif /** */ class ScintillaBase : public Editor { // Private so ScintillaBase objects can not be copied explicit ScintillaBase(const ScintillaBase &); ScintillaBase &operator=(const ScintillaBase &); protected: /** Enumeration of commands and child windows. */ enum { idCallTip=1, idAutoComplete=2, idcmdUndo=10, idcmdRedo=11, idcmdCut=12, idcmdCopy=13, idcmdPaste=14, idcmdDelete=15, idcmdSelectAll=16 }; enum { maxLenInputIME = 200 }; int displayPopupMenu; Menu popup; AutoComplete ac; CallTip ct; int listType; ///< 0 is an autocomplete list int maxListWidth; /// Maximum width of list, in average character widths int multiAutoCMode; /// Mode for autocompleting when multiple selections are present #ifdef SCI_LEXER LexState *DocumentLexState(); void SetLexer(uptr_t wParam); void SetLexerLanguage(const char *languageName); void Colourise(int start, int end); #endif ScintillaBase(); virtual ~ScintillaBase(); virtual void Initialise() = 0; virtual void Finalise(); virtual void AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS=false); void Command(int cmdId); virtual void CancelModes(); virtual int KeyCommand(unsigned int iMessage); void AutoCompleteInsert(Position startPos, int removeLen, const char *text, int textLen); void AutoCompleteStart(int lenEntered, const char *list); void AutoCompleteCancel(); void AutoCompleteMove(int delta); int AutoCompleteGetCurrent() const; int AutoCompleteGetCurrentText(char *buffer) const; void AutoCompleteCharacterAdded(char ch); void AutoCompleteCharacterDeleted(); void AutoCompleteCompleted(char ch, unsigned int completionMethod); void AutoCompleteMoveToCurrentWord(); static void AutoCompleteDoubleClick(void *p); void CallTipClick(); void CallTipShow(Point pt, const char *defn); virtual void CreateCallTipWindow(PRectangle rc) = 0; virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0; bool ShouldDisplayPopup(Point ptInWindowCoordinates) const; void ContextMenu(Point pt); virtual void ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifiers); virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); virtual void RightButtonDownWithModifiers(Point pt, unsigned int curTime, int modifiers); void NotifyStyleToNeeded(int endStyleNeeded); void NotifyLexerChanged(Document *doc, void *userData); public: // Public so scintilla_send_message can use it virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Selection.cpp000066400000000000000000000244231345112435200230240ustar00rootroot00000000000000// Scintilla source code edit control /** @file Selection.cxx ** Classes maintaining the selection. **/ // Copyright 2009 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "Position.h" #include "Selection.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif void SelectionPosition::MoveForInsertDelete(bool insertion, int startChange, int length) { if (insertion) { if (position == startChange) { int virtualLengthRemove = std::min(length, virtualSpace); virtualSpace -= virtualLengthRemove; position += virtualLengthRemove; } else if (position > startChange) { position += length; } } else { if (position == startChange) { virtualSpace = 0; } if (position > startChange) { int endDeletion = startChange + length; if (position > endDeletion) { position -= length; } else { position = startChange; virtualSpace = 0; } } } } bool SelectionPosition::operator <(const SelectionPosition &other) const { if (position == other.position) return virtualSpace < other.virtualSpace; else return position < other.position; } bool SelectionPosition::operator >(const SelectionPosition &other) const { if (position == other.position) return virtualSpace > other.virtualSpace; else return position > other.position; } bool SelectionPosition::operator <=(const SelectionPosition &other) const { if (position == other.position && virtualSpace == other.virtualSpace) return true; else return other > *this; } bool SelectionPosition::operator >=(const SelectionPosition &other) const { if (position == other.position && virtualSpace == other.virtualSpace) return true; else return *this > other; } int SelectionRange::Length() const { if (anchor > caret) { return anchor.Position() - caret.Position(); } else { return caret.Position() - anchor.Position(); } } void SelectionRange::MoveForInsertDelete(bool insertion, int startChange, int length) { caret.MoveForInsertDelete(insertion, startChange, length); anchor.MoveForInsertDelete(insertion, startChange, length); } bool SelectionRange::Contains(int pos) const { if (anchor > caret) return (pos >= caret.Position()) && (pos <= anchor.Position()); else return (pos >= anchor.Position()) && (pos <= caret.Position()); } bool SelectionRange::Contains(SelectionPosition sp) const { if (anchor > caret) return (sp >= caret) && (sp <= anchor); else return (sp >= anchor) && (sp <= caret); } bool SelectionRange::ContainsCharacter(int posCharacter) const { if (anchor > caret) return (posCharacter >= caret.Position()) && (posCharacter < anchor.Position()); else return (posCharacter >= anchor.Position()) && (posCharacter < caret.Position()); } SelectionSegment SelectionRange::Intersect(SelectionSegment check) const { SelectionSegment inOrder(caret, anchor); if ((inOrder.start <= check.end) || (inOrder.end >= check.start)) { SelectionSegment portion = check; if (portion.start < inOrder.start) portion.start = inOrder.start; if (portion.end > inOrder.end) portion.end = inOrder.end; if (portion.start > portion.end) return SelectionSegment(); else return portion; } else { return SelectionSegment(); } } void SelectionRange::Swap() { std::swap(caret, anchor); } bool SelectionRange::Trim(SelectionRange range) { SelectionPosition startRange = range.Start(); SelectionPosition endRange = range.End(); SelectionPosition start = Start(); SelectionPosition end = End(); PLATFORM_ASSERT(start <= end); PLATFORM_ASSERT(startRange <= endRange); if ((startRange <= end) && (endRange >= start)) { if ((start > startRange) && (end < endRange)) { // Completely covered by range -> empty at start end = start; } else if ((start < startRange) && (end > endRange)) { // Completely covers range -> empty at start end = start; } else if (start <= startRange) { // Trim end end = startRange; } else { // PLATFORM_ASSERT(end >= endRange); // Trim start start = endRange; } if (anchor > caret) { caret = start; anchor = end; } else { anchor = start; caret = end; } return Empty(); } else { return false; } } // If range is all virtual collapse to start of virtual space void SelectionRange::MinimizeVirtualSpace() { if (caret.Position() == anchor.Position()) { int virtualSpace = caret.VirtualSpace(); if (virtualSpace > anchor.VirtualSpace()) virtualSpace = anchor.VirtualSpace(); caret.SetVirtualSpace(virtualSpace); anchor.SetVirtualSpace(virtualSpace); } } Selection::Selection() : mainRange(0), moveExtends(false), tentativeMain(false), selType(selStream) { AddSelection(SelectionRange(SelectionPosition(0))); } Selection::~Selection() { } bool Selection::IsRectangular() const { return (selType == selRectangle) || (selType == selThin); } int Selection::MainCaret() const { return ranges[mainRange].caret.Position(); } int Selection::MainAnchor() const { return ranges[mainRange].anchor.Position(); } SelectionRange &Selection::Rectangular() { return rangeRectangular; } SelectionSegment Selection::Limits() const { if (ranges.empty()) { return SelectionSegment(); } else { SelectionSegment sr(ranges[0].anchor, ranges[0].caret); for (size_t i=1; i 1) && (r < ranges.size())) { size_t mainNew = mainRange; if (mainNew >= r) { if (mainNew == 0) { mainNew = ranges.size() - 2; } else { mainNew--; } } ranges.erase(ranges.begin() + r); mainRange = mainNew; } } void Selection::DropAdditionalRanges() { SetSelection(RangeMain()); } void Selection::TentativeSelection(SelectionRange range) { if (!tentativeMain) { rangesSaved = ranges; } ranges = rangesSaved; AddSelection(range); TrimSelection(ranges[mainRange]); tentativeMain = true; } void Selection::CommitTentative() { rangesSaved.clear(); tentativeMain = false; } int Selection::CharacterInSelection(int posCharacter) const { for (size_t i=0; i ranges[i].Start().Position()) && (pos <= ranges[i].End().Position())) return i == mainRange ? 1 : 2; } return 0; } int Selection::VirtualSpaceFor(int pos) const { int virtualSpace = 0; for (size_t i=0; i= j) mainRange--; } else { j++; } } } } } void Selection::RotateMain() { mainRange = (mainRange + 1) % ranges.size(); } sqlitebrowser-3.11.2/libs/qscintilla/src/Selection.h000066400000000000000000000126231345112435200224700ustar00rootroot00000000000000// Scintilla source code edit control /** @file Selection.h ** Classes maintaining the selection. **/ // Copyright 2009 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SELECTION_H #define SELECTION_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif class SelectionPosition { int position; int virtualSpace; public: explicit SelectionPosition(int position_=INVALID_POSITION, int virtualSpace_=0) : position(position_), virtualSpace(virtualSpace_) { PLATFORM_ASSERT(virtualSpace < 800000); if (virtualSpace < 0) virtualSpace = 0; } void Reset() { position = 0; virtualSpace = 0; } void MoveForInsertDelete(bool insertion, int startChange, int length); bool operator ==(const SelectionPosition &other) const { return position == other.position && virtualSpace == other.virtualSpace; } bool operator <(const SelectionPosition &other) const; bool operator >(const SelectionPosition &other) const; bool operator <=(const SelectionPosition &other) const; bool operator >=(const SelectionPosition &other) const; int Position() const { return position; } void SetPosition(int position_) { position = position_; virtualSpace = 0; } int VirtualSpace() const { return virtualSpace; } void SetVirtualSpace(int virtualSpace_) { PLATFORM_ASSERT(virtualSpace_ < 800000); if (virtualSpace_ >= 0) virtualSpace = virtualSpace_; } void Add(int increment) { position = position + increment; } bool IsValid() const { return position >= 0; } }; // Ordered range to make drawing simpler struct SelectionSegment { SelectionPosition start; SelectionPosition end; SelectionSegment() : start(), end() { } SelectionSegment(SelectionPosition a, SelectionPosition b) { if (a < b) { start = a; end = b; } else { start = b; end = a; } } bool Empty() const { return start == end; } void Extend(SelectionPosition p) { if (start > p) start = p; if (end < p) end = p; } }; struct SelectionRange { SelectionPosition caret; SelectionPosition anchor; SelectionRange() : caret(), anchor() { } explicit SelectionRange(SelectionPosition single) : caret(single), anchor(single) { } explicit SelectionRange(int single) : caret(single), anchor(single) { } SelectionRange(SelectionPosition caret_, SelectionPosition anchor_) : caret(caret_), anchor(anchor_) { } SelectionRange(int caret_, int anchor_) : caret(caret_), anchor(anchor_) { } bool Empty() const { return anchor == caret; } int Length() const; // int Width() const; // Like Length but takes virtual space into account bool operator ==(const SelectionRange &other) const { return caret == other.caret && anchor == other.anchor; } bool operator <(const SelectionRange &other) const { return caret < other.caret || ((caret == other.caret) && (anchor < other.anchor)); } void Reset() { anchor.Reset(); caret.Reset(); } void ClearVirtualSpace() { anchor.SetVirtualSpace(0); caret.SetVirtualSpace(0); } void MoveForInsertDelete(bool insertion, int startChange, int length); bool Contains(int pos) const; bool Contains(SelectionPosition sp) const; bool ContainsCharacter(int posCharacter) const; SelectionSegment Intersect(SelectionSegment check) const; SelectionPosition Start() const { return (anchor < caret) ? anchor : caret; } SelectionPosition End() const { return (anchor < caret) ? caret : anchor; } void Swap(); bool Trim(SelectionRange range); // If range is all virtual collapse to start of virtual space void MinimizeVirtualSpace(); }; class Selection { std::vector ranges; std::vector rangesSaved; SelectionRange rangeRectangular; size_t mainRange; bool moveExtends; bool tentativeMain; public: enum selTypes { noSel, selStream, selRectangle, selLines, selThin }; selTypes selType; Selection(); ~Selection(); bool IsRectangular() const; int MainCaret() const; int MainAnchor() const; SelectionRange &Rectangular(); SelectionSegment Limits() const; // This is for when you want to move the caret in response to a // user direction command - for rectangular selections, use the range // that covers all selected text otherwise return the main selection. SelectionSegment LimitsForRectangularElseMain() const; size_t Count() const; size_t Main() const; void SetMain(size_t r); SelectionRange &Range(size_t r); const SelectionRange &Range(size_t r) const; SelectionRange &RangeMain(); const SelectionRange &RangeMain() const; SelectionPosition Start() const; bool MoveExtends() const; void SetMoveExtends(bool moveExtends_); bool Empty() const; SelectionPosition Last() const; int Length() const; void MovePositions(bool insertion, int startChange, int length); void TrimSelection(SelectionRange range); void TrimOtherSelections(size_t r, SelectionRange range); void SetSelection(SelectionRange range); void AddSelection(SelectionRange range); void AddSelectionWithoutTrim(SelectionRange range); void DropSelection(size_t r); void DropAdditionalRanges(); void TentativeSelection(SelectionRange range); void CommitTentative(); int CharacterInSelection(int posCharacter) const; int InSelectionForEOL(int pos) const; int VirtualSpaceFor(int pos) const; void Clear(); void RemoveDuplicates(); void RotateMain(); bool Tentative() const { return tentativeMain; } std::vector RangesCopy() const { return ranges; } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/SparseVector.h000066400000000000000000000131031345112435200231550ustar00rootroot00000000000000// Scintilla source code edit control /** @file SparseVector.h ** Hold data sparsely associated with elements in a range. **/ // Copyright 2016 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SPARSEVECTOR_H #define SPARSEVECTOR_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif // SparseVector is similar to RunStyles but is more efficient for cases where values occur // for one position instead of over a range of positions. template class SparseVector { private: Partitioning *starts; SplitVector *values; // Private so SparseVector objects can not be copied SparseVector(const SparseVector &); void ClearValue(int partition) { values->SetValueAt(partition, T()); } void CommonSetValueAt(int position, T value) { // Do the work of setting the value to allow for specialization of SetValueAt. assert(position < Length()); const int partition = starts->PartitionFromPosition(position); const int startPartition = starts->PositionFromPartition(partition); if (value == T()) { // Setting the empty value is equivalent to deleting the position if (position == 0) { ClearValue(partition); } else if (position == startPartition) { // Currently an element at this position, so remove ClearValue(partition); starts->RemovePartition(partition); values->Delete(partition); } // Else element remains empty } else { if (position == startPartition) { // Already a value at this position, so replace ClearValue(partition); values->SetValueAt(partition, value); } else { // Insert a new element starts->InsertPartition(partition + 1, position); values->InsertValue(partition + 1, 1, value); } } } public: SparseVector() { starts = new Partitioning(8); values = new SplitVector(); values->InsertValue(0, 2, T()); } ~SparseVector() { delete starts; starts = NULL; // starts dead here but not used by ClearValue. for (int part = 0; part < values->Length(); part++) { ClearValue(part); } delete values; values = NULL; } int Length() const { return starts->PositionFromPartition(starts->Partitions()); } int Elements() const { return starts->Partitions(); } int PositionOfElement(int element) const { return starts->PositionFromPartition(element); } T ValueAt(int position) const { assert(position < Length()); const int partition = starts->PartitionFromPosition(position); const int startPartition = starts->PositionFromPartition(partition); if (startPartition == position) { return values->ValueAt(partition); } else { return T(); } } void SetValueAt(int position, T value) { CommonSetValueAt(position, value); } void InsertSpace(int position, int insertLength) { assert(position <= Length()); // Only operation that works at end. const int partition = starts->PartitionFromPosition(position); const int startPartition = starts->PositionFromPartition(partition); if (startPartition == position) { T valueCurrent = values->ValueAt(partition); // Inserting at start of run so make previous longer if (partition == 0) { // Inserting at start of document so ensure 0 if (valueCurrent != T()) { ClearValue(0); starts->InsertPartition(1, 0); values->InsertValue(1, 1, valueCurrent); starts->InsertText(0, insertLength); } else { starts->InsertText(partition, insertLength); } } else { if (valueCurrent != T()) { starts->InsertText(partition - 1, insertLength); } else { // Insert at end of run so do not extend style starts->InsertText(partition, insertLength); } } } else { starts->InsertText(partition, insertLength); } } void DeletePosition(int position) { assert(position < Length()); int partition = starts->PartitionFromPosition(position); const int startPartition = starts->PositionFromPartition(partition); if (startPartition == position) { if (partition == 0) { ClearValue(0); } else if (partition == starts->Partitions()) { // This should not be possible ClearValue(partition); throw std::runtime_error("SparseVector: deleting end partition."); } else { ClearValue(partition); starts->RemovePartition(partition); values->Delete(partition); // Its the previous partition now that gets smaller partition--; } } starts->InsertText(partition, -1); } void Check() const { if (Length() < 0) { throw std::runtime_error("SparseVector: Length can not be negative."); } if (starts->Partitions() < 1) { throw std::runtime_error("SparseVector: Must always have 1 or more partitions."); } if (starts->Partitions() != values->Length() - 1) { throw std::runtime_error("SparseVector: Partitions and values different lengths."); } // The final element can not be set if (values->ValueAt(values->Length() - 1) != T()) { throw std::runtime_error("SparseVector: Unused style at end changed."); } } }; // The specialization for const char * makes copies and deletes them as needed. template<> inline void SparseVector::ClearValue(int partition) { const char *value = values->ValueAt(partition); delete []value; values->SetValueAt(partition, NULL); } template<> inline void SparseVector::SetValueAt(int position, const char *value) { // Make a copy of the string if (value) { const size_t len = strlen(value); char *valueCopy = new char[len + 1](); std::copy(value, value + len, valueCopy); CommonSetValueAt(position, valueCopy); } else { CommonSetValueAt(position, NULL); } } #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/SplitVector.h000066400000000000000000000166671345112435200230350ustar00rootroot00000000000000// Scintilla source code edit control /** @file SplitVector.h ** Main data structure for holding arrays that handle insertions ** and deletions efficiently. **/ // Copyright 1998-2007 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SPLITVECTOR_H #define SPLITVECTOR_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif template class SplitVector { protected: T *body; int size; int lengthBody; int part1Length; int gapLength; /// invariant: gapLength == size - lengthBody int growSize; /// Move the gap to a particular position so that insertion and /// deletion at that point will not require much copying and /// hence be fast. void GapTo(int position) { if (position != part1Length) { if (position < part1Length) { // Moving the gap towards start so moving elements towards end std::copy_backward( body + position, body + part1Length, body + gapLength + part1Length); } else { // position > part1Length // Moving the gap towards end so moving elements towards start std::copy( body + part1Length + gapLength, body + gapLength + position, body + part1Length); } part1Length = position; } } /// Check that there is room in the buffer for an insertion, /// reallocating if more space needed. void RoomFor(int insertionLength) { if (gapLength <= insertionLength) { while (growSize < size / 6) growSize *= 2; ReAllocate(size + insertionLength + growSize); } } void Init() { body = NULL; growSize = 8; size = 0; lengthBody = 0; part1Length = 0; gapLength = 0; } public: /// Construct a split buffer. SplitVector() { Init(); } ~SplitVector() { delete []body; body = 0; } int GetGrowSize() const { return growSize; } void SetGrowSize(int growSize_) { growSize = growSize_; } /// Reallocate the storage for the buffer to be newSize and /// copy exisiting contents to the new buffer. /// Must not be used to decrease the size of the buffer. void ReAllocate(int newSize) { if (newSize < 0) throw std::runtime_error("SplitVector::ReAllocate: negative size."); if (newSize > size) { // Move the gap to the end GapTo(lengthBody); T *newBody = new T[newSize]; if ((size != 0) && (body != 0)) { std::copy(body, body + lengthBody, newBody); delete []body; } body = newBody; gapLength += newSize - size; size = newSize; } } /// Retrieve the character at a particular position. /// Retrieving positions outside the range of the buffer returns 0. /// The assertions here are disabled since calling code can be /// simpler if out of range access works and returns 0. T ValueAt(int position) const { if (position < part1Length) { //PLATFORM_ASSERT(position >= 0); if (position < 0) { return 0; } else { return body[position]; } } else { //PLATFORM_ASSERT(position < lengthBody); if (position >= lengthBody) { return 0; } else { return body[gapLength + position]; } } } void SetValueAt(int position, T v) { if (position < part1Length) { PLATFORM_ASSERT(position >= 0); if (position < 0) { ; } else { body[position] = v; } } else { PLATFORM_ASSERT(position < lengthBody); if (position >= lengthBody) { ; } else { body[gapLength + position] = v; } } } T &operator[](int position) const { PLATFORM_ASSERT(position >= 0 && position < lengthBody); if (position < part1Length) { return body[position]; } else { return body[gapLength + position]; } } /// Retrieve the length of the buffer. int Length() const { return lengthBody; } /// Insert a single value into the buffer. /// Inserting at positions outside the current range fails. void Insert(int position, T v) { PLATFORM_ASSERT((position >= 0) && (position <= lengthBody)); if ((position < 0) || (position > lengthBody)) { return; } RoomFor(1); GapTo(position); body[part1Length] = v; lengthBody++; part1Length++; gapLength--; } /// Insert a number of elements into the buffer setting their value. /// Inserting at positions outside the current range fails. void InsertValue(int position, int insertLength, T v) { PLATFORM_ASSERT((position >= 0) && (position <= lengthBody)); if (insertLength > 0) { if ((position < 0) || (position > lengthBody)) { return; } RoomFor(insertLength); GapTo(position); std::fill(&body[part1Length], &body[part1Length + insertLength], v); lengthBody += insertLength; part1Length += insertLength; gapLength -= insertLength; } } /// Ensure at least length elements allocated, /// appending zero valued elements if needed. void EnsureLength(int wantedLength) { if (Length() < wantedLength) { InsertValue(Length(), wantedLength - Length(), 0); } } /// Insert text into the buffer from an array. void InsertFromArray(int positionToInsert, const T s[], int positionFrom, int insertLength) { PLATFORM_ASSERT((positionToInsert >= 0) && (positionToInsert <= lengthBody)); if (insertLength > 0) { if ((positionToInsert < 0) || (positionToInsert > lengthBody)) { return; } RoomFor(insertLength); GapTo(positionToInsert); std::copy(s + positionFrom, s + positionFrom + insertLength, body + part1Length); lengthBody += insertLength; part1Length += insertLength; gapLength -= insertLength; } } /// Delete one element from the buffer. void Delete(int position) { PLATFORM_ASSERT((position >= 0) && (position < lengthBody)); if ((position < 0) || (position >= lengthBody)) { return; } DeleteRange(position, 1); } /// Delete a range from the buffer. /// Deleting positions outside the current range fails. void DeleteRange(int position, int deleteLength) { PLATFORM_ASSERT((position >= 0) && (position + deleteLength <= lengthBody)); if ((position < 0) || ((position + deleteLength) > lengthBody)) { return; } if ((position == 0) && (deleteLength == lengthBody)) { // Full deallocation returns storage and is faster delete []body; Init(); } else if (deleteLength > 0) { GapTo(position); lengthBody -= deleteLength; gapLength += deleteLength; } } /// Delete all the buffer contents. void DeleteAll() { DeleteRange(0, lengthBody); } // Retrieve a range of elements into an array void GetRange(T *buffer, int position, int retrieveLength) const { // Split into up to 2 ranges, before and after the split then use memcpy on each. int range1Length = 0; if (position < part1Length) { int part1AfterPosition = part1Length - position; range1Length = retrieveLength; if (range1Length > part1AfterPosition) range1Length = part1AfterPosition; } std::copy(body + position, body + position + range1Length, buffer); buffer += range1Length; position = position + range1Length + gapLength; int range2Length = retrieveLength - range1Length; std::copy(body + position, body + position + range2Length, buffer); } T *BufferPointer() { RoomFor(1); GapTo(lengthBody); body[lengthBody] = 0; return body; } T *RangePointer(int position, int rangeLength) { if (position < part1Length) { if ((position + rangeLength) > part1Length) { // Range overlaps gap, so move gap to start of range. GapTo(position); return body + position + gapLength; } else { return body + position; } } else { return body + position + gapLength; } } int GapPosition() const { return part1Length; } }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/Style.cpp000066400000000000000000000103411345112435200221710ustar00rootroot00000000000000// Scintilla source code edit control /** @file Style.cxx ** Defines the font and colour style for a class of text. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include "Platform.h" #include "Scintilla.h" #include "Style.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif FontAlias::FontAlias() { } FontAlias::FontAlias(const FontAlias &other) : Font() { SetID(other.fid); } FontAlias::~FontAlias() { SetID(0); // ~Font will not release the actual font resource since it is now 0 } void FontAlias::MakeAlias(Font &fontOrigin) { SetID(fontOrigin.GetID()); } void FontAlias::ClearFont() { SetID(0); } bool FontSpecification::operator==(const FontSpecification &other) const { return fontName == other.fontName && weight == other.weight && italic == other.italic && size == other.size && characterSet == other.characterSet && extraFontFlag == other.extraFontFlag; } bool FontSpecification::operator<(const FontSpecification &other) const { if (fontName != other.fontName) return fontName < other.fontName; if (weight != other.weight) return weight < other.weight; if (italic != other.italic) return italic == false; if (size != other.size) return size < other.size; if (characterSet != other.characterSet) return characterSet < other.characterSet; if (extraFontFlag != other.extraFontFlag) return extraFontFlag < other.extraFontFlag; return false; } FontMeasurements::FontMeasurements() { Clear(); } void FontMeasurements::Clear() { ascent = 1; descent = 1; aveCharWidth = 1; spaceWidth = 1; sizeZoomed = 2; } Style::Style() : FontSpecification() { Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff), Platform::DefaultFontSize() * SC_FONT_SIZE_MULTIPLIER, 0, SC_CHARSET_DEFAULT, SC_WEIGHT_NORMAL, false, false, false, caseMixed, true, true, false); } Style::Style(const Style &source) : FontSpecification(), FontMeasurements() { Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff), 0, 0, 0, SC_WEIGHT_NORMAL, false, false, false, caseMixed, true, true, false); fore = source.fore; back = source.back; characterSet = source.characterSet; weight = source.weight; italic = source.italic; size = source.size; fontName = source.fontName; eolFilled = source.eolFilled; underline = source.underline; caseForce = source.caseForce; visible = source.visible; changeable = source.changeable; hotspot = source.hotspot; } Style::~Style() { } Style &Style::operator=(const Style &source) { if (this == &source) return * this; Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff), 0, 0, SC_CHARSET_DEFAULT, SC_WEIGHT_NORMAL, false, false, false, caseMixed, true, true, false); fore = source.fore; back = source.back; characterSet = source.characterSet; weight = source.weight; italic = source.italic; size = source.size; fontName = source.fontName; eolFilled = source.eolFilled; underline = source.underline; caseForce = source.caseForce; visible = source.visible; changeable = source.changeable; return *this; } void Style::Clear(ColourDesired fore_, ColourDesired back_, int size_, const char *fontName_, int characterSet_, int weight_, bool italic_, bool eolFilled_, bool underline_, ecaseForced caseForce_, bool visible_, bool changeable_, bool hotspot_) { fore = fore_; back = back_; characterSet = characterSet_; weight = weight_; italic = italic_; size = size_; fontName = fontName_; eolFilled = eolFilled_; underline = underline_; caseForce = caseForce_; visible = visible_; changeable = changeable_; hotspot = hotspot_; font.ClearFont(); FontMeasurements::Clear(); } void Style::ClearTo(const Style &source) { Clear( source.fore, source.back, source.size, source.fontName, source.characterSet, source.weight, source.italic, source.eolFilled, source.underline, source.caseForce, source.visible, source.changeable, source.hotspot); } void Style::Copy(Font &font_, const FontMeasurements &fm_) { font.MakeAlias(font_); (FontMeasurements &)(*this) = fm_; } sqlitebrowser-3.11.2/libs/qscintilla/src/Style.h000066400000000000000000000042361345112435200216440ustar00rootroot00000000000000// Scintilla source code edit control /** @file Style.h ** Defines the font and colour style for a class of text. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef STYLE_H #define STYLE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif struct FontSpecification { const char *fontName; int weight; bool italic; int size; int characterSet; int extraFontFlag; FontSpecification() : fontName(0), weight(SC_WEIGHT_NORMAL), italic(false), size(10 * SC_FONT_SIZE_MULTIPLIER), characterSet(0), extraFontFlag(0) { } bool operator==(const FontSpecification &other) const; bool operator<(const FontSpecification &other) const; }; // Just like Font but only has a copy of the FontID so should not delete it class FontAlias : public Font { // Private so FontAlias objects can not be assigned except for intiialization FontAlias &operator=(const FontAlias &); public: FontAlias(); FontAlias(const FontAlias &); virtual ~FontAlias(); void MakeAlias(Font &fontOrigin); void ClearFont(); }; struct FontMeasurements { unsigned int ascent; unsigned int descent; XYPOSITION aveCharWidth; XYPOSITION spaceWidth; int sizeZoomed; FontMeasurements(); void Clear(); }; /** */ class Style : public FontSpecification, public FontMeasurements { public: ColourDesired fore; ColourDesired back; bool eolFilled; bool underline; enum ecaseForced {caseMixed, caseUpper, caseLower, caseCamel}; ecaseForced caseForce; bool visible; bool changeable; bool hotspot; FontAlias font; Style(); Style(const Style &source); ~Style(); Style &operator=(const Style &source); void Clear(ColourDesired fore_, ColourDesired back_, int size_, const char *fontName_, int characterSet_, int weight_, bool italic_, bool eolFilled_, bool underline_, ecaseForced caseForce_, bool visible_, bool changeable_, bool hotspot_); void ClearTo(const Style &source); void Copy(Font &font_, const FontMeasurements &fm_); bool IsProtected() const { return !(changeable && visible);} }; #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/UniConversion.cpp000066400000000000000000000203261345112435200236760ustar00rootroot00000000000000// Scintilla source code edit control /** @file UniConversion.cxx ** Functions to handle UTF-8 and UTF-16 strings. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include "UniConversion.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif #ifdef SCI_NAMESPACE namespace Scintilla { #endif unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen) { unsigned int len = 0; for (unsigned int i = 0; i < tlen && uptr[i];) { unsigned int uch = uptr[i]; if (uch < 0x80) { len++; } else if (uch < 0x800) { len += 2; } else if ((uch >= SURROGATE_LEAD_FIRST) && (uch <= SURROGATE_TRAIL_LAST)) { len += 4; i++; } else { len += 3; } i++; } return len; } void UTF8FromUTF16(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len) { unsigned int k = 0; for (unsigned int i = 0; i < tlen && uptr[i];) { unsigned int uch = uptr[i]; if (uch < 0x80) { putf[k++] = static_cast(uch); } else if (uch < 0x800) { putf[k++] = static_cast(0xC0 | (uch >> 6)); putf[k++] = static_cast(0x80 | (uch & 0x3f)); } else if ((uch >= SURROGATE_LEAD_FIRST) && (uch <= SURROGATE_TRAIL_LAST)) { // Half a surrogate pair i++; unsigned int xch = 0x10000 + ((uch & 0x3ff) << 10) + (uptr[i] & 0x3ff); putf[k++] = static_cast(0xF0 | (xch >> 18)); putf[k++] = static_cast(0x80 | ((xch >> 12) & 0x3f)); putf[k++] = static_cast(0x80 | ((xch >> 6) & 0x3f)); putf[k++] = static_cast(0x80 | (xch & 0x3f)); } else { putf[k++] = static_cast(0xE0 | (uch >> 12)); putf[k++] = static_cast(0x80 | ((uch >> 6) & 0x3f)); putf[k++] = static_cast(0x80 | (uch & 0x3f)); } i++; } if (k < len) putf[k] = '\0'; } unsigned int UTF8CharLength(unsigned char ch) { if (ch < 0x80) { return 1; } else if (ch < 0x80 + 0x40 + 0x20) { return 2; } else if (ch < 0x80 + 0x40 + 0x20 + 0x10) { return 3; } else { return 4; } } size_t UTF16Length(const char *s, size_t len) { size_t ulen = 0; size_t charLen; for (size_t i = 0; i(s[i]); if (ch < 0x80) { charLen = 1; } else if (ch < 0x80 + 0x40 + 0x20) { charLen = 2; } else if (ch < 0x80 + 0x40 + 0x20 + 0x10) { charLen = 3; } else { charLen = 4; ulen++; } i += charLen; ulen++; } return ulen; } size_t UTF16FromUTF8(const char *s, size_t len, wchar_t *tbuf, size_t tlen) { size_t ui = 0; const unsigned char *us = reinterpret_cast(s); size_t i = 0; while ((i((ch & 0x1F) << 6); ch = us[i++]; tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); } else if (ch < 0x80 + 0x40 + 0x20 + 0x10) { tbuf[ui] = static_cast((ch & 0xF) << 12); ch = us[i++]; tbuf[ui] = static_cast(tbuf[ui] + ((ch & 0x7F) << 6)); ch = us[i++]; tbuf[ui] = static_cast(tbuf[ui] + (ch & 0x7F)); } else { // Outside the BMP so need two surrogates int val = (ch & 0x7) << 18; ch = us[i++]; val += (ch & 0x3F) << 12; ch = us[i++]; val += (ch & 0x3F) << 6; ch = us[i++]; val += (ch & 0x3F); tbuf[ui] = static_cast(((val - 0x10000) >> 10) + SURROGATE_LEAD_FIRST); ui++; tbuf[ui] = static_cast((val & 0x3ff) + SURROGATE_TRAIL_FIRST); } ui++; } return ui; } unsigned int UTF32FromUTF8(const char *s, unsigned int len, unsigned int *tbuf, unsigned int tlen) { unsigned int ui=0; const unsigned char *us = reinterpret_cast(s); unsigned int i=0; while ((i= 1) && (ch < 0x80 + 0x40 + 0x20)) { value = (ch & 0x1F) << 6; ch = us[i++]; value += ch & 0x7F; } else if (((len-i) >= 2) && (ch < 0x80 + 0x40 + 0x20 + 0x10)) { value = (ch & 0xF) << 12; ch = us[i++]; value += (ch & 0x7F) << 6; ch = us[i++]; value += ch & 0x7F; } else if ((len-i) >= 3) { value = (ch & 0x7) << 18; ch = us[i++]; value += (ch & 0x3F) << 12; ch = us[i++]; value += (ch & 0x3F) << 6; ch = us[i++]; value += ch & 0x3F; } tbuf[ui] = value; ui++; } return ui; } unsigned int UTF16FromUTF32Character(unsigned int val, wchar_t *tbuf) { if (val < SUPPLEMENTAL_PLANE_FIRST) { tbuf[0] = static_cast(val); return 1; } else { tbuf[0] = static_cast(((val - SUPPLEMENTAL_PLANE_FIRST) >> 10) + SURROGATE_LEAD_FIRST); tbuf[1] = static_cast((val & 0x3ff) + SURROGATE_TRAIL_FIRST); return 2; } } int UTF8BytesOfLead[256]; static bool initialisedBytesOfLead = false; static int BytesFromLead(int leadByte) { if (leadByte < 0xC2) { // Single byte or invalid return 1; } else if (leadByte < 0xE0) { return 2; } else if (leadByte < 0xF0) { return 3; } else if (leadByte < 0xF5) { return 4; } else { // Characters longer than 4 bytes not possible in current UTF-8 return 1; } } void UTF8BytesOfLeadInitialise() { if (!initialisedBytesOfLead) { for (int i=0; i<256; i++) { UTF8BytesOfLead[i] = BytesFromLead(i); } initialisedBytesOfLead = true; } } // Return both the width of the first character in the string and a status // saying whether it is valid or invalid. // Most invalid sequences return a width of 1 so are treated as isolated bytes but // the non-characters *FFFE, *FFFF and FDD0 .. FDEF return 3 or 4 as they can be // reasonably treated as code points in some circumstances. They will, however, // not have associated glyphs. int UTF8Classify(const unsigned char *us, int len) { // For the rules: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 if (*us < 0x80) { // Single bytes easy return 1; } else if (*us > 0xf4) { // Characters longer than 4 bytes not possible in current UTF-8 return UTF8MaskInvalid | 1; } else if (*us >= 0xf0) { // 4 bytes if (len < 4) return UTF8MaskInvalid | 1; if (UTF8IsTrailByte(us[1]) && UTF8IsTrailByte(us[2]) && UTF8IsTrailByte(us[3])) { if (((us[1] & 0xf) == 0xf) && (us[2] == 0xbf) && ((us[3] == 0xbe) || (us[3] == 0xbf))) { // *FFFE or *FFFF non-character return UTF8MaskInvalid | 4; } if (*us == 0xf4) { // Check if encoding a value beyond the last Unicode character 10FFFF if (us[1] > 0x8f) { return UTF8MaskInvalid | 1; } else if (us[1] == 0x8f) { if (us[2] > 0xbf) { return UTF8MaskInvalid | 1; } else if (us[2] == 0xbf) { if (us[3] > 0xbf) { return UTF8MaskInvalid | 1; } } } } else if ((*us == 0xf0) && ((us[1] & 0xf0) == 0x80)) { // Overlong return UTF8MaskInvalid | 1; } return 4; } else { return UTF8MaskInvalid | 1; } } else if (*us >= 0xe0) { // 3 bytes if (len < 3) return UTF8MaskInvalid | 1; if (UTF8IsTrailByte(us[1]) && UTF8IsTrailByte(us[2])) { if ((*us == 0xe0) && ((us[1] & 0xe0) == 0x80)) { // Overlong return UTF8MaskInvalid | 1; } if ((*us == 0xed) && ((us[1] & 0xe0) == 0xa0)) { // Surrogate return UTF8MaskInvalid | 1; } if ((*us == 0xef) && (us[1] == 0xbf) && (us[2] == 0xbe)) { // U+FFFE non-character - 3 bytes long return UTF8MaskInvalid | 3; } if ((*us == 0xef) && (us[1] == 0xbf) && (us[2] == 0xbf)) { // U+FFFF non-character - 3 bytes long return UTF8MaskInvalid | 3; } if ((*us == 0xef) && (us[1] == 0xb7) && (((us[2] & 0xf0) == 0x90) || ((us[2] & 0xf0) == 0xa0))) { // U+FDD0 .. U+FDEF return UTF8MaskInvalid | 3; } return 3; } else { return UTF8MaskInvalid | 1; } } else if (*us >= 0xc2) { // 2 bytes if (len < 2) return UTF8MaskInvalid | 1; if (UTF8IsTrailByte(us[1])) { return 2; } else { return UTF8MaskInvalid | 1; } } else { // 0xc0 .. 0xc1 is overlong encoding // 0x80 .. 0xbf is trail byte return UTF8MaskInvalid | 1; } } int UTF8DrawBytes(const unsigned char *us, int len) { int utf8StatusNext = UTF8Classify(us, len); return (utf8StatusNext & UTF8MaskInvalid) ? 1 : (utf8StatusNext & UTF8MaskWidth); } #ifdef SCI_NAMESPACE } #endif sqlitebrowser-3.11.2/libs/qscintilla/src/UniConversion.h000066400000000000000000000042411345112435200233410ustar00rootroot00000000000000// Scintilla source code edit control /** @file UniConversion.h ** Functions to handle UTF-8 and UTF-16 strings. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef UNICONVERSION_H #define UNICONVERSION_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif const int UTF8MaxBytes = 4; const int unicodeReplacementChar = 0xFFFD; unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen); void UTF8FromUTF16(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len); unsigned int UTF8CharLength(unsigned char ch); size_t UTF16Length(const char *s, size_t len); size_t UTF16FromUTF8(const char *s, size_t len, wchar_t *tbuf, size_t tlen); unsigned int UTF32FromUTF8(const char *s, unsigned int len, unsigned int *tbuf, unsigned int tlen); unsigned int UTF16FromUTF32Character(unsigned int val, wchar_t *tbuf); extern int UTF8BytesOfLead[256]; void UTF8BytesOfLeadInitialise(); inline bool UTF8IsTrailByte(int ch) { return (ch >= 0x80) && (ch < 0xc0); } inline bool UTF8IsAscii(int ch) { return ch < 0x80; } enum { UTF8MaskWidth=0x7, UTF8MaskInvalid=0x8 }; int UTF8Classify(const unsigned char *us, int len); // Similar to UTF8Classify but returns a length of 1 for invalid bytes // instead of setting the invalid flag int UTF8DrawBytes(const unsigned char *us, int len); // Line separator is U+2028 \xe2\x80\xa8 // Paragraph separator is U+2029 \xe2\x80\xa9 const int UTF8SeparatorLength = 3; inline bool UTF8IsSeparator(const unsigned char *us) { return (us[0] == 0xe2) && (us[1] == 0x80) && ((us[2] == 0xa8) || (us[2] == 0xa9)); } // NEL is U+0085 \xc2\x85 const int UTF8NELLength = 2; inline bool UTF8IsNEL(const unsigned char *us) { return (us[0] == 0xc2) && (us[1] == 0x85); } enum { SURROGATE_LEAD_FIRST = 0xD800 }; enum { SURROGATE_LEAD_LAST = 0xDBFF }; enum { SURROGATE_TRAIL_FIRST = 0xDC00 }; enum { SURROGATE_TRAIL_LAST = 0xDFFF }; enum { SUPPLEMENTAL_PLANE_FIRST = 0x10000 }; inline unsigned int UTF16CharLength(wchar_t uch) { return ((uch >= SURROGATE_LEAD_FIRST) && (uch <= SURROGATE_LEAD_LAST)) ? 2 : 1; } #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/UnicodeFromUTF8.h000066400000000000000000000013561345112435200234250ustar00rootroot00000000000000// Scintilla source code edit control /** @file UnicodeFromUTF8.h ** Lexer infrastructure. **/ // Copyright 2013 by Neil Hodgson // This file is in the public domain. #ifndef UNICODEFROMUTF8_H #define UNICODEFROMUTF8_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif inline int UnicodeFromUTF8(const unsigned char *us) { if (us[0] < 0xC2) { return us[0]; } else if (us[0] < 0xE0) { return ((us[0] & 0x1F) << 6) + (us[1] & 0x3F); } else if (us[0] < 0xF0) { return ((us[0] & 0xF) << 12) + ((us[1] & 0x3F) << 6) + (us[2] & 0x3F); } else if (us[0] < 0xF5) { return ((us[0] & 0x7) << 18) + ((us[1] & 0x3F) << 12) + ((us[2] & 0x3F) << 6) + (us[3] & 0x3F); } return us[0]; } #ifdef SCI_NAMESPACE } #endif #endif sqlitebrowser-3.11.2/libs/qscintilla/src/ViewStyle.cpp000066400000000000000000000447601345112435200230400ustar00rootroot00000000000000// Scintilla source code edit control /** @file ViewStyle.cxx ** Store information on how the document is to be viewed. **/ // Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include #include #include #include "Platform.h" #include "Scintilla.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "Indicator.h" #include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif MarginStyle::MarginStyle() : style(SC_MARGIN_SYMBOL), width(0), mask(0), sensitive(false), cursor(SC_CURSORREVERSEARROW) { } // A list of the fontnames - avoids wasting space in each style FontNames::FontNames() { } FontNames::~FontNames() { Clear(); } void FontNames::Clear() { for (std::vector::const_iterator it=names.begin(); it != names.end(); ++it) { delete []*it; } names.clear(); } const char *FontNames::Save(const char *name) { if (!name) return 0; for (std::vector::const_iterator it=names.begin(); it != names.end(); ++it) { if (strcmp(*it, name) == 0) { return *it; } } const size_t lenName = strlen(name) + 1; char *nameSave = new char[lenName]; memcpy(nameSave, name, lenName); names.push_back(nameSave); return nameSave; } FontRealised::FontRealised() { } FontRealised::~FontRealised() { font.Release(); } void FontRealised::Realise(Surface &surface, int zoomLevel, int technology, const FontSpecification &fs) { PLATFORM_ASSERT(fs.fontName); sizeZoomed = fs.size + zoomLevel * SC_FONT_SIZE_MULTIPLIER; if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1 sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER; float deviceHeight = static_cast(surface.DeviceHeightFont(sizeZoomed)); FontParameters fp(fs.fontName, deviceHeight / SC_FONT_SIZE_MULTIPLIER, fs.weight, fs.italic, fs.extraFontFlag, technology, fs.characterSet); font.Create(fp); ascent = static_cast(surface.Ascent(font)); descent = static_cast(surface.Descent(font)); aveCharWidth = surface.AverageCharWidth(font); spaceWidth = surface.WidthChar(font, ' '); } ViewStyle::ViewStyle() { Init(); } ViewStyle::ViewStyle(const ViewStyle &source) { Init(source.styles.size()); for (unsigned int sty=0; stysecond; } fonts.clear(); } void ViewStyle::CalculateMarginWidthAndMask() { fixedColumnWidth = marginInside ? leftMarginWidth : 0; maskInLine = 0xffffffff; int maskDefinedMarkers = 0; for (size_t margin = 0; margin < ms.size(); margin++) { fixedColumnWidth += ms[margin].width; if (ms[margin].width > 0) maskInLine &= ~ms[margin].mask; maskDefinedMarkers |= ms[margin].mask; } maskDrawInText = 0; for (int markBit = 0; markBit < 32; markBit++) { const int maskBit = 1 << markBit; switch (markers[markBit].markType) { case SC_MARK_EMPTY: maskInLine &= ~maskBit; break; case SC_MARK_BACKGROUND: case SC_MARK_UNDERLINE: maskInLine &= ~maskBit; maskDrawInText |= maskDefinedMarkers & maskBit; break; } } } void ViewStyle::Init(size_t stylesSize_) { AllocStyles(stylesSize_); nextExtendedStyle = 256; fontNames.Clear(); ResetDefaultStyle(); // There are no image markers by default, so no need for calling CalcLargestMarkerHeight() largestMarkerHeight = 0; indicators[0] = Indicator(INDIC_SQUIGGLE, ColourDesired(0, 0x7f, 0)); indicators[1] = Indicator(INDIC_TT, ColourDesired(0, 0, 0xff)); indicators[2] = Indicator(INDIC_PLAIN, ColourDesired(0xff, 0, 0)); technology = SC_TECHNOLOGY_DEFAULT; indicatorsDynamic = 0; indicatorsSetFore = 0; lineHeight = 1; lineOverlap = 0; maxAscent = 1; maxDescent = 1; aveCharWidth = 8; spaceWidth = 8; tabWidth = spaceWidth * 8; selColours.fore = ColourOptional(ColourDesired(0xff, 0, 0)); selColours.back = ColourOptional(ColourDesired(0xc0, 0xc0, 0xc0), true); selAdditionalForeground = ColourDesired(0xff, 0, 0); selAdditionalBackground = ColourDesired(0xd7, 0xd7, 0xd7); selBackground2 = ColourDesired(0xb0, 0xb0, 0xb0); selAlpha = SC_ALPHA_NOALPHA; selAdditionalAlpha = SC_ALPHA_NOALPHA; selEOLFilled = false; foldmarginColour = ColourOptional(ColourDesired(0xff, 0, 0)); foldmarginHighlightColour = ColourOptional(ColourDesired(0xc0, 0xc0, 0xc0)); whitespaceColours.fore = ColourOptional(); whitespaceColours.back = ColourOptional(ColourDesired(0xff, 0xff, 0xff)); controlCharSymbol = 0; /* Draw the control characters */ controlCharWidth = 0; selbar = Platform::Chrome(); selbarlight = Platform::ChromeHighlight(); styles[STYLE_LINENUMBER].fore = ColourDesired(0, 0, 0); styles[STYLE_LINENUMBER].back = Platform::Chrome(); caretcolour = ColourDesired(0, 0, 0); additionalCaretColour = ColourDesired(0x7f, 0x7f, 0x7f); showCaretLineBackground = false; alwaysShowCaretLineBackground = false; caretLineBackground = ColourDesired(0xff, 0xff, 0); caretLineAlpha = SC_ALPHA_NOALPHA; caretStyle = CARETSTYLE_LINE; caretWidth = 1; someStylesProtected = false; someStylesForceCase = false; hotspotColours.fore = ColourOptional(ColourDesired(0, 0, 0xff)); hotspotColours.back = ColourOptional(ColourDesired(0xff, 0xff, 0xff)); hotspotUnderline = true; hotspotSingleLine = true; leftMarginWidth = 1; rightMarginWidth = 1; ms.resize(SC_MAX_MARGIN + 1); ms[0].style = SC_MARGIN_NUMBER; ms[0].width = 0; ms[0].mask = 0; ms[1].style = SC_MARGIN_SYMBOL; ms[1].width = 16; ms[1].mask = ~SC_MASK_FOLDERS; ms[2].style = SC_MARGIN_SYMBOL; ms[2].width = 0; ms[2].mask = 0; marginInside = true; CalculateMarginWidthAndMask(); textStart = marginInside ? fixedColumnWidth : leftMarginWidth; zoomLevel = 0; viewWhitespace = wsInvisible; tabDrawMode = tdLongArrow; whitespaceSize = 1; viewIndentationGuides = ivNone; viewEOL = false; extraFontFlag = 0; extraAscent = 0; extraDescent = 0; marginStyleOffset = 0; annotationVisible = ANNOTATION_HIDDEN; annotationStyleOffset = 0; braceHighlightIndicatorSet = false; braceHighlightIndicator = 0; braceBadLightIndicatorSet = false; braceBadLightIndicator = 0; edgeState = EDGE_NONE; theEdge = EdgeProperties(0, ColourDesired(0xc0, 0xc0, 0xc0)); marginNumberPadding = 3; ctrlCharPadding = 3; // +3 For a blank on front and rounded edge each side lastSegItalicsOffset = 2; wrapState = eWrapNone; wrapVisualFlags = 0; wrapVisualFlagsLocation = 0; wrapVisualStartIndent = 0; wrapIndentMode = SC_WRAPINDENT_FIXED; } void ViewStyle::Refresh(Surface &surface, int tabInChars) { for (FontMap::iterator it = fonts.begin(); it != fonts.end(); ++it) { delete it->second; } fonts.clear(); selbar = Platform::Chrome(); selbarlight = Platform::ChromeHighlight(); for (unsigned int i=0; isecond->Realise(surface, zoomLevel, technology, it->first); } for (unsigned int k=0; kfont, *fr); } indicatorsDynamic = 0; indicatorsSetFore = 0; for (int ind = 0; ind <= INDIC_MAX; ind++) { if (indicators[ind].IsDynamic()) indicatorsDynamic++; if (indicators[ind].OverridesTextFore()) indicatorsSetFore++; } maxAscent = 1; maxDescent = 1; FindMaxAscentDescent(); maxAscent += extraAscent; maxDescent += extraDescent; lineHeight = maxAscent + maxDescent; lineOverlap = lineHeight / 10; if (lineOverlap < 2) lineOverlap = 2; if (lineOverlap > lineHeight) lineOverlap = lineHeight; someStylesProtected = false; someStylesForceCase = false; for (unsigned int l=0; l= 32) { controlCharWidth = surface.WidthChar(styles[STYLE_CONTROLCHAR].font, static_cast(controlCharSymbol)); } CalculateMarginWidthAndMask(); textStart = marginInside ? fixedColumnWidth : leftMarginWidth; } void ViewStyle::ReleaseAllExtendedStyles() { nextExtendedStyle = 256; } int ViewStyle::AllocateExtendedStyles(int numberStyles) { int startRange = static_cast(nextExtendedStyle); nextExtendedStyle += numberStyles; EnsureStyle(nextExtendedStyle); for (size_t i=startRange; i= styles.size()) { AllocStyles(index+1); } } void ViewStyle::ResetDefaultStyle() { styles[STYLE_DEFAULT].Clear(ColourDesired(0,0,0), ColourDesired(0xff,0xff,0xff), Platform::DefaultFontSize() * SC_FONT_SIZE_MULTIPLIER, fontNames.Save(Platform::DefaultFont()), SC_CHARSET_DEFAULT, SC_WEIGHT_NORMAL, false, false, false, Style::caseMixed, true, true, false); } void ViewStyle::ClearStyles() { // Reset all styles to be like the default style for (unsigned int i=0; i= x) && (pt.x < x + ms[i].width)) margin = static_cast(i); x += ms[i].width; } return margin; } bool ViewStyle::ValidStyle(size_t styleIndex) const { return styleIndex < styles.size(); } void ViewStyle::CalcLargestMarkerHeight() { largestMarkerHeight = 0; for (int m = 0; m <= MARKER_MAX; ++m) { switch (markers[m].markType) { case SC_MARK_PIXMAP: if (markers[m].pxpm && markers[m].pxpm->GetHeight() > largestMarkerHeight) largestMarkerHeight = markers[m].pxpm->GetHeight(); break; case SC_MARK_RGBAIMAGE: if (markers[m].image && markers[m].image->GetHeight() > largestMarkerHeight) largestMarkerHeight = markers[m].image->GetHeight(); break; } } } // See if something overrides the line background color: Either if caret is on the line // and background color is set for that, or if a marker is defined that forces its background // color onto the line, or if a marker is defined but has no selection margin in which to // display itself (as long as it's not an SC_MARK_EMPTY marker). These are checked in order // with the earlier taking precedence. When multiple markers cause background override, // the color for the highest numbered one is used. ColourOptional ViewStyle::Background(int marksOfLine, bool caretActive, bool lineContainsCaret) const { ColourOptional background; if ((caretActive || alwaysShowCaretLineBackground) && showCaretLineBackground && (caretLineAlpha == SC_ALPHA_NOALPHA) && lineContainsCaret) { background = ColourOptional(caretLineBackground, true); } if (!background.isSet && marksOfLine) { int marks = marksOfLine; for (int markBit = 0; (markBit < 32) && marks; markBit++) { if ((marks & 1) && (markers[markBit].markType == SC_MARK_BACKGROUND) && (markers[markBit].alpha == SC_ALPHA_NOALPHA)) { background = ColourOptional(markers[markBit].back, true); } marks >>= 1; } } if (!background.isSet && maskInLine) { int marksMasked = marksOfLine & maskInLine; if (marksMasked) { for (int markBit = 0; (markBit < 32) && marksMasked; markBit++) { if ((marksMasked & 1) && (markers[markBit].alpha == SC_ALPHA_NOALPHA)) { background = ColourOptional(markers[markBit].back, true); } marksMasked >>= 1; } } } return background; } bool ViewStyle::SelectionBackgroundDrawn() const { return selColours.back.isSet && ((selAlpha == SC_ALPHA_NOALPHA) || (selAdditionalAlpha == SC_ALPHA_NOALPHA)); } bool ViewStyle::WhitespaceBackgroundDrawn() const { return (viewWhitespace != wsInvisible) && (whitespaceColours.back.isSet); } bool ViewStyle::WhiteSpaceVisible(bool inIndent) const { return (!inIndent && viewWhitespace == wsVisibleAfterIndent) || (inIndent && viewWhitespace == wsVisibleOnlyInIndent) || viewWhitespace == wsVisibleAlways; } ColourDesired ViewStyle::WrapColour() const { if (whitespaceColours.fore.isSet) return whitespaceColours.fore; else return styles[STYLE_DEFAULT].fore; } bool ViewStyle::SetWrapState(int wrapState_) { WrapMode wrapStateWanted; switch (wrapState_) { case SC_WRAP_WORD: wrapStateWanted = eWrapWord; break; case SC_WRAP_CHAR: wrapStateWanted = eWrapChar; break; case SC_WRAP_WHITESPACE: wrapStateWanted = eWrapWhitespace; break; default: wrapStateWanted = eWrapNone; break; } bool changed = wrapState != wrapStateWanted; wrapState = wrapStateWanted; return changed; } bool ViewStyle::SetWrapVisualFlags(int wrapVisualFlags_) { bool changed = wrapVisualFlags != wrapVisualFlags_; wrapVisualFlags = wrapVisualFlags_; return changed; } bool ViewStyle::SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation_) { bool changed = wrapVisualFlagsLocation != wrapVisualFlagsLocation_; wrapVisualFlagsLocation = wrapVisualFlagsLocation_; return changed; } bool ViewStyle::SetWrapVisualStartIndent(int wrapVisualStartIndent_) { bool changed = wrapVisualStartIndent != wrapVisualStartIndent_; wrapVisualStartIndent = wrapVisualStartIndent_; return changed; } bool ViewStyle::SetWrapIndentMode(int wrapIndentMode_) { bool changed = wrapIndentMode != wrapIndentMode_; wrapIndentMode = wrapIndentMode_; return changed; } void ViewStyle::AllocStyles(size_t sizeNew) { size_t i=styles.size(); styles.resize(sizeNew); if (styles.size() > STYLE_DEFAULT) { for (; isecond; FontMap::iterator it = fonts.find(fs); if (it != fonts.end()) { // Should always reach here since map was just set for all styles return it->second; } return 0; } void ViewStyle::FindMaxAscentDescent() { for (FontMap::const_iterator it = fonts.begin(); it != fonts.end(); ++it) { if (maxAscent < it->second->ascent) maxAscent = it->second->ascent; if (maxDescent < it->second->descent) maxDescent = it->second->descent; } } sqlitebrowser-3.11.2/libs/qscintilla/src/ViewStyle.h000066400000000000000000000143351345112435200225000ustar00rootroot00000000000000// Scintilla source code edit control /** @file ViewStyle.h ** Store information on how the document is to be viewed. **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef VIEWSTYLE_H #define VIEWSTYLE_H #ifdef SCI_NAMESPACE namespace Scintilla { #endif /** */ class MarginStyle { public: int style; ColourDesired back; int width; int mask; bool sensitive; int cursor; MarginStyle(); }; /** */ class FontNames { private: std::vector names; // Private so FontNames objects can not be copied FontNames(const FontNames &); public: FontNames(); ~FontNames(); void Clear(); const char *Save(const char *name); }; class FontRealised : public FontMeasurements { // Private so FontRealised objects can not be copied FontRealised(const FontRealised &); FontRealised &operator=(const FontRealised &); public: Font font; FontRealised(); virtual ~FontRealised(); void Realise(Surface &surface, int zoomLevel, int technology, const FontSpecification &fs); }; enum IndentView {ivNone, ivReal, ivLookForward, ivLookBoth}; enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2, wsVisibleOnlyInIndent=3}; enum TabDrawMode {tdLongArrow=0, tdStrikeOut=1}; typedef std::map FontMap; enum WrapMode { eWrapNone, eWrapWord, eWrapChar, eWrapWhitespace }; class ColourOptional : public ColourDesired { public: bool isSet; ColourOptional(ColourDesired colour_=ColourDesired(0,0,0), bool isSet_=false) : ColourDesired(colour_), isSet(isSet_) { } ColourOptional(uptr_t wParam, sptr_t lParam) : ColourDesired(static_cast(lParam)), isSet(wParam != 0) { } }; struct ForeBackColours { ColourOptional fore; ColourOptional back; }; struct EdgeProperties { int column; ColourDesired colour; EdgeProperties(int column_ = 0, ColourDesired colour_ = ColourDesired(0)) : column(column_), colour(colour_) { } EdgeProperties(uptr_t wParam, sptr_t lParam) : column(static_cast(wParam)), colour(static_cast(lParam)) { } }; /** */ class ViewStyle { FontNames fontNames; FontMap fonts; public: std::vector" ""); int currentRow = indices.first().row(); const QString fieldSepHtml = ""); sqlInsertStatement.append(") VALUES ("); } // Table data rows for(const QModelIndex& index : indices) { // Separators. For first cell, only opening table row tags must be added for the HTML and nothing for the text version. if (indices.first() == index) { htmlResult.append("
"; const QString rowSepHtml = "
"; const QString fieldSepText = "\t"; #ifdef Q_OS_WIN const QString rowSepText = "\r\n"; #else const QString rowSepText = "\n"; #endif QString sqlInsertStatement = QString("INSERT INTO %1 (").arg(m->currentTableName().toString()); // Table headers if (withHeaders || inSQL) { htmlResult.append("
"); int firstColumn = indices.front().column(); for(int i = firstColumn; i <= indices.back().column(); i++) { QByteArray headerText = model()->headerData(i, Qt::Horizontal, Qt::DisplayRole).toByteArray(); if (i != firstColumn) { result.append(fieldSepText); htmlResult.append(""); sqlInsertStatement.append(", "); } result.append(headerText); htmlResult.append(headerText); sqlInsertStatement.append(sqlb::escapeIdentifier(headerText)); } result.append(rowSepText); htmlResult.append("
"); sqlResult.append(sqlInsertStatement); } else if (index.row() != currentRow) { result.append(rowSepText); htmlResult.append(rowSepHtml); sqlResult.append(");" + rowSepText + sqlInsertStatement); } else { result.append(fieldSepText); htmlResult.append(fieldSepHtml); sqlResult.append(", "); } currentRow = index.row(); QImage img; QVariant data = index.data(Qt::EditRole); // Table cell data: image? Store it as an embedded image in HTML if (!inSQL && img.loadFromData(data.toByteArray())) { QByteArray ba; QBuffer buffer(&ba); buffer.open(QIODevice::WriteOnly); img.save(&buffer, "PNG"); buffer.close(); QString imageBase64 = ba.toBase64(); htmlResult.append("\"Image\""); } else { QByteArray text; if (!m->isBinary(index)) { text = data.toByteArray(); // Table cell data: text if (text.contains('\n') || text.contains('\t')) htmlResult.append("
" + QString(text).toHtmlEscaped() + "
"); else htmlResult.append(QString(text).toHtmlEscaped()); result.append(text); sqlResult.append("'" + text.replace("'", "''") + "'"); } else // Table cell data: binary. Save as BLOB literal in SQL sqlResult.append( "X'" + data.toByteArray().toHex() + "'" ); } } sqlResult.append(");"); if ( inSQL ) { mimeData->setText(sqlResult); } else { mimeData->setHtml(htmlResult + "
"); mimeData->setText(result); } } void ExtendedTableWidget::copy(const bool withHeaders, const bool inSQL ) { QMimeData *mimeData = new QMimeData; copyMimeData(selectionModel()->selectedIndexes(), mimeData, withHeaders, inSQL); qApp->clipboard()->setMimeData(mimeData); } void ExtendedTableWidget::paste() { // Get list of selected items QItemSelectionModel* selection = selectionModel(); QModelIndexList indices = selection->selectedIndexes(); // Abort if there's nowhere to paste if(indices.isEmpty()) return; SqliteTableModel* m = qobject_cast(model()); // We're also checking for system clipboard data first. Only if the data in the system clipboard is not ours, we use the system // clipboard, otherwise we prefer the internal buffer. That's because the data in the internal buffer is easier to parse and more // accurate, too. However, if we always preferred the internal copy-paste buffer there would be no way to copy data from other // applications in here once the internal buffer has been filled. // If clipboard contains an image and no text, just insert the image const QMimeData* mimeClipboard = qApp->clipboard()->mimeData(); if (mimeClipboard->hasImage() && !mimeClipboard->hasText()) { QImage img = qApp->clipboard()->image(); QByteArray ba; QBuffer buffer(&ba); buffer.open(QIODevice::WriteOnly); img.save(&buffer, "PNG"); // We're always converting the image format to PNG here. TODO: Is that correct? buffer.close(); m->setData(indices.first(), ba); return; } // Get the clipboard text QString clipboard = qApp->clipboard()->text(); // If data in system clipboard is ours and the internal copy-paste buffer is filled, use the internal buffer; otherwise parse the // system clipboard contents (case for data copied by other application). QList clipboardTable; QList* source; if(mimeClipboard->hasHtml() && mimeClipboard->html().contains(m_generatorStamp) && !m_buffer.isEmpty()) { source = &m_buffer; } else { clipboardTable = parseClipboard(clipboard); source = &clipboardTable; } // Stop here if there's nothing to paste if(!source->size()) return; // Starting from assumption that selection is rectangular, and then first index is upper-left corner and last is lower-right. int rows = source->size(); int columns = source->first().size(); int firstRow = indices.front().row(); int firstColumn = indices.front().column(); int selectedRows = indices.back().row() - firstRow + 1; int selectedColumns = indices.back().column() - firstColumn + 1; // If last row and column are after table size, clamp it int lastRow = qMin(firstRow + rows - 1, m->rowCount() - 1); int lastColumn = qMin(firstColumn + columns - 1, m->columnCount() - 1); // Special case: if there is only one cell of data to be pasted, paste it into all selected fields if(rows == 1 && columns == 1) { QByteArray data = source->first().first(); for(int row=firstRow;rowsetData(m->index(row, column), data); } return; } // If more than one cell was selected, check if the selection matches the cliboard dimensions if(selectedRows != rows || selectedColumns != columns) { // Ask user if they are sure about this if(QMessageBox::question(this, QApplication::applicationName(), tr("The content of the clipboard is bigger than the range selected.\nDo you want to insert it anyway?"), QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) { // If the user doesn't want to paste the clipboard data anymore, stop now return; } } // If we get here, we can definitely start pasting: either the ranges match in their size or the user agreed to paste anyway // Copy the data cell by cell and as-is from the source buffer to the table int row = firstRow; for(const QByteArrayList& source_row : *source) { int column = firstColumn; for(const QByteArray& source_cell : source_row) { m->setData(m->index(row, column), source_cell); column++; if (column > lastColumn) break; } row++; if (row > lastRow) break; } } void ExtendedTableWidget::useAsFilter(const QString& filterOperator, bool binary) { QModelIndex index = selectionModel()->currentIndex(); SqliteTableModel* m = qobject_cast(model()); // Abort if there's nothing to filter if (!index.isValid() || !selectionModel()->hasSelection() || m->isBinary(index)) return; QVariant data = model()->data(index, Qt::EditRole); QString value; if (data.isNull()) value = "NULL"; else if (data.toString().isEmpty()) value = "''"; else value = data.toString(); // When Containing filter is requested (empty operator) and the value starts with // an operator character, the character is escaped. if (filterOperator.isEmpty()) value.replace(QRegExp("^(<|>|=)"), Settings::getValue("databrowser", "filter_escape").toString() + QString("\\1")); // If binary operator, the cell data is used as first value and // the second value must be added by the user. if (binary) m_tableHeader->setFilter(index.column(), value + filterOperator); else m_tableHeader->setFilter(index.column(), filterOperator + value); } void ExtendedTableWidget::duplicateUpperCell() { const QModelIndex& currentIndex = selectionModel()->currentIndex(); QModelIndex upperIndex = currentIndex.sibling(currentIndex.row() - 1, currentIndex.column()); if (upperIndex.isValid()) { SqliteTableModel* m = qobject_cast(model()); // When the data is binary, just copy it, since it cannot be edited inline. if (m->isBinary(upperIndex)) m->setData(currentIndex, m->data(upperIndex, Qt::EditRole), Qt::EditRole); else { // Open the inline editor and set the value (this mimics the behaviour of LibreOffice Calc) edit(currentIndex); QLineEdit* editor = qobject_cast(indexWidget(currentIndex)); editor->setText(upperIndex.data().toString()); } } } void ExtendedTableWidget::keyPressEvent(QKeyEvent* event) { // Call a custom copy method when Ctrl-C is pressed if(event->matches(QKeySequence::Copy)) { copy(false, false); return; } else if(event->matches(QKeySequence::Paste)) { // Call a custom paste method when Ctrl-V is pressed paste(); } else if(event->matches(QKeySequence::Print)) { openPrintDialog(); } else if(event->modifiers().testFlag(Qt::ControlModifier) && event->modifiers().testFlag(Qt::ShiftModifier) && (event->key() == Qt::Key_C)) { // Call copy with headers when Ctrl-Shift-C is pressed copy(true, false); } else if(event->modifiers().testFlag(Qt::ControlModifier) && event->modifiers().testFlag(Qt::AltModifier) && (event->key() == Qt::Key_C)) { // Call copy in SQL format when Ctrl-Alt-C is pressed copy(false, true); } else if(event->modifiers().testFlag(Qt::ControlModifier) && (event->key() == Qt::Key_Apostrophe)) { // Call duplicateUpperCell when Ctrl-' is pressed (this is used by spreadsheets for "Copy Formula from Cell Above") duplicateUpperCell(); } else if(event->key() == Qt::Key_Tab && hasFocus() && selectedIndexes().count() == 1 && selectedIndexes().at(0).row() == model()->rowCount()-1 && selectedIndexes().at(0).column() == model()->columnCount()-1) { // If the Tab key was pressed while the focus was on the last cell of the last row insert a new row automatically model()->insertRow(model()->rowCount()); } else if ((event->key() == Qt::Key_Delete) || (event->key() == Qt::Key_Backspace)) { // Check if entire rows are selected. We call the selectedRows() method here not only for simplicity reasons but also because it distinguishes between // "an entire row is selected" and "all cells of a row are selected", the former is e.g. the case when the row number is clicked, the latter when all cells // are selected manually. This is an important distinction (especially when a table has only one column!) to match the users' expectations. Also never // delete records when the backspace key was pressed. if(event->key() == Qt::Key_Delete && selectionModel()->selectedRows().size()) { // At least on entire row is selected. Because we don't allow completely arbitrary selections (at least at the moment) but only block selections, // this means that only entire entire rows are selected. If an entire row is (or multiple entire rows are) selected, we delete that record instead // of deleting only the cell contents. emit selectedRowsToBeDeleted(); } else { // No entire row is selected. So just set the selected cells to null or empty string depending on the modifier keys if(event->modifiers().testFlag(Qt::AltModifier)) { // When pressing Alt+Delete set the value to NULL for(const QModelIndex& index : selectedIndexes()) model()->setData(index, QVariant()); } else { // When pressing Delete only set the value to empty string for(const QModelIndex& index : selectedIndexes()) model()->setData(index, ""); } } } else if(event->modifiers().testFlag(Qt::ControlModifier) && (event->key() == Qt::Key_PageUp || event->key() == Qt::Key_PageDown)) { // When pressing Ctrl + Page up/down send a signal indicating the user wants to change the current table emit switchTable(event->key() == Qt::Key_PageDown); return; } // This prevents the current selection from being changed when pressing tab to move to the next filter. Note that this is in an 'if' condition, // not in an 'else if' because this way, when the tab key was pressed and the focus was on the last cell, a new row is inserted and then the tab // key press is processed a second time to move the cursor as well if((event->key() != Qt::Key_Tab && event->key() != Qt::Key_Backtab) || hasFocus()) QTableView::keyPressEvent(event); } void ExtendedTableWidget::updateGeometries() { // Call the parent implementation first - it does most of the actual logic QTableView::updateGeometries(); // Check if a model has already been set yet if(model()) { // If so and if it is a SqliteTableModel and if the parent implementation of this method decided that a scrollbar is needed, update its maximum value SqliteTableModel* m = qobject_cast(model()); if(m && verticalScrollBar()->maximum()) verticalScrollBar()->setMaximum(m->rowCount() - numVisibleRows() + 1); } } void ExtendedTableWidget::vscrollbarChanged(int value) { // Cancel if there is no model set yet - this shouldn't happen (because without a model there should be no scrollbar) but just to be sure... if(!model()) return; // Fetch more data from the DB if necessary const auto nrows = model()->rowCount(); if(nrows == 0) return; if(auto * m = dynamic_cast(model())) { int row_begin = std::min(value, nrows - 1); int row_end = std::min(value + numVisibleRows(), nrows); m->triggerCacheLoad(row_begin, row_end); } } int ExtendedTableWidget::numVisibleRows() { // Get the row numbers of the rows currently visible at the top and the bottom of the widget int row_top = rowAt(0) == -1 ? 0 : rowAt(0); int row_bottom = rowAt(height()) == -1 ? model()->rowCount() : rowAt(height()); // Calculate the number of visible rows return row_bottom - row_top; } QSet ExtendedTableWidget::selectedCols() { QSet selectedCols; for(const QModelIndex & idx : selectedIndexes()) selectedCols.insert(idx.column()); return selectedCols; } void ExtendedTableWidget::cellClicked(const QModelIndex& index) { // If Ctrl-Shift is pressed try to jump to the row referenced by the foreign key of the clicked cell if(qApp->keyboardModifiers().testFlag(Qt::ControlModifier) && qApp->keyboardModifiers().testFlag(Qt::ShiftModifier) && model()) { SqliteTableModel* m = qobject_cast(model()); sqlb::ForeignKeyClause fk = m->getForeignKeyClause(index.column()-1); if(fk.isSet()) emit foreignKeyClicked(sqlb::ObjectIdentifier(m->currentTableName().schema(), fk.table()), fk.columns().size() ? fk.columns().at(0) : "", m->data(index, Qt::EditRole).toByteArray()); } } void ExtendedTableWidget::dragEnterEvent(QDragEnterEvent* event) { event->accept(); } void ExtendedTableWidget::dragMoveEvent(QDragMoveEvent* event) { event->accept(); } void ExtendedTableWidget::dropEvent(QDropEvent* event) { QModelIndex index = indexAt(event->pos()); if (!index.isValid()) { if (event->mimeData()->hasUrls() && event->mimeData()->urls().first().isLocalFile()) emit openFileFromDropEvent(event->mimeData()->urls().first().toLocalFile()); return; } model()->dropMimeData(event->mimeData(), Qt::CopyAction, index.row(), index.column(), QModelIndex()); event->acceptProposedAction(); } void ExtendedTableWidget::selectTableLine(int lineToSelect) { SqliteTableModel* m = qobject_cast(model()); // Are there even that many lines? if(lineToSelect >= m->rowCount()) return; QApplication::setOverrideCursor( Qt::WaitCursor ); m->triggerCacheLoad(lineToSelect); // Select it clearSelection(); selectRow(lineToSelect); scrollTo(currentIndex(), QAbstractItemView::PositionAtTop); QApplication::restoreOverrideCursor(); } void ExtendedTableWidget::selectTableLines(int firstLine, int count) { SqliteTableModel* m = qobject_cast(model()); int lastLine = firstLine+count-1; // Are there even that many lines? if(lastLine >= m->rowCount()) return; selectTableLine(firstLine); QModelIndex topLeft = m->index(firstLine, 0); QModelIndex bottomRight = m->index(lastLine, m->columnCount()-1); selectionModel()->select(QItemSelection(topLeft, bottomRight), QItemSelectionModel::Select | QItemSelectionModel::Rows); } void ExtendedTableWidget::openPrintDialog() { QMimeData *mimeData = new QMimeData; QModelIndexList indices; // Print the selection, if active, or the entire table otherwise. // Given that simply clicking over a cell, selects it, one-cell selections are ignored. if (selectionModel()->hasSelection() && selectionModel()->selectedIndexes().count() > 1) indices = selectionModel()->selectedIndexes(); else for (int row=0; row < model()->rowCount(); row++) for (int column=0; column < model()->columnCount(); column++) indices << model()->index(row, column); // Copy the specified indices content to mimeData for getting the HTML representation of // the table with headers. We can then print it using an HTML text document. copyMimeData(indices, mimeData, true, false); QTextDocument *document = new QTextDocument(); document->setHtml(mimeData->html()); QPrinter printer; QPrintPreviewDialog *dialog = new QPrintPreviewDialog(&printer); connect(dialog, &QPrintPreviewDialog::paintRequested, [&](QPrinter *previewPrinter) { document->print(previewPrinter); }); dialog->exec(); delete dialog; delete document; delete mimeData; } sqlitebrowser-3.11.2/src/ExtendedTableWidget.h000066400000000000000000000060331345112435200213210ustar00rootroot00000000000000#ifndef EXTENDEDTABLEWIDGET_H #define EXTENDEDTABLEWIDGET_H #include #include #include #include #include #include class QMenu; class QMimeData; class FilterTableHeader; namespace sqlb { class ObjectIdentifier; } // Filter proxy model that only accepts distinct non-empty values. class UniqueFilterModel : public QSortFilterProxyModel { Q_OBJECT public: explicit UniqueFilterModel(QObject* parent = nullptr); bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; private: QSet m_uniqueValues; }; // We use this class to provide editor widgets for the ExtendedTableWidget. It's used for every cell in the table view. class ExtendedTableWidgetEditorDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit ExtendedTableWidgetEditorDelegate(QObject* parent = nullptr); QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override; void setEditorData(QWidget* editor, const QModelIndex& index) const override; void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override; void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override; }; class ExtendedTableWidget : public QTableView { Q_OBJECT public: explicit ExtendedTableWidget(QWidget* parent = nullptr); FilterTableHeader* filterHeader() { return m_tableHeader; } public: QSet selectedCols(); int numVisibleRows(); public slots: void reloadSettings(); void selectTableLine(int lineToSelect); void selectTableLines(int firstLine, int count); void openPrintDialog(); signals: void foreignKeyClicked(const sqlb::ObjectIdentifier& table, const QString& column, const QByteArray& value); void switchTable(bool next); // 'next' parameter is set to true if next table should be selected and to false if previous table should be selected void openFileFromDropEvent(QString); void selectedRowsToBeDeleted(); private: void copyMimeData(const QModelIndexList& fromIndices, QMimeData* mimeData, const bool withHeaders, const bool inSQL); void copy(const bool withHeaders, const bool inSQL); void paste(); void useAsFilter(const QString& filterOperator, bool binary = false); void duplicateUpperCell(); typedef QList QByteArrayList; static QList m_buffer; static QString m_generatorStamp; private slots: void vscrollbarChanged(int value); void cellClicked(const QModelIndex& index); protected: virtual void keyPressEvent(QKeyEvent* event); virtual void updateGeometries(); virtual void dragEnterEvent(QDragEnterEvent* event); virtual void dragMoveEvent(QDragMoveEvent* event); virtual void dropEvent(QDropEvent* event); FilterTableHeader* m_tableHeader; QMenu* m_contextMenu; ExtendedTableWidgetEditorDelegate* m_editorDelegate; }; #endif sqlitebrowser-3.11.2/src/FileDialog.cpp000066400000000000000000000053661345112435200200070ustar00rootroot00000000000000#include "FileDialog.h" #include "Settings.h" QString FileDialog::getOpenFileName(QWidget* parent, const QString& caption, const QString &filter, QString *selectedFilter, Options options) { QString result = QFileDialog::getOpenFileName(parent, caption, getFileDialogPath(), filter, selectedFilter, options); if(!result.isEmpty()) setFileDialogPath(result); return result; } QStringList FileDialog::getOpenFileNames(QWidget *parent, const QString &caption, const QString &filter, QString *selectedFilter, QFileDialog::Options options) { QStringList result = QFileDialog::getOpenFileNames(parent, caption, getFileDialogPath(), filter, selectedFilter, options); if(!result.isEmpty()) { QFileInfo path = QFileInfo(result.first()); setFileDialogPath(path.absolutePath()); } return result; } QString FileDialog::getSaveFileName(QWidget* parent, const QString& caption, const QString& filter, const QString& defaultFileName, QString* selectedFilter, Options options) { QString dir = getFileDialogPath(); if(!defaultFileName.isEmpty()) dir += "/" + defaultFileName; QString result = QFileDialog::getSaveFileName(parent, caption, dir, filter, selectedFilter, options); if(!result.isEmpty()) setFileDialogPath(result); return result; } QString FileDialog::getExistingDirectory(QWidget* parent, const QString& caption, Options options) { QString result = QFileDialog::getExistingDirectory(parent, caption, getFileDialogPath(), options); if(!result.isEmpty()) setFileDialogPath(result); return result; } QString FileDialog::getFileDialogPath() { switch(Settings::getValue("db", "savedefaultlocation").toInt()) { case 0: // Remember last location case 2: // Remember last location for current session only return Settings::getValue("db", "lastlocation").toString(); case 1: // Always use this locations return Settings::getValue("db", "defaultlocation").toString(); default: return ""; } } void FileDialog::setFileDialogPath(const QString& new_path) { QString dir = QFileInfo(new_path).absolutePath(); switch(Settings::getValue("db", "savedefaultlocation").toInt()) { case 0: // Remember last location Settings::setValue("db", "lastlocation", dir); break; case 2: // Remember last location for current session only Settings::setValue("db", "lastlocation", dir, true); break; case 1: // Always use this locations break; // Do nothing } } QString FileDialog::getSqlDatabaseFileFilter() { return Settings::getValue("General", "DBFileExtensions").toString() + ";;" + QObject::tr("All files (*)"); //Always add "All files (*)" to the available filters } sqlitebrowser-3.11.2/src/FileDialog.h000066400000000000000000000024261345112435200174460ustar00rootroot00000000000000#ifndef FILEDIALOG_H #define FILEDIALOG_H #include class FileDialog : public QFileDialog { Q_OBJECT public: static QString getOpenFileName(QWidget* parent = nullptr, const QString& caption = QString(), const QString& filter = QString(), QString* selectedFilter = nullptr, Options options = 0); static QStringList getOpenFileNames(QWidget* parent = nullptr, const QString& caption = QString(), const QString& filter = QString(), QString* selectedFilter = nullptr, Options options = 0); static QString getSaveFileName(QWidget* parent = nullptr, const QString& caption = QString(), const QString& filter = QString(), const QString& defaultFileName = QString(), QString* selectedFilter = nullptr, Options options = 0); static QString getExistingDirectory(QWidget* parent = nullptr, const QString& caption = QString(), Options options = 0); static QString getSqlDatabaseFileFilter(); private: static QString getFileDialogPath(); static void setFileDialogPath(const QString& new_path); }; #endif sqlitebrowser-3.11.2/src/FileExtensionManager.cpp000066400000000000000000000071701345112435200220520ustar00rootroot00000000000000#include "FileExtensionManager.h" #include "ui_FileExtensionManager.h" FileExtensionManager::FileExtensionManager(QStringList init, QWidget *parent) : QDialog(parent), ui(new Ui::FileExtensionManager) { ui->setupUi(this); int i = 0; for(const QString& itemString : init) { QString description = itemString.left(itemString.indexOf('(')).trimmed(); QString extension = itemString; extension = extension.remove (0, itemString.indexOf('(')+1).remove(')').simplified().trimmed(); QTableWidgetItem *newItemDescription = new QTableWidgetItem(description); QTableWidgetItem *newItemExtension = new QTableWidgetItem(extension); ui->tableExtensions->insertRow(i); ui->tableExtensions->setItem(i, 0, newItemDescription); ui->tableExtensions->setItem(i, 1, newItemExtension); i++; } connect(ui->buttonAdd, SIGNAL(clicked(bool)), this, SLOT(addItem())); connect(ui->buttonRemove, SIGNAL(clicked(bool)), this, SLOT(removeItem())); connect(ui->buttonDown, SIGNAL(clicked(bool)), this, SLOT(downItem())); connect(ui->buttonUp, SIGNAL(clicked(bool)), this, SLOT(upItem())); } FileExtensionManager::~FileExtensionManager() { delete ui; } void FileExtensionManager::addItem() { int i = ui->tableExtensions->rowCount(); ui->tableExtensions->insertRow(i); QTableWidgetItem *newItemDescription = new QTableWidgetItem(tr("Description")); QTableWidgetItem *newItemExtension = new QTableWidgetItem(tr("*.extension")); ui->tableExtensions->setItem(i, 0, newItemDescription); ui->tableExtensions->setItem(i, 1, newItemExtension); } void FileExtensionManager::removeItem() { QList selectedRows; for (const QTableWidgetItem* item : ui->tableExtensions->selectedItems()) { if (selectedRows.contains(item->row()) == false) { selectedRows.append(item->row()); } } qSort(selectedRows); for (int i = selectedRows.size()-1; i >= 0; --i) { ui->tableExtensions->removeRow(selectedRows[i]); } } void FileExtensionManager::upItem() { if (ui->tableExtensions->selectedItems().isEmpty()) return; int selectedRow = ui->tableExtensions->selectedItems().first()->row(); if(selectedRow == 0) return; QTableWidgetItem *t1, *t2; t1 = ui->tableExtensions->takeItem(selectedRow, 0); t2 = ui->tableExtensions->takeItem(selectedRow, 1); ui->tableExtensions->removeRow(selectedRow); ui->tableExtensions->insertRow(selectedRow-1); ui->tableExtensions->setItem(selectedRow-1, 0, t1); ui->tableExtensions->setItem(selectedRow-1, 1, t2); ui->tableExtensions->selectRow(selectedRow-1); } void FileExtensionManager::downItem() { if (ui->tableExtensions->selectedItems().isEmpty()) return; int selectedRow = ui->tableExtensions->selectedItems().first()->row(); if(selectedRow == ui->tableExtensions->rowCount() - 1) return; QTableWidgetItem *t1, *t2; t1 = ui->tableExtensions->takeItem(selectedRow, 0); t2 = ui->tableExtensions->takeItem(selectedRow, 1); ui->tableExtensions->removeRow(selectedRow); ui->tableExtensions->insertRow(selectedRow+1); ui->tableExtensions->setItem(selectedRow+1, 0, t1); ui->tableExtensions->setItem(selectedRow+1, 1, t2); ui->tableExtensions->selectRow(selectedRow+1); } QStringList FileExtensionManager::getDBFileExtensions() { QStringList result; for (int i = 0; i < ui->tableExtensions->rowCount(); ++i) { result.append(QString("%1 (%2)").arg(ui->tableExtensions->item(i, 0)->text()).arg(ui->tableExtensions->item(i, 1)->text())); } return result; } sqlitebrowser-3.11.2/src/FileExtensionManager.h000066400000000000000000000010151345112435200215070ustar00rootroot00000000000000#ifndef FILEEXTENSIONMANAGER_H #define FILEEXTENSIONMANAGER_H #include namespace Ui { class FileExtensionManager; } class FileExtensionManager : public QDialog { Q_OBJECT public: explicit FileExtensionManager(QStringList init, QWidget *parent = nullptr); ~FileExtensionManager(); QStringList getDBFileExtensions(); private: Ui::FileExtensionManager *ui; public slots: void addItem(); void removeItem(); void upItem(); void downItem(); }; #endif // FILEEXTENSIONMANAGER_H sqlitebrowser-3.11.2/src/FileExtensionManager.ui000066400000000000000000000077241345112435200217120ustar00rootroot00000000000000 FileExtensionManager 0 0 578 463 File Extension Manager &Up :/icons/up:/icons/up &Down :/icons/down:/icons/down Qt::Horizontal 40 20 &Add :/icons/field_add:/icons/field_add &Remove :/icons/field_delete:/icons/field_delete QAbstractScrollArea::AdjustToContents true 100 100 Description Extensions Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok buttonBox accepted() FileExtensionManager accept() 248 254 157 274 buttonBox rejected() FileExtensionManager reject() 316 260 286 274 sqlitebrowser-3.11.2/src/FilterLineEdit.cpp000066400000000000000000000167521345112435200206540ustar00rootroot00000000000000#include "FilterLineEdit.h" #include "Settings.h" #include #include #include #include FilterLineEdit::FilterLineEdit(QWidget* parent, QList* filters, int columnnum) : QLineEdit(parent), filterList(filters), columnNumber(columnnum) { setPlaceholderText(tr("Filter")); setClearButtonEnabled(true); setProperty("column", columnnum); // Store the column number for later use // Introduce a timer for delaying the signal triggered whenever the user changes the filter value. // The idea here is that the textChanged() event isn't connected to the update filter slot directly anymore // but instead there this timer mechanism in between: whenever the user changes the filter the delay timer // is (re)started. As soon as the user stops typing the timer has a chance to trigger and call the // delayedSignalTimerTriggered() method which then stops the timer and emits the delayed signal. delaySignalTimer = new QTimer(this); delaySignalTimer->setInterval(Settings::getValue("databrowser", "filter_delay").toInt()); // This is the milliseconds of not-typing we want to wait before triggering connect(this, SIGNAL(textChanged(QString)), delaySignalTimer, SLOT(start())); connect(delaySignalTimer, SIGNAL(timeout()), this, SLOT(delayedSignalTimerTriggered())); setWhatsThis(tr("These input fields allow you to perform quick filters in the currently selected table.\n" "By default, the rows containing the input text are filtered out.\n" "The following operators are also supported:\n" "%\tWildcard\n" ">\tGreater than\n" "<\tLess than\n" ">=\tEqual to or greater\n" "<=\tEqual to or less\n" "=\tEqual to: exact match\n" "<>\tUnequal: exact inverse match\n" "x~y\tRange: values between x and y")); // Immediately emit the delayed filter value changed signal if the user presses the enter or the return key or // the line edit widget loses focus connect(this, SIGNAL(editingFinished()), this, SLOT(delayedSignalTimerTriggered())); // Prepare for adding the What's This information and filter helper actions to the context menu setContextMenuPolicy(Qt::CustomContextMenu); connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showContextMenu(const QPoint &))); } void FilterLineEdit::delayedSignalTimerTriggered() { // Stop the timer first to avoid triggering in intervals delaySignalTimer->stop(); // Only emit text changed signal if the text has actually changed in comparison to the last emitted signal. This is necessary // because this method is also called whenever the line edit loses focus and not only when its text has definitely been changed. if(text() != lastValue) { // Emit the delayed signal using the current value emit delayedTextChanged(text()); // Remember this value for the next time lastValue = text(); } } void FilterLineEdit::keyReleaseEvent(QKeyEvent* event) { if(event->key() == Qt::Key_Tab) { if(columnNumber < filterList->size() - 1) { filterList->at(columnNumber + 1)->setFocus(); event->accept(); } } else if(event->key() == Qt::Key_Backtab) { if(columnNumber > 0) { filterList->at(columnNumber - 1)->setFocus(); event->accept(); } } } void FilterLineEdit::clear() { // When programatically clearing the line edit's value make sure the effects are applied immediately, i.e. // bypass the delayed signal timer QLineEdit::clear(); delayedSignalTimerTriggered(); } void FilterLineEdit::setText(const QString& text) { // When programatically setting the line edit's value make sure the effects are applied immediately, i.e. // bypass the delayed signal timer QLineEdit::setText(text); delayedSignalTimerTriggered(); } void FilterLineEdit::setFilterHelper(const QString& filterOperator) { setText(filterOperator + "?"); // Select the value for easy editing of the expression setSelection(filterOperator.length(), filterOperator.length()); } void FilterLineEdit::showContextMenu(const QPoint &pos) { // This has to be created here, otherwise the set of enabled options would not update accordingly. QMenu* editContextMenu = createStandardContextMenu(); editContextMenu->addSeparator(); QMenu* filterMenu = editContextMenu->addMenu(tr("Set Filter Expression")); QAction* whatsThisAction = new QAction(QIcon(":/icons/whatis"), tr("What's This?"), editContextMenu); connect(whatsThisAction, &QAction::triggered, [&]() { QWhatsThis::showText(pos, whatsThis(), this); }); QAction* isNullAction = new QAction(tr("Is NULL"), editContextMenu); connect(isNullAction, &QAction::triggered, [&]() { setText("=NULL"); }); QAction* isNotNullAction = new QAction(tr("Is not NULL"), editContextMenu); connect(isNotNullAction, &QAction::triggered, [&]() { setText("<>NULL"); }); QAction* isEmptyAction = new QAction(tr("Is empty"), editContextMenu); connect(isEmptyAction, &QAction::triggered, [&]() { setText("=''"); }); QAction* isNotEmptyAction = new QAction(tr("Is not empty"), editContextMenu); connect(isNotEmptyAction, &QAction::triggered, [&]() { setText("<>''"); }); QAction* equalToAction = new QAction(tr("Equal to..."), editContextMenu); connect(equalToAction, &QAction::triggered, [&]() { setFilterHelper(QString ("=")); }); QAction* notEqualToAction = new QAction(tr("Not equal to..."), editContextMenu); connect(notEqualToAction, &QAction::triggered, [&]() { setFilterHelper(QString ("<>")); }); QAction* greaterThanAction = new QAction(tr("Greater than..."), editContextMenu); connect(greaterThanAction, &QAction::triggered, [&]() { setFilterHelper(QString (">")); }); QAction* lessThanAction = new QAction(tr("Less than..."), editContextMenu); connect(lessThanAction, &QAction::triggered, [&]() { setFilterHelper(QString ("<")); }); QAction* greaterEqualAction = new QAction(tr("Greater or equal..."), editContextMenu); connect(greaterEqualAction, &QAction::triggered, [&]() { setFilterHelper(QString (">=")); }); QAction* lessEqualAction = new QAction(tr("Less or equal..."), editContextMenu); connect(lessEqualAction, &QAction::triggered, [&]() { setFilterHelper(QString ("<=")); }); QAction* inRangeAction = new QAction(tr("In range..."), editContextMenu); connect(inRangeAction, &QAction::triggered, [&]() { setFilterHelper(QString ("?~")); }); filterMenu->addAction(whatsThisAction); filterMenu->addSeparator(); filterMenu->addAction(isNullAction); filterMenu->addAction(isNotNullAction); filterMenu->addAction(isEmptyAction); filterMenu->addAction(isNotEmptyAction); filterMenu->addSeparator(); filterMenu->addAction(equalToAction); filterMenu->addAction(notEqualToAction); filterMenu->addAction(greaterThanAction); filterMenu->addAction(lessThanAction); filterMenu->addAction(greaterEqualAction); filterMenu->addAction(lessEqualAction); filterMenu->addAction(inRangeAction); editContextMenu->exec(mapToGlobal(pos)); } sqlitebrowser-3.11.2/src/FilterLineEdit.h000066400000000000000000000015051345112435200203070ustar00rootroot00000000000000#ifndef FILTERLINEEDIT_H #define FILTERLINEEDIT_H #include #include class QTimer; class QKeyEvent; class FilterLineEdit : public QLineEdit { Q_OBJECT public: explicit FilterLineEdit(QWidget* parent, QList* filters, int columnnum); // Override methods for programatically changing the value of the line edit void clear(); void setText(const QString& text); private slots: void delayedSignalTimerTriggered(); signals: void delayedTextChanged(QString text); protected: void keyReleaseEvent(QKeyEvent* event); void setFilterHelper(const QString& filterOperator); private: QList* filterList; int columnNumber; QTimer* delaySignalTimer; QString lastValue; private slots: void showContextMenu(const QPoint &pos); }; #endif sqlitebrowser-3.11.2/src/FilterTableHeader.cpp000066400000000000000000000071521345112435200213110ustar00rootroot00000000000000#include "FilterTableHeader.h" #include "FilterLineEdit.h" #include #include #include FilterTableHeader::FilterTableHeader(QTableView* parent) : QHeaderView(Qt::Horizontal, parent) { // Activate the click signals to allow sorting setSectionsClickable(true); setSortIndicatorShown(true); // Do some connects: Basically just resize and reposition the input widgets whenever anything changes connect(this, SIGNAL(sectionResized(int,int,int)), this, SLOT(adjustPositions())); connect(parent->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(adjustPositions())); connect(parent->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(adjustPositions())); // Set custom context menu handling setContextMenuPolicy(Qt::CustomContextMenu); } void FilterTableHeader::generateFilters(int number, bool showFirst) { // Delete all the current filter widgets qDeleteAll(filterWidgets); filterWidgets.clear(); // And generate a bunch of new ones for(int i=0;i < number; ++i) { FilterLineEdit* l = new FilterLineEdit(this, &filterWidgets, i); if(!showFirst && i == 0) // This hides the first input widget which belongs to the hidden rowid column l->setVisible(false); else l->setVisible(true); connect(l, SIGNAL(delayedTextChanged(QString)), this, SLOT(inputChanged(QString))); filterWidgets.push_back(l); } // Position them correctly adjustPositions(); } QSize FilterTableHeader::sizeHint() const { // For the size hint just take the value of the standard implementation and add the height of a input widget to it if necessary QSize s = QHeaderView::sizeHint(); if(filterWidgets.size()) s.setHeight(s.height() + filterWidgets.at(0)->sizeHint().height() + 5); // The 5 adds just adds some extra space return s; } void FilterTableHeader::updateGeometries() { // If there are any input widgets add a viewport margin to the header to generate some empty space for them which is not affected by scrolling if(filterWidgets.size()) setViewportMargins(0, 0, 0, filterWidgets.at(0)->sizeHint().height()); else setViewportMargins(0, 0, 0, 0); // Now just call the parent implementation and reposition the input widgets QHeaderView::updateGeometries(); adjustPositions(); } void FilterTableHeader::adjustPositions() { // Loop through all widgets for(int i=0;i < filterWidgets.size(); ++i) { // Get the current widget, move it and resize it QWidget* w = filterWidgets.at(i); if (QApplication::layoutDirection() == Qt::RightToLeft) w->move(width() - (sectionPosition(i) + sectionSize(i) - offset()), w->sizeHint().height() + 2); // The two adds some extra space between the header label and the input widget else w->move(sectionPosition(i) - offset(), w->sizeHint().height() + 2); // The two adds some extra space between the header label and the input widget w->resize(sectionSize(i), w->sizeHint().height()); } } void FilterTableHeader::inputChanged(const QString& new_value) { // Just get the column number and the new value and send them to anybody interested in filter changes emit filterChanged(sender()->property("column").toInt(), new_value); } void FilterTableHeader::clearFilters() { for(FilterLineEdit* filterLineEdit : filterWidgets) filterLineEdit->clear(); } void FilterTableHeader::setFilter(int column, const QString& value) { if(column < filterWidgets.size()) filterWidgets.at(column)->setText(value); } sqlitebrowser-3.11.2/src/FilterTableHeader.h000066400000000000000000000014601345112435200207520ustar00rootroot00000000000000#ifndef FILTERTABLEHEADER_H #define FILTERTABLEHEADER_H #include #include class QLineEdit; class QTableView; class FilterLineEdit; class FilterTableHeader : public QHeaderView { Q_OBJECT public: explicit FilterTableHeader(QTableView* parent = nullptr); virtual QSize sizeHint() const; bool hasFilters() const {return (filterWidgets.count() > 0);}; public slots: void generateFilters(int number, bool showFirst = false); void adjustPositions(); void clearFilters(); void setFilter(int column, const QString& value); signals: void filterChanged(int column, QString value); protected: virtual void updateGeometries(); private slots: void inputChanged(const QString& new_value); private: QList filterWidgets; }; #endif sqlitebrowser-3.11.2/src/FindReplaceDialog.cpp000066400000000000000000000113161345112435200212740ustar00rootroot00000000000000#include "FindReplaceDialog.h" #include "ui_FindReplaceDialog.h" #include FindReplaceDialog::FindReplaceDialog(QWidget* parent) : QDialog(parent), ui(new Ui::FindReplaceDialog) { // Create UI ui->setupUi(this); } FindReplaceDialog::~FindReplaceDialog() { delete ui; } void FindReplaceDialog::setExtendedScintilla(ExtendedScintilla* scintilla) { m_scintilla = scintilla; // Create indicator for find-all and replace-all occurrences foundIndicatorNumber = m_scintilla->indicatorDefine(QsciScintilla::StraightBoxIndicator); m_scintilla->setIndicatorForegroundColor(Qt::magenta, foundIndicatorNumber); m_scintilla->setIndicatorDrawUnder(true, foundIndicatorNumber); bool isWriteable = ! m_scintilla->isReadOnly(); ui->replaceWithText->setEnabled(isWriteable); ui->replaceButton->setEnabled(isWriteable); ui->replaceAllButton->setEnabled(isWriteable); connect(m_scintilla, SIGNAL(destroyed()), this, SLOT(hide())); connect(ui->findText, SIGNAL(editingFinished()), this, SLOT(cancelFind())); } bool FindReplaceDialog::findNext() { clearIndicators(); bool found = m_scintilla->findText (ui->findText->text(), ui->regexpCheckBox->isChecked(), ui->caseCheckBox->isChecked(), ui->wholeWordsCheckBox->isChecked(), ui->wrapCheckBox->isChecked(), !ui->backwardsCheckBox->isChecked()); if (!found) ui->messageLabel->setText(tr("The searched text was not found")); return found; } void FindReplaceDialog::show() { ui->findText->setFocus(); ui->findText->selectAll(); QDialog::show(); } void FindReplaceDialog::replace() { if (m_scintilla->hasSelectedText()) m_scintilla->replace(ui->replaceWithText->text()); findNext(); } void FindReplaceDialog::indicateSelection() { int fromRow, fromIndex, toRow, toIndex; m_scintilla->getSelection(&fromRow, &fromIndex, &toRow, &toIndex); m_scintilla->fillIndicatorRange(fromRow, fromIndex, toRow, toIndex, foundIndicatorNumber); } void FindReplaceDialog::findAll() { clearIndicators(); int occurrences = 0; m_scintilla->setCursorPosition(0, 0); while (m_scintilla->findText (ui->findText->text(), ui->regexpCheckBox->isChecked(), ui->caseCheckBox->isChecked(), ui->wholeWordsCheckBox->isChecked(), false, true)) { indicateSelection(); ++occurrences; } m_scintilla->clearSelection(); QString message; switch (occurrences) { case 0: message = tr("The searched text was not found."); break; case 1: message = tr("The searched text was found one time."); break; default: message = tr("The searched text was found %1 times.").arg(occurrences); break; } ui->messageLabel->setText(message); } void FindReplaceDialog::replaceAll() { clearIndicators(); int occurrences = 0; m_scintilla->setCursorPosition(0, 0); while (m_scintilla->findText (ui->findText->text(), ui->regexpCheckBox->isChecked(), ui->caseCheckBox->isChecked(), ui->wholeWordsCheckBox->isChecked(), false, true)) { m_scintilla->replace(ui->replaceWithText->text()); indicateSelection(); ++occurrences; } m_scintilla->clearSelection(); QString message; switch (occurrences) { case 0: message = tr("The searched text was not found."); break; case 1: message = tr("The searched text was replaced one time."); break; default: message = tr("The searched text was replaced %1 times.").arg(occurrences); break; } ui->messageLabel->setText(message); } void FindReplaceDialog::cancelFind() { m_scintilla->findFirst(QString(), false, false, false, false); clearIndicators(); } void FindReplaceDialog::help() { QWhatsThis::enterWhatsThisMode(); } void FindReplaceDialog::clearIndicators() { m_scintilla->clearIndicatorRange(0, 0, m_scintilla->lines(), m_scintilla->lineLength(m_scintilla->lines()), foundIndicatorNumber); ui->messageLabel->setText(""); } void FindReplaceDialog::close() { m_scintilla->clearSelection(); // Reset any previous find so it does not interfere with the next time // the dialog is open. cancelFind(); QDialog::close(); } void FindReplaceDialog::buttonBox_clicked(QAbstractButton* button) { if (button == ui->buttonBox->button(QDialogButtonBox::Help)) help(); else if (button == ui->buttonBox->button(QDialogButtonBox::Close)) close(); } void FindReplaceDialog::reject() { close(); QDialog::reject(); } sqlitebrowser-3.11.2/src/FindReplaceDialog.h000066400000000000000000000014561345112435200207450ustar00rootroot00000000000000#ifndef FindReplaceDialog_H #define FindReplaceDialog_H #include #include #include namespace Ui { class FindReplaceDialog; } class FindReplaceDialog : public QDialog { Q_OBJECT public: explicit FindReplaceDialog(QWidget* parent = nullptr); ~FindReplaceDialog(); void setExtendedScintilla(ExtendedScintilla* scintilla); void show(); private slots: bool findNext(); void replace(); void findAll(); void replaceAll(); void cancelFind(); void help(); void close(); void reject(); void buttonBox_clicked(QAbstractButton* button); private: void indicateSelection(); void clearIndicators(); Ui::FindReplaceDialog* ui; ExtendedScintilla* m_scintilla; int foundIndicatorNumber; }; #endif sqlitebrowser-3.11.2/src/FindReplaceDialog.ui000066400000000000000000000215011345112435200211240ustar00rootroot00000000000000 FindReplaceDialog 0 0 451 288 Find and Replace true 0 0 0 0 QFormLayout::ExpandingFieldsGrow Fi&nd text: findText Re&place with: replaceWithText Match &exact case false Match &only whole words When enabled, the search continues from the other end when it reaches one end of the page &Wrap around When set, the search goes backwards from cursor position, otherwise it goes forward Search &backwards <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Use regular e&xpressions 7 QLayout::SetDefaultConstraint 0 Find the next occurrence from the cursor position and in the direction set by "Search backwards" &Find Next &Replace Highlight all the occurrences of the text in the page F&ind All Replace all the occurrences of the text in the page Replace &All Qt::Vertical 20 40 75 true Qt::AlignCenter QDialogButtonBox::Close|QDialogButtonBox::Help findText replaceWithText caseCheckBox wholeWordsCheckBox wrapCheckBox backwardsCheckBox regexpCheckBox findNextButton replaceButton findAllButton replaceAllButton findNextButton clicked() FindReplaceDialog findNext() 225 242 225 132 replaceButton clicked() FindReplaceDialog replace() 225 242 225 132 findAllButton clicked() FindReplaceDialog findAll() 225 242 225 132 replaceAllButton clicked() FindReplaceDialog replaceAll() 225 242 225 132 buttonBox clicked(QAbstractButton*) FindReplaceDialog buttonBox_clicked(QAbstractButton*) 225 265 225 143 updatePreview() checkInput() updateSelection(bool) matchSimilar() sqlitebrowser-3.11.2/src/ForeignKeyEditorDelegate.cpp000066400000000000000000000137671345112435200226600ustar00rootroot00000000000000#include "sqlitedb.h" #include "ForeignKeyEditorDelegate.h" #include #include #include #include class ForeignKeyEditor : public QWidget { Q_OBJECT public: explicit ForeignKeyEditor(QWidget* parent = nullptr) : QWidget(parent) , tablesComboBox(new QComboBox(this)) , idsComboBox(new QComboBox(this)) , clauseEdit(new QLineEdit(this)) , m_btnReset(new QPushButton(tr("&Reset"), this)) { idsComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents); clauseEdit->setPlaceholderText(tr("Foreign key clauses (ON UPDATE, ON DELETE etc.)")); QHBoxLayout* layout = new QHBoxLayout(this); layout->addWidget(tablesComboBox); layout->addWidget(idsComboBox); layout->addWidget(clauseEdit); layout->addWidget(m_btnReset); layout->setSpacing(0); layout->setMargin(0); setLayout(layout); connect(m_btnReset, &QPushButton::clicked, [&] { tablesComboBox->setCurrentIndex(-1); idsComboBox->setCurrentIndex(-1); clauseEdit->clear(); }); connect(tablesComboBox, static_cast(&QComboBox::currentIndexChanged), [=](int index) { // reset ids combo box idsComboBox->setCurrentIndex(-1); // disable clauses editor if none of tables is selected bool enableClausesEditor = (index!= -1); clauseEdit->setEnabled(enableClausesEditor); }); } QString getSql() const { if (tablesComboBox->currentText().isEmpty()) return QString(); const QString table = sqlb::escapeIdentifier(tablesComboBox->currentText()); const QString clauses = clauseEdit->text(); QString id = idsComboBox->currentText(); if (!id.isEmpty()) id = QString("(%1)").arg(sqlb::escapeIdentifier(id)); return QString("%1%2 %3") .arg(table) .arg(id) .arg(clauses) .trimmed(); } QComboBox* tablesComboBox; QComboBox* idsComboBox; QLineEdit* clauseEdit; // for ON CASCADE and such private: QPushButton* m_btnReset; }; ForeignKeyEditorDelegate::ForeignKeyEditorDelegate(const DBBrowserDB& db, sqlb::Table& table, QObject* parent) : QStyledItemDelegate(parent) , m_db(db) , m_table(table) { for(auto it=m_db.schemata.constBegin();it!=m_db.schemata.constEnd();++it) { for(auto jt=it->constBegin();jt!=it->constEnd();++jt) { if((*jt)->type() == sqlb::Object::Types::Table) { QString tableName = (*jt)->name(); m_tablesIds.insert(tableName, std::dynamic_pointer_cast(*jt)->fieldNames()); } } } } QWidget* ForeignKeyEditorDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const { Q_UNUSED(option) Q_UNUSED(index) ForeignKeyEditor* editor = new ForeignKeyEditor(parent); editor->setAutoFillBackground(true); connect(editor->tablesComboBox, static_cast(&QComboBox::currentIndexChanged), [=](const QString& tableName) { QComboBox* box = editor->idsComboBox; box->clear(); box->addItem(QString()); // for those heroes who don't like to specify key explicitly box->addItems(m_tablesIds[tableName]); box->setCurrentIndex(0); }); editor->tablesComboBox->clear(); editor->tablesComboBox->addItems(m_tablesIds.keys()); return editor; } void ForeignKeyEditorDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const { ForeignKeyEditor* fkEditor = static_cast(editor); int column = index.row(); // weird? I know right const sqlb::Field& field = m_table.fields.at(column); auto fk = std::dynamic_pointer_cast(m_table.constraint({field.name()}, sqlb::Constraint::ForeignKeyConstraintType)); if (fk) { fkEditor->tablesComboBox->setCurrentText(fk->table()); fkEditor->clauseEdit->setText(fk->constraint()); if (!fk->columns().isEmpty()) fkEditor->idsComboBox->setCurrentText(fk->columns().first()); } else { fkEditor->tablesComboBox->setCurrentIndex(-1); } } void ForeignKeyEditorDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const { ForeignKeyEditor* fkEditor = static_cast(editor); QString sql = fkEditor->getSql(); int column = index.row(); const sqlb::Field& field = m_table.fields.at(column); if (sql.isEmpty()) { // Remove the foreign key m_table.removeConstraints({field.name()}, sqlb::Constraint::ConstraintTypes::ForeignKeyConstraintType); } else { // Set the foreign key sqlb::ForeignKeyClause* fk = new sqlb::ForeignKeyClause; const QString table = fkEditor->tablesComboBox->currentText(); const QString id = fkEditor->idsComboBox->currentText(); const QString clause = fkEditor->clauseEdit->text(); fk->setTable(table); if (!id.isEmpty()) fk->setColumns({id}); if (!clause.trimmed().isEmpty()) { fk->setConstraint(clause); } m_table.setConstraint({field.name()}, sqlb::ConstraintPtr(fk)); } model->setData(index, sql); } void ForeignKeyEditorDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const { Q_UNUSED(index) editor->setGeometry(option.rect); } void ForeignKeyEditorDelegate::updateTablesList(const QString& oldTableName) { // this is used for recursive table constraints when // table column references column within same table m_tablesIds.remove(oldTableName); m_tablesIds.insert(m_table.name(), m_table.fieldNames()); } #include "ForeignKeyEditorDelegate.moc" sqlitebrowser-3.11.2/src/ForeignKeyEditorDelegate.h000066400000000000000000000020501345112435200223040ustar00rootroot00000000000000#ifndef FOREIGNKEYDELEGATE_H #define FOREIGNKEYDELEGATE_H #include class DBBrowserDB; class QPushButton; class QComboBox; class QLineEdit; namespace sqlb { class Table; } class ForeignKeyEditorDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit ForeignKeyEditorDelegate(const DBBrowserDB& db, sqlb::Table& table, QObject* parent = nullptr); QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE; void setEditorData(QWidget* editor, const QModelIndex& index) const Q_DECL_OVERRIDE; void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const Q_DECL_OVERRIDE; void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE; void updateTablesList(const QString& oldTableName); private: const DBBrowserDB& m_db; sqlb::Table& m_table; mutable QMap m_tablesIds; }; #endif // FOREIGNKEYDELEGATE_H sqlitebrowser-3.11.2/src/ImportCsvDialog.cpp000066400000000000000000000760721345112435200210600ustar00rootroot00000000000000#include "ImportCsvDialog.h" #include "ui_ImportCsvDialog.h" #include "sqlitedb.h" #include "csvparser.h" #include "sqlite.h" #include "Settings.h" #include #include #include #include #include #include #include #include #include #include #include // Enable this line to show basic performance stats after each imported CSV file. Please keep in mind that while these // numbers might help to estimate the performance of the algorithm, this is not a proper benchmark. //#define CSV_BENCHMARK #ifdef CSV_BENCHMARK #include #endif ImportCsvDialog::ImportCsvDialog(const QStringList &filenames, DBBrowserDB* db, QWidget* parent) : QDialog(parent), ui(new Ui::ImportCsvDialog), csvFilenames(filenames), pdb(db) { ui->setupUi(this); // Hide "Advanced" section of the settings toggleAdvancedSection(false); // Get the actual file name out of the provided path and use it as the default table name for import // For importing several files at once, the fields have to be the same so we can safely use the first QFileInfo file(filenames.first()); ui->editName->setText(file.baseName()); // Create a list of all available encodings and create an auto completion list from them QStringList encodingList; for(const QString& enc : QTextCodec::availableCodecs()) encodingList.push_back(enc); encodingCompleter = new QCompleter(encodingList, this); encodingCompleter->setCaseSensitivity(Qt::CaseInsensitive); ui->editCustomEncoding->setCompleter(encodingCompleter); // Load last used settings and apply them ui->checkboxHeader->blockSignals(true); ui->checkBoxTrimFields->blockSignals(true); ui->checkBoxSeparateTables->blockSignals(true); ui->comboSeparator->blockSignals(true); ui->comboQuote->blockSignals(true); ui->comboEncoding->blockSignals(true); ui->checkboxHeader->setChecked(Settings::getValue("importcsv", "firstrowheader").toBool()); ui->checkBoxTrimFields->setChecked(Settings::getValue("importcsv", "trimfields").toBool()); ui->checkBoxSeparateTables->setChecked(Settings::getValue("importcsv", "separatetables").toBool()); setSeparatorChar(Settings::getValue("importcsv", "separator").toInt()); setQuoteChar(Settings::getValue("importcsv", "quotecharacter").toInt()); setEncoding(Settings::getValue("importcsv", "encoding").toString()); ui->checkboxHeader->blockSignals(false); ui->checkBoxTrimFields->blockSignals(false); ui->checkBoxSeparateTables->blockSignals(false); ui->comboSeparator->blockSignals(false); ui->comboQuote->blockSignals(false); ui->comboEncoding->blockSignals(false); // Prepare and show interface depending on how many files are selected if (csvFilenames.length() > 1) { ui->separateTables->setVisible(true); ui->checkBoxSeparateTables->setVisible(true); ui->filePickerBlock->setVisible(true); selectFiles(); } else if (csvFilenames.length() == 1) { ui->separateTables->setVisible(false); ui->checkBoxSeparateTables->setVisible(false); ui->filePickerBlock->setVisible(false); } selectedFile = csvFilenames.first(); updatePreview(); checkInput(); } ImportCsvDialog::~ImportCsvDialog() { delete ui; } namespace { void rollback( ImportCsvDialog* dialog, DBBrowserDB* pdb, DBBrowserDB::db_pointer_type* db_ptr, const QString& savepointName, size_t nRecord, const QString& message) { // Release DB handle. This needs to be done before calling revertToSavepoint as that function needs to be able to acquire its own handle. if(db_ptr) *db_ptr = nullptr; QApplication::restoreOverrideCursor(); // restore original cursor if(!message.isEmpty()) { QString sCSVInfo = QObject::tr("Error importing data"); if(nRecord) sCSVInfo += QObject::tr(" from record number %1").arg(nRecord); QString error = sCSVInfo + QObject::tr(".\n%1").arg(message); QMessageBox::warning(dialog, QApplication::applicationName(), error); } pdb->revertToSavepoint(savepointName); } } class CSVImportProgress : public CSVProgress { public: explicit CSVImportProgress(unsigned long long filesize) : totalFileSize(filesize) { m_pProgressDlg = new QProgressDialog( QObject::tr("Importing CSV file..."), QObject::tr("Cancel"), 0, 10000); m_pProgressDlg->setWindowModality(Qt::ApplicationModal); } ~CSVImportProgress() { delete m_pProgressDlg; } void start() { m_pProgressDlg->show(); } bool update(unsigned long long pos) { m_pProgressDlg->setValue(static_cast((static_cast(pos) / static_cast(totalFileSize)) * 10000.0f)); qApp->processEvents(); return !m_pProgressDlg->wasCanceled(); } void end() { m_pProgressDlg->hide(); } private: QProgressDialog* m_pProgressDlg; unsigned long long totalFileSize; }; void ImportCsvDialog::accept() { // Save settings Settings::setValue("importcsv", "firstrowheader", ui->checkboxHeader->isChecked()); Settings::setValue("importcsv", "separator", currentSeparatorChar()); Settings::setValue("importcsv", "quotecharacter", currentQuoteChar()); Settings::setValue("importcsv", "trimfields", ui->checkBoxTrimFields->isChecked()); Settings::setValue("importcsv", "separatetables", ui->checkBoxSeparateTables->isChecked()); Settings::setValue("importcsv", "encoding", currentEncoding()); // Get all the selected files and start the import if (ui->filePickerBlock->isVisible()) { bool filesLeft = false; // Loop through all the rows in the file picker list for (int i = 0; i < ui->filePicker->count(); i++) { auto item = ui->filePicker->item(i); int row = ui->filePicker->row(item); // Check for files that aren't hidden (=imported) yet but that are checked and thus marked for import if (item->checkState() == Qt::Checked && !ui->filePicker->isRowHidden(row)) { if(!importCsv(item->data(Qt::DisplayRole).toString(), item->data(Qt::UserRole).toString())) { // If we're supposed to cancel the import process, we always have at least one file left (the cancelled one). Also // we stop looping through the rest of the CSV files. filesLeft = true; break; } // Hide each row after it's done ui->filePicker->setRowHidden(row, true); } else if(!ui->filePicker->isRowHidden(row)) { // Check for files that aren't hidden yet but that aren't checked either. These are files that are still left // to be imported filesLeft = true; } } // Don't close the window if there are still files left to be imported if(filesLeft) { QApplication::restoreOverrideCursor(); // restore original cursor return; } } else { importCsv(csvFilenames.first()); } QMessageBox::information(this, QApplication::applicationName(), tr("Import completed")); QApplication::restoreOverrideCursor(); // restore original cursor QDialog::accept(); } void ImportCsvDialog::updatePreview() { // Show/hide custom quote/separator input fields ui->editCustomQuote->setVisible(ui->comboQuote->currentIndex() == ui->comboQuote->count()-1); ui->editCustomSeparator->setVisible(ui->comboSeparator->currentIndex() == ui->comboSeparator->count()-1); ui->editCustomEncoding->setVisible(ui->comboEncoding->currentIndex() == ui->comboEncoding->count()-1); // Reset preview widget ui->tablePreview->clear(); ui->tablePreview->setColumnCount(0); ui->tablePreview->setRowCount(0); // Analyse CSV file sqlb::FieldVector fieldList = generateFieldList(selectedFile); // Reset preview widget ui->tablePreview->clear(); ui->tablePreview->setColumnCount(fieldList.size()); // Exit if there are no lines to preview at all if(fieldList.size() == 0) return; // Set horizontal header data QStringList horizontalHeader; for(const sqlb::Field& field : fieldList) horizontalHeader.push_back(field.name()); ui->tablePreview->setHorizontalHeaderLabels(horizontalHeader); // Parse file parseCSV(selectedFile, [this](size_t rowNum, const CSVRow& data) -> bool { // Skip first row if it is to be used as header if(rowNum == 0 && ui->checkboxHeader->isChecked()) return true; // Decrease the row number by one if the header checkbox is checked to take into account that the first row was used for the table header labels // and therefore all data rows move one row up. if(ui->checkboxHeader->isChecked()) rowNum--; // Fill data section ui->tablePreview->setRowCount(ui->tablePreview->rowCount() + 1); for(size_t i=0;itablePreview->setVerticalHeaderItem(rowNum, new QTableWidgetItem(QString::number(rowNum + 1))); // Add table item. Limit data length to a maximum character count to avoid a sluggish UI. And it's very unlikely that this // many characters are going to be needed anyway for a preview. int data_length = data.fields[i].data_length; if(data_length > 1024) data_length = 1024; ui->tablePreview->setItem( rowNum, i, new QTableWidgetItem(QString::fromUtf8(data.fields[i].data, data_length))); } return true; }, 20); } void ImportCsvDialog::checkInput() { bool allowImporting = false; if (ui->filePickerBlock->isVisible()) { bool checkedItem = false; for (int i = 0; i < ui->filePicker->count(); i++) { if (ui->filePicker->item(i)->checkState() == Qt::Checked) checkedItem = true; } allowImporting = !ui->editName->text().isEmpty() && checkedItem; } else { allowImporting = !ui->editName->text().isEmpty(); } if (ui->filePicker->currentItem() && ui->checkBoxSeparateTables->isChecked()) { ui->filePicker->currentItem()->setData(Qt::UserRole, ui->editName->text()); } ui->matchSimilar->setEnabled(ui->filePicker->currentItem() != nullptr); ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(allowImporting); } void ImportCsvDialog::selectFiles() { for (auto fileName : csvFilenames) { auto fInfo = QFileInfo(fileName); auto item = new QListWidgetItem(); item->setText(fileName); item->setData(Qt::UserRole, fInfo.baseName()); item->setCheckState(Qt::Checked); ui->filePicker->addItem(item); } connect(ui->filePicker, &QListWidget::itemSelectionChanged, this, &ImportCsvDialog::updateSelectedFilePreview); } void ImportCsvDialog::updateSelectedFilePreview() { auto selection = ui->filePicker->selectedItems(); if(!selection.isEmpty()) { auto item = selection.first(); selectedFile = item->data(Qt::DisplayRole).toString(); ui->editName->setText(item->data(Qt::UserRole).toString()); updatePreview(); checkInput(); } } void ImportCsvDialog::updateSelection(bool selected) { for (int i = 0; i < ui->filePicker->count(); i++) ui->filePicker->item(i)->setCheckState(selected ? Qt::Checked : Qt::Unchecked); ui->toggleSelected->setText(selected ? tr("Deselect All") : tr("Select All")); checkInput(); } void ImportCsvDialog::matchSimilar() { auto item = ui->filePicker->currentItem(); auto selectedHeader = generateFieldList(item->data(Qt::DisplayRole).toString()); for (int i = 0; i < ui->filePicker->count(); i++) { auto item = ui->filePicker->item(i); auto header = generateFieldList(item->data(Qt::DisplayRole).toString()); if (selectedHeader.size() == header.size()) { bool matchingHeader = std::equal(selectedHeader.begin(), selectedHeader.end(), header.begin(), [](const sqlb::Field& item1, const sqlb::Field& item2) -> bool { return (item1.name() == item2.name()); }); if (matchingHeader) { item->setCheckState(Qt::Checked); item->setBackgroundColor(Qt::green); } } else { item->setCheckState(Qt::Unchecked); item->setBackground(Qt::white); } } checkInput(); } CSVParser::ParserResult ImportCsvDialog::parseCSV(const QString &fileName, std::function rowFunction, size_t count) { // Parse all csv data QFile file(fileName); file.open(QIODevice::ReadOnly); CSVParser csv(ui->checkBoxTrimFields->isChecked(), currentSeparatorChar(), currentQuoteChar()); // Only show progress dialog if we parse all rows. The assumption here is that if a row count limit has been set, it won't be a very high one. if(count == 0) csv.setCSVProgress(new CSVImportProgress(file.size())); QTextStream tstream(&file); tstream.setCodec(currentEncoding().toUtf8()); return csv.parse(rowFunction, tstream, count); } sqlb::FieldVector ImportCsvDialog::generateFieldList(const QString& filename) { sqlb::FieldVector fieldList; // List of fields in the file // Parse the first couple of records of the CSV file and only analyse them parseCSV(filename, [this, &fieldList](size_t rowNum, const CSVRow& data) -> bool { // Has this row more columns than the previous one? Then add more fields to the field list as necessary. for(size_t i=fieldList.size();icheckboxHeader->isChecked()) { // Take field name from CSV and remove invalid characters fieldname = QString::fromUtf8(data.fields[i].data, data.fields[i].data_length); fieldname.replace("`", ""); fieldname.replace(" ", ""); fieldname.replace('"', ""); fieldname.replace("'",""); fieldname.replace(",",""); fieldname.replace(";",""); } // If we don't have a field name by now, generate one if(fieldname.isEmpty()) fieldname = QString("field%1").arg(i+1); // Add field to the column list. For now we set the data type to nothing but this might be overwritten later in the automatic // type detection code. fieldList.emplace_back(fieldname, ""); } // Try to find out a data type for each column. Skip the header row if there is one. if(!ui->checkNoTypeDetection->isChecked() && !(rowNum == 0 && ui->checkboxHeader->isChecked())) { for(size_t i=0;i 1 && ui->checkBoxSeparateTables->isChecked()) { if (name.isEmpty()) { QFileInfo fileInfo(fileName); tableName = fileInfo.baseName(); } else { tableName = name; } } else { tableName = ui->editName->text(); } // Analyse CSV file sqlb::FieldVector fieldList = generateFieldList(fileName); if(fieldList.size() == 0) return true; // Are we importing into an existing table? bool importToExistingTable = false; const sqlb::ObjectPtr obj = pdb->getObjectByName(sqlb::ObjectIdentifier("main", tableName)); if(obj && obj->type() == sqlb::Object::Types::Table) { if(std::dynamic_pointer_cast(obj)->fields.size() != fieldList.size()) { QMessageBox::warning(this, QApplication::applicationName(), tr("There is already a table named '%1' and an import into an existing table is only possible if the number of columns match.").arg(tableName)); return true; } else { // Only ask whether to import into the existing table if the 'Yes all' button has not been clicked (yet) if(!dontAskForExistingTableAgain.contains(tableName)) { int answer = QMessageBox::question(this, QApplication::applicationName(), tr("There is already a table named '%1'. Do you want to import the data into it?").arg(tableName), QMessageBox::Yes | QMessageBox::No | QMessageBox::YesAll | QMessageBox::Cancel, QMessageBox::No); // Stop now if the No button has been clicked if(answer == QMessageBox::No) return true; // Stop now if the Cancel button has been clicked. But also indicate, that the entire import process should be stopped. if(answer == QMessageBox::Cancel) return false; // If the 'Yes all' button has been clicked, save that for later if(answer == QMessageBox::YesAll) dontAskForExistingTableAgain.append(tableName); } // If we reached this point, this means that either the 'Yes' or the 'Yes all' button has been clicked or that no message box was shown at all // because the 'Yes all' button has been clicked for a previous file importToExistingTable = true; } } // Create a savepoint, so we can rollback in case of any errors during importing // db needs to be saved or an error will occur QString restorepointName = pdb->generateSavepointName("csvimport"); if(!pdb->setSavepoint(restorepointName)) { rollback(this, pdb, nullptr, restorepointName, 0, tr("Creating restore point failed: %1").arg(pdb->lastError())); return false; } // Create table QVector nullValues; std::vector failOnMissingFieldList; bool ignoreDefaults = ui->checkIgnoreDefaults->isChecked(); bool failOnMissing = ui->checkFailOnMissing->isChecked(); if(!importToExistingTable) { if(!pdb->createTable(sqlb::ObjectIdentifier("main", tableName), fieldList)) { rollback(this, pdb, nullptr, restorepointName, 0, tr("Creating the table failed: %1").arg(pdb->lastError())); return false; } // If we're creating the table in this import session, don't ask the user if it's okay to import more data into it. It seems // safe to just assume that's what they want. dontAskForExistingTableAgain.append(tableName); } else { // Importing into an existing table. So find out something about it's structure. // Prepare the values for each table column that are to be inserted if the field in the CSV file is empty. Depending on the data type // and the constraints of a field, we need to handle this case differently. sqlb::TablePtr tbl = pdb->getObjectByName(sqlb::ObjectIdentifier("main", tableName)); if(tbl) { for(const sqlb::Field& f : tbl->fields) { // For determining the value for empty fields we follow a set of rules // Normally we don't have to fail the import when importing an empty field. This last value of the vector // is changed to true later if we actually do want to fail the import for this field. failOnMissingFieldList.push_back(false); // If a field has a default value, that gets priority over everything else. // Exception: if the user wants to ignore default values we never use them. if(!ignoreDefaults && !f.defaultValue().isNull()) { nullValues << f.defaultValue().toUtf8(); } else { // If it has no default value, check if the field is NOT NULL if(f.notnull()) { // The field is NOT NULL // If this is an integer column insert 0. Otherwise insert an empty string. if(f.isInteger()) nullValues << "0"; else nullValues << ""; // If the user wants to fail the import, remember this field if(failOnMissing) failOnMissingFieldList.back() = true; } else { // The field is not NOT NULL (stupid double negation here! NULL values are allowed in this case) // Just insert a NULL value nullValues << QByteArray(); } } } } } // Prepare the INSERT statement. The prepared statement can then be reused for each row to insert QString sQuery = QString("INSERT INTO %1 VALUES(").arg(sqlb::escapeIdentifier(tableName)); for(size_t i=1;i<=fieldList.size();i++) sQuery.append(QString("?%1,").arg(i)); sQuery.chop(1); // Remove last comma sQuery.append(")"); sqlite3_stmt* stmt; auto pDb = pdb->get(tr("importing CSV")); sqlite3_prepare_v2(pDb.get(), sQuery.toUtf8(), sQuery.toUtf8().length(), &stmt, nullptr); // Parse entire file size_t lastRowNum = 0; CSVParser::ParserResult result = parseCSV(fileName, [&](size_t rowNum, const CSVRow& data) -> bool { // Process the parser results row by row #ifdef CSV_BENCHMARK qint64 timeAtStartOfRowFunction = timer.elapsed(); #endif // Save row num for later use. This is used in the case of an error to tell the user in which row the error ocurred lastRowNum = rowNum; // If this is the first row and we want to use the first row as table header, skip it now because this is the data import, not the header parsing if(rowNum == 0 && ui->checkboxHeader->isChecked()) return true; // Bind all values for(size_t i=0;i(nullValues.size()) > i) { // Do we want to fail when trying to import an empty value into this field? Then exit with an error. if(failOnMissingFieldList.at(i)) return false; // This is an empty value. We'll need to look up how to handle it depending on the field to be inserted into. const QByteArray& val = nullValues.at(i); if(!val.isNull()) // No need to bind NULL values here as that is the default bound value in SQLite sqlite3_bind_text(stmt, i+1, val, val.size(), SQLITE_STATIC); // When importing into a new table, use the missing values setting directly } else if(!importToExistingTable && data.fields[i].data_length == 0) { // No need to bind NULL values here as that is the default bound value in SQLite } else { // This is a non-empty value, or we want to insert the empty string. Just add it to the statement sqlite3_bind_text(stmt, i+1, data.fields[i].data, data.fields[i].data_length, SQLITE_STATIC); } } // Insert row if(sqlite3_step(stmt) != SQLITE_DONE) return false; // Reset statement for next use. Also reset all bindings to NULL. This is important, so we don't need to bind missing columns or empty values in NULL // columns manually. sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); #ifdef CSV_BENCHMARK timesRowFunction += timer.elapsed() - timeAtStartOfRowFunction; #endif return true; }); // Success? if(result != CSVParser::ParserResult::ParserResultSuccess) { // Some error occurred or the user cancelled the action // Rollback the entire import. If the action was cancelled, don't show an error message. If it errored, show an error message. if(result == CSVParser::ParserResult::ParserResultCancelled) { sqlite3_finalize(stmt); rollback(this, pdb, &pDb, restorepointName, 0, QString()); return false; } else { QString error(sqlite3_errmsg(pDb.get())); sqlite3_finalize(stmt); rollback(this, pdb, &pDb, restorepointName, lastRowNum, tr("Inserting row failed: %1").arg(error)); return false; } } // Clean up prepared statement sqlite3_finalize(stmt); #ifdef CSV_BENCHMARK QMessageBox::information(this, qApp->applicationName(), tr("Importing the file '%1' took %2ms. Of this %3ms were spent in the row function.") .arg(fileName) .arg(timer.elapsed()) .arg(timesRowFunction)); #endif return true; } void ImportCsvDialog::setQuoteChar(const QChar& c) { QComboBox* combo = ui->comboQuote; int index = combo->findText(c); if(index == -1) { combo->setCurrentIndex(combo->count()); ui->editCustomQuote->setText(c); } else { combo->setCurrentIndex(index); } } char ImportCsvDialog::currentQuoteChar() const { // The last item in the combobox is the 'Other' item; if it is selected return the text of the line edit field instead if(ui->comboQuote->currentIndex() == ui->comboQuote->count()-1) return ui->editCustomQuote->text().length() ? ui->editCustomQuote->text().at(0).toLatin1() : 0; if(ui->comboQuote->currentText().length()) return ui->comboQuote->currentText().at(0).toLatin1(); else return 0; } void ImportCsvDialog::setSeparatorChar(const QChar& c) { QComboBox* combo = ui->comboSeparator; QString sText = c == '\t' ? QString("Tab") : QString(c); int index = combo->findText(sText); if(index == -1) { combo->setCurrentIndex(combo->count()); ui->editCustomSeparator->setText(c); } else { combo->setCurrentIndex(index); } } char ImportCsvDialog::currentSeparatorChar() const { // The last item in the combobox is the 'Other' item; if it is selected return the text of the line edit field instead if(ui->comboSeparator->currentIndex() == ui->comboSeparator->count()-1) return ui->editCustomSeparator->text().length() ? ui->editCustomSeparator->text().at(0).toLatin1() : 0; return ui->comboSeparator->currentText() == tr("Tab") ? '\t' : ui->comboSeparator->currentText().at(0).toLatin1(); } void ImportCsvDialog::setEncoding(const QString& sEnc) { QComboBox* combo = ui->comboEncoding; int index = combo->findText(sEnc); if(index == -1) { combo->setCurrentIndex(combo->count()); ui->editCustomEncoding->setText(sEnc); } else { combo->setCurrentIndex(index); } } QString ImportCsvDialog::currentEncoding() const { // The last item in the combobox is the 'Other' item; if it is selected return the text of the line edit field instead if(ui->comboEncoding->currentIndex() == ui->comboEncoding->count()-1) return ui->editCustomEncoding->text().length() ? ui->editCustomEncoding->text() : "UTF-8"; else return ui->comboEncoding->currentText(); } void ImportCsvDialog::toggleAdvancedSection(bool show) { ui->labelNoTypeDetection->setVisible(show); ui->checkNoTypeDetection->setVisible(show); ui->labelFailOnMissing->setVisible(show); ui->checkFailOnMissing->setVisible(show); ui->labelIgnoreDefaults->setVisible(show); ui->checkIgnoreDefaults->setVisible(show); } sqlitebrowser-3.11.2/src/ImportCsvDialog.h000066400000000000000000000025751345112435200205220ustar00rootroot00000000000000#ifndef IMPORTCSVDIALOG_H #define IMPORTCSVDIALOG_H #include "csvparser.h" #include "sqlitetypes.h" #include #include class DBBrowserDB; class QCompleter; class QListWidgetItem; namespace Ui { class ImportCsvDialog; } class ImportCsvDialog : public QDialog { Q_OBJECT public: explicit ImportCsvDialog(const QStringList& filenames, DBBrowserDB* db, QWidget* parent = nullptr); ~ImportCsvDialog(); private slots: virtual void accept(); void updatePreview(); void checkInput(); void selectFiles(); void updateSelectedFilePreview(); void updateSelection(bool); void matchSimilar(); void toggleAdvancedSection(bool show); private: Ui::ImportCsvDialog* ui; QStringList csvFilenames; QString selectedFile; DBBrowserDB* pdb; QCompleter* encodingCompleter; QStringList dontAskForExistingTableAgain; CSVParser::ParserResult parseCSV(const QString& fileName, std::function rowFunction, size_t count = 0); sqlb::FieldVector generateFieldList(const QString& filename); bool importCsv(const QString& f, const QString& n = QString()); void setQuoteChar(const QChar& c); char currentQuoteChar() const; void setSeparatorChar(const QChar& c); char currentSeparatorChar() const; void setEncoding(const QString& sEnc); QString currentEncoding() const; }; #endif sqlitebrowser-3.11.2/src/ImportCsvDialog.ui000066400000000000000000000436741345112435200207150ustar00rootroot00000000000000 ImportCsvDialog 0 0 788 717 Import CSV file QFormLayout::ExpandingFieldsGrow Table na&me editName &Column names in first line checkboxHeader Field &separator comboSeparator , ; Tab | Other 1 Qt::Horizontal 40 20 &Quote character comboQuote " ' Other 1 Qt::Horizontal 40 20 &Encoding comboEncoding UTF-8 UTF-16 ISO-8859-1 Other Qt::Horizontal 40 20 Trim fields? checkBoxTrimFields true Separate tables checkBoxSeparateTables Advanced :/icons/down:/icons/down true When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Ignore default &values checkIgnoreDefaults Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Fail on missing values checkFailOnMissing Disable data type detection Disable the automatic data type detection when creating a new table. Qt::Vertical false true 0 0 0 0 7 QLayout::SetDefaultConstraint 0 Deselect All true true false Match Similar Qt::Vertical 20 40 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok editName checkboxHeader comboSeparator editCustomSeparator comboQuote editCustomQuote comboEncoding editCustomEncoding checkBoxTrimFields checkBoxSeparateTables buttonAdvanced checkIgnoreDefaults checkFailOnMissing filePicker toggleSelected matchSimilar tablePreview comboSeparator currentIndexChanged(int) ImportCsvDialog updatePreview() 232 99 445 64 editName textChanged(QString) ImportCsvDialog checkInput() 609 13 631 45 editCustomSeparator textChanged(QString) ImportCsvDialog updatePreview() 478 99 577 76 editCustomQuote textChanged(QString) ImportCsvDialog updatePreview() 478 132 530 90 editCustomEncoding textChanged(QString) ImportCsvDialog updatePreview() 495 165 540 133 checkBoxTrimFields toggled(bool) ImportCsvDialog updatePreview() 184 191 368 244 comboEncoding currentIndexChanged(int) ImportCsvDialog updatePreview() 263 183 572 121 checkboxHeader toggled(bool) ImportCsvDialog updatePreview() 184 60 354 45 toggleSelected toggled(bool) ImportCsvDialog updateSelection(bool) 780 337 368 244 comboQuote currentIndexChanged(int) ImportCsvDialog updatePreview() 232 132 350 88 buttonBox accepted() ImportCsvDialog accept() 272 677 157 274 buttonBox rejected() ImportCsvDialog reject() 340 677 286 274 checkBoxSeparateTables toggled(bool) ImportCsvDialog checkInput() 194 236 368 244 matchSimilar pressed() ImportCsvDialog matchSimilar() 780 378 368 244 buttonAdvanced toggled(bool) ImportCsvDialog toggleAdvancedSection(bool) 214 259 393 358 updatePreview() checkInput() updateSelection(bool) matchSimilar() toggleAdvancedSection(bool) sqlitebrowser-3.11.2/src/MainWindow.cpp000066400000000000000000004537511345112435200200710ustar00rootroot00000000000000#include "MainWindow.h" #include "ui_MainWindow.h" #include "Application.h" #include "EditIndexDialog.h" #include "AboutDialog.h" #include "EditTableDialog.h" #include "AddRecordDialog.h" #include "ImportCsvDialog.h" #include "ExportDataDialog.h" #include "Settings.h" #include "PreferencesDialog.h" #include "EditDialog.h" #include "sqlitetablemodel.h" #include "SqlExecutionArea.h" #include "VacuumDialog.h" #include "DbStructureModel.h" #include "version.h" #include "sqlite.h" #include "CipherDialog.h" #include "ExportSqlDialog.h" #include "SqlUiLexer.h" #include "FileDialog.h" #include "ColumnDisplayFormatDialog.h" #include "FilterTableHeader.h" #include "RemoteDock.h" #include "RemoteDatabase.h" #include "FindReplaceDialog.h" #include "Data.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // This include seems to only be necessary for the Windows build #include #include #ifdef Q_OS_MACX //Needed only on macOS #include #endif // These are needed for reading and writing object files QDataStream& operator>>(QDataStream& ds, sqlb::ObjectIdentifier& objid) { // Read in the item QVariant v; ds >> v; // If it is a string list, we can treat it as an object identifier. If it isn't, we assume it's just a // single string and use interpret it as the table name in the main schema. This is done for backwards // compatability with old project file formats. if(v.toStringList().isEmpty()) objid = sqlb::ObjectIdentifier("main", v.toString()); else objid = sqlb::ObjectIdentifier(v); return ds; } // These are temporary helper functions to turn a vector of sorted columns into a single column to sort and vice verse. This is done by just taking the // first sort column there is and ignoring all the others or creating a single item vector respectively. These functions can be removed once all parts // of the application have been converted to deal with vectors of sorted columns. void fromSortOrderVector(const QVector& vector, int& index, Qt::SortOrder& mode) { if(vector.size()) { index = vector.at(0).index; mode = vector.at(0).mode; } else { index = 0; mode = Qt::AscendingOrder; } } QVector toSortOrderVector(int index, Qt::SortOrder mode) { QVector vector; vector.push_back(BrowseDataTableSettings::SortedColumn(index, mode)); return vector; } MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWindow), db(), m_browseTableModel(new SqliteTableModel(db, this, Settings::getValue("db", "prefetchsize").toInt())), m_currentTabTableModel(m_browseTableModel), m_remoteDb(new RemoteDatabase), editDock(new EditDialog(this)), plotDock(new PlotDock(this)), remoteDock(new RemoteDock(this)), findReplaceDialog(new FindReplaceDialog(this)), gotoValidator(new QIntValidator(0, 0, this)) { ui->setupUi(this); init(); activateFields(false); updateRecentFileActions(); } MainWindow::~MainWindow() { delete m_remoteDb; delete gotoValidator; delete ui; } void MainWindow::init() { // Load window settings tabifyDockWidget(ui->dockLog, ui->dockPlot); tabifyDockWidget(ui->dockLog, ui->dockSchema); tabifyDockWidget(ui->dockLog, ui->dockRemote); #ifdef Q_OS_MACX // Add OpenGL Context for macOS QOpenGLWidget *ogl = new QOpenGLWidget(this); ui->horizontalLayout->addWidget(ogl); ogl->setHidden(true); #endif // Connect SQL logging and database state setting to main window connect(&db, SIGNAL(dbChanged(bool)), this, SLOT(dbState(bool))); connect(&db, SIGNAL(sqlExecuted(QString, int)), this, SLOT(logSql(QString,int))); connect(&db, &DBBrowserDB::requestCollation, this, &MainWindow::requestCollation); // Set the validator for the goto line edit ui->editGoto->setValidator(gotoValidator); // Set up filters connect(ui->dataTable->filterHeader(), SIGNAL(filterChanged(int,QString)), this, SLOT(updateFilter(int,QString))); connect(m_browseTableModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(dataTableSelectionChanged(QModelIndex))); // Select in table the rows correspoding to the selected points in plot connect(plotDock, SIGNAL(pointsSelected(int,int)), ui->dataTable, SLOT(selectTableLines(int,int))); // Set up DB structure tab dbStructureModel = new DbStructureModel(db, this); connect(&db, &DBBrowserDB::structureUpdated, [this]() { QString old_table = ui->comboBrowseTable->currentText(); dbStructureModel->reloadData(); populateStructure(old_table); }); ui->dbTreeWidget->setModel(dbStructureModel); ui->dbTreeWidget->setColumnWidth(DbStructureModel::ColumnName, 300); ui->dbTreeWidget->setColumnHidden(DbStructureModel::ColumnObjectType, true); ui->dbTreeWidget->setColumnHidden(DbStructureModel::ColumnSchema, true); // Set up DB schema dock ui->treeSchemaDock->setModel(dbStructureModel); ui->treeSchemaDock->setColumnHidden(DbStructureModel::ColumnObjectType, true); ui->treeSchemaDock->setColumnHidden(DbStructureModel::ColumnSchema, true); // Set up the table combo box in the Browse Data tab ui->comboBrowseTable->setModel(dbStructureModel); // Create docks ui->dockEdit->setWidget(editDock); ui->dockPlot->setWidget(plotDock); ui->dockRemote->setWidget(remoteDock); // Set up edit dock editDock->setReadOnly(true); // Restore window geometry restoreGeometry(Settings::getValue("MainWindow", "geometry").toByteArray()); restoreState(Settings::getValue("MainWindow", "windowState").toByteArray()); // Restore dock state settings ui->comboLogSubmittedBy->setCurrentIndex(ui->comboLogSubmittedBy->findText(Settings::getValue("SQLLogDock", "Log").toString())); // Add keyboard shortcuts QList shortcuts = ui->actionExecuteSql->shortcuts(); shortcuts.push_back(QKeySequence(tr("Ctrl+Return"))); ui->actionExecuteSql->setShortcuts(shortcuts); QShortcut* shortcutBrowseRefreshF5 = new QShortcut(QKeySequence("F5"), this); connect(shortcutBrowseRefreshF5, SIGNAL(activated()), this, SLOT(refresh())); QShortcut* shortcutBrowseRefreshCtrlR = new QShortcut(QKeySequence("Ctrl+R"), this); connect(shortcutBrowseRefreshCtrlR, SIGNAL(activated()), this, SLOT(refresh())); // Add print shortcut for the DB Structure tab (dbTreeWidget) with context to the widget, so other print shortcuts aren't eclipsed. QShortcut* shortcutPrint = new QShortcut(QKeySequence(QKeySequence::Print), ui->dbTreeWidget, nullptr, nullptr, Qt::WidgetShortcut); connect(shortcutPrint, &QShortcut::activated, this, &MainWindow::printDbStructure); // Create the actions for the recently opened dbs list for(int i = 0; i < MaxRecentFiles; ++i) { recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(false); connect(recentFileActs[i], SIGNAL(triggered()), this, SLOT(openRecentFile())); } for(int i = 0; i < MaxRecentFiles; ++i) ui->fileMenu->insertAction(ui->fileExitAction, recentFileActs[i]); recentSeparatorAct = ui->fileMenu->insertSeparator(ui->fileExitAction); // Create popup menus popupTableMenu = new QMenu(this); popupTableMenu->addAction(ui->actionEditBrowseTable); popupTableMenu->addAction(ui->editModifyObjectAction); popupTableMenu->addAction(ui->editDeleteObjectAction); popupTableMenu->addSeparator(); popupTableMenu->addAction(ui->actionEditCopyCreateStatement); popupTableMenu->addAction(ui->actionExportCsvPopup); popupSchemaDockMenu = new QMenu(this); popupSchemaDockMenu->addAction(ui->actionDropQualifiedCheck); popupSchemaDockMenu->addAction(ui->actionEnquoteNamesCheck); popupOpenDbMenu = new QMenu(this); popupOpenDbMenu->addAction(ui->fileOpenAction); popupOpenDbMenu->addAction(ui->fileOpenReadOnlyAction); ui->fileOpenActionPopup->setMenu(popupOpenDbMenu); popupNewRecordMenu = new QMenu(this); popupNewRecordMenu->addAction(ui->newRecordAction); popupNewRecordMenu->addAction(ui->insertValuesAction); ui->buttonNewRecord->setMenu(popupNewRecordMenu); popupSaveSqlFileMenu = new QMenu(this); popupSaveSqlFileMenu->addAction(ui->actionSqlSaveFile); popupSaveSqlFileMenu->addAction(ui->actionSqlSaveFileAs); ui->actionSqlSaveFilePopup->setMenu(popupSaveSqlFileMenu); popupSaveSqlResultsMenu = new QMenu(this); popupSaveSqlResultsMenu->addAction(ui->actionSqlResultsExportCsv); popupSaveSqlResultsMenu->addAction(ui->actionSqlResultsSaveAsView); ui->actionSqlResultsSave->setMenu(popupSaveSqlResultsMenu); qobject_cast(ui->toolbarSql->widgetForAction(ui->actionSqlResultsSave))->setPopupMode(QToolButton::InstantPopup); popupSaveFilterAsMenu = new QMenu(this); popupSaveFilterAsMenu->addAction(ui->actionFilteredTableExportCsv); popupSaveFilterAsMenu->addAction(ui->actionFilterSaveAsView); ui->buttonSaveFilterAsPopup->setMenu(popupSaveFilterAsMenu); ui->buttonSaveFilterAsPopup->setPopupMode(QToolButton::InstantPopup); popupBrowseDataHeaderMenu = new QMenu(this); popupBrowseDataHeaderMenu->addAction(ui->actionShowRowidColumn); popupBrowseDataHeaderMenu->addAction(ui->actionHideColumns); popupBrowseDataHeaderMenu->addAction(ui->actionShowAllColumns); popupBrowseDataHeaderMenu->addSeparator(); popupBrowseDataHeaderMenu->addAction(ui->actionUnlockViewEditing); popupBrowseDataHeaderMenu->addAction(ui->actionBrowseTableEditDisplayFormat); popupBrowseDataHeaderMenu->addSeparator(); popupBrowseDataHeaderMenu->addAction(ui->actionSetTableEncoding); popupBrowseDataHeaderMenu->addAction(ui->actionSetAllTablesEncoding); QShortcut* dittoRecordShortcut = new QShortcut(QKeySequence("Ctrl+\""), this); connect(dittoRecordShortcut, &QShortcut::activated, [this]() { int currentRow = ui->dataTable->currentIndex().row(); duplicateRecord(currentRow); }); // Add menu item for log dock ui->viewMenu->insertAction(ui->viewDBToolbarAction, ui->dockLog->toggleViewAction()); ui->viewMenu->actions().at(0)->setShortcut(QKeySequence(tr("Ctrl+L"))); ui->viewMenu->actions().at(0)->setIcon(QIcon(":/icons/log_dock")); // Add menu item for plot dock ui->viewMenu->insertAction(ui->viewDBToolbarAction, ui->dockPlot->toggleViewAction()); ui->viewMenu->actions().at(1)->setShortcut(QKeySequence(tr("Ctrl+D"))); ui->viewMenu->actions().at(1)->setIcon(QIcon(":/icons/log_dock")); // Add menu item for schema dock ui->viewMenu->insertAction(ui->viewDBToolbarAction, ui->dockSchema->toggleViewAction()); ui->viewMenu->actions().at(2)->setShortcut(QKeySequence(tr("Ctrl+I"))); ui->viewMenu->actions().at(2)->setIcon(QIcon(":/icons/log_dock")); // Add menu item for edit dock ui->viewMenu->insertAction(ui->viewDBToolbarAction, ui->dockEdit->toggleViewAction()); ui->viewMenu->actions().at(3)->setShortcut(QKeySequence(tr("Ctrl+E"))); ui->viewMenu->actions().at(3)->setIcon(QIcon(":/icons/log_dock")); // Add menu item for plot dock ui->viewMenu->insertAction(ui->viewDBToolbarAction, ui->dockRemote->toggleViewAction()); ui->viewMenu->actions().at(4)->setIcon(QIcon(":/icons/log_dock")); // Set checked state if toolbar is visible ui->viewDBToolbarAction->setChecked(!ui->toolbarDB->isHidden()); ui->viewExtraDBToolbarAction->setChecked(!ui->toolbarExtraDB->isHidden()); ui->viewProjectToolbarAction->setChecked(!ui->toolbarProject->isHidden()); // Add separator between docks and toolbars ui->viewMenu->insertSeparator(ui->viewDBToolbarAction); // If we're not compiling in SQLCipher, hide its FAQ link in the help menu #ifndef ENABLE_SQLCIPHER ui->actionSqlCipherFaq->setVisible(false); #endif // Set statusbar fields statusEncryptionLabel = new QLabel(ui->statusbar); statusEncryptionLabel->setEnabled(false); statusEncryptionLabel->setVisible(false); statusEncryptionLabel->setText(tr("Encrypted")); statusEncryptionLabel->setToolTip(tr("Database is encrypted using SQLCipher")); ui->statusbar->addPermanentWidget(statusEncryptionLabel); statusReadOnlyLabel = new QLabel(ui->statusbar); statusReadOnlyLabel->setEnabled(false); statusReadOnlyLabel->setVisible(false); statusReadOnlyLabel->setText(tr("Read only")); statusReadOnlyLabel->setToolTip(tr("Database file is read only. Editing the database is disabled.")); ui->statusbar->addPermanentWidget(statusReadOnlyLabel); statusEncodingLabel = new QLabel(ui->statusbar); statusEncodingLabel->setEnabled(false); statusEncodingLabel->setText("UTF-8"); statusEncodingLabel->setToolTip(tr("Database encoding")); ui->statusbar->addPermanentWidget(statusEncodingLabel); // When changing the text of the toolbar actions, also automatically change their icon text and their tooltip text connect(ui->editModifyObjectAction, &QAction::changed, [=]() { ui->editModifyObjectAction->setIconText(ui->editModifyObjectAction->text()); ui->editModifyObjectAction->setToolTip(ui->editModifyObjectAction->text()); }); connect(ui->editDeleteObjectAction, &QAction::changed, [=]() { ui->editDeleteObjectAction->setIconText(ui->editDeleteObjectAction->text()); ui->editDeleteObjectAction->setToolTip(ui->editDeleteObjectAction->text()); }); // Connect some more signals and slots connect(ui->dataTable->filterHeader(), SIGNAL(sectionClicked(int)), this, SLOT(browseTableHeaderClicked(int))); connect(ui->dataTable->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(setRecordsetLabel())); connect(ui->dataTable->horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLOT(updateBrowseDataColumnWidth(int,int,int))); connect(editDock, SIGNAL(recordTextUpdated(QPersistentModelIndex, QByteArray, bool)), this, SLOT(updateRecordText(QPersistentModelIndex, QByteArray, bool))); connect(ui->dbTreeWidget->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(changeTreeSelection())); connect(ui->dataTable->horizontalHeader(), SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showDataColumnPopupMenu(QPoint))); connect(ui->dataTable->verticalHeader(), SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showRecordPopupMenu(QPoint))); connect(ui->dataTable, SIGNAL(openFileFromDropEvent(QString)), this, SLOT(fileOpen(QString))); connect(ui->dockEdit, SIGNAL(visibilityChanged(bool)), this, SLOT(toggleEditDock(bool))); connect(m_remoteDb, SIGNAL(openFile(QString)), this, SLOT(fileOpen(QString))); connect(m_remoteDb, &RemoteDatabase::gotCurrentVersion, this, &MainWindow::checkNewVersion); connect(m_browseTableModel, &SqliteTableModel::finishedFetch, this, &MainWindow::setRecordsetLabel); connect(ui->dataTable, &ExtendedTableWidget::selectedRowsToBeDeleted, this, &MainWindow::deleteRecord); connect(ui->actionDropQualifiedCheck, &QAction::toggled, dbStructureModel, &DbStructureModel::setDropQualifiedNames); connect(ui->actionEnquoteNamesCheck, &QAction::toggled, dbStructureModel, &DbStructureModel::setDropEnquotedNames); ui->actionDropQualifiedCheck->setChecked(Settings::getValue("SchemaDock", "dropQualifiedNames").toBool()); ui->actionEnquoteNamesCheck->setChecked(Settings::getValue("SchemaDock", "dropEnquotedNames").toBool()); connect(m_browseTableModel, &SqliteTableModel::finishedFetch, [this](){ auto & settings = browseTableSettings[currentlyBrowsedTableName()]; plotDock->updatePlot(m_browseTableModel, &settings, true, false); }); // Lambda function for keyboard shortcuts for selecting next/previous table in Browse Data tab connect(ui->dataTable, &ExtendedTableWidget::switchTable, [this](bool next) { int index = ui->comboBrowseTable->currentIndex(); int num_items = ui->comboBrowseTable->count(); if(next) { if(++index >= num_items) index = 0; } else { if(--index < 0) index = num_items - 1; } ui->comboBrowseTable->setCurrentIndex(index); populateTable(); }); // Connect tool pragmas connect(ui->actionIntegrityCheck, &QAction::triggered, [this]() { runSqlNewTab("PRAGMA integrity_check;", ui->actionIntegrityCheck->text()); }); connect(ui->actionQuickCheck, &QAction::triggered, [this]() { runSqlNewTab("PRAGMA quick_check;", ui->actionQuickCheck->text()); }); connect(ui->actionForeignKeyCheck, &QAction::triggered, [this]() { runSqlNewTab("PRAGMA foreign_key_check;", ui->actionForeignKeyCheck->text()); }); connect(ui->actionOptimize, &QAction::triggered, [this]() { runSqlNewTab("PRAGMA optimize;", ui->actionOptimize->text()); }); // Set other window settings setAcceptDrops(true); setWindowTitle(QApplication::applicationName()); // Load all settings reloadSettings(); #ifndef ENABLE_SQLCIPHER // Only show encryption menu action when SQLCipher support is enabled ui->actionEncryption->setVisible(false); #endif /* Remove all the '&' signs from the dock titles. On at least Windows and * OSX, Qt doesn't seem to support them properly, so they end up being * visible instead of creating a keyboard shortcut */ ui->dockEdit->setWindowTitle(ui->dockEdit->windowTitle().remove('&')); ui->dockLog->setWindowTitle(ui->dockLog->windowTitle().remove('&')); ui->dockPlot->setWindowTitle(ui->dockPlot->windowTitle().remove('&')); ui->dockSchema->setWindowTitle(ui->dockSchema->windowTitle().remove('&')); ui->dockRemote->setWindowTitle(ui->dockRemote->windowTitle().remove('&')); } bool MainWindow::fileOpen(const QString& fileName, bool dontAddToRecentFiles, bool readOnly) { bool retval = false; QString wFile = fileName; if (!QFile::exists(wFile)) { wFile = FileDialog::getOpenFileName( this, tr("Choose a database file") #ifndef Q_OS_MAC // Filters on OS X are buggy , FileDialog::getSqlDatabaseFileFilter() #endif ); } if(QFile::exists(wFile) ) { // Close the database. If the user didn't want to close it, though, stop here if (db.isOpen()) if(!fileClose()) return false; // Try opening it as a project file first if(loadProject(wFile, readOnly)) { retval = true; } else { // No project file; so it should be a database file if(db.open(wFile, readOnly)) { // Close all open but empty SQL tabs for(int i=ui->tabSqlAreas->count()-1;i>=0;i--) { if(qobject_cast(ui->tabSqlAreas->widget(i))->getSql().trimmed().isEmpty()) closeSqlTab(i, true); } statusEncodingLabel->setText(db.getPragma("encoding")); statusEncryptionLabel->setVisible(db.encrypted()); statusReadOnlyLabel->setVisible(db.readOnly()); setCurrentFile(wFile); if(!dontAddToRecentFiles) addToRecentFilesMenu(wFile); openSqlTab(true); if(ui->mainTab->currentIndex() == BrowseTab) populateTable(); else if(ui->mainTab->currentIndex() == PragmaTab) loadPragmas(); retval = true; } else { QMessageBox::warning(this, qApp->applicationName(), tr("Could not open database file.\nReason: %1").arg(db.lastError())); return false; } } } return retval; } void MainWindow::fileNew() { QString fileName = FileDialog::getSaveFileName(this, tr("Choose a filename to save under"), FileDialog::getSqlDatabaseFileFilter()); if(!fileName.isEmpty()) { if(QFile::exists(fileName)) QFile::remove(fileName); db.create(fileName); setCurrentFile(fileName); addToRecentFilesMenu(fileName); statusEncodingLabel->setText(db.getPragma("encoding")); statusEncryptionLabel->setVisible(false); statusReadOnlyLabel->setVisible(false); populateTable(); openSqlTab(true); createTable(); } } void MainWindow::fileNewInMemoryDatabase() { db.create(":memory:"); setCurrentFile(tr("In-Memory database")); statusEncodingLabel->setText(db.getPragma("encoding")); statusEncryptionLabel->setVisible(false); statusReadOnlyLabel->setVisible(false); populateTable(); openSqlTab(true); createTable(); } void MainWindow::populateStructure(const QString& old_table) { // Refresh the structure tab ui->dbTreeWidget->setRootIndex(dbStructureModel->index(1, 0)); // Show the 'All' part of the db structure ui->dbTreeWidget->expandToDepth(0); ui->treeSchemaDock->setRootIndex(dbStructureModel->index(1, 0)); // Show the 'All' part of the db structure ui->treeSchemaDock->expandToDepth(0); // Refresh the browse data tab ui->comboBrowseTable->setRootModelIndex(dbStructureModel->index(0, 0)); // Show the 'browsable' section of the db structure tree int old_table_index = ui->comboBrowseTable->findText(old_table); if(old_table_index == -1 && ui->comboBrowseTable->count()) // If the old table couldn't be found anymore but there is another table, select that ui->comboBrowseTable->setCurrentIndex(0); else if(old_table_index == -1) // If there aren't any tables to be selected anymore, clear the table view clearTableBrowser(); else // Under normal circumstances just select the old table again ui->comboBrowseTable->setCurrentIndex(old_table_index); // Cancel here if no database is opened if(!db.isOpen()) return; // Update table and column names for syntax highlighting SqlUiLexer::QualifiedTablesMap qualifiedTablesMap; for(auto it=db.schemata.constBegin();it!=db.schemata.constEnd();++it) { SqlUiLexer::TablesAndColumnsMap tablesToColumnsMap; objectMap tab = db.getBrowsableObjects(it.key()); for(auto it : tab) { QString objectname = it->name(); sqlb::FieldInfoList fi = it->fieldInformation(); for(const sqlb::FieldInfo& f : fi) tablesToColumnsMap[objectname].append(f.name); } qualifiedTablesMap[it.key()] = tablesToColumnsMap; } SqlTextEdit::sqlLexer->setTableNames(qualifiedTablesMap); ui->editLogApplication->reloadKeywords(); ui->editLogUser->reloadKeywords(); for(int i=0;itabSqlAreas->count();i++) qobject_cast(ui->tabSqlAreas->widget(i))->getEditor()->reloadKeywords(); // Resize SQL column to fit contents ui->dbTreeWidget->resizeColumnToContents(DbStructureModel::ColumnSQL); ui->treeSchemaDock->resizeColumnToContents(DbStructureModel::ColumnSQL); // Resize also the Name column in the Dock since it has usually // short content and there is little space there. ui->treeSchemaDock->resizeColumnToContents(DbStructureModel::ColumnName); } void MainWindow::clearTableBrowser() { if (!ui->dataTable->model()) return; ui->dataTable->setModel(nullptr); if(qobject_cast(ui->dataTable->horizontalHeader())) qobject_cast(ui->dataTable->horizontalHeader())->generateFilters(0); } void MainWindow::populateTable() { // Early exit if the Browse Data tab isn't visible as there is no need to update it in this case if(ui->mainTab->currentIndex() != BrowseTab) return; // Remove the model-view link if the table name is empty in order to remove any data from the view if(ui->comboBrowseTable->model()->rowCount(ui->comboBrowseTable->rootModelIndex()) == 0) { clearTableBrowser(); return; } QApplication::setOverrideCursor(Qt::WaitCursor); // Get current table name sqlb::ObjectIdentifier tablename = currentlyBrowsedTableName(); // Set model bool reconnectSelectionSignals = false; if(ui->dataTable->model() == nullptr) reconnectSelectionSignals = true; ui->dataTable->setModel(m_browseTableModel); if(reconnectSelectionSignals) { connect(ui->dataTable->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(dataTableSelectionChanged(QModelIndex))); connect(ui->dataTable->selectionModel(), &QItemSelectionModel::selectionChanged, [this](const QItemSelection&, const QItemSelection&) { updateInsertDeleteRecordButton(); }); } // Search stored table settings for this table bool storedDataFound = browseTableSettings.contains(tablename); // Set new table if(!storedDataFound) { // No stored settings found. // Set table name and apply default display format settings m_browseTableModel->setTable(tablename, 0, Qt::AscendingOrder); // There aren't any information stored for this table yet, so use some default values // Hide rowid column. Needs to be done before the column widths setting because of the workaround in there showRowidColumn(false); // Unhide all columns by default on_actionShowAllColumns_triggered(); // Enable editing in general, but lock view editing unlockViewEditing(false); // Column widths for(int i=1;icolumnCount();i++) ui->dataTable->setColumnWidth(i, ui->dataTable->horizontalHeader()->defaultSectionSize()); // Sorting ui->dataTable->filterHeader()->setSortIndicator(0, Qt::AscendingOrder); // Encoding m_browseTableModel->setEncoding(defaultBrowseTableEncoding); setRecordsetLabel(); // Plot attachPlot(ui->dataTable, m_browseTableModel, &browseTableSettings[tablename]); // The filters can be left empty as they are } else { // Stored settings found. Retrieve them. BrowseDataTableSettings storedData = browseTableSettings[tablename]; // Load display formats and set them along with the table name QVector v; bool only_defaults = true; if(db.getObjectByName(tablename)) { const sqlb::FieldInfoList& tablefields = db.getObjectByName(tablename)->fieldInformation(); for(size_t i=0; isetTable(tablename, sortOrderIndex, sortOrderMode, storedData.filterValues); else m_browseTableModel->setTable(tablename, sortOrderIndex, sortOrderMode, storedData.filterValues, v); // There is information stored for this table, so extract it and apply it applyBrowseTableSettings(storedData); setRecordsetLabel(); // Plot attachPlot(ui->dataTable, m_browseTableModel, &browseTableSettings[tablename], false); } // Show/hide menu options depending on whether this is a table or a view if(db.getObjectByName(currentlyBrowsedTableName()) && db.getObjectByName(currentlyBrowsedTableName())->type() == sqlb::Object::Table) { // Table sqlb::TablePtr table = db.getObjectByName(currentlyBrowsedTableName()); ui->actionUnlockViewEditing->setVisible(false); ui->actionShowRowidColumn->setVisible(!table->isWithoutRowidTable()); } else { // View ui->actionUnlockViewEditing->setVisible(true); ui->actionShowRowidColumn->setVisible(false); } updateInsertDeleteRecordButton(); QApplication::restoreOverrideCursor(); } void MainWindow::applyBrowseTableSettings(BrowseDataTableSettings storedData, bool skipFilters) { // We don't want to pass storedData by reference because the functions below would change the referenced data in their original // place, thus modifiying the data this function can use. To have a static description of what the view should look like we want // a copy here. // Show rowid column. Needs to be done before the column widths setting because of the workaround in there and before the filter setting // because of the filter row generation. showRowidColumn(storedData.showRowid, skipFilters); // Enable editing in general and (un)lock view editing depending on the settings unlockViewEditing(!storedData.unlockViewPk.isEmpty(), storedData.unlockViewPk); // Column hidden status on_actionShowAllColumns_triggered(); for(auto hiddenIt=storedData.hiddenColumns.constBegin();hiddenIt!=storedData.hiddenColumns.constEnd();++hiddenIt) hideColumns(hiddenIt.key(), hiddenIt.value()); // Column widths for(auto widthIt=storedData.columnWidths.constBegin();widthIt!=storedData.columnWidths.constEnd();++widthIt) ui->dataTable->setColumnWidth(widthIt.key(), widthIt.value()); // Sorting int sortOrderIndex; Qt::SortOrder sortOrderMode; fromSortOrderVector(storedData.sortOrder, sortOrderIndex, sortOrderMode); ui->dataTable->filterHeader()->setSortIndicator(sortOrderIndex, sortOrderMode); // Filters if(!skipFilters) { // Set filters blocking signals, since the filter is already applied to the browse table model FilterTableHeader* filterHeader = qobject_cast(ui->dataTable->horizontalHeader()); bool oldState = filterHeader->blockSignals(true); for(auto filterIt=storedData.filterValues.constBegin();filterIt!=storedData.filterValues.constEnd();++filterIt) filterHeader->setFilter(filterIt.key(), filterIt.value()); filterHeader->blockSignals(oldState); } // Encoding m_browseTableModel->setEncoding(storedData.encoding); } bool MainWindow::fileClose() { // Close the database but stop the closing process here if the user pressed the cancel button in there if(!db.close()) return false; setWindowTitle(QApplication::applicationName()); loadPragmas(); statusEncryptionLabel->setVisible(false); statusReadOnlyLabel->setVisible(false); // Reset the model for the Browse tab m_browseTableModel->reset(); // Remove all stored table information browse data tab browseTableSettings.clear(); defaultBrowseTableEncoding = QString(); // Clear edit dock editDock->setCurrentIndex(QModelIndex()); // Reset the recordset label inside the Browse tab now setRecordsetLabel(); // Reset the plot dock model and connection attachPlot(nullptr, nullptr); activateFields(false); // Clear the SQL Log ui->editLogApplication->clear(); ui->editLogUser->clear(); return true; } void MainWindow::closeEvent( QCloseEvent* event ) { if(db.close()) { Settings::setValue("MainWindow", "geometry", saveGeometry()); Settings::setValue("MainWindow", "windowState", saveState()); Settings::setValue("SQLLogDock", "Log", ui->comboLogSubmittedBy->currentText()); Settings::setValue("SchemaDock", "dropQualifiedNames", ui->actionDropQualifiedCheck->isChecked()); Settings::setValue("SchemaDock", "dropEnquotedNames", ui->actionEnquoteNamesCheck->isChecked()); QMainWindow::closeEvent(event); } else { event->ignore(); } } void MainWindow::addRecord() { int row = m_browseTableModel->rowCount(); if(m_browseTableModel->insertRow(row)) { selectTableLine(row); } else { // Error inserting empty row. // User has to provide values acomplishing the constraints. Open Add Record Dialog. insertValues(); } } void MainWindow::insertValues() { AddRecordDialog dialog(db, currentlyBrowsedTableName(), this); if (dialog.exec()) populateTable(); } void MainWindow::deleteRecord() { if(ui->dataTable->selectionModel()->hasSelection()) { // If only filter header is selected if(ui->dataTable->selectionModel()->selectedIndexes().isEmpty()) return; int old_row = ui->dataTable->currentIndex().row(); while(ui->dataTable->selectionModel()->hasSelection()) { int first_selected_row = ui->dataTable->selectionModel()->selectedIndexes().first().row(); int last_selected_row = ui->dataTable->selectionModel()->selectedIndexes().last().row(); int selected_rows_count = last_selected_row - first_selected_row + 1; if(!m_browseTableModel->removeRows(first_selected_row, selected_rows_count)) { QMessageBox::warning(this, QApplication::applicationName(), tr("Error deleting record:\n%1").arg(db.lastError())); break; } } if(old_row > m_browseTableModel->rowCount()) old_row = m_browseTableModel->rowCount(); selectTableLine(old_row); } else { QMessageBox::information( this, QApplication::applicationName(), tr("Please select a record first")); } } void MainWindow::attachPlot(ExtendedTableWidget* tableWidget, SqliteTableModel* model, BrowseDataTableSettings* settings, bool keepOrResetSelection) { plotDock->updatePlot(model, settings, true, keepOrResetSelection); // Disconnect previous connection disconnect(plotDock, SIGNAL(pointsSelected(int,int)), nullptr, nullptr); if(tableWidget) { // Connect plot selection to the current table results widget. connect(plotDock, SIGNAL(pointsSelected(int,int)), tableWidget, SLOT(selectTableLines(int,int))); connect(tableWidget, SIGNAL(destroyed()), plotDock, SLOT(resetPlot())); } } void MainWindow::selectTableLine(int lineToSelect) { ui->dataTable->selectTableLine(lineToSelect); } void MainWindow::navigatePrevious() { int curRow = ui->dataTable->currentIndex().row(); curRow -= ui->dataTable->numVisibleRows() - 1; if(curRow < 0) curRow = 0; selectTableLine(curRow); } void MainWindow::navigateNext() { int curRow = ui->dataTable->currentIndex().row(); curRow += ui->dataTable->numVisibleRows() - 1; if(curRow >= m_browseTableModel->rowCount()) curRow = m_browseTableModel->rowCount() - 1; selectTableLine(curRow); } void MainWindow::navigateBegin() { selectTableLine(0); } void MainWindow::navigateEnd() { selectTableLine(m_browseTableModel->rowCount()-1); } void MainWindow::navigateGoto() { int row = ui->editGoto->text().toInt(); if(row <= 0) row = 1; if(row > m_browseTableModel->rowCount()) row = m_browseTableModel->rowCount(); selectTableLine(row - 1); ui->editGoto->setText(QString::number(row)); } void MainWindow::setRecordsetLabel() { // Get all the numbers, i.e. the number of the first row and the last row as well as the total number of rows int from = ui->dataTable->verticalHeader()->visualIndexAt(0) + 1; int total = m_browseTableModel->rowCount(); int to = ui->dataTable->verticalHeader()->visualIndexAt(ui->dataTable->height()) - 1; if (to == -2) to = total; // Update the validator of the goto row field gotoValidator->setRange(0, total); // When there is no query for this table (i.e. no table is selected), there is no row count query either which in turn means // that the row count query will never finish. And because of this the row count will be forever unknown. To avoid always showing // a misleading "determining row count" text in the UI we set the row count status to complete here for empty queries. auto row_count_available = m_browseTableModel->rowCountAvailable(); if(m_browseTableModel->query().isEmpty()) row_count_available = SqliteTableModel::RowCount::Complete; // Update the label showing the current position QString txt; switch(row_count_available) { case SqliteTableModel::RowCount::Unknown: txt = tr("determining row count..."); break; case SqliteTableModel::RowCount::Partial: txt = tr("%1 - %2 of >= %3").arg(from).arg(to).arg(total); break; case SqliteTableModel::RowCount::Complete: default: txt = tr("%1 - %2 of %3").arg(from).arg(to).arg(total); break; } ui->labelRecordset->setText(txt); enableEditing(m_browseTableModel->rowCountAvailable() != SqliteTableModel::RowCount::Unknown); } void MainWindow::refresh() { // What the Refresh function does depends on the currently active tab. This way the keyboard shortcuts (F5 and Ctrl+R) // always perform some meaningful task; they just happen to be context dependent in the function they trigger. switch(ui->mainTab->currentIndex()) { case StructureTab: // Refresh the schema db.updateSchema(); break; case BrowseTab: // Refresh the schema and reload the current table db.updateSchema(); populateTable(); break; case PragmaTab: // Reload pragma values loadPragmas(); break; case ExecuteTab: // (Re-)Run the current SQL query executeQuery(); break; } } void MainWindow::createTable() { if (!db.isOpen()){ QMessageBox::information( this, QApplication::applicationName(), tr("There is no database opened. Please open or create a new database file.")); return; } EditTableDialog dialog(db, sqlb::ObjectIdentifier(), true, this); if(dialog.exec()) { populateTable(); } } void MainWindow::createIndex() { if (!db.isOpen()){ QMessageBox::information( this, QApplication::applicationName(), tr("There is no database opened. Please open or create a new database file.")); return; } EditIndexDialog dialog(db, sqlb::ObjectIdentifier(), true, this); if(dialog.exec()) populateTable(); } void MainWindow::compact() { VacuumDialog dialog(&db, this); dialog.exec(); } void MainWindow::deleteObject() { // Get name and type of object to delete sqlb::ObjectIdentifier name(ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnSchema), Qt::EditRole).toString(), ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnName), Qt::EditRole).toString()); QString type = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnObjectType), Qt::EditRole).toString(); // Due to different grammar in languages (e.g. gender or declension), each message must be given separately to translation. QString message; if (type == "table") message = tr("Are you sure you want to delete the table '%1'?\nAll data associated with the table will be lost."); else if (type == "view") message = tr("Are you sure you want to delete the view '%1'?"); else if (type == "trigger") message = tr("Are you sure you want to delete the trigger '%1'?"); else if (type == "index") message = tr("Are you sure you want to delete the index '%1'?"); // Ask user if he really wants to delete that table if(QMessageBox::warning(this, QApplication::applicationName(), message.arg(name.name()), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) { // Delete the table QString statement = QString("DROP %1 %2;").arg(type.toUpper()).arg(name.toString()); if(!db.executeSQL(statement)) { if (type == "table") message = tr("Error: could not delete the table."); else if (type == "view") message = tr("Error: could not delete the view."); else if (type == "trigger") message = tr("Error: could not delete the trigger."); else if (type == "index") message = tr("Error: could not delete the index."); QString error = tr("Message from database engine:\n%1").arg(db.lastError()); QMessageBox::warning(this, QApplication::applicationName(), message + " " + error); } else { populateTable(); changeTreeSelection(); } } } void MainWindow::editObject() { if(!ui->dbTreeWidget->selectionModel()->hasSelection()) return; // Get name and type of the object to edit sqlb::ObjectIdentifier name(ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnSchema), Qt::EditRole).toString(), ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnName), Qt::EditRole).toString()); QString type = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnObjectType), Qt::EditRole).toString(); if(type == "table") { // For a safe and possibly complex table modification we must follow the steps documented in // https://www.sqlite.org/lang_altertable.html // Paragraph (first procedure): Making Other Kinds Of Table Schema Changes QString foreign_keys = db.getPragma("foreign_keys"); if (foreign_keys == "1") { if(db.getDirty() && QMessageBox::question(this, QApplication::applicationName(), tr("Editing the table requires to save all pending changes now.\nAre you sure you want to save the database?"), QMessageBox::Save | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape) != QMessageBox::Save) return; // Commit all changes so the foreign_keys can be effective. fileSave(); db.setPragma("foreign_keys", "0"); } EditTableDialog dialog(db, name, false, this); bool ok = dialog.exec(); // If foreign_keys were enabled, we must commit or rollback the transaction so the foreign_keys pragma can be restored. if (foreign_keys == "1") { if (!db.querySingleValueFromDb(QString("PRAGMA %1.foreign_key_check").arg(sqlb::escapeIdentifier(name.schema()))).isNull()) { // Raise warning for accepted modification. When rejected, warn user also since we know now that the table has problems, // but it wasn't our fault. if (ok) QMessageBox::warning(this, QApplication::applicationName(), tr("Error checking foreign keys after table modification. The changes will be reverted.")); else QMessageBox::warning(this, QApplication::applicationName(), tr("This table did not pass a foreign-key check.
" "You should run 'Tools | Foreign-Key Check' and fix the reported issues.")); db.revertAll(); } else { // Commit all changes so the foreign_keys can be effective. fileSave(); } db.setPragma("foreign_keys", foreign_keys); } if(ok) { ui->dataTable->filterHeader()->clearFilters(); populateTable(); } } else if(type == "index") { EditIndexDialog dialog(db, name, false, this); if(dialog.exec()) populateTable(); } } void MainWindow::helpWhatsThis() { QWhatsThis::enterWhatsThisMode (); } void MainWindow::helpAbout() { AboutDialog dialog(this); dialog.exec(); } void MainWindow::updateRecordText(const QPersistentModelIndex& idx, const QByteArray& text, bool isBlob) { m_currentTabTableModel->setTypedData(idx, isBlob, text); } void MainWindow::toggleEditDock(bool visible) { if (!visible) { // Update main window ui->dataTable->setFocus(); } else { // fill edit dock with actual data editDock->setCurrentIndex(ui->dataTable->currentIndex()); } } void MainWindow::doubleClickTable(const QModelIndex& index) { // Cancel on invalid index if (!index.isValid()) { return; } // * Don't allow editing of other objects than tables (on the browse table) * bool isEditingAllowed = !db.readOnly() && m_currentTabTableModel == m_browseTableModel && m_browseTableModel->isEditable(); // Enable or disable the Apply, Null, & Import buttons in the Edit Cell // dock depending on the value of the "isEditingAllowed" bool above editDock->setReadOnly(!isEditingAllowed); editDock->setCurrentIndex(index); // Show the edit dock ui->dockEdit->setVisible(true); // Set focus on the edit dock editDock->setFocus(); } void MainWindow::dataTableSelectionChanged(const QModelIndex& index) { // Cancel on invalid index if(!index.isValid()) { editDock->setCurrentIndex(QModelIndex()); return; } bool editingAllowed = !db.readOnly() && (m_currentTabTableModel == m_browseTableModel) && m_browseTableModel->isEditable(); // Don't allow editing of other objects than tables editDock->setReadOnly(!editingAllowed); // If the Edit Cell dock is visible, load the new value into it if (editDock->isVisible()) { editDock->setCurrentIndex(index); } } MainWindow::StatementType MainWindow::getQueryType(const QString& query) const { // Helper function for getting the type of a given query if(query.startsWith("SELECT", Qt::CaseInsensitive)) return SelectStatement; if(query.startsWith("ALTER", Qt::CaseInsensitive)) return AlterStatement; if(query.startsWith("DROP", Qt::CaseInsensitive)) return DropStatement; if(query.startsWith("ROLLBACK", Qt::CaseInsensitive)) return RollbackStatement; if(query.startsWith("PRAGMA", Qt::CaseInsensitive)) return PragmaStatement; if(query.startsWith("VACUUM", Qt::CaseInsensitive)) return VacuumStatement; if(query.startsWith("INSERT", Qt::CaseInsensitive)) return InsertStatement; if(query.startsWith("UPDATE", Qt::CaseInsensitive)) return UpdateStatement; if(query.startsWith("DELETE", Qt::CaseInsensitive)) return DeleteStatement; if(query.startsWith("CREATE", Qt::CaseInsensitive)) return CreateStatement; if(query.startsWith("ATTACH", Qt::CaseInsensitive)) return AttachStatement; if(query.startsWith("DETACH", Qt::CaseInsensitive)) return DetachStatement; return OtherStatement; } /* * I'm still not happy how the results are represented to the user * right now you only see the result of the last executed statement. * A better experience would be tabs on the bottom with query results * for all the executed statements. * Or at least a some way the use could see results/status message * per executed statement. */ void MainWindow::executeQuery() { // Make sure a database is opened. This is necessary because we allow opened SQL editor tabs even if no database is loaded. Hitting F5 or similar // then might call this function. if(!db.isOpen()) return; // Get current SQL tab and editor SqlExecutionArea* sqlWidget = qobject_cast(ui->tabSqlAreas->currentWidget()); SqlTextEdit* editor = sqlWidget->getEditor(); const QString tabName = ui->tabSqlAreas->tabText(ui->tabSqlAreas->currentIndex()).remove('&'); // Determine execution mode: execute all, execute selection or execute current line enum executionMode { All, Selection, Line }; executionMode mode; if(sender() && sender()->objectName() == "actionSqlExecuteLine") mode = Line; else if(!sqlWidget->getSelectedSql().isEmpty()) mode = Selection; else mode = All; // Get SQL code to execute. This depends on the execution mode. QString query = sqlWidget->getSql(); int execute_from_line = 0; // These three variables hold the start position int execute_from_index = 0; // of the executed statements in the entire int execute_from_position = 0; // SQL code of the current SQL tab. int execute_to_line = 0; // These three variables hold the end position int execute_to_index = 0; // of the executed statements in the entire int execute_to_position = 0; // SQL code of the current SQL tab. switch(mode) { case Selection: { // Start and end positions are start and end positions from the selection editor->getSelection(&execute_from_line, &execute_from_index, &execute_to_line, &execute_to_index); execute_from_position = editor->positionFromLineIndex(execute_from_line, execute_from_index); execute_to_position = editor->positionFromLineIndex(execute_to_line, execute_to_index); query = query.left(execute_to_position); db.logSQL(tr("-- EXECUTING SELECTION IN '%1'\n--").arg(tabName), kLogMsg_User); } break; case Line: { // Start position is the first character of the current line, except for those cases where we're in the middle of a // statement which started on one the previous line. In that case the start position is actually a bit earlier. For // the end position we set the last character of the current line. If the statement(s) continue(s) into the next line, // SQLite will execute it/them anyway and we'll stop afterwards. int dummy; editor->getCursorPosition(&execute_from_line, &dummy); execute_from_position = editor->positionFromLineIndex(execute_from_line, 0); // Need to set the end position here before adjusting the start line execute_to_line = execute_from_line; execute_to_index = editor->text(execute_to_line).length() - 1; // The -1 compensates for the line break at the end of the line execute_to_position = editor->positionFromLineIndex(execute_to_line, execute_to_index); QByteArray firstPartEntireSQL = query.toUtf8().left(execute_from_position); if(firstPartEntireSQL.lastIndexOf(';') != -1) { execute_from_position -= firstPartEntireSQL.length() - firstPartEntireSQL.lastIndexOf(';') - 1; editor->lineIndexFromPosition(execute_from_position, &execute_from_line, &execute_from_index); } db.logSQL(tr("-- EXECUTING LINE IN '%1'\n--").arg(tabName), kLogMsg_User); } break; case All: { // Start position is the first byte, end position the last. // Note that we use byte positions that might differ from character positions. execute_to_position = editor->length(); editor->lineIndexFromPosition(execute_to_position, &execute_to_line, &execute_to_index); db.logSQL(tr("-- EXECUTING ALL IN '%1'\n--").arg(tabName), kLogMsg_User); } break; } // Cancel if there is nothing to execute if(query.trimmed().isEmpty() || query.trimmed() == ";" || execute_from_position == execute_to_position || query.mid(execute_from_position, execute_to_position-execute_from_position).trimmed().isEmpty() || query.mid(execute_from_position, execute_to_position-execute_from_position).trimmed() == ";") return; // All replacements in the query should be made by the same amount of characters, so the positions in the file // for error indicators and line and column logs are not displaced. // Whitespace and comments are discarded by SQLite, so it is better to just let it ignore them. query = query.replace(QRegExp("^(\\s*)BEGIN TRANSACTION;", Qt::CaseInsensitive), "\\1 "); query = query.replace(QRegExp("COMMIT;(\\s*)$", Qt::CaseInsensitive), " \\1"); // Convert query to C string which we will use from now on, starting from the determined start position and // until the end of the SQL code. By doing so we go further than the determined end position because in Line // mode the last statement might go beyond that point. QByteArray utf8Query = query.toUtf8().mid(execute_from_position); // Remove any error indicators editor->clearErrorIndicators(); // Set cursor and start execution timer QApplication::setOverrideCursor(Qt::BusyCursor); QElapsedTimer timer; timer.start(); // Prepare execution sqlite3_stmt* vm; const char* tail = utf8Query.data(); int sql3status = SQLITE_OK; int tail_length = utf8Query.length(); QString statusMessage; bool ok = false; bool modified = false; const bool wasdirty = db.getDirty(); bool structure_updated = false; bool savepoint_created = false; // Accept multi-line queries, by looping until the tail is empty while(tail && *tail != 0 && (sql3status == SQLITE_OK || sql3status == SQLITE_DONE)) { // What type of query is this? QString qtail = QString(tail).trimmed(); StatementType query_type = getQueryType(qtail); // Check whether the DB structure is changed by this statement if(!structure_updated && (query_type == AlterStatement || query_type == CreateStatement || query_type == DropStatement || query_type == RollbackStatement)) structure_updated = true; // Check whether this is trying to set a pragma or to vacuum the database if((query_type == PragmaStatement && qtail.contains('=') && !qtail.contains("defer_foreign_keys", Qt::CaseInsensitive)) || query_type == VacuumStatement) { // We're trying to set a pragma. If the database has been modified it needs to be committed first. We'll need to ask the // user about that if(db.getDirty()) { if(QMessageBox::question(this, QApplication::applicationName(), tr("Setting PRAGMA values or vacuuming will commit your current transaction.\nAre you sure?"), QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape) == QMessageBox::Yes) { // Commit all changes db.releaseAllSavepoints(); } else { // Abort statusMessage = tr("Execution aborted by user"); break; } } } else { // We're not trying to set a pragma or to vacuum the database. In this case make sure a savepoint has been created in order to avoid committing // all changes to the database immediately. Don't set more than one savepoint. if(!savepoint_created) { // We have to start a transaction before we create the prepared statement otherwise every executed // statement will get committed after the prepared statement gets finalized db.setSavepoint(); savepoint_created = true; } } // Execute next statement int tail_length_before = tail_length; const char* qbegin = tail; auto pDb = db.get(tr("executing query")); sql3status = sqlite3_prepare_v2(pDb.get(), tail, tail_length, &vm, &tail); QString queryPart = QString::fromUtf8(qbegin, tail - qbegin); tail_length -= (tail - qbegin); int end_of_current_statement_position = execute_from_position + tail_length_before - tail_length; if (sql3status == SQLITE_OK) { sql3status = sqlite3_step(vm); sqlite3_finalize(vm); // Get type StatementType query_part_type = getQueryType(queryPart.trimmed()); // SQLite returns SQLITE_DONE when a valid SELECT statement was executed but returned no results. To run into the branch that updates // the status message and the table view anyway manipulate the status value here. This is also done for PRAGMA statements as they (sometimes) // return rows just like SELECT statements, too. if((query_part_type == SelectStatement || query_part_type == PragmaStatement) && sql3status == SQLITE_DONE) sql3status = SQLITE_ROW; switch(sql3status) { case SQLITE_ROW: { // If we get here, the SQL statement returns some sort of data. So hand it over to the model for display. Don't set the modified flag // because statements that display data don't change data as well. pDb = nullptr; auto * model = sqlWidget->getModel(); model->setQuery(queryPart); // Wait until the initial loading of data (= first chunk and row count) has been performed. I have the // feeling that a lot of stuff would need rewriting if we wanted to become more asynchronous here: // essentially the entire loop over the commands would need to be signal-driven. model->waitUntilIdle(); qApp->processEvents(); // to make row count available statusMessage = tr("%1 rows returned in %2ms").arg(model->rowCount()).arg(timer.elapsed()); ok = true; ui->actionSqlResultsSave->setEnabled(true); ui->actionSqlResultsSaveAsView->setEnabled(!db.readOnly()); sql3status = SQLITE_OK; break; } case SQLITE_DONE: case SQLITE_OK: { // If we get here, the SQL statement doesn't return data and just executes. Don't run it again because it has already been executed. // But do set the modified flag because statements that don't return data, often modify the database. sqlWidget->getModel()->reset(); QString stmtHasChangedDatabase; if(query_part_type == InsertStatement || query_part_type == UpdateStatement || query_part_type == DeleteStatement) stmtHasChangedDatabase = tr(", %1 rows affected").arg(sqlite3_changes(pDb.get())); // Attach/Detach statements don't modify the original database if(query_part_type != StatementType::AttachStatement && query_part_type != StatementType::DetachStatement) modified = true; statusMessage = tr("query executed successfully. Took %1ms%2").arg(timer.elapsed()).arg(stmtHasChangedDatabase); ok = true; break; } case SQLITE_MISUSE: continue; default: ok = false; break; } timer.restart(); } else { ok = false; } editor->lineIndexFromPosition(execute_from_position, &execute_from_line, &execute_from_index); // Special case: if the start position is at the end of a line, then move to the beggining of next line. // Otherwise for the typical case, the line reference is one less than expected. // Note that execute_from_index uses character positions and not byte positions, so text().length() must be used. if (editor->text(execute_from_line).length() == execute_from_index+1) { execute_from_line++; execute_from_index = 0; } // If there was an error, save the error message for later and highlight the erroneous SQL statement if (!ok) { statusMessage = QString::fromUtf8(sqlite3_errmsg(pDb.get())); int end_of_current_statement_line, end_of_current_statement_index; editor->lineIndexFromPosition(end_of_current_statement_position, &end_of_current_statement_line, &end_of_current_statement_index); editor->setErrorIndicator(execute_from_line, execute_from_index, end_of_current_statement_line, end_of_current_statement_index); editor->setCursorPosition(execute_from_line, execute_from_index); } // Log the query and the result message. // The query takes the last placeholder as it may itself contain the sequence '%' + number. QString log_message = QString("-- " + tr("At line %1:") + "\n%3\n-- " + tr("Result: %2")).arg(execute_from_line+1).arg(statusMessage).arg(queryPart.trimmed()); db.logSQL(log_message, kLogMsg_User); statusMessage = QString(tr("Result: %2") + "\n" + tr("At line %1:") + "\n%3").arg(execute_from_line+1).arg(statusMessage).arg(queryPart.trimmed()); // Release the database pDb = nullptr; // Revert to save point now if it wasn't needed. We need to do this here because there are some rare cases where the next statement might // be affected by what is only a temporary and unnecessary savepoint. For example in this case: // ATTACH 'xxx' AS 'db2' // SELECT * FROM db2.xy; -- Savepoint created here // DETACH db2; -- Savepoint makes this statement fail if(!modified && !wasdirty && savepoint_created) { db.revertToSavepoint(); // better rollback, if the logic is not enough we can tune it. savepoint_created = false; } // Update the start position for the next statement and check if we are at // the end of the part we want to execute. If so, stop the execution now. execute_from_position = end_of_current_statement_position; if(execute_from_position >= execute_to_position) break; // Process events to keep the UI responsive qApp->processEvents(); } sqlWidget->finishExecution(statusMessage, ok); attachPlot(sqlWidget->getTableResult(), sqlWidget->getModel()); connect(sqlWidget->getTableResult()->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(dataTableSelectionChanged(QModelIndex))); connect(sqlWidget->getTableResult(), SIGNAL(doubleClicked(QModelIndex)), this, SLOT(doubleClickTable(QModelIndex))); // If the DB structure was changed by some command in this SQL script, update our schema representations if(structure_updated) db.updateSchema(); QApplication::restoreOverrideCursor(); } void MainWindow::mainTabSelected(int tabindex) { editDock->setReadOnly(true); switch (tabindex) { case StructureTab: break; case BrowseTab: m_currentTabTableModel = m_browseTableModel; populateTable(); break; case PragmaTab: loadPragmas(); break; case ExecuteTab: { SqlExecutionArea* sqlWidget = qobject_cast(ui->tabSqlAreas->currentWidget()); if (sqlWidget) { m_currentTabTableModel = sqlWidget->getModel(); dataTableSelectionChanged(sqlWidget->getTableResult()->currentIndex()); } break; } default: break; } } void MainWindow::importTableFromCSV() { QStringList wFiles = FileDialog::getOpenFileNames( this, tr("Choose text files"), tr("Text files(*.csv *.txt);;All files(*)")); QStringList validFiles; for(const auto& file : wFiles) { if (QFile::exists(file)) validFiles.append(file); } if (!validFiles.isEmpty()) { ImportCsvDialog dialog(validFiles, &db, this); if (dialog.exec()) populateTable(); } } void MainWindow::exportTableToCSV() { // Get the current table name if we are in the Browse Data tab sqlb::ObjectIdentifier current_table; if(ui->mainTab->currentIndex() == StructureTab) { QString type = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnObjectType)).toString(); if(type == "table" || type == "view") { QString schema = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnSchema)).toString(); QString name = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnName)).toString(); current_table = sqlb::ObjectIdentifier(schema, name); } } else if(ui->mainTab->currentIndex() == BrowseTab) { current_table = currentlyBrowsedTableName(); } // Open dialog ExportDataDialog dialog(db, ExportDataDialog::ExportFormatCsv, this, "", current_table); dialog.exec(); } void MainWindow::exportTableToJson() { // Get the current table name if we are in the Browse Data tab sqlb::ObjectIdentifier current_table; if(ui->mainTab->currentIndex() == StructureTab) { QString type = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnObjectType)).toString(); if(type == "table" || type == "view") { QString schema = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnSchema)).toString(); QString name = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnName)).toString(); current_table = sqlb::ObjectIdentifier(schema, name); } } else if(ui->mainTab->currentIndex() == BrowseTab) { current_table = currentlyBrowsedTableName(); } // Open dialog ExportDataDialog dialog(db, ExportDataDialog::ExportFormatJson, this, "", current_table); dialog.exec(); } void MainWindow::dbState( bool dirty ) { ui->fileSaveAction->setEnabled(dirty); ui->fileRevertAction->setEnabled(dirty); ui->fileAttachAction->setEnabled(!dirty); //ui->actionEncryption->setEnabled(!dirty); } void MainWindow::fileSave() { if(db.isOpen()) { if(!db.releaseAllSavepoints()) { QMessageBox::warning(this, QApplication::applicationName(), tr("Error while saving the database file. This means that not all changes to the database were " "saved. You need to resolve the following error first.\n\n%1").arg(db.lastError())); } } } void MainWindow::fileRevert() { if (db.isOpen()){ QString msg = tr("Are you sure you want to undo all changes made to the database file '%1' since the last save?").arg(db.currentFile()); if(QMessageBox::question(this, QApplication::applicationName(), msg, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape) == QMessageBox::Yes) { db.revertAll(); populateTable(); } } } void MainWindow::exportDatabaseToSQL() { QString current_table; if(ui->mainTab->currentIndex() == BrowseTab) current_table = ui->comboBrowseTable->currentText(); ExportSqlDialog dialog(&db, this, current_table); dialog.exec(); } void MainWindow::importDatabaseFromSQL() { // Get file name to import QString fileName = FileDialog::getOpenFileName( this, tr("Choose a file to import"), tr("Text files(*.sql *.txt);;All files(*)")); // Cancel when file doesn't exist if(!QFile::exists(fileName)) return; // If there is already a database file opened ask the user whether to import into this one or a new one. If no DB is opened just ask for a DB name directly QString newDbFile; if((db.isOpen() && QMessageBox::question(this, QApplication::applicationName(), tr("Do you want to create a new database file to hold the imported data?\n" "If you answer no we will attempt to import the data in the SQL file to the current database."), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) || !db.isOpen()) { newDbFile = FileDialog::getSaveFileName( this, tr("Choose a filename to save under"), FileDialog::getSqlDatabaseFileFilter()); if(QFile::exists(newDbFile)) { QMessageBox::information(this, QApplication::applicationName(), tr("File %1 already exists. Please choose a different name.").arg(newDbFile)); return; } else if(newDbFile.size() == 0) { return; } db.create(newDbFile); } // Defer foreign keys. Just deferring them instead of disabling them should work fine because in the import we only expect CREATE and INSERT // statements which unlike in the Edit Table dialog shouldn't trigger any problems. QString foreignKeysOldSettings = db.getPragma("defer_foreign_keys"); db.setPragma("defer_foreign_keys", "1"); // Open, read, execute and close file QApplication::setOverrideCursor(Qt::WaitCursor); QFile f(fileName); f.open(QIODevice::ReadOnly); bool ok = db.executeMultiSQL(f.readAll(), newDbFile.size() == 0); // Restore cursor before asking the user to accept the message QApplication::restoreOverrideCursor(); if(!ok) QMessageBox::warning(this, QApplication::applicationName(), tr("Error importing data: %1").arg(db.lastError())); else if(db.getPragma("foreign_keys") == "1" && !db.querySingleValueFromDb(QString("PRAGMA foreign_key_check")).isNull()) QMessageBox::warning(this, QApplication::applicationName(), tr("Import completed. Some foreign key constraints are violated. Please fix them before saving.")); else QMessageBox::information(this, QApplication::applicationName(), tr("Import completed.")); f.close(); // Restore the former foreign key settings db.setPragma("defer_foreign_keys", foreignKeysOldSettings); // Refresh window when importing into an existing DB or - when creating a new file - just open it correctly if(newDbFile.size()) { fileOpen(newDbFile); } else { db.updateSchema(); populateTable(); } } void MainWindow::openPreferences() { PreferencesDialog dialog(this); if(dialog.exec()) reloadSettings(); } //** Db Tree Context Menu void MainWindow::createTreeContextMenu(const QPoint &qPoint) { if(!ui->dbTreeWidget->selectionModel()->hasSelection()) return; QString type = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), 1)).toString(); if(type == "table" || type == "view" || type == "trigger" || type == "index") popupTableMenu->exec(ui->dbTreeWidget->mapToGlobal(qPoint)); } //** DB Schema Dock Context Menu void MainWindow::createSchemaDockContextMenu(const QPoint &qPoint) { popupSchemaDockMenu->exec(ui->treeSchemaDock->mapToGlobal(qPoint)); } void MainWindow::changeTreeSelection() { // Just assume first that something's selected that can not be edited at all ui->editDeleteObjectAction->setEnabled(false); ui->editModifyObjectAction->setEnabled(false); ui->actionEditBrowseTable->setEnabled(false); if(!ui->dbTreeWidget->currentIndex().isValid()) return; // Change the text and tooltips of the actions QString type = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), 1)).toString(); if (type.isEmpty()) { ui->editDeleteObjectAction->setIcon(QIcon(":icons/table_delete")); ui->editModifyObjectAction->setIcon(QIcon(":icons/table_modify")); } else { ui->editDeleteObjectAction->setIcon(QIcon(QString(":icons/%1_delete").arg(type))); ui->editModifyObjectAction->setIcon(QIcon(QString(":icons/%1_modify").arg(type))); } if (type == "view") { ui->editDeleteObjectAction->setText(tr("Delete View")); ui->editModifyObjectAction->setText(tr("Modify View")); } else if(type == "trigger") { ui->editDeleteObjectAction->setText(tr("Delete Trigger")); ui->editModifyObjectAction->setText(tr("Modify Trigger")); } else if(type == "index") { ui->editDeleteObjectAction->setText(tr("Delete Index")); ui->editModifyObjectAction->setText(tr("Modify Index")); } else if(type == "table") { ui->editDeleteObjectAction->setText(tr("Delete Table")); ui->editModifyObjectAction->setText(tr("Modify Table")); } else { // Nothing to do for other types. Set the buttons not visible and return. ui->editDeleteObjectAction->setVisible(false); ui->editModifyObjectAction->setVisible(false); return; } ui->editDeleteObjectAction->setVisible(true); ui->editModifyObjectAction->setVisible(true); // Activate actions if(type == "table" || type == "index") { ui->editDeleteObjectAction->setEnabled(!db.readOnly()); ui->editModifyObjectAction->setEnabled(!db.readOnly()); } else if(type == "view" || type == "trigger") { ui->editDeleteObjectAction->setEnabled(!db.readOnly()); } if(type == "table" || type == "view") { ui->actionEditBrowseTable->setEnabled(true); ui->actionExportCsvPopup->setEnabled(true); } } void MainWindow::openRecentFile() { QAction *action = qobject_cast(sender()); if (action) fileOpen(action->data().toString()); } void MainWindow::updateRecentFileActions() { // Get recent files list from settings QStringList files = Settings::getValue("General", "recentFileList").toStringList(); // Check if files still exist and remove any non-existant file for(int i=0;isetText(text); recentFileActs[i]->setData(files[i]); recentFileActs[i]->setVisible(true); // Add shortcut for opening the file using the keyboard. However, if the application is configured to store // more than nine recently opened files don't set shortcuts for the later ones which wouldn't be single digit anymore. if(i < 9) recentFileActs[i]->setShortcut(QKeySequence(Qt::CTRL + (Qt::Key_1+i))); } for (int j = numRecentFiles; j < MaxRecentFiles; ++j) recentFileActs[j]->setVisible(false); recentSeparatorAct->setVisible(numRecentFiles > 0); } void MainWindow::setCurrentFile(const QString &fileName) { setWindowFilePath(fileName); setWindowTitle(QApplication::applicationName() + " - " + QDir::toNativeSeparators(fileName)); activateFields(true); dbState(db.getDirty()); } void MainWindow::addToRecentFilesMenu(const QString& filename) { QStringList files = Settings::getValue("General", "recentFileList").toStringList(); QFileInfo info(filename); files.removeAll(info.absoluteFilePath()); files.prepend(info.absoluteFilePath()); while (files.size() > MaxRecentFiles) files.removeLast(); Settings::setValue("General", "recentFileList", files); for(QWidget* widget : QApplication::topLevelWidgets()) { MainWindow *mainWin = qobject_cast(widget); if (mainWin) mainWin->updateRecentFileActions(); } } void MainWindow::dragEnterEvent(QDragEnterEvent *event) { if( event->mimeData()->hasFormat("text/uri-list") ) event->acceptProposedAction(); } void MainWindow::dropEvent(QDropEvent *event) { QList urls = event->mimeData()->urls(); if( urls.isEmpty() ) return; QString fileName = urls.first().toLocalFile(); if(!fileName.isEmpty()) fileOpen(fileName); } void MainWindow::activateFields(bool enable) { bool write = !db.readOnly(); bool tempDb = db.currentFile() == ":memory:"; ui->fileCloseAction->setEnabled(enable); ui->fileAttachAction->setEnabled(enable); ui->fileCompactAction->setEnabled(enable && write); ui->fileExportJsonAction->setEnabled(enable); ui->fileExportCSVAction->setEnabled(enable); ui->fileExportSQLAction->setEnabled(enable); ui->fileImportCSVAction->setEnabled(enable && write); ui->editCreateTableAction->setEnabled(enable && write); ui->editCreateIndexAction->setEnabled(enable && write); ui->actionDbPrint->setEnabled(enable); ui->buttonNext->setEnabled(enable); ui->buttonPrevious->setEnabled(enable); ui->buttonBegin->setEnabled(enable); ui->buttonEnd->setEnabled(enable); ui->scrollAreaWidgetContents->setEnabled(enable); ui->buttonBoxPragmas->setEnabled(enable && write); ui->buttonGoto->setEnabled(enable); ui->editGoto->setEnabled(enable); ui->buttonRefresh->setEnabled(enable); ui->buttonPrintTable->setEnabled(enable); ui->actionExecuteSql->setEnabled(enable); ui->actionLoadExtension->setEnabled(enable); ui->actionSqlExecuteLine->setEnabled(enable); ui->actionSaveProject->setEnabled(enable && !tempDb); ui->actionEncryption->setEnabled(enable && write && !tempDb); ui->actionIntegrityCheck->setEnabled(enable); ui->actionQuickCheck->setEnabled(enable); ui->actionForeignKeyCheck->setEnabled(enable); ui->actionOptimize->setEnabled(enable); ui->buttonClearFilters->setEnabled(enable); ui->buttonSaveFilterAsPopup->setEnabled(enable); ui->dockEdit->setEnabled(enable); ui->dockPlot->setEnabled(enable); if(!enable) ui->actionSqlResultsSave->setEnabled(false); updateInsertDeleteRecordButton(); remoteDock->enableButtons(); } void MainWindow::enableEditing(bool enable_edit) { // Don't enable anything if this is a read only database bool edit = enable_edit && !db.readOnly(); // Apply settings ui->dataTable->setEditTriggers(edit ? QAbstractItemView::SelectedClicked | QAbstractItemView::AnyKeyPressed | QAbstractItemView::EditKeyPressed : QAbstractItemView::NoEditTriggers); updateInsertDeleteRecordButton(); } void MainWindow::browseTableHeaderClicked(int logicalindex) { // Abort if there is more than one column selected because this tells us that the user pretty sure wants to do a range selection instead of sorting data if(ui->dataTable->selectionModel()->selectedColumns().count() > 1) return; // instead of the column name we just use the column index, +2 because 'rowid, *' is the projection BrowseDataTableSettings& settings = browseTableSettings[currentlyBrowsedTableName()]; int dummy; Qt::SortOrder order; fromSortOrderVector(settings.sortOrder, dummy, order); order = order == Qt::AscendingOrder ? Qt::DescendingOrder : Qt::AscendingOrder; settings.sortOrder = toSortOrderVector(logicalindex, order); ui->dataTable->sortByColumn(logicalindex, order); // select the first item in the column so the header is bold // we might try to select the last selected item ui->dataTable->setCurrentIndex(ui->dataTable->currentIndex().sibling(0, logicalindex)); attachPlot(ui->dataTable, m_browseTableModel, &browseTableSettings[currentlyBrowsedTableName()]); // Reapply the view settings. This seems to be necessary as a workaround for newer Qt versions. applyBrowseTableSettings(settings); } void MainWindow::resizeEvent(QResizeEvent*) { setRecordsetLabel(); } void MainWindow::keyPressEvent(QKeyEvent* event) { int tab = -1; switch (event->key()) { case Qt::Key_1: tab = Tabs::StructureTab; break; case Qt::Key_2: tab = Tabs::BrowseTab; break; case Qt::Key_3: tab = Tabs::PragmaTab; break; case Qt::Key_4: tab = Tabs::ExecuteTab; break; default: break; } if (event->modifiers() & Qt::AltModifier && tab != -1) ui->mainTab->setCurrentIndex(tab); QMainWindow::keyPressEvent(event); } void MainWindow::loadPragmas() { pragmaValues.autovacuum = db.getPragma("auto_vacuum").toInt(); pragmaValues.automatic_index = db.getPragma("automatic_index").toInt(); pragmaValues.checkpoint_fullsync = db.getPragma("checkpoint_fullfsync").toInt(); pragmaValues.foreign_keys = db.getPragma("foreign_keys").toInt(); pragmaValues.fullfsync = db.getPragma("fullfsync").toInt(); pragmaValues.ignore_check_constraints = db.getPragma("ignore_check_constraints").toInt(); pragmaValues.journal_mode = db.getPragma("journal_mode").toUpper(); pragmaValues.journal_size_limit = db.getPragma("journal_size_limit").toInt(); pragmaValues.locking_mode = db.getPragma("locking_mode").toUpper(); pragmaValues.max_page_count = db.getPragma("max_page_count").toInt(); pragmaValues.page_size = db.getPragma("page_size").toInt(); pragmaValues.recursive_triggers = db.getPragma("recursive_triggers").toInt(); pragmaValues.secure_delete = db.getPragma("secure_delete").toInt(); pragmaValues.synchronous = db.getPragma("synchronous").toInt(); pragmaValues.temp_store = db.getPragma("temp_store").toInt(); pragmaValues.user_version = db.getPragma("user_version").toInt(); pragmaValues.wal_autocheckpoint = db.getPragma("wal_autocheckpoint").toInt(); pragmaValues.case_sensitive_like = db.getPragma("case_sensitive_like").toInt(); updatePragmaUi(); } void MainWindow::updatePragmaUi() { ui->comboboxPragmaAutoVacuum->setCurrentIndex(pragmaValues.autovacuum); ui->checkboxPragmaAutomaticIndex->setChecked(pragmaValues.automatic_index); ui->checkboxPragmaCheckpointFullFsync->setChecked(pragmaValues.checkpoint_fullsync); ui->checkboxPragmaForeignKeys->setChecked(pragmaValues.foreign_keys); ui->checkboxPragmaFullFsync->setChecked(pragmaValues.fullfsync); ui->checkboxPragmaIgnoreCheckConstraints->setChecked(pragmaValues.ignore_check_constraints); ui->comboboxPragmaJournalMode->setCurrentIndex(ui->comboboxPragmaJournalMode->findText(pragmaValues.journal_mode, Qt::MatchFixedString)); ui->spinPragmaJournalSizeLimit->setValue(pragmaValues.journal_size_limit); ui->comboboxPragmaLockingMode->setCurrentIndex(ui->comboboxPragmaLockingMode->findText(pragmaValues.locking_mode, Qt::MatchFixedString)); ui->spinPragmaMaxPageCount->setValue(pragmaValues.max_page_count); ui->comboPragmaPageSize->setCurrentIndex(ui->comboPragmaPageSize->findText(QString::number(pragmaValues.page_size), Qt::MatchFixedString)); ui->checkboxPragmaRecursiveTriggers->setChecked(pragmaValues.recursive_triggers); ui->checkboxPragmaSecureDelete->setChecked(pragmaValues.secure_delete); ui->comboboxPragmaSynchronous->setCurrentIndex(pragmaValues.synchronous); ui->comboboxPragmaTempStore->setCurrentIndex(pragmaValues.temp_store); ui->spinPragmaUserVersion->setValue(pragmaValues.user_version); ui->spinPragmaWalAutoCheckpoint->setValue(pragmaValues.wal_autocheckpoint); ui->checkboxPragmaCaseSensitiveLike->setChecked(pragmaValues.case_sensitive_like); } void MainWindow::savePragmas() { if( db.getDirty() ) { QString msg = tr("Setting PRAGMA values will commit your current transaction.\nAre you sure?"); if(QMessageBox::question(this, QApplication::applicationName(), msg, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape) == QMessageBox::No) { return; // abort } } db.setPragma("auto_vacuum", ui->comboboxPragmaAutoVacuum->currentIndex(), pragmaValues.autovacuum); db.setPragma("automatic_index", ui->checkboxPragmaAutomaticIndex->isChecked(), pragmaValues.automatic_index); db.setPragma("checkpoint_fullfsync", ui->checkboxPragmaCheckpointFullFsync->isChecked(), pragmaValues.checkpoint_fullsync); db.setPragma("foreign_keys", ui->checkboxPragmaForeignKeys->isChecked(), pragmaValues.foreign_keys); db.setPragma("fullfsync", ui->checkboxPragmaFullFsync->isChecked(), pragmaValues.fullfsync); db.setPragma("ignore_check_constraints", ui->checkboxPragmaIgnoreCheckConstraints->isChecked(), pragmaValues.ignore_check_constraints); db.setPragma("journal_mode", ui->comboboxPragmaJournalMode->currentText().toUpper(), pragmaValues.journal_mode); db.setPragma("journal_size_limit", ui->spinPragmaJournalSizeLimit->value(), pragmaValues.journal_size_limit); db.setPragma("locking_mode", ui->comboboxPragmaLockingMode->currentText().toUpper(), pragmaValues.locking_mode); db.setPragma("max_page_count", ui->spinPragmaMaxPageCount->value(), pragmaValues.max_page_count); db.setPragma("page_size", ui->comboPragmaPageSize->currentText().toInt(), pragmaValues.page_size); db.setPragma("recursive_triggers", ui->checkboxPragmaRecursiveTriggers->isChecked(), pragmaValues.recursive_triggers); db.setPragma("secure_delete", ui->checkboxPragmaSecureDelete->isChecked(), pragmaValues.secure_delete); db.setPragma("synchronous", ui->comboboxPragmaSynchronous->currentIndex(), pragmaValues.synchronous); db.setPragma("temp_store", ui->comboboxPragmaTempStore->currentIndex(), pragmaValues.temp_store); db.setPragma("user_version", ui->spinPragmaUserVersion->value(), pragmaValues.user_version); db.setPragma("wal_autocheckpoint", ui->spinPragmaWalAutoCheckpoint->value(), pragmaValues.wal_autocheckpoint); db.setPragma("case_sensitive_like", ui->checkboxPragmaCaseSensitiveLike->isChecked(), pragmaValues.case_sensitive_like); updatePragmaUi(); } void MainWindow::logSql(const QString& sql, int msgtype) { if(msgtype == kLogMsg_User) { ui->editLogUser->append(sql + "\n"); ui->editLogUser->verticalScrollBar()->setValue(ui->editLogUser->verticalScrollBar()->maximum()); } else { ui->editLogApplication->append(sql + "\n"); ui->editLogApplication->verticalScrollBar()->setValue(ui->editLogApplication->verticalScrollBar()->maximum()); } } void MainWindow::closeSqlTab(int index, bool force) { // Don't close last tab if(ui->tabSqlAreas->count() == 1 && !force) return; // Remove the tab and delete the widget QWidget* w = ui->tabSqlAreas->widget(index); ui->tabSqlAreas->removeTab(index); delete w; } unsigned int MainWindow::openSqlTab(bool resetCounter) { static unsigned int tabNumber = 0; if(resetCounter) tabNumber = 0; // Create new tab, add it to the tab widget and select it SqlExecutionArea* w = new SqlExecutionArea(db, this); int index = ui->tabSqlAreas->addTab(w, QString("SQL %1").arg(++tabNumber)); ui->tabSqlAreas->setCurrentIndex(index); w->setFindFrameVisibility(ui->actionSqlFind->isChecked()); w->getEditor()->setFocus(); connect(w, SIGNAL(findFrameVisibilityChanged(bool)), ui->actionSqlFind, SLOT(setChecked(bool))); return index; } void MainWindow::changeSqlTab(int /*index*/) { // Instead of figuring out if there are some execution results in the new tab and which statement was used to generate them, // we just disable the export buttons in the toolbar. ui->actionSqlResultsSave->setEnabled(false); } void MainWindow::openSqlFile() { QString file = FileDialog::getOpenFileName( this, tr("Select SQL file to open"), tr("Text files(*.sql *.txt);;All files(*)")); if(QFile::exists(file)) { QFile f(file); f.open(QIODevice::ReadOnly); if(!f.isOpen()) { QMessageBox::warning(this, qApp->applicationName(), tr("Couldn't read file: %1.").arg(f.errorString())); return; } // Decide whether to open a new tab or take the current one unsigned int index; SqlExecutionArea* current_tab = qobject_cast(ui->tabSqlAreas->currentWidget()); if(current_tab && current_tab->getSql().isEmpty() && current_tab->getModel()->rowCount() == 0) index = ui->tabSqlAreas->currentIndex(); else index = openSqlTab(); SqlExecutionArea* sqlarea = qobject_cast(ui->tabSqlAreas->widget(index)); sqlarea->getEditor()->setText(f.readAll()); sqlarea->setFileName(file); QFileInfo fileinfo(file); ui->tabSqlAreas->setTabText(index, fileinfo.fileName()); } } void MainWindow::saveSqlFile() { SqlExecutionArea* sqlarea = qobject_cast(ui->tabSqlAreas->currentWidget()); if(!sqlarea) return; // If this SQL file hasn't been saved before open the Save As dialog. Otherwise just use the old file name for saving if(sqlarea->fileName().isEmpty()) { saveSqlFileAs(); } else { QFile f(sqlarea->fileName()); f.open(QIODevice::WriteOnly); if(f.isOpen() && f.write(sqlarea->getSql().toUtf8()) != -1) { QFileInfo fileinfo(sqlarea->fileName()); ui->tabSqlAreas->setTabText(ui->tabSqlAreas->currentIndex(), fileinfo.fileName()); } else { QMessageBox::warning(this, qApp->applicationName(), tr("Couldn't save file: %1.").arg(f.errorString())); } } } void MainWindow::saveSqlFileAs() { SqlExecutionArea* sqlarea = qobject_cast(ui->tabSqlAreas->currentWidget()); if(!sqlarea) return; QString file = FileDialog::getSaveFileName( this, tr("Select file name"), tr("Text files(*.sql *.txt);;All files(*)")); if(!file.isEmpty()) { // Just set the selected file name and call the standard save action which is going to use it qobject_cast(ui->tabSqlAreas->currentWidget())->setFileName(file); saveSqlFile(); } } void MainWindow::saveSqlResultsAsCsv() { qobject_cast(ui->tabSqlAreas->currentWidget())->saveAsCsv(); } void MainWindow::saveSqlResultsAsView() { saveAsView(qobject_cast(ui->tabSqlAreas->currentWidget())->getModel()->query()); } void MainWindow::loadExtension() { QString file = FileDialog::getOpenFileName( this, tr("Select extension file"), tr("Extensions(*.so *.dylib *.dll);;All files(*)")); if(file.isEmpty()) return; if(db.loadExtension(file)) QMessageBox::information(this, QApplication::applicationName(), tr("Extension successfully loaded.")); else QMessageBox::warning(this, QApplication::applicationName(), tr("Error loading extension: %1").arg(db.lastError())); } void MainWindow::reloadSettings() { // Set data browser font ui->dataTable->reloadSettings(); setToolButtonStyle(static_cast(Settings::getValue("General", "toolbarStyle").toInt())); // Set prefetch sizes for lazy population of table models m_browseTableModel->setChunkSize(Settings::getValue("db", "prefetchsize").toInt()); for(int i=0;itabSqlAreas->count();++i) qobject_cast(ui->tabSqlAreas->widget(i))->reloadSettings(); // Prepare log font QFont logfont("Monospace"); logfont.setStyleHint(QFont::TypeWriter); logfont.setPointSize(Settings::getValue("log", "fontsize").toInt()); // Set font for SQL logs and edit dialog ui->editLogApplication->reloadSettings(); ui->editLogUser->reloadSettings(); ui->editLogApplication->setFont(logfont); ui->editLogUser->setFont(logfont); editDock->reloadSettings(); // Load extensions db.loadExtensionsFromSettings(); // Refresh view dbStructureModel->reloadData(); populateStructure(); populateTable(); // Hide or show the remote dock as needed bool showRemoteActions = Settings::getValue("remote", "active").toBool(); ui->viewMenu->actions().at(4)->setVisible(showRemoteActions); if(!showRemoteActions) ui->dockRemote->setHidden(true); // Update the remote database connection settings m_remoteDb->reloadSettings(); // Reload remote dock settings remoteDock->reloadSettings(); sqlb::setIdentifierQuoting(static_cast(Settings::getValue("editor", "identifier_quotes").toInt())); } void MainWindow::checkNewVersion(const QString& versionstring, const QString& url) { // versionstring contains a major.minor.patch version string QStringList versiontokens = versionstring.split("."); if(versiontokens.size() < 3) return; int major = versiontokens[0].toInt(); int minor = versiontokens[1].toInt(); int patch = versiontokens[2].toInt(); bool newversion = false; if(major > MAJOR_VERSION) newversion = true; else if(major == MAJOR_VERSION) { if(minor > MINOR_VERSION) newversion = true; else if(minor == MINOR_VERSION) { if(patch > PATCH_VERSION) newversion = true; } } if(newversion) { int ignmajor = Settings::getValue("checkversion", "ignmajor").toInt(); int ignminor = Settings::getValue("checkversion", "ignminor").toInt(); int ignpatch = Settings::getValue("checkversion", "ignpatch").toInt(); // check if the user doesn't care about the current update if(!(ignmajor == major && ignminor == minor && ignpatch == patch)) { QMessageBox msgBox; QPushButton *idontcarebutton = msgBox.addButton(tr("Don't show again"), QMessageBox::ActionRole); msgBox.addButton(QMessageBox::Ok); msgBox.setTextFormat(Qt::RichText); msgBox.setWindowTitle(tr("New version available.")); msgBox.setText(tr("A new DB Browser for SQLite version is available (%1.%2.%3).

" "Please download at %4.").arg(major).arg(minor).arg(patch). arg(url)); msgBox.exec(); if(msgBox.clickedButton() == idontcarebutton) { // save that the user don't want to get bothered about this update Settings::setValue("checkversion", "ignmajor", major); Settings::setValue("checkversion", "ignminor", minor); Settings::setValue("checkversion", "ignpatch", patch); } } } } void MainWindow::on_actionWiki_triggered() { QDesktopServices::openUrl(QUrl("https://github.com/sqlitebrowser/sqlitebrowser/wiki")); } // 'Help | Bug Report...' link will set an appropiate body, add the system information and set the label 'bug' automatically to the issue void MainWindow::on_actionBug_report_triggered() { const QString version = Application::versionString(); const QString os = QSysInfo::prettyProductName(); const QString kernelType = QSysInfo::kernelType(); const QString kernelVersion = QSysInfo::kernelVersion(); const QString arch = QSysInfo::currentCpuArchitecture(); const QString built_for = QSysInfo::buildAbi(); QString sqlite_version, sqlcipher_version; DBBrowserDB::getSqliteVersion(sqlite_version, sqlcipher_version); if(sqlcipher_version.isNull()) sqlite_version = QString("SQLite Version ") + sqlite_version; else sqlite_version = QString("SQLCipher Version ") + sqlcipher_version + QString(" (based on SQLite %1)").arg(sqlite_version); const QString body = QString("Details for the issue\n" "--------------------\n\n" "#### What did you do?\n\n\n" "#### What did you expect to see?\n\n\n" "#### What did you see instead?\n\n\n" "Useful extra information\n" "-------------------------\n" "> DB4S v%1 [built for %2] on %3 (%4/%5) [%6]\n" "> using %7\n" "> and Qt %8") .arg(version, built_for, os, kernelType, kernelVersion, arch, sqlite_version, QT_VERSION_STR); QUrlQuery query; query.addQueryItem("labels", "bug"); query.addQueryItem("body", body); QUrl url("https://github.com/sqlitebrowser/sqlitebrowser/issues/new"); url.setQuery(query); QDesktopServices::openUrl(url); } // 'Help | Feature Request...' link will set an appropiate body and add the label 'enhancement' automatically to the issue void MainWindow::on_actionFeature_Request_triggered() { QUrlQuery query; // Add the label enhancement and use the Feature request template that // we have in GitHub. query.addQueryItem("labels", "enhancement"); query.addQueryItem("template", "Feature_request.md"); QUrl url("https://github.com/sqlitebrowser/sqlitebrowser/issues/new"); url.setQuery(query); QDesktopServices::openUrl(url); } void MainWindow::on_actionSqlCipherFaq_triggered() { QDesktopServices::openUrl(QUrl("https://discuss.zetetic.net/c/sqlcipher/sqlcipher-faq")); } void MainWindow::on_actionWebsite_triggered() { QDesktopServices::openUrl(QUrl("https://sqlitebrowser.org")); } void MainWindow::on_actionDonatePatreon_triggered() { QDesktopServices::openUrl(QUrl("https://www.patreon.com/bePatron?u=11578749")); } void MainWindow::updateBrowseDataColumnWidth(int section, int /*old_size*/, int new_size) { QSet selectedCols(ui->dataTable->selectedCols()); sqlb::ObjectIdentifier tableName = currentlyBrowsedTableName(); if (!selectedCols.contains(section)) { browseTableSettings[tableName].columnWidths[section] = new_size; } else { ui->dataTable->blockSignals(true); for(int col : selectedCols) { ui->dataTable->setColumnWidth(col, new_size); browseTableSettings[tableName].columnWidths[col] = new_size; } ui->dataTable->blockSignals(false); } } static void loadBrowseDataTableSettings(BrowseDataTableSettings& settings, QXmlStreamReader& xml) { // TODO Remove this in the near future. This file format was only created temporarily by the nightlies from the late 3.11 development period. if(xml.attributes().hasAttribute("sort_order_index")) { int sortOrderIndex = xml.attributes().value("sort_order_index").toInt(); Qt::SortOrder sortOrderMode = static_cast(xml.attributes().value("sort_order_mode").toInt()); settings.sortOrder = toSortOrderVector(sortOrderIndex, sortOrderMode); } settings.showRowid = xml.attributes().value("show_row_id").toInt(); settings.encoding = xml.attributes().value("encoding").toString(); settings.plotXAxis = xml.attributes().value("plot_x_axis").toString(); settings.unlockViewPk = xml.attributes().value("unlock_view_pk").toString(); while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "table") { if(xml.name() == "sort") { while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "sort") { if(xml.name() == "column") { int index = xml.attributes().value("index").toInt(); int mode = xml.attributes().value("mode").toInt(); settings.sortOrder.push_back(BrowseDataTableSettings::SortedColumn(index, mode)); xml.skipCurrentElement(); } } } else if(xml.name() == "column_widths") { while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "column_widths") { if (xml.name() == "column") { int index = xml.attributes().value("index").toInt(); settings.columnWidths[index] = xml.attributes().value("value").toInt(); xml.skipCurrentElement(); } } } else if(xml.name() == "filter_values") { while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "filter_values") { if (xml.name() == "column") { int index = xml.attributes().value("index").toInt(); settings.filterValues[index] = xml.attributes().value("value").toString(); xml.skipCurrentElement(); } } } else if(xml.name() == "display_formats") { while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "display_formats") { if (xml.name() == "column") { int index = xml.attributes().value("index").toInt(); settings.displayFormats[index] = xml.attributes().value("value").toString(); xml.skipCurrentElement(); } } } else if(xml.name() == "hidden_columns") { while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "hidden_columns") { if (xml.name() == "column") { int index = xml.attributes().value("index").toInt(); settings.hiddenColumns[index] = xml.attributes().value("value").toInt(); xml.skipCurrentElement(); } } } else if(xml.name() == "plot_y_axes") { while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "plot_y_axes") { QString yAxisName; PlotDock::PlotSettings yAxisSettings; if (xml.name() == "y_axis") { yAxisName = xml.attributes().value("name").toString(); yAxisSettings.lineStyle = xml.attributes().value("line_style").toInt(); yAxisSettings.pointShape = xml.attributes().value("point_shape").toInt(); yAxisSettings.colour = QColor (xml.attributes().value("colour").toString()); yAxisSettings.active = xml.attributes().value("active").toInt(); xml.skipCurrentElement(); } settings.plotYAxes[yAxisName] = yAxisSettings; } } } } bool MainWindow::loadProject(QString filename, bool readOnly) { // Show the open file dialog when no filename was passed as parameter if(filename.isEmpty()) { filename = FileDialog::getOpenFileName(this, tr("Choose a project file to open"), tr("DB Browser for SQLite project file (*.sqbpro)")); } if(!filename.isEmpty()) { QFile file(filename); file.open(QFile::ReadOnly | QFile::Text); QXmlStreamReader xml(&file); xml.readNext(); // token == QXmlStreamReader::StartDocument xml.readNext(); // name == sqlb_project if(xml.name() != "sqlb_project") return false; addToRecentFilesMenu(filename); while(!xml.atEnd() && !xml.hasError()) { // Read next token QXmlStreamReader::TokenType token = xml.readNext(); // Handle element start if(token == QXmlStreamReader::StartElement) { if(xml.name() == "db") { // DB file QString dbfilename = xml.attributes().value("path").toString(); if(!QFile::exists(dbfilename)) dbfilename = QFileInfo(filename).absolutePath() + QDir::separator() + dbfilename; fileOpen(dbfilename, true, readOnly); ui->dbTreeWidget->collapseAll(); // PRAGMAs if(xml.attributes().hasAttribute("foreign_keys")) db.setPragma("foreign_keys", xml.attributes().value("foreign_keys").toString()); if(xml.attributes().hasAttribute("case_sensitive_like")) db.setPragma("case_sensitive_like", xml.attributes().value("case_sensitive_like").toString()); if(xml.attributes().hasAttribute("temp_store")) db.setPragma("temp_store", xml.attributes().value("temp_store").toString()); if(xml.attributes().hasAttribute("wal_autocheckpoint")) db.setPragma("wal_autocheckpoint", xml.attributes().value("wal_autocheckpoint").toString()); if(xml.attributes().hasAttribute("synchronous")) db.setPragma("synchronous", xml.attributes().value("synchronous").toString()); loadPragmas(); } else if(xml.name() == "attached") { while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "attached") { if(xml.name() == "db") { db.attach(xml.attributes().value("path").toString(), xml.attributes().value("schema").toString()); xml.skipCurrentElement(); } } } else if(xml.name() == "window") { // Window settings while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "window") { // Currently selected tab if(xml.name() == "current_tab") ui->mainTab->setCurrentIndex(xml.attributes().value("id").toString().toInt()); } } else if(xml.name() == "tab_structure") { // Database Structure tab settings while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "tab_structure") { if(xml.name() == "column_width") { // Tree view column widths ui->dbTreeWidget->setColumnWidth(xml.attributes().value("id").toString().toInt(), xml.attributes().value("width").toString().toInt()); xml.skipCurrentElement(); } else if(xml.name() == "expanded_item") { // Tree view expanded items int parent = xml.attributes().value("parent").toString().toInt(); QModelIndex idx; if(parent == -1) idx = ui->dbTreeWidget->model()->index(xml.attributes().value("id").toString().toInt(), 0); else idx = ui->dbTreeWidget->model()->index(xml.attributes().value("id").toString().toInt(), 0, ui->dbTreeWidget->model()->index(parent, 0)); ui->dbTreeWidget->expand(idx); xml.skipCurrentElement(); } } } else if(xml.name() == "tab_browse") { // Browse Data tab settings while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "tab_browse") { if(xml.name() == "current_table") { // Currently selected table ui->comboBrowseTable->setCurrentIndex(ui->comboBrowseTable->findText(xml.attributes().value("name").toString())); xml.skipCurrentElement(); } else if(xml.name() == "default_encoding") { // Default text encoding defaultBrowseTableEncoding = xml.attributes().value("codec").toString(); xml.skipCurrentElement(); } else if(xml.name() == "browsetable_info") { // This tag is only found in old project files. In newer versions (>= 3.11) it is replaced by a new implementation. // We still support loading it though we might decide to drop that support later. But for now we show a warning to the // user when loading an old file. if(!Settings::getValue("idontcare", "projectBrowseTable").toBool()) { QMessageBox msgBox; QPushButton* idontcarebutton = msgBox.addButton(tr("Don't show again"), QMessageBox::ActionRole); msgBox.addButton(QMessageBox::Ok); msgBox.setTextFormat(Qt::RichText); msgBox.setWindowTitle(qApp->applicationName()); msgBox.setText(tr("This project file is using an old file format because it was created using DB Browser for SQLite " "version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert " "all your project files to the new file format because support for older formats might be dropped " "at some point in the future. You can convert your files by simply opening and re-saving them.")); msgBox.exec(); if(msgBox.clickedButton() == idontcarebutton) Settings::setValue("idontcare", "projectBrowseTable", true); } QString attrData = xml.attributes().value("data").toString(); QByteArray temp = QByteArray::fromBase64(attrData.toUtf8()); QDataStream stream(temp); stream >> browseTableSettings; xml.skipCurrentElement(); } else if(xml.name() == "browse_table_settings") { while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "browse_table_settings") { if (xml.name() == "table") { sqlb::ObjectIdentifier tableIdentifier = sqlb::ObjectIdentifier (xml.attributes().value("schema").toString(), xml.attributes().value("name").toString()); BrowseDataTableSettings settings; loadBrowseDataTableSettings(settings, xml); browseTableSettings[tableIdentifier] = settings; } } } if(ui->mainTab->currentIndex() == BrowseTab) { populateTable(); // Refresh view sqlb::ObjectIdentifier current_table = currentlyBrowsedTableName(); int sortIndex; Qt::SortOrder sortMode; fromSortOrderVector(browseTableSettings[current_table].sortOrder, sortIndex, sortMode); ui->dataTable->sortByColumn(sortIndex, sortMode); showRowidColumn(browseTableSettings[current_table].showRowid); unlockViewEditing(!browseTableSettings[current_table].unlockViewPk.isEmpty(), browseTableSettings[current_table].unlockViewPk); } } } else if(xml.name() == "tab_sql") { // Close all open tabs first for(int i=ui->tabSqlAreas->count()-1;i>=0;i--) closeSqlTab(i, true); // Execute SQL tab data while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "tab_sql") { if(xml.name() == "sql") { // SQL editor tab unsigned int index = openSqlTab(); ui->tabSqlAreas->setTabText(index, xml.attributes().value("name").toString()); qobject_cast(ui->tabSqlAreas->widget(index))->getEditor()->setText(xml.readElementText()); } else if(xml.name() == "current_tab") { // Currently selected tab ui->tabSqlAreas->setCurrentIndex(xml.attributes().value("id").toString().toInt()); xml.skipCurrentElement(); } } } } } file.close(); return !xml.hasError(); } else { // No project was opened return false; } } static void saveDbTreeState(const QTreeView* tree, QXmlStreamWriter& xml, QModelIndex index = QModelIndex(), int parent_row = -1) { for(int i=0;imodel()->rowCount(index);i++) { if(tree->isExpanded(tree->model()->index(i, 0, index))) { xml.writeStartElement("expanded_item"); xml.writeAttribute("id", QString::number(i)); xml.writeAttribute("parent", QString::number(parent_row)); xml.writeEndElement(); } saveDbTreeState(tree, xml, tree->model()->index(i, 0, index), i); } } static void saveBrowseDataTableSettings(const BrowseDataTableSettings& object, QXmlStreamWriter& xml) { xml.writeAttribute("show_row_id", QString::number(object.showRowid)); xml.writeAttribute("encoding", object.encoding); xml.writeAttribute("plot_x_axis", object.plotXAxis); xml.writeAttribute("unlock_view_pk", object.unlockViewPk); xml.writeStartElement("sort"); for(const auto& column : object.sortOrder) { xml.writeStartElement("column"); xml.writeAttribute("index", QString::number(column.index)); xml.writeAttribute("mode", QString::number(column.mode)); xml.writeEndElement(); } xml.writeEndElement(); xml.writeStartElement("column_widths"); for(auto iter=object.columnWidths.constBegin(); iter!=object.columnWidths.constEnd(); ++iter) { xml.writeStartElement("column"); xml.writeAttribute("index", QString::number(iter.key())); xml.writeAttribute("value", QString::number(iter.value())); xml.writeEndElement(); } xml.writeEndElement(); xml.writeStartElement("filter_values"); for(auto iter=object.filterValues.constBegin(); iter!=object.filterValues.constEnd(); ++iter) { xml.writeStartElement("column"); xml.writeAttribute("index", QString::number(iter.key())); xml.writeAttribute("value", iter.value()); xml.writeEndElement(); } xml.writeEndElement(); xml.writeStartElement("display_formats"); for(auto iter=object.displayFormats.constBegin(); iter!=object.displayFormats.constEnd(); ++iter) { xml.writeStartElement("column"); xml.writeAttribute("index", QString::number(iter.key())); xml.writeAttribute("value", iter.value()); xml.writeEndElement(); } xml.writeEndElement(); xml.writeStartElement("hidden_columns"); for(auto iter=object.hiddenColumns.constBegin(); iter!=object.hiddenColumns.constEnd(); ++iter) { xml.writeStartElement("column"); xml.writeAttribute("index", QString::number(iter.key())); xml.writeAttribute("value", QString::number(iter.value())); xml.writeEndElement(); } xml.writeEndElement(); xml.writeStartElement("plot_y_axes"); for(auto iter=object.plotYAxes.constBegin(); iter!=object.plotYAxes.constEnd(); ++iter) { PlotDock::PlotSettings plotSettings = iter.value(); xml.writeStartElement("y_axis"); xml.writeAttribute("name", iter.key()); xml.writeAttribute("line_style", QString::number(plotSettings.lineStyle)); xml.writeAttribute("point_shape", QString::number(plotSettings.pointShape)); xml.writeAttribute("colour", plotSettings.colour.name()); xml.writeAttribute("active", QString::number(plotSettings.active)); xml.writeEndElement(); } xml.writeEndElement(); } void MainWindow::saveProject() { QString filename = FileDialog::getSaveFileName(this, tr("Choose a filename to save under"), tr("DB Browser for SQLite project file (*.sqbpro)"), db.currentFile()); if(!filename.isEmpty()) { // Make sure the file has got a .sqbpro ending if(!filename.endsWith(".sqbpro", Qt::CaseInsensitive)) filename.append(".sqbpro"); QFile file(filename); file.open(QFile::WriteOnly | QFile::Text); QXmlStreamWriter xml(&file); xml.writeStartDocument(); xml.writeStartElement("sqlb_project"); // Database file name xml.writeStartElement("db"); xml.writeAttribute("path", db.currentFile()); xml.writeAttribute("foreign_keys", db.getPragma("foreign_keys")); xml.writeAttribute("case_sensitive_like", db.getPragma("case_sensitive_like")); xml.writeAttribute("temp_store", db.getPragma("temp_store")); xml.writeAttribute("wal_autocheckpoint", db.getPragma("wal_autocheckpoint")); xml.writeAttribute("synchronous", db.getPragma("synchronous")); xml.writeEndElement(); // Attached databases xml.writeStartElement("attached"); QString sql("PRAGMA database_list;"); db.logSQL(sql, kLogMsg_App); sqlite3_stmt* db_vm; if(sqlite3_prepare_v2(db.get("project").get(), sql.toUtf8(), sql.toUtf8().length(), &db_vm, nullptr) == SQLITE_OK) { while(sqlite3_step(db_vm) == SQLITE_ROW) { QString schema(QString::fromUtf8((const char*)sqlite3_column_text(db_vm, 1))); if(schema != "main" && schema != "temp") { QString path(QString::fromUtf8((const char*)sqlite3_column_text(db_vm, 2))); xml.writeStartElement("db"); xml.writeAttribute("schema", schema); xml.writeAttribute("path", path); xml.writeEndElement(); } } sqlite3_finalize(db_vm); } xml.writeEndElement(); // Window settings xml.writeStartElement("window"); xml.writeStartElement("current_tab"); // Currently selected tab xml.writeAttribute("id", QString::number(ui->mainTab->currentIndex())); xml.writeEndElement(); xml.writeEndElement(); // Database Structure tab settings xml.writeStartElement("tab_structure"); for(int i=0;idbTreeWidget->model()->columnCount();i++) // Widths of tree view columns { xml.writeStartElement("column_width"); xml.writeAttribute("id", QString::number(i)); xml.writeAttribute("width", QString::number(ui->dbTreeWidget->columnWidth(i))); xml.writeEndElement(); } saveDbTreeState(ui->dbTreeWidget, xml); // Expanded tree items xml.writeEndElement(); // Browse Data tab settings xml.writeStartElement("tab_browse"); xml.writeStartElement("current_table"); // Currently selected table xml.writeAttribute("name", ui->comboBrowseTable->currentText()); xml.writeEndElement(); xml.writeStartElement("default_encoding"); // Default encoding for text stored in tables xml.writeAttribute("codec", defaultBrowseTableEncoding); xml.writeEndElement(); xml.writeStartElement("browse_table_settings"); for(auto tableIt=browseTableSettings.constBegin(); tableIt!=browseTableSettings.constEnd(); ++tableIt) { xml.writeStartElement("table"); xml.writeAttribute("schema", tableIt.key().schema()); xml.writeAttribute("name", tableIt.key().name()); saveBrowseDataTableSettings(tableIt.value(), xml); xml.writeEndElement(); } // xml.writeEndElement(); // xml.writeEndElement(); // Execute SQL tab data xml.writeStartElement("tab_sql"); for(int i=0;itabSqlAreas->count();i++) // All SQL tabs content { xml.writeStartElement("sql"); xml.writeAttribute("name", ui->tabSqlAreas->tabText(i)); xml.writeCharacters(qobject_cast(ui->tabSqlAreas->widget(i))->getSql()); xml.writeEndElement(); } xml.writeStartElement("current_tab"); // Currently selected tab xml.writeAttribute("id", QString::number(ui->tabSqlAreas->currentIndex())); xml.writeEndElement(); xml.writeEndElement(); xml.writeEndElement(); xml.writeEndDocument(); file.close(); addToRecentFilesMenu(filename); } } void MainWindow::fileAttach() { // Get file name of database to attach QString file = FileDialog::getOpenFileName( this, tr("Choose a database file"), FileDialog::getSqlDatabaseFileFilter()); if(!QFile::exists(file)) return; // Attach it db.attach(file); } void MainWindow::updateFilter(int column, const QString& value) { m_browseTableModel->updateFilter(column, value); BrowseDataTableSettings& settings = browseTableSettings[currentlyBrowsedTableName()]; settings.filterValues[column] = value; setRecordsetLabel(); // Reapply the view settings. This seems to be necessary as a workaround for newer Qt versions. applyBrowseTableSettings(settings, true); } void MainWindow::editEncryption() { #ifdef ENABLE_SQLCIPHER CipherDialog cipherDialog(this, true); if(cipherDialog.exec()) { // Show progress dialog even though we can't provide any detailed progress information but this // process might take some time. QProgressDialog progress(this); progress.setCancelButton(nullptr); progress.setWindowModality(Qt::ApplicationModal); progress.show(); qApp->processEvents(); // Apply all unsaved changes bool ok = db.releaseAllSavepoints(); qApp->processEvents(); // Create the new file first or it won't work if(ok) { QFile file(db.currentFile() + ".enctemp"); file.open(QFile::WriteOnly); file.close(); } CipherSettings cipherSettings = cipherDialog.getCipherSettings(); // Attach a new database using the new settings qApp->processEvents(); if(ok) ok = db.executeSQL(QString("ATTACH DATABASE '%1' AS sqlitebrowser_edit_encryption KEY %2;").arg(db.currentFile() + ".enctemp").arg(cipherSettings.getPassword()), false, false); qApp->processEvents(); if(ok) ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.cipher_page_size = %1").arg(cipherSettings.getPageSize()), false, false); if(ok) ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.cipher_hmac_algorithm = %1").arg(cipherSettings.getHmacAlgorithm()), false, false); if(ok) ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.cipher_kdf_algorithm = %1").arg(cipherSettings.getKdfAlgorithm()), false, false); if(ok) ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.kdf_iter = %1").arg(cipherSettings.getKdfIterations()), false, false); // Export the current database to the new one qApp->processEvents(); if(ok) ok = db.executeSQL("SELECT sqlcipher_export('sqlitebrowser_edit_encryption');", false, false); // Set user version of the new database qApp->processEvents(); if (ok) ok = db.executeSQL(QString("PRAGMA sqlitebrowser_edit_encryption.user_version = %1;").arg(db.getPragma("user_version").toInt()), false, false); // We need to detach the database before proceeding qApp->processEvents(); if (ok) ok = db.executeSQL("DETACH sqlitebrowser_edit_encryption;", false, false); // Check for errors qApp->processEvents(); if(ok) { // No errors: Then close the current database, switch names, open the new one and if that succeeded delete the old one fileClose(); QFile::rename(db.currentFile(), db.currentFile() + ".enctempold"); QFile::rename(db.currentFile() + ".enctemp", db.currentFile()); if(fileOpen(db.currentFile())) QFile::remove(db.currentFile() + ".enctempold"); } else { QMessageBox::warning(this, qApp->applicationName(), db.lastError()); } } #endif } void MainWindow::switchToBrowseDataTab(QString tableToBrowse) { // If no table name was provided get the currently selected table fromt he structure tab if(tableToBrowse.isEmpty()) { // Cancel here if there is no selection if(!ui->dbTreeWidget->selectionModel()->hasSelection()) return; sqlb::ObjectIdentifier obj(ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnSchema)).toString(), ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnName)).toString()); tableToBrowse = obj.toDisplayString(); } ui->comboBrowseTable->setCurrentIndex(ui->comboBrowseTable->findText(tableToBrowse)); ui->mainTab->setCurrentIndex(BrowseTab); } void MainWindow::on_buttonClearFilters_clicked() { ui->dataTable->filterHeader()->clearFilters(); } void MainWindow::copyCurrentCreateStatement() { // Cancel if no field is currently selected if(!ui->dbTreeWidget->selectionModel()->hasSelection()) return; // Get the CREATE statement from the Schema column QString stmt = ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), 3), Qt::EditRole).toString(); // Copy the statement to the global application clipboard QApplication::clipboard()->setText(stmt); } void MainWindow::jumpToRow(const sqlb::ObjectIdentifier& table, QString column, const QByteArray& value) { // First check if table exists sqlb::TablePtr obj = db.getObjectByName(table); if(!obj) return; // If no column name is set, assume the primary key is meant if(!column.size()) column = obj->findPk()->name(); // If column doesn't exist don't do anything auto column_index = sqlb::findField(obj, column); if(column_index == obj->fields.end()) return; // Jump to table ui->comboBrowseTable->setCurrentIndex(ui->comboBrowseTable->findText(table.toDisplayString())); populateTable(); // Set filter ui->dataTable->filterHeader()->setFilter(column_index-obj->fields.begin()+1, "=" + value); } void MainWindow::showDataColumnPopupMenu(const QPoint& pos) { // Get the index of the column which the user has clicked on and store it in the action. This is sort of hack-ish and it might be the heat in my room // but I haven't come up with a better solution so far int logical_index = ui->dataTable->horizontalHeader()->logicalIndexAt(pos); if(logical_index == -1) // Don't open the popup menu if the user hasn't clicked on a column header return; ui->actionBrowseTableEditDisplayFormat->setProperty("clicked_column", logical_index); // Calculate the proper position for the context menu and display it popupBrowseDataHeaderMenu->exec(ui->dataTable->horizontalHeader()->mapToGlobal(pos)); } void MainWindow::showRecordPopupMenu(const QPoint& pos) { if(!(db.getObjectByName(currentlyBrowsedTableName())->type() == sqlb::Object::Types::Table && !db.readOnly())) return; int row = ui->dataTable->verticalHeader()->logicalIndexAt(pos); if (row == -1) return; // Select the row if it is not already in the selection. QModelIndexList rowList = ui->dataTable->selectionModel()->selectedRows(); bool found = false; for (QModelIndex index : rowList) { if (row == index.row()) { found = true; break; } } if (!found) ui->dataTable->selectRow(row); rowList = ui->dataTable->selectionModel()->selectedRows(); QString duplicateText = rowList.count() > 1 ? tr("Duplicate records") : tr("Duplicate record"); QMenu popupRecordMenu(this); QAction* action = new QAction(duplicateText, &popupRecordMenu); // Set shortcut for documentation purposes (the actual functional shortcut is not set here) action->setShortcut(QKeySequence(tr("Ctrl+\""))); popupRecordMenu.addAction(action); connect(action, &QAction::triggered, [&]() { for (QModelIndex index : rowList) { duplicateRecord(index.row()); } }); QAction* deleteRecordAction = new QAction(ui->buttonDeleteRecord->text(), &popupRecordMenu); popupRecordMenu.addAction(deleteRecordAction); connect(deleteRecordAction, &QAction::triggered, [&]() { deleteRecord(); }); popupRecordMenu.exec(ui->dataTable->verticalHeader()->mapToGlobal(pos)); } void MainWindow::editDataColumnDisplayFormat() { // Get the current table name and fetch its table object, then retrieve the fields of that table and look up the index of the clicked table header // section using it as the table field array index. Subtract one from the header index to get the column index because in the the first (though hidden) // column is always the rowid column. Ultimately, get the column name from the column object sqlb::ObjectIdentifier current_table = currentlyBrowsedTableName(); int field_number = sender()->property("clicked_column").toInt(); QString field_name; if (db.getObjectByName(current_table)->type() == sqlb::Object::Table) field_name = db.getObjectByName(current_table)->fields.at(field_number-1).name(); else field_name = db.getObjectByName(current_table)->fieldNames().at(field_number-1); // Get the current display format of the field QString current_displayformat = browseTableSettings[current_table].displayFormats[field_number]; // Open the dialog ColumnDisplayFormatDialog dialog(field_name, current_displayformat, this); if(dialog.exec()) { // Set the newly selected display format QString new_format = dialog.selectedDisplayFormat(); if(new_format.size()) browseTableSettings[current_table].displayFormats[field_number] = new_format; else browseTableSettings[current_table].displayFormats.remove(field_number); // Refresh view populateTable(); } } void MainWindow::showRowidColumn(bool show, bool skipFilters) { // Block all signals from the horizontal header. Otherwise the QHeaderView::sectionResized signal causes us trouble ui->dataTable->horizontalHeader()->blockSignals(true); // WORKAROUND // Set the opposite hidden/visible status of what we actually want for the rowid column. This is to work around a Qt bug which // is present in at least version 5.7.1. The problem is this: when you browse a table/view with n colums, then switch to a table/view // with less than n columns, you'll be able to resize the first (hidden!) column by resizing the section to the left of the first visible // column. By doing so the table view gets messed up. But even when not resizing the first hidden column, tab-ing through the fields // will stop at the not-so-much-hidden rowid column, too. All this can be fixed by this line. I haven't managed to find another workaround // or way to fix this yet. ui->dataTable->setColumnHidden(0, show); // Show/hide rowid column ui->dataTable->setColumnHidden(0, !show); // Update checked status of the popup menu action ui->actionShowRowidColumn->setChecked(show); // Save settings for this table sqlb::ObjectIdentifier current_table = currentlyBrowsedTableName(); browseTableSettings[current_table].showRowid = show; // Update the filter row if(!skipFilters) qobject_cast(ui->dataTable->horizontalHeader())->generateFilters(m_browseTableModel->columnCount(), show); // Re-enable signals ui->dataTable->horizontalHeader()->blockSignals(false); ui->dataTable->update(); } void MainWindow::browseDataSetTableEncoding(bool forAllTables) { // Get the old encoding QString encoding = m_browseTableModel->encoding(); // Ask the user for a new encoding bool ok; QString question; QStringList availableCodecs = toStringList(QTextCodec::availableCodecs()); availableCodecs.removeDuplicates(); int currentItem = availableCodecs.indexOf(encoding); if(forAllTables) question = tr("Please choose a new encoding for all tables."); else question = tr("Please choose a new encoding for this table."); encoding = QInputDialog::getItem(this, tr("Set encoding"), tr("%1\nLeave the field empty for using the database encoding.").arg(question), availableCodecs, currentItem, true, // editable &ok); // Only set the new encoding if the user clicked the OK button if(ok) { // Check if encoding is valid if(!encoding.isEmpty() && !QTextCodec::codecForName(encoding.toUtf8())) { QMessageBox::warning(this, qApp->applicationName(), tr("This encoding is either not valid or not supported.")); return; } // Set encoding for current table m_browseTableModel->setEncoding(encoding); // Save encoding for this table browseTableSettings[currentlyBrowsedTableName()].encoding = encoding; // Set default encoding if requested to and change all stored table encodings if(forAllTables) { defaultBrowseTableEncoding = encoding; for(auto it=browseTableSettings.begin();it!=browseTableSettings.end();++it) it.value().encoding = encoding; } } } void MainWindow::browseDataSetDefaultTableEncoding() { browseDataSetTableEncoding(true); } void MainWindow::fileOpenReadOnly() { // Redirect to 'standard' fileOpen(), with the read only flag set fileOpen(QString(), false, true); } void MainWindow::unlockViewEditing(bool unlock, QString pk) { sqlb::ObjectIdentifier currentTable = currentlyBrowsedTableName(); // If this isn't a view just unlock editing and return if(db.getObjectByName(currentTable) && db.getObjectByName(currentTable)->type() != sqlb::Object::View) { m_browseTableModel->setPseudoPk(QString()); enableEditing(true); return; } sqlb::ViewPtr obj = db.getObjectByName(currentTable); // If the view gets unlocked for editing and we don't have a 'primary key' for this view yet, then ask for one if(unlock && pk.isEmpty()) { while(true) { bool ok; // Ask for a PK pk = QInputDialog::getItem(this, qApp->applicationName(), tr("Please enter a pseudo-primary key in order to enable editing on this view. " "This should be the name of a unique column in the view."), obj->fieldNames(), 0, false, &ok); // Cancelled? if(!ok || pk.isEmpty()) { ui->actionUnlockViewEditing->setChecked(false); return; } // Do some basic testing of the input and if the input appears to be good, go on if(db.executeSQL(QString("SELECT %1 FROM %2 LIMIT 1;").arg(sqlb::escapeIdentifier(pk)).arg(currentTable.toString()), false, true)) break; } } else if(!unlock) { // Locking the view is done by unsetting the pseudo-primary key pk.clear(); } // (De)activate editing enableEditing(unlock); m_browseTableModel->setPseudoPk(pk); // Update checked status of the popup menu action ui->actionUnlockViewEditing->blockSignals(true); ui->actionUnlockViewEditing->setChecked(unlock); ui->actionUnlockViewEditing->blockSignals(false); // If the settings didn't change, do not try to reapply them. // This avoids an infinite mutual recursion. BrowseDataTableSettings& settings = browseTableSettings[currentTable]; if(settings.unlockViewPk != pk) { // Save settings for this table settings.unlockViewPk = pk; // Reapply the view settings. This seems to be necessary as a workaround for newer Qt versions. applyBrowseTableSettings(settings); } } sqlb::ObjectIdentifier MainWindow::currentlyBrowsedTableName() const { return sqlb::ObjectIdentifier(ui->comboBrowseTable->model()->data(dbStructureModel->index(ui->comboBrowseTable->currentIndex(), DbStructureModel::ColumnSchema, ui->comboBrowseTable->rootModelIndex())).toString(), ui->comboBrowseTable->currentData(Qt::EditRole).toString()); // Use the edit role here to make sure we actually get the // table name without the schema bit in front of it. } void MainWindow::hideColumns(int column, bool hide) { sqlb::ObjectIdentifier tableName = currentlyBrowsedTableName(); // Select columns to (un)hide QSet columns; if(column == -1) { if(ui->dataTable->selectedCols().size() == 0) columns.insert(ui->actionBrowseTableEditDisplayFormat->property("clicked_column").toInt()); else columns += ui->dataTable->selectedCols(); } else { columns.insert(column); } // (Un)hide requested column(s) for(int col : columns) { ui->dataTable->setColumnHidden(col, hide); if(!hide) ui->dataTable->setColumnWidth(col, ui->dataTable->horizontalHeader()->defaultSectionSize()); browseTableSettings[tableName].hiddenColumns[col] = hide; } // check to see if all the columns are hidden bool allHidden = true; for(int col = 1; col < ui->dataTable->model()->columnCount(); col++) { if(!ui->dataTable->isColumnHidden(col)) { allHidden = false; break; } } if(allHidden && ui->dataTable->model()->columnCount() > 1) hideColumns(1, false); } void MainWindow::on_actionShowAllColumns_triggered() { for(int col = 1; col < ui->dataTable->model()->columnCount(); col++) { if(ui->dataTable->isColumnHidden(col)) hideColumns(col, false); } } void MainWindow::requestCollation(const QString& name, int eTextRep) { QMessageBox::StandardButton reply = QMessageBox::question( this, tr("Collation needed! Proceed?"), tr("A table in this database requires a special collation function '%1' " "that this application can't provide without further knowledge.\n" "If you choose to proceed, be aware bad things can happen to your database.\n" "Create a backup!").arg(name), QMessageBox::Yes | QMessageBox::No); if(reply == QMessageBox::Yes) { auto pDb = db.get(tr("creating collation")); sqlite3_create_collation(pDb.get(), name.toUtf8(), eTextRep, nullptr, collCompare); } } void MainWindow::renameSqlTab(int index) { QString new_name = QInputDialog::getText(this, qApp->applicationName(), tr("Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut."), QLineEdit::EchoMode::Normal, ui->tabSqlAreas->tabText(index)); if(!new_name.isNull()) // Don't do anything if the Cancel button was clicked ui->tabSqlAreas->setTabText(index, new_name); } void MainWindow::setFindFrameVisibility(bool show) { // Set the find frame visibility for all tabs, but leave the // current as the last, to retain there the focus. for(int i=0;itabSqlAreas->count();i++) if (i != ui->tabSqlAreas->currentIndex()) qobject_cast(ui->tabSqlAreas->widget(i))->setFindFrameVisibility(show); if (ui->tabSqlAreas->count()>0) qobject_cast(ui->tabSqlAreas->currentWidget())->setFindFrameVisibility(show); } void MainWindow::openFindReplaceDialog() { // The slot for the shortcut must discover which sqltexedit widget has the focus and then open its dialog. SqlExecutionArea* sqlWidget = qobject_cast(ui->tabSqlAreas->currentWidget()); if (sqlWidget) sqlWidget->getEditor()->openFindReplaceDialog(); } void MainWindow::openSqlPrintDialog() { // The slot for the shortcut must discover which sqltexedit widget has the focus and then open its dialog. SqlExecutionArea* sqlWidget = qobject_cast(ui->tabSqlAreas->currentWidget()); if (sqlWidget) sqlWidget->getEditor()->openPrintDialog(); } void MainWindow::saveAsView(QString query) { // Let the user select a name for the new view and make sure it doesn't already exist QString name; while(true) { name = QInputDialog::getText(this, qApp->applicationName(), tr("Please specify the view name")).trimmed(); if(name.isNull()) return; if(db.getObjectByName(sqlb::ObjectIdentifier("main", name)) != nullptr) QMessageBox::warning(this, qApp->applicationName(), tr("There is already an object with that name. Please choose a different name.")); else break; } // Create the view if(db.executeSQL(QString("CREATE VIEW %1 AS %2;").arg(sqlb::escapeIdentifier(name)).arg(query))) QMessageBox::information(this, qApp->applicationName(), tr("View successfully created.")); else QMessageBox::warning(this, qApp->applicationName(), tr("Error creating view: %1").arg(db.lastError())); } void MainWindow::exportFilteredTable() { ExportDataDialog dialog(db, ExportDataDialog::ExportFormatCsv, this, m_browseTableModel->customQuery(false)); dialog.exec(); } void MainWindow::saveFilterAsView() { if (m_browseTableModel->filterCount() > 0) // Save as view a custom query without rowid saveAsView(m_browseTableModel->customQuery(false)); else QMessageBox::information(this, qApp->applicationName(), tr("There is no filter set for this table. View will not be created.")); } void MainWindow::duplicateRecord(int currentRow) { auto row = m_browseTableModel->dittoRecord(currentRow); if (row.isValid()) ui->dataTable->setCurrentIndex(row); else QMessageBox::warning(this, qApp->applicationName(), db.lastError()); } void MainWindow::updateInsertDeleteRecordButton() { // Update the delete record button to reflect number of selected records // NOTE: We're assuming here that the selection is always contiguous, i.e. that there are never two selected // rows with a non-selected row in between. int rows = 0; // If there is no model yet (because e.g. no database file is opened) there is no selection model either. So we need to check for that here // in order to avoid null pointer dereferences. If no selection model exists we will just continue as if no row is selected because without a // model you could argue there actually is no row to be selected. if(ui->dataTable->selectionModel()) { const auto & sel = ui->dataTable->selectionModel()->selectedIndexes(); if(sel.count()) rows = sel.last().row() - sel.first().row() + 1; } // Enable the insert and delete buttons only if the currently browsed table or view is editable. For the delete button we additionally require // at least one row to be selected. For the insert button there is an extra rule to disable it when we are browsing a view because inserting // into a view isn't supported yet. bool isEditable = m_browseTableModel->isEditable() && !db.readOnly(); ui->buttonNewRecord->setEnabled(isEditable && m_browseTableModel->pseudoPk().isEmpty()); ui->buttonDeleteRecord->setEnabled(isEditable && rows != 0); if(rows > 1) ui->buttonDeleteRecord->setText(tr("Delete Records")); else ui->buttonDeleteRecord->setText(tr("Delete Record")); } void MainWindow::runSqlNewTab(const QString& query, const QString& title) { QString message = tr("This action will open a new SQL tab for running:") + QString("
%1

").arg(query) + tr("Press Help for opening the corresponding SQLite reference page."); QString windowTitle = title; windowTitle.remove('&'); switch (QMessageBox::information(this, windowTitle, message, QMessageBox::Ok | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape, QMessageBox::Help)) { case QMessageBox::Ok: { ui->mainTab->setCurrentIndex(ExecuteTab); unsigned int index = openSqlTab(); ui->tabSqlAreas->setTabText(index, title); qobject_cast(ui->tabSqlAreas->widget(index))->getEditor()->setText(query); executeQuery(); break; } case QMessageBox::Help: { QString anchor = query.toLower(); anchor.replace(" ", "_").chop(1); QDesktopServices::openUrl(QUrl(QString("https://www.sqlite.org/pragma.html#") + anchor)); break; } default: return; } } void MainWindow::printDbStructure () { const QTreeView* treeView = ui->dbTreeWidget; const QAbstractItemModel* model = treeView->model(); const int rowCount = model->rowCount(treeView->rootIndex()); const int columnCount = model->columnCount(treeView->rootIndex()); QString strStream; QTextStream out(&strStream); out << "" << QString("%1").arg(treeView->windowTitle()) << ""; for (int row = 0; row < rowCount; row++) { QModelIndex headerIndex = model->index(row, 0, treeView->rootIndex()); QString data = model->data(headerIndex).toString().toHtmlEscaped(); out << QString("

%1

").arg(data); // Open a new table for each group of objects out << ""; for (int column = 0; column < columnCount; column++) { // Headers if (!treeView->isColumnHidden(column)) out << QString("").arg(model->headerData(column, Qt::Horizontal).toString().toHtmlEscaped()); } out << ""; for (int column = 0; column < columnCount; column++) { QModelIndex groupIndex = model->index(row, column, treeView->rootIndex()); // A row for the object name for (int rowChild = 0; rowChild < model->rowCount(groupIndex); rowChild++) { QModelIndex objectIndex = model->index(rowChild, column, groupIndex); out << ""; for (int column2 = 0; column2 < columnCount; column2++) { if (!treeView->isColumnHidden(column2)) { QModelIndex cellIndex = model->index(rowChild, column2, groupIndex); QString data = model->data(cellIndex).toString().toHtmlEscaped(); if (column2 != DbStructureModel::ColumnSQL) out << QString("").arg((!data.isEmpty()) ? data : QString(" ")); else out << QString("").arg((!data.isEmpty()) ? data : QString(" ")); } } out << ""; // One row for each object's fields for (int rowChild2 = 0; rowChild2 < model->rowCount(objectIndex); rowChild2++) { out << ""; for (int column2 = 0; column2 < columnCount; column2++) { if (!treeView->isColumnHidden(column2)) { QModelIndex fieldIndex = model->index(rowChild2, column2, objectIndex); QString data = model->data(fieldIndex).toString().toHtmlEscaped(); out << QString("").arg((!data.isEmpty()) ? data : QString(" ")); } } out << ""; } } } out << "
%1

%1

%1
%1
"; } out << ""; QTextDocument *document = new QTextDocument(); document->setHtml(strStream); QPrinter printer; printer.setDocName(treeView->windowTitle()); QPrintPreviewDialog *dialog = new QPrintPreviewDialog(&printer); connect(dialog, &QPrintPreviewDialog::paintRequested, [&](QPrinter *previewPrinter) { document->print(previewPrinter); }); dialog->exec(); delete dialog; delete document; } sqlitebrowser-3.11.2/src/MainWindow.h000066400000000000000000000226051345112435200175240ustar00rootroot00000000000000#ifndef MAINWINDOW_H #define MAINWINDOW_H #include "sqlitedb.h" #include "PlotDock.h" #include #include class QDragEnterEvent; class EditDialog; class QIntValidator; class QLabel; class QModelIndex; class QPersistentModelIndex; class SqliteTableModel; class DbStructureModel; class RemoteDock; class RemoteDatabase; class FindReplaceDialog; class ExtendedTableWidget; namespace Ui { class MainWindow; } struct BrowseDataTableSettings { struct SortedColumn { SortedColumn() : index(0), mode(Qt::AscendingOrder) {} SortedColumn(int index_, Qt::SortOrder mode_) : index(index_), mode(mode_) {} SortedColumn(int index_, int mode_) : index(index_), mode(static_cast(mode_)) {} int index; Qt::SortOrder mode; }; QVector sortOrder; QMap columnWidths; QMap filterValues; QMap displayFormats; bool showRowid; QString encoding; QString plotXAxis; QMap plotYAxes; QString unlockViewPk; QMap hiddenColumns; BrowseDataTableSettings() : showRowid(false) { } friend QDataStream& operator>>(QDataStream& stream, BrowseDataTableSettings& object) { int sortOrderIndex, sortOrderMode; stream >> sortOrderIndex; stream >> sortOrderMode; object.sortOrder.push_back(SortedColumn(sortOrderIndex, sortOrderMode)); stream >> object.columnWidths; stream >> object.filterValues; stream >> object.displayFormats; stream >> object.showRowid; stream >> object.encoding; // Versions pre 3.10.0 didn't store the following information in their project files. // To be absolutely sure that nothing strange happens when we read past the stream for // those cases, check for the end of the stream here. if(stream.atEnd()) return stream; stream >> object.plotXAxis; stream >> object.plotYAxes; stream >> object.unlockViewPk; // Project files from versions before 3.11.0 didn't have these fields if(stream.atEnd()) return stream; stream >> object.hiddenColumns; return stream; } }; class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget* parent = nullptr); ~MainWindow(); DBBrowserDB& getDb() { return db; } RemoteDatabase& getRemote() { return *m_remoteDb; } enum Tabs { StructureTab, BrowseTab, PragmaTab, ExecuteTab }; private: struct PragmaValues { int autovacuum; int automatic_index; int checkpoint_fullsync; int foreign_keys; int fullfsync; int ignore_check_constraints; QString journal_mode; int journal_size_limit; QString locking_mode; int max_page_count; int page_size; int recursive_triggers; int secure_delete; int synchronous; int temp_store; int user_version; int wal_autocheckpoint; int case_sensitive_like; } pragmaValues; enum StatementType { SelectStatement, AlterStatement, DropStatement, RollbackStatement, PragmaStatement, VacuumStatement, InsertStatement, UpdateStatement, DeleteStatement, CreateStatement, AttachStatement, DetachStatement, OtherStatement, }; Ui::MainWindow* ui; DBBrowserDB db; /// the table model used in the "Browse Data" page (re-used and /// re-initialized when switching to another table) SqliteTableModel* m_browseTableModel; SqliteTableModel* m_currentTabTableModel; QMenu* popupTableMenu; QMenu* popupSchemaDockMenu; QMenu* recentFilesMenu; QMenu* popupOpenDbMenu; QMenu* popupNewRecordMenu; QMenu* popupSaveSqlFileMenu; QMenu* popupSaveSqlResultsMenu; QMenu* popupSaveFilterAsMenu; QMenu* popupBrowseDataHeaderMenu; QLabel* statusEncodingLabel; QLabel* statusEncryptionLabel; QLabel* statusReadOnlyLabel; DbStructureModel* dbStructureModel; enum { MaxRecentFiles = 5 }; QAction *recentFileActs[MaxRecentFiles]; QAction *recentSeparatorAct; QMap browseTableSettings; RemoteDatabase* m_remoteDb; EditDialog* editDock; PlotDock* plotDock; RemoteDock* remoteDock; FindReplaceDialog* findReplaceDialog; QIntValidator* gotoValidator; QString defaultBrowseTableEncoding; void init(); void clearCompleterModelsFields(); void updateRecentFileActions(); void setCurrentFile(const QString& fileName); void addToRecentFilesMenu(const QString& filename); void activateFields(bool enable = true); void enableEditing(bool enable_edit); void saveAsView(QString query); void duplicateRecord(int currentRow); void selectTableLine(int lineToSelect); void attachPlot(ExtendedTableWidget* tableWidget, SqliteTableModel* model, BrowseDataTableSettings* settings = nullptr, bool keepOrResetSelection = true); sqlb::ObjectIdentifier currentlyBrowsedTableName() const; StatementType getQueryType(const QString& query) const; void applyBrowseTableSettings(BrowseDataTableSettings storedData, bool skipFilters = false); protected: void closeEvent(QCloseEvent *); void dragEnterEvent(QDragEnterEvent *event); void dropEvent(QDropEvent *event); void resizeEvent(QResizeEvent *event); void keyPressEvent(QKeyEvent* event); public slots: bool fileOpen(const QString& fileName = QString(), bool dontAddToRecentFiles = false, bool readOnly = false); void logSql(const QString &sql, int msgtype); void dbState(bool dirty); void refresh(); void jumpToRow(const sqlb::ObjectIdentifier& table, QString column, const QByteArray& value); void switchToBrowseDataTab(QString tableToBrowse = QString()); void populateStructure(const QString& old_table = QString()); private slots: void createTreeContextMenu(const QPoint & qPoint); void createSchemaDockContextMenu(const QPoint & qPoint); void changeTreeSelection(); void fileNew(); void fileNewInMemoryDatabase(); void populateTable(); void clearTableBrowser(); bool fileClose(); void addRecord(); void insertValues(); void deleteRecord(); void navigatePrevious(); void navigateNext(); void navigateBegin(); void navigateEnd(); void navigateGoto(); void setRecordsetLabel(); void createTable(); void createIndex(); void compact(); void deleteObject(); void editObject(); void helpWhatsThis(); void helpAbout(); void updateRecordText(const QPersistentModelIndex& idx, const QByteArray& text, bool isBlob); void toggleEditDock(bool visible); void dataTableSelectionChanged(const QModelIndex& index); void doubleClickTable(const QModelIndex& index); void executeQuery(); void importTableFromCSV(); void exportTableToCSV(); void exportTableToJson(); void fileSave(); void fileRevert(); void exportDatabaseToSQL(); void importDatabaseFromSQL(); void openPreferences(); void openRecentFile(); void loadPragmas(); void updatePragmaUi(); void savePragmas(); void mainTabSelected( int tabindex ); void browseTableHeaderClicked(int logicalindex); unsigned int openSqlTab(bool resetCounter = false); void closeSqlTab(int index, bool force = false); void changeSqlTab(int index); void openSqlFile(); void saveSqlFile(); void saveSqlFileAs(); void saveSqlResultsAsCsv(); void saveSqlResultsAsView(); void loadExtension(); void reloadSettings(); void checkNewVersion(const QString& versionstring, const QString& url); void on_actionWiki_triggered(); void on_actionBug_report_triggered(); void on_actionFeature_Request_triggered(); void on_actionSqlCipherFaq_triggered(); void on_actionWebsite_triggered(); void on_actionDonatePatreon_triggered(); void updateBrowseDataColumnWidth(int section, int /*old_size*/, int new_size); bool loadProject(QString filename = QString(), bool readOnly = false); void saveProject(); void fileAttach(); void updateFilter(int column, const QString& value); void editEncryption(); void on_buttonClearFilters_clicked(); void copyCurrentCreateStatement(); void showDataColumnPopupMenu(const QPoint& pos); void showRecordPopupMenu(const QPoint& pos); void editDataColumnDisplayFormat(); void showRowidColumn(bool show, bool skipFilters = false); void browseDataSetTableEncoding(bool forAllTables = false); void browseDataSetDefaultTableEncoding(); void fileOpenReadOnly(); void unlockViewEditing(bool unlock, QString pk = QString()); void hideColumns(int column = -1, bool hide = true); void on_actionShowAllColumns_triggered(); void requestCollation(const QString& name, int eTextRep); void renameSqlTab(int index); void setFindFrameVisibility(bool show); void openFindReplaceDialog(); void openSqlPrintDialog(); void saveFilterAsView(); void exportFilteredTable(); void updateInsertDeleteRecordButton(); void runSqlNewTab(const QString& query, const QString& title); void printDbStructure(); }; #endif sqlitebrowser-3.11.2/src/MainWindow.ui000066400000000000000000003533441345112435200177210ustar00rootroot00000000000000 MainWindow 0 0 1037 630 DB Browser for SQLite :/icons/appicon:/icons/appicon 0 Database Structure 4 0 0 0 0 toolBar1 Qt::ToolButtonTextBesideIcon Qt::CustomContextMenu This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. true QAbstractItemView::DragDrop true QAbstractItemView::ScrollPerPixel true Browse Data &Table: comboBrowseTable 1 0 150 0 400 16777215 Select a table to browse data Use this list to select a table to be displayed in the database view 30 QComboBox::AdjustToContents Refresh the data in the selected table [F5, Ctrl+R] This button refreshes the data in the currently selected table. :/icons/refresh:/icons/refresh Clear all filters This button clears all the filters set in the header input fields for the currently browsed table. :/icons/clear_filters:/icons/clear_filters Save the table as currently displayed <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> ... :/icons/save_table:/icons/save_table Print currently browsed table data [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. :/icons/print:/icons/print Qt::Horizontal 200 20 Insert a new record in the current table <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> New Record Delete the current record This button deletes the record or records currently selected in the table Delete Record true This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. QAbstractItemView::NoEditTriggers QAbstractItemView::DragDrop Qt::CopyAction QAbstractItemView::ContiguousSelection true false <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> |< :/icons/resultset_first.png:/icons/resultset_first.png false Scroll one page upwards <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> < :/icons/resultset_previous.png:/icons/resultset_previous.png 0 - 0 of 0 false Scroll one page downwards <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> > :/icons/run:/icons/run false Scroll to the end <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| :/icons/run_line:/icons/run_line Qt::Horizontal 40 20 <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> Go to: Enter record number to browse Type a record number in this area and click the Go to: button to display the record in the database view 1 Edit Pragmas true 0 0 601 484 QFormLayout::ExpandingFieldsGrow <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum">Auto Vacuum</a></p></body></html> true Qt::LinksAccessibleByMouse comboboxPragmaAutoVacuum None Full Incremental <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index">Automatic Index</a></p></body></html> true checkboxPragmaAutomaticIndex <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> true checkboxPragmaCaseSensitiveLike Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync">Checkpoint Full FSYNC</a></p></body></html> true checkboxPragmaCheckpointFullFsync <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys">Foreign Keys</a></p></body></html> true checkboxPragmaForeignKeys <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync">Full FSYNC</a></p></body></html> true checkboxPragmaFullFsync <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints">Ignore Check Constraints</a></p></body></html> true checkboxPragmaIgnoreCheckConstraints <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode">Journal Mode</a></p></body></html> true comboboxPragmaJournalMode Delete Truncate Persist Memory WAL Off <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit">Journal Size Limit</a></p></body></html> true spinPragmaJournalSizeLimit -1 100000 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode">Locking Mode</a></p></body></html> true comboboxPragmaLockingMode Normal Exclusive <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count">Max Page Count</a></p></body></html> true spinPragmaMaxPageCount 2000000000 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size">Page Size</a></p></body></html> true comboPragmaPageSize 512 1024 2048 4096 8192 16384 32768 65536 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers">Recursive Triggers</a></p></body></html> true checkboxPragmaRecursiveTriggers <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete">Secure Delete</a></p></body></html> true checkboxPragmaSecureDelete <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous">Synchronous</a></p></body></html> true comboboxPragmaSynchronous Off Normal Full <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store">Temp Store</a></p></body></html> true comboboxPragmaTempStore Default File Memory <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version">User Version</a></p></body></html> true spinPragmaUserVersion 2147483647 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint">WAL Auto Checkpoint</a></p></body></html> true spinPragmaWalAutoCheckpoint 10000 QDialogButtonBox::Cancel|QDialogButtonBox::Save false Execute SQL toolBar1 -1 true true 0 0 1037 20 &File &Import &Export &Edit &View &Help &Tools DB Toolbar Qt::ToolButtonIconOnly TopToolBarArea false Edit Database &Cell 2 QDockWidget::AllDockWidgetFeatures SQL &Log 2 0 30 Show S&QL submitted by comboLogSubmittedBy 0 30 User Application Qt::Horizontal 20 20 0 30 This button clears the contents of the SQL logs &Clear This panel lets you examine a log of all SQL commands issued by the application or by yourself 0 Monospace 8 true Monospace 8 true QDockWidget::AllDockWidgetFeatures &Plot 2 DB Sche&ma 2 Qt::CustomContextMenu This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. true QAbstractItemView::DragDrop true QAbstractItemView::ExtendedSelection QAbstractItemView::SelectItems QAbstractItemView::ScrollPerPixel true &Remote 2 Project Toolbar Qt::ToolButtonIconOnly TopToolBarArea false true Extra DB toolbar Close the current database file Qt::ToolButtonIconOnly TopToolBarArea false :/icons/db_new:/icons/db_new &New Database... Create a new database file Create a new database file This option is used to create a new database file. Ctrl+N QAction::NoRole :/icons/db_open:/icons/db_open &Open Database... Open an existing database file Open an existing database file This option is used to open an existing database file. Ctrl+O QAction::NoRole false :/icons/close:/icons/close &Close Database Close the current database file Close the current database file This button closes the connection to the currently open database file Ctrl+W QAction::NoRole false :/icons/db_revert:/icons/db_revert &Revert Changes Revert database to last saved state Revert database to last saved state This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. QAction::NoRole false :/icons/db_save:/icons/db_save &Write Changes Write changes to the database file Write changes to the database file This option is used to save changes to the database file. Ctrl+S QAction::NoRole false Compact &Database... Compact the database file, removing space wasted by deleted records Compact the database file, removing space wasted by deleted records. Compact the database file, removing space wasted by deleted records. QAction::NoRole E&xit Ctrl+Q QAction::QuitRole &Database from SQL file... Import data from an .sql dump text file into a new or existing database. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. QAction::NoRole &Table from CSV file... Open a wizard that lets you import data from a comma separated text file into a database table. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. QAction::NoRole &Database to SQL file... Export a database to a .sql dump text file. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. QAction::NoRole &Table(s) as CSV file... Export a database table as a comma separated text file. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. QAction::NoRole false :/icons/table_create:/icons/table_create &Create Table... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database QAction::NoRole false :/icons/table_delete:/icons/table_delete &Delete Table... Delete Table Open the Delete Table wizard, where you can select a database table to be dropped. QAction::NoRole false :/icons/table_modify:/icons/table_modify &Modify Table... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. QAction::NoRole false :/icons/index_create:/icons/index_create Create &Index... Open the Create Index wizard, where it is possible to define a new index on an existing database table. QAction::NoRole :/icons/settings:/icons/settings &Preferences... Open the preferences window. Open the preferences window. QAction::PreferencesRole true :/icons/toolbar:/icons/toolbar &DB Toolbar Shows or hides the Database toolbar. Ctrl+T QAction::NoRole :/icons/whatis:/icons/whatis W&hat's This? Shift+F1 QAction::NoRole &About QAction::AboutRole &Recently opened :/icons/open_tab:/icons/open_tab Open &tab This button opens a new tab for the SQL editor Ctrl+T :/icons/run:/icons/run &Execute SQL Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. :/icons/document_open:/icons/document_open Open SQL file This button opens a file containing SQL statements and loads it in a new editor tab :/icons/save_sql:/icons/save_sql Save SQL file false :/icons/load_extension:/icons/load_extension &Load Extension... QAction::NoRole :/icons/run_line:/icons/run_line Execute current line Execute current line [Shift+F5] This button executes the SQL statement present in the current editor line Shift+F5 false Export as CSV file Export table as comma separated values file :/icons/browser_open:/icons/browser_open &Wiki QAction::NoRole :/icons/browser_open:/icons/browser_open Bug &Report... QAction::NoRole :/icons/browser_open:/icons/browser_open Feature Re&quest... QAction::NoRole :/icons/browser_open:/icons/browser_open Web&site QAction::NoRole :/icons/browser_open:/icons/browser_open &Donate on Patreon... QAction::NoRole :/icons/project_save:/icons/project_save Sa&ve Project... Save the current session to a file Save the current session to a file This button lets you save all the settings associated to the open DB to a DB4S project file QAction::NoRole :/icons/project_open:/icons/project_open Open &Project... Load a working session from a file Load a working session from a file This button lets you open a DB4S project file QAction::NoRole false :/icons/db_attach:/icons/db_attach &Attach Database... Add another database file to the current database connection Add another database file to the current database connection This button lets you add another database file to the current database connection QAction::NoRole :/icons/encryption:/icons/encryption &Set Encryption... QAction::NoRole :/icons/save_sql:/icons/save_sql Save SQL file as Save SQL file as :/icons/save_sql:/icons/save_sql Save SQL file Save SQL file This button saves the content of the current SQL editor tab to a file :/icons/table:/icons/table &Browse Table :/icons/copy:/icons/copy Copy Create statement Copy the CREATE statement of the item to the clipboard Edit display format Edit the display format of the data in this column true Show rowid column Toggle the visibility of the rowid column Set encoding Change the encoding of the text in the table cells Set encoding for all tables Change the default encoding assumed for all tables in the database :/icons/browser_open:/icons/browser_open SQLCipher &FAQ Opens the SQLCipher FAQ in a browser window Table(&s) to JSON... Export one or more table(s) to a JSON file QAction::NoRole Refresh F5 :/icons/db_open:/icons/db_open Open Data&base Read Only... Open an existing database file in read only mode Open an existing database file This option is used to open an existing database file. QAction::NoRole true Unlock view editing This unlocks the current view for editing. However, you will need appropriate triggers for editing. :/icons/save_table:/icons/save_table Save results Save the results view This button lets you save the results of the last executed query true :/icons/find:/icons/find Find text in SQL editor Find text in SQL editor [Ctrl+F] This button opens the search bar of the editor Ctrl+F false :/icons/text_replace:/icons/text_replace Find or replace text in SQL editor Find or replace text in SQL editor [Ctrl+H] This button opens the find/replace dialog for the current editor tab Export to &CSV Save as &view Save as view Hide column(s) Hide selected column(s) Show all columns Show all columns that were hidden true false :/icons/toolbar:/icons/toolbar Project Toolbar Shows or hides the Project toolbar. QAction::NoRole true :/icons/toolbar:/icons/toolbar Extra DB Toolbar Export to &CSV Export the filtered data to CSV Export the filtered data to CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Save as &view Save the current filter, sort column and display formats as a view Save the current filter, sort column and display formats as a view This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. :/icons/db_open:/icons/db_open &Open Database... Open an existing database file Open an existing database file This option is used to open an existing database file. QAction::TextHeuristicRole Insert Values... Open a dialog for inserting values in a new record Open a dialog for inserting values in a new record New Record Insert new record using default values in browsed table Insert new record using default values in browsed table New In-&Memory Database true Drag && Drop Qualified Names Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor true Drag && Drop Enquoted Names Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor &Integrity Check Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. &Foreign-Key Check Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab &Quick Integrity Check Run a quick integrity check over the open DB Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. &Optimize Attempt to optimize the database Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. :/icons/print:/icons/print Print Print text from current SQL editor tab [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Qt::WidgetShortcut false :/icons/print:/icons/print Print Print the structure of the opened database [Ctrl+P] Open a dialog for printing the structure of the opened database Ctrl+P Qt::WidgetShortcut SqlTextEdit QTextEdit
sqltextedit.h
1
ExtendedTableWidget QTableWidget
ExtendedTableWidget.h
foreignKeyClicked(QString,QString,QByteArray) foreignKeyClicked(sqlb::ObjectIdentifier,QString,QByteArray)
mainTab dbTreeWidget comboLogSubmittedBy buttonLogClear treeSchemaDock comboBrowseTable buttonRefresh buttonClearFilters buttonNewRecord buttonDeleteRecord dataTable buttonBegin buttonPrevious buttonNext buttonEnd buttonGoto editGoto scrollareaPragmas comboboxPragmaAutoVacuum checkboxPragmaAutomaticIndex checkboxPragmaCaseSensitiveLike checkboxPragmaCheckpointFullFsync checkboxPragmaForeignKeys checkboxPragmaFullFsync checkboxPragmaIgnoreCheckConstraints comboboxPragmaJournalMode spinPragmaJournalSizeLimit comboboxPragmaLockingMode spinPragmaMaxPageCount comboPragmaPageSize checkboxPragmaSecureDelete checkboxPragmaRecursiveTriggers comboboxPragmaSynchronous comboboxPragmaTempStore spinPragmaUserVersion spinPragmaWalAutoCheckpoint tabSqlAreas fileExitAction triggered() MainWindow close() -1 -1 399 299 fileOpenAction triggered() MainWindow fileOpen() -1 -1 399 299 fileNewAction triggered() MainWindow fileNew() -1 -1 399 299 fileCloseAction triggered() MainWindow fileClose() -1 -1 399 299 comboBrowseTable activated(QString) MainWindow populateTable() 118 141 399 299 buttonNewRecord clicked() MainWindow addRecord() 402 143 399 299 buttonDeleteRecord clicked() MainWindow deleteRecord() 506 143 399 299 buttonPrevious clicked() MainWindow navigatePrevious() 86 539 399 299 buttonNext clicked() MainWindow navigateNext() 183 539 399 299 buttonGoto clicked() MainWindow navigateGoto() 365 539 399 299 editGoto returnPressed() MainWindow navigateGoto() 506 538 399 299 buttonRefresh clicked() MainWindow refresh() 245 139 399 299 fileCompactAction triggered() MainWindow compact() -1 -1 399 299 helpWhatsThisAction triggered() MainWindow helpWhatsThis() -1 -1 399 299 helpAboutAction triggered() MainWindow helpAbout() -1 -1 399 299 mainTab currentChanged(int) MainWindow mainTabSelected(int) 399 315 399 299 fileImportCSVAction triggered() MainWindow importTableFromCSV() -1 -1 399 299 fileExportCSVAction triggered() MainWindow exportTableToCSV() -1 -1 399 299 fileRevertAction triggered() MainWindow fileRevert() -1 -1 399 299 fileSaveAction triggered() MainWindow fileSave() -1 -1 399 299 editCreateIndexAction triggered() MainWindow createIndex() -1 -1 399 299 editDeleteObjectAction triggered() MainWindow deleteObject() -1 -1 399 299 editModifyObjectAction triggered() MainWindow editObject() -1 -1 399 299 fileExportSQLAction triggered() MainWindow exportDatabaseToSQL() -1 -1 399 299 fileImportSQLAction triggered() MainWindow importDatabaseFromSQL() -1 -1 399 299 viewPreferencesAction triggered() MainWindow openPreferences() -1 -1 399 299 dbTreeWidget customContextMenuRequested(QPoint) MainWindow createTreeContextMenu(QPoint) 111 261 399 299 treeSchemaDock customContextMenuRequested(QPoint) MainWindow createSchemaDockContextMenu(QPoint) 111 261 399 299 viewDBToolbarAction toggled(bool) toolbarDB setVisible(bool) -1 -1 399 34 actionSqlFind toggled(bool) MainWindow setFindFrameVisibility(bool) -1 -1 399 34 actionSqlFindReplace triggered() MainWindow openFindReplaceDialog() -1 -1 399 34 editCreateTableAction triggered() MainWindow createTable() -1 -1 399 299 buttonBoxPragmas rejected() MainWindow loadPragmas() 111 540 -1 470 buttonBoxPragmas accepted() MainWindow savePragmas() 111 540 802 522 buttonLogClear clicked() editLogApplication clear() 989 126 632 173 buttonLogClear clicked() editLogUser clear() 989 126 1028 230 comboLogSubmittedBy currentIndexChanged(int) stackLog setCurrentIndex(int) 772 135 1028 230 dataTable doubleClicked(QModelIndex) MainWindow doubleClickTable(QModelIndex) 399 211 399 299 tabSqlAreas tabCloseRequested(int) MainWindow closeSqlTab(int) 91 259 -1 51 tabSqlAreas currentChanged(int) MainWindow changeSqlTab(int) 91 259 -1 51 actionExecuteSql triggered() MainWindow executeQuery() -1 -1 399 299 actionSqlOpenTab triggered() MainWindow openSqlTab() -1 -1 399 299 actionSqlOpenFile triggered() MainWindow openSqlFile() -1 -1 399 299 actionSqlSaveFile triggered() MainWindow saveSqlFile() -1 -1 399 299 actionLoadExtension triggered() MainWindow loadExtension() -1 -1 399 299 actionSqlExecuteLine triggered() MainWindow executeQuery() -1 -1 399 299 actionExportCsvPopup triggered() MainWindow exportTableToCSV() -1 -1 399 299 actionOpenProject triggered() MainWindow loadProject() -1 -1 399 299 actionSaveProject triggered() MainWindow saveProject() -1 -1 399 299 fileAttachAction triggered() MainWindow fileAttach() -1 -1 499 314 actionEncryption triggered() MainWindow editEncryption() -1 -1 499 314 actionSqlSaveFilePopup triggered() MainWindow saveSqlFile() -1 -1 499 314 actionSqlSaveFileAs triggered() MainWindow saveSqlFileAs() -1 -1 499 314 buttonEnd clicked() MainWindow navigateEnd() 223 539 499 314 buttonBegin clicked() MainWindow navigateBegin() 50 539 499 314 actionEditBrowseTable triggered() MainWindow switchToBrowseDataTab() -1 -1 499 314 actionEditCopyCreateStatement triggered() MainWindow copyCurrentCreateStatement() -1 -1 499 314 dataTable foreignKeyClicked(sqlb::ObjectIdentifier,QString,QByteArray) MainWindow jumpToRow(sqlb::ObjectIdentifier,QString,QByteArray) 70 242 518 314 actionBrowseTableEditDisplayFormat triggered() MainWindow editDataColumnDisplayFormat() -1 -1 518 314 actionShowRowidColumn triggered(bool) MainWindow showRowidColumn(bool) -1 -1 518 314 actionSetTableEncoding triggered() MainWindow browseDataSetTableEncoding() -1 -1 518 314 actionSetAllTablesEncoding triggered() MainWindow browseDataSetDefaultTableEncoding() -1 -1 518 314 fileExportJsonAction triggered() MainWindow exportTableToJson() -1 -1 518 314 actionRefresh triggered() MainWindow refresh() -1 -1 518 314 fileOpenReadOnlyAction triggered() MainWindow fileOpenReadOnly() -1 -1 518 314 actionUnlockViewEditing toggled(bool) MainWindow unlockViewEditing(bool) -1 -1 518 314 actionSqlResultsExportCsv triggered() MainWindow saveSqlResultsAsCsv() -1 -1 518 314 actionSqlResultsSaveAsView triggered() MainWindow saveSqlResultsAsView() -1 -1 518 314 actionHideColumns triggered() MainWindow hideColumns() -1 -1 518 314 tabSqlAreas tabBarDoubleClicked(int) MainWindow renameSqlTab(int) 330 372 518 314 buttonSaveFilterAsPopup clicked() MainWindow saveFilterAsView() 290 127 518 314 viewProjectToolbarAction toggled(bool) toolbarProject setVisible(bool) -1 -1 887 44 viewExtraDBToolbarAction toggled(bool) toolbarExtraDB setVisible(bool) -1 -1 737 44 MainWindow toolButtonStyleChanged(Qt::ToolButtonStyle) toolbarDB setToolButtonStyle(Qt::ToolButtonStyle) 518 314 296 44 MainWindow toolButtonStyleChanged(Qt::ToolButtonStyle) toolbarExtraDB setToolButtonStyle(Qt::ToolButtonStyle) 518 314 737 44 MainWindow toolButtonStyleChanged(Qt::ToolButtonStyle) toolbarProject setToolButtonStyle(Qt::ToolButtonStyle) 518 314 959 44 actionFilteredTableExportCsv triggered() MainWindow exportFilteredTable() -1 -1 518 314 actionFilterSaveAsView triggered() MainWindow saveFilterAsView() -1 -1 518 314 fileOpenActionPopup triggered() MainWindow fileOpen() -1 -1 518 314 newRecordAction triggered() MainWindow addRecord() -1 -1 518 314 insertValuesAction triggered() MainWindow insertValues() -1 -1 fileNewInMemoryDatabaseAction triggered() MainWindow fileNewInMemoryDatabase() 518 314 actionSqlPrint triggered() MainWindow openSqlPrintDialog() -1 -1 518 314 actionDbPrint triggered() MainWindow printDbStructure() -1 -1 518 314 buttonPrintTable clicked() dataTable openPrintDialog() 315 122 326 347 fileOpen() fileClose() populateTable() addRecord() deleteRecord() navigatePrevious() navigateNext() navigateBegin() navigateEnd() navigateGoto() browseFind(bool) refresh() compact() helpWhatsThis() doubleClickTable(QModelIndex) browseTableHeaderClicked(int) mainTabSelected(int) executeQuery() importTableFromCSV() exportTableToCSV() fileRevert() fileSave() deleteIndex() createIndex() createTable() deleteObject() editObject() editTablePopup() addField() editField() exportDatabaseToSQL() importDatabaseFromSQL() openPreferences() createTreeContextMenu(QPoint) changeTreeSelection() fileNew() helpAbout() deleteField() loadPragmas() savePragmas() copy() closeSqlTab(int) openSqlTab() openSqlFile() saveSqlFile() loadExtension() loadProject() saveProject() fileAttach() editEncryption() saveSqlFileAs() switchToBrowseDataTab() copyCurrentCreateStatement() jumpToRow(sqlb::ObjectIdentifier,QString,QByteArray) editDataColumnDisplayFormat() showRowidColumn(bool) browseDataSetTableEncoding() browseDataSetDefaultTableEncoding() browseDataFetchAllData() exportTableToJson() fileOpenReadOnly() unlockViewEditing(bool) saveSqlResultsAsCsv() saveSqlResultsAsView() changeSqlTab(int) hideColumns() renameSqlTab(int) fileNewInMemoryDatabase()
sqlitebrowser-3.11.2/src/PlotDock.cpp000066400000000000000000001104251345112435200175200ustar00rootroot00000000000000#include "PlotDock.h" #include "ui_PlotDock.h" #include "Settings.h" #include "sqlitetablemodel.h" #include "FileDialog.h" #include "MainWindow.h" // Just for BrowseDataTableSettings, not for the actual main window class #include #include PlotDock::PlotDock(QWidget* parent) : QDialog(parent), ui(new Ui::PlotDock), m_currentPlotModel(nullptr), m_currentTableSettings(nullptr), m_showLegend(false), m_stackedBars(false) { ui->setupUi(this); // Init widgets ui->treePlotColumns->setSelectionMode(QAbstractItemView::NoSelection); // Restore state ui->splitterForPlot->restoreState(Settings::getValue("PlotDock", "splitterSize").toByteArray()); ui->comboLineType->setCurrentIndex(Settings::getValue("PlotDock", "lineType").toInt()); ui->comboPointShape->setCurrentIndex(Settings::getValue("PlotDock", "pointShape").toInt()); // Connect signals connect(ui->treePlotColumns, &QTreeWidget::itemChanged, this, &PlotDock::on_treePlotColumns_itemChanged); connect(ui->plotWidget, SIGNAL(selectionChangedByUser()), this, SLOT(selectionChanged())); // connect slots that takes care that when an axis is selected, only that direction can be dragged and zoomed: connect(ui->plotWidget, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(mousePress())); connect(ui->plotWidget, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(mouseWheel())); // Enable: click on items to select them, Ctrl+Click for multi-selection, mouse-wheel for zooming and mouse drag for // changing the visible range. // Select one axis for zoom and drag applying only to that orientation. ui->plotWidget->setInteractions(QCP::iSelectPlottables | QCP::iMultiSelect | QCP::iRangeZoom | QCP::iRangeDrag | QCP::iSelectAxes); ui->plotWidget->setSelectionRectMode(QCP::srmNone); QShortcut* shortcutCopy = new QShortcut(QKeySequence::Copy, ui->plotWidget, nullptr, nullptr, Qt::WidgetShortcut); connect(shortcutCopy, SIGNAL(activated()), this, SLOT(copy())); QShortcut* shortcutPrint = new QShortcut(QKeySequence::Print, ui->plotWidget, nullptr, nullptr, Qt::WidgetShortcut); connect(shortcutPrint, &QShortcut::activated, this, &PlotDock::openPrintDialog); ui->plotWidget->setContextMenuPolicy(Qt::CustomContextMenu); // Set up context menu m_contextMenu = new QMenu(this); QAction* copyAction = new QAction(QIcon(":/icons/copy"), tr("Copy"), m_contextMenu); copyAction->setShortcut(shortcutCopy->key()); m_contextMenu->addAction(copyAction); connect(copyAction, &QAction::triggered, [&]() { copy(); }); QAction* printAction = new QAction(QIcon(":/icons/print"), tr("Print..."), m_contextMenu); printAction->setShortcut(shortcutPrint->key()); m_contextMenu->addAction(printAction); connect(printAction, &QAction::triggered, [&]() { openPrintDialog(); }); QAction* showLegendAction = new QAction(tr("Show legend"), m_contextMenu); showLegendAction->setCheckable(true); m_contextMenu->addAction(showLegendAction); connect(showLegendAction, SIGNAL(toggled(bool)), this, SLOT(toggleLegendVisible(bool))); QAction* stackedBarsAction = new QAction(tr("Stacked bars"), m_contextMenu); stackedBarsAction->setCheckable(true); m_contextMenu->addAction(stackedBarsAction); connect(stackedBarsAction, SIGNAL(toggled(bool)), this, SLOT(toggleStackedBars(bool))); connect(ui->plotWidget, &QTableView::customContextMenuRequested, [=](const QPoint& pos) { // Show menu m_contextMenu->popup(ui->plotWidget->mapToGlobal(pos)); }); } PlotDock::~PlotDock() { // Save state Settings::setValue("PlotDock", "splitterSize", ui->splitterForPlot->saveState()); Settings::setValue("PlotDock", "lineType", ui->comboLineType->currentIndex()); Settings::setValue("PlotDock", "pointShape", ui->comboPointShape->currentIndex()); // Finally, delete all widgets delete ui; } void PlotDock::updatePlot(SqliteTableModel* model, BrowseDataTableSettings* settings, bool update, bool keepOrResetSelection) { // Each column has an id that we use internally, starting from 0. However, at the beginning of the columns list we want to add // the virtual 'Row #' column which needs a separate unique id for internal use. This id is defined here as -1. const int RowNumId = -1; // add columns to x/y selection tree widget if(update) { // Store pointer to the current browse table settings in the main window m_currentTableSettings = settings; // disable tree plot columns item changed updates ui->treePlotColumns->blockSignals(true); m_currentPlotModel = model; // save current selected columns, so we can restore them after the update QString sItemX; // selected X column QMap mapItemsY; // selected Y columns with color if(keepOrResetSelection) { // Store the currently selected plot columns to restore them later for(int i = 0; i < ui->treePlotColumns->topLevelItemCount(); ++i) { QTreeWidgetItem* item = ui->treePlotColumns->topLevelItem(i); if(item->checkState(PlotColumnX) == Qt::Checked) sItemX = item->text(PlotColumnField); if(item->checkState(PlotColumnY) == Qt::Checked) mapItemsY[item->text(PlotColumnField)] = PlotSettings(0, 0, item->backgroundColor(PlotColumnY), item->checkState(PlotColumnY) == Qt::Checked); } } else { // Get the plot columns to select from the stored browse table information sItemX = m_currentTableSettings->plotXAxis; mapItemsY = m_currentTableSettings->plotYAxes; } ui->treePlotColumns->clear(); if(model) { // Add each column with a supported data type to the column selection view for(int i=0;icolumnCount();++i) { QVariant::Type columntype = guessDataType(model, i); if(columntype != QVariant::Invalid) { QTreeWidgetItem* columnitem = new QTreeWidgetItem(ui->treePlotColumns); switch (columntype) { case QVariant::DateTime: columnitem->setText(PlotColumnType, tr("Date/Time")); break; case QVariant::Date: columnitem->setText(PlotColumnType, tr("Date")); break; case QVariant::Time: columnitem->setText(PlotColumnType, tr("Time")); break; case QVariant::Double: columnitem->setText(PlotColumnType, tr("Numeric")); break; case QVariant::String: columnitem->setText(PlotColumnType, tr("Label")); break; default: // This is not actually expected columnitem->setText(PlotColumnType, tr("Invalid")); } // Store the model column index in the PlotColumnField and the type // in the PlotColumnType, both using the User Role. columnitem->setData(PlotColumnField, Qt::UserRole, i); columnitem->setData(PlotColumnType, Qt::UserRole, static_cast(columntype)); columnitem->setText(PlotColumnField, model->headerData(i, Qt::Horizontal).toString()); // restore previous check state if(mapItemsY.contains(columnitem->text(PlotColumnField))) { columnitem->setCheckState(PlotColumnY, mapItemsY[columnitem->text(PlotColumnField)].active ? Qt::Checked : Qt::Unchecked); columnitem->setBackgroundColor(PlotColumnY, mapItemsY[columnitem->text(PlotColumnField)].colour); } else { if (columntype == QVariant::Double) columnitem->setCheckState(PlotColumnY, Qt::Unchecked); } if(sItemX == columnitem->text(PlotColumnField)) columnitem->setCheckState(PlotColumnX, Qt::Checked); else columnitem->setCheckState(PlotColumnX, Qt::Unchecked); } } ui->treePlotColumns->resizeColumnToContents(PlotColumnField); // Add a row number column at the beginning of the column list, but only when there were (other) columns added if(ui->treePlotColumns->topLevelItemCount()) { QTreeWidgetItem* columnitem = new QTreeWidgetItem(ui->treePlotColumns); // Just set RowNumId in the user role information field here to somehow indicate what column this is columnitem->setData(PlotColumnField, Qt::UserRole, RowNumId); columnitem->setText(PlotColumnField, tr("Row #")); columnitem->setData(PlotColumnType, Qt::UserRole, static_cast(QVariant::Double)); columnitem->setText(PlotColumnType, tr("Numeric")); // restore previous check state if(mapItemsY.contains(columnitem->text(PlotColumnField))) { columnitem->setCheckState(PlotColumnY, mapItemsY[columnitem->text(PlotColumnField)].active ? Qt::Checked : Qt::Unchecked); columnitem->setBackgroundColor(PlotColumnY, mapItemsY[columnitem->text(PlotColumnField)].colour); } else { columnitem->setCheckState(PlotColumnY, Qt::Unchecked); } if(sItemX == columnitem->text(PlotColumnField)) columnitem->setCheckState(PlotColumnX, Qt::Checked); else columnitem->setCheckState(PlotColumnX, Qt::Unchecked); ui->treePlotColumns->takeTopLevelItem(ui->treePlotColumns->indexOfTopLevelItem(columnitem)); ui->treePlotColumns->insertTopLevelItem(0, columnitem); } } ui->plotWidget->yAxis->setLabel("Y"); ui->plotWidget->xAxis->setLabel("X"); ui->treePlotColumns->blockSignals(false); } // search for the x axis select QTreeWidgetItem* xitem = nullptr; for(int i = 0; i < ui->treePlotColumns->topLevelItemCount(); ++i) { xitem = ui->treePlotColumns->topLevelItem(i); if(xitem->checkState(PlotColumnX) == Qt::Checked) break; xitem = nullptr; } QStringList yAxisLabels; // Clear graphs and axis labels ui->plotWidget->clearPlottables(); ui->plotWidget->xAxis->setLabel(QString()); ui->plotWidget->yAxis->setLabel(QString()); if(xitem) { // regain the model column index and the datatype // right now datatype is only important for X axis (Y is always numeric) int x = xitem->data(PlotColumnField, Qt::UserRole).toInt(); int xtype = xitem->data(PlotColumnType, Qt::UserRole).toInt(); ui->plotWidget->xAxis->setTickLabelRotation(0); // check if we have a x axis with datetime data switch (xtype) { case QVariant::Date: { QSharedPointer ticker(new QCPAxisTickerDateTime); ticker->setDateTimeFormat("yyyy-MM-dd"); ui->plotWidget->xAxis->setTicker(ticker); break; } case QVariant::DateTime: { QSharedPointer ticker(new QCPAxisTickerDateTime); ticker->setDateTimeFormat("yyyy-MM-dd\nhh:mm:ss"); ui->plotWidget->xAxis->setTicker(ticker); break; } case QVariant::Time: { QSharedPointer ticker(new QCPAxisTickerDateTime); ticker->setDateTimeFormat("hh:mm:ss"); ticker->setDateTimeSpec(Qt::UTC); ui->plotWidget->xAxis->setTicker(ticker); break; } case QVariant::String: { // Ticker is set when we have got the labels ui->plotWidget->xAxis->setTickLabelRotation(60); break; } default: { QSharedPointer ticker(new QCPAxisTickerFixed); ticker->setTickStepStrategy(QCPAxisTicker::tssReadability); ticker->setScaleStrategy(QCPAxisTickerFixed::ssMultiples); ui->plotWidget->xAxis->setTicker(ticker); } } // add graph for each selected y axis for(int i = 0; i < ui->treePlotColumns->topLevelItemCount(); ++i) { QTreeWidgetItem* item = ui->treePlotColumns->topLevelItem(i); if(item->checkState((PlotColumnY)) == Qt::Checked) { // regain the model column index int column = item->data(PlotColumnField, Qt::UserRole).toInt(); bool isSorted = true; // prepare the data vectors for qcustomplot // possible improvement might be a QVector subclass that directly // access the model data, to save memory, we are copying here auto nrows = model->rowCount(); QVector xdata(nrows), ydata(nrows), tdata(nrows); QVector labels; for(int i = 0; i < nrows; ++i) { tdata[i] = i; // convert x type axis if it's datetime switch (xtype) { case QVariant::DateTime: case QVariant::Date: { QString s = model->data(model->index(i, x)).toString(); QDateTime d = QDateTime::fromString(s, Qt::ISODate); xdata[i] = d.toMSecsSinceEpoch() / 1000.0; break; } case QVariant::Time: { QString s = model->data(model->index(i, x)).toString(); QTime t = QTime::fromString(s); xdata[i] = t.msecsSinceStartOfDay() / 1000.0; break; } case QVariant::String: { xdata[i] = i+1; labels << model->data(model->index(i, x)).toString(); break; } default: { // Get the x value for this point. If the selected column is -1, i.e. the row number, just use the current row number from the loop // instead of retrieving some value from the model. if(x == RowNumId) xdata[i] = i+1; else xdata[i] = model->data(model->index(i, x)).toDouble(); } } if (i != 0) isSorted &= (xdata[i-1] <= xdata[i]); // Get the y value for this point. If the selected column is -1, i.e. the row number, just use the current row number from the loop // instead of retrieving some value from the model. QVariant pointdata; if(column == RowNumId) pointdata = i+1; else pointdata = model->data(model->index(i, column), Qt::EditRole); if(pointdata.isNull()) ydata[i] = qQNaN(); else ydata[i] = pointdata.toDouble(); } // Line type and point shape are not supported by the String X type (Bars) ui->comboLineType->setEnabled(xtype != QVariant::String); ui->comboPointShape->setEnabled(xtype != QVariant::String); // WARN: ssDot is removed int shapeIdx = ui->comboPointShape->currentIndex(); if (shapeIdx > 0) shapeIdx += 1; QCPScatterStyle scatterStyle = QCPScatterStyle(static_cast(shapeIdx), 5); QCPAbstractPlottable* plottable; // When the X type is String, we draw a bar chart. // When it is already sorted by x, we draw a graph. // When it is not sorted by x, we draw a curve, so the order selected by the user in the table or in the query is // respected. In this case the line will have loops and only None and Line is supported as line style. // TODO: how to make the user aware of this without disturbing. if (xtype == QVariant::String) { QCPBars* bars = new QCPBars(ui->plotWidget->xAxis, ui->plotWidget->yAxis); plottable = bars; bars->setData(xdata, ydata); // Set ticker once if (ui->plotWidget->plottableCount() == 1) { QSharedPointer ticker(new QCPAxisTickerText); ticker->addTicks(xdata, labels); ui->plotWidget->xAxis->setTicker(ticker); } QColor color = item->backgroundColor(PlotColumnY); bars->setBrush(color); plottable->setPen(QPen(color.darker(150))); } else { if (isSorted) { QCPGraph* graph = ui->plotWidget->addGraph(); plottable = graph; graph->setData(xdata, ydata, /*alreadySorted*/ true); // set some graph styles not supported by the abstract plottable graph->setLineStyle((QCPGraph::LineStyle) ui->comboLineType->currentIndex()); graph->setScatterStyle(scatterStyle); } else { QCPCurve* curve = new QCPCurve(ui->plotWidget->xAxis, ui->plotWidget->yAxis); plottable = curve; curve->setData(tdata, xdata, ydata, /*alreadySorted*/ true); // set some curve styles not supported by the abstract plottable if (ui->comboLineType->currentIndex() == QCPCurve::lsNone) curve->setLineStyle(QCPCurve::lsNone); else curve->setLineStyle(QCPCurve::lsLine); curve->setScatterStyle(scatterStyle); } plottable->setPen(QPen(item->backgroundColor(PlotColumnY))); } plottable->setSelectable(QCP::stDataRange); plottable->setName(item->text(PlotColumnField)); // gather Y label column names if(column == RowNumId) yAxisLabels << tr("Row #"); else yAxisLabels << model->headerData(column, Qt::Horizontal).toString(); } } ui->plotWidget->rescaleAxes(true); ui->plotWidget->legend->setVisible(m_showLegend); // Legend with slightly transparent background brush: ui->plotWidget->legend->setBrush(QColor(255, 255, 255, 150)); // set axis labels if(x == RowNumId) ui->plotWidget->xAxis->setLabel(tr("Row #")); else ui->plotWidget->xAxis->setLabel(model->headerData(x, Qt::Horizontal).toString()); ui->plotWidget->yAxis->setLabel(yAxisLabels.join("|")); } adjustBars(); ui->plotWidget->replot(); // Warn user if not all data has been fetched and hint about the button for loading all the data if (model && (model->rowCountAvailable() != SqliteTableModel::RowCount::Complete || !model->isCacheComplete())) { ui->buttonLoadAllData->setEnabled(true); ui->buttonLoadAllData->setStyleSheet("QToolButton {color: white; background-color: rgb(255, 102, 102)}"); ui->buttonLoadAllData->setToolTip(tr("Load all data and redraw plot.\n" "Warning: not all data has been fetched from the table yet due to the partial fetch mechanism.")); } else { ui->buttonLoadAllData->setEnabled(false); ui->buttonLoadAllData->setStyleSheet(""); ui->buttonLoadAllData->setToolTip(tr("Load all data and redraw plot")); } } void PlotDock::resetPlot() { updatePlot(nullptr); } void PlotDock::on_treePlotColumns_itemChanged(QTreeWidgetItem* changeitem, int column) { // disable change updates, or we get unwanted redrawing and weird behavior ui->treePlotColumns->blockSignals(true); // make sure only 1 X axis is selected if(column == PlotColumnX) { for(int i = 0; i < ui->treePlotColumns->topLevelItemCount(); ++i) { QTreeWidgetItem* item = ui->treePlotColumns->topLevelItem(i); if(item->checkState(column) == Qt::Checked && item != changeitem) { item->setCheckState(column, Qt::Unchecked); } } // Save settings for this table if(m_currentTableSettings) { if(changeitem->checkState(column) == Qt::Checked) m_currentTableSettings->plotXAxis = changeitem->text(PlotColumnField); else m_currentTableSettings->plotXAxis = QString(); } } else if(column == PlotColumnY) { // Save check state of this column if(m_currentTableSettings) { PlotSettings& plot_settings = m_currentTableSettings->plotYAxes[changeitem->text(PlotColumnField)]; plot_settings.active = (changeitem->checkState(column) == Qt::Checked); } if(changeitem->checkState(column) == Qt::Checked) { // Generate a default colour if none isn't set yet QColor colour = changeitem->backgroundColor(column); if(!colour.isValid()) { static int last_colour_index = 0; switch(last_colour_index++) { case 0: colour = QColor(0, 69, 134); break; case 1: colour = QColor(255, 66, 14); break; case 2: colour = QColor(255, 211, 32); break; case 3: colour = QColor(87, 157, 28); break; case 4: colour = QColor(126, 0, 33); break; case 5: colour = QColor(131, 202, 255); break; case 6: colour = QColor(49, 64, 4); break; case 7: colour = QColor(174, 207, 0); break; case 8: colour = QColor(75, 31, 111); break; case 9: colour = QColor(255, 149, 14); break; case 10: colour = QColor(197, 00, 11); break; case 11: colour = QColor(0, 132, 209); // Since this is the last colour in our table, reset the counter back // to the first colour last_colour_index = 0; break; default: // NOTE: This shouldn't happen! colour = QColor(0, 0, 0); break; } } // Set colour changeitem->setBackgroundColor(column, colour); // Save settings for this table if(m_currentTableSettings) { PlotSettings& plot_settings = m_currentTableSettings->plotYAxes[changeitem->text(PlotColumnField)]; plot_settings.colour = colour; plot_settings.lineStyle = ui->comboLineType->currentIndex(); plot_settings.pointShape = (ui->comboPointShape->currentIndex() > 0 ? (ui->comboPointShape->currentIndex()+1) : ui->comboPointShape->currentIndex()); } } } ui->treePlotColumns->blockSignals(false); updatePlot(m_currentPlotModel, m_currentTableSettings, false); } void PlotDock::on_treePlotColumns_itemDoubleClicked(QTreeWidgetItem* item, int column) { // disable change updates, or we get unwanted redrawing and weird behavior ui->treePlotColumns->blockSignals(true); int type = item->data(PlotColumnType, Qt::UserRole).toInt(); if(column == PlotColumnY && type == QVariant::Double) { // On double click open the colordialog QColorDialog colordialog(this); QColor curbkcolor = item->backgroundColor(column); QColor precolor = !curbkcolor.isValid() ? (Qt::GlobalColor)(qrand() % 13 + 5) : curbkcolor; QColor color = colordialog.getColor(precolor, this, tr("Choose an axis color")); if(color.isValid()) { item->setCheckState(column, Qt::Checked); item->setBackgroundColor(column, color); // Save settings for this table if(m_currentTableSettings) { PlotSettings& plot_settings = m_currentTableSettings->plotYAxes[item->text(PlotColumnField)]; plot_settings.active = (item->checkState(column) == Qt::Checked); plot_settings.colour = color; plot_settings.lineStyle = ui->comboLineType->currentIndex(); plot_settings.pointShape = (ui->comboPointShape->currentIndex() > 0 ? (ui->comboPointShape->currentIndex()+1) : ui->comboPointShape->currentIndex()); } } else { item->setCheckState(column, Qt::Unchecked); // Save settings for this table if(m_currentTableSettings) m_currentTableSettings->plotYAxes.remove(item->text(PlotColumnField)); } } ui->treePlotColumns->blockSignals(false); updatePlot(m_currentPlotModel, m_currentTableSettings, false); } void PlotDock::on_butSavePlot_clicked() { QString fileName = FileDialog::getSaveFileName(this, tr("Choose a filename to save under"), tr("PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*)") ); if(!fileName.isEmpty()) { if(fileName.endsWith(".png", Qt::CaseInsensitive)) { ui->plotWidget->savePng(fileName); } else if(fileName.endsWith(".jpg", Qt::CaseInsensitive)) { ui->plotWidget->saveJpg(fileName); } else if(fileName.endsWith(".pdf", Qt::CaseInsensitive)) { ui->plotWidget->savePdf(fileName); } else if(fileName.endsWith(".bmp", Qt::CaseInsensitive)) { ui->plotWidget->saveBmp(fileName); } else { fileName += ".png"; ui->plotWidget->savePng(fileName); } } } void PlotDock::on_comboLineType_currentIndexChanged(int index) { Q_ASSERT(index >= QCPGraph::lsNone && index <= QCPGraph::lsImpulse); bool hasCurves = (ui->plotWidget->plottableCount() > ui->plotWidget->graphCount()); QCPGraph::LineStyle lineStyle = (QCPGraph::LineStyle) index; if (lineStyle > QCPGraph::lsLine && hasCurves) { QMessageBox::warning(this, qApp->applicationName(), tr("There are curves in this plot and the selected line style can only be applied to graphs sorted by X. " "Either sort the table or query by X to remove curves or select one of the styles supported by curves: " "None or Line.")); return; } for (int i = 0, ie = ui->plotWidget->graphCount(); i < ie; ++i) { QCPGraph * graph = ui->plotWidget->graph(i); if (graph) graph->setLineStyle(lineStyle); } // We have changed the style only for graphs, but not for curves. // If there are any in the plot, we have to update it completely in order to apply the new style if (hasCurves) updatePlot(m_currentPlotModel, m_currentTableSettings, false); else ui->plotWidget->replot(); // Save settings for this table if(m_currentTableSettings) { QMap& graphs = m_currentTableSettings->plotYAxes; auto it = graphs.begin(); while(it != graphs.end()) { it.value().lineStyle = lineStyle; ++it; } } } void PlotDock::on_comboPointShape_currentIndexChanged(int index) { // WARN: because ssDot point shape is removed if (index > 0) index += 1; Q_ASSERT(index >= QCPScatterStyle::ssNone && index < QCPScatterStyle::ssPixmap); bool hasCurves = (ui->plotWidget->plottableCount() > ui->plotWidget->graphCount()); QCPScatterStyle::ScatterShape shape = (QCPScatterStyle::ScatterShape) index; for (int i = 0, ie = ui->plotWidget->graphCount(); i < ie; ++i) { QCPGraph * graph = ui->plotWidget->graph(i); if (graph) graph->setScatterStyle(QCPScatterStyle(shape, 5)); } // We have changed the style only for graphs, but not for curves. // If there are any in the plot, we have to update it completely in order to apply the new style if (hasCurves) updatePlot(m_currentPlotModel, m_currentTableSettings, false); else ui->plotWidget->replot(); // Save settings for this table if(m_currentTableSettings) { QMap& graphs = m_currentTableSettings->plotYAxes; auto it = graphs.begin(); while(it != graphs.end()) { it.value().pointShape = shape; ++it; } } } QVariant::Type PlotDock::guessDataType(SqliteTableModel* model, int column) { QVariant::Type type = QVariant::Invalid; for(int i = 0; i < std::min(10, model->rowCount()) && type != QVariant::String; ++i) { QVariant data = model->data(model->index(i, column), Qt::EditRole); if(data.isNull() || data.convert(QVariant::Double)) { type = QVariant::Double; } else { QString s = model->data(model->index(i, column)).toString(); QDateTime dt = QDateTime::fromString(s, Qt::ISODate); QTime t = QTime::fromString(s); if (dt.isValid()) // Since the way to discriminate dates with times and pure dates is that the time part is 0, we must take into account // that some DateTimes could have "00:00:00" as time part and still the entire column has time information, so a single // final Date should not set the type to Date if it has already been guessed as DateTime. if (type != QVariant::DateTime && dt.time().msecsSinceStartOfDay() == 0) type = QVariant::Date; else type = QVariant::DateTime; else if (t.isValid()) type = QVariant::Time; else type = QVariant::String; } } return type; } void PlotDock::fetchAllData() { if(m_currentPlotModel) { // Make sure all data is loaded m_currentPlotModel->completeCache(); // Update plot updatePlot(m_currentPlotModel, m_currentTableSettings); } } void PlotDock::selectionChanged() { for (QCPAbstractPlottable* plottable : ui->plotWidget->selectedPlottables()) { for (QCPDataRange dataRange : plottable->selection().dataRanges()) { int index = dataRange.begin(); if (dataRange.length() != 0) { emit pointsSelected(index, dataRange.length()); break; } } } } void PlotDock::mousePress() { // Allow user to reset the plot ui->buttonLoadAllData->setEnabled(true); // if an axis (or axis labels) is selected, only allow the direction of that axis to be dragged // if no axis (or axis labels) is selected, both directions may be dragged if (ui->plotWidget->xAxis->selectedParts().testFlag(QCPAxis::spAxis) || ui->plotWidget->xAxis->selectedParts().testFlag(QCPAxis::spTickLabels) || ui->plotWidget->xAxis->selectedParts().testFlag(QCPAxis::spAxisLabel)) ui->plotWidget->axisRect()->setRangeDrag(ui->plotWidget->xAxis->orientation()); else if (ui->plotWidget->yAxis->selectedParts().testFlag(QCPAxis::spAxis) || ui->plotWidget->yAxis->selectedParts().testFlag(QCPAxis::spTickLabels) || ui->plotWidget->yAxis->selectedParts().testFlag(QCPAxis::spAxisLabel)) ui->plotWidget->axisRect()->setRangeDrag(ui->plotWidget->yAxis->orientation()); else ui->plotWidget->axisRect()->setRangeDrag(Qt::Horizontal | Qt::Vertical); } void PlotDock::mouseWheel() { // Allow user to reset the plot ui->buttonLoadAllData->setEnabled(true); // if an axis (or axis labels) is selected, only allow the direction of that axis to be zoomed // if no axis (or axis labels) is selected, both directions may be zoomed if (ui->plotWidget->xAxis->selectedParts().testFlag(QCPAxis::spAxis) || ui->plotWidget->xAxis->selectedParts().testFlag(QCPAxis::spTickLabels) || ui->plotWidget->xAxis->selectedParts().testFlag(QCPAxis::spAxisLabel)) ui->plotWidget->axisRect()->setRangeZoom(ui->plotWidget->xAxis->orientation()); else if (ui->plotWidget->yAxis->selectedParts().testFlag(QCPAxis::spAxis) || ui->plotWidget->yAxis->selectedParts().testFlag(QCPAxis::spTickLabels) || ui->plotWidget->yAxis->selectedParts().testFlag(QCPAxis::spAxisLabel)) ui->plotWidget->axisRect()->setRangeZoom(ui->plotWidget->yAxis->orientation()); else ui->plotWidget->axisRect()->setRangeZoom(Qt::Horizontal | Qt::Vertical); } void PlotDock::copy() { QApplication::clipboard()->setPixmap(ui->plotWidget->toPixmap()); } void PlotDock::toggleLegendVisible(bool visible) { m_showLegend = visible; ui->plotWidget->legend->setVisible(m_showLegend); ui->plotWidget->replot(); } // Stack or group bars and set the appropiate bar width (since it is not automatically done by QCustomPlot). void PlotDock::adjustBars() { const double padding = 0.15; int plottableCount = ui->plotWidget->plottableCount(); if (plottableCount == 0) return; const double groupedWidth = 1.0 / plottableCount; QCPBars* previousBar = nullptr; QCPBarsGroup* barsGroup = m_stackedBars ? nullptr : new QCPBarsGroup(ui->plotWidget); for (int i = 0, ie = plottableCount; i < ie; ++i) { QCPBars* bar = qobject_cast(ui->plotWidget->plottable(i)); if (bar) { if (m_stackedBars) { // Ungroup if grouped bar->setBarsGroup(nullptr); if (previousBar) bar->moveAbove(previousBar); // Set width to ocuppy the full coordinate space, less padding bar->setWidth(1.0 - padding); } else { // Unstack if stacked bar->moveAbove(nullptr); bar->setBarsGroup(barsGroup); // Set width to a plot coordinate width, less padding bar->setWidth(groupedWidth - padding); } previousBar = bar; } } } void PlotDock::toggleStackedBars(bool stacked) { m_stackedBars = stacked; adjustBars(); ui->plotWidget->replot(); } void PlotDock::reject() { // We override this, to ensure the Escape key doesn't make this dialog // dock go away return; } void PlotDock::openPrintDialog() { QPrinter printer; QPrintPreviewDialog previewDialog(&printer, this); connect(&previewDialog, &QPrintPreviewDialog::paintRequested, this, &PlotDock::renderPlot); previewDialog.exec(); } void PlotDock::renderPlot(QPrinter* printer) { QCPPainter painter(printer); QRectF pageRect = printer->pageRect(QPrinter::DevicePixel); int plotWidth = ui->plotWidget->viewport().width(); int plotHeight = ui->plotWidget->viewport().height(); double scale = pageRect.width()/(double)plotWidth; painter.setMode(QCPPainter::pmVectorized); painter.setMode(QCPPainter::pmNoCaching); painter.scale(scale, scale); ui->plotWidget->toPainter(&painter, plotWidth, plotHeight); } sqlitebrowser-3.11.2/src/PlotDock.h000066400000000000000000000056721345112435200171740ustar00rootroot00000000000000#ifndef PLOTDOCK_H #define PLOTDOCK_H #include #include #include class SqliteTableModel; class QTreeWidgetItem; class QPrinter; struct BrowseDataTableSettings; namespace Ui { class PlotDock; } class PlotDock : public QDialog { Q_OBJECT public: explicit PlotDock(QWidget* parent = nullptr); ~PlotDock(); struct PlotSettings { int lineStyle; int pointShape; QColor colour; bool active; PlotSettings() : lineStyle(0), pointShape(0), active(false) {} PlotSettings(int _lineStyle, int _pointShape, QColor _colour, bool _active) : lineStyle(_lineStyle), pointShape(_pointShape), colour(_colour), active(_active) {} friend QDataStream& operator<<(QDataStream& stream, const PlotDock::PlotSettings& object) { stream << object.lineStyle; stream << object.pointShape; stream << object.colour; stream << object.active; return stream; } friend QDataStream& operator>>(QDataStream& stream, PlotDock::PlotSettings& object) { stream >> object.lineStyle; stream >> object.pointShape; stream >> object.colour; if(!stream.atEnd()) stream >> object.active; return stream; } }; public slots: void updatePlot(SqliteTableModel* model, BrowseDataTableSettings* settings = nullptr, bool update = true, bool keepOrResetSelection = true); void fetchAllData(); void resetPlot(); virtual void reject(); signals: void pointsSelected(int firstIndex, int count); private: enum PlotColumns { PlotColumnField = 0, PlotColumnX = 1, PlotColumnY = 2, PlotColumnType = 3, }; Ui::PlotDock* ui; SqliteTableModel* m_currentPlotModel; BrowseDataTableSettings* m_currentTableSettings; QMenu* m_contextMenu; bool m_showLegend; bool m_stackedBars; /*! * \brief guessdatatype try to parse the first 10 rows and decide the datatype * \param model model to check the data * \param column index of the column to check * \return the guessed datatype */ QVariant::Type guessDataType(SqliteTableModel* model, int column); void adjustBars(); private slots: void on_treePlotColumns_itemChanged(QTreeWidgetItem* item, int column); void on_treePlotColumns_itemDoubleClicked(QTreeWidgetItem* item, int column); void on_butSavePlot_clicked(); void on_comboLineType_currentIndexChanged(int index); void on_comboPointShape_currentIndexChanged(int index); void selectionChanged(); void mousePress(); void mouseWheel(); void copy(); void toggleLegendVisible(bool visible); void toggleStackedBars(bool stacked); void openPrintDialog(); void renderPlot(QPrinter* printer); }; #endif sqlitebrowser-3.11.2/src/PlotDock.ui000066400000000000000000000261271345112435200173600ustar00rootroot00000000000000 PlotDock 0 0 515 553 Plot Qt::Vertical 0 2 <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> true 4 100 false Columns X Y Axis Type 0 8 Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Line type: comboLineType 0 0 0 0 1 None Line StepLeft StepRight StepCenter Impulse Point shape: comboPointShape 0 None Cross Plus Circle Disc Square Diamond Star Triangle TriangleInverted CrossSquare PlusSquare CrossCircle PlusCircle Peace Qt::Horizontal 40 20 <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> Save current plot... :/icons/image_save:/icons/image_save false false false false Load all data and redraw plot :/icons/refresh:/icons/refresh QCustomPlot QWidget
qcustomplot.h
1
buttonLoadAllData clicked() PlotDock fetchAllData() 463 526 477 495 fetchAllData()
sqlitebrowser-3.11.2/src/PreferencesDialog.cpp000066400000000000000000000652671345112435200213770ustar00rootroot00000000000000#include "PreferencesDialog.h" #include "ui_PreferencesDialog.h" #include "FileDialog.h" #include "Settings.h" #include "Application.h" #include "MainWindow.h" #include "RemoteDatabase.h" #include "FileExtensionManager.h" #include #include #include #include #include PreferencesDialog::PreferencesDialog(QWidget* parent) : QDialog(parent), ui(new Ui::PreferencesDialog), m_dbFileExtensions(Settings::getValue("General", "DBFileExtensions").toString().split(";;")) { ui->setupUi(this); ui->treeSyntaxHighlighting->setColumnHidden(0, true); ui->labelDatabaseDefaultSqlText->setVisible(false); ui->editDatabaseDefaultSqlText->setVisible(false); ui->tableClientCerts->setColumnHidden(0, true); ui->fr_bin_bg->installEventFilter(this); ui->fr_bin_fg->installEventFilter(this); ui->fr_reg_bg->installEventFilter(this); ui->fr_reg_fg->installEventFilter(this); ui->fr_null_bg->installEventFilter(this); ui->fr_null_fg->installEventFilter(this); connect(ui->comboDataBrowserFont, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePreviewFont())); connect(ui->spinDataBrowserFontSize, SIGNAL(valueChanged(int)), this, SLOT(updatePreviewFont())); #ifndef CHECKNEWVERSION ui->labelUpdates->setVisible(false); ui->checkUpdates->setVisible(false); #endif loadSettings(); // Avoid different heights due to having check boxes or not ui->treeSyntaxHighlighting->setUniformRowHeights(true); } /* * Destroys the object and frees any allocated resources */ PreferencesDialog::~PreferencesDialog() { delete ui; } void PreferencesDialog::chooseLocation() { QString s = FileDialog::getExistingDirectory( this, tr("Choose a directory"), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if(!s.isEmpty()) ui->locationEdit->setText(s); } void PreferencesDialog::loadSettings() { ui->encodingComboBox->setCurrentIndex(ui->encodingComboBox->findText(Settings::getValue("db", "defaultencoding").toString(), Qt::MatchFixedString)); ui->comboDefaultLocation->setCurrentIndex(Settings::getValue("db", "savedefaultlocation").toInt()); ui->locationEdit->setText(Settings::getValue("db", "defaultlocation").toString()); ui->checkUpdates->setChecked(Settings::getValue("checkversion", "enabled").toBool()); ui->checkHideSchemaLinebreaks->setChecked(Settings::getValue("db", "hideschemalinebreaks").toBool()); ui->foreignKeysCheckBox->setChecked(Settings::getValue("db", "foreignkeys").toBool()); ui->spinPrefetchSize->setValue(Settings::getValue("db", "prefetchsize").toInt()); ui->editDatabaseDefaultSqlText->setText(Settings::getValue("db", "defaultsqltext").toString()); ui->defaultFieldTypeComboBox->addItems(DBBrowserDB::Datatypes); int defaultFieldTypeIndex = Settings::getValue("db", "defaultfieldtype").toInt(); if (defaultFieldTypeIndex < DBBrowserDB::Datatypes.count()) { ui->defaultFieldTypeComboBox->setCurrentIndex(defaultFieldTypeIndex); } // Gracefully handle the preferred Data Browser font not being available int matchingFont = ui->comboDataBrowserFont->findText(Settings::getValue("databrowser", "font").toString(), Qt::MatchExactly); if (matchingFont == -1) matchingFont = ui->comboDataBrowserFont->findText(Settings::getDefaultValue("databrowser", "font").toString()); ui->comboDataBrowserFont->setCurrentIndex(matchingFont); ui->spinDataBrowserFontSize->setValue(Settings::getValue("databrowser", "fontsize").toInt()); loadColorSetting(ui->fr_null_fg, "null_fg"); loadColorSetting(ui->fr_null_bg, "null_bg"); loadColorSetting(ui->fr_bin_fg, "bin_fg"); loadColorSetting(ui->fr_bin_bg, "bin_bg"); loadColorSetting(ui->fr_reg_fg, "reg_fg"); loadColorSetting(ui->fr_reg_bg, "reg_bg"); ui->spinSymbolLimit->setValue(Settings::getValue("databrowser", "symbol_limit").toInt()); ui->spinCompleteThreshold->setValue(Settings::getValue("databrowser", "complete_threshold").toInt()); ui->txtNull->setText(Settings::getValue("databrowser", "null_text").toString()); ui->txtBlob->setText(Settings::getValue("databrowser", "blob_text").toString()); ui->editFilterEscape->setText(Settings::getValue("databrowser", "filter_escape").toString()); ui->spinFilterDelay->setValue(Settings::getValue("databrowser", "filter_delay").toInt()); for(int i=0; i < ui->treeSyntaxHighlighting->topLevelItemCount(); ++i) { QString name = ui->treeSyntaxHighlighting->topLevelItem(i)->text(0); QString colorname = Settings::getValue("syntaxhighlighter", name + "_colour").toString(); QColor color = QColor(colorname); ui->treeSyntaxHighlighting->topLevelItem(i)->setTextColor(2, color); ui->treeSyntaxHighlighting->topLevelItem(i)->setBackgroundColor(2, color); ui->treeSyntaxHighlighting->topLevelItem(i)->setText(2, colorname); if (name != "null" && name != "currentline" && name != "background" && name != "foreground") { ui->treeSyntaxHighlighting->topLevelItem(i)->setCheckState(3, Settings::getValue("syntaxhighlighter", name + "_bold").toBool() ? Qt::Checked : Qt::Unchecked); ui->treeSyntaxHighlighting->topLevelItem(i)->setCheckState(4, Settings::getValue("syntaxhighlighter", name + "_italic").toBool() ? Qt::Checked : Qt::Unchecked); ui->treeSyntaxHighlighting->topLevelItem(i)->setCheckState(5, Settings::getValue("syntaxhighlighter", name + "_underline").toBool() ? Qt::Checked : Qt::Unchecked); } } // Remote settings ui->checkUseRemotes->setChecked(Settings::getValue("remote", "active").toBool()); { auto ca_certs = static_cast(qApp)->mainWindow()->getRemote().caCertificates(); ui->tableCaCerts->setRowCount(ca_certs.size()); for(int i=0;isetFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableCaCerts->setItem(i, 0, cert_cn); QTableWidgetItem* cert_o = new QTableWidgetItem(cert.subjectInfo(QSslCertificate::Organization).at(0)); cert_o->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableCaCerts->setItem(i, 1, cert_o); QTableWidgetItem* cert_from = new QTableWidgetItem(cert.effectiveDate().toString()); cert_from->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableCaCerts->setItem(i, 2, cert_from); QTableWidgetItem* cert_to = new QTableWidgetItem(cert.expiryDate().toString()); cert_to->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableCaCerts->setItem(i, 3, cert_to); QTableWidgetItem* cert_serialno = new QTableWidgetItem(QString(cert.serialNumber())); cert_serialno->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableCaCerts->setItem(i, 4, cert_serialno); } } { QStringList client_certs = Settings::getValue("remote", "client_certificates").toStringList(); for(const QString& file : client_certs) { auto certs = QSslCertificate::fromPath(file); for(const QSslCertificate& cert : certs) addClientCertToTable(file, cert); } } ui->editRemoteCloneDirectory->setText(Settings::getValue("remote", "clonedirectory").toString()); // Gracefully handle the preferred Editor font not being available matchingFont = ui->comboEditorFont->findText(Settings::getValue("editor", "font").toString(), Qt::MatchExactly); if (matchingFont == -1) matchingFont = ui->comboDataBrowserFont->findText(Settings::getDefaultValue("editor", "font").toString()); ui->comboEditorFont->setCurrentIndex(matchingFont); ui->spinEditorFontSize->setValue(Settings::getValue("editor", "fontsize").toInt()); ui->spinTabSize->setValue(Settings::getValue("editor", "tabsize").toInt()); ui->spinLogFontSize->setValue(Settings::getValue("log", "fontsize").toInt()); ui->wrapComboBox->setCurrentIndex(Settings::getValue("editor", "wrap_lines").toInt()); ui->quoteComboBox->setCurrentIndex(Settings::getValue("editor", "identifier_quotes").toInt()); ui->checkAutoCompletion->setChecked(Settings::getValue("editor", "auto_completion").toBool()); ui->checkCompleteUpper->setEnabled(Settings::getValue("editor", "auto_completion").toBool()); ui->checkCompleteUpper->setChecked(Settings::getValue("editor", "upper_keywords").toBool()); ui->checkErrorIndicators->setChecked(Settings::getValue("editor", "error_indicators").toBool()); ui->checkHorizontalTiling->setChecked(Settings::getValue("editor", "horizontal_tiling").toBool()); ui->listExtensions->addItems(Settings::getValue("extensions", "list").toStringList()); ui->checkRegexDisabled->setChecked(Settings::getValue("extensions", "disableregex").toBool()); ui->checkAllowLoadExtension->setChecked(Settings::getValue("extensions", "enable_load_extension").toBool()); fillLanguageBox(); ui->toolbarStyleComboBox->setCurrentIndex(Settings::getValue("General", "toolbarStyle").toInt()); } void PreferencesDialog::saveSettings() { QApplication::setOverrideCursor(Qt::WaitCursor); Settings::setValue("db", "defaultencoding", ui->encodingComboBox->currentText()); Settings::setValue("db", "defaultlocation", ui->locationEdit->text()); Settings::setValue("db", "savedefaultlocation", ui->comboDefaultLocation->currentIndex()); Settings::setValue("db", "hideschemalinebreaks", ui->checkHideSchemaLinebreaks->isChecked()); Settings::setValue("db", "foreignkeys", ui->foreignKeysCheckBox->isChecked()); Settings::setValue("db", "prefetchsize", ui->spinPrefetchSize->value()); Settings::setValue("db", "defaultsqltext", ui->editDatabaseDefaultSqlText->text()); Settings::setValue("db", "defaultfieldtype", ui->defaultFieldTypeComboBox->currentIndex()); Settings::setValue("checkversion", "enabled", ui->checkUpdates->isChecked()); Settings::setValue("databrowser", "font", ui->comboDataBrowserFont->currentText()); Settings::setValue("databrowser", "fontsize", ui->spinDataBrowserFontSize->value()); saveColorSetting(ui->fr_null_fg, "null_fg"); saveColorSetting(ui->fr_null_bg, "null_bg"); saveColorSetting(ui->fr_reg_fg, "reg_fg"); saveColorSetting(ui->fr_reg_bg, "reg_bg"); saveColorSetting(ui->fr_bin_fg, "bin_fg"); saveColorSetting(ui->fr_bin_bg, "bin_bg"); Settings::setValue("databrowser", "symbol_limit", ui->spinSymbolLimit->value()); Settings::setValue("databrowser", "complete_threshold", ui->spinCompleteThreshold->value()); Settings::setValue("databrowser", "null_text", ui->txtNull->text()); Settings::setValue("databrowser", "blob_text", ui->txtBlob->text()); Settings::setValue("databrowser", "filter_escape", ui->editFilterEscape->text()); Settings::setValue("databrowser", "filter_delay", ui->spinFilterDelay->value()); for(int i=0; i < ui->treeSyntaxHighlighting->topLevelItemCount(); ++i) { QString name = ui->treeSyntaxHighlighting->topLevelItem(i)->text(0); Settings::setValue("syntaxhighlighter", name + "_colour", ui->treeSyntaxHighlighting->topLevelItem(i)->text(2)); Settings::setValue("syntaxhighlighter", name + "_bold", ui->treeSyntaxHighlighting->topLevelItem(i)->checkState(3) == Qt::Checked); Settings::setValue("syntaxhighlighter", name + "_italic", ui->treeSyntaxHighlighting->topLevelItem(i)->checkState(4) == Qt::Checked); Settings::setValue("syntaxhighlighter", name + "_underline", ui->treeSyntaxHighlighting->topLevelItem(i)->checkState(5) == Qt::Checked); } Settings::setValue("editor", "font", ui->comboEditorFont->currentText()); Settings::setValue("editor", "fontsize", ui->spinEditorFontSize->value()); Settings::setValue("editor", "tabsize", ui->spinTabSize->value()); Settings::setValue("log", "fontsize", ui->spinLogFontSize->value()); Settings::setValue("editor", "wrap_lines", ui->wrapComboBox->currentIndex()); Settings::setValue("editor", "identifier_quotes", ui->quoteComboBox->currentIndex()); Settings::setValue("editor", "auto_completion", ui->checkAutoCompletion->isChecked()); Settings::setValue("editor", "upper_keywords", ui->checkCompleteUpper->isChecked()); Settings::setValue("editor", "error_indicators", ui->checkErrorIndicators->isChecked()); Settings::setValue("editor", "horizontal_tiling", ui->checkHorizontalTiling->isChecked()); QStringList extList; for(const QListWidgetItem* item : ui->listExtensions->findItems(QString("*"), Qt::MatchWrap | Qt::MatchWildcard)) extList.append(item->text()); Settings::setValue("extensions", "list", extList); Settings::setValue("extensions", "disableregex", ui->checkRegexDisabled->isChecked()); Settings::setValue("extensions", "enable_load_extension", ui->checkAllowLoadExtension->isChecked()); // Save remote settings Settings::setValue("remote", "active", ui->checkUseRemotes->isChecked()); QStringList old_client_certs = Settings::getValue("remote", "client_certificates").toStringList(); QStringList new_client_certs; for(int i=0;itableClientCerts->rowCount();i++) { // Loop through the new list of client certs // If this certificate was already imported, remove it from the list of old certificates. All remaining certificates on this // list will be deleted later on. QString path = ui->tableClientCerts->item(i, 0)->text(); if(old_client_certs.contains(path)) { // This is a cert that is already imported old_client_certs.removeAll(path); new_client_certs.push_back(path); } else { // This is a new certificate. Copy file to a safe place. // Generate unique destination file name QString copy_to = QStandardPaths::writableLocation( #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) QStandardPaths::AppDataLocation #else QStandardPaths::GenericDataLocation #endif ).append("/").append(QFileInfo(path).fileName()); int suffix = 0; do { suffix++; } while(QFile::exists(copy_to + QString::number(suffix))); // Copy file copy_to.append(QString::number(suffix)); QDir().mkpath(QStandardPaths::writableLocation( #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) QStandardPaths::AppDataLocation #else QStandardPaths::GenericDataLocation #endif )); QFile::copy(path, copy_to); new_client_certs.push_back(copy_to); } } for(const QString& file : old_client_certs) { // Now only the deleted client certs are still in the old list. Delete the cert files associated with them. QFile::remove(file); } Settings::setValue("remote", "client_certificates", new_client_certs); Settings::setValue("remote", "clonedirectory", ui->editRemoteCloneDirectory->text()); // Warn about restarting to change language QVariant newLanguage = ui->languageComboBox->itemData(ui->languageComboBox->currentIndex()); if (newLanguage != Settings::getValue("General", "language")) QMessageBox::information(this, QApplication::applicationName(), tr("The language will change after you restart the application.")); Settings::setValue("General", "language", newLanguage); Settings::setValue("General", "toolbarStyle", ui->toolbarStyleComboBox->currentIndex()); Settings::setValue("General", "DBFileExtensions", m_dbFileExtensions.join(";;") ); accept(); QApplication::restoreOverrideCursor(); } void PreferencesDialog::showColourDialog(QTreeWidgetItem* item, int column) { if(item->text(column).left(1) != "#") return; QColor colour = QColorDialog::getColor(QColor(item->text(column)), this); if(colour.isValid()) { item->setTextColor(column, colour); item->setBackgroundColor(column, colour); item->setText(column, colour.name()); } } bool PreferencesDialog::eventFilter(QObject *obj, QEvent *event) { // Use mouse click and enter press on the frames to pop up a colour dialog if (obj == ui->fr_bin_bg || obj == ui->fr_bin_fg || obj == ui->fr_reg_bg || obj == ui->fr_reg_fg || obj == ui->fr_null_bg || obj == ui->fr_null_fg) { if (event->type() == QEvent::KeyPress) { QKeyEvent *key = static_cast(event); // Not interesting, so send to the parent (might be shortcuts) if((key->key() != Qt::Key_Enter) && (key->key() != Qt::Key_Return)) { return QDialog::eventFilter(obj, event); } } else if (event->type() != QEvent::MouseButtonPress) { // Not a key event neither a mouse event, send to the parent return QDialog::eventFilter(obj, event); } QFrame *frame = qobject_cast(obj); QColor oldColour = frame->palette().color(frame->backgroundRole()); QColor colour = QColorDialog::getColor(oldColour, frame); if (colour.isValid()) { setColorSetting(frame, colour); } // Consume return true; } // Send any other events to the parent return QDialog::eventFilter(obj, event); } void PreferencesDialog::addExtension() { QString file = FileDialog::getOpenFileName( this, tr("Select extension file"), tr("Extensions(*.so *.dylib *.dll);;All files(*)")); if(QFile::exists(file)) ui->listExtensions->addItem(file); } void PreferencesDialog::removeExtension() { if(ui->listExtensions->currentIndex().isValid()) ui->listExtensions->takeItem(ui->listExtensions->currentIndex().row()); } void PreferencesDialog::fillLanguageBox() { QDir translationsDir(QCoreApplication::applicationDirPath() + "/translations", "sqlb_*.qm"); QLocale systemLocale = QLocale::system(); // Add default language if (systemLocale.name() == "en_US") { ui->languageComboBox->addItem(QIcon(":/flags/en_US"), "English (United States) [System Language]", "en_US"); } else { ui->languageComboBox->addItem(QIcon(":/flags/en_US"), "English (United States) [Default Language]", "en_US"); } // Get available *.qm files from translation dir near executable as well as from resources QFileInfoList file_infos = translationsDir.entryInfoList(); file_infos += QDir(":/translations").entryInfoList(); for(const QFileInfo& file : file_infos) { QLocale locale(file.baseName().remove("sqlb_")); // Skip invalid locales if(locale.name() == "C") continue; // Skip translations that were already loaded if (ui->languageComboBox->findData(locale.name(), Qt::UserRole, Qt::MatchExactly) != -1) continue; QString language = QLocale::languageToString(locale.language()) + " (" + QLocale::countryToString(locale.country()) + ")"; if (locale == systemLocale) language += " [System language]"; ui->languageComboBox->addItem(QIcon(":/flags/" + locale.name()), language, locale.name()); } ui->languageComboBox->model()->sort(0); // Try to select the language for the stored locale int index = ui->languageComboBox->findData(Settings::getValue("General", "language"), Qt::UserRole, Qt::MatchExactly); // If there's no translation for the current locale, default to English if(index < 0) index = ui->languageComboBox->findData("en_US", Qt::UserRole, Qt::MatchExactly); QString chosenLanguage = ui->languageComboBox->itemText(index); QVariant chosenLocale = ui->languageComboBox->itemData(index); QIcon chosenIcon = ui->languageComboBox->itemIcon(index); // There's no "move" method, so we remove and add the chosen language again at the top ui->languageComboBox->removeItem(index); ui->languageComboBox->insertItem(0, chosenIcon, chosenLanguage, chosenLocale); ui->languageComboBox->setCurrentIndex(0); } void PreferencesDialog::loadColorSetting(QFrame *frame, const QString & settingName) { QColor color = QColor(Settings::getValue("databrowser", settingName + "_colour").toString()); setColorSetting(frame, color); } void PreferencesDialog::setColorSetting(QFrame *frame, const QColor &color) { QPalette::ColorRole role; QLineEdit *line; if (frame == ui->fr_bin_bg) { line = ui->txtBlob; role = line->backgroundRole(); } else if (frame == ui->fr_bin_fg) { line = ui->txtBlob; role = line->foregroundRole(); } else if (frame == ui->fr_reg_bg) { line = ui->txtRegular; role = line->backgroundRole(); } else if (frame == ui->fr_reg_fg) { line = ui->txtRegular; role = line->foregroundRole(); } else if (frame == ui->fr_null_bg) { line = ui->txtNull; role = line->backgroundRole(); } else if (frame == ui->fr_null_fg) { line = ui->txtNull; role = line->foregroundRole(); } else return; QPalette palette = frame->palette(); palette.setColor(frame->backgroundRole(), color); frame->setPalette(palette); palette = line->palette(); palette.setColor(role, color); line->setPalette(palette); } void PreferencesDialog::saveColorSetting(QFrame *frame, const QString & settingName) { Settings::setValue("databrowser", settingName + "_colour", frame->palette().color(frame->backgroundRole())); } void PreferencesDialog::activateRemoteTab(bool active) { ui->tabWidget->setTabEnabled(ui->tabWidget->indexOf(ui->tabRemote), active); } void PreferencesDialog::addClientCertificate() { // Get certificate file to import and abort here if no file gets selected // NOTE: We assume here that this file contains both, certificate and private key! QString path = FileDialog::getOpenFileName(this, tr("Import certificate file"), "*.pem"); if(path.isEmpty()) return; // Open file and check if any certificates were imported auto certs = QSslCertificate::fromPath(path); if(certs.size() == 0) { QMessageBox::warning(this, qApp->applicationName(), tr("No certificates found in this file.")); return; } // Add certificates to list for(int i=0;itableClientCerts->currentRow(); if(row == -1) return; // Double check if(QMessageBox::question(this, qApp->applicationName(), tr("Are you sure you want do remove this certificate? All certificate " "data will be deleted from the application settings!"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) { ui->tableClientCerts->removeRow(row); } } void PreferencesDialog::addClientCertToTable(const QString& path, const QSslCertificate& cert) { // Do nothing if the file doesn't even exist if(!QFile::exists(path)) return; // Add new row int row = ui->tableClientCerts->rowCount(); ui->tableClientCerts->setRowCount(row + 1); // Fill row with data QTableWidgetItem* cert_file = new QTableWidgetItem(path); cert_file->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableClientCerts->setItem(row, 0, cert_file); QTableWidgetItem* cert_subject_cn = new QTableWidgetItem(cert.subjectInfo(QSslCertificate::CommonName).at(0)); cert_subject_cn->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableClientCerts->setItem(row, 1, cert_subject_cn); QTableWidgetItem* cert_issuer_cn = new QTableWidgetItem(cert.issuerInfo(QSslCertificate::CommonName).at(0)); cert_issuer_cn->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableClientCerts->setItem(row, 2, cert_issuer_cn); QTableWidgetItem* cert_from = new QTableWidgetItem(cert.effectiveDate().toString()); cert_from->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableClientCerts->setItem(row, 3, cert_from); QTableWidgetItem* cert_to = new QTableWidgetItem(cert.expiryDate().toString()); cert_to->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableClientCerts->setItem(row, 4, cert_to); QTableWidgetItem* cert_serialno = new QTableWidgetItem(QString(cert.serialNumber())); cert_serialno->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); ui->tableClientCerts->setItem(row, 5, cert_serialno); } void PreferencesDialog::chooseRemoteCloneDirectory() { QString s = FileDialog::getExistingDirectory( this, tr("Choose a directory"), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if(!s.isEmpty()) ui->editRemoteCloneDirectory->setText(s); } void PreferencesDialog::updatePreviewFont() { if (ui->spinDataBrowserFontSize->value() != 0) { QFont textFont(ui->comboDataBrowserFont->currentText()); textFont.setPointSize(ui->spinDataBrowserFontSize->value()); ui->txtRegular->setFont(textFont); textFont.setItalic(true); ui->txtNull->setFont(textFont); ui->txtBlob->setFont(textFont); } } void PreferencesDialog::on_buttonManageFileExtension_clicked() { FileExtensionManager *manager = new FileExtensionManager(m_dbFileExtensions, this); if(manager->exec() == QDialog::Accepted) { m_dbFileExtensions = manager->getDBFileExtensions(); } } void PreferencesDialog::on_buttonBox_clicked(QAbstractButton* button) { if (button == ui->buttonBox->button(QDialogButtonBox::Cancel)) reject(); else if (button == ui->buttonBox->button(QDialogButtonBox::Save)) saveSettings(); else if (button == ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)) { if (QMessageBox::warning(this, QApplication::applicationName(), tr("Are you sure you want to clear all the saved settings?\nAll your preferences will be lost and default values will be used."), QMessageBox::RestoreDefaults | QMessageBox::Cancel, QMessageBox::Cancel) == QMessageBox::RestoreDefaults) { Settings::restoreDefaults(); accept(); } } } sqlitebrowser-3.11.2/src/PreferencesDialog.h000066400000000000000000000026231345112435200210270ustar00rootroot00000000000000#ifndef PREFERENCESDIALOG_H #define PREFERENCESDIALOG_H #include #include #include class QTreeWidgetItem; class QFrame; class QTableWidget; class QSslCertificate; class QAbstractButton; namespace Ui { class PreferencesDialog; } class PreferencesDialog : public QDialog { Q_OBJECT public: explicit PreferencesDialog(QWidget* parent = nullptr); ~PreferencesDialog(); private slots: virtual void loadSettings(); virtual void saveSettings(); virtual void chooseLocation(); virtual void showColourDialog(QTreeWidgetItem* item, int column); virtual void addExtension(); virtual void removeExtension(); virtual void activateRemoteTab(bool active); virtual void addClientCertificate(); virtual void removeClientCertificate(); void chooseRemoteCloneDirectory(); void updatePreviewFont(); void on_buttonManageFileExtension_clicked(); void on_buttonBox_clicked(QAbstractButton* button); private: Ui::PreferencesDialog *ui; QStringList m_dbFileExtensions; void fillLanguageBox(); void loadColorSetting(QFrame *frame, const QString &name); void setColorSetting(QFrame *frame, const QColor &color); void saveColorSetting(QFrame *frame, const QString &name); void addClientCertToTable(const QString& path, const QSslCertificate& cert); protected: bool eventFilter(QObject *obj, QEvent *event); }; #endif sqlitebrowser-3.11.2/src/PreferencesDialog.ui000066400000000000000000001603741345112435200212250ustar00rootroot00000000000000 PreferencesDialog 0 0 597 614 Preferences true 0 &General Default &location locationEdit Remember last location Always use this location Remember last location for session only false 0 0 316 0 ... Lan&guage languageComboBox 0 0 QComboBox::AdjustToContents 35 20 15 Toolbar style toolbarStyleComboBox 0 0 2 QComboBox::AdjustToContents 35 20 15 Only display the icon Only display the text The text appears beside the icon The text appears under the icon Follow the style Show remote options checkUseRemotes enabled true Automatic &updates checkUpdates enabled DB file extensions buttonManageFileExtension Manage &Database QFormLayout::FieldsStayAtSizeHint Database &encoding encodingComboBox UTF-8 UTF-16 Open databases with foreign keys enabled. &Foreign keys foreignKeysCheckBox enabled Remove line breaks in schema &view checkHideSchemaLinebreaks When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. enabled Prefetch block si&ze spinPrefetchSize 255 1000000 Advanced :/icons/down:/icons/down true 20 0 16777215 200 SQ&L to execute after opening database editDatabaseDefaultSqlText Qt::Horizontal 180 20 Default field type defaultFieldTypeComboBox Data &Browser Font &Font comboDataBrowserFont Font si&ze spinDataBrowserFontSize Content Symbol limit in cell spinSymbolLimit 0 0 1 20000 0 0 This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. 0 100000000 Row count threshold for completion spinCompleteThreshold Field display Displayed &text Qt::AlignCenter txtNull Binary Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter NULL Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter Regular Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter Qt::StrongFocus true QFrame::StyledPanel QFrame::Raised Text color Qt::AlignCenter Qt::StrongFocus true QFrame::StyledPanel QFrame::Raised Background color Qt::AlignCenter Qt::StrongFocus true QFrame::StyledPanel QFrame::Raised Qt::StrongFocus true QFrame::StyledPanel QFrame::Raised Qt::StrongFocus true QFrame::StyledPanel QFrame::Raised Qt::StrongFocus true QFrame::StyledPanel QFrame::Raised 0 0 true NULL 0 0 false Preview only (N/A) true 0 0 true BLOB false Filters 1 Escape character editFilterEscape Delay time (&ms) spinFilterDelay Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. 5000 &SQL false false Settings name Context Colour Bold Italic Underline keyword Keyword function Function table Table comment Comment identifier Identifier string String currentline Current line background Background foreground Foreground SQL editor &font comboEditorFont SQL &editor font size Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter spinEditorFontSize 1 SQL &results font size spinLogFontSize 1 Tab size spinTabSize 1 16 4 &Wrap lines wrapComboBox Never At word boundaries At character boundaries At whitespace boundaries &Quotes for identifiers quoteComboBox Choose the quoting mechanism used by the application for identifiers in SQL code. "Double quotes" - Standard SQL (recommended) `Grave accents` - Traditional MySQL quotes [Square brackets] - Traditional MS SQL Server quotes Code co&mpletion checkAutoCompletion enabled Keywords in &UPPER CASE checkCompleteUpper When set, the SQL keywords are completed in UPPER CASE letters. enabled Error indicators checkErrorIndicators When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background enabled Hori&zontal tiling checkHorizontalTiling If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. enabled &Extensions Select extensions to load for every database: QAbstractItemView::NoEditTriggers false Add extension :/icons/load_extension:/icons/load_extension Remove extension :/icons/remove_extension:/icons/remove_extension Qt::Vertical 20 40 <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> Disable Regular Expression extension <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Remote CA certificates 550 0 QAbstractItemView::SingleSelection QAbstractItemView::SelectRows QAbstractItemView::ScrollPerPixel false Subject CN Common Name Subject O Organization Valid from Valid to Serial number Your certificates 550 0 QAbstractItemView::ExtendedSelection QAbstractItemView::SelectRows QAbstractItemView::ScrollPerPixel false File Subject CN Subject Common Name Issuer CN Issuer Common Name Valid from Valid to Serial number :/icons/trigger_create:/icons/trigger_create ... :/icons/trigger_delete:/icons/trigger_delete Qt::Vertical 20 40 Clone databases into false 0 0 316 0 ... Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Save SqlTextEdit QTextEdit
sqltextedit.h
1
comboDefaultLocation locationEdit setLocationButton languageComboBox toolbarStyleComboBox checkUseRemotes checkUpdates encodingComboBox foreignKeysCheckBox checkHideSchemaLinebreaks spinPrefetchSize defaultFieldTypeComboBox buttonDatabaseAdvanced editDatabaseDefaultSqlText comboDataBrowserFont spinDataBrowserFontSize fr_null_fg fr_null_bg txtNull fr_bin_fg fr_bin_bg txtBlob fr_reg_fg fr_reg_bg txtRegular spinFilterDelay editFilterEscape treeSyntaxHighlighting comboEditorFont spinEditorFontSize spinLogFontSize spinTabSize checkAutoCompletion checkErrorIndicators checkHorizontalTiling listExtensions buttonAddExtension buttonRemoveExtension checkRegexDisabled editRemoteCloneDirectory buttonRemoteBrowseCloneDirectory tableCaCerts tableClientCerts buttonClientCertAdd buttonClientCertRemove tabWidget buttonAddExtension clicked() PreferencesDialog addExtension() 571 97 245 137 buttonRemoveExtension clicked() PreferencesDialog removeExtension() 571 135 245 137 treeSyntaxHighlighting itemDoubleClicked(QTreeWidgetItem*,int) PreferencesDialog showColourDialog(QTreeWidgetItem*,int) 103 48 395 0 setLocationButton clicked() PreferencesDialog chooseLocation() 571 114 294 202 buttonDatabaseAdvanced toggled(bool) labelDatabaseDefaultSqlText setVisible(bool) 365 207 108 280 buttonDatabaseAdvanced toggled(bool) editDatabaseDefaultSqlText setVisible(bool) 365 207 365 252 checkUseRemotes toggled(bool) PreferencesDialog activateRemoteTab(bool) 161 172 382 572 buttonClientCertAdd clicked() PreferencesDialog addClientCertificate() 578 315 596 243 buttonClientCertRemove clicked() PreferencesDialog removeClientCertificate() 578 353 597 295 buttonRemoteBrowseCloneDirectory clicked() PreferencesDialog chooseRemoteCloneDirectory() 567 54 595 41 checkAutoCompletion toggled(bool) checkCompleteUpper setEnabled(bool) 474 464 474 492 buttonBox clicked(QAbstractButton*) PreferencesDialog on_buttonBox_clicked(QAbstractButton*) 385 591 385 306 saveSettings() chooseLocation() showColourDialog(QTreeWidgetItem*,int) addExtension() removeExtension() activateRemoteTab(bool) addClientCertificate() removeClientCertificate() chooseRemoteCloneDirectory()
sqlitebrowser-3.11.2/src/RemoteDatabase.cpp000066400000000000000000001102641345112435200206620ustar00rootroot00000000000000#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "RemoteDatabase.h" #include "version.h" #include "Settings.h" #include "sqlite.h" RemoteDatabase::RemoteDatabase() : m_manager(new QNetworkAccessManager), m_configurationManager(new QNetworkConfigurationManager), m_progress(nullptr), m_dbLocal(nullptr) { // Update network configurations connect(m_configurationManager, &QNetworkConfigurationManager::updateCompleted, [this]() { m_manager->setConfiguration(m_configurationManager->defaultConfiguration()); #ifdef CHECKNEWVERSION // Check for a new version if automatic update check aren't disabled in the settings dialog if(Settings::getValue("checkversion", "enabled").toBool()) fetch("https://download.sqlitebrowser.org/currentrelease", RemoteDatabase::RequestTypeNewVersionCheck); #endif }); // Set up SSL configuration m_sslConfiguration = QSslConfiguration::defaultConfiguration(); m_sslConfiguration.setPeerVerifyMode(QSslSocket::VerifyPeer); // Load CA certs from resource file QDir dirCaCerts(":/certs"); QStringList caCertsList = dirCaCerts.entryList(); QList caCerts; for(const QString& caCertName : caCertsList) caCerts += QSslCertificate::fromPath(":/certs/" + caCertName); m_sslConfiguration.setCaCertificates(caCerts); // Load settings and set up some more stuff while doing so reloadSettings(); // Set up signals connect(m_manager, &QNetworkAccessManager::finished, this, &RemoteDatabase::gotReply); connect(m_manager, &QNetworkAccessManager::encrypted, this, &RemoteDatabase::gotEncrypted); connect(m_manager, &QNetworkAccessManager::sslErrors, this, &RemoteDatabase::gotError); } RemoteDatabase::~RemoteDatabase() { delete m_manager; delete m_progress; // Close local storage db - but only if it was created/opened in the meantime if(m_dbLocal) sqlite3_close(m_dbLocal); } void RemoteDatabase::reloadSettings() { // Load all configured client certificates m_clientCertFiles.clear(); auto client_certs = Settings::getValue("remote", "client_certificates").toStringList(); for(const QString& path : client_certs) { QFile file(path); file.open(QFile::ReadOnly); QSslCertificate cert(&file); file.close(); m_clientCertFiles.insert(path, cert); } // TODO Add support for proxies here } void RemoteDatabase::gotEncrypted(QNetworkReply* reply) { #ifdef Q_OS_MAC // Temporary workaround for now, as Qt 5.8 and below doesn't support // verifying certificates on OSX: https://bugreports.qt.io/browse/QTBUG-56973 // Hopefully this is fixed in Qt 5.9 return; #else // Verify the server's certificate using our CA certs auto verificationErrors = reply->sslConfiguration().peerCertificate().verify(m_sslConfiguration.caCertificates()); bool good = false; if(verificationErrors.size() == 0) { good = true; } else if(verificationErrors.size() == 1) { // Ignore any self signed certificate errors if(verificationErrors.at(0).error() == QSslError::SelfSignedCertificate || verificationErrors.at(0).error() == QSslError::SelfSignedCertificateInChain) good = true; } // If the server certificate didn't turn out to be good, abort the reply here if(!good) reply->abort(); #endif } void RemoteDatabase::gotReply(QNetworkReply* reply) { // Check if request was successful if(reply->error() != QNetworkReply::NoError) { QMessageBox::warning(nullptr, qApp->applicationName(), tr("Error when connecting to %1.\n%2").arg(reply->url().toString()).arg(reply->errorString())); reply->deleteLater(); return; } // Check for redirect QString redirectUrl = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toString(); if(!redirectUrl.isEmpty()) { // Avoid redirect loop if(reply->url() == redirectUrl) { reply->deleteLater(); return; } fetch(redirectUrl, static_cast(reply->property("type").toInt()), reply->property("certfile").toString(), reply->property("userdata")); reply->deleteLater(); return; } // What type of data is this? RequestType type = static_cast(reply->property("type").toInt()); // Hide progress dialog before opening a file dialog to make sure the progress dialog doesn't interfer with the file dialog if(type == RequestTypeDatabase || type == RequestTypePush) m_progress->reset(); // Handle the reply data switch(type) { case RequestTypeDatabase: { // It's a database file. // Add cloned database to list of local databases QString saveFileAs = localAdd(reply->url().fileName(), reply->property("certfile").toString(), reply->url(), QUrlQuery(reply->url()).queryItemValue("commit")); // Save the downloaded data under the generated file name QFile file(saveFileAs); file.open(QIODevice::WriteOnly); file.write(reply->readAll()); file.close(); // Set last modified data of the new file to the one provided by the server // TODO Qt doesn't offer any option to set this attribute, so we'd need to figure out a way to do it // ourselves in a platform-independent way. /*QString last_modified = reply->rawHeader("Content-Disposition"); QRegExp regex("^.*modification-date=\"(.+)\";.*$"); regex.setMinimal(true); // Set to non-greedy matching if(regex.indexIn(last_modified) != -1) { last_modified = regex.cap(1); }*/ // Tell the application to open this file emit openFile(saveFileAs); } break; case RequestTypeDirectory: emit gotDirList(reply->readAll(), reply->property("userdata")); break; case RequestTypeNewVersionCheck: { QString version = reply->readLine().trimmed(); QString url = reply->readLine().trimmed(); emit gotCurrentVersion(version, url); break; } case RequestTypeLicenceList: { // Read and check results QJsonDocument json = QJsonDocument::fromJson(reply->readAll()); if(json.isNull() || !json.isObject()) break; QJsonObject obj = json.object(); // Parse data and build licence map (short name -> long name) QMap licences; for(auto it=obj.constBegin();it!=obj.constEnd();++it) licences.insert(it.key(), it.value().toObject().value("full_name").toString()); // Send licence map to anyone who's interested emit gotLicenceList(licences); break; } case RequestTypeBranchList: { // Read and check results QJsonDocument json = QJsonDocument::fromJson(reply->readAll()); if(json.isNull() || !json.isObject()) break; QJsonObject obj = json.object(); QJsonObject obj_branches = obj["branches"].toObject(); // Parse data and assemble branch list QStringList branches; for(auto it=obj_branches.constBegin();it!=obj_branches.constEnd();++it) branches.append(it.key()); // Get default branch #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) QString default_branch = obj["default_branch"].toString("master"); #else QString default_branch = obj["default_branch"].toString(); if ( default_branch.isEmpty () ) { default_branch = "master"; } #endif // Send branch list to anyone who is interested emit gotBranchList(branches, default_branch); break; } case RequestTypePush: { // Read and check results QJsonDocument json = QJsonDocument::fromJson(reply->readAll()); if(json.isNull() || !json.isObject()) break; QJsonObject obj = json.object(); // Create or update the record in our local checkout database QString saveFileAs = localAdd(reply->url().fileName(), reply->property("certfile").toString(), obj["url"].toString(), obj["commit_id"].toString()); // If the name of the source file and the name we're saving as differ, we're doing an initial push. In this case, copy the source file to // the destination path to avoid redownloading it when it's first used. if(saveFileAs != reply->property("source_file").toString()) QFile::copy(reply->property("source_file").toString(), saveFileAs); emit uploadFinished(obj["url"].toString()); break; } } // Delete reply later, i.e. after returning from this slot function reply->deleteLater(); } void RemoteDatabase::gotError(QNetworkReply* reply, const QList& errors) { // Are there any errors in here that aren't about self-signed certificates and non-matching hostnames? bool serious_errors = false; for(const QSslError& error : errors) { if(error.error() != QSslError::SelfSignedCertificate) { serious_errors = true; break; } } // Just stop the error checking here and accept the reply if there were no 'serious' errors if(!serious_errors) { reply->ignoreSslErrors(errors); return; } // Build an error message and short it to the user QString message = tr("Error opening remote file at %1.\n%2").arg(reply->url().toString()).arg(errors.at(0).errorString()); QMessageBox::warning(nullptr, qApp->applicationName(), message); // Delete reply later, i.e. after returning from this slot function if(m_progress) m_progress->reset(); reply->deleteLater(); } void RemoteDatabase::updateProgress(qint64 bytesTransmitted, qint64 bytesTotal) { // Find out to which pending reply this progress update belongs QNetworkReply* reply = qobject_cast(QObject::sender()); // Update progress dialog if(bytesTotal == -1) { // We don't know anything about the current progress, but it's still downloading m_progress->setMinimum(0); m_progress->setMaximum(0); m_progress->setValue(0); } else if(bytesTransmitted == bytesTotal) { // The download has finished m_progress->reset(); } else { // It's still downloading and we know the current progress // Were using a range 0 to 10000 here, the progress dialog will calculate 0% to 100% values from that. The reason we're not using // the byte counts as-is is that they're 64bit wide while the progress dialog takes only 32bit values, so for large files the values // would lose precision. The reason why we're not using a range 0 to 100 is that our range increases the precision a bit and this way // we're prepared if the progress dialog will show decimal numbers one day on one platform. m_progress->setMinimum(0); m_progress->setMaximum(10000); m_progress->setValue(static_cast((static_cast(bytesTransmitted) / static_cast(bytesTotal)) * 10000.0f)); } // Check if the Cancel button has been pressed if(reply && m_progress->wasCanceled()) { reply->abort(); m_progress->reset(); } } const QList& RemoteDatabase::caCertificates() const { static QList certs = m_sslConfiguration.caCertificates(); return certs; } QString RemoteDatabase::getInfoFromClientCert(const QString& cert, CertInfo info) const { // Get the common name of the certificate and split it into user name and server address QString cn = m_clientCertFiles[cert].subjectInfo(QSslCertificate::CommonName).at(0); QStringList cn_parts = cn.split("@"); if(cn_parts.size() < 2) return QString(); // Return requested part of the CN if(info == CertInfoUser) return cn_parts.first(); else if(info == CertInfoServer) return cn_parts.last(); else return QString(); } bool RemoteDatabase::prepareSsl(QNetworkRequest* request, const QString& clientCert) { // Check if client cert exists const QSslCertificate& cert = m_clientCertFiles[clientCert]; if(cert.isNull()) { QMessageBox::warning(nullptr, qApp->applicationName(), tr("Error: Invalid client certificate specified.")); return false; } // Load private key for the client certificate QFile fileClientCert(clientCert); fileClientCert.open(QFile::ReadOnly); QSslKey clientKey(&fileClientCert, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey); while(clientKey.isNull()) { // If the private key couldn't be read, we assume it's password protected. So ask the user for the correct password and try reading it // again. If the user cancels the password dialog, abort the whole process. QString password = QInputDialog::getText(nullptr, qApp->applicationName(), tr("Please enter the passphrase for this client certificate in order to authenticate.")); if(password.isEmpty()) return false; clientKey = QSslKey(&fileClientCert, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, password.toUtf8()); } fileClientCert.close(); // Set client certificate (from the cache) and private key (just loaded) m_sslConfiguration.setLocalCertificate(cert); m_sslConfiguration.setPrivateKey(clientKey); // Apply SSL configuration request->setSslConfiguration(m_sslConfiguration); return true; } void RemoteDatabase::prepareProgressDialog(QNetworkReply* reply, bool upload, const QString& url) { // Instantiate progress dialog and apply some basic settings if(!m_progress) m_progress = new QProgressDialog(); m_progress->reset(); m_progress->setWindowModality(Qt::NonModal); m_progress->setCancelButtonText(tr("Cancel")); // Set dialog text if(upload) m_progress->setLabelText(tr("Uploading remote database to\n%1").arg(url)); else m_progress->setLabelText(tr("Downloading remote database from\n%1").arg(url)); // Show dialog m_progress->show(); // Make sure the dialog is updated if(upload) connect(reply, &QNetworkReply::uploadProgress, this, &RemoteDatabase::updateProgress); else connect(reply, &QNetworkReply::downloadProgress, this, &RemoteDatabase::updateProgress); } void RemoteDatabase::fetch(const QString& url, RequestType type, const QString& clientCert, QVariant userdata) { // Check if network is accessible. If not, abort right here if(m_manager->networkAccessible() == QNetworkAccessManager::NotAccessible) { QMessageBox::warning(nullptr, qApp->applicationName(), tr("Error: The network is not accessible.")); return; } // If this is a request for a database there is a chance that we've already cloned that database. So check for that first if(type == RequestTypeDatabase) { QString exists = localExists(url, clientCert); if(!exists.isEmpty()) { // Database has already been cloned! So open the local file instead of fetching the one from the // server again. emit openFile(exists); return; } } // Build network request QNetworkRequest request; request.setUrl(url); request.setRawHeader("User-Agent", QString("%1 %2").arg(qApp->organizationName()).arg(APP_VERSION).toUtf8()); // Set SSL configuration when trying to access a file via the HTTPS protocol. // Skip this step when no client certificate was specified. In this case the default HTTPS configuration is used. bool https = QUrl(url).scheme().compare("https", Qt::CaseInsensitive) == 0; if(https && !clientCert.isNull()) { // If configuring the SSL connection fails, abort the request here if(!prepareSsl(&request, clientCert)) return; } // Clear access cache if necessary clearAccessCache(clientCert); // Fetch database and prepare pending reply for future processing QNetworkReply* reply = m_manager->get(request); reply->setProperty("type", type); reply->setProperty("certfile", clientCert); reply->setProperty("userdata", userdata); // Initialise the progress dialog for this request, but only if this is a database file. Directory listing are small enough to be loaded // without progress dialog. if(type == RequestTypeDatabase) prepareProgressDialog(reply, false, url); } void RemoteDatabase::push(const QString& filename, const QString& url, const QString& clientCert, const QString& remotename, const QString& commitMessage, const QString& licence, bool isPublic, const QString& branch, bool forcePush) { // Check if network is accessible. If not, abort right here if(m_manager->networkAccessible() == QNetworkAccessManager::NotAccessible) { QMessageBox::warning(nullptr, qApp->applicationName(), tr("Error: The network is not accessible.")); return; } // Open the file to send and check if it exists QFile* file = new QFile(filename); if(!file->open(QFile::ReadOnly)) { delete file; QMessageBox::warning(nullptr, qApp->applicationName(), tr("Error: Cannot open the file for sending.")); return; } // Build network request QNetworkRequest request; request.setUrl(url); request.setRawHeader("User-Agent", QString("%1 %2").arg(qApp->organizationName()).arg(APP_VERSION).toUtf8()); // Get the last modified date of the file and prepare it for conversion into the ISO date format QDateTime last_modified = QFileInfo(filename).lastModified(); last_modified.toOffsetFromUtc(0); // Prepare HTTP multi part data containing all the information about the commit we're about to push QHttpMultiPart* multipart = new QHttpMultiPart(QHttpMultiPart::FormDataType); addPart(multipart, "file", file, remotename); addPart(multipart, "commitmsg", commitMessage); addPart(multipart, "licence", licence); addPart(multipart, "public", isPublic ? "true" : "false"); addPart(multipart, "branch", branch); addPart(multipart, "commit", localLastCommitId(clientCert, url)); addPart(multipart, "force", forcePush ? "true" : "false"); addPart(multipart, "lastmodified", last_modified.toString("yyyy-MM-dd'T'HH:mm:ss'Z'")); // Set SSL configuration when trying to access a file via the HTTPS protocol bool https = QUrl(url).scheme().compare("https", Qt::CaseInsensitive) == 0; if(https) { // If configuring the SSL connection fails, abort the request here if(!prepareSsl(&request, clientCert)) { delete file; return; } } // Clear access cache if necessary clearAccessCache(clientCert); // Put database to remote server and save pending reply for future processing QNetworkReply* reply = m_manager->post(request, multipart); reply->setProperty("type", RequestTypePush); reply->setProperty("certfile", clientCert); reply->setProperty("source_file", filename); multipart->setParent(reply); // Delete the multi-part object along with the reply // Initialise the progress dialog for this request prepareProgressDialog(reply, true, url); } void RemoteDatabase::addPart(QHttpMultiPart* multipart, const QString& name, const QString& value) { QHttpPart part; part.setHeader(QNetworkRequest::ContentDispositionHeader, QString("form-data; name=\"%1\"").arg(name)); part.setBody(value.toUtf8()); multipart->append(part); } void RemoteDatabase::addPart(QHttpMultiPart* multipart, const QString& name, QFile* file, const QString& filename) { QHttpPart part; part.setHeader(QNetworkRequest::ContentDispositionHeader, QString("form-data; name=\"%1\"; filename=\"%2\"").arg(name).arg(filename)); part.setBodyDevice(file); file->setParent(multipart); // Close the file and delete the file object as soon as the multi-part object is destroyed multipart->append(part); } void RemoteDatabase::localAssureOpened() { // This function should be called first in each RemoteDatabase::local* function. It assures the database for storing // the local database information is opened and ready. If the database file doesn't exist yet it is created by this // function. If the database file is already created and opened this function does nothing. The reason to open the // database on first use instead of doing that in the constructor of this class is that this way no database file is // going to be created and no database handle is held when it's not actually needed. For people not interested in // the dbhub.io functionality this means no unnecessary files being created. // Check if database is already opened and return if it is if(m_dbLocal) return; // Open file QString database_file = QStandardPaths::writableLocation( #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) QStandardPaths::AppDataLocation #else QStandardPaths::GenericDataLocation #endif ) + "/remotedbs.db"; if(sqlite3_open_v2(database_file.toUtf8(), &m_dbLocal, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, nullptr) != SQLITE_OK) { QMessageBox::warning(nullptr, qApp->applicationName(), tr("Error opening local databases list.\n%1").arg(QString::fromUtf8(sqlite3_errmsg(m_dbLocal)))); return; } // Create local local table if it doesn't exists yet char* errmsg; QString statement = QString("CREATE TABLE IF NOT EXISTS \"local\"(" "\"id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT," "\"identity\" TEXT NOT NULL," "\"name\" TEXT NOT NULL," "\"url\" TEXT NOT NULL," "\"commit_id\" TEXT NOT NULL," "\"file\" TEXT NOT NULL UNIQUE," "\"modified\" INTEGER DEFAULT 0," "\"branch\" TEXT NOT NULL DEFAULT \"master\"" ")"); if(sqlite3_exec(m_dbLocal, statement.toUtf8(), nullptr, nullptr, &errmsg) != SQLITE_OK) { QMessageBox::warning(nullptr, qApp->applicationName(), tr("Error creating local databases list.\n%1").arg(QString::fromUtf8(errmsg))); sqlite3_free(errmsg); sqlite3_close(m_dbLocal); m_dbLocal = nullptr; return; } } QString RemoteDatabase::localAdd(QString filename, QString identity, const QUrl& url, const QString& new_commit_id) { // This function adds a new local database clone to our internal list. It does so by adding a single // new record to the remote dbs database. All the fields are extracted from the filename, the identity // and (most importantly) the url parameters. Note that for the commit id field to be correctly filled we // require the commit id to be part of the url parameter. Also note that this function doesn't care if the // database has already been added to the list or not. If you need this information you need to check it before // calling this function, ideally even before sending out a request to the network. The function returns the full // path of the newly created/updated file. localAssureOpened(); // Remove the path QFileInfo f(identity); identity = f.fileName(); // Check if this file has already been checked in QString last_commit_id = localLastCommitId(identity, url.toString()); if(last_commit_id.isNull()) { // The file hasn't been checked in yet. So add a new record for it. // Generate a new file name to save the file under filename = QString("%2_%1.remotedb").arg(QDateTime::currentMSecsSinceEpoch()).arg(filename); // Insert database into local database list QString sql = QString("INSERT INTO local(identity, name, url, commit_id, file) VALUES(?, ?, ?, ?, ?)"); sqlite3_stmt* stmt; if(sqlite3_prepare_v2(m_dbLocal, sql.toUtf8(), -1, &stmt, nullptr) != SQLITE_OK) return QString(); if(sqlite3_bind_text(stmt, 1, identity.toUtf8(), identity.toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_bind_text(stmt, 2, url.fileName().toUtf8(), url.fileName().toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_bind_text(stmt, 3, url.toString(QUrl::PrettyDecoded | QUrl::RemoveQuery).toUtf8(), url.toString(QUrl::PrettyDecoded | QUrl::RemoveQuery).toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_bind_text(stmt, 4, new_commit_id.toUtf8(), new_commit_id.toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_bind_text(stmt, 5, filename.toUtf8(), filename.toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_step(stmt) != SQLITE_DONE) { sqlite3_finalize(stmt); return QString(); } sqlite3_finalize(stmt); // Return full path to the new file return Settings::getValue("remote", "clonedirectory").toString() + "/" + filename; } // If we get here, the file has been checked in before. Check next if it has been updated in the meantime. if(last_commit_id != new_commit_id) { // The file has already been checked in and the commit ids are different. If they weren't we wouldn't need to update anything QString sql = QString("UPDATE local SET commit_id=? WHERE identity=? AND url=?"); sqlite3_stmt* stmt; if(sqlite3_prepare_v2(m_dbLocal, sql.toUtf8(), -1, &stmt, nullptr) != SQLITE_OK) return QString(); if(sqlite3_bind_text(stmt, 1, new_commit_id.toUtf8(), new_commit_id.toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_bind_text(stmt, 2, identity.toUtf8(), identity.toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_bind_text(stmt, 3, url.toString(QUrl::PrettyDecoded | QUrl::RemoveQuery).toUtf8(), url.toString(QUrl::PrettyDecoded | QUrl::RemoveQuery).toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_step(stmt) != SQLITE_DONE) { sqlite3_finalize(stmt); return QString(); } sqlite3_finalize(stmt); } // If we got here, the file was already checked in (and was either updated or not (obviously)). This mean we can just return the file name as // we know it. return localExists(url, identity); } QString RemoteDatabase::localExists(const QUrl& url, QString identity) { // This function checks if there already is a clone for the given combination of url and identity. It returns the filename // of this clone if there is or a null string if there isn't a clone yet. The identity needs to be part of this check because // with the url alone there could be corner cases where different versions or whatever may not be accessible for all users. localAssureOpened(); // Extract commit id from url and remove query part afterwards QString url_commit_id = QUrlQuery(url).queryItemValue("commit"); // Query commit id and filename for the given combination of url and identity QString sql = QString("SELECT id, commit_id, file FROM local WHERE url=? AND identity=?"); sqlite3_stmt* stmt; if(sqlite3_prepare_v2(m_dbLocal, sql.toUtf8(), -1, &stmt, nullptr) != SQLITE_OK) return QString(); if(sqlite3_bind_text(stmt, 1, url.toString(QUrl::PrettyDecoded | QUrl::RemoveQuery).toUtf8(), url.toString(QUrl::PrettyDecoded | QUrl::RemoveQuery).toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } QFileInfo f(identity); // Remove the path identity = f.fileName(); if(sqlite3_bind_text(stmt, 2, identity.toUtf8(), identity.toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_step(stmt) != SQLITE_ROW) { // If there was either an error or no record was found for this combination of url and // identity, stop here. sqlite3_finalize(stmt); return QString(); } // Having come here we can assume that at least some local clone for the given combination of // url and identity exists. So extract all the information we have on it. //int local_id = sqlite3_column_int(stmt, 0); QString local_commit_id = QString::fromUtf8(reinterpret_cast(sqlite3_column_text(stmt, 1))); QString local_file = QString::fromUtf8(reinterpret_cast(sqlite3_column_text(stmt, 2))); sqlite3_finalize(stmt); // There are three possibilities now: either we didn't get any commit id in the URL in which case we just return the file we got, no matter what. // Or the requested commit id is the same as the local commit id in which case we return the file we got as well. // Or the requested commit id differ in which case we ask the user what to do. if(url_commit_id.isNull() || local_commit_id == url_commit_id) { // Both commit ids are the same. That's the perfect match, so we can download the local file if it still exists return localCheckFile(local_file); } else { // The commit ids differ. That means we have another version locally checked out than we're trying to download. Because the commit ids are // only calculated on the server side and we're currently always checking out the latest version this can only mean that the remote version has // been updated, i.e. is newer than the local version. // TODO Support multiple checkouts of the same database at different versions at the same time. For this we need to be more intelligent with // comparing the commit ids. // Ask the user what to do: open the local version or updating to the new remote version if(QMessageBox::question(nullptr, qApp->applicationName(), tr("The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note " "that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version."), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) { // User wants to download the newest version. So delete the entry from the clones database and delete the local database copy and return an empty // string to indicate a redownload request. // Build full path to database file and delete it QFile::remove(Settings::getValue("remote", "clonedirectory").toString() + "/" + local_file); // Remove the old entry from the local clones database to enforce a redownload. The file column should be unique for the entire table because the // files are all in the same directory and their names need to be unique because of this. QString sql = QString("DELETE FROM local WHERE file=?"); sqlite3_stmt* stmt; if(sqlite3_prepare_v2(m_dbLocal, sql.toUtf8(), -1, &stmt, nullptr) != SQLITE_OK) return QString(); if(sqlite3_bind_text(stmt, 1, local_file.toUtf8(), local_file.toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } sqlite3_step(stmt); sqlite3_finalize(stmt); // Return an empty string to indicate a redownload request return QString(); } else { // User wants to open the local version. So build the full path and return it if the file still exists. return localCheckFile(local_file); } } } QString RemoteDatabase::localCheckFile(const QString& local_file) { // This function takes the file name of a locally cloned database and checks if this file still exists. If it has been deleted in the meantime it returns // an empty string and deletes the file from the clone database. If the file still exists, it returns the full path to the file. localAssureOpened(); // Build the full path to where the file should be QString full_path = Settings::getValue("remote", "clonedirectory").toString() + "/" + local_file; // Check if the database still exists. If so return its path, if not return an empty string to redownload it if(QFile::exists(full_path)) { return full_path; } else { // Remove the apparently invalid entry from the local clones database to avoid future lookups and confusions. The file column should // be unique for the entire table because the files are all in the same directory and their names need to be unique because of this. QString sql = QString("DELETE FROM local WHERE file=?"); sqlite3_stmt* stmt; if(sqlite3_prepare_v2(m_dbLocal, sql.toUtf8(), -1, &stmt, nullptr) != SQLITE_OK) return QString(); if(sqlite3_bind_text(stmt, 1, local_file.toUtf8(), local_file.toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } sqlite3_step(stmt); sqlite3_finalize(stmt); // Return empty string to indicate a redownload request return QString(); } } QString RemoteDatabase::localLastCommitId(QString identity, const QUrl& url) { // This function takes a file name and checks with which commit id we had checked out this file or last pushed it. localAssureOpened(); // Query commit id for that file name QString sql = QString("SELECT commit_id FROM local WHERE identity=? AND url=?"); sqlite3_stmt* stmt; if(sqlite3_prepare_v2(m_dbLocal, sql.toUtf8(), -1, &stmt, nullptr) != SQLITE_OK) return QString(); QFileInfo f(identity); // Remove the path identity = f.fileName(); if(sqlite3_bind_text(stmt, 1, identity.toUtf8(), identity.toUtf8().length(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_bind_text(stmt, 2, url.toString(QUrl::PrettyDecoded | QUrl::RemoveQuery).toUtf8(), url.toString(QUrl::PrettyDecoded | QUrl::RemoveQuery).toUtf8().size(), SQLITE_TRANSIENT)) { sqlite3_finalize(stmt); return QString(); } if(sqlite3_step(stmt) != SQLITE_ROW) { // If there was either an error or no record was found for this file name, stop here. sqlite3_finalize(stmt); return QString(); } // Having come here we can assume that at least some local clone with the given file name QString local_commit_id = QString::fromUtf8(reinterpret_cast(sqlite3_column_text(stmt, 0))); sqlite3_finalize(stmt); return local_commit_id; } void RemoteDatabase::clearAccessCache(const QString& clientCert) { // When the client certificate is different from the one before, clear the access and authentication cache. // Otherwise Qt might use the old certificate again. static QString lastClientCert; if(lastClientCert != clientCert) { lastClientCert = clientCert; m_manager->clearAccessCache(); } } sqlitebrowser-3.11.2/src/RemoteDatabase.h000066400000000000000000000074651345112435200203370ustar00rootroot00000000000000#ifndef REMOTEDATABASE_H #define REMOTEDATABASE_H #include #include class QNetworkAccessManager; class QNetworkConfigurationManager; class QString; class QNetworkReply; class QSslError; class QProgressDialog; class QNetworkRequest; class QHttpMultiPart; class QFile; struct sqlite3; class RemoteDatabase : public QObject { Q_OBJECT public: RemoteDatabase(); virtual ~RemoteDatabase(); void reloadSettings(); enum CertInfo { CertInfoUser, CertInfoServer, }; const QList& caCertificates() const; const QMap& clientCertificates() const { return m_clientCertFiles; } QString getInfoFromClientCert(const QString& cert, CertInfo info) const; enum RequestType { RequestTypeDatabase, RequestTypeDirectory, RequestTypeNewVersionCheck, RequestTypePush, RequestTypeLicenceList, RequestTypeBranchList, }; void fetch(const QString& url, RequestType type, const QString& clientCert = QString(), QVariant userdata = QVariant()); void push(const QString& filename, const QString& url, const QString& clientCert, const QString& remotename, const QString& commitMessage = QString(), const QString& licence = QString(), bool isPublic = false, const QString& branch = QString("master"), bool forcePush = false); signals: // The openFile signal is emitted whenever a remote database file shall be opened in the main window. This happens when the // fetch() call for a database is finished, either by actually downloading the database or opening the local clone. void openFile(QString path); // These signals are emitted when the fetch() calls are finished that are not requesting a remote database but other data, like // a directory listing or the licence list. void gotDirList(QString json, QVariant userdata); void gotCurrentVersion(QString version, QString url); void gotLicenceList(QMap licences); void gotBranchList(QStringList branches, QString default_branch); // The uploadFinished() signal is emitted when a push() call is finished, i.e. a database upload has completed. void uploadFinished(QString url); private: void gotEncrypted(QNetworkReply* reply); void gotReply(QNetworkReply* reply); void gotError(QNetworkReply* reply, const QList& errors); void updateProgress(qint64 bytesTransmitted, qint64 bytesTotal); bool prepareSsl(QNetworkRequest* request, const QString& clientCert); void prepareProgressDialog(QNetworkReply* reply, bool upload, const QString& url); // Helper functions for managing the list of locally available databases void localAssureOpened(); QString localAdd(QString filename, QString identity, const QUrl& url, const QString& new_commit_id); QString localExists(const QUrl& url, QString identity); QString localCheckFile(const QString& local_file); QString localLastCommitId(QString clientCert, const QUrl& url); // Helper functions for building multi-part HTTP requests void addPart(QHttpMultiPart* multipart, const QString& name, const QString& value); void addPart(QHttpMultiPart* multipart, const QString& name, QFile* file, const QString& filename); // Before using a new client certificate we need to clear the access and authentication cache of the network manager // object. Otherwise Qt might reuse the old certificate if the requested URL has been used before. void clearAccessCache(const QString& clientCert); QNetworkAccessManager* m_manager; QNetworkConfigurationManager* m_configurationManager; QProgressDialog* m_progress; QSslConfiguration m_sslConfiguration; QMap m_clientCertFiles; sqlite3* m_dbLocal; }; #endif sqlitebrowser-3.11.2/src/RemoteDock.cpp000066400000000000000000000114101345112435200200270ustar00rootroot00000000000000#include #include #include "RemoteDock.h" #include "ui_RemoteDock.h" #include "Settings.h" #include "RemoteDatabase.h" #include "RemoteModel.h" #include "MainWindow.h" #include "RemotePushDialog.h" RemoteDock::RemoteDock(MainWindow* parent) : QDialog(parent), ui(new Ui::RemoteDock), mainWindow(parent), remoteDatabase(parent->getRemote()), remoteModel(new RemoteModel(this, parent->getRemote())) { ui->setupUi(this); // Set up model ui->treeStructure->setModel(remoteModel); // Reload the directory tree when a database upload has finished connect(&remoteDatabase, &RemoteDatabase::uploadFinished, this, &RemoteDock::setNewIdentity); // Whenever a new directory listing has been parsed, check if it was a new root dir and, if so, open the user's directory connect(remoteModel, &RemoteModel::directoryListingParsed, this, &RemoteDock::newDirectoryNode); // Initial setup reloadSettings(); } RemoteDock::~RemoteDock() { delete ui; } void RemoteDock::reloadSettings() { // Load list of client certs ui->comboUser->clear(); QStringList client_certs = Settings::getValue("remote", "client_certificates").toStringList(); for(const QString& file : client_certs) { auto certs = QSslCertificate::fromPath(file); for(const QSslCertificate& cert : certs) ui->comboUser->addItem(cert.subjectInfo(QSslCertificate::CommonName).at(0), file); } } void RemoteDock::setNewIdentity() { // Get identity QString identity = ui->comboUser->currentText(); if(identity.isEmpty()) return; // Get certificate file name QString cert = ui->comboUser->itemData(ui->comboUser->findText(identity), Qt::UserRole).toString(); if(cert.isEmpty()) return; // Open root directory. Get host name from client cert QString host = remoteDatabase.getInfoFromClientCert(cert, RemoteDatabase::CertInfoServer); remoteModel->setNewRootDir(QString("https://%1:5550/").arg(host), cert); // Enable buttons if necessary enableButtons(); } void RemoteDock::fetchDatabase(const QModelIndex& idx) { if(!idx.isValid()) return; // Get item const RemoteModelItem* item = remoteModel->modelIndexToItem(idx); // Only open database file if(item->value(RemoteModelColumnType).toString() == "database") remoteDatabase.fetch(item->value(RemoteModelColumnUrl).toString(), RemoteDatabase::RequestTypeDatabase, remoteModel->currentClientCertificate()); } void RemoteDock::enableButtons() { bool db_opened = mainWindow->getDb().isOpen(); bool logged_in = !remoteModel->currentClientCertificate().isEmpty(); ui->buttonPushDatabase->setEnabled(db_opened && logged_in); } void RemoteDock::pushDatabase() { // The default suggestion for a database name is the local file name. If it is a remote file (like when it initially was fetched using DB4S), // the extra bit of information at the end of the name gets removed first. QString name = QFileInfo(mainWindow->getDb().currentFile()).fileName(); name = name.remove(QRegExp("_[0-9]+.remotedb$")); // Show the user a dialog for setting all the commit details QString host = QString("https://%1:5550/").arg(remoteDatabase.getInfoFromClientCert(remoteModel->currentClientCertificate(), RemoteDatabase::CertInfoServer)); RemotePushDialog pushDialog(this, remoteDatabase, host, remoteModel->currentClientCertificate(), name); if(pushDialog.exec() != QDialog::Accepted) return; // Build push URL QString url = host; url.append(remoteDatabase.getInfoFromClientCert(remoteModel->currentClientCertificate(), RemoteDatabase::CertInfoUser)); url.append("/"); url.append(pushDialog.name()); // Push database remoteDatabase.push(mainWindow->getDb().currentFile(), url, remoteModel->currentClientCertificate(), pushDialog.name(), pushDialog.commitMessage(), pushDialog.licence(), pushDialog.isPublic(), pushDialog.branch(), pushDialog.forcePush()); } void RemoteDock::newDirectoryNode(const QModelIndex& parent) { // Was this a new root dir? if(!parent.isValid()) { // Then check if there is a directory with the current user name // Get current user name QString user = remoteDatabase.getInfoFromClientCert(remoteModel->currentClientCertificate(), RemoteDatabase::CertInfoUser); for(int i=0;irowCount(parent);i++) { QModelIndex child = remoteModel->index(i, RemoteModelColumnName, parent); if(child.data().toString() == user) ui->treeStructure->expand(child); } } } void RemoteDock::reject() { // We override this, to ensure the Escape key doesn't make this dialog // dock go away return; } sqlitebrowser-3.11.2/src/RemoteDock.h000066400000000000000000000012601345112435200174760ustar00rootroot00000000000000#ifndef REMOTEDOCK_H #define REMOTEDOCK_H #include class RemoteDatabase; class RemoteModel; class MainWindow; namespace Ui { class RemoteDock; } class RemoteDock : public QDialog { Q_OBJECT public: explicit RemoteDock(MainWindow* parent); ~RemoteDock(); void reloadSettings(); void enableButtons(); public slots: virtual void reject(); private slots: void setNewIdentity(); void fetchDatabase(const QModelIndex& idx); void pushDatabase(); void newDirectoryNode(const QModelIndex& parent); private: Ui::RemoteDock* ui; MainWindow* mainWindow; RemoteDatabase& remoteDatabase; RemoteModel* remoteModel; }; #endif sqlitebrowser-3.11.2/src/RemoteDock.ui000066400000000000000000000114041345112435200176650ustar00rootroot00000000000000 RemoteDock 0 0 575 310 Remote Identity comboUser QComboBox::AdjustToContents Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Go :/icons/cog_go.png:/icons/cog_go.png Qt::Horizontal 40 20 Push currently opened database to server :/icons/push_database:/icons/push_database <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> buttonLogin clicked() RemoteDock setNewIdentity() 551 22 419 24 treeStructure doubleClicked(QModelIndex) RemoteDock fetchDatabase(QModelIndex) 211 75 204 37 buttonPushDatabase clicked() RemoteDock pushDatabase() 551 22 287 154 setNewIdentity() fetchDatabase(QModelIndex) pushDatabase() sqlitebrowser-3.11.2/src/RemoteModel.cpp000066400000000000000000000230501345112435200202120ustar00rootroot00000000000000#include #include #include #include #include "RemoteModel.h" #include "RemoteDatabase.h" RemoteModelItem::RemoteModelItem(RemoteModelItem* parent) : m_parent(parent), m_fetchedDirectoryList(false) { } RemoteModelItem::~RemoteModelItem() { qDeleteAll(m_children); } QVariant RemoteModelItem::value(RemoteModelColumns column) const { return m_values[column]; } void RemoteModelItem::setValue(RemoteModelColumns column, QVariant value) { m_values[column] = value; } void RemoteModelItem::appendChild(RemoteModelItem *item) { m_children.append(item); } RemoteModelItem* RemoteModelItem::child(int row) const { return m_children.value(row); } RemoteModelItem* RemoteModelItem::parent() const { return m_parent; } int RemoteModelItem::childCount() const { return m_children.count(); } int RemoteModelItem::row() const { if(m_parent) return m_parent->m_children.indexOf(const_cast(this)); return 0; } bool RemoteModelItem::fetchedDirectoryList() const { return m_fetchedDirectoryList; } void RemoteModelItem::setFetchedDirectoryList(bool fetched) { m_fetchedDirectoryList = fetched; } QList RemoteModelItem::loadArray(const QJsonValue& value, RemoteModelItem* parent) { QList items; // Loop through all directory items QJsonArray array = value.toArray(); for(int i=0;isetValue(RemoteModelColumnName, array.at(i).toObject().value("name")); item->setValue(RemoteModelColumnType, array.at(i).toObject().value("type")); item->setValue(RemoteModelColumnUrl, array.at(i).toObject().value("url")); item->setValue(RemoteModelColumnCommitId, array.at(i).toObject().value("commit_id")); item->setValue(RemoteModelColumnSize, array.at(i).toObject().value("size")); item->setValue(RemoteModelColumnLastModified, array.at(i).toObject().value("last_modified")); items.push_back(item); } return items; } RemoteModel::RemoteModel(QObject* parent, RemoteDatabase& remote) : QAbstractItemModel(parent), rootItem(new RemoteModelItem()), remoteDatabase(remote) { // Initialise list of column names headerList << tr("Name") << tr("Commit") << tr("Last modified") << tr("Size"); // Set up signals connect(&remoteDatabase, &RemoteDatabase::gotDirList, this, &RemoteModel::parseDirectoryListing); } RemoteModel::~RemoteModel() { delete rootItem; } void RemoteModel::setNewRootDir(const QString& url, const QString& cert) { // Get user name from client cert currentUserName = remoteDatabase.getInfoFromClientCert(cert, RemoteDatabase::CertInfoUser); // Save settings currentRootDirectory = url; currentClientCert = cert; // Fetch root directory and put the reply data under the root item remoteDatabase.fetch(currentRootDirectory, RemoteDatabase::RequestTypeDirectory, currentClientCert, QModelIndex()); } void RemoteModel::parseDirectoryListing(const QString& json, const QVariant& userdata) { // Load new JSON root document assuming it's an array QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8()); if(doc.isNull() || !doc.isArray()) return; QJsonArray array = doc.array(); // Get model index to store the new data under QModelIndex parent = userdata.toModelIndex(); RemoteModelItem* parentItem = const_cast(modelIndexToItem(parent)); // An invalid model index indicates that this is a new root item. This means the old one needs to be entirely deleted first. if(!parent.isValid()) { // Clear root item beginResetModel(); delete rootItem; rootItem = new RemoteModelItem(); endResetModel(); // Set parent model index and parent item to the new values parent = QModelIndex(); parentItem = rootItem; } // Insert data beginInsertRows(parent, 0, array.size()); QList items = RemoteModelItem::loadArray(QJsonValue(array), parentItem); for(RemoteModelItem* item : items) parentItem->appendChild(item); endInsertRows(); // Emit directory listing parsed signal emit directoryListingParsed(parent); } QModelIndex RemoteModel::index(int row, int column, const QModelIndex& parent) const { if(!hasIndex(row, column, parent)) return QModelIndex(); const RemoteModelItem* parentItem = modelIndexToItem(parent); RemoteModelItem* childItem = parentItem->child(row); if(childItem) return createIndex(row, column, childItem); else return QModelIndex(); } QModelIndex RemoteModel::parent(const QModelIndex& index) const { if(!index.isValid()) return QModelIndex(); const RemoteModelItem* childItem = modelIndexToItem(index); RemoteModelItem* parentItem = childItem->parent(); if(parentItem == rootItem) return QModelIndex(); return createIndex(parentItem->row(), 0, parentItem); } QVariant RemoteModel::data(const QModelIndex& index, int role) const { // Don't return data for invalid indices if(!index.isValid()) return QVariant(); // Type of item const RemoteModelItem* item = modelIndexToItem(index); QString type = item->value(RemoteModelColumnType).toString(); // Decoration role? Only for first column! if(role == Qt::DecorationRole && index.column() == 0) { // Use different icons depending on item type if(type == "folder" && index.parent() == QModelIndex() && item->value(RemoteModelColumnName) == currentUserName) return QImage(":/icons/folder_user"); else if(type == "folder") return QImage(":/icons/folder"); else if(type == "database") return QImage(":/icons/database"); } else if(role == Qt::DisplayRole) { // Display role? // Return different value depending on column switch(index.column()) { case 0: { return item->value(RemoteModelColumnName); } case 1: { if(type == "folder") return QVariant(); return item->value(RemoteModelColumnCommitId); } case 2: { return item->value(RemoteModelColumnLastModified); } case 3: { // Folders don't have a size if(type == "folder") return QVariant(); // Convert size to human readable format float size = item->value(RemoteModelColumnSize).toLongLong(); QStringList list; list << "KiB" << "MiB" << "GiB" << "TiB"; QStringListIterator it(list); QString unit(tr("bytes")); while(size >= 1024.0f && it.hasNext()) { unit = it.next(); size /= 1024.0; } return QString().setNum(size, 'f', 2).remove(".00") + " " + unit; } } } return QVariant(); } QVariant RemoteModel::headerData(int section, Qt::Orientation orientation, int role) const { // Call default implementation for vertical headers and for non-display roles if(role != Qt::DisplayRole || orientation != Qt::Horizontal) return QAbstractItemModel::headerData(section, orientation, role); // Return header string depending on column return headerList.at(section); } int RemoteModel::rowCount(const QModelIndex& parent) const { if(parent.column() > 0) return 0; const RemoteModelItem* parentItem = modelIndexToItem(parent); return parentItem->childCount(); } int RemoteModel::columnCount(const QModelIndex& /*parent*/) const { return headerList.size(); } bool RemoteModel::hasChildren(const QModelIndex& parent) const { if(!parent.isValid()) return true; // If the item actually has children or is of type "folder" (and may have no children yet), we say that it actually has children const RemoteModelItem* item = modelIndexToItem(parent); return item->childCount() || item->value(RemoteModelColumnType) == "folder"; } bool RemoteModel::canFetchMore(const QModelIndex& parent) const { if(!parent.isValid()) return false; // If the item is of type "folder" and we haven't tried fetching a directory listing yet, we indicate that there might be more data to load const RemoteModelItem* item = modelIndexToItem(parent); return item->value(RemoteModelColumnType) == "folder" && !item->fetchedDirectoryList(); } void RemoteModel::fetchMore(const QModelIndex& parent) { // Can we even fetch more data? if(!canFetchMore(parent)) return; // Get parent item RemoteModelItem* item = static_cast(parent.internalPointer()); // Fetch item URL item->setFetchedDirectoryList(true); remoteDatabase.fetch(item->value(RemoteModelColumnUrl).toString(), RemoteDatabase::RequestTypeDirectory, currentClientCert, parent); } const QString& RemoteModel::currentClientCertificate() const { return currentClientCert; } const RemoteModelItem* RemoteModel::modelIndexToItem(const QModelIndex& idx) const { if(!idx.isValid()) return rootItem; else return static_cast(idx.internalPointer()); } sqlitebrowser-3.11.2/src/RemoteModel.h000066400000000000000000000103361345112435200176620ustar00rootroot00000000000000#ifndef REMOTEMODEL_H #define REMOTEMODEL_H #include #include class RemoteDatabase; // List of fields stored in the JSON data enum RemoteModelColumns { RemoteModelColumnName, RemoteModelColumnType, RemoteModelColumnUrl, RemoteModelColumnCommitId, RemoteModelColumnSize, RemoteModelColumnLastModified, RemoteModelColumnCount }; class RemoteModelItem { public: explicit RemoteModelItem(RemoteModelItem* parent = nullptr); ~RemoteModelItem(); QVariant value(RemoteModelColumns column) const; void setValue(RemoteModelColumns column, QVariant value); bool fetchedDirectoryList() const; void setFetchedDirectoryList(bool fetched); void appendChild(RemoteModelItem* item); RemoteModelItem* child(int row) const; RemoteModelItem* parent() const; int childCount() const; int row() const; // This function assumes the JSON value it's getting passed is an array ("[{...}, {...}, {...}, ...]"). It returns a list of model items, one // per array entry and each with the specified parent set. static QList loadArray(const QJsonValue& value, RemoteModelItem* parent = nullptr); private: // These are just the fields from the json objects returned by the dbhub.io server QVariant m_values[RemoteModelColumnCount]; // Child items and parent item QList m_children; RemoteModelItem* m_parent; // Indicates whether we already tried fetching a directory listing for this item. This serves two purposes: // 1) When having an empty directory this allows us to remove the expandable flag for this item. // 2) Between sending a network request and getting the reply this flag is already set, avoiding a second or third request being sent in the meantime. bool m_fetchedDirectoryList; }; class RemoteModel : public QAbstractItemModel { Q_OBJECT public: explicit RemoteModel(QObject* parent, RemoteDatabase& remote); virtual ~RemoteModel(); void setNewRootDir(const QString& url, const QString& cert); QModelIndex index(int row, int column,const QModelIndex& parent = QModelIndex()) const; QModelIndex parent(const QModelIndex& index) const; QVariant data(const QModelIndex& index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role) const; int rowCount(const QModelIndex& parent = QModelIndex()) const; int columnCount(const QModelIndex& parent = QModelIndex()) const; bool hasChildren(const QModelIndex& parent) const; bool canFetchMore(const QModelIndex& parent) const; void fetchMore(const QModelIndex& parent); // This helper function takes a model index and returns the according model item. An invalid model index is used to indicate the // root item, so if the index is invalid the root item is returned. This means that if you need to check for actual invalid indices // this needs to be done prior to calling this function. const RemoteModelItem* modelIndexToItem(const QModelIndex& idx) const; // Returns the current client certificate const QString& currentClientCertificate() const; signals: // This signal is emitted whenever a directory listing has been received and parsed void directoryListingParsed(QModelIndex parent); private slots: // This is called whenever a network reply containing a directory listing arrives. json contains the reply data, userdata // contains some custom data passed to the request. In this case we expect this to be the model index of the parent tree item. void parseDirectoryListing(const QString& json, const QVariant& userdata); private: // Pointer to the root item. This contains all the actual item data. RemoteModelItem* rootItem; // Thr header list is a list of column titles. It's a static list that's getting filled in the constructor. QStringList headerList; // Reference to the remote database object which is stored somewhere in the main window. RemoteDatabase& remoteDatabase; // This stores the currently used network identity so it can be used for further requests, e.g. for // lazy population. QString currentRootDirectory; QString currentClientCert; QString currentUserName; }; #endif sqlitebrowser-3.11.2/src/RemotePushDialog.cpp000066400000000000000000000105711345112435200212150ustar00rootroot00000000000000#include #include #include #include "RemotePushDialog.h" #include "ui_RemotePushDialog.h" #include "RemoteDatabase.h" RemotePushDialog::RemotePushDialog(QWidget* parent, RemoteDatabase& remote, const QString& host, const QString& clientCert, const QString& name) : QDialog(parent), ui(new Ui::RemotePushDialog), m_host(host), m_clientCert(clientCert), remoteDatabase(remote), m_nameValidator(new QRegExpValidator(QRegExp("^[a-z,A-Z,0-9,\\.,\\-,\\_,\\(,\\),\\+,\\ ]+$"), this)), m_branchValidator(new QRegExpValidator(QRegExp("^[a-z,A-Z,0-9,\\^,\\.,\\-,\\_,\\/,\\(,\\),\\:,\\&,\\ )]+$"), this)) { // Create UI ui->setupUi(this); ui->editName->setValidator(m_nameValidator); ui->comboBranch->setValidator(m_branchValidator); // Set start values ui->editName->setText(name); // Enable/disable accept button checkInput(); // Fetch list of available licences connect(&remoteDatabase, &RemoteDatabase::gotLicenceList, this, &RemotePushDialog::fillInLicences); remoteDatabase.fetch(host + "licence/list", RemoteDatabase::RequestTypeLicenceList, clientCert); // Prepare fetching list of available branches connect(&remoteDatabase, &RemoteDatabase::gotBranchList, this, &RemotePushDialog::fillInBranches); reloadBranchList(); } RemotePushDialog::~RemotePushDialog() { delete ui; } void RemotePushDialog::checkInput() { // Update public/private check box text if(ui->checkPublic->isChecked()) ui->checkPublic->setText(tr("Database will be public. Everyone has read access to it.")); else ui->checkPublic->setText(tr("Database will be private. Only you have access to it.")); // Update the foce push check box text if(ui->checkForce->isChecked()) ui->checkForce->setText(tr("Use with care. This can cause remote commits to be deleted.")); else ui->checkForce->setText(" "); // The space character here is required to avoid annoying resizes when toggling the checkbox // Check input bool valid = true; if(ui->editName->text().trimmed().isEmpty()) valid = false; if(ui->editCommitMessage->toPlainText().size() > 1024) valid = false; if(ui->comboBranch->currentText().size() < 1 || ui->comboBranch->currentText().size() > 32) valid = false; ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid); } void RemotePushDialog::accept() { QDialog::accept(); } QString RemotePushDialog::name() const { return ui->editName->text().trimmed(); } QString RemotePushDialog::commitMessage() const { return ui->editCommitMessage->toPlainText().trimmed(); } QString RemotePushDialog::licence() const { return ui->comboLicence->currentData(Qt::UserRole).toString(); } bool RemotePushDialog::isPublic() const { return ui->checkPublic->isChecked(); } QString RemotePushDialog::branch() const { return ui->comboBranch->currentText(); } bool RemotePushDialog::forcePush() const { return ui->checkForce->isChecked(); } void RemotePushDialog::fillInLicences(const QMap& licences) { // Clear licence list and add default item for unspecified licence ui->comboLicence->clear(); ui->comboLicence->addItem(tr("Unspecified"), QString()); // Parse licence list and fill combo box. Show the full name to the user and use the short name as user data. for(auto it=licences.constBegin();it!=licences.constEnd();++it) ui->comboLicence->addItem(it.value(), it.key()); } void RemotePushDialog::fillInBranches(const QStringList& branches, const QString& default_branch) { // Clear branch list and add the default branch ui->comboBranch->clear(); ui->comboBranch->addItem(default_branch); // Add rest of the branch list to the combo box for(const QString& branch : branches) { if(branch != default_branch) ui->comboBranch->addItem(branch); } } void RemotePushDialog::reloadBranchList() { // Assemble query URL QUrl url(m_host + "branch/list"); QUrlQuery query; query.addQueryItem("username", remoteDatabase.getInfoFromClientCert(m_clientCert, RemoteDatabase::CertInfoUser)); query.addQueryItem("folder", "/"); query.addQueryItem("dbname", ui->editName->text()); url.setQuery(query); // Send request remoteDatabase.fetch(url.toString(), RemoteDatabase::RequestTypeBranchList, m_clientCert); } sqlitebrowser-3.11.2/src/RemotePushDialog.h000066400000000000000000000022241345112435200206560ustar00rootroot00000000000000#ifndef REMOTEPUSHDIALOG_H #define REMOTEPUSHDIALOG_H #include class RemoteDatabase; class QRegExpValidator; namespace Ui { class RemotePushDialog; } class RemotePushDialog : public QDialog { Q_OBJECT public: RemotePushDialog(QWidget* parent, RemoteDatabase& remote, const QString& host, const QString& clientCert, const QString& name = QString()); ~RemotePushDialog(); QString name() const; QString commitMessage() const; QString licence() const; bool isPublic() const; QString branch() const; bool forcePush() const; private: Ui::RemotePushDialog* ui; // Connection details QString m_host; QString m_clientCert; // Reference to the remote database object which is stored somewhere in the main window RemoteDatabase& remoteDatabase; // Validators QRegExpValidator* m_nameValidator; QRegExpValidator* m_branchValidator; protected slots: void checkInput(); virtual void accept(); void reloadBranchList(); void fillInLicences(const QMap& licences); void fillInBranches(const QStringList& branches, const QString& default_branch); }; #endif sqlitebrowser-3.11.2/src/RemotePushDialog.ui000066400000000000000000000164701345112435200210540ustar00rootroot00000000000000 RemotePushDialog 0 0 583 300 Push database Database na&me to push to editName 256 Commit message editCommitMessage <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> false Database licence comboLicence 0 0 Public checkPublic Branch comboBranch true true Force push checkForce Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok editName editCommitMessage comboBranch checkPublic comboLicence buttonBox accepted() RemotePushDialog accept() 248 254 157 274 buttonBox rejected() RemotePushDialog reject() 316 260 286 274 editName textChanged(QString) RemotePushDialog checkInput() 201 25 217 3 checkPublic toggled(bool) RemotePushDialog checkInput() 171 176 210 175 editCommitMessage textChanged() RemotePushDialog checkInput() 175 113 91 111 editName textChanged(QString) RemotePushDialog reloadBranchList() 176 25 77 3 comboBranch currentTextChanged(QString) RemotePushDialog checkInput() 172 138 33 151 checkForce toggled(bool) RemotePushDialog checkInput() 168 240 62 229 checkInput() reloadBranchList() sqlitebrowser-3.11.2/src/RowCache.h000066400000000000000000000154501345112435200171430ustar00rootroot00000000000000#ifndef ROW_CACHE_H #define ROW_CACHE_H #include #include #include #include /** cache structure adapted to the existing access patterns in SqliteTableModel. handles many large segments with gaps in between well. logical structure resembling a std::vector>, but implementation avoids actually allocating space for the non-empty optionals, and supports (hopefully) more efficient insertion / deletion. actually, this is not even a "cache" - once set, elements are never thrown away to make space for new elements. TODO introduce maximum segment size? **/ template class RowCache { public: typedef T value_type; /// constructs an empty cache explicit RowCache (); /// \returns number of cached rows size_t numSet () const; /// \returns number of segments size_t numSegments () const; /// \returns 1 if specified row is loaded, 0 otherwise size_t count (size_t pos) const; /// \returns specified row. \throws if not available const T & at (size_t pos) const; T & at (size_t pos); /// assigns value to specified row; may increase numSet() by one void set (size_t pos, T && value); /// insert new element; increases numSet() by one void insert (size_t pos, T && value); /// delete element; decreases numSet() by one void erase (size_t pos); /// reset to state after construction void clear (); /// given a range of rows (end is exclusive), narrow it in order /// to remove already-loaded rows from both ends. void smallestNonAvailableRange (size_t & row_begin, size_t & row_end) const; private: /// a single segment containing contiguous entries struct Segment { size_t pos_begin; std::vector entries; /// returns past-the-end position of this segment size_t pos_end () const { return pos_begin + entries.size(); } }; /// collection of non-overlapping segments, in order of increasing /// position using Segments = std::vector; Segments segments; // ------------------------------------------------------------------------------ /// \returns first segment that definitely cannot contain 'pos', /// because it starts at some later position. typename Segments::const_iterator getSegmentBeyond (size_t pos) const { // first segment whose pos_begin > pos (so can't contain pos itself): return std::upper_bound(segments.begin(), segments.end(), pos, pred); } typename Segments::iterator getSegmentBeyond (size_t pos) { return std::upper_bound(segments.begin(), segments.end(), pos, pred); } static bool pred (size_t pos, const Segment & s) { return pos < s.pos_begin; } // ------------------------------------------------------------------------------ /// \returns segment containing 'pos' typename Segments::const_iterator getSegmentContaining (size_t pos) const { auto it = getSegmentBeyond(pos); if(it != segments.begin()) { auto prev_it = it - 1; if(pos < prev_it->pos_end()) return prev_it; } return segments.end(); } }; template RowCache::RowCache () { } template size_t RowCache::numSet () const { return std::accumulate(segments.begin(), segments.end(), size_t(0), [](size_t r, const Segment & s) { return r + s.entries.size(); }); } template size_t RowCache::numSegments () const { return segments.size(); } template size_t RowCache::count (size_t pos) const { return getSegmentContaining(pos) != segments.end(); } template const T & RowCache::at (size_t pos) const { auto it = getSegmentContaining(pos); if(it != segments.end()) return it->entries[pos - it->pos_begin]; throw std::out_of_range("no matching segment found"); } template T & RowCache::at (size_t pos) { return const_cast(static_cast(*this).at(pos)); } template void RowCache::set (size_t pos, T && value) { auto it = getSegmentBeyond(pos); if(it != segments.begin()) { auto prev_it = it - 1; auto d = pos - prev_it->pos_begin; // distance from segment start (>=0) if(d < prev_it->entries.size()) { // replace value prev_it->entries[d] = std::move(value); return; } if(d == prev_it->entries.size()) { // extend existing segment prev_it->entries.insert(prev_it->entries.end(), std::move(value)); return; } } // make new segment segments.insert(it, { pos, { std::move(value) } }); } template void RowCache::insert (size_t pos, T && value) { auto it = getSegmentBeyond(pos); if(it != segments.begin()) { auto prev_it = it - 1; auto d = pos - prev_it->pos_begin; // distance from segment start (>=0) if(d <= prev_it->entries.size()) { // can extend existing segment prev_it->entries.insert(prev_it->entries.begin() + d, std::move(value)); goto push; } } // make new segment it = segments.insert(it, { pos, { std::move(value) } }) + 1; push: // push back all later segments std::for_each(it, segments.end(), [](Segment &s){ s.pos_begin++; }); } template void RowCache::erase (size_t pos) { auto it = getSegmentBeyond(pos); // if previous segment actually contains pos, shorten it if(it != segments.begin()) { auto prev_it = it - 1; auto d = pos - prev_it->pos_begin; // distance from segment start (>=0) if(d < prev_it->entries.size()) { prev_it->entries.erase(prev_it->entries.begin() + d); if(prev_it->entries.empty()) { it = segments.erase(prev_it); } } } // pull forward all later segments std::for_each(it, segments.end(), [](Segment &s){ s.pos_begin--; }); } template void RowCache::clear () { segments.clear(); } template void RowCache::smallestNonAvailableRange (size_t & row_begin, size_t & row_end) const { if(row_end < row_begin) throw std::invalid_argument("end must be >= begin"); while(row_begin < row_end) { auto it = getSegmentContaining(row_begin); if(it == segments.end()) break; row_begin = it->pos_end(); } while(row_end > row_begin) { auto it = getSegmentContaining(row_end - 1); if(it == segments.end()) break; row_end = it->pos_begin; } if(row_end < row_begin) row_end = row_begin; } #endif // SEGMENTING_CACHE_H sqlitebrowser-3.11.2/src/RowLoader.cpp000066400000000000000000000153651345112435200177060ustar00rootroot00000000000000#include #include "RowLoader.h" #include "sqlite.h" namespace { QString rtrimChar(const QString& s, QChar c) { QString r = s.trimmed(); while(r.endsWith(c)) r.chop(1); return r; } } // anon ns RowLoader::RowLoader ( std::function(void)> db_getter_, std::function statement_logger_, QStringList & headers_, QMutex & cache_mutex_, Cache & cache_data_ ) : db_getter(db_getter_), statement_logger(statement_logger_), headers(headers_) , cache_mutex(cache_mutex_), cache_data(cache_data_) , query() , num_tasks(0) , pDb(nullptr) , stop_requested(false) , current_task(nullptr) , next_task(nullptr) { } void RowLoader::setQuery (QString new_query) { std::lock_guard lk(m); query = new_query; } void RowLoader::triggerRowCountDetermination(int token) { std::unique_lock lk(m); num_tasks++; nosync_ensureDbAccess(); // do a count query to get the full row count in a fast manner row_counter = std::async(std::launch::async, [this, token]() { auto nrows = countRows(); if(nrows >= 0) emit rowCountComplete(token, nrows); std::lock_guard lk(m); nosync_taskDone(); }); } void RowLoader::nosync_ensureDbAccess () { if(!pDb) pDb = db_getter(); } std::shared_ptr RowLoader::getDb () const { std::lock_guard lk(m); return pDb; } int RowLoader::countRows() { int retval = -1; // Use a different approach of determining the row count when a EXPLAIN or a PRAGMA statement is used because a COUNT fails on these queries if(query.startsWith("EXPLAIN", Qt::CaseInsensitive) || query.startsWith("PRAGMA", Qt::CaseInsensitive)) { // So just execute the statement as it is and fetch all results counting the rows sqlite3_stmt* stmt; QByteArray utf8Query = query.toUtf8(); if(sqlite3_prepare_v2(pDb.get(), utf8Query, utf8Query.size(), &stmt, nullptr) == SQLITE_OK) { retval = 0; while(sqlite3_step(stmt) == SQLITE_ROW) retval++; sqlite3_finalize(stmt); return retval; } } else { // If it is a normal query - hopefully starting with SELECT - just do a COUNT on it and return the results QString sCountQuery = QString("SELECT COUNT(*) FROM (%1);").arg(rtrimChar(query, ';')); statement_logger(sCountQuery); QByteArray utf8Query = sCountQuery.toUtf8(); sqlite3_stmt* stmt; int status = sqlite3_prepare_v2(pDb.get(), utf8Query, utf8Query.size(), &stmt, nullptr); if(status == SQLITE_OK) { status = sqlite3_step(stmt); if(status == SQLITE_ROW) { QString sCount = QString::fromUtf8((const char*)sqlite3_column_text(stmt, 0)); retval = sCount.toInt(); } sqlite3_finalize(stmt); } else { qWarning() << "Count query failed: " << sCountQuery; } } return retval; } void RowLoader::triggerFetch (int token, size_t row_begin, size_t row_end) { std::unique_lock lk(m); if(pDb) { if(!row_counter.valid() || row_counter.wait_for(std::chrono::seconds(0)) == std::future_status::ready) { // only if row count is complete, we can safely interrupt SQLite to speed up cancellation sqlite3_interrupt(pDb.get()); } } if(current_task) current_task->cancel = true; nosync_ensureDbAccess(); // (forget a possibly already existing "next task") next_task.reset(new Task{ *this, token, row_begin, row_end }); lk.unlock(); cv.notify_all(); } void RowLoader::nosync_taskDone() { if(--num_tasks == 0) { pDb = nullptr; } } void RowLoader::cancel () { std::unique_lock lk(m); if(pDb) sqlite3_interrupt(pDb.get()); if(current_task) current_task->cancel = true; next_task = nullptr; cv.notify_all(); } void RowLoader::stop () { cancel(); std::unique_lock lk(m); stop_requested = true; cv.notify_all(); } bool RowLoader::readingData () const { std::unique_lock lk(m); return pDb != nullptr; } void RowLoader::waitUntilIdle () const { if(row_counter.valid()) row_counter.wait(); std::unique_lock lk(m); cv.wait(lk, [this](){ return stop_requested || (!current_task && !next_task); }); } void RowLoader::run () { for(;;) { std::unique_lock lk(m); current_task = nullptr; cv.notify_all(); cv.wait(lk, [this](){ return stop_requested || next_task; }); if(stop_requested) return; current_task = std::move(next_task); lk.unlock(); process(*current_task); } } void RowLoader::process (Task & t) { QString sLimitQuery; if(query.startsWith("PRAGMA", Qt::CaseInsensitive) || query.startsWith("EXPLAIN", Qt::CaseInsensitive)) { sLimitQuery = query; } else { // Remove trailing trailing semicolon QString queryTemp = rtrimChar(query, ';'); // If the query ends with a LIMIT statement take it as it is, if not append our own LIMIT part for lazy population if(queryTemp.contains(QRegExp("LIMIT\\s+.+\\s*((,|\\b(OFFSET)\\b)\\s*.+\\s*)?$", Qt::CaseInsensitive))) sLimitQuery = queryTemp; else sLimitQuery = queryTemp + QString(" LIMIT %1, %2;").arg(t.row_begin).arg(t.row_end-t.row_begin); } statement_logger(sLimitQuery); QByteArray utf8Query = sLimitQuery.toUtf8(); sqlite3_stmt *stmt; int status = sqlite3_prepare_v2(pDb.get(), utf8Query, utf8Query.size(), &stmt, nullptr); auto row = t.row_begin; if(SQLITE_OK == status) { const int num_columns = headers.size(); while(!t.cancel && sqlite3_step(stmt) == SQLITE_ROW) { Cache::value_type rowdata; for(int i=0;i(sqlite3_column_blob(stmt, i)), bytes)); else rowdata.append(QByteArray("")); } } QMutexLocker lk(&cache_mutex); cache_data.set(row++, std::move(rowdata)); } sqlite3_finalize(stmt); } if(row != t.row_begin) emit fetched(t.token, t.row_begin, row); } sqlitebrowser-3.11.2/src/RowLoader.h000066400000000000000000000057251345112435200173520ustar00rootroot00000000000000#ifndef ROW_LOADER_H #define ROW_LOADER_H #include #include #include #include #include #include #include #include #include #include #include "sqlite.h" #include "RowCache.h" class RowLoader : public QThread { Q_OBJECT void run() override; public: typedef RowCache> Cache; /// set up worker thread to handle row loading explicit RowLoader ( std::function(void)> db_getter, std::function statement_logger, QStringList & headers, QMutex & cache_mutex, Cache & cache_data ); void setQuery (QString); void triggerRowCountDetermination (int token); /// trigger asynchronous reading of specified row range, /// cancelling previous tasks; 'row_end' is exclusive; \param /// token is eventually returned through the 'fetched' /// signal. depending on how and when tasks are cancelled, not /// every triggerFetch() will result in a 'fetched' signal, or the /// 'fetched' signal may be for a narrower row range. void triggerFetch (int token, size_t row_begin, size_t row_end); /// cancel everything void cancel (); /// cancel everything and terminate worker thread void stop (); /// currently reading any data, or anything in "queue"? bool readingData () const; /// wait until not reading any data void waitUntilIdle () const; /// get current database - note that the worker thread might be /// working on it, too... \returns current db, or nullptr. std::shared_ptr getDb () const; signals: void fetched(int token, size_t row_begin, size_t row_end); void rowCountComplete(int token, int num_rows); private: const std::function()> db_getter; const std::function statement_logger; QStringList & headers; QMutex & cache_mutex; Cache & cache_data; mutable std::mutex m; mutable std::condition_variable cv; QString query; mutable std::future row_counter; size_t num_tasks; std::shared_ptr pDb; //< exclusive access while held... bool stop_requested; struct Task { RowLoader & row_loader; int token; size_t row_begin; size_t row_end; //< exclusive std::atomic cancel; Task(RowLoader & row_loader_, int t, size_t a, size_t b) : row_loader(row_loader_), token(t), row_begin(a), row_end(b), cancel(false) { row_loader.num_tasks++; } ~Task() { // (... mutex being held ...) row_loader.nosync_taskDone(); } }; std::unique_ptr current_task; std::unique_ptr next_task; int countRows (); void process (Task &); void nosync_ensureDbAccess (); void nosync_taskDone (); }; #endif // ROW_LOADER_H sqlitebrowser-3.11.2/src/Settings.cpp000066400000000000000000000270511345112435200176030ustar00rootroot00000000000000#include "Settings.h" #include #include #include #include #include #include #include QHash Settings::m_hCache; QVariant Settings::getValue(const QString& group, const QString& name) { // Have a look in the cache first auto cacheIndex = m_hCache.find(group + name); if(cacheIndex != m_hCache.end()) { return cacheIndex.value(); } else { // Nothing found in the cache, so get the value from the settings file or get the default value if there is no value set yet QSettings settings(QApplication::organizationName(), QApplication::organizationName()); QVariant value = settings.value(group + "/" + name, getDefaultValue(group, name)); // Store this value in the cache for further usage and return it afterwards m_hCache.insert(group + name, value); return value; } } void Settings::setValue(const QString& group, const QString& name, const QVariant& value, bool dont_save_to_disk) { // Sometime the value has to be saved for the current session only but get discarded when the application exits. // In order to achieve this this flag can be set which disables the save to disk mechanism and only leaves the save to cache part active. if(dont_save_to_disk == false) { // Set the group and save the given value QSettings settings(QApplication::organizationName(), QApplication::organizationName()); settings.beginGroup(group); settings.setValue(name, value); settings.endGroup(); } // Also change it in the cache m_hCache[group + name] = value; } QVariant Settings::getDefaultValue(const QString& group, const QString& name) { // db/defaultencoding? if(group == "db" && name == "defaultencoding") return "UTF-8"; // db/savedefaultlocation? if(group == "db" && name == "savedefaultlocation") return 2; // db/defaultlocation? if(group == "db" && name == "defaultlocation") return QDir::homePath(); // db/lastlocation? if(group == "db" && name == "lastlocation") return getValue("db", "defaultlocation"); // db/hideschemalinebreaks? if(group == "db" && name == "hideschemalinebreaks") return true; // db/foreignkeys? if(group == "db" && name == "foreignkeys") return true; // db/prefetchsize? if(group == "db" && name == "prefetchsize") return 50000; // db/defaultsqltext? if(group == "db" && name == "defaultsqltext") return ""; // exportcsv/firstrowheader? if(group == "exportcsv" && name == "firstrowheader") return true; // exportcsv/separator? if(group == "exportcsv" && name == "separator") return ','; // exportcsv/quotecharacter? if(group == "exportcsv" && name == "quotecharacter") return '"'; // importcsv group? if(group == "importcsv") { if(name == "firstrowheader") return false; if(name == "trimfields") return true; if(name == "separatetables") return false; if(name == "separator") return ','; if(name == "quotecharacter") return '"'; if(name == "encoding") return "UTF-8"; } // exportsql group? if(group == "exportsql") { if(name == "insertcolnames" || name == "insertmultiple") return false; if(name == "oldschema") return 0; } // newline character if (group == "exportcsv" && name == "newlinecharacters") #ifdef Q_OS_WIN return "\r\n"; #else return "\n"; #endif // exportjson/prettyprint? if(group == "exportjson" && name == "prettyprint") return true; // MainWindow/geometry? if(group == "MainWindow" && name == "geometry") return ""; // MainWindow/windowState? if(group == "MainWindow" && name == "windowState") return ""; // SQLLogDock/Log? if(group == "SQLLogDock" && name == "Log") return "Application"; // General/recentFileList? if(group == "General" && name == "recentFileList") return QStringList(); // General/language? if(group == "General" && name == "language") return QLocale::system().name(); // General/toolbarStyle if(group == "General" && name == "toolbarStyle") return static_cast(Qt::ToolButtonTextBesideIcon); if(group == "General" && name == "DBFileExtensions") return QObject::tr("SQLite database files (*.db *.sqlite *.sqlite3 *.db3)"); // checkversion group? if(group == "checkversion") { if(name == "enabled") return true; if(name == "ignmajor") return 999; if(name == "ignminor" || name == "ignpatch") return 0; } // Data Browser/NULL Fields if(group == "databrowser") { if(name == "font") return QFont().defaultFamily(); if(name == "fontsize") return 10; if(name == "symbol_limit") return 5000; if(name == "complete_threshold") return 1000; if(name == "indent_compact") return false; if(name == "auto_switch_mode") return true; if(name == "null_text") return "NULL"; if(name == "blob_text") return "BLOB"; if(name == "filter_escape") return "\\"; if(name == "filter_delay") return 200; if(name == "null_fg_colour") return QColor(Qt::lightGray).name(); if(name == "null_bg_colour") return QPalette().color(QPalette::Active, QPalette::Base).name(); if(name == "reg_fg_colour") return QPalette().color(QPalette::Active, QPalette::Text).name(); if(name == "reg_bg_colour") return QPalette().color(QPalette::Active, QPalette::Base).name(); if(name == "bin_fg_colour") return QColor(Qt::lightGray).name(); if(name == "bin_bg_colour") return QPalette().color(QPalette::Active, QPalette::Base).name(); } // syntaxhighlighter? if(group == "syntaxhighlighter") { // Bold? Only tables, functions and keywords are bold by default if(name.right(4) == "bold") return name == "keyword_bold" || name == "table_bold" || name == "function_bold"; // Italic? Nothing by default if(name.right(6) == "italic") return false; // Underline? Nothing by default if(name.right(9) == "underline") return false; // Colour? if(name.right(6) == "colour") { QColor backgroundColour = QPalette().color(QPalette::Active, QPalette::Base); QColor foregroundColour = QPalette().color(QPalette::Active, QPalette::Text); if(name == "foreground_colour") return foregroundColour.name(); else if(name == "background_colour") return backgroundColour.name(); // Detect and provide sensible defaults for dark themes if (backgroundColour.value() < foregroundColour.value()) { if(name == "keyword_colour") return QColor(82, 148, 226).name(); else if(name == "function_colour") return QColor(Qt::yellow).name(); else if(name == "table_colour") return QColor(Qt::cyan).name(); else if(name == "comment_colour") return QColor(Qt::green).name(); else if(name == "identifier_colour") return QColor(Qt::magenta).name(); else if(name == "string_colour") return QColor(Qt::lightGray).name(); else if(name == "currentline_colour") return backgroundColour.lighter(150).name(); else if(name == "background_colour") return backgroundColour.name(); } else { if(name == "keyword_colour") return QColor(Qt::darkBlue).name(); else if(name == "function_colour") return QColor(Qt::blue).name(); else if(name == "table_colour") return QColor(Qt::darkCyan).name(); else if(name == "comment_colour") return QColor(Qt::darkGreen).name(); else if(name == "identifier_colour") return QColor(Qt::darkMagenta).name(); else if(name == "string_colour") return QColor(Qt::red).name(); else if(name == "currentline_colour") return QColor(236, 236, 245).name(); else if(name == "background_colour") return backgroundColour.name(); } } } // editor/font? if(group == "editor" && name == "font") { QFont font("Monospace"); font.setStyleHint(QFont::TypeWriter); return QFontInfo(font).family(); } // editor/fontsize or log/fontsize? if((group == "editor" || group == "log") && name == "fontsize") #ifdef Q_OS_MAC // Use 12 pt size as the default on OSX return 12; #else return 9; #endif if(group == "editor") { if(name == "tabsize") { return 4; } } // editor/wrap_lines if(group == "editor" && name == "wrap_lines") return 0; // QsciScintilla::WrapNone // editor/identifier_quotes if(group == "editor" && name == "identifier_quotes") return 0; // sqlb::DoubleQuotes // editor/auto_completion? if(group == "editor" && name == "auto_completion") return true; // editor/upper_keywords? if(group == "editor" && name == "upper_keywords") return true; // editor/error_indicators? if(group == "editor" && name == "error_indicators") return true; // editor/horizontal_tiling? if(group == "editor" && name == "horizontal_tiling") return false; // extensions/list? if(group == "extensions" && name == "list") return QStringList(); // extensions/disableregex? if(group == "extension" && name == "disableregex") return false; // extensions/enable_load_extension? if(group == "extension" && name == "enable_load_extension") return false; // PlotDock/lineType or pointShape? if(group == "PlotDock") { // QCPGraph::lsLine if(name == "lineType") return 1; // QCPScatterStyle::ssDisk if(name == "pointShape") return 4; } // SchemaDock Drag & drop settings if(group == "SchemaDock") { if(name == "dropQualifiedNames") return false; if(name == "dropEnquotedNames") return true; } // Remote settings? if(group == "remote") { // Enable the File → Remote menu by default if(name == "active") return true; // Clone directory if(name == "clonedirectory") #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); #else return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); #endif } // Unknown combination of group and name? Return an invalid QVariant! return QVariant(); } void Settings::restoreDefaults () { QSettings settings(QApplication::organizationName(), QApplication::organizationName()); settings.clear(); m_hCache.clear(); } sqlitebrowser-3.11.2/src/Settings.h000066400000000000000000000014361345112435200172470ustar00rootroot00000000000000#ifndef SETTINGS_H #define SETTINGS_H #include #include #include class Settings { friend class PreferencesDialog; public: static QVariant getValue(const QString& group, const QString& name); static void setValue(const QString& group, const QString& name, const QVariant& value, bool dont_save_to_disk = false); static void restoreDefaults(); private: Settings() { } // class is fully static // This works similar to getSettingsValue but returns the default value instead of the value set by the user static QVariant getDefaultValue(const QString& group, const QString& name); // Cache for storing the settings to avoid repeatedly reading the settings file all the time static QHash m_hCache; }; #endif sqlitebrowser-3.11.2/src/SqlExecutionArea.cpp000066400000000000000000000134651345112435200212230ustar00rootroot00000000000000#include "SqlExecutionArea.h" #include "ui_SqlExecutionArea.h" #include "sqltextedit.h" #include "sqlitetablemodel.h" #include "sqlitedb.h" #include "Settings.h" #include "ExportDataDialog.h" #include #include #include SqlExecutionArea::SqlExecutionArea(DBBrowserDB& _db, QWidget* parent) : QWidget(parent), db(_db), ui(new Ui::SqlExecutionArea), m_columnsResized(false) { // Create UI ui->setupUi(this); // Create model model = new SqliteTableModel(db, this, Settings::getValue("db", "prefetchsize").toInt()); ui->tableResult->setModel(model); connect(model, &SqliteTableModel::finishedFetch, this, &SqlExecutionArea::fetchedData); ui->findFrame->hide(); QShortcut* shortcutHideFind = new QShortcut(QKeySequence("ESC"), ui->findLineEdit); connect(shortcutHideFind, SIGNAL(activated()), this, SLOT(hideFindFrame())); connect(ui->findLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(findLineEdit_textChanged(const QString &))); connect(ui->previousToolButton, SIGNAL(clicked()), this, SLOT(findPrevious())); connect(ui->nextToolButton, SIGNAL(clicked()), this, SLOT(findNext())); connect(ui->findLineEdit, SIGNAL(returnPressed()), this, SLOT(findNext())); connect(ui->hideFindButton, SIGNAL(clicked()), this, SLOT(hideFindFrame())); // Set collapsible the editErrors panel ui->splitter_2->setCollapsible(1, true); // Load settings reloadSettings(); } SqlExecutionArea::~SqlExecutionArea() { delete ui; } QString SqlExecutionArea::getSql() const { return ui->editEditor->text(); } QString SqlExecutionArea::getSelectedSql() const { return ui->editEditor->selectedText().trimmed().replace(QChar(0x2029), '\n'); } void SqlExecutionArea::finishExecution(const QString& result, const bool ok) { m_columnsResized = false; ui->editErrors->setPlainText(result); // Set reddish background when not ok if (showErrorIndicators) { if (ok) ui->editErrors->setStyleSheet(""); else ui->editErrors->setStyleSheet("QTextEdit {color: white; background-color: rgb(255, 102, 102)}"); } } void SqlExecutionArea::fetchedData() { // Don't resize the columns more than once to fit their contents. This is necessary because the finishedFetch signal of the model // is emitted for each loaded prefetch block and we want to avoid resizes while scrolling down. if(m_columnsResized) return; m_columnsResized = true; // Set column widths according to their contents but make sure they don't exceed a certain size ui->tableResult->resizeColumnsToContents(); for(int i=0;icolumnCount();i++) { if(ui->tableResult->columnWidth(i) > 300) ui->tableResult->setColumnWidth(i, 300); } } SqlTextEdit *SqlExecutionArea::getEditor() { return ui->editEditor; } ExtendedTableWidget *SqlExecutionArea::getTableResult() { return ui->tableResult; } void SqlExecutionArea::saveAsCsv() { ExportDataDialog dialog(db, ExportDataDialog::ExportFormatCsv, this, model->query()); dialog.exec(); } void SqlExecutionArea::reloadSettings() { // Reload editor and table settings ui->editEditor->reloadSettings(); ui->tableResult->reloadSettings(); // Set font QFont logfont(Settings::getValue("editor", "font").toString()); logfont.setStyleHint(QFont::TypeWriter); logfont.setPointSize(Settings::getValue("log", "fontsize").toInt()); ui->editErrors->setFont(logfont); // Apply horizontal/vertical tiling option if(Settings::getValue("editor", "horizontal_tiling").toBool()) ui->splitter->setOrientation(Qt::Horizontal); else ui->splitter->setOrientation(Qt::Vertical); // Set prefetch settings model->setChunkSize(Settings::getValue("db", "prefetchsize").toInt()); // Check if error indicators are enabled for the not-ok background clue showErrorIndicators = Settings::getValue("editor", "error_indicators").toBool(); if (!showErrorIndicators) ui->editErrors->setStyleSheet(""); } void SqlExecutionArea::find(QString expr, bool forward) { bool found = ui->editEditor->findText (expr, ui->regexpCheckBox->isChecked(), ui->caseCheckBox->isChecked(), ui->wholeWordsCheckBox->isChecked(), /* wrap */ true, forward); // Set reddish background when not found if (found || expr == "") ui->findLineEdit->setStyleSheet(""); else ui->findLineEdit->setStyleSheet("QLineEdit {color: white; background-color: rgb(255, 102, 102)}"); } void SqlExecutionArea::findPrevious() { find(ui->findLineEdit->text(), false); } void SqlExecutionArea::findNext() { find(ui->findLineEdit->text(), true); } void SqlExecutionArea::findLineEdit_textChanged(const QString &) { // When the text changes, perform an incremental search from cursor // position, or from begin of the selection position. // For incremental search while typing we need to start from the // begining of the current selection, otherwise we'd jump to the // next occurrence if (ui->editEditor->hasSelectedText()) { int lineFrom; int indexFrom; int lineTo; int indexTo; ui->editEditor->getSelection(&lineFrom, &indexFrom, &lineTo, &indexTo); ui->editEditor->setCursorPosition(lineFrom, indexFrom); } find(ui->findLineEdit->text(), true); } void SqlExecutionArea::hideFindFrame() { ui->editEditor->setFocus(); ui->findFrame->hide(); emit findFrameVisibilityChanged(false); } void SqlExecutionArea::setFindFrameVisibility(bool show) { if (show) { ui->findFrame->show(); ui->findLineEdit->setFocus(); ui->findLineEdit->selectAll(); emit findFrameVisibilityChanged(true); } else { hideFindFrame(); } } sqlitebrowser-3.11.2/src/SqlExecutionArea.h000066400000000000000000000026561345112435200206700ustar00rootroot00000000000000#ifndef SQLEXECUTIONAREA_H #define SQLEXECUTIONAREA_H #include class SqlTextEdit; class SqliteTableModel; class DBBrowserDB; class ExtendedTableWidget; namespace Ui { class SqlExecutionArea; } class SqlExecutionArea : public QWidget { Q_OBJECT public: explicit SqlExecutionArea(DBBrowserDB& _db, QWidget* parent = nullptr); ~SqlExecutionArea(); QString getSql() const; QString getSelectedSql() const; QString fileName() const { return sqlFileName; } void setFileName(const QString& filename) { sqlFileName = filename; } SqliteTableModel* getModel() { return model; } SqlTextEdit* getEditor(); ExtendedTableWidget *getTableResult(); public slots: virtual void finishExecution(const QString& result, const bool ok); virtual void saveAsCsv(); virtual void reloadSettings(); void fetchedData(); void setFindFrameVisibility(bool show); private slots: void findPrevious(); void findNext(); void findLineEdit_textChanged(const QString& text); void hideFindFrame(); signals: void findFrameVisibilityChanged(bool visible); private: void find(QString expr, bool forward); DBBrowserDB& db; SqliteTableModel* model; QString sqlFileName; Ui::SqlExecutionArea* ui; bool m_columnsResized; // This is set to true if the columns of the table view were already adjusted to fit their contents bool showErrorIndicators; }; #endif sqlitebrowser-3.11.2/src/SqlExecutionArea.ui000066400000000000000000000230011345112435200210410ustar00rootroot00000000000000 SqlExecutionArea 0 0 579 482 Form Qt::Vertical false 0 16777215 31 QFrame::StyledPanel QFrame::Raised 1 1 1 1 3 Find previous match [Shift+F3] Find previous match with mapping :/icons/up:/icons/up Shift+F3 Qt::Horizontal The found pattern must be a whole word Whole Words Qt::DefaultContextMenu Text pattern to find considering the checks in this frame Find in editor true The found pattern must match in letter case Case Sensitive Find next match [Enter, F3] Find next match with wrapping :/icons/down:/icons/down F3 Interpret search pattern as a regular expression <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Regular Expression Qt::Horizontal 40 20 Close Find Bar Close Find Bar :/icons/close:/icons/close true Qt::Vertical false QAbstractItemView::NoEditTriggers 0 120 Monospace 8 false <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> This field shows the results and status codes of the last executed statements. QFrame::StyledPanel QFrame::Sunken true false true Results of the last executed statements SqlTextEdit QTextEdit
sqltextedit.h
1
ExtendedTableWidget QTableWidget
ExtendedTableWidget.h
foreignKeyClicked(QString,QString,QByteArray) foreignKeyClicked(sqlb::ObjectIdentifier,QString,QByteArray)
editEditor findLineEdit tableResult editErrors previousToolButton nextToolButton caseCheckBox wholeWordsCheckBox saveAsCsv() saveAsView()
sqlitebrowser-3.11.2/src/SqlUiLexer.cpp000066400000000000000000000437201345112435200200410ustar00rootroot00000000000000#include #include "SqlUiLexer.h" #include "Qsci/qsciapis.h" #include "Settings.h" #include "sqlitetypes.h" SqlUiLexer::SqlUiLexer(QObject* parent) : QsciLexerSQL(parent) { // Setup auto completion autocompleteApi = new QsciAPIs(this); setupAutoCompletion(); autocompleteApi->prepare(); // Setup folding setFoldComments(true); setFoldCompact(false); } void SqlUiLexer::setupAutoCompletion() { // Set keywords QStringList keywordPatterns; keywordPatterns // Keywords << "ABORT" << "ACTION" << "ADD" << "AFTER" << "ALL" << "ALTER" << "ANALYZE" << "AND" << "AS" << "ASC" << "ATTACH" << "AUTOINCREMENT" << "BEFORE" << "BEGIN" << "BETWEEN" << "BY" << "CASCADE" << "CASE" << "CAST" << "CHECK" << "COLLATE" << "COLUMN" << "COMMIT" << "CONFLICT" << "CONSTRAINT" << "CREATE" << "CROSS" << "CURRENT_DATE" << "CURRENT_TIME" << "CURRENT_TIMESTAMP" << "DATABASE" << "DEFAULT" << "DEFERRABLE" << "DEFERRED" << "DELETE" << "DESC" << "DETACH" << "DISTINCT" << "DROP" << "EACH" << "ELSE" << "END" << "ESCAPE" << "EXCEPT" << "EXCLUSIVE" << "EXISTS" << "EXPLAIN" << "FAIL" << "FILTER" << "FOLLOWING" << "FOR" << "FOREIGN" << "FROM" << "FULL" << "GLOB" << "GROUP" << "HAVING" << "IF" << "IGNORE" << "IMMEDIATE" << "IN" << "INDEX" << "INDEXED" << "INITIALLY" << "INNER" << "INSERT" << "INSTEAD" << "INTERSECT" << "INTO" << "IS" << "ISNULL" << "JOIN" << "KEY" << "LEFT" << "LIKE" << "LIMIT" << "MATCH" << "NATURAL" << "NO" << "NOT" << "NOTNULL" << "NULL" << "OF" << "OFFSET" << "ON" << "OR" << "ORDER" << "OUTER" << "OVER" << "PARTITION" << "PLAN" << "PRAGMA" << "PRECEDING" << "PRIMARY" << "QUERY" << "RAISE" << "RANGE" << "RECURSIVE" << "REFERENCES" << "REGEXP" << "REINDEX" << "RELEASE" << "RENAME" << "REPLACE" << "RESTRICT" << "RIGHT" << "ROLLBACK" << "ROWID" << "ROWS" << "SAVEPOINT" << "SELECT" << "SET" << "TABLE" << "TEMP" << "TEMPORARY" << "THEN" << "TO" << "TRANSACTION" << "TRIGGER" << "UNBOUNDED" << "UNION" << "UNIQUE" << "UPDATE" << "USING" << "VACUUM" << "VALUES" << "VIEW" << "VIRTUAL" << "WHEN" << "WHERE" << "WITH" << "WITHOUT" // Data types << "INT" << "INTEGER" << "REAL" << "TEXT" << "BLOB" << "NUMERIC" << "CHAR"; bool upperKeywords = Settings::getValue("editor", "upper_keywords").toBool(); for(const QString& keyword : keywordPatterns) { if (upperKeywords) autocompleteApi->add(keyword + "?" + QString::number(ApiCompleterIconIdKeyword)); else autocompleteApi->add(keyword.toLower() + "?" + QString::number(ApiCompleterIconIdKeyword)); } // Functions QStringList functionPatterns; functionPatterns // Core functions << "abs" + tr("(X) The abs(X) function returns the absolute value of the numeric argument X.") << "changes" + tr("() The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement.") << "char" + tr("(X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. ") << "coalesce" + tr("(X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL") << "glob" + tr("(X,Y) The glob(X,Y) function is equivalent to the expression \"Y GLOB X\".") << "ifnull" + tr("(X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL.") << "instr" + tr("(X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X.") << "hex" + tr("(X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob.") << "last_insert_rowid" + tr("() The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function.") << "length" + tr("(X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character.") << "like" + tr("(X,Y) The like() function is used to implement the \"Y LIKE X\" expression.") << "like" + tr("(X,Y,Z) The like() function is used to implement the \"Y LIKE X ESCAPE Z\" expression.") << "load_extension" + tr("(X) The load_extension(X) function loads SQLite extensions out of the shared library file named X.\nUse of this function must be authorized from Preferences.") << "load_extension" + tr("(X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y.\nUse of this function must be authorized from Preferences.") << "lower" + tr("(X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case.") << "ltrim" + tr("(X) ltrim(X) removes spaces from the left side of X.") << "ltrim" + tr("(X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X.") << "max" + tr("(X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL.") << "min" + tr("(X,Y,...) The multi-argument min() function returns the argument with the minimum value.") << "nullif" + tr("(X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same.") << "printf" + tr("(FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library.") << "quote" + tr("(X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement.") << "random" + tr("() The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807.") << "randomblob" + tr("(N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes.") << "replace" + tr("(X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X.") << "round" + tr("(X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point.") << "round" + tr("(X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point.") << "rtrim" + tr("(X) rtrim(X) removes spaces from the right side of X.") << "rtrim" + tr("(X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X.") << "soundex" + tr("(X) The soundex(X) function returns a string that is the soundex encoding of the string X.") << "substr" + tr("(X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th.") << "substr" + tr("(X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long.") << "total_changes" + tr("() The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened.") << "trim" + tr("(X) trim(X) removes spaces from both ends of X.") << "trim" + tr("(X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X.") << "typeof" + tr("(X) The typeof(X) function returns a string that indicates the datatype of the expression X.") << "unicode" + tr("(X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X.") << "upper" + tr("(X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent.") << "zeroblob" + tr("(N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00.") // Date and time functions << "date" + tr("(timestring,modifier,modifier,...)") << "time" + tr("(timestring,modifier,modifier,...)") << "datetime" + tr("(timestring,modifier,modifier,...)") << "julianday" + tr("(timestring,modifier,modifier,...)") << "strftime" + tr("(format,timestring,modifier,modifier,...)") // Aggregate functions << "avg" + tr("(X) The avg() function returns the average value of all non-NULL X within a group.") << "count" + tr("(X) The count(X) function returns a count of the number of times that X is not NULL in a group.") << "group_concat" + tr("(X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X.") << "group_concat" + tr("(X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X.") << "max" + tr("(X) The max() aggregate function returns the maximum value of all values in the group.") << "min" + tr("(X) The min() aggregate function returns the minimum non-NULL value of all values in the group.") << "sum" + tr("(X) The sum() and total() aggregate functions return sum of all non-NULL values in the group.") << "total" + tr("(X) The sum() and total() aggregate functions return sum of all non-NULL values in the group.") // Window functions << "row_number" + tr("() The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise.") << "rank" + tr("() The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1.") << "dense_rank" + tr("() The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. ") << "percent_rank" + tr("() Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. ") << "cume_dist" + tr("() The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition.") << "ntile" + tr("(N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of.") << "lag" + tr("(expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL.") << "lag" + tr("(expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned.") << "lag" + tr("(expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist.") << "lead" + tr("(expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL.") << "lead" + tr("(expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned.") << "lead" + tr("(expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist.") << "first_value" + tr("(expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row.") << "last_value" + tr("(expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row.") << "nth_value" + tr("(expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned.") ; listFunctions.clear(); for(const QString& keyword : functionPatterns) { QString fn = keyword.left(keyword.indexOf('(')); QString descr = keyword.mid(keyword.indexOf('(')); autocompleteApi->add(fn + "?" + QString::number(ApiCompleterIconIdFunction) + descr); autocompleteApi->add(fn.toUpper() + "?" + QString::number(ApiCompleterIconIdFunction) + descr); // Store all function names in order to highlight them in a different colour listFunctions.append(fn); } } void SqlUiLexer::setTableNames(const QualifiedTablesMap& tables) { // Update list for auto completion autocompleteApi->clear(); listTables.clear(); setupAutoCompletion(); for(auto itSchemas=tables.constBegin();itSchemas!=tables.constEnd();++itSchemas) { for(auto itTables=itSchemas.value().constBegin();itTables!=itSchemas.value().constEnd();++itTables) { // Completion for schema.table autocompleteApi->add(itSchemas.key() + "?" + QString::number(SqlUiLexer::ApiCompleterIconIdSchema) + "." + itTables.key() + "?" + QString::number(SqlUiLexer::ApiCompleterIconIdTable)); for(const QString& field : itTables.value()) { // Completion for table.field autocompleteApi->add(itTables.key() + "?" + QString::number(SqlUiLexer::ApiCompleterIconIdTable) + "." + field + "?" + QString::number(SqlUiLexer::ApiCompleterIconIdColumn)); // Completion for isolated field autocompleteApi->add(field + "?" + QString::number(SqlUiLexer::ApiCompleterIconIdColumn)); } // Store the table name list in order to highlight them in a different colour listTables.append(itTables.key()); } } autocompleteApi->prepare(); } const char* SqlUiLexer::keywords(int set) const { // Function and table names are generated automatically but need to be returned to the calling functions. // In order to not have them deleted after this function ends they are stored as static variables. Because // the functions list doesn't change after the first call it's initialised here whereas the tables list, which // can change, is updated for each call static std::string functions = listFunctions.join(" ").toUtf8().constData(); static std::string tables; if(set == 6) // This corresponds to the QsciLexerSQL::KeywordSet6 style in SqlTextEdit { tables = listTables.join(" ").toLower().toUtf8().constData(); return tables.c_str(); } else if(set == 7) { // This corresponds to the QsciLexerSQL::KeywordSet7 style in SqlTextEdit return functions.c_str(); } else { // For all other keyword sets simply call the parent implementation return QsciLexerSQL::keywords(set); } } QStringList SqlUiLexer::autoCompletionWordSeparators() const { // The only word separator for auto completion in SQL is "." as in "tablename.columnname". // Because this isn't implemented in the default QScintilla SQL lexer for some reason we add it here. // We also need to consider quoted identifiers as in "tablename"."columnname" with whatever quote character // is configured. QStringList wl; QString escapeSeparator = sqlb::escapeIdentifier("."); // Case for non symetric quotes, e.g. "[.]" to "].[" std::reverse(escapeSeparator.begin(), escapeSeparator.end()); wl << "." << escapeSeparator; return wl; } bool SqlUiLexer::caseSensitive() const { return false; } sqlitebrowser-3.11.2/src/SqlUiLexer.h000066400000000000000000000016351345112435200175050ustar00rootroot00000000000000#ifndef SQLUILEXER_H #define SQLUILEXER_H #include "Qsci/qscilexersql.h" #include class QsciAPIs; class SqlUiLexer : public QsciLexerSQL { Q_OBJECT public: explicit SqlUiLexer(QObject *parent = nullptr); enum ApiCompleterIconId { ApiCompleterIconIdKeyword = 1, ApiCompleterIconIdFunction, ApiCompleterIconIdTable, ApiCompleterIconIdColumn, ApiCompleterIconIdSchema, }; typedef QMap > TablesAndColumnsMap; typedef QMap QualifiedTablesMap; void setTableNames(const QualifiedTablesMap& tables); virtual const char* keywords(int set) const; virtual QStringList autoCompletionWordSeparators() const; bool caseSensitive() const; private: QsciAPIs* autocompleteApi; void setupAutoCompletion(); QStringList listTables; QStringList listFunctions; }; #endif sqlitebrowser-3.11.2/src/VacuumDialog.cpp000066400000000000000000000030421345112435200203550ustar00rootroot00000000000000#include "VacuumDialog.h" #include "ui_VacuumDialog.h" #include "sqlitedb.h" #include VacuumDialog::VacuumDialog(DBBrowserDB* _db, QWidget* parent) : QDialog(parent), ui(new Ui::VacuumDialog), db(_db) { // Create UI ui->setupUi(this); // Show warning if DB is dirty ui->labelSavepointWarning->setVisible(db->getDirty()); // Populate list of objects to compact. We just support vacuuming the main schema here. for(auto it=db->schemata.constBegin();it!=db->schemata.constEnd();++it) { QTreeWidgetItem* item = new QTreeWidgetItem(ui->treeDatabases); item->setText(0, it.key()); item->setIcon(0, QIcon(QString(":icons/database"))); ui->treeDatabases->addTopLevelItem(item); } // Select the first item which should always be the main schema ui->treeDatabases->setCurrentItem(ui->treeDatabases->topLevelItem(0)); } VacuumDialog::~VacuumDialog() { delete ui; } void VacuumDialog::accept() { if(ui->treeDatabases->selectedItems().count() == 0) return QDialog::reject(); QApplication::setOverrideCursor(Qt::WaitCursor); // Commit all changes first db->releaseAllSavepoints(); // Loop through all selected databases and vacuum them individually QList selection = ui->treeDatabases->selectedItems(); for(const QTreeWidgetItem* item : selection) db->executeSQL(QString("VACUUM %1;").arg(sqlb::escapeIdentifier(item->text(0))), false); QApplication::restoreOverrideCursor(); QDialog::accept(); } sqlitebrowser-3.11.2/src/VacuumDialog.h000066400000000000000000000006071345112435200200260ustar00rootroot00000000000000#ifndef VACUUMDIALOG_H #define VACUUMDIALOG_H #include namespace Ui { class VacuumDialog; } class DBBrowserDB; class VacuumDialog : public QDialog { Q_OBJECT public: explicit VacuumDialog(DBBrowserDB* _db, QWidget* parent = nullptr); ~VacuumDialog(); private: Ui::VacuumDialog* ui; DBBrowserDB* db; protected slots: virtual void accept(); }; #endif sqlitebrowser-3.11.2/src/VacuumDialog.ui000066400000000000000000000061001345112435200202060ustar00rootroot00000000000000 VacuumDialog 0 0 475 439 Compact Database 75 true Warning: Compacting the database will commit all of your changes. true 5 Please select the databases to co&mpact: treeDatabases QAbstractItemView::NoEditTriggers false QAbstractItemView::ExtendedSelection false false false false 1 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok treeDatabases buttonBox buttonBox accepted() VacuumDialog accept() 222 374 157 274 buttonBox rejected() VacuumDialog reject() 290 380 286 274 sqlitebrowser-3.11.2/src/app.plist000066400000000000000000000041061345112435200171300ustar00rootroot00000000000000 CFBundleDevelopmentRegion English CFBundleDocumentTypes CFBundleTypeExtensions db db3 sqlite sqlite3 CFBundleTypeName Database Document CFBundleTypeOSTypes **** CFBundleTypeRole Editor CFBundleTypeExtensions sqbpro CFBundleTypeName DB Browser for SQLite Project CFBundleTypeOSTypes **** CFBundleTypeRole Editor CFBundleTypeExtensions * CFBundleTypeName Other Document Type CFBundleTypeOSTypes **** CFBundleTypeRole Editor CFBundleExecutable @EXECUTABLE@ CFBundleGetInfoString 3.11.2 CFBundleIconFile @ICON@ CFBundleIdentifier net.sourceforge.sqlitebrowser CFBundleInfoDictionaryVersion 6.0 CFBundleName DB Browser for SQLite CFBundlePackageType APPL CFBundleShortVersionString 3.11.2 CFBundleSignature SqLB CFBundleVersion 3.11.2 NSPrincipalClass NSApplication NSHighResolutionCapable NSRequiresAquaSystemAppearance sqlitebrowser-3.11.2/src/certs/000077500000000000000000000000001345112435200164125ustar00rootroot00000000000000sqlitebrowser-3.11.2/src/certs/CaCerts.qrc000066400000000000000000000001541345112435200204450ustar00rootroot00000000000000 ca-chain-development.crt sqlitebrowser-3.11.2/src/certs/ca-chain-development.crt000066400000000000000000000102101345112435200231010ustar00rootroot00000000000000-----BEGIN CERTIFICATE----- MIIF7DCCA9SgAwIBAgIJAKtqE1Cz9EmfMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYD VQQGEwJHQjEQMA4GA1UECAwHRW5nbGFuZDERMA8GA1UECgwIREJIdWIuaW8xJzAl BgNVBAsMHkRCSHViLmlvIENlcnRpZmljYXRlIEF1dGhvcml0eTElMCMGA1UEAwwc REJIdWIuaW8gREVWRUxPUE1FTlQgUm9vdCBDQTAeFw0xNzAzMDQxMDE1MzBaFw0z NzAzMDQxMDE1MzBaMIGCMQswCQYDVQQGEwJHQjEQMA4GA1UECAwHRW5nbGFuZDER MA8GA1UECgwIREJIdWIuaW8xJzAlBgNVBAsMHkRCSHViLmlvIENlcnRpZmljYXRl IEF1dGhvcml0eTElMCMGA1UEAwwcREJIdWIuaW8gREVWRUxPUE1FTlQgUm9vdCBD QTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMlg1CFBIRwv87u2A8Gl IqIJgGBlEIF9EREF6UyIylHuvwEV7efOUwwaAoF2N1V4w7MlHPeW7o7eKMt0LFI/ fDBRb6xz3bxnR8Mxr9p4zn77qocDU/AJDAk/ZMMRi4urIQg6tFBp1gsbSaWgsVFm wgewTyXSUu51PAgRtXPhiiMKwabjOjxZJGZY7vCP1vl6bL5Dp9pvoShSD/BcCB1a b2FiPBSTfl45Ovs+oW7enKOik/jKXqqGMtDCyjLl71wObTyn3Sv8uKuuMc0bY7ui 747sNmUWQFwP27BsXtHY27Q1dgC7oR1o3uyE9nLlOHrycLoVz/WuS5+UwbVlH+9x ixxuW8fhAHXO1hUG8ZNsUVqiBKaVryMsWgM76kCiRRHbwLXsSKu/zwo+HcHhnqku tq/+ibV9R0u1reSZ46rVhmLCuD1BWO5OEQRujlpGBAQPu0ajm7Ym+vG3MHTOeI3p LqAM+0QnLKhDDC6kwVpFmZkcvTsKBtIFRw26H6pGXmapzxrcuAzM6MKIQGiJaduf Vn8RvrTzSxGqWHb10DLAosfV2dBAT7qUpGw9yAtpjpKudjuZ6WDcAGUrPwozxfqo cWjamTMML8r2Lsm/DBtmMHcpxqLw17FzWSzkP8HVvLMJYkkkO6uixdUMnSTm5H7V VzZZSpbtRtcrVMFR9sqB+y41AgMBAAGjYzBhMB0GA1UdDgQWBBSHZI71PcSJIxOh 4sspAvBhGwivJTAfBgNVHSMEGDAWgBSHZI71PcSJIxOh4sspAvBhGwivJTAPBgNV HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEA Uxjm+WdsvoQwZFQfcYAJDB4hLKe2257jBcfRJdC8kuU2hlNKLwJIoepd5ByMtFMz pYkcHvOVYPiYXBT+b6ReluvnNun3bELWa+XvhYdDIkgEqYnnIhnVKKjONOQOo1mh pvuA5iW7G9zxYHrdu3WFCPTIQU/YdRnN1X9uqS8AdPWIsuOqHl6+mivjSAgLDq1J 5mYatCKRIC1OxZDPqXRgyd0LwD9sU0ImBb/icLDa0bAWt/gXid75rZV08zOOzd8f 4CmDO679o7D0S4opf3JSpyjWg5ALncmygcX83Uk6AaNvlEKvwKTp5vCNsiHml7IO KuPXRqJJxAFErpjbaboon+WX3zpOh0w4DRS6UB7mmWeZ8/rbSG5KyHUvCy6gAEoW i1EKfrt0T+7xx2jERdSTX0Vy3+G5CrS74MRgdDz+QYFVevY1zGc34U/+3l32VtMZ x7I5jLXb+LiZ5JQrzfPf62xO9jJogczt9DuHQ4BOAtqAFTzZvMRnyCgxD49IfsZ6 YZ/CNNlqdoPJkXmR/BHiUk/k6ZC3vYa/Am3tniQp7RxeV6s4hTB8XS6CN2Aq8cnS a5dtZbFSXNMB4QfBKGDg/gUwxU3j6VyoQJnmKt2QVgQqG6Sz1Px+YfmQXOMoGiFM IhGSBh8DEnh/aNtGXBF3OaYjAfSg9zfq9ATUmSzjzxY= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIF8DCCA9igAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAkdC MRAwDgYDVQQIDAdFbmdsYW5kMREwDwYDVQQKDAhEQkh1Yi5pbzEnMCUGA1UECwwe REJIdWIuaW8gQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSUwIwYDVQQDDBxEQkh1Yi5p byBERVZFTE9QTUVOVCBSb290IENBMB4XDTE3MDMwNDEwNTI0NloXDTI3MDMwNTEw NTI0NlowgYoxCzAJBgNVBAYTAkdCMRAwDgYDVQQIDAdFbmdsYW5kMREwDwYDVQQK DAhEQkh1Yi5pbzEnMCUGA1UECwweREJIdWIuaW8gQ2VydGlmaWNhdGUgQXV0aG9y aXR5MS0wKwYDVQQDDCREQkh1Yi5pbyBERVZFTE9QTUVOVCBJbnRlcm1lZGlhdGUg Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKOkhcRjOBkxQdzDie S6dfXIiQ9Qk2iCqfBVGPCFMjNrzUywjLvi0ZVbo7CaR4gveaXwcH94C8sxaqmm+7 SB3FimcgRfq1fwPS78wKyeAtb37TGu+Xwu/+4l320BwdmaCLx10kjT2pOf29t7MH qBLF3p4+7Jza5IPL3Ddq4O8iyUEvd3QfHZ2RgzY1M2APezG51DLRUHX7s5d8Bbe8 HcHmsrWCbJpbPzGCj2C4UiaT5ZCMPLFW+pbUnnZemVriDHekPBSNgo8AdSnnUypm YgdidlUFdZ8LAMqJYouY6On32+huXWK8QXnWz/TuGnP2mV4KgVPIkM89gymLakAL x8UX44csekodLsq4xmHnBZq9eDddjRKK/A6iG95GqYW4g3QbnjU56UCe4NlzRRj1 jATjLvJ3KHG45YyW8qjlr3vvVDNLiYPUs3ZDo4N8qChYFKbGKUljay6JpHjek16g 6Lmy6+8NUopKh+Q7vIH2LLpgh5xNlCRvHHOpE7TR2XtmCOvp2FHCSUqym+inOuvN CoSwVpooi5y4yvnVmSa9gxAp5AoptGzo/ucEsRvvf7giu7JnWIImYv1xvFOnqN2G GxRpXujAvrgpH79zdaj3VNUNebUw9PLeEksj4SuoAt3CxPrPnv+QecMXzRjLCgS4 PAygRceqJfsUl/dRhZTpoZr5ywIDAQABo2YwZDAdBgNVHQ4EFgQUzl/NZNsCDfwl RFDAZBt/2KfiH+UwHwYDVR0jBBgwFoAUh2SO9T3EiSMToeLLKQLwYRsIryUwEgYD VR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD ggIBABKx6uDYuvYPrJtfyNpW63ELWukVVNMHojipg4M2dlV+phgooRGqJwE1Nx8s dQ3lDIIpIqi7eVfkm2SSYsMN3AUHhLnX9VeyWe4ffKs2mHCaQ6nIk+niE01zZC4z bGHNZwJNkgKa8s2E+iK1Z/QB1QicS9PiQoJHHkLbnS7v0YqowdXgMniU1yqIjmf7 aWhK0Gt51iXFgVcz0lXHsJkdgl85JW6nN/EB1rtZ+tWDgfBpPL8JObVmr1qMUsNe nWaAf91DA+3DDWVCCMdtgvTIRc7srjYl7rpBW36Ztijm8fTvEWdB6zVT4BUl4lh9 mECVV/Gx39oMyCMLq6X0jQ49tAuTjlCYRtQ1vRhKpfO+hJma01WBKPSrtJ3Yiiyk DFyi3Rs0w8GDN5FXRTfachExt5A1DAsUnxFz3JkdEJnmEgzzipa+FDAOC1JZvgxP I0GCJaQT60YuSyUsM+IPuedy2izRUImFLWXocn9y0Kbsqn7GY8pUYn4cXO7s2X/2 PsOQyFHLmAiTrhTISO/58NUzLsudMY9d1V5ymVHXYBDwgRMMVoTQqniU3ArCIRWZ XgqjSf6psZaXS4/9wf4y6c+/WgkfAMbCGGj7mKLu2a9Lo5zfdCB73ZhEATJbMFwk KTYOLQO4zJEK2h+hmyqMaKv7EDB0BjLmbnFCcuvWL27aB5FL -----END CERTIFICATE----- sqlitebrowser-3.11.2/src/csvparser.cpp000066400000000000000000000252311345112435200200110ustar00rootroot00000000000000#include "csvparser.h" #include CSVParser::CSVParser(bool trimfields, char fieldseparator, char quotechar) : m_bTrimFields(trimfields) , m_cFieldSeparator(fieldseparator) , m_cQuoteChar(quotechar) , m_pCSVProgress(nullptr) , m_nBufferSize(4096) { } CSVParser::~CSVParser() { delete m_pCSVProgress; } namespace { // This function adds a character to an existing field structure. If necessary, it extends the buffer size. inline void addChar(CSVField* field, char c) { // Increase buffer size if it is too small if(field->buffer_length >= field->buffer_max_length) { field->buffer_max_length += 64; field->buffer = static_cast(realloc(field->buffer, field->buffer_max_length)); } // Add char to the end of the buffer and increase length by one field->buffer[field->buffer_length++] = c; } // This function increases the size of the field list of an existing row. However, it only does so if the field list is currently full. inline void increaseRowSize(CSVRow& r) { // Check if field list is full if(r.num_fields >= r.max_num_fields) { // Increase field list size r.max_num_fields += 5; r.fields = static_cast(realloc(r.fields, r.max_num_fields*sizeof(CSVField))); // Initialise the newly created field structures for(size_t i=r.num_fields;idata = field->buffer; field->data_length = field->buffer_length; // If we have to trim the field, do this by manipulating the data start and data length variables if(trim) { // Check for trailing spaces and omit them while(field->data_length && isspace(*field->data)) { field->data++; field->data_length--; } // Check for pending spaces and omit them while(field->data_length && isspace(field->data[field->data_length-1])) field->data_length--; } // We assume here that the field object has been constructed in-place. So all we need to do for adding it to the row structure // is increasing the field count by one to make sure the newly constructed field object is used. r.num_fields++; // Clear field buffer for next use field->buffer_length = 0; // Increase field list size if it is too small increaseRowSize(r); // Return pointer to the next field return &r.fields[r.num_fields]; } // This function takes a parsed CSV row and hands it back to the caller of the CSV parser. It returns a null pointer if the parsing should be // aborted, otherwise it returns a pointer to a new field object that can be used for storing the contents of the first field of the next row. inline CSVField* addRow(CSVParser::csvRowFunction& f, CSVRow& r, size_t& rowCount) { // Call row function if(!f(rowCount, r)) return nullptr; // Reset the field list by setting the field count to 0. No need to deconstruct anything else. r.num_fields = 0; // Increase row count by one, as we're now starting to parse the next row rowCount++; // Return a pointer to the first field in the row object because we're starting with the first field of the next row now return r.fields; } } CSVParser::ParserResult CSVParser::parse(csvRowFunction insertFunction, QTextStream& stream, size_t nMaxRecords) { ParseStates state = StateNormal; // State of the parser QByteArray sBuffer; // Buffer for reading the file CSVRow record; // Buffer for parsing the current row size_t parsedRows = 0; // Number of rows parsed so far CSVField* field; // Buffer for parsing the current field if(m_pCSVProgress) m_pCSVProgress->start(); // Initialise row buffer and get pointer to the first field record = { nullptr, 0, 0 }; increaseRowSize(record); field = record.fields; // Make sure all buffers are freed when we're done here class FieldBufferDealloc { public: explicit FieldBufferDealloc(CSVRow& row) : m_row(row) {} ~FieldBufferDealloc() { for(size_t i=0;i 0 && parsedRows >= nMaxRecords) return ParserResult::ParserResultSuccess; } if(m_pCSVProgress && parsedRows % 100 == 0) { if(!m_pCSVProgress->update(bufferPos)) return ParserResult::ParserResultCancelled; } } if(record.num_fields) { addColumn(record, field, m_bTrimFields); if(!(field = addRow(insertFunction, record, parsedRows))) return ParserResult::ParserResultError; } if(m_pCSVProgress) m_pCSVProgress->end(); return (state == StateNormal) ? ParserResult::ParserResultSuccess : ParserResult::ParserResultError; } sqlitebrowser-3.11.2/src/csvparser.h000066400000000000000000000055461345112435200174650ustar00rootroot00000000000000#ifndef CSVPARSER_H #define CSVPARSER_H #include #include #include class QTextStream; /*! * \brief The CSVProgress class * * This is an abstract class, an implementation of which you can pass to the CSVParser to get progress updates. */ class CSVProgress { public: virtual ~CSVProgress() { } virtual void start() = 0; virtual bool update(unsigned long long pos) = 0; virtual void end() = 0; }; /* * This structure represents one parsed column in a CSV row */ struct CSVField { // These variables are used internally by the parser. Usually there should be no need to access them from outside the parser char* buffer; // Start of the field buffer uint64_t buffer_length; // Current length of the buffer content. The content is NOT null-terminated uint64_t buffer_max_length; // Size of the entire buffer // These variables point to the parsed contents of the field and can be directly passed to SQLite functions char* data; // Pointer to the start of the field contents uint64_t data_length; // Length of the field contents }; /* * This structure holds all columns of a single parsed CSV row */ struct CSVRow { CSVField* fields; // Pointer to the field list/the first element in the list size_t num_fields; // Number of fields in the row size_t max_num_fields; // Size of the field list. Used internally by the parser only }; class CSVParser { public: typedef std::function csvRowFunction; CSVParser(bool trimfields = true, char fieldseparator = ',', char quotechar = '"'); ~CSVParser(); enum ParserResult { ParserResultSuccess, ParserResultCancelled, ParserResultError }; /*! * \brief parse the given stream * @param insertFunction A function pointer that is called for each parsed row. It is passed two parameters, the row number and a list of all parsed columns * in the row. The called function may return false if an error ocurred to stop the import process. Otherwise it should return true. * \param stream Stream with the CSV parser * \param nMaxRecords Max records too read, 0 if unlimited * \return ParserResult value that indicated whether action finished normally, was cancelled or errored. */ ParserResult parse(csvRowFunction insertFunction, QTextStream& stream, size_t nMaxRecords = 0); void setCSVProgress(CSVProgress* csvp) { m_pCSVProgress = csvp; } private: enum ParseStates { StateNormal, StateInQuote, StateEndQuote }; private: bool m_bTrimFields; char m_cFieldSeparator; char m_cQuoteChar; CSVProgress* m_pCSVProgress; unsigned long m_nBufferSize; //! internal buffer read size }; #endif sqlitebrowser-3.11.2/src/docktextedit.cpp000066400000000000000000000067711345112435200205040ustar00rootroot00000000000000#include "docktextedit.h" #include "Settings.h" QsciLexerJSON* DockTextEdit::jsonLexer = nullptr; QsciLexerXML* DockTextEdit::xmlLexer = nullptr; DockTextEdit::DockTextEdit(QWidget* parent) : ExtendedScintilla(parent) { // Create lexer objects if not done yet if(jsonLexer == nullptr) jsonLexer = new QsciLexerJSON(this); if(xmlLexer == nullptr) xmlLexer = new QsciLexerXML(this); // Set the JSON lexer as default setLexer(jsonLexer); jsonLexer->setFoldCompact(false); jsonLexer->setHighlightComments(true); // Do rest of initialisation reloadSettings(); } DockTextEdit::~DockTextEdit() { } void DockTextEdit::reloadSettings() { // Set the parent settings for both lexers reloadLexerSettings(jsonLexer); reloadLexerSettings(xmlLexer); setupSyntaxHighlightingFormat(jsonLexer, "comment", QsciLexerJSON::CommentLine); setupSyntaxHighlightingFormat(jsonLexer, "comment", QsciLexerJSON::CommentBlock); setupSyntaxHighlightingFormat(jsonLexer, "keyword", QsciLexerJSON::Keyword); setupSyntaxHighlightingFormat(jsonLexer, "keyword", QsciLexerJSON::KeywordLD); setupSyntaxHighlightingFormat(jsonLexer, "function", QsciLexerJSON::Operator); setupSyntaxHighlightingFormat(jsonLexer, "string", QsciLexerJSON::String); setupSyntaxHighlightingFormat(jsonLexer, "table", QsciLexerJSON::Number); setupSyntaxHighlightingFormat(jsonLexer, "identifier", QsciLexerJSON::Property); // The default style for invalid JSON or unclosed strings uses red // background and white foreground, but the current line has // precedence, so it is by default white over gray. We change the // default to something more readable for the current line at // invalid JSON. QColor stringColor = QColor(Settings::getValue("syntaxhighlighter", "string_colour").toString()); jsonLexer->setColor(stringColor, QsciLexerJSON::Error); jsonLexer->setColor(stringColor, QsciLexerJSON::UnclosedString); QFont errorFont(Settings::getValue("editor", "font").toString()); errorFont.setPointSize(Settings::getValue("editor", "fontsize").toInt()); errorFont.setItalic(true); jsonLexer->setFont(errorFont, QsciLexerJSON::Error); jsonLexer->setFont(errorFont, QsciLexerJSON::UnclosedString); jsonLexer->setPaper(jsonLexer->defaultPaper(QsciLexerJSON::String), QsciLexerJSON::Error); jsonLexer->setPaper(jsonLexer->defaultPaper(QsciLexerJSON::String), QsciLexerJSON::UnclosedString); xmlLexer->setColor(QColor(Settings::getValue("syntaxhighlighter", "foreground_colour").toString())); setupSyntaxHighlightingFormat(xmlLexer, "comment", QsciLexerHTML::HTMLComment); setupSyntaxHighlightingFormat(xmlLexer, "keyword", QsciLexerHTML::Tag); setupSyntaxHighlightingFormat(xmlLexer, "keyword", QsciLexerHTML::XMLTagEnd); setupSyntaxHighlightingFormat(xmlLexer, "keyword", QsciLexerHTML::XMLStart); setupSyntaxHighlightingFormat(xmlLexer, "keyword", QsciLexerHTML::XMLEnd); setupSyntaxHighlightingFormat(xmlLexer, "string", QsciLexerHTML::HTMLDoubleQuotedString); setupSyntaxHighlightingFormat(xmlLexer, "string", QsciLexerHTML::HTMLSingleQuotedString); setupSyntaxHighlightingFormat(xmlLexer, "table", QsciLexerHTML::HTMLNumber); setupSyntaxHighlightingFormat(xmlLexer, "identifier", QsciLexerHTML::Attribute); } void DockTextEdit::setLanguage(Language lang) { m_language = lang; switch (lang) { case JSON: setLexer(jsonLexer); break; case XML: setLexer(xmlLexer); break; } } sqlitebrowser-3.11.2/src/docktextedit.h000066400000000000000000000013621345112435200201400ustar00rootroot00000000000000#ifndef DOCKTEXTEDIT_H #define DOCKTEXTEDIT_H #include "ExtendedScintilla.h" #include #include /** * @brief The DockTextEdit class * This class is based on our Extended QScintilla widget */ class DockTextEdit : public ExtendedScintilla { Q_OBJECT public: explicit DockTextEdit(QWidget *parent = nullptr); virtual ~DockTextEdit(); // Enumeration of supported languages enum Language { JSON, XML }; void setLanguage(Language lang); Language language() { return m_language; }; public slots: void reloadSettings(); protected: static QsciLexerJSON* jsonLexer; static QsciLexerXML* xmlLexer; private: Language m_language; }; #endif sqlitebrowser-3.11.2/src/extensions/000077500000000000000000000000001345112435200174715ustar00rootroot00000000000000sqlitebrowser-3.11.2/src/extensions/extension-functions.c000066400000000000000000001457341345112435200236750ustar00rootroot00000000000000/* This library will provide common mathematical and string functions in SQL queries using the operating system libraries or provided definitions. It includes the following functions: Math: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi. String: replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim, replace, reverse, proper, padl, padr, padc, strfilter. Aggregate: stdev, variance, mode, median, lower_quartile, upper_quartile. The string functions ltrim, rtrim, trim, replace are included in recent versions of SQLite and so by default do not build. Compilation instructions: Compile this C source file into a dynamic library as follows: * Linux: gcc -fPIC -lm -shared extension-functions.c -o libsqlitefunctions.so * Mac OS X: gcc -fno-common -dynamiclib extension-functions.c -o libsqlitefunctions.dylib (You may need to add flags -I /opt/local/include/ -L/opt/local/lib -lsqlite3 if your sqlite3 is installed from Mac ports, or -I /sw/include/ -L/sw/lib -lsqlite3 if installed with Fink.) * Windows: 1. Install MinGW (http://www.mingw.org/) and you will get the gcc (gnu compiler collection) 2. add the path to your path variable (isn't done during the installation!) 3. compile: gcc -shared -I "path" -o libsqlitefunctions.so extension-functions.c (path = path of sqlite3ext.h; i.e. C:\programs\sqlite) Usage instructions for applications calling the sqlite3 API functions: In your application, call sqlite3_enable_load_extension(db,1) to allow loading external libraries. Then load the library libsqlitefunctions using sqlite3_load_extension; the third argument should be 0. See http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions. Select statements may now use these functions, as in SELECT cos(radians(inclination)) FROM satsum WHERE satnum = 25544; Usage instructions for the sqlite3 program: If the program is built so that loading extensions is permitted, the following will work: sqlite> SELECT load_extension('./libsqlitefunctions.so'); sqlite> select cos(radians(45)); 0.707106781186548 Note: Loading extensions is by default prohibited as a security measure; see "Security Considerations" in http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions. If the sqlite3 program and library are built this way, you cannot use these functions from the program, you must write your own program using the sqlite3 API, and call sqlite3_enable_load_extension as described above, or else rebuilt the sqlite3 program to allow loadable extensions. Alterations: The instructions are for Linux, Mac OS X, and Windows; users of other OSes may need to modify this procedure. In particular, if your math library lacks one or more of the needed trig or log functions, comment out the appropriate HAVE_ #define at the top of file. If you do not wish to make a loadable module, comment out the define for COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE. If you are using a version of SQLite without the trim functions and replace, comment out the HAVE_TRIM #define. Liam Healy History: 2010-01-06 Correct check for argc in squareFunc, and add Windows compilation instructions. 2009-06-24 Correct check for argc in properFunc. 2008-09-14 Add check that memory was actually allocated after sqlite3_malloc or sqlite3StrDup, call sqlite3_result_error_nomem if not. Thanks to Robert Simpson. 2008-06-13 Change to instructions to indicate use of the math library and that program might work. 2007-10-01 Minor clarification to instructions. 2007-09-29 Compilation as loadable module is optional with COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE. 2007-09-28 Use sqlite3_extension_init and macros SQLITE_EXTENSION_INIT1, SQLITE_EXTENSION_INIT2, so that it works with sqlite3_load_extension. Thanks to Eric Higashino and Joe Wilson. New instructions for Mac compilation. 2007-09-17 With help from Joe Wilson and Nuno Luca, made use of external interfaces so that compilation is no longer dependent on SQLite source code. Merged source, header, and README into a single file. Added casts so that Mac will compile without warnings (unsigned and signed char). 2007-09-05 Included some definitions from sqlite 3.3.13 so that this will continue to work in newer versions of sqlite. Completed description of functions available. 2007-03-27 Revised description. 2007-03-23 Small cleanup and a bug fix on the code. This was mainly letting errno flag errors encountered in the math library and checking the result, rather than pre-checking. This fixes a bug in power that would cause an error if any non-positive number was raised to any power. 2007-02-07 posted by Mikey C to sqlite mailing list. Original code 2006 June 05 by relicoder. */ //#include "config.h" #define COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE 1 #define HAVE_ACOSH 1 #define HAVE_ASINH 1 #define HAVE_ATANH 1 #define HAVE_SINH 1 #define HAVE_COSH 1 #define HAVE_TANH 1 #define HAVE_LOG10 1 #define HAVE_ISBLANK 1 #define SQLITE_SOUNDEX 1 #define HAVE_TRIM 1 /* LMH 2007-03-25 if sqlite has trim functions */ #ifdef COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE #include "sqlite3ext.h" SQLITE_EXTENSION_INIT1 #else #include "sqlite3.h" #endif #include /* relicoder */ #include #include #include #include /* LMH 2007-03-25 */ #include #include #ifndef _MAP_H_ #define _MAP_H_ #include /* ** Simple binary tree implementation to use in median, mode and quartile calculations ** Tree is not necessarily balanced. That would require something like red&black trees of AVL */ typedef int(*cmp_func)(const void *, const void *); typedef void(*map_iterator)(void*, int64_t, void*); typedef struct node{ struct node *l; struct node *r; void* data; int64_t count; } node; typedef struct map{ node *base; cmp_func cmp; short free; } map; /* ** creates a map given a comparison function */ map map_make(cmp_func cmp); /* ** inserts the element e into map m */ void map_insert(map *m, void *e); /* ** executes function iter over all elements in the map, in key increasing order */ void map_iterate(map *m, map_iterator iter, void* p); /* ** frees all memory used by a map */ void map_destroy(map *m); /* ** compares 2 integers ** to use with map_make */ int int_cmp(const void *a, const void *b); /* ** compares 2 doubles ** to use with map_make */ int double_cmp(const void *a, const void *b); #endif /* _MAP_H_ */ typedef uint8_t u8; typedef uint16_t u16; typedef int64_t i64; static char *sqlite3StrDup( const char *z ) { char *res = sqlite3_malloc( strlen(z)+1 ); return strcpy( res, z ); } /* ** These are copied verbatim from fun.c so as to not have the names exported */ /* LMH from sqlite3 3.3.13 */ /* ** This table maps from the first byte of a UTF-8 character to the number ** of trailing bytes expected. A value '4' indicates that the table key ** is not a legal first byte for a UTF-8 character. */ static const u8 xtra_utf8_bytes[256] = { /* 0xxxxxxx */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10wwwwww */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, /* 110yyyyy */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 1110zzzz */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 11110yyy */ 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, }; /* ** This table maps from the number of trailing bytes in a UTF-8 character ** to an integer constant that is effectively calculated for each character ** read by a naive implementation of a UTF-8 character reader. The code ** in the READ_UTF8 macro explains things best. */ static const int xtra_utf8_bits[] = { 0, 12416, /* (0xC0 << 6) + (0x80) */ 925824, /* (0xE0 << 12) + (0x80 << 6) + (0x80) */ 63447168 /* (0xF0 << 18) + (0x80 << 12) + (0x80 << 6) + 0x80 */ }; /* ** If a UTF-8 character contains N bytes extra bytes (N bytes follow ** the initial byte so that the total character length is N+1) then ** masking the character with utf8_mask[N] must produce a non-zero ** result. Otherwise, we have an (illegal) overlong encoding. */ static const int utf_mask[] = { 0x00000000, 0xffffff80, 0xfffff800, 0xffff0000, }; /* LMH salvaged from sqlite3 3.3.13 source code src/utf.c */ #define READ_UTF8(zIn, c) { \ int xtra; \ c = *(zIn)++; \ xtra = xtra_utf8_bytes[c]; \ switch( xtra ){ \ case 4: c = (int)0xFFFD; break; \ case 3: c = (c<<6) + *(zIn)++; \ case 2: c = (c<<6) + *(zIn)++; \ case 1: c = (c<<6) + *(zIn)++; \ c -= xtra_utf8_bits[xtra]; \ if( (utf_mask[xtra]&c)==0 \ || (c&0xFFFFF800)==0xD800 \ || (c&0xFFFFFFFE)==0xFFFE ){ c = 0xFFFD; } \ } \ } static int sqlite3ReadUtf8(const unsigned char *z){ int c; READ_UTF8(z, c); return c; } #define SKIP_UTF8(zIn) { \ zIn += (xtra_utf8_bytes[*(u8 *)zIn] + 1); \ } /* ** pZ is a UTF-8 encoded unicode string. If nByte is less than zero, ** return the number of unicode characters in pZ up to (but not including) ** the first 0x00 byte. If nByte is not less than zero, return the ** number of unicode characters in the first nByte of pZ (or up to ** the first 0x00, whichever comes first). */ static int sqlite3Utf8CharLen(const char *z, int nByte){ int r = 0; const char *zTerm; if( nByte>=0 ){ zTerm = &z[nByte]; }else{ zTerm = (const char *)(-1); } assert( z<=zTerm ); while( *z!=0 && z 0) ? 1: ( iVal < 0 ) ? -1: 0; sqlite3_result_int64(context, iVal); break; } case SQLITE_NULL: { sqlite3_result_null(context); break; } default: { /* 2nd change below. Line for abs was: if( rVal<0 ) rVal = rVal * -1.0; */ rVal = sqlite3_value_double(argv[0]); rVal = ( rVal > 0) ? 1: ( rVal < 0 ) ? -1: 0; sqlite3_result_double(context, rVal); break; } } } /* ** smallest integer value not less than argument */ static void ceilFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ double rVal=0.0; i64 iVal=0; assert( argc==1 ); switch( sqlite3_value_type(argv[0]) ){ case SQLITE_INTEGER: { i64 iVal = sqlite3_value_int64(argv[0]); sqlite3_result_int64(context, iVal); break; } case SQLITE_NULL: { sqlite3_result_null(context); break; } default: { rVal = sqlite3_value_double(argv[0]); sqlite3_result_int64(context, (i64) ceil(rVal)); break; } } } /* ** largest integer value not greater than argument */ static void floorFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ double rVal=0.0; i64 iVal=0; assert( argc==1 ); switch( sqlite3_value_type(argv[0]) ){ case SQLITE_INTEGER: { i64 iVal = sqlite3_value_int64(argv[0]); sqlite3_result_int64(context, iVal); break; } case SQLITE_NULL: { sqlite3_result_null(context); break; } default: { rVal = sqlite3_value_double(argv[0]); sqlite3_result_int64(context, (i64) floor(rVal)); break; } } } /* ** Given a string (s) in the first argument and an integer (n) in the second returns the ** string that constains s contatenated n times */ static void replicateFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ unsigned char *z; /* input string */ unsigned char *zo; /* result string */ i64 iCount; /* times to repeat */ i64 nLen; /* length of the input string (no multibyte considerations) */ i64 nTLen; /* length of the result string (no multibyte considerations) */ i64 i=0; if( argc!=2 || SQLITE_NULL==sqlite3_value_type(argv[0]) ) return; iCount = sqlite3_value_int64(argv[1]); if( iCount<0 ){ sqlite3_result_error(context, "domain error", -1); }else{ nLen = sqlite3_value_bytes(argv[0]); nTLen = nLen*iCount; z=sqlite3_malloc(nTLen+1); zo=sqlite3_malloc(nLen+1); if (!z || !zo){ sqlite3_result_error_nomem(context); if (z) sqlite3_free(z); if (zo) sqlite3_free(zo); return; } strcpy((char*)zo, (char*)sqlite3_value_text(argv[0])); for(i=0; i=n it's a NOP ** padl(NULL) = NULL */ static void padlFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ i64 ilen; /* length to pad to */ i64 zl; /* length of the input string (UTF-8 chars) */ int i = 0; const char *zi; /* input string */ char *zo; /* output string */ char *zt; assert( argc==2 ); if( sqlite3_value_type(argv[0]) == SQLITE_NULL ){ sqlite3_result_null(context); }else{ zi = (char *)sqlite3_value_text(argv[0]); ilen = sqlite3_value_int64(argv[1]); /* check domain */ if(ilen<0){ sqlite3_result_error(context, "domain error", -1); return; } zl = sqlite3Utf8CharLen(zi, -1); if( zl>=ilen ){ /* string is longer than the requested pad length, return the same string (dup it) */ zo = sqlite3StrDup(zi); if (!zo){ sqlite3_result_error_nomem(context); return; } sqlite3_result_text(context, zo, -1, SQLITE_TRANSIENT); }else{ zo = sqlite3_malloc(strlen(zi)+ilen-zl+1); if (!zo){ sqlite3_result_error_nomem(context); return; } zt = zo; for(i=1; i+zl<=ilen; ++i){ *(zt++)=' '; } /* no need to take UTF-8 into consideration here */ strcpy(zt,zi); } sqlite3_result_text(context, zo, -1, SQLITE_TRANSIENT); sqlite3_free(zo); } } /* ** given an input string (s) and an integer (n) appends spaces at the end of s ** until it has a length of n characters. ** When s has a length >=n it's a NOP ** padl(NULL) = NULL */ static void padrFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ i64 ilen; /* length to pad to */ i64 zl; /* length of the input string (UTF-8 chars) */ i64 zll; /* length of the input string (bytes) */ int i = 0; const char *zi; /* input string */ char *zo; /* output string */ char *zt; assert( argc==2 ); if( sqlite3_value_type(argv[0]) == SQLITE_NULL ){ sqlite3_result_null(context); }else{ zi = (char *)sqlite3_value_text(argv[0]); ilen = sqlite3_value_int64(argv[1]); /* check domain */ if(ilen<0){ sqlite3_result_error(context, "domain error", -1); return; } zl = sqlite3Utf8CharLen(zi, -1); if( zl>=ilen ){ /* string is longer than the requested pad length, return the same string (dup it) */ zo = sqlite3StrDup(zi); if (!zo){ sqlite3_result_error_nomem(context); return; } sqlite3_result_text(context, zo, -1, SQLITE_TRANSIENT); }else{ zll = strlen(zi); zo = sqlite3_malloc(zll+ilen-zl+1); if (!zo){ sqlite3_result_error_nomem(context); return; } zt = strcpy(zo,zi)+zll; for(i=1; i+zl<=ilen; ++i){ *(zt++) = ' '; } *zt = '\0'; } sqlite3_result_text(context, zo, -1, SQLITE_TRANSIENT); sqlite3_free(zo); } } /* ** given an input string (s) and an integer (n) appends spaces at the end of s ** and adds spaces at the begining of s until it has a length of n characters. ** Tries to add has many characters at the left as at the right. ** When s has a length >=n it's a NOP ** padl(NULL) = NULL */ static void padcFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ i64 ilen; /* length to pad to */ i64 zl; /* length of the input string (UTF-8 chars) */ i64 zll; /* length of the input string (bytes) */ int i = 0; const char *zi; /* input string */ char *zo; /* output string */ char *zt; assert( argc==2 ); if( sqlite3_value_type(argv[0]) == SQLITE_NULL ){ sqlite3_result_null(context); }else{ zi = (char *)sqlite3_value_text(argv[0]); ilen = sqlite3_value_int64(argv[1]); /* check domain */ if(ilen<0){ sqlite3_result_error(context, "domain error", -1); return; } zl = sqlite3Utf8CharLen(zi, -1); if( zl>=ilen ){ /* string is longer than the requested pad length, return the same string (dup it) */ zo = sqlite3StrDup(zi); if (!zo){ sqlite3_result_error_nomem(context); return; } sqlite3_result_text(context, zo, -1, SQLITE_TRANSIENT); }else{ zll = strlen(zi); zo = sqlite3_malloc(zll+ilen-zl+1); if (!zo){ sqlite3_result_error_nomem(context); return; } zt = zo; for(i=1; 2*i+zl<=ilen; ++i){ *(zt++) = ' '; } strcpy(zt, zi); zt+=zll; for(; i+zl<=ilen; ++i){ *(zt++) = ' '; } *zt = '\0'; } sqlite3_result_text(context, zo, -1, SQLITE_TRANSIENT); sqlite3_free(zo); } } /* ** given 2 string (s1,s2) returns the string s1 with the characters NOT in s2 removed ** assumes strings are UTF-8 encoded */ static void strfilterFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ const char *zi1; /* first parameter string (searched string) */ const char *zi2; /* second parameter string (vcontains valid characters) */ const char *z1; const char *z21; const char *z22; char *zo; /* output string */ char *zot; int c1 = 0; int c2 = 0; assert( argc==2 ); if( sqlite3_value_type(argv[0]) == SQLITE_NULL || sqlite3_value_type(argv[1]) == SQLITE_NULL ){ sqlite3_result_null(context); }else{ zi1 = (char *)sqlite3_value_text(argv[0]); zi2 = (char *)sqlite3_value_text(argv[1]); /* ** maybe I could allocate less, but that would imply 2 passes, rather waste ** (possibly) some memory */ zo = sqlite3_malloc(strlen(zi1)+1); if (!zo){ sqlite3_result_error_nomem(context); return; } zot = zo; z1 = zi1; while( (c1=sqliteCharVal((unsigned char *)z1))!=0 ){ z21=zi2; while( (c2=sqliteCharVal((unsigned char *)z21))!=0 && c2!=c1 ){ sqliteNextChar(z21); } if( c2!=0){ z22=z21; sqliteNextChar(z22); strncpy(zot, z21, z22-z21); zot+=z22-z21; } sqliteNextChar(z1); } *zot = '\0'; sqlite3_result_text(context, zo, -1, SQLITE_TRANSIENT); sqlite3_free(zo); } } /* ** Given a string z1, retutns the (0 based) index of it's first occurence ** in z2 after the first s characters. ** Returns -1 when there isn't a match. ** updates p to point to the character where the match occured. ** This is an auxiliary function. */ static int _substr(const char* z1, const char* z2, int s, const char** p){ int c = 0; int rVal=-1; const char* zt1; const char* zt2; int c1,c2; if( '\0'==*z1 ){ return -1; } while( (sqliteCharVal((unsigned char *)z2) != 0) && (c++)=0 ? rVal+s : rVal; } /* ** given 2 input strings (s1,s2) and an integer (n) searches from the nth character ** for the string s1. Returns the position where the match occured. ** Characters are counted from 1. ** 0 is returned when no match occurs. */ static void charindexFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ const u8 *z1; /* s1 string */ u8 *z2; /* s2 string */ int s=0; int rVal=0; assert( argc==3 ||argc==2); if( SQLITE_NULL==sqlite3_value_type(argv[0]) || SQLITE_NULL==sqlite3_value_type(argv[1])){ sqlite3_result_null(context); return; } z1 = sqlite3_value_text(argv[0]); if( z1==0 ) return; z2 = (u8*) sqlite3_value_text(argv[1]); if(argc==3){ s = sqlite3_value_int(argv[2])-1; if(s<0){ s=0; } }else{ s = 0; } rVal = _substr((char *)z1,(char *)z2,s,NULL); sqlite3_result_int(context, rVal+1); } /* ** given a string (s) and an integer (n) returns the n leftmost (UTF-8) characters ** if the string has a length<=n or is NULL this function is NOP */ static void leftFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ int c=0; int cc=0; int l=0; const unsigned char *z; /* input string */ const unsigned char *zt; unsigned char *rz; /* output string */ assert( argc==2); if( SQLITE_NULL==sqlite3_value_type(argv[0]) || SQLITE_NULL==sqlite3_value_type(argv[1])){ sqlite3_result_null(context); return; } z = sqlite3_value_text(argv[0]); l = sqlite3_value_int(argv[1]); zt = z; while( sqliteCharVal(zt) && c++ 0 ){ sqliteNextChar(zt); } rz = sqlite3_malloc(ze-zt+1); if (!rz){ sqlite3_result_error_nomem(context); return; } strcpy((char*) rz, (char*) (zt)); sqlite3_result_text(context, (char*)rz, -1, SQLITE_TRANSIENT); sqlite3_free(rz); } #ifndef HAVE_TRIM /* ** removes the whitespaces at the begining of a string. */ const char* ltrim(const char* s){ while( *s==' ' ) ++s; return s; } /* ** removes the whitespaces at the end of a string. ** !mutates the input string! */ void rtrim(char* s){ char* ss = s+strlen(s)-1; while( ss>=s && *ss==' ' ) --ss; *(ss+1)='\0'; } /* ** Removes the whitespace at the begining of a string */ static void ltrimFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ const char *z; assert( argc==1); if( SQLITE_NULL==sqlite3_value_type(argv[0]) ){ sqlite3_result_null(context); return; } z = sqlite3_value_text(argv[0]); sqlite3_result_text(context, ltrim(z), -1, SQLITE_TRANSIENT); } /* ** Removes the whitespace at the end of a string */ static void rtrimFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ const char *z; char *rz; /* try not to change data in argv */ assert( argc==1); if( SQLITE_NULL==sqlite3_value_type(argv[0]) ){ sqlite3_result_null(context); return; } z = sqlite3_value_text(argv[0]); rz = sqlite3StrDup(z); rtrim(rz); sqlite3_result_text(context, rz, -1, SQLITE_TRANSIENT); sqlite3_free(rz); } /* ** Removes the whitespace at the begining and end of a string */ static void trimFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ const char *z; char *rz; /* try not to change data in argv */ assert( argc==1); if( SQLITE_NULL==sqlite3_value_type(argv[0]) ){ sqlite3_result_null(context); return; } z = sqlite3_value_text(argv[0]); rz = sqlite3StrDup(z); rtrim(rz); sqlite3_result_text(context, ltrim(rz), -1, SQLITE_TRANSIENT); sqlite3_free(rz); } #endif /* ** given a pointer to a string s1, the length of that string (l1), a new string (s2) ** and it's length (l2) appends s2 to s1. ** All lengths in bytes. ** This is just an auxiliary function */ // static void _append(char **s1, int l1, const char *s2, int l2){ // *s1 = realloc(*s1, (l1+l2+1)*sizeof(char)); // strncpy((*s1)+l1, s2, l2); // *(*(s1)+l1+l2) = '\0'; // } #ifndef HAVE_TRIM /* ** given strings s, s1 and s2 replaces occurrences of s1 in s by s2 */ static void replaceFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ const char *z1; /* string s (first parameter) */ const char *z2; /* string s1 (second parameter) string to look for */ const char *z3; /* string s2 (third parameter) string to replace occurrences of s1 with */ int lz1; int lz2; int lz3; int lzo=0; char *zo=0; int ret=0; const char *zt1; const char *zt2; assert( 3==argc ); if( SQLITE_NULL==sqlite3_value_type(argv[0]) ){ sqlite3_result_null(context); return; } z1 = sqlite3_value_text(argv[0]); z2 = sqlite3_value_text(argv[1]); z3 = sqlite3_value_text(argv[2]); /* handle possible null values */ if( 0==z2 ){ z2=""; } if( 0==z3 ){ z3=""; } lz1 = strlen(z1); lz2 = strlen(z2); lz3 = strlen(z3); #if 0 /* special case when z2 is empty (or null) nothing will be changed */ if( 0==lz2 ){ sqlite3_result_text(context, z1, -1, SQLITE_TRANSIENT); return; } #endif zt1=z1; zt2=z1; while(1){ ret=_substr(z2,zt1 , 0, &zt2); if( ret<0 ) break; _append(&zo, lzo, zt1, zt2-zt1); lzo+=zt2-zt1; _append(&zo, lzo, z3, lz3); lzo+=lz3; zt1=zt2+lz2; } _append(&zo, lzo, zt1, lz1-(zt1-z1)); sqlite3_result_text(context, zo, -1, SQLITE_TRANSIENT); sqlite3_free(zo); } #endif /* ** given a string returns the same string but with the characters in reverse order */ static void reverseFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ const char *z; const char *zt; char *rz; char *rzt; int l = 0; int i = 0; assert( 1==argc ); if( SQLITE_NULL==sqlite3_value_type(argv[0]) ){ sqlite3_result_null(context); return; } z = (char *)sqlite3_value_text(argv[0]); l = strlen(z); rz = sqlite3_malloc(l+1); if (!rz){ sqlite3_result_error_nomem(context); return; } rzt = rz+l; *(rzt--) = '\0'; zt=z; while( sqliteCharVal((unsigned char *)zt)!=0 ){ z=zt; sqliteNextChar(zt); for(i=1; zt-i>=z; ++i){ *(rzt--)=*(zt-i); } } sqlite3_result_text(context, rz, -1, SQLITE_TRANSIENT); sqlite3_free(rz); } /* ** An instance of the following structure holds the context of a ** stdev() or variance() aggregate computation. ** implementaion of http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Algorithm_II ** less prone to rounding errors */ typedef struct StdevCtx StdevCtx; struct StdevCtx { double rM; double rS; i64 cnt; /* number of elements */ }; /* ** An instance of the following structure holds the context of a ** mode() or median() aggregate computation. ** Depends on structures defined in map.c (see map & map) ** These aggregate functions only work for integers and floats although ** they could be made to work for strings. This is usually considered meaningless. ** Only usuall order (for median), no use of collation functions (would this even make sense?) */ typedef struct ModeCtx ModeCtx; struct ModeCtx { i64 riM; /* integer value found so far */ double rdM; /* double value found so far */ i64 cnt; /* number of elements so far */ double pcnt; /* number of elements smaller than a percentile */ i64 mcnt; /* maximum number of occurrences (for mode) */ i64 mn; /* number of occurrences (for mode and percentiles) */ i64 is_double; /* whether the computation is being done for doubles (>0) or integers (=0) */ map* m; /* map structure used for the computation */ int done; /* whether the answer has been found */ }; /* ** called for each value received during a calculation of stdev or variance */ static void varianceStep(sqlite3_context *context, int argc, sqlite3_value **argv){ StdevCtx *p; double delta; double x; assert( argc==1 ); p = sqlite3_aggregate_context(context, sizeof(*p)); /* only consider non-null values */ if( SQLITE_NULL != sqlite3_value_numeric_type(argv[0]) ){ p->cnt++; x = sqlite3_value_double(argv[0]); delta = (x-p->rM); p->rM += delta/p->cnt; p->rS += delta*(x-p->rM); } } /* ** called for each value received during a calculation of mode of median */ static void modeStep(sqlite3_context *context, int argc, sqlite3_value **argv){ ModeCtx *p; i64 xi=0; double xd=0.0; i64 *iptr; double *dptr; int type; assert( argc==1 ); type = sqlite3_value_numeric_type(argv[0]); if( type == SQLITE_NULL) return; p = sqlite3_aggregate_context(context, sizeof(*p)); if( 0==(p->m) ){ p->m = calloc(1, sizeof(map)); if( type==SQLITE_INTEGER ){ /* map will be used for integers */ *(p->m) = map_make(int_cmp); p->is_double = 0; }else{ p->is_double = 1; /* map will be used for doubles */ *(p->m) = map_make(double_cmp); } } ++(p->cnt); if( 0==p->is_double ){ xi = sqlite3_value_int64(argv[0]); iptr = (i64*)calloc(1,sizeof(i64)); *iptr = xi; map_insert(p->m, iptr); }else{ xd = sqlite3_value_double(argv[0]); dptr = (double*)calloc(1,sizeof(double)); *dptr = xd; map_insert(p->m, dptr); } } /* ** Auxiliary function that iterates all elements in a map and finds the mode ** (most frequent value) */ static void modeIterate(void* e, i64 c, void* pp){ i64 ei; double ed; ModeCtx *p = (ModeCtx*)pp; if( 0==p->is_double ){ ei = *(int*)(e); if( p->mcnt==c ){ ++p->mn; }else if( p->mcntriM = ei; p->mcnt = c; p->mn=1; } }else{ ed = *(double*)(e); if( p->mcnt==c ){ ++p->mn; }else if(p->mcntrdM = ed; p->mcnt = c; p->mn=1; } } } /* ** Auxiliary function that iterates all elements in a map and finds the median ** (the value such that the number of elements smaller is equal the the number of ** elements larger) */ static void medianIterate(void* e, i64 c, void* pp){ i64 ei; double ed; double iL; double iR; int il; int ir; ModeCtx *p = (ModeCtx*)pp; if(p->done>0) return; iL = p->pcnt; iR = p->cnt - p->pcnt; il = p->mcnt + c; ir = p->cnt - p->mcnt; if( il >= iL ){ if( ir >= iR ){ ++p->mn; if( 0==p->is_double ){ ei = *(int*)(e); p->riM += ei; }else{ ed = *(double*)(e); p->rdM += ed; } }else{ p->done=1; } } p->mcnt+=c; } /* ** Returns the mode value */ static void modeFinalize(sqlite3_context *context){ ModeCtx *p; p = sqlite3_aggregate_context(context, 0); if( p && p->m ){ map_iterate(p->m, modeIterate, p); map_destroy(p->m); free(p->m); if( 1==p->mn ){ if( 0==p->is_double ) sqlite3_result_int64(context, p->riM); else sqlite3_result_double(context, p->rdM); } } } /* ** auxiliary function for percentiles */ static void _medianFinalize(sqlite3_context *context){ ModeCtx *p; p = (ModeCtx*) sqlite3_aggregate_context(context, 0); if( p && p->m ){ p->done=0; map_iterate(p->m, medianIterate, p); map_destroy(p->m); free(p->m); if( 0==p->is_double ) if( 1==p->mn ) sqlite3_result_int64(context, p->riM); else sqlite3_result_double(context, p->riM*1.0/p->mn); else sqlite3_result_double(context, p->rdM/p->mn); } } /* ** Returns the median value */ static void medianFinalize(sqlite3_context *context){ ModeCtx *p; p = (ModeCtx*) sqlite3_aggregate_context(context, 0); if( p!=0 ){ p->pcnt = (p->cnt)/2.0; _medianFinalize(context); } } /* ** Returns the lower_quartile value */ static void lower_quartileFinalize(sqlite3_context *context){ ModeCtx *p; p = (ModeCtx*) sqlite3_aggregate_context(context, 0); if( p!=0 ){ p->pcnt = (p->cnt)/4.0; _medianFinalize(context); } } /* ** Returns the upper_quartile value */ static void upper_quartileFinalize(sqlite3_context *context){ ModeCtx *p; p = (ModeCtx*) sqlite3_aggregate_context(context, 0); if( p!=0 ){ p->pcnt = (p->cnt)*3/4.0; _medianFinalize(context); } } /* ** Returns the stdev value */ static void stdevFinalize(sqlite3_context *context){ StdevCtx *p; p = sqlite3_aggregate_context(context, 0); if( p && p->cnt>1 ){ sqlite3_result_double(context, sqrt(p->rS/(p->cnt-1))); }else{ sqlite3_result_double(context, 0.0); } } /* ** Returns the variance value */ static void varianceFinalize(sqlite3_context *context){ StdevCtx *p; p = sqlite3_aggregate_context(context, 0); if( p && p->cnt>1 ){ sqlite3_result_double(context, p->rS/(p->cnt-1)); }else{ sqlite3_result_double(context, 0.0); } } #ifdef SQLITE_SOUNDEX /* relicoder factored code */ /* ** Calculates the soundex value of a string */ static void soundex(const u8 *zIn, char *zResult){ int i, j; static const unsigned char iCode[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0, 1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0, 1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0, }; for(i=0; zIn[i] && !isalpha(zIn[i]); i++){} if( zIn[i] ){ zResult[0] = toupper(zIn[i]); for(j=1; j<4 && zIn[i]; i++){ int code = iCode[zIn[i]&0x7f]; if( code>0 ){ zResult[j++] = code + '0'; } } while( j<4 ){ zResult[j++] = '0'; } zResult[j] = 0; }else{ strcpy(zResult, "?000"); } } /* ** computes the number of different characters between the soundex value fo 2 strings */ static void differenceFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ char zResult1[8]; char zResult2[8]; char *zR1 = zResult1; char *zR2 = zResult2; int rVal = 0; int i = 0; const u8 *zIn1; const u8 *zIn2; assert( argc==2 ); if( sqlite3_value_type(argv[0])==SQLITE_NULL || sqlite3_value_type(argv[1])==SQLITE_NULL ){ sqlite3_result_null(context); return; } zIn1 = (u8*)sqlite3_value_text(argv[0]); zIn2 = (u8*)sqlite3_value_text(argv[1]); soundex(zIn1, zR1); soundex(zIn2, zR2); for(i=0; i<4; ++i){ if( sqliteCharVal((unsigned char *)zR1)==sqliteCharVal((unsigned char *)zR2) ) ++rVal; sqliteNextChar(zR1); sqliteNextChar(zR2); } sqlite3_result_int(context, rVal); } #endif /* ** This function registered all of the above C functions as SQL ** functions. This should be the only routine in this file with ** external linkage. */ int RegisterExtensionFunctions(sqlite3 *db){ static const struct FuncDef { char *zName; signed char nArg; u8 argType; /* 0: none. 1: db 2: (-1) */ u8 eTextRep; /* 1: UTF-16. 0: UTF-8 */ u8 needCollSeq; void (*xFunc)(sqlite3_context*,int,sqlite3_value **); } aFuncs[] = { /* math.h */ { "acos", 1, 0, SQLITE_UTF8, 0, acosFunc }, { "asin", 1, 0, SQLITE_UTF8, 0, asinFunc }, { "atan", 1, 0, SQLITE_UTF8, 0, atanFunc }, { "atn2", 2, 0, SQLITE_UTF8, 0, atn2Func }, /* XXX alias */ { "atan2", 2, 0, SQLITE_UTF8, 0, atn2Func }, { "acosh", 1, 0, SQLITE_UTF8, 0, acoshFunc }, { "asinh", 1, 0, SQLITE_UTF8, 0, asinhFunc }, { "atanh", 1, 0, SQLITE_UTF8, 0, atanhFunc }, { "difference", 2, 0, SQLITE_UTF8, 0, differenceFunc}, { "degrees", 1, 0, SQLITE_UTF8, 0, rad2degFunc }, { "radians", 1, 0, SQLITE_UTF8, 0, deg2radFunc }, { "cos", 1, 0, SQLITE_UTF8, 0, cosFunc }, { "sin", 1, 0, SQLITE_UTF8, 0, sinFunc }, { "tan", 1, 0, SQLITE_UTF8, 0, tanFunc }, { "cot", 1, 0, SQLITE_UTF8, 0, cotFunc }, { "cosh", 1, 0, SQLITE_UTF8, 0, coshFunc }, { "sinh", 1, 0, SQLITE_UTF8, 0, sinhFunc }, { "tanh", 1, 0, SQLITE_UTF8, 0, tanhFunc }, { "coth", 1, 0, SQLITE_UTF8, 0, cothFunc }, { "exp", 1, 0, SQLITE_UTF8, 0, expFunc }, { "log", 1, 0, SQLITE_UTF8, 0, logFunc }, { "log10", 1, 0, SQLITE_UTF8, 0, log10Func }, { "power", 2, 0, SQLITE_UTF8, 0, powerFunc }, { "sign", 1, 0, SQLITE_UTF8, 0, signFunc }, { "sqrt", 1, 0, SQLITE_UTF8, 0, sqrtFunc }, { "square", 1, 0, SQLITE_UTF8, 0, squareFunc }, { "ceil", 1, 0, SQLITE_UTF8, 0, ceilFunc }, { "floor", 1, 0, SQLITE_UTF8, 0, floorFunc }, { "pi", 0, 0, SQLITE_UTF8, 1, piFunc }, /* string */ { "replicate", 2, 0, SQLITE_UTF8, 0, replicateFunc }, { "charindex", 2, 0, SQLITE_UTF8, 0, charindexFunc }, { "charindex", 3, 0, SQLITE_UTF8, 0, charindexFunc }, { "leftstr", 2, 0, SQLITE_UTF8, 0, leftFunc }, { "rightstr", 2, 0, SQLITE_UTF8, 0, rightFunc }, #ifndef HAVE_TRIM { "ltrim", 1, 0, SQLITE_UTF8, 0, ltrimFunc }, { "rtrim", 1, 0, SQLITE_UTF8, 0, rtrimFunc }, { "trim", 1, 0, SQLITE_UTF8, 0, trimFunc }, { "replace", 3, 0, SQLITE_UTF8, 0, replaceFunc }, #endif { "reverse", 1, 0, SQLITE_UTF8, 0, reverseFunc }, { "proper", 1, 0, SQLITE_UTF8, 0, properFunc }, { "padl", 2, 0, SQLITE_UTF8, 0, padlFunc }, { "padr", 2, 0, SQLITE_UTF8, 0, padrFunc }, { "padc", 2, 0, SQLITE_UTF8, 0, padcFunc }, { "strfilter", 2, 0, SQLITE_UTF8, 0, strfilterFunc }, }; /* Aggregate functions */ static const struct FuncDefAgg { char *zName; signed char nArg; u8 argType; u8 needCollSeq; void (*xStep)(sqlite3_context*,int,sqlite3_value**); void (*xFinalize)(sqlite3_context*); } aAggs[] = { { "stdev", 1, 0, 0, varianceStep, stdevFinalize }, { "variance", 1, 0, 0, varianceStep, varianceFinalize }, { "mode", 1, 0, 0, modeStep, modeFinalize }, { "median", 1, 0, 0, modeStep, medianFinalize }, { "lower_quartile", 1, 0, 0, modeStep, lower_quartileFinalize }, { "upper_quartile", 1, 0, 0, modeStep, upper_quartileFinalize }, }; int i; for(i=0; ineedCollSeq = 1; } } #endif } for(i=0; ineedCollSeq = 1; } } #endif } return 0; } #ifdef COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE int sqlite3_extension_init( sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi){ SQLITE_EXTENSION_INIT2(pApi); RegisterExtensionFunctions(db); return 0; } #endif /* COMPILE_SQLITE_EXTENSIONS_AS_LOADABLE_MODULE */ map map_make(cmp_func cmp){ map r; r.cmp=cmp; r.base = 0; return r; } void* xcalloc(size_t nmemb, size_t size, char* s){ void* ret = calloc(nmemb, size); return ret; } void xfree(void* p){ free(p); } void node_insert(node** n, cmp_func cmp, void *e){ int c; node* nn; if(*n==0){ nn = (node*)xcalloc(1,sizeof(node), "for node"); nn->data = e; nn->count = 1; *n=nn; }else{ c=cmp((*n)->data,e); if(0==c){ ++((*n)->count); xfree(e); }else if(c>0){ /* put it right here */ node_insert(&((*n)->l), cmp, e); }else{ node_insert(&((*n)->r), cmp, e); } } } void map_insert(map *m, void *e){ node_insert(&(m->base), m->cmp, e); } void node_iterate(node *n, map_iterator iter, void* p){ if(n){ if(n->l) node_iterate(n->l, iter, p); iter(n->data, n->count, p); if(n->r) node_iterate(n->r, iter, p); } } void map_iterate(map *m, map_iterator iter, void* p){ node_iterate(m->base, iter, p); } void node_destroy(node *n){ if(0!=n){ xfree(n->data); if(n->l) node_destroy(n->l); if(n->r) node_destroy(n->r); xfree(n); } } void map_destroy(map *m){ node_destroy(m->base); } int int_cmp(const void *a, const void *b){ int64_t aa = *(int64_t *)(a); int64_t bb = *(int64_t *)(b); /* printf("cmp %d <=> %d\n",aa,bb); */ if(aa==bb) return 0; else if(aa %d\n",aa,bb); */ if(aa==bb) return 0; else if(aa %lld\n", ee,c); } sqlitebrowser-3.11.2/src/extensions/extension-functions.def000066400000000000000000000004001345112435200241650ustar00rootroot00000000000000EXPORTS RegisterExtensionFunctions double_cmp int_cmp map_destroy map_insert map_iterate map_make node_destroy node_insert node_iterate print_elem sqlite3_api sqlite3_extension_init xcalloc xfree sqlitebrowser-3.11.2/src/grammar/000077500000000000000000000000001345112435200167205ustar00rootroot00000000000000sqlitebrowser-3.11.2/src/grammar/README000066400000000000000000000003451345112435200176020ustar00rootroot00000000000000To generate c++ code from the grammar(sqlit3.g) you need antlr 2.7.7. Download it from www.antlr2.org. Either put the antlr.jar into your system classpath or start it like this: java -cp .:/pathto/antlr.jar antlr.Tool sqlite3.g sqlitebrowser-3.11.2/src/grammar/Sqlite3Lexer.cpp000066400000000000000000007003711345112435200217600ustar00rootroot00000000000000/* $ANTLR 2.7.7 (20171109): "sqlite3.g" -> "Sqlite3Lexer.cpp"$ */ #include "Sqlite3Lexer.hpp" #include #include #include #include #include #include #include Sqlite3Lexer::Sqlite3Lexer(ANTLR_USE_NAMESPACE(std)istream& in) : ANTLR_USE_NAMESPACE(antlr)CharScanner(new ANTLR_USE_NAMESPACE(antlr)CharBuffer(in),false) { initLiterals(); } Sqlite3Lexer::Sqlite3Lexer(ANTLR_USE_NAMESPACE(antlr)InputBuffer& ib) : ANTLR_USE_NAMESPACE(antlr)CharScanner(ib,false) { initLiterals(); } Sqlite3Lexer::Sqlite3Lexer(const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state) : ANTLR_USE_NAMESPACE(antlr)CharScanner(state,false) { initLiterals(); } void Sqlite3Lexer::initLiterals() { literals["CONSTRAINT"] = 19; literals["CREATE"] = 16; literals["CASE"] = 13; literals["END"] = 29; literals["CASCADE"] = 12; literals["TEMPORARY"] = 67; literals["RANGE"] = 58; literals["DEFERRABLE"] = 24; literals["IMMEDIATE"] = 45; literals["AUTOINCREMENT"] = 6; literals["ROWID"] = 64; literals["EXISTS"] = 51; literals["NO"] = 47; literals["THEN"] = 69; literals["AND"] = 9; literals["CURRENT_DATE"] = 21; literals["NOT"] = 48; literals["KEY"] = 36; literals["COLLATE"] = 17; literals["NULL"] = 49; literals["TEMP"] = 68; literals["OVER"] = 53; literals["INITIALLY"] = 43; literals["RESTRICT"] = 62; literals["LIKE"] = 37; literals["WHEN"] = 75; literals["FOREIGN"] = 34; literals["SET"] = 66; literals["IS"] = 46; literals["FILTER"] = 32; literals["OR"] = 10; literals["INDEX"] = 42; literals["PRIMARY"] = 56; literals["DEFERRED"] = 25; literals["UPDATE"] = 72; literals["IF"] = 39; literals["PRECEDING"] = 55; literals["UNIQUE"] = 71; literals["AS"] = 7; literals["TABLE"] = 38; literals["UNBOUNDED"] = 70; literals["DEFAULT"] = 23; literals["ACTION"] = 5; literals["DELETE"] = 26; literals["GLOB"] = 35; literals["FOLLOWING"] = 33; literals["IGNORE"] = 40; literals["INSERT"] = 44; literals["CURRENT_TIMESTAMP"] = 22; literals["CONFLICT"] = 18; literals["ROWS"] = 65; literals["REPLACE"] = 61; literals["ASC"] = 8; literals["FAIL"] = 31; literals["REGEXP"] = 60; literals["REFERENCES"] = 59; literals["ON"] = 52; literals["DESC"] = 27; literals["IN"] = 41; literals["CAST"] = 14; literals["ESCAPE"] = 30; literals["VIRTUAL"] = 74; literals["WHERE"] = 76; literals["ELSE"] = 28; literals["PARTITION"] = 54; literals["WITHOUT"] = 77; literals["MATCH"] = 50; literals["RAISE"] = 57; literals["ABORT"] = 4; literals["BETWEEN"] = 11; literals["CHECK"] = 15; literals["ROLLBACK"] = 63; literals["CURRENT_TIME"] = 20; literals["USING"] = 73; } ANTLR_USE_NAMESPACE(antlr)RefToken Sqlite3Lexer::nextToken() { ANTLR_USE_NAMESPACE(antlr)RefToken theRetToken; for (;;) { ANTLR_USE_NAMESPACE(antlr)RefToken theRetToken; int _ttype = ANTLR_USE_NAMESPACE(antlr)Token::INVALID_TYPE; resetText(); try { // for lexical and char stream error handling switch ( LA(1)) { case 0x5f /* '_' */ : case 0x61 /* 'a' */ : case 0x62 /* 'b' */ : case 0x63 /* 'c' */ : case 0x64 /* 'd' */ : case 0x65 /* 'e' */ : case 0x66 /* 'f' */ : case 0x67 /* 'g' */ : case 0x68 /* 'h' */ : case 0x69 /* 'i' */ : case 0x6a /* 'j' */ : case 0x6b /* 'k' */ : case 0x6c /* 'l' */ : case 0x6d /* 'm' */ : case 0x6e /* 'n' */ : case 0x6f /* 'o' */ : case 0x70 /* 'p' */ : case 0x71 /* 'q' */ : case 0x72 /* 'r' */ : case 0x73 /* 's' */ : case 0x74 /* 't' */ : case 0x75 /* 'u' */ : case 0x76 /* 'v' */ : case 0x77 /* 'w' */ : case 0x78 /* 'x' */ : case 0x79 /* 'y' */ : case 0x7a /* 'z' */ : { mID(true); theRetToken=_returnToken; break; } case 0x5b /* '[' */ : case 0x60 /* '`' */ : { mQUOTEDID(true); theRetToken=_returnToken; break; } case 0x22 /* '\"' */ : { mQUOTEDLITERAL(true); theRetToken=_returnToken; break; } case 0x2e /* '.' */ : case 0x30 /* '0' */ : case 0x31 /* '1' */ : case 0x32 /* '2' */ : case 0x33 /* '3' */ : case 0x34 /* '4' */ : case 0x35 /* '5' */ : case 0x36 /* '6' */ : case 0x37 /* '7' */ : case 0x38 /* '8' */ : case 0x39 /* '9' */ : { mNUMERIC(true); theRetToken=_returnToken; break; } case 0x2b /* '+' */ : { mPLUS(true); theRetToken=_returnToken; break; } case 0x9 /* '\t' */ : case 0xa /* '\n' */ : case 0xc /* '\14' */ : case 0xd /* '\r' */ : case 0x20 /* ' ' */ : { mWS(true); theRetToken=_returnToken; break; } case 0x27 /* '\'' */ : { mSTRINGLITERAL(true); theRetToken=_returnToken; break; } case 0x28 /* '(' */ : { mLPAREN(true); theRetToken=_returnToken; break; } case 0x29 /* ')' */ : { mRPAREN(true); theRetToken=_returnToken; break; } case 0x2c /* ',' */ : { mCOMMA(true); theRetToken=_returnToken; break; } case 0x3b /* ';' */ : { mSEMI(true); theRetToken=_returnToken; break; } case 0x2a /* '*' */ : { mSTAR(true); theRetToken=_returnToken; break; } case 0x7e /* '~' */ : { mTILDE(true); theRetToken=_returnToken; break; } case 0x26 /* '&' */ : { mAMPERSAND(true); theRetToken=_returnToken; break; } case 0x21 /* '!' */ : { mUNEQUAL(true); theRetToken=_returnToken; break; } default: if ((LA(1) == 0x2d /* '-' */ || LA(1) == 0x2f /* '/' */ ) && (LA(2) == 0x2a /* '*' */ || LA(2) == 0x2d /* '-' */ )) { mCOMMENT(true); theRetToken=_returnToken; } else if ((LA(1) == 0x7c /* '|' */ ) && (LA(2) == 0x7c /* '|' */ )) { mOROP(true); theRetToken=_returnToken; } else if ((LA(1) == 0x3d /* '=' */ ) && (LA(2) == 0x3d /* '=' */ )) { mEQUAL2(true); theRetToken=_returnToken; } else if ((LA(1) == 0x3e /* '>' */ ) && (LA(2) == 0x3d /* '=' */ )) { mGREATEREQUAL(true); theRetToken=_returnToken; } else if ((LA(1) == 0x3c /* '<' */ ) && (LA(2) == 0x3d /* '=' */ )) { mLOWEREQUAL(true); theRetToken=_returnToken; } else if ((LA(1) == 0x3c /* '<' */ ) && (LA(2) == 0x3e /* '>' */ )) { mUNEQUAL2(true); theRetToken=_returnToken; } else if ((LA(1) == 0x3c /* '<' */ ) && (LA(2) == 0x3c /* '<' */ )) { mBITWISELEFT(true); theRetToken=_returnToken; } else if ((LA(1) == 0x3e /* '>' */ ) && (LA(2) == 0x3e /* '>' */ )) { mBITWISERIGHT(true); theRetToken=_returnToken; } else if ((LA(1) == 0x2d /* '-' */ ) && (true)) { mMINUS(true); theRetToken=_returnToken; } else if ((LA(1) == 0x7c /* '|' */ ) && (true)) { mBITOR(true); theRetToken=_returnToken; } else if ((LA(1) == 0x3d /* '=' */ ) && (true)) { mEQUAL(true); theRetToken=_returnToken; } else if ((LA(1) == 0x3e /* '>' */ ) && (true)) { mGREATER(true); theRetToken=_returnToken; } else if ((LA(1) == 0x3c /* '<' */ ) && (true)) { mLOWER(true); theRetToken=_returnToken; } else { if (LA(1)==EOF_CHAR) { uponEOF(); _returnToken = makeToken(ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE); } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} } } if ( !_returnToken ) goto tryAgain; // found SKIP token _ttype = _returnToken->getType(); _ttype = testLiteralsTable(_ttype); _returnToken->setType(_ttype); return _returnToken; } catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& e) { throw ANTLR_USE_NAMESPACE(antlr)TokenStreamRecognitionException(e); } catch (ANTLR_USE_NAMESPACE(antlr)CharStreamIOException& csie) { throw ANTLR_USE_NAMESPACE(antlr)TokenStreamIOException(csie.io); } catch (ANTLR_USE_NAMESPACE(antlr)CharStreamException& cse) { throw ANTLR_USE_NAMESPACE(antlr)TokenStreamException(cse.getMessage()); } tryAgain:; } } void Sqlite3Lexer::mDIGIT(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = DIGIT; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; matchRange(L'0',L'9'); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mDOT(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = DOT; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mID(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = ID; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; { switch ( LA(1)) { case 0x61 /* 'a' */ : case 0x62 /* 'b' */ : case 0x63 /* 'c' */ : case 0x64 /* 'd' */ : case 0x65 /* 'e' */ : case 0x66 /* 'f' */ : case 0x67 /* 'g' */ : case 0x68 /* 'h' */ : case 0x69 /* 'i' */ : case 0x6a /* 'j' */ : case 0x6b /* 'k' */ : case 0x6c /* 'l' */ : case 0x6d /* 'm' */ : case 0x6e /* 'n' */ : case 0x6f /* 'o' */ : case 0x70 /* 'p' */ : case 0x71 /* 'q' */ : case 0x72 /* 'r' */ : case 0x73 /* 's' */ : case 0x74 /* 't' */ : case 0x75 /* 'u' */ : case 0x76 /* 'v' */ : case 0x77 /* 'w' */ : case 0x78 /* 'x' */ : case 0x79 /* 'y' */ : case 0x7a /* 'z' */ : { matchRange(L'a',L'z'); break; } case 0x5f /* '_' */ : { match(L'_' /* charlit */ ); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); } } } { // ( ... )* for (;;) { switch ( LA(1)) { case 0x61 /* 'a' */ : case 0x62 /* 'b' */ : case 0x63 /* 'c' */ : case 0x64 /* 'd' */ : case 0x65 /* 'e' */ : case 0x66 /* 'f' */ : case 0x67 /* 'g' */ : case 0x68 /* 'h' */ : case 0x69 /* 'i' */ : case 0x6a /* 'j' */ : case 0x6b /* 'k' */ : case 0x6c /* 'l' */ : case 0x6d /* 'm' */ : case 0x6e /* 'n' */ : case 0x6f /* 'o' */ : case 0x70 /* 'p' */ : case 0x71 /* 'q' */ : case 0x72 /* 'r' */ : case 0x73 /* 's' */ : case 0x74 /* 't' */ : case 0x75 /* 'u' */ : case 0x76 /* 'v' */ : case 0x77 /* 'w' */ : case 0x78 /* 'x' */ : case 0x79 /* 'y' */ : case 0x7a /* 'z' */ : { matchRange(L'a',L'z'); break; } case 0x30 /* '0' */ : case 0x31 /* '1' */ : case 0x32 /* '2' */ : case 0x33 /* '3' */ : case 0x34 /* '4' */ : case 0x35 /* '5' */ : case 0x36 /* '6' */ : case 0x37 /* '7' */ : case 0x38 /* '8' */ : case 0x39 /* '9' */ : { matchRange(L'0',L'9'); break; } case 0x5f /* '_' */ : { match(L'_' /* charlit */ ); break; } default: if (((LA(1) >= 0x80 && LA(1) <= 0x2b8))) { matchRange(L'\200',L'\u02b8'); } else { goto _loop6; } } } _loop6:; } // ( ... )* if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mQUOTEDID(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = QUOTEDID; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; switch ( LA(1)) { case 0x60 /* '`' */ : { match(L'`' /* charlit */ ); { // ( ... )* for (;;) { if ((LA(1) == 0x60 /* '`' */ ) && (LA(2) == 0x60 /* '`' */ )) { { match(L'`' /* charlit */ ); match(L'`' /* charlit */ ); } } else if ((_tokenSet_0.member(LA(1)))) { { match(_tokenSet_0); } } else { goto _loop11; } } _loop11:; } // ( ... )* match(L'`' /* charlit */ ); break; } case 0x5b /* '[' */ : { match(L'[' /* charlit */ ); { // ( ... )* for (;;) { if ((_tokenSet_1.member(LA(1)))) { { match(_tokenSet_1); } } else { goto _loop14; } } _loop14:; } // ( ... )* match(L']' /* charlit */ ); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); } } if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mQUOTEDLITERAL(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = QUOTEDLITERAL; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'\"' /* charlit */ ); { // ( ... )* for (;;) { if ((LA(1) == 0x22 /* '\"' */ ) && (LA(2) == 0x22 /* '\"' */ )) { { match(L'\"' /* charlit */ ); match(L'\"' /* charlit */ ); } } else if ((_tokenSet_2.member(LA(1)))) { matchNot(L'\"' /* charlit */ ); } else { goto _loop18; } } _loop18:; } // ( ... )* match(L'\"' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mNUMERIC(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = NUMERIC; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; { switch ( LA(1)) { case 0x30 /* '0' */ : case 0x31 /* '1' */ : case 0x32 /* '2' */ : case 0x33 /* '3' */ : case 0x34 /* '4' */ : case 0x35 /* '5' */ : case 0x36 /* '6' */ : case 0x37 /* '7' */ : case 0x38 /* '8' */ : case 0x39 /* '9' */ : { { // ( ... )+ int _cnt22=0; for (;;) { if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { mDIGIT(false); } else { if ( _cnt22>=1 ) { goto _loop22; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} } _cnt22++; } _loop22:; } // ( ... )+ { if ((LA(1) == 0x2e /* '.' */ )) { match(L'.' /* charlit */ ); { // ( ... )* for (;;) { if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { mDIGIT(false); } else { goto _loop25; } } _loop25:; } // ( ... )* } else { } } break; } case 0x2e /* '.' */ : { match(L'.' /* charlit */ ); { // ( ... )+ int _cnt27=0; for (;;) { if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { mDIGIT(false); } else { if ( _cnt27>=1 ) { goto _loop27; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} } _cnt27++; } _loop27:; } // ( ... )+ break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); } } } { if ((LA(1) == 0x65 /* 'e' */ )) { match(L'e' /* charlit */ ); { switch ( LA(1)) { case 0x2b /* '+' */ : { mPLUS(false); break; } case 0x2d /* '-' */ : { mMINUS(false); break; } case 0x30 /* '0' */ : case 0x31 /* '1' */ : case 0x32 /* '2' */ : case 0x33 /* '3' */ : case 0x34 /* '4' */ : case 0x35 /* '5' */ : case 0x36 /* '6' */ : case 0x37 /* '7' */ : case 0x38 /* '8' */ : case 0x39 /* '9' */ : { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); } } } { // ( ... )+ int _cnt31=0; for (;;) { if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) { mDIGIT(false); } else { if ( _cnt31>=1 ) { goto _loop31; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());} } _cnt31++; } _loop31:; } // ( ... )+ } else { } } if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mPLUS(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = PLUS; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'+' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mMINUS(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = MINUS; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'-' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mNL(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = NL; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; { switch ( LA(1)) { case 0xd /* '\r' */ : { match(L'\r' /* charlit */ ); break; } case 0xa /* '\n' */ : { match(L'\n' /* charlit */ ); newline(); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); } } } if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mCOMMENT(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = COMMENT; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; { switch ( LA(1)) { case 0x2d /* '-' */ : { match(L'-' /* charlit */ ); match(L'-' /* charlit */ ); { // ( ... )* for (;;) { if ((_tokenSet_3.member(LA(1)))) { { match(_tokenSet_3); } } else { goto _loop38; } } _loop38:; } // ( ... )* mNL(false); newline(); break; } case 0x2f /* '/' */ : { match(L'/' /* charlit */ ); match(L'*' /* charlit */ ); { // ( ... )* for (;;) { // nongreedy exit test if ((LA(1) == 0x2a /* '*' */ ) && (LA(2) == 0x2f /* '/' */ )) goto _loop41; if ((_tokenSet_3.member(LA(1))) && ((LA(2) >= 0x0 /* '\0' */ && LA(2) <= 0xfffe))) { { match(_tokenSet_3); } } else if ((LA(1) == 0xa /* '\n' */ || LA(1) == 0xd /* '\r' */ )) { mNL(false); newline(); } else { goto _loop41; } } _loop41:; } // ( ... )* match(L'*' /* charlit */ ); match(L'/' /* charlit */ ); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); } } } _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mWS(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = WS; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; { switch ( LA(1)) { case 0x20 /* ' ' */ : { match(L' ' /* charlit */ ); break; } case 0x9 /* '\t' */ : { match(L'\t' /* charlit */ ); break; } case 0xc /* '\14' */ : { match(L'\14' /* charlit */ ); break; } case 0xa /* '\n' */ : case 0xd /* '\r' */ : { mNL(false); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn()); } } } _ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mSTRINGLITERAL(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = STRINGLITERAL; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'\'' /* charlit */ ); { // ( ... )* for (;;) { if ((LA(1) == 0x27 /* '\'' */ ) && (LA(2) == 0x27 /* '\'' */ )) { { match(L'\'' /* charlit */ ); match(L'\'' /* charlit */ ); } } else if ((_tokenSet_4.member(LA(1)))) { matchNot(L'\'' /* charlit */ ); } else { goto _loop47; } } _loop47:; } // ( ... )* match(L'\'' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mLPAREN(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = LPAREN; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'(' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mRPAREN(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = RPAREN; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L')' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mCOMMA(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = COMMA; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L',' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mSEMI(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = SEMI; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L';' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mSTAR(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = STAR; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'*' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mTILDE(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = TILDE; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'~' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mAMPERSAND(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = AMPERSAND; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'&' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mBITOR(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = BITOR; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'|' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mOROP(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = OROP; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; mBITOR(false); mBITOR(false); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mEQUAL(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = EQUAL; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'=' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mEQUAL2(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = EQUAL2; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; mEQUAL(false); mEQUAL(false); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mGREATER(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = GREATER; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'>' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mGREATEREQUAL(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = GREATEREQUAL; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; mGREATER(false); mEQUAL(false); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mLOWER(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = LOWER; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'<' /* charlit */ ); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mLOWEREQUAL(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = LOWEREQUAL; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; mLOWER(false); mEQUAL(false); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mUNEQUAL(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = UNEQUAL; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; match(L'!' /* charlit */ ); mEQUAL(false); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mUNEQUAL2(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = UNEQUAL2; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; mLOWER(false); mGREATER(false); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mBITWISELEFT(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = BITWISELEFT; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; mLOWER(false); mLOWER(false); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } void Sqlite3Lexer::mBITWISERIGHT(bool _createToken) { int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length(); _ttype = BITWISERIGHT; ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex; mGREATER(false); mGREATER(false); if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) { _token = makeToken(_ttype); _token->setText(text.substr(_begin, text.length()-_begin)); } _returnToken = _token; _saveIndex=0; } const unsigned long Sqlite3Lexer::_tokenSet_0_data_[] = { 4294967295UL, 4294967295UL, 4294967295UL, 4294967294UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 2147483647UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 // 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e // 0x1f ! \" # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > // ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ // a b c d e f g h i j k l m n o p q r s t u v w x const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Lexer::_tokenSet_0(_tokenSet_0_data_,4096); const unsigned long Sqlite3Lexer::_tokenSet_1_data_[] = { 4294967295UL, 4294967295UL, 3758096383UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 2147483647UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 // 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e // 0x1f ! \" # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > // ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ^ _ ` // a b c d e f g h i j k l m n o p q r s t u v w x const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Lexer::_tokenSet_1(_tokenSet_1_data_,4096); const unsigned long Sqlite3Lexer::_tokenSet_2_data_[] = { 4294967295UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 2147483647UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 // 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e // 0x1f ! # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? // @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` // a b c d e f g h i j k l m n o p q r s t u v w x const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Lexer::_tokenSet_2(_tokenSet_2_data_,4096); const unsigned long Sqlite3Lexer::_tokenSet_3_data_[] = { 4294958079UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 2147483647UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12 // 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f ! // \" # $ % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B // C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` a b c // d e f g h i j k l m n o p q r s t u v w x const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Lexer::_tokenSet_3(_tokenSet_3_data_,4096); const unsigned long Sqlite3Lexer::_tokenSet_4_data_[] = { 4294967295UL, 4294967167UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 2147483647UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL }; // 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 // 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e // 0x1f ! \" # $ % & ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? // @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` // a b c d e f g h i j k l m n o p q r s t u v w x const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Lexer::_tokenSet_4(_tokenSet_4_data_,4096); sqlitebrowser-3.11.2/src/grammar/Sqlite3Lexer.hpp000066400000000000000000000051741345112435200217640ustar00rootroot00000000000000#ifndef INC_Sqlite3Lexer_hpp_ #define INC_Sqlite3Lexer_hpp_ #include /* $ANTLR 2.7.7 (20171109): "sqlite3.g" -> "Sqlite3Lexer.hpp"$ */ #include #include #include #include "sqlite3TokenTypes.hpp" #include class CUSTOM_API Sqlite3Lexer : public ANTLR_USE_NAMESPACE(antlr)CharScanner, public sqlite3TokenTypes { private: void initLiterals(); public: bool getCaseSensitiveLiterals() const { return false; } public: Sqlite3Lexer(ANTLR_USE_NAMESPACE(std)istream& in); Sqlite3Lexer(ANTLR_USE_NAMESPACE(antlr)InputBuffer& ib); Sqlite3Lexer(const ANTLR_USE_NAMESPACE(antlr)LexerSharedInputState& state); ANTLR_USE_NAMESPACE(antlr)RefToken nextToken(); protected: void mDIGIT(bool _createToken); protected: void mDOT(bool _createToken); public: void mID(bool _createToken); public: void mQUOTEDID(bool _createToken); public: void mQUOTEDLITERAL(bool _createToken); public: void mNUMERIC(bool _createToken); public: void mPLUS(bool _createToken); public: void mMINUS(bool _createToken); protected: void mNL(bool _createToken); public: void mCOMMENT(bool _createToken); public: void mWS(bool _createToken); public: void mSTRINGLITERAL(bool _createToken); public: void mLPAREN(bool _createToken); public: void mRPAREN(bool _createToken); public: void mCOMMA(bool _createToken); public: void mSEMI(bool _createToken); public: void mSTAR(bool _createToken); public: void mTILDE(bool _createToken); public: void mAMPERSAND(bool _createToken); public: void mBITOR(bool _createToken); public: void mOROP(bool _createToken); public: void mEQUAL(bool _createToken); public: void mEQUAL2(bool _createToken); public: void mGREATER(bool _createToken); public: void mGREATEREQUAL(bool _createToken); public: void mLOWER(bool _createToken); public: void mLOWEREQUAL(bool _createToken); public: void mUNEQUAL(bool _createToken); public: void mUNEQUAL2(bool _createToken); public: void mBITWISELEFT(bool _createToken); public: void mBITWISERIGHT(bool _createToken); private: static const unsigned long _tokenSet_0_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; static const unsigned long _tokenSet_1_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; static const unsigned long _tokenSet_2_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2; static const unsigned long _tokenSet_3_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3; static const unsigned long _tokenSet_4_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4; }; #endif /*INC_Sqlite3Lexer_hpp_*/ sqlitebrowser-3.11.2/src/grammar/Sqlite3Parser.cpp000066400000000000000000004526371345112435200221460ustar00rootroot00000000000000/* $ANTLR 2.7.7 (20171109): "sqlite3.g" -> "Sqlite3Parser.cpp"$ */ #include "Sqlite3Parser.hpp" #include #include #include Sqlite3Parser::Sqlite3Parser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k) : ANTLR_USE_NAMESPACE(antlr)LLkParser(tokenBuf,k) { } Sqlite3Parser::Sqlite3Parser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf) : ANTLR_USE_NAMESPACE(antlr)LLkParser(tokenBuf,2) { } Sqlite3Parser::Sqlite3Parser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer, int k) : ANTLR_USE_NAMESPACE(antlr)LLkParser(lexer,k) { } Sqlite3Parser::Sqlite3Parser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer) : ANTLR_USE_NAMESPACE(antlr)LLkParser(lexer,2) { } Sqlite3Parser::Sqlite3Parser(const ANTLR_USE_NAMESPACE(antlr)ParserSharedInputState& state) : ANTLR_USE_NAMESPACE(antlr)LLkParser(state,2) { } void Sqlite3Parser::id() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST id_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; switch ( LA(1)) { case ID: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp1_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp1_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp1_AST); } match(ID); id_AST = currentAST.root; break; } case QUOTEDID: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp2_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp2_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp2_AST); } match(QUOTEDID); id_AST = currentAST.root; break; } case QUOTEDLITERAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp3_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp3_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp3_AST); } match(QUOTEDLITERAL); id_AST = currentAST.root; break; } case STRINGLITERAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp4_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp4_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp4_AST); } match(STRINGLITERAL); id_AST = currentAST.root; break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } returnAST = id_AST; } void Sqlite3Parser::databasename() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST databasename_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; id(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } databasename_AST = currentAST.root; returnAST = databasename_AST; } void Sqlite3Parser::tablename() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST tablename_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; id(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } tablename_AST = currentAST.root; returnAST = tablename_AST; } void Sqlite3Parser::nonkeyword_columnname() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST nonkeyword_columnname_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; id(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } nonkeyword_columnname_AST = currentAST.root; returnAST = nonkeyword_columnname_AST; } void Sqlite3Parser::identifier() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST identifier_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { if ((_tokenSet_0.member(LA(1))) && (_tokenSet_0.member(LA(2)))) { { switch ( LA(1)) { case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { databasename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case DOT: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp5_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp5_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp5_AST); } match(DOT); } else if ((_tokenSet_1.member(LA(1))) && (LA(2) == ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE)) { } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } tablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } identifier_AST = currentAST.root; returnAST = identifier_AST; } void Sqlite3Parser::collationname() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST collationname_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)RefAST tmp6_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp6_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp6_AST); } match(ID); collationname_AST = currentAST.root; returnAST = collationname_AST; } void Sqlite3Parser::signednumber() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST signednumber_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { switch ( LA(1)) { case PLUS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp7_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp7_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp7_AST); } match(PLUS); break; } case MINUS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp8_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp8_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp8_AST); } match(MINUS); break; } case NUMERIC: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp9_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp9_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp9_AST); } match(NUMERIC); signednumber_AST = currentAST.root; returnAST = signednumber_AST; } void Sqlite3Parser::statementlist() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST statementlist_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { switch ( LA(1)) { case CREATE: { statement(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE: case SEMI: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { // ( ... )* for (;;) { if ((LA(1) == SEMI)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp10_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp10_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp10_AST); } match(SEMI); statement(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop82; } } _loop82:; } // ( ... )* statementlist_AST = currentAST.root; returnAST = statementlist_AST; } void Sqlite3Parser::statement() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST statement_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ((LA(1) == CREATE) && (_tokenSet_2.member(LA(2)))) { createtable(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } statement_AST = currentAST.root; } else if ((LA(1) == CREATE) && (LA(2) == INDEX || LA(2) == UNIQUE)) { createindex(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } statement_AST = currentAST.root; } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } returnAST = statement_AST; } void Sqlite3Parser::createtable() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST createtable_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ((LA(1) == CREATE) && (LA(2) == TABLE || LA(2) == TEMPORARY || LA(2) == TEMP)) { { ANTLR_USE_NAMESPACE(antlr)RefAST tmp11_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp11_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp11_AST); } match(CREATE); { switch ( LA(1)) { case TEMP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp12_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp12_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp12_AST); } match(TEMP); break; } case TEMPORARY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp13_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp13_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp13_AST); } match(TEMPORARY); break; } case TABLE: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp14_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp14_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp14_AST); } match(TABLE); { switch ( LA(1)) { case IF_T: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp15_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp15_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp15_AST); } match(IF_T); ANTLR_USE_NAMESPACE(antlr)RefAST tmp16_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp16_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp16_AST); } match(NOT); ANTLR_USE_NAMESPACE(antlr)RefAST tmp17_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp17_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp17_AST); } match(EXISTS); break; } case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case ELSE_T: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { tablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case ELSE_T: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: { keywordastablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case LPAREN: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp18_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp18_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp18_AST); } match(LPAREN); columndef(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((LA(1) == COMMA) && (_tokenSet_3.member(LA(2)))) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp19_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp19_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp19_AST); } match(COMMA); columndef(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop94; } } _loop94:; } // ( ... )* { // ( ... )* for (;;) { if ((_tokenSet_4.member(LA(1)))) { { switch ( LA(1)) { case COMMA: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp20_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp20_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp20_AST); } match(COMMA); break; } case CHECK: case CONSTRAINT: case FOREIGN: case PRIMARY: case UNIQUE: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } tableconstraint(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop97; } } _loop97:; } // ( ... )* ANTLR_USE_NAMESPACE(antlr)RefAST tmp21_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp21_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp21_AST); } match(RPAREN); { switch ( LA(1)) { case WITHOUT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp22_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp22_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp22_AST); } match(WITHOUT); ANTLR_USE_NAMESPACE(antlr)RefAST tmp23_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp23_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp23_AST); } match(ROWID); break; } case ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE: case SEMI: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case AS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp24_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp24_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp24_AST); } match(AS); selectstmt(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } if ( inputState->guessing==0 ) { createtable_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root); createtable_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(CREATETABLE,"CREATETABLE"))->add(createtable_AST))); currentAST.root = createtable_AST; if ( createtable_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST && createtable_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST ) currentAST.child = createtable_AST->getFirstChild(); else currentAST.child = createtable_AST; currentAST.advanceChildToEnd(); } } createtable_AST = currentAST.root; } else if ((LA(1) == CREATE) && (LA(2) == VIRTUAL)) { { ANTLR_USE_NAMESPACE(antlr)RefAST tmp25_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp25_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp25_AST); } match(CREATE); ANTLR_USE_NAMESPACE(antlr)RefAST tmp26_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp26_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp26_AST); } match(VIRTUAL); ANTLR_USE_NAMESPACE(antlr)RefAST tmp27_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp27_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp27_AST); } match(TABLE); { switch ( LA(1)) { case IF_T: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp28_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp28_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp28_AST); } match(IF_T); ANTLR_USE_NAMESPACE(antlr)RefAST tmp29_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp29_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp29_AST); } match(NOT); ANTLR_USE_NAMESPACE(antlr)RefAST tmp30_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp30_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp30_AST); } match(EXISTS); break; } case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case ELSE_T: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { tablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case ELSE_T: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: { keywordastablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp31_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp31_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp31_AST); } match(USING); name(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { switch ( LA(1)) { case LPAREN: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp32_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp32_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp32_AST); } match(LPAREN); { switch ( LA(1)) { case ABORT: case ACTION: case ASC: case CASCADE: case CASE_T: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IF_T: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case NOT: case NULL_T: case MATCH: case EXISTS: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case NUMERIC: case STRINGLITERAL: case LPAREN: case PLUS: case MINUS: case TILDE: { expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp33_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp33_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp33_AST); } match(COMMA); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop105; } } _loop105:; } // ( ... )* break; } case RPAREN: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp34_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp34_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp34_AST); } match(RPAREN); break; } case ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE: case SEMI: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } } createtable_AST = currentAST.root; } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } returnAST = createtable_AST; } void Sqlite3Parser::createindex() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST createindex_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)RefAST tmp35_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp35_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp35_AST); } match(CREATE); { switch ( LA(1)) { case UNIQUE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp36_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp36_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp36_AST); } match(UNIQUE); break; } case INDEX: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp37_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp37_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp37_AST); } match(INDEX); { switch ( LA(1)) { case IF_T: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp38_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp38_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp38_AST); } match(IF_T); ANTLR_USE_NAMESPACE(antlr)RefAST tmp39_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp39_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp39_AST); } match(NOT); ANTLR_USE_NAMESPACE(antlr)RefAST tmp40_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp40_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp40_AST); } match(EXISTS); break; } case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case ELSE_T: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { tablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case ELSE_T: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: { keywordastablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp41_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp41_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp41_AST); } match(ON); { switch ( LA(1)) { case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { tablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case ELSE_T: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: { keywordastablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { ANTLR_USE_NAMESPACE(antlr)RefAST tmp42_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp42_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp42_AST); } match(LPAREN); indexedcolumn(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp43_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp43_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp43_AST); } match(COMMA); indexedcolumn(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop113; } } _loop113:; } // ( ... )* ANTLR_USE_NAMESPACE(antlr)RefAST tmp44_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp44_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp44_AST); } match(RPAREN); { switch ( LA(1)) { case WHERE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp45_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp45_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp45_AST); } match(WHERE); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case ANTLR_USE_NAMESPACE(antlr)Token::EOF_TYPE: case SEMI: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } } if ( inputState->guessing==0 ) { createindex_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root); createindex_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(CREATEINDEX,"CREATEINDEX"))->add(createindex_AST))); currentAST.root = createindex_AST; if ( createindex_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST && createindex_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST ) currentAST.child = createindex_AST->getFirstChild(); else currentAST.child = createindex_AST; currentAST.advanceChildToEnd(); } createindex_AST = currentAST.root; returnAST = createindex_AST; } void Sqlite3Parser::create_statements() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST create_statements_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ((LA(1) == CREATE) && (_tokenSet_2.member(LA(2)))) { createtable(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } create_statements_AST = currentAST.root; } else if ((LA(1) == CREATE) && (LA(2) == INDEX || LA(2) == UNIQUE)) { createindex(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } create_statements_AST = currentAST.root; } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } returnAST = create_statements_AST; } void Sqlite3Parser::keywordastablename() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST keywordastablename_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { switch ( LA(1)) { case ABORT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp46_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp46_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp46_AST); } match(ABORT); break; } case ACTION: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp47_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp47_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp47_AST); } match(ACTION); break; } case ASC: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp48_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp48_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp48_AST); } match(ASC); break; } case CASCADE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp49_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp49_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp49_AST); } match(CASCADE); break; } case CAST: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp50_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp50_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp50_AST); } match(CAST); break; } case CONFLICT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp51_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp51_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp51_AST); } match(CONFLICT); break; } case CURRENT_TIME: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp52_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp52_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp52_AST); } match(CURRENT_TIME); break; } case CURRENT_DATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp53_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp53_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp53_AST); } match(CURRENT_DATE); break; } case CURRENT_TIMESTAMP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp54_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp54_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp54_AST); } match(CURRENT_TIMESTAMP); break; } case DEFERRED: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp55_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp55_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp55_AST); } match(DEFERRED); break; } case DESC: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp56_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp56_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp56_AST); } match(DESC); break; } case ELSE_T: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp57_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp57_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp57_AST); } match(ELSE_T); break; } case END: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp58_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp58_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp58_AST); } match(END); break; } case FAIL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp59_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp59_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp59_AST); } match(FAIL); break; } case FILTER: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp60_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp60_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp60_AST); } match(FILTER); break; } case FOLLOWING: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp61_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp61_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp61_AST); } match(FOLLOWING); break; } case GLOB: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp62_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp62_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp62_AST); } match(GLOB); break; } case KEY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp63_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp63_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp63_AST); } match(KEY); break; } case LIKE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp64_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp64_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp64_AST); } match(LIKE); break; } case IGNORE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp65_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp65_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp65_AST); } match(IGNORE); break; } case INITIALLY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp66_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp66_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp66_AST); } match(INITIALLY); break; } case IMMEDIATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp67_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp67_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp67_AST); } match(IMMEDIATE); break; } case MATCH: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp68_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp68_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp68_AST); } match(MATCH); break; } case NO: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp69_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp69_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp69_AST); } match(NO); break; } case OVER: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp70_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp70_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp70_AST); } match(OVER); break; } case PARTITION: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp71_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp71_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp71_AST); } match(PARTITION); break; } case PRECEDING: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp72_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp72_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp72_AST); } match(PRECEDING); break; } case RAISE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp73_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp73_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp73_AST); } match(RAISE); break; } case RANGE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp74_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp74_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp74_AST); } match(RANGE); break; } case REGEXP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp75_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp75_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp75_AST); } match(REGEXP); break; } case REPLACE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp76_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp76_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp76_AST); } match(REPLACE); break; } case RESTRICT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp77_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp77_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp77_AST); } match(RESTRICT); break; } case ROLLBACK: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp78_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp78_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp78_AST); } match(ROLLBACK); break; } case ROWID: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp79_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp79_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp79_AST); } match(ROWID); break; } case ROWS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp80_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp80_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp80_AST); } match(ROWS); break; } case TEMPORARY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp81_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp81_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp81_AST); } match(TEMPORARY); break; } case TEMP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp82_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp82_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp82_AST); } match(TEMP); break; } case UNBOUNDED: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp83_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp83_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp83_AST); } match(UNBOUNDED); break; } case VIRTUAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp84_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp84_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp84_AST); } match(VIRTUAL); break; } case WITHOUT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp85_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp85_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp85_AST); } match(WITHOUT); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } if ( inputState->guessing==0 ) { keywordastablename_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root); keywordastablename_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(KEYWORDASTABLENAME,"KEYWORDASTABLENAME"))->add(keywordastablename_AST))); currentAST.root = keywordastablename_AST; if ( keywordastablename_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST && keywordastablename_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST ) currentAST.child = keywordastablename_AST->getFirstChild(); else currentAST.child = keywordastablename_AST; currentAST.advanceChildToEnd(); } keywordastablename_AST = currentAST.root; returnAST = keywordastablename_AST; } void Sqlite3Parser::columndef() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST columndef_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; columnname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { switch ( LA(1)) { case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case ELSE_T: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { type_name(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case CHECK: case COLLATE: case CONSTRAINT: case DEFAULT: case FOREIGN: case NOT: case NULL_T: case PRIMARY: case REFERENCES: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { // ( ... )* for (;;) { if ((_tokenSet_5.member(LA(1))) && (_tokenSet_6.member(LA(2)))) { columnconstraint(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop122; } } _loop122:; } // ( ... )* if ( inputState->guessing==0 ) { columndef_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root); columndef_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(COLUMNDEF,"COLUMNDEF"))->add(columndef_AST))); currentAST.root = columndef_AST; if ( columndef_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST && columndef_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST ) currentAST.child = columndef_AST->getFirstChild(); else currentAST.child = columndef_AST; currentAST.advanceChildToEnd(); } columndef_AST = currentAST.root; returnAST = columndef_AST; } void Sqlite3Parser::tableconstraint() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST tableconstraint_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { switch ( LA(1)) { case CONSTRAINT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp86_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp86_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp86_AST); } match(CONSTRAINT); name(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case CHECK: case FOREIGN: case PRIMARY: case UNIQUE: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case PRIMARY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp87_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp87_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp87_AST); } match(PRIMARY); ANTLR_USE_NAMESPACE(antlr)RefAST tmp88_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp88_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp88_AST); } match(KEY); ANTLR_USE_NAMESPACE(antlr)RefAST tmp89_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp89_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp89_AST); } match(LPAREN); indexedcolumn(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp90_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp90_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp90_AST); } match(COMMA); indexedcolumn(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop143; } } _loop143:; } // ( ... )* ANTLR_USE_NAMESPACE(antlr)RefAST tmp91_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp91_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp91_AST); } match(RPAREN); { switch ( LA(1)) { case ON: { conflictclause(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case CHECK: case CONSTRAINT: case FOREIGN: case PRIMARY: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case UNIQUE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp92_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp92_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp92_AST); } match(UNIQUE); ANTLR_USE_NAMESPACE(antlr)RefAST tmp93_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp93_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp93_AST); } match(LPAREN); indexedcolumn(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp94_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp94_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp94_AST); } match(COMMA); indexedcolumn(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop146; } } _loop146:; } // ( ... )* ANTLR_USE_NAMESPACE(antlr)RefAST tmp95_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp95_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp95_AST); } match(RPAREN); { switch ( LA(1)) { case ON: { conflictclause(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case CHECK: case CONSTRAINT: case FOREIGN: case PRIMARY: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case CHECK: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp96_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp96_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp96_AST); } match(CHECK); ANTLR_USE_NAMESPACE(antlr)RefAST tmp97_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp97_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp97_AST); } match(LPAREN); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp98_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp98_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp98_AST); } match(RPAREN); break; } case FOREIGN: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp99_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp99_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp99_AST); } match(FOREIGN); ANTLR_USE_NAMESPACE(antlr)RefAST tmp100_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp100_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp100_AST); } match(KEY); ANTLR_USE_NAMESPACE(antlr)RefAST tmp101_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp101_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp101_AST); } match(LPAREN); columnname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp102_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp102_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp102_AST); } match(COMMA); columnname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop149; } } _loop149:; } // ( ... )* ANTLR_USE_NAMESPACE(antlr)RefAST tmp103_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp103_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp103_AST); } match(RPAREN); foreignkeyclause(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } if ( inputState->guessing==0 ) { tableconstraint_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root); tableconstraint_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(TABLECONSTRAINT,"TABLECONSTRAINT"))->add(tableconstraint_AST))); currentAST.root = tableconstraint_AST; if ( tableconstraint_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST && tableconstraint_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST ) currentAST.child = tableconstraint_AST->getFirstChild(); else currentAST.child = tableconstraint_AST; currentAST.advanceChildToEnd(); } tableconstraint_AST = currentAST.root; returnAST = tableconstraint_AST; } void Sqlite3Parser::selectstmt() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST selectstmt_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)RefAST tmp104_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp104_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp104_AST); } match(SELECT); selectstmt_AST = currentAST.root; returnAST = selectstmt_AST; } void Sqlite3Parser::name() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST name_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; switch ( LA(1)) { case ID: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp105_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp105_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp105_AST); } match(ID); name_AST = currentAST.root; break; } case QUOTEDID: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp106_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp106_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp106_AST); } match(QUOTEDID); name_AST = currentAST.root; break; } case QUOTEDLITERAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp107_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp107_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp107_AST); } match(QUOTEDLITERAL); name_AST = currentAST.root; break; } case STRINGLITERAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp108_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp108_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp108_AST); } match(STRINGLITERAL); name_AST = currentAST.root; break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } returnAST = name_AST; } void Sqlite3Parser::expr() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST expr_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; switch ( LA(1)) { case LPAREN: { { ANTLR_USE_NAMESPACE(antlr)RefAST tmp109_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp109_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp109_AST); } match(LPAREN); { { if ((_tokenSet_7.member(LA(1))) && (_tokenSet_8.member(LA(2)))) { { subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )+ int _cnt180=0; for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp110_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp110_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp110_AST); } match(COMMA); subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { if ( _cnt180>=1 ) { goto _loop180; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());} } _cnt180++; } _loop180:; } // ( ... )+ ANTLR_USE_NAMESPACE(antlr)RefAST tmp111_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp111_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp111_AST); } match(RPAREN); binaryoperator(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp112_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp112_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp112_AST); } match(LPAREN); subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )+ int _cnt182=0; for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp113_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp113_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp113_AST); } match(COMMA); subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { if ( _cnt182>=1 ) { goto _loop182; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());} } _cnt182++; } _loop182:; } // ( ... )+ } } else if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) { { expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp114_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp114_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp114_AST); } match(RPAREN); } { // ( ... )* for (;;) { if ((LA(1) == AND || LA(1) == OR) && (_tokenSet_9.member(LA(2)))) { { switch ( LA(1)) { case AND: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp115_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp115_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp115_AST); } match(AND); break; } case OR: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp116_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp116_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp116_AST); } match(OR); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop186; } } _loop186:; } // ( ... )* } expr_AST = currentAST.root; break; } case ABORT: case ACTION: case ASC: case CASCADE: case CASE_T: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IF_T: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case NOT: case NULL_T: case MATCH: case EXISTS: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case NUMERIC: case STRINGLITERAL: case PLUS: case MINUS: case TILDE: { { subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((_tokenSet_11.member(LA(1))) && (_tokenSet_7.member(LA(2)))) { { switch ( LA(1)) { case GLOB: case LIKE: case IS: case MATCH: case REGEXP: case PLUS: case MINUS: case STAR: case AMPERSAND: case BITOR: case OROP: case EQUAL: case EQUAL2: case GREATER: case GREATEREQUAL: case LOWER: case LOWEREQUAL: case UNEQUAL: case UNEQUAL2: case BITWISELEFT: case BITWISERIGHT: case SLASH: case PERCENT: { binaryoperator(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case AND: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp117_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp117_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp117_AST); } match(AND); break; } case OR: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp118_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp118_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp118_AST); } match(OR); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop190; } } _loop190:; } // ( ... )* } expr_AST = currentAST.root; break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } returnAST = expr_AST; } void Sqlite3Parser::indexedcolumn() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST indexedcolumn_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { switch ( LA(1)) { case COLLATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp119_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp119_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp119_AST); } match(COLLATE); collationname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case AUTOINCREMENT: case ASC: case DESC: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case ASC: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp120_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp120_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp120_AST); } match(ASC); break; } case DESC: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp121_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp121_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp121_AST); } match(DESC); break; } case AUTOINCREMENT: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case AUTOINCREMENT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp122_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp122_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp122_AST); } match(AUTOINCREMENT); break; } case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } if ( inputState->guessing==0 ) { indexedcolumn_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root); indexedcolumn_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(INDEXEDCOLUMN,"INDEXEDCOLUMN"))->add(indexedcolumn_AST))); currentAST.root = indexedcolumn_AST; if ( indexedcolumn_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST && indexedcolumn_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST ) currentAST.child = indexedcolumn_AST->getFirstChild(); else currentAST.child = indexedcolumn_AST; currentAST.advanceChildToEnd(); } indexedcolumn_AST = currentAST.root; returnAST = indexedcolumn_AST; } void Sqlite3Parser::keywordascolumnname() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST keywordascolumnname_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { switch ( LA(1)) { case ABORT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp123_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp123_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp123_AST); } match(ABORT); break; } case ACTION: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp124_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp124_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp124_AST); } match(ACTION); break; } case ASC: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp125_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp125_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp125_AST); } match(ASC); break; } case CASCADE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp126_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp126_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp126_AST); } match(CASCADE); break; } case CAST: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp127_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp127_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp127_AST); } match(CAST); break; } case CONFLICT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp128_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp128_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp128_AST); } match(CONFLICT); break; } case CURRENT_TIME: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp129_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp129_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp129_AST); } match(CURRENT_TIME); break; } case CURRENT_DATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp130_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp130_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp130_AST); } match(CURRENT_DATE); break; } case CURRENT_TIMESTAMP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp131_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp131_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp131_AST); } match(CURRENT_TIMESTAMP); break; } case DEFERRED: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp132_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp132_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp132_AST); } match(DEFERRED); break; } case DESC: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp133_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp133_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp133_AST); } match(DESC); break; } case END: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp134_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp134_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp134_AST); } match(END); break; } case FAIL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp135_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp135_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp135_AST); } match(FAIL); break; } case FILTER: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp136_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp136_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp136_AST); } match(FILTER); break; } case FOLLOWING: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp137_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp137_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp137_AST); } match(FOLLOWING); break; } case GLOB: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp138_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp138_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp138_AST); } match(GLOB); break; } case KEY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp139_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp139_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp139_AST); } match(KEY); break; } case LIKE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp140_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp140_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp140_AST); } match(LIKE); break; } case IF_T: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp141_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp141_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp141_AST); } match(IF_T); break; } case IGNORE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp142_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp142_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp142_AST); } match(IGNORE); break; } case INITIALLY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp143_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp143_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp143_AST); } match(INITIALLY); break; } case IMMEDIATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp144_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp144_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp144_AST); } match(IMMEDIATE); break; } case MATCH: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp145_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp145_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp145_AST); } match(MATCH); break; } case NO: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp146_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp146_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp146_AST); } match(NO); break; } case OVER: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp147_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp147_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp147_AST); } match(OVER); break; } case PARTITION: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp148_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp148_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp148_AST); } match(PARTITION); break; } case PRECEDING: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp149_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp149_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp149_AST); } match(PRECEDING); break; } case RAISE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp150_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp150_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp150_AST); } match(RAISE); break; } case RANGE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp151_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp151_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp151_AST); } match(RANGE); break; } case REGEXP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp152_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp152_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp152_AST); } match(REGEXP); break; } case REPLACE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp153_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp153_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp153_AST); } match(REPLACE); break; } case RESTRICT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp154_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp154_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp154_AST); } match(RESTRICT); break; } case ROLLBACK: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp155_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp155_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp155_AST); } match(ROLLBACK); break; } case ROWID: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp156_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp156_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp156_AST); } match(ROWID); break; } case ROWS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp157_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp157_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp157_AST); } match(ROWS); break; } case TEMPORARY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp158_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp158_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp158_AST); } match(TEMPORARY); break; } case TEMP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp159_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp159_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp159_AST); } match(TEMP); break; } case UNBOUNDED: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp160_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp160_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp160_AST); } match(UNBOUNDED); break; } case VIRTUAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp161_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp161_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp161_AST); } match(VIRTUAL); break; } case WITHOUT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp162_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp162_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp162_AST); } match(WITHOUT); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } if ( inputState->guessing==0 ) { keywordascolumnname_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root); keywordascolumnname_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(KEYWORDASCOLUMNNAME,"KEYWORDASCOLUMNNAME"))->add(keywordascolumnname_AST))); currentAST.root = keywordascolumnname_AST; if ( keywordascolumnname_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST && keywordascolumnname_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST ) currentAST.child = keywordascolumnname_AST->getFirstChild(); else currentAST.child = keywordascolumnname_AST; currentAST.advanceChildToEnd(); } keywordascolumnname_AST = currentAST.root; returnAST = keywordascolumnname_AST; } void Sqlite3Parser::columnname() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST columnname_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { switch ( LA(1)) { case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { nonkeyword_columnname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IF_T: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: { keywordascolumnname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } if ( inputState->guessing==0 ) { } columnname_AST = currentAST.root; returnAST = columnname_AST; } void Sqlite3Parser::type_name() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST type_name_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { // ( ... )+ int _cnt126=0; for (;;) { switch ( LA(1)) { case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { name(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case ABORT: case ACTION: case ASC: case CASCADE: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case ELSE_T: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case MATCH: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: { keywordastablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { if ( _cnt126>=1 ) { goto _loop126; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());} } } _cnt126++; } _loop126:; } // ( ... )+ { switch ( LA(1)) { case LPAREN: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp163_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp163_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp163_AST); } match(LPAREN); signednumber(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { switch ( LA(1)) { case COMMA: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp164_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp164_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp164_AST); } match(COMMA); signednumber(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case RPAREN: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp165_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp165_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp165_AST); } match(RPAREN); break; } case CHECK: case COLLATE: case CONSTRAINT: case DEFAULT: case FOREIGN: case NOT: case NULL_T: case PRIMARY: case REFERENCES: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } if ( inputState->guessing==0 ) { type_name_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root); type_name_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(TYPE_NAME,"TYPE_NAME"))->add(type_name_AST))); currentAST.root = type_name_AST; if ( type_name_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST && type_name_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST ) currentAST.child = type_name_AST->getFirstChild(); else currentAST.child = type_name_AST; currentAST.advanceChildToEnd(); } type_name_AST = currentAST.root; returnAST = type_name_AST; } void Sqlite3Parser::columnconstraint() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST columnconstraint_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { switch ( LA(1)) { case CONSTRAINT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp166_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp166_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp166_AST); } match(CONSTRAINT); name(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case CHECK: case COLLATE: case DEFAULT: case NOT: case NULL_T: case PRIMARY: case REFERENCES: case UNIQUE: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case PRIMARY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp167_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp167_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp167_AST); } match(PRIMARY); ANTLR_USE_NAMESPACE(antlr)RefAST tmp168_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp168_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp168_AST); } match(KEY); { switch ( LA(1)) { case ASC: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp169_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp169_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp169_AST); } match(ASC); break; } case DESC: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp170_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp170_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp170_AST); } match(DESC); break; } case AUTOINCREMENT: case CHECK: case COLLATE: case CONSTRAINT: case DEFAULT: case FOREIGN: case NOT: case NULL_T: case ON: case PRIMARY: case REFERENCES: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case ON: { conflictclause(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case AUTOINCREMENT: case CHECK: case COLLATE: case CONSTRAINT: case DEFAULT: case FOREIGN: case NOT: case NULL_T: case PRIMARY: case REFERENCES: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case AUTOINCREMENT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp171_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp171_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp171_AST); } match(AUTOINCREMENT); break; } case CHECK: case COLLATE: case CONSTRAINT: case DEFAULT: case FOREIGN: case NOT: case NULL_T: case PRIMARY: case REFERENCES: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case NOT: case NULL_T: { { switch ( LA(1)) { case NOT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp172_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp172_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp172_AST); } match(NOT); break; } case NULL_T: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp173_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp173_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp173_AST); } match(NULL_T); { switch ( LA(1)) { case ON: { conflictclause(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case CHECK: case COLLATE: case CONSTRAINT: case DEFAULT: case FOREIGN: case NOT: case NULL_T: case PRIMARY: case REFERENCES: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case UNIQUE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp174_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp174_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp174_AST); } match(UNIQUE); { switch ( LA(1)) { case ON: { conflictclause(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case CHECK: case COLLATE: case CONSTRAINT: case DEFAULT: case FOREIGN: case NOT: case NULL_T: case PRIMARY: case REFERENCES: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case CHECK: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp175_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp175_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp175_AST); } match(CHECK); ANTLR_USE_NAMESPACE(antlr)RefAST tmp176_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp176_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp176_AST); } match(LPAREN); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp177_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp177_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp177_AST); } match(RPAREN); break; } case DEFAULT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp178_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp178_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp178_AST); } match(DEFAULT); { switch ( LA(1)) { case QUOTEDLITERAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp179_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp179_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp179_AST); } match(QUOTEDLITERAL); break; } case LPAREN: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp180_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp180_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp180_AST); } match(LPAREN); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp181_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp181_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp181_AST); } match(RPAREN); break; } case ID: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp182_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp182_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp182_AST); } match(ID); break; } default: if ((_tokenSet_12.member(LA(1))) && (_tokenSet_13.member(LA(2)))) { literalvalue(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else if ((_tokenSet_14.member(LA(1))) && (_tokenSet_13.member(LA(2)))) { keywordastablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else if ((LA(1) == NUMERIC || LA(1) == PLUS || LA(1) == MINUS) && (_tokenSet_15.member(LA(2)))) { signednumber(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case COLLATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp183_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp183_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp183_AST); } match(COLLATE); collationname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case REFERENCES: { foreignkeyclause(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } if ( inputState->guessing==0 ) { columnconstraint_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(currentAST.root); columnconstraint_AST = ANTLR_USE_NAMESPACE(antlr)RefAST(astFactory->make((new ANTLR_USE_NAMESPACE(antlr)ASTArray(2))->add(astFactory->create(COLUMNCONSTRAINT,"COLUMNCONSTRAINT"))->add(columnconstraint_AST))); currentAST.root = columnconstraint_AST; if ( columnconstraint_AST!=ANTLR_USE_NAMESPACE(antlr)nullAST && columnconstraint_AST->getFirstChild() != ANTLR_USE_NAMESPACE(antlr)nullAST ) currentAST.child = columnconstraint_AST->getFirstChild(); else currentAST.child = columnconstraint_AST; currentAST.advanceChildToEnd(); } columnconstraint_AST = currentAST.root; returnAST = columnconstraint_AST; } void Sqlite3Parser::conflictclause() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST conflictclause_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)RefAST tmp184_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp184_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp184_AST); } match(ON); ANTLR_USE_NAMESPACE(antlr)RefAST tmp185_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp185_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp185_AST); } match(CONFLICT); { switch ( LA(1)) { case ROLLBACK: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp186_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp186_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp186_AST); } match(ROLLBACK); break; } case ABORT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp187_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp187_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp187_AST); } match(ABORT); break; } case FAIL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp188_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp188_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp188_AST); } match(FAIL); break; } case IGNORE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp189_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp189_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp189_AST); } match(IGNORE); break; } case REPLACE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp190_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp190_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp190_AST); } match(REPLACE); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } conflictclause_AST = currentAST.root; returnAST = conflictclause_AST; } void Sqlite3Parser::literalvalue() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST literalvalue_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; switch ( LA(1)) { case NUMERIC: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp191_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp191_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp191_AST); } match(NUMERIC); literalvalue_AST = currentAST.root; break; } case STRINGLITERAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp192_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp192_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp192_AST); } match(STRINGLITERAL); literalvalue_AST = currentAST.root; break; } case NULL_T: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp193_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp193_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp193_AST); } match(NULL_T); literalvalue_AST = currentAST.root; break; } case CURRENT_TIME: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp194_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp194_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp194_AST); } match(CURRENT_TIME); literalvalue_AST = currentAST.root; break; } case CURRENT_DATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp195_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp195_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp195_AST); } match(CURRENT_DATE); literalvalue_AST = currentAST.root; break; } case CURRENT_TIMESTAMP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp196_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp196_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp196_AST); } match(CURRENT_TIMESTAMP); literalvalue_AST = currentAST.root; break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } returnAST = literalvalue_AST; } void Sqlite3Parser::foreignkeyclause() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST foreignkeyclause_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)RefAST tmp197_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp197_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp197_AST); } match(REFERENCES); tablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { switch ( LA(1)) { case LPAREN: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp198_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp198_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp198_AST); } match(LPAREN); columnname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp199_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp199_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp199_AST); } match(COMMA); columnname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop159; } } _loop159:; } // ( ... )* ANTLR_USE_NAMESPACE(antlr)RefAST tmp200_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp200_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp200_AST); } match(RPAREN); break; } case CHECK: case COLLATE: case CONSTRAINT: case DEFAULT: case DEFERRABLE: case FOREIGN: case NOT: case NULL_T: case MATCH: case ON: case PRIMARY: case REFERENCES: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { // ( ... )* for (;;) { switch ( LA(1)) { case ON: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp201_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp201_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp201_AST); } match(ON); { switch ( LA(1)) { case DELETE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp202_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp202_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp202_AST); } match(DELETE); break; } case UPDATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp203_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp203_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp203_AST); } match(UPDATE); break; } case INSERT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp204_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp204_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp204_AST); } match(INSERT); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case SET: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp205_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp205_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp205_AST); } match(SET); { switch ( LA(1)) { case NULL_T: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp206_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp206_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp206_AST); } match(NULL_T); break; } case DEFAULT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp207_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp207_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp207_AST); } match(DEFAULT); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case CASCADE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp208_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp208_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp208_AST); } match(CASCADE); break; } case RESTRICT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp209_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp209_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp209_AST); } match(RESTRICT); break; } case NO: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp210_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp210_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp210_AST); } match(NO); ANTLR_USE_NAMESPACE(antlr)RefAST tmp211_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp211_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp211_AST); } match(ACTION); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case MATCH: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp212_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp212_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp212_AST); } match(MATCH); name(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { goto _loop164; } } } _loop164:; } // ( ... )* { bool synPredMatched167 = false; if (((LA(1) == NOT) && (LA(2) == DEFERRABLE))) { int _m167 = mark(); synPredMatched167 = true; inputState->guessing++; try { { match(NOT); match(DEFERRABLE); } } catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) { synPredMatched167 = false; } rewind(_m167); inputState->guessing--; } if ( synPredMatched167 ) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp213_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp213_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp213_AST); } match(NOT); ANTLR_USE_NAMESPACE(antlr)RefAST tmp214_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp214_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp214_AST); } match(DEFERRABLE); { switch ( LA(1)) { case INITIALLY: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp215_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp215_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp215_AST); } match(INITIALLY); { switch ( LA(1)) { case DEFERRED: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp216_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp216_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp216_AST); } match(DEFERRED); break; } case IMMEDIATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp217_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp217_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp217_AST); } match(IMMEDIATE); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case CHECK: case COLLATE: case CONSTRAINT: case DEFAULT: case FOREIGN: case NOT: case NULL_T: case PRIMARY: case REFERENCES: case UNIQUE: case RPAREN: case COMMA: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } } else if ((LA(1) == DEFERRABLE)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp218_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp218_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp218_AST); } match(DEFERRABLE); { ANTLR_USE_NAMESPACE(antlr)RefAST tmp219_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp219_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp219_AST); } match(INITIALLY); { switch ( LA(1)) { case DEFERRED: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp220_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp220_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp220_AST); } match(DEFERRED); break; } case IMMEDIATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp221_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp221_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp221_AST); } match(IMMEDIATE); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } } } else if ((_tokenSet_13.member(LA(1))) && (_tokenSet_16.member(LA(2)))) { } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } foreignkeyclause_AST = currentAST.root; returnAST = foreignkeyclause_AST; } void Sqlite3Parser::functionname() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST functionname_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; id(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } functionname_AST = currentAST.root; returnAST = functionname_AST; } void Sqlite3Parser::subexpr() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST subexpr_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; { switch ( LA(1)) { case MINUS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp222_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp222_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp222_AST); } match(MINUS); break; } case PLUS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp223_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp223_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp223_AST); } match(PLUS); break; } case TILDE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp224_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp224_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp224_AST); } match(TILDE); break; } case NOT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp225_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp225_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp225_AST); } match(NOT); break; } case ABORT: case ACTION: case ASC: case CASCADE: case CASE_T: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IF_T: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case NULL_T: case MATCH: case EXISTS: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case NUMERIC: case STRINGLITERAL: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case EXISTS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp226_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp226_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp226_AST); } match(EXISTS); ANTLR_USE_NAMESPACE(antlr)RefAST tmp227_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp227_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp227_AST); } match(LPAREN); { switch ( LA(1)) { case ABORT: case ACTION: case ASC: case CASCADE: case CASE_T: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IF_T: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case NOT: case NULL_T: case MATCH: case EXISTS: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case NUMERIC: case STRINGLITERAL: case LPAREN: case PLUS: case MINUS: case TILDE: { expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case SELECT: { selectstmt(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp228_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp228_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp228_AST); } match(RPAREN); break; } case CASE_T: { caseexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: if ((_tokenSet_12.member(LA(1))) && (_tokenSet_17.member(LA(2)))) { literalvalue(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_18.member(LA(2)))) { { if ((_tokenSet_1.member(LA(1))) && (LA(2) == DOT)) { { if ((_tokenSet_1.member(LA(1))) && (LA(2) == DOT)) { databasename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp229_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp229_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp229_AST); } match(DOT); } else if ((_tokenSet_1.member(LA(1))) && (LA(2) == DOT)) { } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } tablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp230_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp230_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp230_AST); } match(DOT); } else if ((_tokenSet_3.member(LA(1))) && (_tokenSet_17.member(LA(2)))) { } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } columnname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else if ((_tokenSet_1.member(LA(1))) && (LA(2) == LPAREN)) { functionname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp231_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp231_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp231_AST); } match(LPAREN); { switch ( LA(1)) { case ABORT: case ACTION: case ASC: case CASCADE: case CASE_T: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IF_T: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case NOT: case NULL_T: case MATCH: case EXISTS: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case NUMERIC: case STRINGLITERAL: case LPAREN: case PLUS: case MINUS: case TILDE: { expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp232_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp232_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp232_AST); } match(COMMA); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop198; } } _loop198:; } // ( ... )* break; } case RPAREN: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp233_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp233_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp233_AST); } match(RPAREN); } else if ((LA(1) == CAST) && (LA(2) == LPAREN)) { castexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else if ((LA(1) == RAISE) && (LA(2) == LPAREN)) { raisefunction(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { if ((_tokenSet_19.member(LA(1))) && (_tokenSet_20.member(LA(2)))) { suffixexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_22.member(LA(2)))) { } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } subexpr_AST = currentAST.root; returnAST = subexpr_AST; } void Sqlite3Parser::binaryoperator() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST binaryoperator_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; switch ( LA(1)) { case OROP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp234_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp234_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp234_AST); } match(OROP); binaryoperator_AST = currentAST.root; break; } case STAR: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp235_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp235_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp235_AST); } match(STAR); binaryoperator_AST = currentAST.root; break; } case SLASH: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp236_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp236_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp236_AST); } match(SLASH); binaryoperator_AST = currentAST.root; break; } case PERCENT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp237_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp237_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp237_AST); } match(PERCENT); binaryoperator_AST = currentAST.root; break; } case PLUS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp238_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp238_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp238_AST); } match(PLUS); binaryoperator_AST = currentAST.root; break; } case MINUS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp239_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp239_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp239_AST); } match(MINUS); binaryoperator_AST = currentAST.root; break; } case BITWISELEFT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp240_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp240_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp240_AST); } match(BITWISELEFT); binaryoperator_AST = currentAST.root; break; } case BITWISERIGHT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp241_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp241_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp241_AST); } match(BITWISERIGHT); binaryoperator_AST = currentAST.root; break; } case AMPERSAND: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp242_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp242_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp242_AST); } match(AMPERSAND); binaryoperator_AST = currentAST.root; break; } case BITOR: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp243_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp243_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp243_AST); } match(BITOR); binaryoperator_AST = currentAST.root; break; } case LOWER: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp244_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp244_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp244_AST); } match(LOWER); binaryoperator_AST = currentAST.root; break; } case LOWEREQUAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp245_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp245_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp245_AST); } match(LOWEREQUAL); binaryoperator_AST = currentAST.root; break; } case GREATER: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp246_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp246_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp246_AST); } match(GREATER); binaryoperator_AST = currentAST.root; break; } case GREATEREQUAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp247_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp247_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp247_AST); } match(GREATEREQUAL); binaryoperator_AST = currentAST.root; break; } case EQUAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp248_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp248_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp248_AST); } match(EQUAL); binaryoperator_AST = currentAST.root; break; } case EQUAL2: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp249_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp249_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp249_AST); } match(EQUAL2); binaryoperator_AST = currentAST.root; break; } case UNEQUAL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp250_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp250_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp250_AST); } match(UNEQUAL); binaryoperator_AST = currentAST.root; break; } case UNEQUAL2: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp251_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp251_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp251_AST); } match(UNEQUAL2); binaryoperator_AST = currentAST.root; break; } case IS: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp252_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp252_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp252_AST); } match(IS); binaryoperator_AST = currentAST.root; break; } case GLOB: case LIKE: case MATCH: case REGEXP: { like_operator(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } binaryoperator_AST = currentAST.root; break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } returnAST = binaryoperator_AST; } void Sqlite3Parser::castexpr() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST castexpr_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)RefAST tmp253_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp253_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp253_AST); } match(CAST); ANTLR_USE_NAMESPACE(antlr)RefAST tmp254_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp254_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp254_AST); } match(LPAREN); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp255_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp255_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp255_AST); } match(AS); type_name(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp256_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp256_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp256_AST); } match(RPAREN); castexpr_AST = currentAST.root; returnAST = castexpr_AST; } void Sqlite3Parser::caseexpr() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST caseexpr_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)RefAST tmp257_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp257_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp257_AST); } match(CASE_T); { switch ( LA(1)) { case ABORT: case ACTION: case ASC: case CASCADE: case CASE_T: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IF_T: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case NOT: case NULL_T: case MATCH: case EXISTS: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case NUMERIC: case STRINGLITERAL: case LPAREN: case PLUS: case MINUS: case TILDE: { expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case WHEN: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { // ( ... )+ int _cnt205=0; for (;;) { if ((LA(1) == WHEN)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp258_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp258_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp258_AST); } match(WHEN); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } ANTLR_USE_NAMESPACE(antlr)RefAST tmp259_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp259_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp259_AST); } match(THEN); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { if ( _cnt205>=1 ) { goto _loop205; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());} } _cnt205++; } _loop205:; } // ( ... )+ { switch ( LA(1)) { case ELSE_T: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp260_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp260_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp260_AST); } match(ELSE_T); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case END: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp261_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp261_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp261_AST); } match(END); caseexpr_AST = currentAST.root; returnAST = caseexpr_AST; } void Sqlite3Parser::raisefunction() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST raisefunction_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)RefAST tmp262_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp262_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp262_AST); } match(RAISE); ANTLR_USE_NAMESPACE(antlr)RefAST tmp263_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp263_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp263_AST); } match(LPAREN); { switch ( LA(1)) { case IGNORE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp264_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp264_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp264_AST); } match(IGNORE); break; } case ABORT: case FAIL: case ROLLBACK: { { switch ( LA(1)) { case ROLLBACK: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp265_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp265_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp265_AST); } match(ROLLBACK); break; } case ABORT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp266_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp266_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp266_AST); } match(ABORT); break; } case FAIL: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp267_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp267_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp267_AST); } match(FAIL); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp268_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp268_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp268_AST); } match(COMMA); ANTLR_USE_NAMESPACE(antlr)RefAST tmp269_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp269_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp269_AST); } match(STRINGLITERAL); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp270_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp270_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp270_AST); } match(RPAREN); raisefunction_AST = currentAST.root; returnAST = raisefunction_AST; } void Sqlite3Parser::suffixexpr() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST suffixexpr_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; switch ( LA(1)) { case COLLATE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp271_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp271_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp271_AST); } match(COLLATE); collationname(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } suffixexpr_AST = currentAST.root; break; } case BETWEEN: case GLOB: case LIKE: case IN: case NOT: case MATCH: case REGEXP: { { switch ( LA(1)) { case NOT: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp272_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp272_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp272_AST); } match(NOT); break; } case BETWEEN: case GLOB: case LIKE: case IN: case MATCH: case REGEXP: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } { switch ( LA(1)) { case BETWEEN: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp273_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp273_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp273_AST); } match(BETWEEN); subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((_tokenSet_23.member(LA(1)))) { { switch ( LA(1)) { case GLOB: case LIKE: case IS: case MATCH: case REGEXP: case PLUS: case MINUS: case STAR: case AMPERSAND: case BITOR: case OROP: case EQUAL: case EQUAL2: case GREATER: case GREATEREQUAL: case LOWER: case LOWEREQUAL: case UNEQUAL: case UNEQUAL2: case BITWISELEFT: case BITWISERIGHT: case SLASH: case PERCENT: { binaryoperator(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case OR: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp274_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp274_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp274_AST); } match(OR); break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop216; } } _loop216:; } // ( ... )* ANTLR_USE_NAMESPACE(antlr)RefAST tmp275_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp275_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp275_AST); } match(AND); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case IN: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp276_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp276_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp276_AST); } match(IN); { switch ( LA(1)) { case LPAREN: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp277_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp277_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp277_AST); } match(LPAREN); { switch ( LA(1)) { case SELECT: { selectstmt(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } case ABORT: case ACTION: case ASC: case CASCADE: case CASE_T: case CAST: case CONFLICT: case CURRENT_TIME: case CURRENT_DATE: case CURRENT_TIMESTAMP: case DEFERRED: case DESC: case END: case FAIL: case FILTER: case FOLLOWING: case GLOB: case KEY: case LIKE: case IF_T: case IGNORE: case INITIALLY: case IMMEDIATE: case NO: case NOT: case NULL_T: case MATCH: case EXISTS: case OVER: case PARTITION: case PRECEDING: case RAISE: case RANGE: case REGEXP: case REPLACE: case RESTRICT: case ROLLBACK: case ROWID: case ROWS: case TEMPORARY: case TEMP: case UNBOUNDED: case VIRTUAL: case WITHOUT: case ID: case QUOTEDID: case QUOTEDLITERAL: case NUMERIC: case STRINGLITERAL: case LPAREN: case PLUS: case MINUS: case TILDE: { expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )* for (;;) { if ((LA(1) == COMMA)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp278_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp278_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp278_AST); } match(COMMA); expr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { goto _loop220; } } _loop220:; } // ( ... )* break; } case RPAREN: { break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } ANTLR_USE_NAMESPACE(antlr)RefAST tmp279_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp279_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp279_AST); } match(RPAREN); break; } case ID: case QUOTEDID: case QUOTEDLITERAL: case STRINGLITERAL: { tablename(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } break; } case GLOB: case LIKE: case MATCH: case REGEXP: { like_operator(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { if ((LA(1) == ESCAPE) && (_tokenSet_7.member(LA(2)))) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp280_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp280_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp280_AST); } match(ESCAPE); subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else if ((_tokenSet_21.member(LA(1))) && (_tokenSet_22.member(LA(2)))) { } else { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } } suffixexpr_AST = currentAST.root; break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } returnAST = suffixexpr_AST; } void Sqlite3Parser::like_operator() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST like_operator_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; switch ( LA(1)) { case LIKE: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp281_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp281_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp281_AST); } match(LIKE); like_operator_AST = currentAST.root; break; } case GLOB: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp282_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp282_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp282_AST); } match(GLOB); like_operator_AST = currentAST.root; break; } case REGEXP: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp283_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp283_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp283_AST); } match(REGEXP); like_operator_AST = currentAST.root; break; } case MATCH: { ANTLR_USE_NAMESPACE(antlr)RefAST tmp284_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp284_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp284_AST); } match(MATCH); like_operator_AST = currentAST.root; break; } default: { throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename()); } } returnAST = like_operator_AST; } void Sqlite3Parser::between_subexpr() { returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST; ANTLR_USE_NAMESPACE(antlr)ASTPair currentAST; ANTLR_USE_NAMESPACE(antlr)RefAST between_subexpr_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } { // ( ... )+ int _cnt210=0; for (;;) { if ((LA(1) == AND)) { ANTLR_USE_NAMESPACE(antlr)RefAST tmp285_AST = ANTLR_USE_NAMESPACE(antlr)nullAST; if ( inputState->guessing == 0 ) { tmp285_AST = astFactory->create(LT(1)); astFactory->addASTChild(currentAST, tmp285_AST); } match(AND); subexpr(); if (inputState->guessing==0) { astFactory->addASTChild( currentAST, returnAST ); } } else { if ( _cnt210>=1 ) { goto _loop210; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());} } _cnt210++; } _loop210:; } // ( ... )+ between_subexpr_AST = currentAST.root; returnAST = between_subexpr_AST; } void Sqlite3Parser::initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory ) { factory.setMaxNodeType(120); } const char* Sqlite3Parser::tokenNames[] = { "<0>", "EOF", "<2>", "NULL_TREE_LOOKAHEAD", "\"ABORT\"", "\"ACTION\"", "\"AUTOINCREMENT\"", "\"AS\"", "\"ASC\"", "\"AND\"", "\"OR\"", "\"BETWEEN\"", "\"CASCADE\"", "\"CASE\"", "\"CAST\"", "\"CHECK\"", "\"CREATE\"", "\"COLLATE\"", "\"CONFLICT\"", "\"CONSTRAINT\"", "\"CURRENT_TIME\"", "\"CURRENT_DATE\"", "\"CURRENT_TIMESTAMP\"", "\"DEFAULT\"", "\"DEFERRABLE\"", "\"DEFERRED\"", "\"DELETE\"", "\"DESC\"", "\"ELSE\"", "\"END\"", "\"ESCAPE\"", "\"FAIL\"", "\"FILTER\"", "\"FOLLOWING\"", "\"FOREIGN\"", "\"GLOB\"", "\"KEY\"", "\"LIKE\"", "\"TABLE\"", "\"IF\"", "\"IGNORE\"", "\"IN\"", "\"INDEX\"", "\"INITIALLY\"", "\"INSERT\"", "\"IMMEDIATE\"", "\"IS\"", "\"NO\"", "\"NOT\"", "\"NULL\"", "\"MATCH\"", "\"EXISTS\"", "\"ON\"", "\"OVER\"", "\"PARTITION\"", "\"PRECEDING\"", "\"PRIMARY\"", "\"RAISE\"", "\"RANGE\"", "\"REFERENCES\"", "\"REGEXP\"", "\"REPLACE\"", "\"RESTRICT\"", "\"ROLLBACK\"", "\"ROWID\"", "\"ROWS\"", "\"SET\"", "\"TEMPORARY\"", "\"TEMP\"", "\"THEN\"", "\"UNBOUNDED\"", "\"UNIQUE\"", "\"UPDATE\"", "\"USING\"", "\"VIRTUAL\"", "\"WHEN\"", "\"WHERE\"", "\"WITHOUT\"", "TYPE_NAME", "COLUMNDEF", "COLUMNCONSTRAINT", "TABLECONSTRAINT", "CREATETABLE", "CREATEINDEX", "INDEXEDCOLUMN", "KEYWORDASTABLENAME", "KEYWORDASCOLUMNNAME", "DIGIT", "DOT", "ID", "QUOTEDID", "QUOTEDLITERAL", "NUMERIC", "NL", "COMMENT", "WS", "STRINGLITERAL", "LPAREN", "RPAREN", "COMMA", "SEMI", "PLUS", "MINUS", "STAR", "TILDE", "AMPERSAND", "BITOR", "OROP", "EQUAL", "EQUAL2", "GREATER", "GREATEREQUAL", "LOWER", "LOWEREQUAL", "UNEQUAL", "UNEQUAL2", "BITWISELEFT", "BITWISERIGHT", "SELECT", "SLASH", "PERCENT", 0 }; const unsigned long Sqlite3Parser::_tokenSet_0_data_[] = { 0UL, 0UL, 251658240UL, 1UL, 0UL, 0UL, 0UL, 0UL }; // DOT ID QUOTEDID QUOTEDLITERAL STRINGLITERAL const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_0(_tokenSet_0_data_,8); const unsigned long Sqlite3Parser::_tokenSet_1_data_[] = { 0UL, 0UL, 234881024UL, 1UL, 0UL, 0UL, 0UL, 0UL }; // ID QUOTEDID QUOTEDLITERAL STRINGLITERAL const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_1(_tokenSet_1_data_,8); const unsigned long Sqlite3Parser::_tokenSet_2_data_[] = { 0UL, 64UL, 1048UL, 0UL, 0UL, 0UL, 0UL, 0UL }; // "TABLE" "TEMPORARY" "TEMP" "VIRTUAL" const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_2(_tokenSet_2_data_,8); const unsigned long Sqlite3Parser::_tokenSet_3_data_[] = { 2859749680UL, 4142180795UL, 234890331UL, 1UL, 0UL, 0UL, 0UL, 0UL }; // "ABORT" "ACTION" "ASC" "CASCADE" "CAST" "CONFLICT" "CURRENT_TIME" "CURRENT_DATE" // "CURRENT_TIMESTAMP" "DEFERRED" "DESC" "END" "FAIL" "FILTER" "FOLLOWING" // "GLOB" "KEY" "LIKE" "IF" "IGNORE" "INITIALLY" "IMMEDIATE" "NO" "MATCH" // "OVER" "PARTITION" "PRECEDING" "RAISE" "RANGE" "REGEXP" "REPLACE" "RESTRICT" // "ROLLBACK" "ROWID" "ROWS" "TEMPORARY" "TEMP" "UNBOUNDED" "VIRTUAL" "WITHOUT" // ID QUOTEDID QUOTEDLITERAL STRINGLITERAL const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_3(_tokenSet_3_data_,8); const unsigned long Sqlite3Parser::_tokenSet_4_data_[] = { 557056UL, 16777220UL, 128UL, 8UL, 0UL, 0UL, 0UL, 0UL }; // "CHECK" "CONSTRAINT" "FOREIGN" "PRIMARY" "UNIQUE" COMMA const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_4(_tokenSet_4_data_,8); const unsigned long Sqlite3Parser::_tokenSet_5_data_[] = { 9076736UL, 151191552UL, 128UL, 0UL, 0UL, 0UL, 0UL, 0UL }; // "CHECK" "COLLATE" "CONSTRAINT" "DEFAULT" "NOT" "NULL" "PRIMARY" "REFERENCES" // "UNIQUE" const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_5(_tokenSet_5_data_,8); const unsigned long Sqlite3Parser::_tokenSet_6_data_[] = { 3137261872UL, 4294420799UL, 503325915UL, 111UL, 0UL, 0UL, 0UL, 0UL }; // "ABORT" "ACTION" "ASC" "CASCADE" "CAST" "CHECK" "COLLATE" "CONFLICT" // "CONSTRAINT" "CURRENT_TIME" "CURRENT_DATE" "CURRENT_TIMESTAMP" "DEFAULT" // "DEFERRED" "DESC" "ELSE" "END" "FAIL" "FILTER" "FOLLOWING" "FOREIGN" // "GLOB" "KEY" "LIKE" "IGNORE" "INITIALLY" "IMMEDIATE" "NO" "NOT" "NULL" // "MATCH" "ON" "OVER" "PARTITION" "PRECEDING" "PRIMARY" "RAISE" "RANGE" // "REFERENCES" "REGEXP" "REPLACE" "RESTRICT" "ROLLBACK" "ROWID" "ROWS" // "TEMPORARY" "TEMP" "UNBOUNDED" "UNIQUE" "VIRTUAL" "WITHOUT" ID QUOTEDID // QUOTEDLITERAL NUMERIC STRINGLITERAL LPAREN RPAREN COMMA PLUS MINUS const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_6(_tokenSet_6_data_,8); const unsigned long Sqlite3Parser::_tokenSet_7_data_[] = { 2859757872UL, 4142901691UL, 503325787UL, 353UL, 0UL, 0UL, 0UL, 0UL }; // "ABORT" "ACTION" "ASC" "CASCADE" "CASE" "CAST" "CONFLICT" "CURRENT_TIME" // "CURRENT_DATE" "CURRENT_TIMESTAMP" "DEFERRED" "DESC" "END" "FAIL" "FILTER" // "FOLLOWING" "GLOB" "KEY" "LIKE" "IF" "IGNORE" "INITIALLY" "IMMEDIATE" // "NO" "NOT" "NULL" "MATCH" "EXISTS" "OVER" "PARTITION" "PRECEDING" "RAISE" // "RANGE" "REGEXP" "REPLACE" "RESTRICT" "ROLLBACK" "ROWID" "ROWS" "TEMPORARY" // "TEMP" "UNBOUNDED" "VIRTUAL" "WITHOUT" ID QUOTEDID QUOTEDLITERAL NUMERIC // STRINGLITERAL PLUS MINUS TILDE const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_7(_tokenSet_7_data_,8); const unsigned long Sqlite3Parser::_tokenSet_8_data_[] = { 2859890992UL, 4142902203UL, 520105051UL, 363UL, 0UL, 0UL, 0UL, 0UL }; // "ABORT" "ACTION" "ASC" "BETWEEN" "CASCADE" "CASE" "CAST" "COLLATE" "CONFLICT" // "CURRENT_TIME" "CURRENT_DATE" "CURRENT_TIMESTAMP" "DEFERRED" "DESC" // "END" "FAIL" "FILTER" "FOLLOWING" "GLOB" "KEY" "LIKE" "IF" "IGNORE" // "IN" "INITIALLY" "IMMEDIATE" "NO" "NOT" "NULL" "MATCH" "EXISTS" "OVER" // "PARTITION" "PRECEDING" "RAISE" "RANGE" "REGEXP" "REPLACE" "RESTRICT" // "ROLLBACK" "ROWID" "ROWS" "TEMPORARY" "TEMP" "UNBOUNDED" "VIRTUAL" "WHEN" // "WITHOUT" DOT ID QUOTEDID QUOTEDLITERAL NUMERIC STRINGLITERAL LPAREN // COMMA PLUS MINUS TILDE const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_8(_tokenSet_8_data_,8); const unsigned long Sqlite3Parser::_tokenSet_9_data_[] = { 2859757872UL, 4142901691UL, 503325787UL, 355UL, 0UL, 0UL, 0UL, 0UL }; // "ABORT" "ACTION" "ASC" "CASCADE" "CASE" "CAST" "CONFLICT" "CURRENT_TIME" // "CURRENT_DATE" "CURRENT_TIMESTAMP" "DEFERRED" "DESC" "END" "FAIL" "FILTER" // "FOLLOWING" "GLOB" "KEY" "LIKE" "IF" "IGNORE" "INITIALLY" "IMMEDIATE" // "NO" "NOT" "NULL" "MATCH" "EXISTS" "OVER" "PARTITION" "PRECEDING" "RAISE" // "RANGE" "REGEXP" "REPLACE" "RESTRICT" "ROLLBACK" "ROWID" "ROWS" "TEMPORARY" // "TEMP" "UNBOUNDED" "VIRTUAL" "WITHOUT" ID QUOTEDID QUOTEDLITERAL NUMERIC // STRINGLITERAL LPAREN PLUS MINUS TILDE const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_9(_tokenSet_9_data_,8); const unsigned long Sqlite3Parser::_tokenSet_10_data_[] = { 2859892528UL, 4142918587UL, 520105051UL, 29360103UL, 0UL, 0UL, 0UL, 0UL }; // "ABORT" "ACTION" "ASC" "AND" "OR" "BETWEEN" "CASCADE" "CASE" "CAST" // "COLLATE" "CONFLICT" "CURRENT_TIME" "CURRENT_DATE" "CURRENT_TIMESTAMP" // "DEFERRED" "DESC" "END" "FAIL" "FILTER" "FOLLOWING" "GLOB" "KEY" "LIKE" // "IF" "IGNORE" "IN" "INITIALLY" "IMMEDIATE" "IS" "NO" "NOT" "NULL" "MATCH" // "EXISTS" "OVER" "PARTITION" "PRECEDING" "RAISE" "RANGE" "REGEXP" "REPLACE" // "RESTRICT" "ROLLBACK" "ROWID" "ROWS" "TEMPORARY" "TEMP" "UNBOUNDED" // "VIRTUAL" "WHEN" "WITHOUT" DOT ID QUOTEDID QUOTEDLITERAL NUMERIC STRINGLITERAL // LPAREN RPAREN PLUS MINUS STAR TILDE AMPERSAND BITOR OROP EQUAL EQUAL2 // GREATER GREATEREQUAL LOWER LOWEREQUAL UNEQUAL UNEQUAL2 BITWISELEFT BITWISERIGHT // SLASH PERCENT const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_10(_tokenSet_10_data_,8); const unsigned long Sqlite3Parser::_tokenSet_11_data_[] = { 1536UL, 268714024UL, 0UL, 29359840UL, 0UL, 0UL, 0UL, 0UL }; // "AND" "OR" "GLOB" "LIKE" "IS" "MATCH" "REGEXP" PLUS MINUS STAR AMPERSAND // BITOR OROP EQUAL EQUAL2 GREATER GREATEREQUAL LOWER LOWEREQUAL UNEQUAL // UNEQUAL2 BITWISELEFT BITWISERIGHT SLASH PERCENT const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_11(_tokenSet_11_data_,8); const unsigned long Sqlite3Parser::_tokenSet_12_data_[] = { 7340032UL, 131072UL, 268435456UL, 1UL, 0UL, 0UL, 0UL, 0UL }; // "CURRENT_TIME" "CURRENT_DATE" "CURRENT_TIMESTAMP" "NULL" NUMERIC STRINGLITERAL const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_12(_tokenSet_12_data_,8); const unsigned long Sqlite3Parser::_tokenSet_13_data_[] = { 9076736UL, 151191556UL, 128UL, 12UL, 0UL, 0UL, 0UL, 0UL }; // "CHECK" "COLLATE" "CONSTRAINT" "DEFAULT" "FOREIGN" "NOT" "NULL" "PRIMARY" // "REFERENCES" "UNIQUE" RPAREN COMMA const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_13(_tokenSet_13_data_,8); const unsigned long Sqlite3Parser::_tokenSet_14_data_[] = { 3128185136UL, 4142180667UL, 9307UL, 0UL, 0UL, 0UL, 0UL, 0UL }; // "ABORT" "ACTION" "ASC" "CASCADE" "CAST" "CONFLICT" "CURRENT_TIME" "CURRENT_DATE" // "CURRENT_TIMESTAMP" "DEFERRED" "DESC" "ELSE" "END" "FAIL" "FILTER" "FOLLOWING" // "GLOB" "KEY" "LIKE" "IGNORE" "INITIALLY" "IMMEDIATE" "NO" "MATCH" "OVER" // "PARTITION" "PRECEDING" "RAISE" "RANGE" "REGEXP" "REPLACE" "RESTRICT" // "ROLLBACK" "ROWID" "ROWS" "TEMPORARY" "TEMP" "UNBOUNDED" "VIRTUAL" "WITHOUT" const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_14(_tokenSet_14_data_,8); const unsigned long Sqlite3Parser::_tokenSet_15_data_[] = { 9076736UL, 151191556UL, 268435584UL, 12UL, 0UL, 0UL, 0UL, 0UL }; // "CHECK" "COLLATE" "CONSTRAINT" "DEFAULT" "FOREIGN" "NOT" "NULL" "PRIMARY" // "REFERENCES" "UNIQUE" NUMERIC RPAREN COMMA const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_15(_tokenSet_15_data_,8); const unsigned long Sqlite3Parser::_tokenSet_16_data_[] = { 3137261874UL, 4294420927UL, 503325915UL, 127UL, 0UL, 0UL, 0UL, 0UL }; // EOF "ABORT" "ACTION" "ASC" "CASCADE" "CAST" "CHECK" "COLLATE" "CONFLICT" // "CONSTRAINT" "CURRENT_TIME" "CURRENT_DATE" "CURRENT_TIMESTAMP" "DEFAULT" // "DEFERRED" "DESC" "ELSE" "END" "FAIL" "FILTER" "FOLLOWING" "FOREIGN" // "GLOB" "KEY" "LIKE" "IF" "IGNORE" "INITIALLY" "IMMEDIATE" "NO" "NOT" // "NULL" "MATCH" "ON" "OVER" "PARTITION" "PRECEDING" "PRIMARY" "RAISE" // "RANGE" "REFERENCES" "REGEXP" "REPLACE" "RESTRICT" "ROLLBACK" "ROWID" // "ROWS" "TEMPORARY" "TEMP" "UNBOUNDED" "UNIQUE" "VIRTUAL" "WITHOUT" ID // QUOTEDID QUOTEDLITERAL NUMERIC STRINGLITERAL LPAREN RPAREN COMMA SEMI // PLUS MINUS const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_16(_tokenSet_16_data_,8); const unsigned long Sqlite3Parser::_tokenSet_17_data_[] = { 2013401026UL, 268780072UL, 2080UL, 29359868UL, 0UL, 0UL, 0UL, 0UL }; // EOF "AUTOINCREMENT" "AS" "ASC" "AND" "OR" "BETWEEN" "COLLATE" "DESC" // "ELSE" "END" "ESCAPE" "GLOB" "LIKE" "IN" "IS" "NOT" "MATCH" "REGEXP" // "THEN" "WHEN" RPAREN COMMA SEMI PLUS MINUS STAR AMPERSAND BITOR OROP // EQUAL EQUAL2 GREATER GREATEREQUAL LOWER LOWEREQUAL UNEQUAL UNEQUAL2 // BITWISELEFT BITWISERIGHT SLASH PERCENT const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_17(_tokenSet_17_data_,8); const unsigned long Sqlite3Parser::_tokenSet_18_data_[] = { 2013401026UL, 268780072UL, 16779296UL, 29359868UL, 0UL, 0UL, 0UL, 0UL }; // EOF "AUTOINCREMENT" "AS" "ASC" "AND" "OR" "BETWEEN" "COLLATE" "DESC" // "ELSE" "END" "ESCAPE" "GLOB" "LIKE" "IN" "IS" "NOT" "MATCH" "REGEXP" // "THEN" "WHEN" DOT RPAREN COMMA SEMI PLUS MINUS STAR AMPERSAND BITOR // OROP EQUAL EQUAL2 GREATER GREATEREQUAL LOWER LOWEREQUAL UNEQUAL UNEQUAL2 // BITWISELEFT BITWISERIGHT SLASH PERCENT const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_18(_tokenSet_18_data_,8); const unsigned long Sqlite3Parser::_tokenSet_19_data_[] = { 133120UL, 268763688UL, 0UL, 0UL }; // "BETWEEN" "COLLATE" "GLOB" "LIKE" "IN" "NOT" "MATCH" "REGEXP" const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_19(_tokenSet_19_data_,4); const unsigned long Sqlite3Parser::_tokenSet_20_data_[] = { 2859759920UL, 4142902203UL, 503325787UL, 355UL, 0UL, 0UL, 0UL, 0UL }; // "ABORT" "ACTION" "ASC" "BETWEEN" "CASCADE" "CASE" "CAST" "CONFLICT" // "CURRENT_TIME" "CURRENT_DATE" "CURRENT_TIMESTAMP" "DEFERRED" "DESC" // "END" "FAIL" "FILTER" "FOLLOWING" "GLOB" "KEY" "LIKE" "IF" "IGNORE" // "IN" "INITIALLY" "IMMEDIATE" "NO" "NOT" "NULL" "MATCH" "EXISTS" "OVER" // "PARTITION" "PRECEDING" "RAISE" "RANGE" "REGEXP" "REPLACE" "RESTRICT" // "ROLLBACK" "ROWID" "ROWS" "TEMPORARY" "TEMP" "UNBOUNDED" "VIRTUAL" "WITHOUT" // ID QUOTEDID QUOTEDLITERAL NUMERIC STRINGLITERAL LPAREN PLUS MINUS TILDE const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_20(_tokenSet_20_data_,8); const unsigned long Sqlite3Parser::_tokenSet_21_data_[] = { 2013398978UL, 268714024UL, 2080UL, 29359868UL, 0UL, 0UL, 0UL, 0UL }; // EOF "AUTOINCREMENT" "AS" "ASC" "AND" "OR" "COLLATE" "DESC" "ELSE" "END" // "ESCAPE" "GLOB" "LIKE" "IS" "MATCH" "REGEXP" "THEN" "WHEN" RPAREN COMMA // SEMI PLUS MINUS STAR AMPERSAND BITOR OROP EQUAL EQUAL2 GREATER GREATEREQUAL // LOWER LOWEREQUAL UNEQUAL UNEQUAL2 BITWISELEFT BITWISERIGHT SLASH PERCENT const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_21(_tokenSet_21_data_,8); const unsigned long Sqlite3Parser::_tokenSet_22_data_[] = { 4211081202UL, 4294962111UL, 503332091UL, 29360127UL, 0UL, 0UL, 0UL, 0UL }; // EOF "ABORT" "ACTION" "AUTOINCREMENT" "AS" "ASC" "AND" "OR" "BETWEEN" // "CASCADE" "CASE" "CAST" "CHECK" "CREATE" "COLLATE" "CONFLICT" "CONSTRAINT" // "CURRENT_TIME" "CURRENT_DATE" "CURRENT_TIMESTAMP" "DEFAULT" "DEFERRED" // "DESC" "ELSE" "END" "ESCAPE" "FAIL" "FILTER" "FOLLOWING" "FOREIGN" "GLOB" // "KEY" "LIKE" "IF" "IGNORE" "IN" "INITIALLY" "IMMEDIATE" "IS" "NO" "NOT" // "NULL" "MATCH" "EXISTS" "ON" "OVER" "PARTITION" "PRECEDING" "PRIMARY" // "RAISE" "RANGE" "REFERENCES" "REGEXP" "REPLACE" "RESTRICT" "ROLLBACK" // "ROWID" "ROWS" "TEMPORARY" "TEMP" "THEN" "UNBOUNDED" "UNIQUE" "VIRTUAL" // "WHEN" "WHERE" "WITHOUT" ID QUOTEDID QUOTEDLITERAL NUMERIC STRINGLITERAL // LPAREN RPAREN COMMA SEMI PLUS MINUS STAR TILDE AMPERSAND BITOR OROP // EQUAL EQUAL2 GREATER GREATEREQUAL LOWER LOWEREQUAL UNEQUAL UNEQUAL2 // BITWISELEFT BITWISERIGHT SLASH PERCENT const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_22(_tokenSet_22_data_,8); const unsigned long Sqlite3Parser::_tokenSet_23_data_[] = { 1024UL, 268714024UL, 0UL, 29359840UL, 0UL, 0UL, 0UL, 0UL }; // "OR" "GLOB" "LIKE" "IS" "MATCH" "REGEXP" PLUS MINUS STAR AMPERSAND BITOR // OROP EQUAL EQUAL2 GREATER GREATEREQUAL LOWER LOWEREQUAL UNEQUAL UNEQUAL2 // BITWISELEFT BITWISERIGHT SLASH PERCENT const ANTLR_USE_NAMESPACE(antlr)BitSet Sqlite3Parser::_tokenSet_23(_tokenSet_23_data_,8); sqlitebrowser-3.11.2/src/grammar/Sqlite3Parser.hpp000066400000000000000000000120411345112435200221300ustar00rootroot00000000000000#ifndef INC_Sqlite3Parser_hpp_ #define INC_Sqlite3Parser_hpp_ #include /* $ANTLR 2.7.7 (20171109): "sqlite3.g" -> "Sqlite3Parser.hpp"$ */ #include #include #include "sqlite3TokenTypes.hpp" #include class CUSTOM_API Sqlite3Parser : public ANTLR_USE_NAMESPACE(antlr)LLkParser, public sqlite3TokenTypes { public: void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory ); protected: Sqlite3Parser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k); public: Sqlite3Parser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf); protected: Sqlite3Parser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer, int k); public: Sqlite3Parser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer); Sqlite3Parser(const ANTLR_USE_NAMESPACE(antlr)ParserSharedInputState& state); int getNumTokens() const { return Sqlite3Parser::NUM_TOKENS; } const char* getTokenName( int type ) const { if( type > getNumTokens() ) return 0; return Sqlite3Parser::tokenNames[type]; } const char* const* getTokenNames() const { return Sqlite3Parser::tokenNames; } public: void id(); public: void databasename(); public: void tablename(); public: void nonkeyword_columnname(); public: void identifier(); public: void collationname(); public: void signednumber(); public: void statementlist(); public: void statement(); public: void createtable(); public: void createindex(); public: void create_statements(); public: void keywordastablename(); public: void columndef(); public: void tableconstraint(); public: void selectstmt(); public: void name(); public: void expr(); public: void indexedcolumn(); public: void keywordascolumnname(); public: void columnname(); public: void type_name(); public: void columnconstraint(); public: void conflictclause(); public: void literalvalue(); public: void foreignkeyclause(); public: void functionname(); public: void subexpr(); public: void binaryoperator(); public: void castexpr(); public: void caseexpr(); public: void raisefunction(); public: void suffixexpr(); public: void like_operator(); public: void between_subexpr(); public: ANTLR_USE_NAMESPACE(antlr)RefAST getAST() { return returnAST; } protected: ANTLR_USE_NAMESPACE(antlr)RefAST returnAST; private: static const char* tokenNames[]; #ifndef NO_STATIC_CONSTS static const int NUM_TOKENS = 121; #else enum { NUM_TOKENS = 121 }; #endif static const unsigned long _tokenSet_0_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0; static const unsigned long _tokenSet_1_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1; static const unsigned long _tokenSet_2_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2; static const unsigned long _tokenSet_3_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3; static const unsigned long _tokenSet_4_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4; static const unsigned long _tokenSet_5_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_5; static const unsigned long _tokenSet_6_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_6; static const unsigned long _tokenSet_7_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_7; static const unsigned long _tokenSet_8_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_8; static const unsigned long _tokenSet_9_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_9; static const unsigned long _tokenSet_10_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_10; static const unsigned long _tokenSet_11_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_11; static const unsigned long _tokenSet_12_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_12; static const unsigned long _tokenSet_13_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_13; static const unsigned long _tokenSet_14_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_14; static const unsigned long _tokenSet_15_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_15; static const unsigned long _tokenSet_16_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_16; static const unsigned long _tokenSet_17_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_17; static const unsigned long _tokenSet_18_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_18; static const unsigned long _tokenSet_19_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_19; static const unsigned long _tokenSet_20_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_20; static const unsigned long _tokenSet_21_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_21; static const unsigned long _tokenSet_22_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_22; static const unsigned long _tokenSet_23_data_[]; static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_23; }; #endif /*INC_Sqlite3Parser_hpp_*/ sqlitebrowser-3.11.2/src/grammar/sqlite3.g000066400000000000000000000233431345112435200204610ustar00rootroot00000000000000options { language="Cpp"; genHashLines=false; } class Sqlite3Lexer extends Lexer; options { k=2; exportVocab=sqlite3; caseSensitive=false; caseSensitiveLiterals=false; charVocabulary='\u0000'..'\uFFFE'; } tokens { ABORT="ABORT"; ACTION="ACTION"; AUTOINCREMENT="AUTOINCREMENT"; AS="AS"; ASC="ASC"; AND="AND"; OR="OR"; BETWEEN="BETWEEN"; CASCADE="CASCADE"; CASE_T="CASE"; CAST="CAST"; CHECK="CHECK"; CREATE="CREATE"; COLLATE="COLLATE"; CONFLICT="CONFLICT"; CONSTRAINT="CONSTRAINT"; CURRENT_TIME="CURRENT_TIME"; CURRENT_DATE="CURRENT_DATE"; CURRENT_TIMESTAMP="CURRENT_TIMESTAMP"; DEFAULT="DEFAULT"; DEFERRABLE="DEFERRABLE"; DEFERRED="DEFERRED"; DELETE="DELETE"; DESC="DESC"; ELSE_T="ELSE"; END="END"; ESCAPE="ESCAPE"; FAIL="FAIL"; FILTER="FILTER"; FOLLOWING="FOLLOWING"; FOREIGN="FOREIGN"; GLOB="GLOB"; KEY="KEY"; LIKE="LIKE"; TABLE="TABLE"; IF_T="IF"; IGNORE="IGNORE"; IN="IN"; INDEX="INDEX"; INITIALLY="INITIALLY"; INSERT="INSERT"; IMMEDIATE="IMMEDIATE"; IS="IS"; NO="NO"; NOT="NOT"; NULL_T="NULL"; MATCH="MATCH"; EXISTS="EXISTS"; ON="ON"; OVER="OVER"; PARTITION="PARTITION"; PRECEDING="PRECEDING"; PRIMARY="PRIMARY"; RAISE="RAISE"; RANGE="RANGE"; REFERENCES="REFERENCES"; REGEXP="REGEXP"; REPLACE="REPLACE"; RESTRICT="RESTRICT"; ROLLBACK="ROLLBACK"; ROWID="ROWID"; ROWS="ROWS"; SET="SET"; TEMPORARY="TEMPORARY"; TEMP="TEMP"; THEN="THEN"; UNBOUNDED="UNBOUNDED"; UNIQUE="UNIQUE"; UPDATE="UPDATE"; USING="USING"; VIRTUAL="VIRTUAL"; WHEN="WHEN"; WHERE="WHERE"; WITHOUT="WITHOUT"; //ast TYPE_NAME; COLUMNDEF; COLUMNCONSTRAINT; TABLECONSTRAINT; CREATETABLE; CREATEINDEX; INDEXEDCOLUMN; KEYWORDASTABLENAME; KEYWORDASCOLUMNNAME; } protected DIGIT : '0'..'9' ; protected DOT:; ID : // 0080 - 02B8 load of good looking unicode chars // there might be more allowed characters ('a'..'z'|'_') ('a'..'z'|'0'..'9'|'_'|'\u0080'..'\u02B8')* ; QUOTEDID : '`' ( ~('`') | ('`' '`') )* '`' | '[' ( ~(']') )* ']' ; QUOTEDLITERAL : '"' ( ~'"' | ('"' '"' ) )* '"' ; NUMERIC : ( (DIGIT)+ ( '.' (DIGIT)* )? | '.' (DIGIT)+) ( 'e' (PLUS|MINUS)? (DIGIT)+ )? ; protected NL : ( '\r' | '\n' {newline();} ); COMMENT : ( '-''-' (~('\n'|'\r'))* NL {newline();} // single line comment | '/''*' ( options{greedy=false;} : NL {newline();} | ~('\n'|'\r') )* '*''/' // multi-line comment ) { $setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP); }; WS : ( ' ' | '\t' | '\f' | NL ) { $setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP); }; STRINGLITERAL : // '"' ( ESC_SEQ | ~('\\'|'"') )* '"' '\'' ( ~'\'' | ('\'' '\'') )* '\'' ; //protected //ESC_SEQ // : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') // ; LPAREN : '('; RPAREN : ')'; COMMA : ','; SEMI : ';'; PLUS : '+'; MINUS : '-'; STAR : '*'; TILDE : '~'; AMPERSAND: '&'; BITOR: '|'; OROP: BITOR BITOR; EQUAL: '='; EQUAL2: EQUAL EQUAL; GREATER: '>'; GREATEREQUAL: GREATER EQUAL; LOWER: '<'; LOWEREQUAL: LOWER EQUAL; UNEQUAL: '!' EQUAL; UNEQUAL2: LOWER GREATER; BITWISELEFT: LOWER LOWER; BITWISERIGHT: GREATER GREATER; // parser class Sqlite3Parser extends Parser; options { k=2; buildAST = true; defaultErrorHandler=false; } id : ID | QUOTEDID | QUOTEDLITERAL | STRINGLITERAL ; databasename : id ; tablename : id ; nonkeyword_columnname : id ; identifier : ((databasename)? DOT)? tablename ; collationname : ID ; signednumber : (PLUS | MINUS)? NUMERIC // {#signednumber = #([SIGNEDNUMBER, "SIGNEDNUMBER"], #signednumber);} ; // parser part statementlist : (statement)? (SEMI statement)* ; statement : createtable | createindex ; create_statements : createtable | createindex ; keywordastablename : ( ABORT | ACTION | ASC | CASCADE | CAST | CONFLICT | CURRENT_TIME | CURRENT_DATE | CURRENT_TIMESTAMP | DEFERRED | DESC | ELSE_T | END | FAIL | FILTER | FOLLOWING | GLOB | KEY | LIKE | IGNORE | INITIALLY | IMMEDIATE | MATCH | NO | OVER | PARTITION | PRECEDING | RAISE | RANGE | REGEXP | REPLACE | RESTRICT | ROLLBACK | ROWID | ROWS | TEMPORARY | TEMP | UNBOUNDED | VIRTUAL | WITHOUT ) {#keywordastablename = #([KEYWORDASTABLENAME, "KEYWORDASTABLENAME"], #keywordastablename);} ; createtable : (CREATE (TEMP|TEMPORARY)? TABLE (IF_T NOT EXISTS)? (tablename | keywordastablename) ( LPAREN columndef (COMMA columndef)* ((COMMA)? tableconstraint)* RPAREN (WITHOUT ROWID)? | AS selectstmt ) {#createtable = #([CREATETABLE, "CREATETABLE"], #createtable);} ) |(CREATE VIRTUAL TABLE (IF_T NOT EXISTS)? (tablename | keywordastablename) USING name (LPAREN (expr (COMMA expr)*)? RPAREN)? // TODO: Not sure about using "expr" here ) ; createindex : CREATE (UNIQUE)? INDEX (IF_T NOT EXISTS)? (tablename | keywordastablename) ON (tablename | keywordastablename) ( LPAREN indexedcolumn (COMMA indexedcolumn)* RPAREN (WHERE expr)? ) {#createindex = #([CREATEINDEX, "CREATEINDEX"], #createindex);} ; keywordascolumnname : ( ABORT | ACTION | ASC | CASCADE | CAST | CONFLICT | CURRENT_TIME | CURRENT_DATE | CURRENT_TIMESTAMP | DEFERRED | DESC | END | FAIL | FILTER | FOLLOWING | GLOB | KEY | LIKE | IF_T | IGNORE | INITIALLY | IMMEDIATE | MATCH | NO | OVER | PARTITION | PRECEDING | RAISE | RANGE | REGEXP | REPLACE | RESTRICT | ROLLBACK | ROWID | ROWS | TEMPORARY | TEMP | UNBOUNDED | VIRTUAL | WITHOUT ) {#keywordascolumnname = #([KEYWORDASCOLUMNNAME, "KEYWORDASCOLUMNNAME"], #keywordascolumnname);} ; columnname : ( nonkeyword_columnname | keywordascolumnname ) {} ; columndef : columnname (type_name)? (columnconstraint)* {#columndef = #([COLUMNDEF, "COLUMNDEF"], #columndef);} ; name : ID | QUOTEDID | QUOTEDLITERAL | STRINGLITERAL; type_name : (name | keywordastablename)+ (LPAREN signednumber (COMMA signednumber)? RPAREN)? {#type_name = #([TYPE_NAME, "TYPE_NAME"], #type_name);} ; columnconstraint : (CONSTRAINT name)? ( PRIMARY KEY (ASC|DESC)? (conflictclause)? (AUTOINCREMENT)? | (NOT)? NULL_T (conflictclause)? | UNIQUE (conflictclause)? | CHECK LPAREN expr RPAREN | DEFAULT (QUOTEDLITERAL | LPAREN expr RPAREN | literalvalue | ID | keywordastablename | signednumber) | COLLATE collationname | foreignkeyclause) {#columnconstraint = #([COLUMNCONSTRAINT, "COLUMNCONSTRAINT"], #columnconstraint);} ; tableconstraint : (CONSTRAINT name)? ( PRIMARY KEY LPAREN indexedcolumn (COMMA indexedcolumn)* RPAREN (conflictclause)? | UNIQUE LPAREN indexedcolumn (COMMA indexedcolumn)* RPAREN (conflictclause)? | CHECK LPAREN expr RPAREN | FOREIGN KEY LPAREN columnname (COMMA columnname)* RPAREN foreignkeyclause ) {#tableconstraint = #([TABLECONSTRAINT, "TABLECONSTRAINT"], #tableconstraint);} ; indexedcolumn : expr (COLLATE collationname)? (ASC|DESC)? (AUTOINCREMENT)? {#indexedcolumn = #([INDEXEDCOLUMN, "INDEXEDCOLUMN"], #indexedcolumn);} ; conflictclause : ON CONFLICT ( ROLLBACK | ABORT | FAIL | IGNORE | REPLACE ) ; foreignkeyclause : REFERENCES tablename (LPAREN columnname (COMMA columnname)* RPAREN)? ( ON (DELETE | UPDATE | INSERT) ( SET (NULL_T | DEFAULT) | CASCADE | RESTRICT | NO ACTION ) | MATCH name )* ( (NOT DEFERRABLE) => NOT DEFERRABLE (INITIALLY (DEFERRED | IMMEDIATE))? | DEFERRABLE (INITIALLY (DEFERRED | IMMEDIATE) ) )? ; selectstmt : SELECT ; functionname : id ; expr : ( LPAREN (((subexpr (COMMA subexpr)+ RPAREN binaryoperator LPAREN subexpr (COMMA subexpr)+) | (expr)) RPAREN) ((AND | OR) expr)* ) | ( subexpr ((binaryoperator | AND | OR) subexpr )* ) ; subexpr : ( MINUS | PLUS | TILDE | NOT)? ( literalvalue // | bindparameter TODO | ((databasename DOT)? tablename DOT)? columnname | functionname LPAREN (expr (COMMA expr)* )? RPAREN //TODO | castexpr | EXISTS LPAREN (expr | selectstmt) RPAREN | caseexpr | raisefunction // | windowfunc ) (suffixexpr)? ; castexpr : CAST LPAREN expr AS type_name RPAREN ; caseexpr : CASE_T (expr)? (WHEN expr THEN expr)+ (ELSE_T expr)? END ; /* windowfunc : functionname LPAREN (STAR | (expr (COMMA expr)*))? RPAREN (FILTER LPAREN WHERE expr RPAREN)? OVER ( (LPAREN windowdefn RPAREN) | id ) ; windowdefn : (PARTITION BY expr (COMMA expr)*)? (ORDER BY orderingterm (COMMA orderingterm)*)? (framespec)? ; orderingterm : expr (COLLATE collationname)? (ASC | DESC)? ; framespec : (RANGE | ROWS) (BETWEEN ( (UNBOUNDED PRECEDING) | (expr PRECEDING) | (CURRENT ROW) | (expr FOLLOWING) ) AND ( (expr PRECEDING) | (CURRENT ROW) | (expr FOLLOWING) | (UNBOUNDED FOLLOWING) ) ) | ( (UNBOUNDED PRECEDING) | (expr PRECEDING) | (CURRENT ROW) | (expr FOLLOWING) ) ; */ like_operator : LIKE | GLOB | REGEXP | MATCH ; between_subexpr : subexpr (AND subexpr)+ ; suffixexpr : COLLATE collationname | (NOT)? ( BETWEEN subexpr ((binaryoperator | OR) subexpr )* AND expr | IN ( LPAREN (selectstmt | expr (COMMA expr)* )? RPAREN | tablename) | like_operator subexpr (ESCAPE subexpr)? ) ; literalvalue : NUMERIC | STRINGLITERAL // | blob-literal | NULL_T | CURRENT_TIME | CURRENT_DATE | CURRENT_TIMESTAMP ; raisefunction : RAISE LPAREN ( IGNORE | (ROLLBACK | ABORT | FAIL) COMMA STRINGLITERAL ) RPAREN ; binaryoperator : OROP | STAR | SLASH | PERCENT | PLUS | MINUS | BITWISELEFT | BITWISERIGHT | AMPERSAND | BITOR | LOWER | LOWEREQUAL | GREATER | GREATEREQUAL | EQUAL | EQUAL2 | UNEQUAL | UNEQUAL2 | IS | like_operator ; sqlitebrowser-3.11.2/src/grammar/sqlite3TokenTypes.hpp000066400000000000000000000042661345112435200230530ustar00rootroot00000000000000#ifndef INC_sqlite3TokenTypes_hpp_ #define INC_sqlite3TokenTypes_hpp_ /* $ANTLR 2.7.7 (20171109): "sqlite3.g" -> "sqlite3TokenTypes.hpp"$ */ #ifndef CUSTOM_API # define CUSTOM_API #endif #ifdef __cplusplus struct CUSTOM_API sqlite3TokenTypes { #endif enum { EOF_ = 1, ABORT = 4, ACTION = 5, AUTOINCREMENT = 6, AS = 7, ASC = 8, AND = 9, OR = 10, BETWEEN = 11, CASCADE = 12, CASE_T = 13, CAST = 14, CHECK = 15, CREATE = 16, COLLATE = 17, CONFLICT = 18, CONSTRAINT = 19, CURRENT_TIME = 20, CURRENT_DATE = 21, CURRENT_TIMESTAMP = 22, DEFAULT = 23, DEFERRABLE = 24, DEFERRED = 25, DELETE = 26, DESC = 27, ELSE_T = 28, END = 29, ESCAPE = 30, FAIL = 31, FILTER = 32, FOLLOWING = 33, FOREIGN = 34, GLOB = 35, KEY = 36, LIKE = 37, TABLE = 38, IF_T = 39, IGNORE = 40, IN = 41, INDEX = 42, INITIALLY = 43, INSERT = 44, IMMEDIATE = 45, IS = 46, NO = 47, NOT = 48, NULL_T = 49, MATCH = 50, EXISTS = 51, ON = 52, OVER = 53, PARTITION = 54, PRECEDING = 55, PRIMARY = 56, RAISE = 57, RANGE = 58, REFERENCES = 59, REGEXP = 60, REPLACE = 61, RESTRICT = 62, ROLLBACK = 63, ROWID = 64, ROWS = 65, SET = 66, TEMPORARY = 67, TEMP = 68, THEN = 69, UNBOUNDED = 70, UNIQUE = 71, UPDATE = 72, USING = 73, VIRTUAL = 74, WHEN = 75, WHERE = 76, WITHOUT = 77, TYPE_NAME = 78, COLUMNDEF = 79, COLUMNCONSTRAINT = 80, TABLECONSTRAINT = 81, CREATETABLE = 82, CREATEINDEX = 83, INDEXEDCOLUMN = 84, KEYWORDASTABLENAME = 85, KEYWORDASCOLUMNNAME = 86, DIGIT = 87, DOT = 88, ID = 89, QUOTEDID = 90, QUOTEDLITERAL = 91, NUMERIC = 92, NL = 93, COMMENT = 94, WS = 95, STRINGLITERAL = 96, LPAREN = 97, RPAREN = 98, COMMA = 99, SEMI = 100, PLUS = 101, MINUS = 102, STAR = 103, TILDE = 104, AMPERSAND = 105, BITOR = 106, OROP = 107, EQUAL = 108, EQUAL2 = 109, GREATER = 110, GREATEREQUAL = 111, LOWER = 112, LOWEREQUAL = 113, UNEQUAL = 114, UNEQUAL2 = 115, BITWISELEFT = 116, BITWISERIGHT = 117, SELECT = 118, SLASH = 119, PERCENT = 120, NULL_TREE_LOOKAHEAD = 3 }; #ifdef __cplusplus }; #endif #endif /*INC_sqlite3TokenTypes_hpp_*/ sqlitebrowser-3.11.2/src/i18n.pri000066400000000000000000000033031345112435200165640ustar00rootroot00000000000000# This file is taken from the project https://gitorious.org/qop/qop/. # For autocompiling qm-files. #rules to generate ts isEmpty(QMAKE_LUPDATE) { win32: QMAKE_LUPDATE = $$[QT_INSTALL_BINS]/lupdate.exe unix { QMAKE_LUPDATE = $$[QT_INSTALL_BINS]/lupdate !exists($$QMAKE_LUPDATE) { QMAKE_LUPDATE = lupdate-qt4 } } else { !exists($$QMAKE_LUPDATE) { QMAKE_LUPDATE = lupdate } } } #limitation: only on ts can be generated updatets.name = Creating or updating ts-files... updatets.input = _PRO_FILE_ updatets.output = $$TRANSLATIONS updatets.commands = $$QMAKE_LUPDATE ${QMAKE_FILE_IN} updatets.CONFIG += no_link no_clean QMAKE_EXTRA_COMPILERS += updatets #rules for ts->qm isEmpty(QMAKE_LRELEASE) { #a qm generated by lrelease-qt3 can be used for qt2, qt3, qt4! win32: QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease.exe unix { QMAKE_LRELEASE = lrelease-qt3 !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease } !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease } !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 } } else { !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease } } } updatets.name = Compiling qm-files... updateqm.input = TRANSLATIONS updateqm.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm updateqm.CONFIG += no_link no_clean target_predeps updateqm.variable_out = copytranslations.files QMAKE_EXTRA_COMPILERS += updateqm # Copy translations into the bundle when one is created mac:contains(CONFIG, "app_bundle") { copytranslations.path = Contents/MacOS/translations copytranslations.depends = updateqm QMAKE_BUNDLE_DATA += copytranslations } sqlitebrowser-3.11.2/src/iconos2.ico000066400000000000000000002126401345112435200173470ustar00rootroot00000000000000BA(HCI   CI BA(CI @CI BA(CI  @CI  @@BA(CI@@E CI@@U rrraaaUUUIII???555---%%%sss̕pppaaaUUUIII???555---%%%rrr̕ssscccXXXNNNDDD888---$$$sss}}}|||yyytttkkkWWW;;;"""```tttyyylllccc[[[XXX[[[eeerrrOOO$$$EEEvvvʓppp```TTTHHH>>>444---///333&&&sssҗsssaaaUUUJJJ@@@555,,,###rrr|||wwwtttrrrkkk]]]III111iiiyyy|||rrriiidddcccgggooooooEEE DDDtttƓppp```TTTHHH>>>555111888===)))oooԘrrraaaUUUIII???444,,,###rrryyyrrrmmmhhh___QQQ???+++ooo}}}kkk;;;<<>>===>>>EEEUUUlllUUU'''---UUUмvvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333---***)))555WWW=== JJJcccğvvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333...***&&&""" ***yyy̟vvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333...***&&&###pppҫpppggg]]]WWWRRRNNNHHHCCC===777333...***&&&### pppαzzzrrrllliiigggeeedddccc___ZZZTTTLLLBBB777---&&&###pppzzzyyyzzzyyyrrreeeVVVCCC///!!!rrrvvv|||}}}zzzzzzzzz|||yyydddDDD###ggggggzzzwwwllleee___XXXRRRNNNJJJHHHGGGJJJQQQ___rrrwwwIII!!!<<<```κvvvkkkddd]]]WWWQQQLLLFFFAAA<<<666222......666NNNtttLLL%%%222WWWvvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333...***%%%###)))###&&&|||}}}ʟvvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333...***&&&###+++pppҤzzzmmmeee]]]WWWQQQLLLFFFAAA<<<777333...***&&&### pppзyyymmmggg```]]][[[XXXTTTOOOHHHAAA999111***&&&###ppp|||vvvvvvwwwzzz}}}}}}zzzwwwrrriiiaaaTTTEEE444&&&pppwww|||yyyhhhPPP333mmmlllssshhh;;;LLLeeeTTT((("""FFF111DDD|||ppp333###???aaazzztttXXX555###///===MMMXXXccckkkmmmrrrpppmmmiii```VVVHHH888+++??zzzrrrllliiieeeccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999777zzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000...,,,ĺzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((&&&Ⱦzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$###ĺzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" }}}Ⱦzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" tttzzzĦzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" lllrrrzzzȦzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" kkkrrrzzz̦zzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" kkkpppzzzΦyyyrrrllliiieeeccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" kkkpppzzzеzzztttooohhhccc\\\ZZZWWWTTTQQQOOOLLLHHHEEECCC@@@===;;;888666444222000---,,,)))(((%%%$$$""" kkkpppzzzȼtttlllhhhddd___\\\[[[[[[[[[ZZZXXXXXXVVVTTTPPPMMMHHHCCC>>>999444222///---,,,)))(((%%%$$$""" kkkpppzzzȵ}}}rrrhhhccc_________```aaacccdddeeeeeeeeeeeedddcccaaaaaa```]]]]]]\\\\\\[[[WWWTTTNNNGGG===333---)))'''%%%$$$""" kkkpppzzzȷvvvkkkeeedddhhhmmmssswww|||}}}zzzvvvrrrlllgggaaa___]]][[[VVVMMMAAA333(((###""" kkkpppzzz|||mmmgggiiirrrzzzwwwmmmeee```]]]XXXMMM:::))) kkkpppzzz|||iiieeemmmzzzttthhh```\\\TTT<<<$$$kkkrrrpppaaagggvvv}}}oooaaa\\\NNN,,,kkkppplll]]]aaawww}}}tttooolllhhheeeaaa]]][[[XXXVVVUUURRRPPPQQQRRRUUUWWW\\\cccmmmwwwmmm___UUU---kkkddd[[[gggzzzrrrllliiieeeccc___\\\XXXVVVRRRPPPMMMJJJGGGDDDBBB???===;;;:::;;;???EEEQQQdddwwwvvv___QQQ###]]]MMMQQQƺzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666333111///...222;;;MMMhhhhhhJJJ///DDD///GGGzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---+++)))''')))444QQQwwwppp222(((999)))}}}ĺzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%###"""+++PPPLLL$$$///zzzȾzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" $$$yyyrrrĤzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" NNNyyyzzzȦzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" ###mmmrrrzzz̦zzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" kkkrrrzzzΤzzzrrrllliiieeeccc___\\\XXXVVVRRRPPPMMMJJJGGGEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" kkkrrrzzzкwwwpppiiiccc\\\ZZZWWWUUURRRPPPMMMIIIFFFCCC@@@>>>;;;888666333222000---,,,)))(((%%%$$$""" kkkrrrzzzʼ|||rrrkkkeeeccc```]]]\\\[[[[[[[[[[[[[[[ZZZXXXWWWUUUQQQNNNHHHBBB<<<777333///---+++)))(((%%%$$$""" kkkrrrzzzη}}}ooogggaaa``````aaadddggghhhiiikkklllmmmmmmlllkkkiiihhhgggdddaaa```___]]]\\\[[[XXXTTTNNNDDD999000***'''%%%$$$""" kkkrrrzzz̸wwwkkkgggeeeiiipppwww|||zzzsssmmmgggccc___\\\ZZZTTTIII:::,,,$$$!!! kkkrrrzzzppphhhhhhpppzzztttkkkddd___[[[TTTCCC///"""kkkppp}}}ooodddhhhvvv}}}oooccc]]]XXXEEE)))kkksss}}}eee```mmm}}}|||yyyvvvssspppooooooooooooooopppssswww|||wwweee]]]TTT333llloooeee\\\iiizzzrrrllliiieeeccc___[[[XXXUUURRRPPPMMMJJJHHHGGGGGGGGGIIIMMMUUU___kkkvvvsss```ZZZ333iii```ZZZmmm¸zzzrrrllliiieeeccc```\\\ZZZVVVRRRPPPMMMJJJGGGEEEBBB@@@===:::888666555666<<>>;;;999666444222///---+++---555IIIhhhiiiEEE---???***EEEzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))'''%%%'''666[[[lll,,,$$$:::(((}}}Ƽzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%###!!!"""444777***333FFFzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" ;;;煅yyyƦzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" IIItttzzzʦzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" 222lllrrrzzz̦zzzrrrllliiieeeccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" kkkrrrzzzΨ}}}tttoookkkgggddd```\\\XXXVVVRRRPPPMMMJJJGGGEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" kkkrrrzzz¸yyypppiiiccc\\\[[[ZZZWWWVVVTTTQQQNNNJJJGGGCCC@@@<<<999666333222///---,,,)))(((%%%$$$""" kkkrrrzzzƵwwwmmmhhhccc```]]]]]]]]]\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZXXXVVVRRRMMMFFF???888222---+++)))(((%%%$$$""" kkkrrrzzzȱtttiiidddcccdddeeeiiimmmrrrtttvvvwwwyyyzzz|||zzzyyywwwvvvvvvsssppplllhhheeeccc```]]]\\\[[[WWWPPPFFF;;;111)))%%%###""" kkkrrrzzzȷttthhhgggiiipppwww}}}zzztttmmmggg```]]][[[VVVIII777)))""" kkkrrrzzzooogggkkksss}}}yyyoooeee___[[[QQQ>>>)))kkkppppppcccgggttt|||mmmaaa\\\TTT777 kkksssiii]]]hhh|||rrraaa[[[BBB kkkiii______tttggg]]]AAAeeeXXXWWWwwwcccRRR***NNN;;;NNNlll<<<,,,666###<<>>===<<<;;;999888777¼}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222111ľ}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...------}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***))))))¾}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$###¾}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!!}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! ¾}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" }}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! zzz}}}¾}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! vvvyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! tttwww|||ĭ}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! pppssswww|||ƭ}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! lllooosssyyy|||ȭ}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! kkkooosssyyy|||ʭ}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! kkkooosssyyy|||Ϋ}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! gggkkkooosssyyy|||Ϋ}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! gggiiiooosssyyy|||Ϊ|||wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! gggiiiooosssyyy|||Ϋ|||wwwsssooolllkkkiiihhheeeeeecccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! gggiiiooosssyyy|||}}}yyytttpppkkkgggccc___\\\[[[XXXWWWVVVUUUTTTQQQPPPOOONNNLLLJJJHHHGGGEEEDDDCCCBBB@@@???>>>===<<<:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! gggiiiooosssyyy|||¾|||wwwsssoooiiieeeaaa]]]\\\\\\\\\\\\[[[[[[[[[ZZZXXXXXXWWWWWWUUUTTTQQQOOOLLLIIIFFFCCCBBB@@@>>>;;;:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! gggiiiooosssyyy|||ƾ}}}vvvooohhhccc```___\\\[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZXXXVVVTTTPPPLLLGGGBBB===:::777444333333111000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! gggiiiooosssyyy|||Ⱦ}}}tttkkkddd```]]][[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ZZZWWWTTTNNNGGGBBB<<<666222///------,,,+++***)))((('''&&&%%%$$$######"""!!! gggiiiooosssyyy|||ȸ}}}rrrgggaaa___\\\[[[[[[[[[[[[[[[\\\\\\]]]___```aaaaaacccdddeeegggggghhhiiikkklllllllllkkkiiihhhggggggeeedddcccaaaaaa```___]]]\\\\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]]]][[[ZZZVVVMMMCCC:::222---***))))))((('''&&&%%%$$$######"""!!! gggiiiooosssyyy|||Ⱥzzzmmmddd___[[[[[[[[[\\\]]]```ccceeehhhlllooosssvvvzzzzzzwwwssspppllliiieeeccc```]]]\\\[[[\\\\\\\\\\\\\\\\\\\\\]]]\\\ZZZTTTIII???555---)))&&&&&&%%%$$$######"""!!! gggiiiooosssyyy|||̼zzzlllaaa]]][[[[[[]]]```ccciiiooottt||||||tttoooiiiddd```]]]\\\[[[\\\\\\\\\\\\\\\]]]\\\XXXQQQCCC333)))%%%$$$######"""!!! gggiiiooosssyyy|||ʾrrreee___[[[\\\___eeemmmtttzzz|||tttmmmeee```\\\\\\\\\\\\\\\\\\\\\]]]XXXMMM;;;---%%%"""!!! gggiiiooosssyyy|||Ⱦ|||kkk```\\\[[[___dddmmmvvvwwwmmmddd___\\\\\\\\\\\\\\\]]]\\\UUUEEE333%%% gggiiiooosssyyy|||zzzkkk```[[[\\\aaakkktttvvvlllaaa\\\\\\\\\\\\\\\]]]ZZZJJJ333###gggiiiooossswww|||}}}kkk```[[[[[[___hhhtttvvvhhh___\\\\\\\\\\\\]]]ZZZHHH---hhhkkkooossswwwrrrccc\\\[[[\\\dddppp}}}pppddd]]]\\\\\\\\\]]]VVV;;;###iiikkkooosssiii___[[[[[[]]]eeewww}}}|||zzzyyyvvvtttvvvvvvwwwwwwyyyyyyzzz||||||}}}wwwggg]]]\\\\\\\\\\\\HHH&&&iiikkkooozzzlll\\\[[[\\\\\\dddvvv|||wwwrrrpppmmmlllkkkhhhgggeeecccaaa___]]][[[ZZZZZZXXXWWWVVVUUUTTTRRRQQQQQQPPPPPPRRRUUUXXX]]]aaaeeekkkpppvvv|||wwwddd\\\\\\\\\]]]NNN)))iiikkkooopppaaa[[[\\\\\\]]]mmm|||wwwsssooommmllliiihhhgggeeecccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRPPPOOONNNMMMJJJIIIHHHFFFEEEDDDBBBBBBBBBBBBBBBBBBEEEMMMVVV___iiivvvooo___\\\\\\]]]OOO%%%iiikkklllaaa\\\\\\\\\```vvv}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBB@@@???>>>===;;;:::888888999;;;>>>FFFOOOXXXhhhzzzwww```\\\\\\]]]GGGiiikkkeee\\\\\\[[[```zzz}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888666555444333111111333777CCCTTTgggzzz|||```[[[\\\[[[333kkkgggVVVQQQQQQTTTrrr¼}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333111000...------///333@@@QQQeee|||tttTTTQQQRRRDDDooo[[[EEEBBBBBBUUUľ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,***))))))+++333GGGccc}}}VVVBBBCCC@@@###vvvMMM555444555___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))(((&&&%%%(((222LLLoooaaa555444444###>>>))))))***___¾}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%######)))>>>cccaaa+++)))))) ;;; HHH}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$###""" %%%:::eeeJJJFFF###sss¾}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" $$$AAAddd%%%$$$%%%$$$iii}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" """///VVV)))hhh}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""  MMMhhh}}}«}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" [[[|||yyy|||ī}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" 888Ҁssswww|||ƫ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" OOOrrrsssyyy|||Ȫ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" ###ooooootttyyy|||ʪ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" lllllloootttyyy|||̪}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||̨}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||̨|||wwwsssooommmkkkiiihhhgggeeecccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||̯}}}wwwssspppooolllkkkhhhgggdddccc```___]]][[[ZZZXXXWWWUUUTTTRRRPPPOOONNNMMMJJJIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||}}}wwwpppiiiddd___\\\[[[ZZZXXXXXXWWWVVVUUUTTTQQQPPPOOOMMMJJJHHHGGGEEECCCBBB@@@???>>>===;;;:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||¼yyyrrrlllhhhdddcccaaaaaa```___\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[[[[[[[ZZZWWWVVVTTTQQQOOOLLLIIIFFFBBB???<<<:::777666555444333333111000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||Ƽtttlllgggaaa```]]]\\\[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZWWWRRRMMMGGGBBB<<<888555333111000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||ȼzzzrrrhhhaaa___\\\[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\\\\\\\\\]]]]]]]]]]]]___]]]]]]]]]\\\\\\\\\\\\[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]\\\[[[XXXUUUOOOHHHAAA888222...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||ξssshhhaaa]]][[[[[[[[[[[[\\\]]]]]]___```ccceeeiiillloooppprrrsssssstttvvvwwwyyyzzz|||||||||zzzyyywwwvvvtttssssssrrrpppooolllhhheeeaaa```___]]]]]]\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]\\\XXXQQQGGG>>>444---***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||ʼ|||oooddd___\\\[[[[[[\\\___aaaggglllppptttyyy||||||wwwtttppplllgggaaa___]]]\\\\\\\\\\\\\\\\\\\\\\\\]]][[[WWWOOODDD999---(((%%%%%%$$$######""" iiikkkoootttyyy|||ȸrrreee___[[[[[[]]]aaaeeelllrrryyywwwrrrkkkeee```___\\\\\\\\\\\\\\\\\\]]]]]][[[RRRCCC333((($$$######""" iiikkkoootttyyy|||ƺwwwiii```\\\[[[]]]ccckkkttt}}}|||sssiiiaaa]]]\\\\\\\\\\\\\\\\\\]]]XXXMMM;;;,,,$$$!!! iiikkkoootttyyy|||Ƽtttggg]]][[[]]]aaaiiisss}}}|||rrrhhhaaa]]]\\\\\\\\\\\\]]]\\\UUUDDD///###iiikkkoootttyyy|||ttteee]]][[[\\\cccooo|||zzzmmmaaa\\\\\\\\\\\\\\\]]]WWWDDD,,, iiikkkoootttwwwzzzggg]]][[[\\\```iiiwwwvvvhhh___\\\\\\\\\\\\]]]VVV<<<$$$iiikkkooosss}}}oooaaa\\\[[[\\\dddssspppccc\\\\\\\\\\\\\\\LLL---iiikkkooowwwkkk]]][[[\\\\\\dddttt|||wwwtttsssrrrooommmkkkhhhgggdddccc```___]]]]]]\\\[[[[[[[[[[[[[[[[[[[[[\\\]]]aaaeeeiiimmmsssyyysssccc\\\\\\\\\]]]UUU222iiikkkooozzzppp]]][[[\\\\\\```rrr|||wwwsssooommmkkkiiihhhgggdddcccaaa```___\\\[[[ZZZXXXVVVUUUTTTRRRPPPOOOMMMLLLJJJIIIGGGFFFFFFFFFFFFFFFFFFHHHMMMPPPVVV```iiitttooo___\\\\\\]]]XXX444iiikkkooohhh\\\\\\\\\\\\ggg}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBB@@@???>>><<<;;;:::;;;===@@@GGGPPPZZZeeerrr|||ddd\\\\\\]]]WWW---iiikkkiii___\\\\\\\\\kkkƾ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<:::999888666555333333333555;;;HHHXXXlll}}}hhh\\\\\\]]]PPP###iiiiii___XXXXXXXXXhhh¼}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333222111000......111777EEEVVVkkk}}}dddXXXXXXZZZ777lllaaaNNNJJJJJJTTTľ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,******---333FFF```|||zzzQQQJJJLLLBBBrrrTTT===<<<<<<___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))(((&&&)))111EEEgggWWW<<<===:::"""rrrDDD//////222hhh¼}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%###'''777WWWzzz]]]000//////""":::$$$$$$&&&___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$###"""###///RRR|||TTT$$$$$$$$$666>>>¾}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######!!! !!!///ZZZ}}}444QQQ"""ttt}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" !!!111(((111QQQ¾}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" eee(((VVV}}}}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" AAAtttwww}}}ª}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" \\\tttwww|||ƫ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" ###tttsssyyy|||ȫ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" 222sssooosssyyy|||ʪ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" """pppllloootttyyy|||̪}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||̪}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||̨|||wwwssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||̪}}}yyysssooolllkkkiiihhheeedddcccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||ľzzzvvvrrrmmmiiiddd___[[[[[[ZZZWWWVVVUUUTTTRRRPPPOOONNNMMMJJJHHHGGGEEEDDDCCCBBB@@@???>>>===<<<:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||¼|||wwwsssmmmiiieeeaaa___]]]\\\\\\\\\\\\\\\[[[[[[[[[ZZZZZZXXXXXXWWWUUURRRPPPNNNJJJHHHEEEBBBAAA???<<<:::999888666555444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||}}}vvvooohhhccc```___\\\[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZXXXVVVTTTOOOIIIDDD???:::777555333222111000///...---,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||¸wwwoooeee```]]][[[[[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[[[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[ZZZVVVPPPJJJEEE>>>888333///------,,,+++***)))((('''&&&%%%$$$######""" iiikkkoootttyyy|||wwwlllccc```\\\[[[[[[[[[[[[[[[\\\\\\]]]___```aaadddeeeggghhhiiiiiikkklllmmmoooppppppoooooommmlllkkkiiihhhggggggeeedddaaa```___]]]\\\\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]\\\[[[WWWPPPFFF<<<333...+++))))))((('''&&&%%%$$$######""" iiikkkoootttyyy|||ssshhhaaa]]][[[[[[[[[]]]___cccgggiiilllpppssswwwzzzzzzvvvssspppllliiieeeaaa___]]]\\\[[[\\\\\\\\\\\\\\\\\\\\\]]][[[VVVNNNCCC888///)))&&&&&&%%%$$$######""" iiikkkoootttyyy|||Ƶsssggg___\\\[[[\\\___aaagggmmmsssyyyyyyssslllgggaaa___]]]\\\\\\\\\\\\\\\\\\]]]]]]ZZZUUUFFF666***%%%$$$######""" iiikkkoootttyyy|||Ƹyyykkkaaa\\\[[[]]]aaaiiirrryyywwwppphhhaaa]]]\\\\\\\\\\\\\\\\\\]]]ZZZPPP>>>...%%%"""!!! iiikkkoootttyyy|||ĸttteee]]][[[\\\```hhhrrrzzzzzzpppggg```]]]\\\\\\\\\\\\]]]\\\WWWHHH666&&& iiikkkoootttyyy|||ssseee]]][[[]]]dddoooyyyyyymmmccc]]]\\\\\\\\\\\\]]][[[NNN555$$$iiikkkoootttwww}}}vvveee]]][[[\\\aaalllzzzyyykkk```\\\\\\\\\\\\]]][[[LLL///iiikkkooosssyyylll```[[[[[[___hhhtttssseee]]]\\\\\\\\\]]]WWW>>>###iiikkkooottt|||ddd\\\[[[[[[___kkk|||zzzhhh]]]\\\\\\\\\\\\III'''iiikkkooo|||eee\\\\\\\\\\\\hhh|||yyyeee\\\\\\\\\]]]OOO)))iiikkkooommm___\\\\\\\\\```sssppp___\\\\\\]]]OOO%%%iiikkklll```\\\\\\\\\ccc|||yyyaaa\\\\\\]]]FFFiiikkkddd\\\\\\[[[ccc|||```[[[\\\[[[111llleeeTTTPPPPPPUUUwwwsssRRRPPPQQQBBBpppXXXBBBAAA@@@ZZZTTT@@@AAA>>>!!!rrrHHH333333444eee\\\333333333"""ttt;;;''''''***dddZZZ(((''''''444JJJAAA///###tttlll888333zzz,,, 888}}}www000---mmmggg(((LLL|||FFF)))XXXQQQ%%%+++PPPvvvrrrJJJ(((888___}}}ZZZ444%%%EEEkkk}}}gggBBB###%%%999RRRooolllOOO666###(((===VVVrrr}}}oooTTT:::%%%..."""###000>>>OOOaaatttsss___MMM===...""";;;***%%%111???JJJUUU```lllwww||||||vvvkkk___TTTIII>>>///###<<<444...%%%!!! '''...666???FFFIIIMMMPPPTTTWWW[[[___cccgggkkkllliiieeeaaa]]]ZZZWWWRRRPPPMMMIIIEEE>>>555---&&&  UUUQQQ555+++###$$$$$$UUU\\\QQQ888333...$$$ ---///)))mmmoooPPP<<<999555///)))### $$$''''''%%%000???444NNN뜜tttssspppeeePPPCCC>>><<<:::888666333111///---)))&&&$$$###$$$%%%(((***,,,---///000111222222000111>>>LLLQQQMMMDDDaaasqlitebrowser-3.11.2/src/icons/000077500000000000000000000000001345112435200164055ustar00rootroot00000000000000sqlitebrowser-3.11.2/src/icons/application_side_list.png000066400000000000000000000007761345112435200234670ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDATjTaQA[m-EqJ-&"&V ĔZb 4ށBA, (nDVrwnuypK #nq3Ldg+u4:/.p'<9<~ _}y'Gua#}i!Sǿα19/d;ag5fRIH) PMFhۖhTɐS&XA&Bu9ag fJ ȉBP%#,{%MӰT*! ($BږrNNNڎPD ksttS9%.\"TIO֘UR"* wB=}wٮ 03$am˭ǟ;.͑ 3̜~+QIENDB`sqlitebrowser-3.11.2/src/icons/bullet_arrow_down.png000066400000000000000000000003111345112435200226360ustar00rootroot00000000000000PNG  IHDR7gAMA7tEXtSoftwareAdobe ImageReadyqe<[IDAT(cπ2 ) _w'Pќ(X-ˊ_P&Kt~[NGVIΔ!  QP:IENDB`sqlitebrowser-3.11.2/src/icons/bullet_arrow_up.png000066400000000000000000000003111345112435200223130ustar00rootroot00000000000000PNG  IHDR7gAMA7tEXtSoftwareAdobe ImageReadyqe<[IDAT(cπ2 9%V^$SzeWSU (uW_y, _?oC,$ Шi^IENDB`sqlitebrowser-3.11.2/src/icons/chart_curve.png000066400000000000000000000013061345112435200214200ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<XIDAT8c?%L=nEKtw9. ~><26:} 8?|# V4G:~4>αn60<>zx|{Wro.{ؕW#,"d\׼_˦mnQ0,=4tY! {Ջnd -&o[]߹LMz,t`Iw`=][}  '!c ?U~! ?#&;(!pkt%6guf};/*cyߊo_wr8k[ӻ-/n?5 IENDB`sqlitebrowser-3.11.2/src/icons/cog.png000066400000000000000000000010001345112435200176520ustar00rootroot00000000000000PNG  IHDR7gAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT(UQMKa^ tT2 .EQС:EeQPR麖QRq%!O^wm!c333 To^%ۚ\Y|gz),{ b,پ7g| fʨ'TǂLGUM W0FDNC \`BASJk4$0SrI ZHd (cO:/B&69I#M:X61đ|hK5AJTȐ9Zf) 9+<OQ  **4KrHk?WDj L>c!i9BL%^0n9ֈs>i ֓i붻k>Gj ]IENDB`sqlitebrowser-3.11.2/src/icons/cog_go.png000066400000000000000000000015331345112435200203520ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8mSKSq>6'zG5|icŠ%d>,oB~!G}~?d5_IJ1t95v9%/1~,ښ {Xl_ZZ566Z̀d' ؏ulJ`j5DQL`A9x<anF&%,j* (BIl6MNNd3 yhbx'EmooC8V?A4ojj\Pt: uuup8@irNh 8 hb VX*z@[cn. Cpd%dH$œN'X,j766 J|yhy[ 5  SSS Oii 5ROU-/ep@`ue FJSL_d"$3nuz`;,Õ]$Ξ87776JJ(gS(B Fa5AFUzmP=onn#MI&v>  $&Zn_RYT5@ p Rfj 2rن`)d—O+O-`8Yԓt~0,Qjok!BxAPk>aZC+Ǹigggsnpn}s Xkw_3:*WrlNC/-좕B'{ u_a46ҽbߡE%D47;ٻƩ;8ˣ}>6[ӕS@*Z Qk>~͵hB\9uxZvYb J Cيٽ?BYvn&kft$,d9Zap\^ Y7 QJF 9=Q4 ؜Io SBpsI) Fv(@yՎވc\@ %% Z2h'@d(<|áaJuM@O⤁LGjd!X8Af 5J i K->w62ƾWH}:mP]XB0QX=ib_g=!Ftt…clrIENDB`sqlitebrowser-3.11.2/src/icons/database.png000066400000000000000000000006061345112435200206610ustar00rootroot00000000000000PNG  IHDR7gAMA7tEXtSoftwareAdobe ImageReadyqe<IDATϊaG4&& O8 I͆sR( Qd,Y† jĔf<{\@vWν+zZwfyy #_|;xK*I$I!E, 78nC߭Y9%: J4Mhi!(3hPbl@aXuR̠A-͆. C3?١M+d-tР}mゕIl9؆)zT;3C'QӃtGIENDB`sqlitebrowser-3.11.2/src/icons/database_add.png000066400000000000000000000012221345112435200214640ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<$IDAT8˥SMRQSQ4)"20a,rj'C(ffԮL0h6-aѪ BY6 |1E{sƃIZtssUl,(J^#\,k&iD(e2SrYi(JE"~^0h4n付fbR9=iF#ZڅB䩲2NFAI.9i|zx9ôkWEBk({0!sLlrRyL&XL c*[e>ƽ\"@q|>Y^~ NfRgƇU+voIs\ tW AAx5ByIENDB`sqlitebrowser-3.11.2/src/icons/database_go.png000066400000000000000000000012721345112435200213460ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<LIDAT8˥SkA}$$$U!$$ĂiIA z rѓ ^rv ;` ),|kZNtPTd2ETyf29fl`!F#P*P(@.ft ^N'˽ `6vepbwww $JJ&ùl*>PXqKc2- t@׳nSՠlp84bznth5t]HP-v0pR#x/T* cR77PVDx& uպW<Ьb4 0t:XVBH$p8bjޡdy\4 Lth$jT.|>b˝Hn>Bq4/-h0av b,r.KjX<ؑ9c1Pa`0QT~?FFY36IENDB`sqlitebrowser-3.11.2/src/icons/database_refresh.png000066400000000000000000000014021345112435200223720ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˅S]HQ~Mї4+4\!҅DDE]2ʫ../. &Aw276 [9+s;Gd2VW -aԐ&Dz BY_"t#IR]YYl6 766L&>^b|eYf2`0yXk0rZNt:RNU"ELӰ%%%XI.kehM,,-uo_`S`u" 9qeA7tOҗ=oZnVf-,(MC >}$~LEX UQQ^TC}ÈP8!80D|{ 럿jsrh\4v:?]9 ýC9Q4EG؝<Ū9_ǘA &!~AhLLGP~Q GR6]Q4v6Q?8,HxfK.>@Pq j&8,<'B.VYY Apmڭ\Z]?:k#{H: nR+gP~=LhOF@OV{£`twws</ꚭo;AM#@#*IENDB`sqlitebrowser-3.11.2/src/icons/database_save.png000066400000000000000000000013631345112435200217000ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˅SMkQ=L'`L bZ4Vp+AM.;.\WB;A\P .\hLI;dI--^8sÿ0 Q(.Apʟ(#FFF|l 1;;;HT*x<4h6(˨jf /Y..\ b0t9L&H :SZE,C4af6:* 躎FqԽy, VK=ږhf'utG{a=vEhL[ Payrr+ҰTB`vpz . u٠eCjfn7=y]uѡjKm ΀ǑR@ p{lDԡfc0:˜!ᐋ .xD4HVWE_zH{ФAVu5J"pIMfg2x__"!6* j;MdmJ5snMZMNNYXX^*R]/A4 Xkm#5C fvGGGP˜^YY9) ęc艤%'=qf>"r*@c38!;. X>ac3~Z.~V'1IENDB`sqlitebrowser-3.11.2/src/icons/document-open.png000066400000000000000000000012401345112435200216650ustar00rootroot00000000000000PNG  IHDRasBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8KQ?}oIkRK?% rjХ7#M+hh!EB-siꛖ`p{9+CCCD͆."@Q""}ݸ\Uo/,-9s@D'&_Lslppp936&N3cxhͳ nTUnH)[fz+D07f cd "BUU]keY"=va#AUM5s}Eιvp5bPRJc MZd;8bL; y/qk"K;ʢX JJ_(H `|LH)YJ pJ[GDY Nq)%SMPPXlb{ט dr4f4ScD$mφI1s̝lNVJa.X33؎l7zԝ, ܉wgm`^Z?q!SKwY^ZôldoKu2IENDB`sqlitebrowser-3.11.2/src/icons/folder.png000066400000000000000000000010311345112435200203610ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8œA[EtQg7wALCWA0P017p2=:A3cb2'pܪ$Vme@ ݬ2OTO1W/`z8% ;O;9P#9B}^nO;Ǫo~ d~E dpɳ__j~= Q),*LCyq^M.A%ĆITCο8<㛮>sŨ '$*S`=?w/eB΃ѓII3c~@@$_ƪd16a (xK-~; ( )d1&I<DX 4ge߈K*1@G#5E) δ8ƹ* Q @ʨP룶ƣa2WC!u@z )Tj@#TC0!81\f2W#P Qa*~=]4/IENDB`sqlitebrowser-3.11.2/src/icons/help.png000066400000000000000000000014221345112435200200420ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˥Oa[Ohjj8'r t,)53 j꜊o"&ʗ b"_DxU5Z{ۮg c#Z@'U4Ş6$S=:!O;4A*g; G hhh!9U@8rk2ه.s~ƜYG# W'?ElqNdkr5XpP˄: 1XcHP`%:I]`t)*\C8h3G ?~sA jMG]Njf}s!t&6QcBU 4P۶A3-nSXxm$vJ,hHVb v(y; 6*P(GtFOw>B1#C6K#G#O4P$ꃄsfV36 h7eo %cGY')O4˹@tmA,Yi database_add.png database_go.png database_refresh.png database_save.png table_add.png table_delete.png table_edit.png tag_blue_add.png tag_blue_delete.png page_edit.png page_delete.png page_add.png page_green.png table.png tag_blue.png view-refresh.png picture_delete.png picture.png picture_add.png script.png script_add.png script_delete.png wrench.png help.png tab_add.png resultset_next.png page_save.png page_white_database.png plugin_add.png plugin_delete.png table_save.png resultset_last.png layout_sidebar.png bullet_arrow_down.png bullet_arrow_up.png sqlitebrowser.png internet-web-browser.png package.png package_go.png page_key.png key.png document-open.png chart_curve.png cog.png clear_filters.png page_copy.png resultset_previous.png resultset_first.png picture_edit.png script_edit.png tag_blue_edit.png folder.png database.png cog_go.png page_paste.png folder_user.png server_go.png page_find.png cross.png page_white_copy.png page_copy_sql.png text_replace.png picture_save.png application_side_list.png database_link.png text_indent.png printer.png package_save.png sqlitebrowser-3.11.2/src/icons/internet-web-browser.png000066400000000000000000000016401345112435200232000ustar00rootroot00000000000000PNG  IHDRabKGD pHYs  tIME,ޏ5tEXtComment(c) 2004 Jakub Steiner Created with The GIMPًoIDAT8˭]h[ec4i棍mТ,uī)0o)Ee8oR]GAL70v+\?,Mrs {.~8)-] , Xtދ4uljdȁ4c(ˢ\oiɍe!ɹ`W'M d(=ؤQV9?r!'hɊ'2yGDpZmHC6y.KOho~GxhnChCJLC$h/C 죤i- <R.r އR+@hc\_$b) kN;Np@f"lR,BRlޡl2Z^G,-Roa<K6BBEzːR5hi!iQh R4L:]Vdz8þTB(HC򷶊ÇƓdF&M/ȧ^]~Zk77 ;sK[x =ءw vǶm*X]|/|xBHРeq弢pk9.žVίs3S/RPpl71IENDB`sqlitebrowser-3.11.2/src/icons/key.png000066400000000000000000000011441345112435200177030ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8ˍKOQMYpKBр  W bRhH"4 %RR.Zi;s m'y73yrΔ(ɗéNEw$aՇT 9:$Ih^U8?A80?OZ~ԁlN2#71ɭ2Y$#@{ve+﯄,Mx 4ߡ;/ @buP=|FҲb3{!˭8\OǤ3}W9Mp*-LvԆ=h=8GFyGڞb¼P޴TxJT2A렇9sOnDZk)W9JZB"c@kw6m~RA\ve v[lWएп; bb#YX3Ԑ~~!yC,A uBvNq,fX}ۦxQ3/׼*ݨD̆kIENDB`sqlitebrowser-3.11.2/src/icons/layout_sidebar.png000066400000000000000000000007371345112435200221300ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<qIDAT8˥KVQ? XX("8d'8 :X?"({9o}z-8n\F)PAD QTWf!"؍` HC0ijC1ͳLfw(v!g}69)wyc/T4"Գ X8ѫ̛vכ*WGU}[E>7&tJiG+*rQE>{ `=9o/rorgaw=MЪUQVcƏ;}ź;qD>r 7jT1aU&m86l7KVio{Ǥ9sVԨ,O"aWūmptk.h-V}֯K*R\M- Юޡ'O'CU0)79Ms&3P#V 'w'ů N,op#LRi4Qj h]GS\;QƤBH`1@<Ѐd^{9] !"dlǁD @|0mp  Q a+kK7 "$ h$?$BrN#&Cif N7SV[6laL/HbF6tX=ֽɕد}GO|뻗zUC5rh8D>)4Vwͦ|"L\>2FΫ[^yjW?'q{gBio.ȧTctܲ^&IENDB`sqlitebrowser-3.11.2/src/icons/package_go.png000066400000000000000000000016021345112435200211720ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8mKh\u;g4$M$MKդԦT!E¢"݈@ .D('I LLcgIژy޹?]hms,UeL7"hTEފ}_@bh"'7eF*xhfMH@U_R}ZC1;I TC.9?OU䬊|3xCP`ˮcA9naj7S--43Ɯwb'kvW 6m { ˬ.`"n)KȪڹj&XLNQ^IW#/8tr c'T^ϒ_žO DA)XmSӿ?Wb! T6VO},B27ʷ)r5R` m'b&b@ XSޙj@0*Opσ^ qZyV?b{.MqNͦ8j ~5P5 .Hʛ߃8xc;`xy~oGW/"xT F#Aɬ.E‘C|$a0Cm&̀ss0*ኇ'.qW l:H-sO9\X_#o0!۳GNZofc]L/\~Ã)OYENGlϡq7v1y &ϔ= ig\o9"o}K'Cc)Gx,3ΚogT]D*vK#5M1ܐz{<kIENDB`sqlitebrowser-3.11.2/src/icons/package_save.png000066400000000000000000000015701345112435200215270ustar00rootroot00000000000000PNG  IHDRabKGD pHYs  tIME % ZKIDAT8uMh\u7e&3ICR&Fڦ)fS?B~OnZi]م]U u K bm؂j'14 I8yޛֳׅP8݈VѬԷ?ߌg=:x"l~2gk+\~]E?T+oy앛L {WEe;wtl~G,KxřQ'/QdS#û}+o]OjoGo'NvjI*K?GvL Ȟ&պKhzu *LN*KyiI'\CzeQ$*K% 38^cT <͆V[™g]*!$E MS1-˕bi#މaU45oKf {pE~a?|w2ZA!MڷuUbX! b(PZ0Fpڿ6jA >h u+w`Ŋ@HB4:4B|$ HyAX9ﴪ iOp1jC" 6"%1 CczE1XHeܞء[>L"KˁG(RnGOs\xV #.~s0퉜H!˴08s ~^E_,Nzuc#td*ʅt% }6q2=V}.vDžw}z᷶/ bPfvf`džY:LI@A JD(JΜ#w o^7=  BFh}RBdq\ֆX=)jCL5QB ZBP!AD6&:@ч,!dLP Z]ABP$)H ~bԜ/G&FdHВ:}soUkZq7+qj^a(d4'?/g:x#m;+ǽgvf}7->hgߞ1+qkKENݯ_4K'S5 XcZ*JJ#~0[@jӲ^~17 J+yjm6gw;p@ dG h(ʙע(o 6؛o. g8& cz4/, A7H{؜%6I|}{(>h̙?8aDv7-MOwk /=lY8yHKI/Ĭ dJі8vz6ۀ奫ˏ/q|a UVW=ZNs*N9p}ԅ|3m2o aahp}~pawsF ?}Ňcܱl8--&;T߶řlw^~p=,+2tD] "(669]f߅I@A JD(JwɆ^߹V7=  BFh}RBd4jcS1Xe }O$hɍ#N}ྦྷ3K?}bB8L A##=}-`xU6o_ qu]ђ>郖[6༮ akrԋoZ%Wλ1G_4\::]*,/_w4E+;}V IL}oG)g$[?/`/} -%nQP`IENDB`sqlitebrowser-3.11.2/src/icons/page_edit.png000066400000000000000000000014471345112435200210420ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDATOhuyw9ge&"2&A:uVt.AA]9롢H낆 Ҋ?/}_'֏ jC E#m*Ưi)LYUھ}ظxq`u#RkRJj4$! dD!iOn9C/im&N{ A DJD)u\~'ו:nһaK A I"%wyĖU־zRWO؄wRD(SHIF^GTW?VK&y p!mo~r`@Tß_C*Rd uuzp;0V'"cfkD@@x 8Ԛ{yшˡܪowFw_w./,7_t?=S ϋ)fʊE~jήO::5I`.;þX;\fY])V.T (xg8`O­ U|v *`hwLs; k'M}9CP ^ (( 08 w\OE5 BIp>Yt@#tDBK,b+[ޅ*Ϝk"򤢭((((”4LIENDB`sqlitebrowser-3.11.2/src/icons/page_green.png000066400000000000000000000011551345112435200212110ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT?s~~TI!!bF ,H8b1a5l NQB b`^8MA~y*޿\)(0kJiΆIH q~{СMкOgԪ(2X2s,}O>};x3o}~Wtܠ$SjbjLEMa8y޿ww>JҪ*m*u=g6=W|vjz :@B(%UZ4\1mfj"jAƚ6hT*J VZJZ $@10PHZ(} )Be  @)zcԊe 02FHd#W?9Wi!Gc{sގl6IENDB`sqlitebrowser-3.11.2/src/icons/page_key.png000066400000000000000000000014411345112435200206770ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT_swΙ2-!I(vaŅ\p"nȕ;qjf$!q眝>NYoN=0|i\ZsЉo:5c>~'k ?~K=ܷsp;,{,F4SybFoݓ^~~ЍmqCʅmy}#sthno?N#=ƙ?IENDB`sqlitebrowser-3.11.2/src/icons/page_paste.png000066400000000000000000000012771345112435200212320ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<QIDAT1e}AW`^ Eh 6\C Nm- E) RXADVY_~.(^zQ]w{፳:ó޺ҩ `g^9o{2Smt>KGO̵ο,.W1޶;d"]wWEuVei-Cp-^}1[|nm{hg?67[1 ila}>:2΍鏍uivC;?Ҥ[6OD:ƹM/&}8\vN^|b:bq.k-RX$bq\7My| CgsQAT}%E$;z+ &M&j#EdLE)E&ԱjcDKCGW:.0a@f UM&kHТb(\ޞNOڷ*kNT x/?ݍp,2JQ Pwwrnܢ AQJdYZ?5I83IENDB`sqlitebrowser-3.11.2/src/icons/page_save.png000066400000000000000000000014061345112435200210460ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDATMVe78bDfai*QT@h妍P;]B@hQTP6Rd%XAT(T0sxM(a6/AV]-_cgNʞ| #[/?_8s|qmibGm)%deUץOl]z^té̦m "PmYܻٶ'׵s3@I JD(J.][s} ÷h&L8)me4ZkR6DE'.X?갳a+k>+4;uʚ/~{=ov:_ >rIqԎL*2V#nt+"֜LI)IFءjMFn VnaG5^n(#e?y?Wu\%2dzjnl-[6әF:;=2?9oՑUXU/F/ˮIENDB`sqlitebrowser-3.11.2/src/icons/page_white_copy.png000066400000000000000000000004651345112435200222660ustar00rootroot00000000000000PNG  IHDR7gAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT(uMn0E9GBꂫtP kBH$4]8&瑟J&ѨF%@ds3W$q&гݨyFz\MMIENDB`sqlitebrowser-3.11.2/src/icons/page_white_database.png000066400000000000000000000011031345112435200230460ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8ˍj"AMbV 22/bP$jlu!q'FkN.\ qƺd]GSUg\Vvv;LNNb\xXrTN4 RnqT$e2u!sL&` [zш5 )h4H$`6`0Izŵ ojPi&(p'N|'mjZT(  Є  kal6eR0l4!ptipgj*R$*ff<Fc:fsyx^ :߱Q%Xr,!@(>Oqf tׇ|p;*Ji vqD"sNh:x/xO_OW7On )sy9 xΦ_K<IENDB`sqlitebrowser-3.11.2/src/icons/picture.png000066400000000000000000000011361345112435200205670ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˥=kTA3޽& a#Q`TFURXH? B,LA@Al6ٹ;s"fnH`kU?)4[57/.dɣ,D$gŎw]>|xNih:c;Io]bFxl"= c"@a퐖~д-wiDa(``.&w(Å6iҶ9#!zDNKYNB^ϙ 1J=L :HvL4NrYBgM~mmS668b{N2ElrE@r>?V#ޓtF5@9Ub"^mhlnz*yR 9䤽GE棤/>rE^}^Ulm<%D{c@/*K+# =@)wWs33q-\woړĿIENDB`sqlitebrowser-3.11.2/src/icons/picture_add.png000066400000000000000000000013511345112435200213760ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<{IDAT8ˍOHTQFFR1-T\Y-څPТrQ.MBEwᢍծEI-(V.$Q38{3B&+8?s>LV~vֶ|5Ki~XeBS OL_6_9GoWX&%*JNh0Q t8WTBZ 5*LOq1;SHQ]Y 0 WI'G6tqHa7-@^ೞɪC+eΟT$~ "D:!*4 b{7"D̽|YX$SPhbĢXضK wSnbn|H!%Wʾv"n g`jR)h܏fy֍(Tn?x^ޝ豴a`'ȤqSAK)bW-CTddYin-6" Ic )r4׷\\[$QhcY3? "pOgC?ܵBxdh%+uT":a">LW/'^򞊪ֆi8#M` \v)^tLHIENDB`sqlitebrowser-3.11.2/src/icons/picture_delete.png000066400000000000000000000013501345112435200221070ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<zIDAT8ˍ;haӤ&V%iAQ/P(Ut(,N:-jqBBV^CS4i8Dik-p{{Ľni-NVj$eV~]|gp=Z}BKU Jyb Ty/Qe#;a4|O16\:Fi!~C˲Ԭ,xoRIϣ3DxWvhrX$PUjR"M(aa Y1% T XԴDi@1ZXcVN0iT`p " !BKQMضF`LBnc*#dD.$ıĪ8f9]Ϧ.&N#­CO3K͞CiҚ-A}401c$I7'3weM4,-3a] [N_Kogq$c8F^U8 Z <`ϩ^C𲟦Xva:+zl熽 /xoLыKZlvBxhpb_MƬ}Ds3+b PQ6j^w#R 8$kV_y[e)g䍟yo!jPrx_qƓRgK-M> `H%vo8BIkw_f}i۶#~)JbLzY$Rtg/] Rݙ!BC Mqlk_"# ۦe jjz\ |5eP)A2mS 1B"xO% dD,dL'?U^@9CrLŘzr)ںIz$wf(d3p©Mԛ{䨪ְELTi]kqK,YL2CHSWOQdlWS۾?wJ07@S^ef;S$/ zZf.ܥ_㍞G"dUᴷeCR  @a>˚.oLg|ǣ=vhy'H9+]@tx{w5EdHgz{X+ҕ"l&$|3vM C.!\7ĪC)HguwG!vk'^>'GZϖbC/`j\CZLߝd_̸ u<}صݞ6֬ȠLae|b߶ on;IENDB`sqlitebrowser-3.11.2/src/icons/picture_save.png000066400000000000000000000013631345112435200216070ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDATˋUus_ &# "e]mZie]EnB6J0 6QLeɌ3<.ss}|_ܸs:=j@dA#vAJ&qq ]nQЁU&[Cޚ3GxCڜ@Y7EGY4m>?v3PBFQ$Uumlډi4ۮ !J(RMVS3ԹfȭH"A}FˢӵyF93w7љ;sz\3%DPlgv/x+_>.][s^"(dY7pǻ& [k"y-mڜ=QY%`f.9:LIUUkeDHxy ?|UTS]Kh,Y "fY@v8ɡjRJ"iQiS;,) FtSݚ\ ʞ vok[+Ͼ^znhmlLJ7޶wQIam7@a`\3on~=ȁّ0[`c`L2%)"Sg|#f+↺RVae*H=D(h>L%kJ2Yp^(E9噘"f=K)]@ޣ,bn 9y59JD̍MOS>cI5?a2uU{E2BUTSu,3+Y:ANP3╭tnۮlly S<S"9cA}ч23o`VU{ڊńC| ~㗃=G{Vό';Bj:\%~uIENDB`sqlitebrowser-3.11.2/src/icons/printer.png000066400000000000000000000013331345112435200205760ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<mIDAT8ˍKSa]w8o H* a十x*AKA@u"ՆXK9y^8U;O;QGJR-X|OpixH(%,Hs$JHE_xxK zm)RA3ʮRFZƃ7PO/B%EI_e!|$HLvx|nJ`rr$A~-vP3Eծ^ J^ qP{*ئ^S2[  L@gggFq{*,$35$(oUlUt]%K70>>FӭL&_(YA000,PX__($ q"R5Cϟyg2H$nd~)Jp;;;MLL1v;8`Zz z' шQ6f__VY=nddx؁Ҹ%l:::Xvnn жN X"8:!A9IHgK^T CR)[Sÿ"'kvcxgzȬ[IENDB`sqlitebrowser-3.11.2/src/icons/resultset_first.png000066400000000000000000000010121345112435200223460ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8S;HBQoWaT8.9DmBju(ѥZh @DWwB4.8p|1Pj:=h9s@_muW#rlqP!UT̢V"тE8PƁ-dsiDŽ"[?*PHxMr =Mȗ(Z\@-@bn3hSYmu>)( _@:Gקx ;2(U"ϩ'4{u>f0Yl1{{Z!m r0}A3bMIR*\O-Bܮʺ,(IENDB`sqlitebrowser-3.11.2/src/icons/resultset_last.png000066400000000000000000000010141345112435200221640ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8œkQ7; *,E/A^TI%XX,,?H6ɨA QL&q>X&_q81)%v]j1W٫G ;E)}z>wOu{G%lj٘=*l__v$>lIENDB`sqlitebrowser-3.11.2/src/icons/resultset_next.png000066400000000000000000000006131345112435200222030ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8c?%4~nv xf%e@gמx}Ë Sl@ނGWK_%<\dD`Z~'UKX#꺝([m/ػ@J:t6%y]Dr4JDo]x濨d%$1ED*뿀IENDB`sqlitebrowser-3.11.2/src/icons/resultset_previous.png000066400000000000000000000006051345112435200231020ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8c?%.d~؞: Hy=i'ـw=?k^7I3 jyK;_B7.xܶMk'΀Λ>?uNj/ZxSOgcõSg_ɘcUpE=kkV>6… -%c-?ouKz4y]d}[Ev'+! [nY`俰d'eA ̄ЊOIENDB`sqlitebrowser-3.11.2/src/icons/script.png000066400000000000000000000013541345112435200204220ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<~IDAT1lTe߻^ w@J `4:Mٸ0:b4qb6QtpȊ\ۻB)\E|ҥE[v x]lkX]ʋg]`"ݣ|67ك'~{}׭Om'+5]~ f-OfG̎>促 >Х +?58]];> ,ƠFU+*AF SZ+΢)b,HAURk|q=\ίOfGE* S)<Ⱥ]v"@N3ӑy*B ADDB)tM#&C WUQYTPdHDtz Q I7?R BNrWG@avlnR~s6lȥ/1Yf{oKi)w~{a)\4m^{})֦S}템@wxa\hs:ayBnm:Ofu걱ɒՕ0{׍jvw}yI Ldelu?{;,EIENDB`sqlitebrowser-3.11.2/src/icons/script_add.png000066400000000000000000000014531345112435200212320ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDATˋUesј`LGdfi*D0-kaZڢM-j"TB/,HI̽s9;__9_ۃwׯ[Ub 7y|%@4ڸj'7^Nvra6W5Ke_\m#\tBPNe4*b)ؽyܦɉ8VHuziYn!+-'pUO}gC z#QoHo( bA!(-BZ4sy/W%@Bwf1fE$@.X:ߋ8\4UuzuGw5)R3QI퟾ح֍zU"E"" drj'/82ډDYF@@)Y,B Ͱ011&ZȄ@L\t_?_0Ew|T ('F" EG_{m^{s> 3_?MkGNoĞ[\_̮Hn-%.]RLvu@ ;TURZfuʆuP5&U%pt{.>+S]?Svh/H:eUǻ.wg_4V ظ=S/ծ-,ku1) }ۦW7Z=<v:GSH36FYI3<@ߞyg.SIENDB`sqlitebrowser-3.11.2/src/icons/script_delete.png000066400000000000000000000014531345112435200217440ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDATKUeϹwf1(MTHo#*iQ`TԮDТ"j^h-PE%dѢ|8ޙ=BC8|]5[u6m˸E,3+ڦy5^{lWjWӶfy۳=8XMyI'e(D7EE:;M:=ӗETS%Mrjn[eaJo|~ѮIwt67F$ƠDQ AhҒ-:swHUyz6,ƬBVȅK#G%@SU7OuV2E bF9j34U3wGGTNWY!əf4QDYX'RedI1Rd?h%4jh!Q3!G'?ÿyi|]XS]R5*#E RYpcS~c硫sN3mJv?ι3~9HmE̊ѧ/L=!@gx^wÖx܅ex?8,:e:VZ^0>;S(ڢh-e{މ7=RNYp槭~c򫗍`y {޶~zUKZdEZ:*v-dĔ c#6b=cz錏wIUyXJJFpIENDB`sqlitebrowser-3.11.2/src/icons/script_edit.png000066400000000000000000000015601345112435200214260ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8MMh\U9ޙNf29:qLZ %Vb-Tt+ʅ ]]nBA-7֦(jMvڑ&1d2wι^IlxGA_i1\>u}痀 ρ+6=u=5'O]Si4 sU[; nz!@n-!HRa%%;#&g-~,ueuMp TU\b1kPB+V DݨVMeȘnE@0ĥ;ʆ.E&vtl6kqj5:Plپ&CɭՆM4mZaeYi(:@x cky6IAࣾNbj_㳡ۿd@4ǞHaY@&Fn &с sePہլ\(f|:D U!Miqr6Ae~@n8C " \o,aV]Ym=NO<܋D"gK'`u 9ӨF 㼔e,=T1?:T* YQ1qX[(kj|]Ǟ]7d*۫IENDB`sqlitebrowser-3.11.2/src/icons/sqlitebrowser.png000066400000000000000000000341131345112435200220220ustar00rootroot00000000000000PNG  IHDR\rftEXtSoftwareAdobe ImageReadyqe<0iTXtXML:com.adobe.xmp Public Domain http://creativecommons.org/licenses/publicdomain/ %jԻ3IDATx \u+Jv;Kg$$Ž!'F`XSߛy8FQ=Ƨ0* A5 3!n9*˄ !,ugOIH)\^Vݪ}[]U[ۀ'NA}}}cw5ѣ?>ذ~{fPsl2&53رc3Acp t#nhh9s̹1xߐ!CN97G}Ǝ yc#{zz4f89rd\ww7Ϸ_Ç0ܼcĈ[]MMMÆ _;DZ=w!CfH;͐u!$Cƫهr D@ 566:ta#E$Z[[7bֶaΜ9{U$T*F_hH~!]]]so>~ΝCnطo_F jqEH$a#G=zǿhҋ+8>b|Зlڴ};va͐=o,wޜɽBU(0BΈq13bÿM2幩SᬳԺ @`H>xW~!$釛v]ȯ# &7°ú1cٳgk-G*չ\|_bŵ GƫShSԦ0 28u# ]F^2i#7nwq\A_j_oذu֍0!* o1liiرc/~MgplrUGGc )U8Ŗa碾{5EyouIF ,0|ͫGxccn*U'|ϛ֮3 3]9*pG zAy=z44Bͽ箻 @Fpu x{sQ/޽bҷV̈́* "7tJܷ>n5Ç|]s lYa =zp]r{yuwwW,0QAIaƽ[hѢwumݺlDbxqE6@=)a(gDLs}߿UDuܜ9srzjQTq믿^NI05|ROϞ=[ʕ+ b`RS>bRϕF|SՄQf+gqF E 0g3p74WCͅ~s=W[_|1K/~Ϗ6!QaO5+(,P(/Y$c&G}'o|ܹs\{Y)+͜9SB,_P 4660M$p)7 ={<'>W(P ߂`R&p뼲G_qg(]{~B*|{ ,g-8wѢEqWgmV>_W("[o͍`㼏92<|l)ڵkz7}Bίn(D7ȑuD5B[n3 3<3 k Ex` !ē٬}L+ 뮾0Q4zO?=СCΝkiiѻP$Yfʇ]_=VM\xz@⚗|͑HeYLiXCWQ(]8YFdSVxj%lP(Eu8f'nVH#B @l^PwB( ,.[ȳ`)%Ti_0[<+|/-" Yk8K)p`_HhLEീ cn,8nܕ# UHP}ؙGP$ F YP](@H Ϯnw D_v۶m+DBQ:p٢,@"XgϞرc)%ǼƥqMS2 4y[+N*BQ ޾}o lذKuF!lP(SGocmǂD" aP_TuP0مKEIzHHC?& (|baRfRk s3#0f ˆaE{zzBʨZ*[S 3!͛CU#92dHavzF鿇7?ɚZ)T\K|?̏&!ˇ+Q`ׯ_x /(A &&NXP*,L%S" A p™&YߟI|"ɖxtr~-A9c)0*Y^P OsP]>Te"=xԏT'@!^1 (21d|?|COP,xqTq`=3ǐ_>EH!t"xz_W_vm9s  @\f  F b3[$!q&tvvuL> D<!o!xЈAދ! B)\QV>3o=w&bknn.h~i\Wj)7Fm |nJ$o0hWk7R Cg!Jh6@dTFbq]m$3utռef_"?hTy,]R@tCd81X&t>M# e5]iSYה8Ub]0I'#c D&DX}c0] =j[MdIj|/A҉ǼFt5)@J@T屲kO;% x};2 seB@-A J~Q]{Hr"$Z M=n]?V1]eƜ^(c؂ %n 3MkX ֣ ~& ar,Ш3}DW$ o7&fmDP0xN5 o zu/˟9S qn)IJCYF.y}}ly\I^' 7ZåM59mH:a7xqӃfu&9^+T&I!}ܞCh'ѼH%Za @ AvnG :^&}a?Sv C|c(*  #**H*`&"0i^GPd---oEqϏ"'[{kkkOss *I/}Ʒ!';|ٲee)y-Bq>켢s>Qɽ{^reO}ryW(*Ʀ&,/|f"^{murK, ]_/*ѣ*ro8gyK7nQ gBmlْ[xqiF>ȫY[OHN6,l]p፩G&ڎ;r?xΤexÂ>Sɯ$3^yS_DqN8 Dy.oLBNk ! ?<㭷#[]_\Xc盤*~3KJh"HuW.ܸqrsq_ׇE?7 9s;֬Y ]H\&\aW+[͝y³; .m޼/÷l2 S5`ĉ'wq#lYj ^QW~z555vz}A.`>t%mmm$Kr4?(J:rs=%F۳g; &O"?{;QE@";JU(L>e0u/Y#DiؤCQ~b> u90MP+;S#xb#Fx= Aݼ~1+V@'̟2eJn̙0>.Op^`PRB7߷o_A$`~_F|[DQ@EƎ[ ɓC^`gI(R@t/WlrM`D Nn# n83OSÇtQ]6I"V/-J k pt qXIcΝ~Ñ/Sݻw$qz{{ fG(m0+ 9_> ?jԨܘ1c FwCmP!:::b|zvM0! cGaEbY7 W.*~q,qgToD%( ]v~5_AXvtB N! ZS^߄CxrIliP۸qcI2/#Q}^@ mVȐt:R&25%HA1[PT'qaimݺ@:SNiR 4*Qv("+Mx^y啒! k<2\lkP9AosR$F}#T!M,ݍ8(>6 \Ta4y "PhO J QQYHO1ͪ|*ԯFk֬)b gSsss!FC4"׊27H+ B`EskkGdaEXR,[jޟI s 6 Qqrh$h,P'k$ԋ`H%59#,"枞x€jժ $QhdžB!#H8*&A A@pl *@rKw AH4ThXMZi_+V8͝eB(0ǙԀA A-cRHDI0^$d9ܲˆ /1@ 7B1h M"0~Yku $yx/1BHe/gIc'}(2r?z $!"@;׸LD"*ECV=qǧ~>!?'b@ B@h$m(Ч^އC{5EPTG T!a@#T%@)e0&\`\Dc-o䩸i)VUfE 5bIb9jU'p#+eC)|T1S1!pavq6 q *9$_HxCπ\LAģ l1Xё EH.(zIW|!EOM@ *=Z9^]jr&D (UD{@ۇg eM.)[,A.!ab@M.a&$,@`EmދB"θ ihsY]qQBIH0Y8CF1 :3ٙzjG1%T_I(MBiېxTAjn"5GPYjUR.\XP!+ysёGje$dXk@f- ʐ(r! -ދ2@ %iBZ]DCaz2f^& Ak ˂_i'Bx{ZEda&,\!Nn2r1́"q"^ "⎗kiHF /%A5lA[Vs"_v}E mC汳(kٛlQރJV"N ѝ;?)Ts"tM٩lb/}."`Gqug]vנJtDajK*a슷c^VO݃`k5q\^ 77jlaۢ{`j v݆vC[!Mj lKװV s2'̮̖t& .Fgu]6C :^dp] gt93υ%`ү+Tj\Cz;u {ewL F)R S*BPԛ("*(2T4E.q]*аAKE6-$"L1z(274#MMMRE ztZ"C\uUK7W2p#y)w%*^k ƍd…Rĉ j ĉ2 ^d!ʛ̙R>[A3gE(]zR:uFQfFFnٳgbW(sæaV 3]t?oPh_|njjzR KX.C"O|3/=? ;w}G) d]8 ٣(qSw>vQ)gG%v(@Q)۾oGy_}(l\? 39(׬Yzܲ}}}Ö.]z k'YK0Bv\_Qn >8(t֬Y')8r+V=g׮]}n… w&.&o' M$"z AAk(i:uܹE֭[WdqFя?=zt&G/1bDQ-VQIJ~Eژ2eJ---s{q}]6Q5TRC`a>E)jD'H'a"" L0!w9O[[[km<iEX2&7E<t#"" h3g̍5*yD^>LELCD^bBX!l{ü (C(i(ȐKq/ "pٓl"0Hq!B@j0dAQAoa3Xz @1 i @!{-)qAZ@È'&_~H!LE E {'N흐]A$΂;w$6q1ZLna_0E* ioxɓ'Hv(D 򐞞Ϯ81)b V,z\~$aAɯ!3`~-D~?7}' T`"H=%E"t%@Fw|jcD~L\?N&&z2/\! IJ [ (. +/\G^\mڴ),9-љ JD 0h@@Qve "FAM6P߲eK! "?q!Ġ^-:wD 1{N2-qXtHL'wS!~T߰aC(I4iҤBhtG~$y v OPƣهx$ ~-2j?E0B]!0{x cύ`^:LD~d!R!Lf@ x r0CTPKEJLi[Ἅ7:;;S/"G  Ilf d+=.9i3;lō*8  HҢyIy SRx{_*Y͛7Rr":ed?RԍxhCP?j~b`O!E!೵^H%mo_2xc 'ٽWq"?,,*@b pF0%Ȉ&}22Q"$EA/Sϓ")U ~%}>WS % A2A^yzAX1"X)jCi&'/]z&~@IJI mM\71ub ! )rS6 㮭?OmL6@<=s txoI@@jPEcHσ,A.FCxڗ>< 8*HA.|ũ8ob!+ȶH Ğt"5R^fp1B۽{ɔ5*ֺ`G7s¡oRn> 읊lPK1* Ir嬨>k!~f@ .ӝ72Ov!'{ɾkO n.J,@" NQt.ѝ6gZ2 HyW, $؄_nBرcQ$B(bLMfb"&6F&Gui7ռCXȌ = nED3"zCԆⵢ[%s&\?2g2G4ZY%䎲Rd{zC]m[J Μ ERep⯙d' D%:y5H*BR#/ˋ%_ۮϙo H<;q v"ȾϘ-,u%n΍P8YKX)cNϮB] 7E00Hc!&=jڂ R]LtPH\d42j4@9ʷ΂&YpkiDdn*jT20`~:EA*=nQqBjFs5Mrۋ; dWJnBn`mw!*D984ks{^'EHWԜ)&xNy-ҰGX~6*5%2$ԹˏMJp^!A By zBQn4УPPP(TT* Eq -X"Xk<"4u(g#ӧPԋ- A6mx0݄ݾBk*)_aT䔟{u@1nWiw+!nwq /OVU;x  7Y„ADsHh 6{"Iq}X (^ 2E(2{Ǐ.Gs9\RB0} EpעE~ĸC+$Iic_{r,kYRfc[%~9=aE؍+|#Jcz(=HP4Pd]c)CJ x9JEq}%"ΐ*y:>.s$qR멃4HE@Q裏NYꫯ6ˍ=f TċB0!~s3acw[#LC[𪫮K}kNZt7?("WS+Bz'"_9e4#:J (2xљ}衇~?HeU|2alX`?h ~28H EH_>K' x饗?ӌq|rR4vM A@ _ s{~*?/@]tkW^ys[5Ex0u0-PPīJ}m vyqjŊLddlrhKO ¬(D|%1Ŀ^ހg}^sUV}?Z F0aځQH\Ոu &,4v޻+K_,3Ι3Ock׮j7Ӄ96Ѽ_$v o(E(z'-я~݁g͚ ۰an~o6$;1A@P4'~"i=E'=d~o>mڴ}x!?~|-^Dv?OEz%f²(bc?VM_>_M_vaY!ڱ>`첢 3ϻG*uEwVWooo[̱\wwK Sx(^]#ě6nں+Z,1 RhC渦tXZZaÆ c!c޷oߙ 7+kήzz#Fx޽{If; hM,׋ǂq}|awuuM* SF*, W[گG &M"~m?~AjebknzycaʕS?>\8ͱ:36s,\k(h?NCy=,Za[kS ,]tc 5(lRChXx+_m1*u_C#Scq8יv f[=9WH/|Ol6 lVl&IENDB`sqlitebrowser-3.11.2/src/icons/tab_add.png000066400000000000000000000007501345112435200204730ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<zIDAT8œ;KCA}`B OD A[U;ZHc!lb4vJH@0"0$\M|a,;gvc  'U`μ;`ɲ}|^o~:1{qq\L&@b;I& !XkMGG m@)mp-I@!{E4Z!UJ"J D)1LlsrWvkPt144W̉OFq%~}NS߹A:%fgmfm'ً152l"[ɠ[h3u|!WJY-nsIR]/e-рj&q_l@#P6˯.rIENDB`sqlitebrowser-3.11.2/src/icons/table.png000066400000000000000000000010661345112435200202050ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˥S+DQ,4bAYXJ,(JX(d"E)X(3o{odANwsդ38I8c\2!\%ioqp&\όTm!@/\f\RfFY,nQjK3 ! rgz)EZbُ8L/U>(puMIENDB`sqlitebrowser-3.11.2/src/icons/table_add.png000066400000000000000000000012271345112435200210140ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<)IDAT8˥OHTQ*ȨTFa4ۤBmMDUWQ EDhaDYZb,#j,7%&acλo[]|swϱ1rZh g5AiFA.ق(hvTSDCRҽpAhzJVQTᬿuߗlWR@D0l{ R'8^y/FĊ]]6ׁ7a2e4>c(syfr_O0X2>h:l:Rz'@rW+9rk<c(sZ)H- $ :FiiO_!:Ƕ<)xhAl! |b{J :vFB sYUt7p&uaʢư{G?~Xos ]L5t[ >;MS3yyKKN_ Di|(QW!9=A['(\^ܰ6:αm9X0ֱ`LIENDB`sqlitebrowser-3.11.2/src/icons/table_delete.png000066400000000000000000000012241345112435200215230ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<&IDAT8˥OHUA}/I—ʲ I- !J!AV [DvR``)I&="ML/ ?ygδwswXk<yZZ""#h#Y`ň8[֦xa_*?۝Q`D=_EoΜw&' yuU_\ڄ#tNľbV t2 p@y&םiW* )~D)lj$ nRH%M`O94Kdlxlje+n Mrqh%uEǁ4D[Jh[ ޽Ed/5-TdcCh&J G) /;v:x^nL0Jt_A(W \NW)w'2i@܇Uo1+R*|wdmKGmdG:7CoHn`D^1{Rs61i5m.T(-]?ei0#b#sjk8]oԄ ؖBj^9H 6􌉁V1wo6&PV`P&eP b/<0W#E,dm55IO2ʼnf3l)8WoPq-ӠiWG'Dz^*,f*o̫S" 2kt/Fߴ]RInb{ưL2.aRM*(%'HGM>Խ)(V'*"3(' Hg`o{ Wٳuڃa6ģsCzcXc0(_ir$B> j+Mr&K =*tk]8V.*"bZpIO+JU(H1F>J&ds}3Q( B jD Rkbb 7^p(ٌRk DA*(2 !z`aǚ&\R J5!Ԣj!cª%y|dY}xٓ15BqJuTi>D| S~3\xv b#7ǒ\Mqgh9}_.8h[~T27g FU:-GhDLW2RZ>JIENDB`sqlitebrowser-3.11.2/src/icons/tag_blue.png000066400000000000000000000011121345112435200206700ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˅يA%6<] dL.3C(((*n=n=.5fl{)qŹ:4unvV fAUU4+RNqj:JHZaL0d2q!t&RT*0LFz]5MmsV*FF!~ ˲0m~mcEr##]f3Yc{7(jMs|=KpH)]joČ|\ʦʖw|{< JH$"!R.1#_,;}ր-Q B+wB|>?|Mނ٦H&^ŢdY>\;$FmaZO/wdT*i mہe~}SˑH$X,iw@|@F9-X?) `0I<'Wp sZ:{)IENDB`sqlitebrowser-3.11.2/src/icons/tag_blue_add.png000066400000000000000000000012371345112435200215100ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<1IDAT8}ϋRQ?16E6-Z%H#-ZfԢEThc:tT4}=AQW:xOQD45[%=ɧ{d:>8\|s$I(rfd2HHRkU h6*$pLFCU31D"GB8LɤFd2(zNX,`0‘4aZp8@ Hyjy4>~Z 9z{4fʆ>ވ; ;T*r3pDQvjRfP!r\tFGIş 1!ĐHT"k^B(LHA.Yxg5 :Lm Nպn& W+MgriK4`N-V;l6yô+SxTi7?VbgzUOQz nIENDB`sqlitebrowser-3.11.2/src/icons/tag_blue_delete.png000066400000000000000000000012751345112435200222240ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<OIDAT8˅͋RQo-E{AiٴY DDL e(*z_WQGSǨ͵9WI y缇ELT dDx `-&NOj@TCiARQBcZTѨn8B!xC! UO$JA3tR*eY-cck'2+<!=JVKIv<: Nsa"ɎCyK/^naSp?tvDIZZ6ëM$Σ|A֍OwuQfԷ'eY$RH sH1^,kZ๢*:].Kp8$:Bm ~>:zpv 9iw$~  k{UϢ:YVlx*"+oks}0/+/e!j45L`}&ZLy~=IENDB`sqlitebrowser-3.11.2/src/icons/tag_blue_edit.png000066400000000000000000000013541345112435200217050ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<~IDAT8}OQ_pDMƄaF.( Ɲ ƅ!DQl@cP6E~L ZfNAP s{*ab1DQD"aB!E4$Ir2|;B(Y,8DpB(9,Ʌ@ *EQ@ BɮD\&YA+-'IRp\l[ ZB/I;/]L&<O#2z'MJSRGkb8YLwc%(f+f^KdF~yyYyQqY`$mLմEAɌ|.S "B$)DwvU̾"#sڡ2Nl8wIc5ыIX&_`0ߴQej,[pg񛹉QYRnZW}$' ]˞ I2kzU.EJ (DzuĞ$n VӘ> {xpib"n$Q?0tNS5|]΃mU?4"}L!&.|IENDB`sqlitebrowser-3.11.2/src/icons/text_indent.png000066400000000000000000000005411345112435200214400ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8c?%B@,0Fyy1 ǿ~ w^F>FJ-ﮔבmDgΜD1 \ukf@E40 вn6O3[_NMջNaŕW3ݽ)L랞W`n3[>A·V)j cǂ|&@TN>|`  & 2HIENDB`sqlitebrowser-3.11.2/src/icons/text_replace.png000066400000000000000000000012631345112435200215740ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<EIDAT8˕KSas銤I4B,5Hc1q!.~LvjijBjWY4ե޴Kͳ!'r/9J*5R0FC߹gM80L\y}|.W f43=gOk40ĭCձž _M^l8l?3]X1/23ǕgƧg^hڷuS( wD-HU/<A2e^ۏ^,}?,az  ,Hc$UgnSui&vn{'v>Eq4Akw_?߼''k'W%߼[0j>AX-/?ԩT=eYcJ奎Go@W!'$_ԓSln\{&?3 DV%r=?JeFmXv@x\qqah=Ѿ2;}З|9r-k5tT2>hMA҄ǡ̖MD, z=*];[x 8wyIuI1MN<-I7, #?[FՕD(̗ˣRmcer-0{ W1oR ]!PՑl.UvjeIENDB`sqlitebrowser-3.11.2/src/icons/wrench.png000066400000000000000000000011421345112435200203770ustar00rootroot00000000000000PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˕oQ_[c+W.]хi5  g mJ[Fq#_)qո;,@{;upLTʙH$(Z XMɤni"\nt:}yD 0 \ ږIU4(r HMk̈_4_ziy'"[ n1rM_A`b=$Ik_p-qS~=li~3Bv"qZAԧ̸r[G]<&e!'ڸ67 yq$OX!=_~1Gs~EZQx&qWK3!ޤunkzGrjQnIENDB`sqlitebrowser-3.11.2/src/iconwin.ico000066400000000000000000002576461345112435200174600ustar00rootroot00000000000000 hF  @@ (BV (~W(    RޙʒrrraaaUUUIII???555---%%%J """sss"pppaaaUUUIII???555---%%%rrrhssscccXXXNNNDDD888---$$$\ssso}}}|||yyytttkkkWWW;;;"""b```otttyyylllccc[[[XXX[[[eeerrrOOO$$$bEEE^vvvppp```TTTHHH>>>444---///333&&&MsssgsssaaaUUUJJJ@@@555,,,###Urrrq|||wwwtttrrrkkk]]]III111`iiiqyyy|||rrriiidddcccgggooooooEEE `DDDetttppp```TTTHHH>>>555111888===)))RooodrrraaaUUUIII???444,,,###Rrrrqyyyrrrmmmhhh___QQQ???+++`oooq}}}kkk;;;`<<>>===>>>EEEUUUlllUUU'''---UUUvvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333---***)))555WWW=== 444JJJxcccvvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333...***&&&""" ***Syyyvvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333...***&&&###taaappppppggg]]]WWWRRRNNNHHHCCC===777333...***&&&### aaapppzzzrrrllliiigggeeedddccc___ZZZTTTLLLBBB777---&&&### aaapppzzzyyyzzzyyyrrreeeVVVCCC///!!! ```rrrvvv|||}}}zzzzzzzzz|||yyydddDDD###oooggggggzzzwwwllleee___XXXRRRNNNJJJHHHGGGJJJQQQ___rrrwwwIII!!!|||<<<```vvvkkkddd]]]WWWQQQLLLFFFAAA<<<666222......666NNNtttLLL%%%zzz222WWWvvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333...***%%%###)))###&&&h|||}}}vvvkkkddd]]]WWWQQQLLLFFFAAA<<<777333...***&&&###+++eaaapppzzzmmmeee]]]WWWQQQLLLFFFAAA<<<777333...***&&&### aaapppyyymmmggg```]]][[[XXXTTTOOOHHHAAA999111***&&&### aaappp|||vvvvvvwwwzzz}}}}}}zzzwwwrrriiiaaaTTTEEE444&&& ```pppwww|||yyyhhhPPP333gggmmmlllssshhh;;;JJJtttLLLeeeTTT((("""FFF111u0DDD|||ppp333 ,###???aaazzztttXXX5559996###///===MMMXXXccckkkmmmrrrpppmmmiii```VVVHHH888+++n&444JJJ###4bT' ?(@ @  %De}zzzrrrllliiieeeccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>n;;;P9990777444222333!L~̤ķޫ񡡡zzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000c...3,,,***+++]]]=|ڳzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((_&&&%$$$%%%###!ozzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$###M!!!""" wؤzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" Rwww}}}9zzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" pppyyyttt>zzzڃzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" mmmlllrrrzzzzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" lllkkkQrrrzzzzzzrrrllliiigggccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" +lllkkkspppzzzyyyrrrllliiieeeccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEECCC@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" Elllkkkwpppzzzzzztttooohhhccc\\\ZZZWWWTTTQQQOOOLLLHHHEEECCC@@@===;;;888666444222000---,,,)))(((%%%$$$""" Illlkkkwpppzzztttlllhhhddd___\\\[[[[[[[[[ZZZXXXXXXVVVTTTPPPMMMHHHCCC>>>999444222///---,,,)))(((%%%$$$""" Illlkkkwpppzzz}}}rrrhhhccc_________```aaacccdddeeeeeeeeeeeedddcccaaaaaa```]]]]]]\\\\\\[[[WWWTTTNNNGGG===333---)))'''%%%$$$""" Illlkkkwpppzzzvvvkkkeeedddhhhmmmssswww|||}}}zzzvvvrrrlllgggaaa___]]][[[VVVMMMAAA333(((###""" Illlkkkwpppzzz|||mmmgggiiirrrzzzwwwmmmeee```]]]XXXMMM:::))) Illlkkkwpppzzz|||iiieeemmmzzzttthhh```\\\TTT<<<$$$Illlkkkwrrrpppaaagggvvv}}}oooaaa\\\NNN,,,Illlkkkxppplll]]]aaawww}}}tttooolllhhheeeaaa]]][[[XXXVVVUUURRRPPPQQQRRRUUUWWW\\\cccmmmwwwmmm___UUU---Ikkkkkkxddd[[[gggzzzrrrllliiieeeccc___\\\XXXVVVRRRPPPMMMJJJGGGDDDBBB???===;;;:::;;;???EEEQQQdddwwwvvv___QQQ###IUUU]]]xMMMQQQzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666333111///...222;;;MMMhhhhhhJJJ///I000DDDq///GGGzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---+++)))''')))444QQQwwwppp222(((C,,,999Q)))}}}zzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%###"""+++PPPLLL'yyy)$$$///zzzzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" $$$ zzzyyyrrrzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" NNNh7yyyzzzzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" ###TTTNNNmmmmmmgrrrzzzzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" -mmmkkk~rrrzzzzzzrrrllliiieeeccc___\\\XXXVVVRRRPPPMMMJJJGGGEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" Ammmkkkrrrzzzwwwpppiiiccc\\\ZZZWWWUUURRRPPPMMMIIIFFFCCC@@@>>>;;;888666333222000---,,,)))(((%%%$$$""" Bmmmkkkrrrzzz|||rrrkkkeeeccc```]]]\\\[[[[[[[[[[[[[[[ZZZXXXWWWUUUQQQNNNHHHBBB<<<777333///---+++)))(((%%%$$$""" Bmmmkkkrrrzzz}}}ooogggaaa``````aaadddggghhhiiikkklllmmmmmmlllkkkiiihhhgggdddaaa```___]]]\\\[[[XXXTTTNNNDDD999000***'''%%%$$$""" Bmmmkkkrrrzzzwwwkkkgggeeeiiipppwww|||zzzsssmmmgggccc___\\\ZZZTTTIII:::,,,$$$!!! Bmmmkkkrrrzzzppphhhhhhpppzzztttkkkddd___[[[TTTCCC///"""Bmmmkkkppp}}}ooodddhhhvvv}}}oooccc]]]XXXEEE)))Bmmmkkksss}}}eee```mmm}}}|||yyyvvvssspppooooooooooooooopppssswww|||wwweee]]]TTT333Bmmmllloooeee\\\iiizzzrrrllliiieeeccc___[[[XXXUUURRRPPPMMMJJJHHHGGGGGGGGGIIIMMMUUU___kkkvvvsss```ZZZ333Biiiiii```ZZZmmmzzzrrrllliiieeeccc```\\\ZZZVVVRRRPPPMMMJJJGGGEEEBBB@@@===:::888666555666<<>>;;;999666444222///---+++---555IIIhhhiiiEEE---B(((???v***EEEzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))'''%%%'''666[[[lll,,,$$$9,,,:::P(((}}}zzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%###!!!"""444777***)))-333FFFzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" ;;; *yyyzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" III |||Jtttzzzzzzrrrllliiieeeccc```\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" 222222llllllrrrrzzzzzzrrrllliiieeeccc___\\\ZZZVVVTTTPPPNNNJJJHHHEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" 7lllkkkrrrzzz}}}tttoookkkgggddd```\\\XXXVVVRRRPPPMMMJJJGGGEEEBBB@@@>>>;;;999666444222000---,,,)))(((%%%$$$""" Blllkkkrrrzzzyyypppiiiccc\\\[[[ZZZWWWVVVTTTQQQNNNJJJGGGCCC@@@<<<999666333222///---,,,)))(((%%%$$$""" Blllkkkrrrzzzwwwmmmhhhccc```]]]]]]]]]\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZXXXVVVRRRMMMFFF???888222---+++)))(((%%%$$$""" Blllkkkrrrzzztttiiidddcccdddeeeiiimmmrrrtttvvvwwwyyyzzz|||zzzyyywwwvvvvvvsssppplllhhheeeccc```]]]\\\[[[WWWPPPFFF;;;111)))%%%###""" Blllkkkrrrzzzttthhhgggiiipppwww}}}zzztttmmmggg```]]][[[VVVIII777)))""" Blllkkkrrrzzzooogggkkksss}}}yyyoooeee___[[[QQQ>>>)))Blllkkkppppppcccgggttt|||mmmaaa\\\TTT777 Blllkkksssiii]]]hhh|||rrraaa[[[BBB Blllkkkiii______tttggg]]]AAABaaaeeeXXXWWWwwwcccRRR***B;;;NNN;;;NNNlll<<<,,,A$$$666i###<<<<,,,AAA ```?(    0EZ|||owwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGG|FFFgEEERCCC>BBB)AAA@@@>>>===<<<=== /Pq̎݊煅퀀|||wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLIIIHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;h999H888(777666 555555/Pq“ճ꭭}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333k333J222*111///0006i}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...e---3---+++,,,1cڗ}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***c)))2)))'''(((?„}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&F%%%%%%%%%-y}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$###9### $$$### E᭭}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""X!!! D}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! `|||0엗}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" S }}} eً}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! %zzzzzz}}}}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! Cvvvvvvyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! Trrrppptttwww|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! Hmmmhhhpppussswww|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! )mmmlll(ooosssyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! hhhtttkkkuooosssyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! (hhheee kkkooosssyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! Uhhhgggkkkooosssyyy|||}}}wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! shhhgggiiiooosssyyy||||||wwwtttpppmmmlllkkkhhhgggeeedddaaa```___]]]\\\ZZZXXXWWWVVVTTTRRRQQQPPPNNNMMMLLLJJJHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! hhhgggiiiooosssyyy||||||wwwsssooolllkkkiiihhheeeeeecccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFEEECCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! hhhgggiiiooosssyyy|||}}}yyytttpppkkkgggccc___\\\[[[XXXWWWVVVUUUTTTQQQPPPOOONNNLLLJJJHHHGGGEEEDDDCCCBBB@@@???>>>===<<<:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! hhhgggiiiooosssyyy||||||wwwsssoooiiieeeaaa]]]\\\\\\\\\\\\[[[[[[[[[ZZZXXXXXXWWWWWWUUUTTTQQQOOOLLLIIIFFFCCCBBB@@@>>>;;;:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! hhhgggiiiooosssyyy|||}}}vvvooohhhccc```___\\\[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZXXXVVVTTTPPPLLLGGGBBB===:::777444333333111000///...---,,,+++***)))((('''&&&%%%$$$######"""!!! hhhgggiiiooosssyyy|||}}}tttkkkddd```]]][[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ZZZWWWTTTNNNGGGBBB<<<666222///------,,,+++***)))((('''&&&%%%$$$######"""!!! hhhgggiiiooosssyyy|||}}}rrrgggaaa___\\\[[[[[[[[[[[[[[[\\\\\\]]]___```aaaaaacccdddeeegggggghhhiiikkklllllllllkkkiiihhhggggggeeedddcccaaaaaa```___]]]\\\\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]]]][[[ZZZVVVMMMCCC:::222---***))))))((('''&&&%%%$$$######"""!!! hhhgggiiiooosssyyy|||zzzmmmddd___[[[[[[[[[\\\]]]```ccceeehhhlllooosssvvvzzzzzzwwwssspppllliiieeeccc```]]]\\\[[[\\\\\\\\\\\\\\\\\\\\\]]]\\\ZZZTTTIII???555---)))&&&&&&%%%$$$######"""!!! hhhgggiiiooosssyyy|||zzzlllaaa]]][[[[[[]]]```ccciiiooottt||||||tttoooiiiddd```]]]\\\[[[\\\\\\\\\\\\\\\]]]\\\XXXQQQCCC333)))%%%$$$######"""!!! hhhgggiiiooosssyyy|||rrreee___[[[\\\___eeemmmtttzzz|||tttmmmeee```\\\\\\\\\\\\\\\\\\\\\]]]XXXMMM;;;---%%%"""!!! hhhgggiiiooosssyyy||||||kkk```\\\[[[___dddmmmvvvwwwmmmddd___\\\\\\\\\\\\\\\]]]\\\UUUEEE333%%% hhhgggiiiooosssyyy|||zzzkkk```[[[\\\aaakkktttvvvlllaaa\\\\\\\\\\\\\\\]]]ZZZJJJ333###hhhgggiiiooossswww|||}}}kkk```[[[[[[___hhhtttvvvhhh___\\\\\\\\\\\\]]]ZZZHHH---iiihhhkkkooossswwwrrrccc\\\[[[\\\dddppp}}}pppddd]]]\\\\\\\\\]]]VVV;;;###iiiiiikkkooosssiii___[[[[[[]]]eeewww}}}|||zzzyyyvvvtttvvvvvvwwwwwwyyyyyyzzz||||||}}}wwwggg]]]\\\\\\\\\\\\HHH&&&iiiiiikkkooozzzlll\\\[[[\\\\\\dddvvv|||wwwrrrpppmmmlllkkkhhhgggeeecccaaa___]]][[[ZZZZZZXXXWWWVVVUUUTTTRRRQQQQQQPPPPPPRRRUUUXXX]]]aaaeeekkkpppvvv|||wwwddd\\\\\\\\\]]]NNN)))iiiiiikkkooopppaaa[[[\\\\\\]]]mmm|||wwwsssooommmllliiihhhgggeeecccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRPPPOOONNNMMMJJJIIIHHHFFFEEEDDDBBBBBBBBBBBBBBBBBBEEEMMMVVV___iiivvvooo___\\\\\\]]]OOO%%%iiiiiikkklllaaa\\\\\\\\\```vvv}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBB@@@???>>>===;;;:::888888999;;;>>>FFFOOOXXXhhhzzzwww```\\\\\\]]]GGGiiiiiikkkeee\\\\\\[[[```zzz}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888666555444333111111333777CCCTTTgggzzz|||```[[[\\\[[[333iiikkkgggVVVQQQQQQTTTrrr}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333111000...------///333@@@QQQeee|||tttTTTQQQRRRDDDiiiooo[[[EEEBBBBBBUUU}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,***))))))+++333GGGccc}}}VVVBBBCCC@@@###iiivvvMMM555444555___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))(((&&&%%%(((222LLLoooaaa555444444###~lll>>>))))))***___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%######)))>>>cccaaa+++)))))) lvvv;;; HHH}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$###""" %%%:::eeeJJJKFFFv###sss}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" $$$AAAddd%%%$$$"""G%%%$$$iii}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" """///5VVV)))hhh}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######"""  ȓH5kMMMhhh}}}}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" [[[l45|||yyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" 888:666Assswww|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" OOOjmrrrsssyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" ###UUUAAAtttzzzooooootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" 0llllllllloootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" Siiiiiikkkoootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" liiiiiikkkoootttyyy||||||wwwsssooommmkkkiiihhhgggeeecccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||}}}wwwssspppooolllkkkhhhgggdddccc```___]]][[[ZZZXXXWWWUUUTTTRRRPPPOOONNNMMMJJJIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||}}}wwwpppiiiddd___\\\[[[ZZZXXXXXXWWWVVVUUUTTTQQQPPPOOOMMMJJJHHHGGGEEECCCBBB@@@???>>>===;;;:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||yyyrrrlllhhhdddcccaaaaaa```___\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[[[[[[[ZZZWWWVVVTTTQQQOOOLLLIIIFFFBBB???<<<:::777666555444333333111000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||tttlllgggaaa```]]]\\\[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZWWWRRRMMMGGGBBB<<<888555333111000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||zzzrrrhhhaaa___\\\[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\\\\\\\\\]]]]]]]]]]]]___]]]]]]]]]\\\\\\\\\\\\[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]\\\[[[XXXUUUOOOHHHAAA888222...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||ssshhhaaa]]][[[[[[[[[[[[\\\]]]]]]___```ccceeeiiillloooppprrrsssssstttvvvwwwyyyzzz|||||||||zzzyyywwwvvvtttssssssrrrpppooolllhhheeeaaa```___]]]]]]\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]\\\XXXQQQGGG>>>444---***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy||||||oooddd___\\\[[[[[[\\\___aaaggglllppptttyyy||||||wwwtttppplllgggaaa___]]]\\\\\\\\\\\\\\\\\\\\\\\\]]][[[WWWOOODDD999---(((%%%%%%$$$######""" piiiiiikkkoootttyyy|||rrreee___[[[[[[]]]aaaeeelllrrryyywwwrrrkkkeee```___\\\\\\\\\\\\\\\\\\]]]]]][[[RRRCCC333((($$$######""" piiiiiikkkoootttyyy|||wwwiii```\\\[[[]]]ccckkkttt}}}|||sssiiiaaa]]]\\\\\\\\\\\\\\\\\\]]]XXXMMM;;;,,,$$$!!! piiiiiikkkoootttyyy|||tttggg]]][[[]]]aaaiiisss}}}|||rrrhhhaaa]]]\\\\\\\\\\\\]]]\\\UUUDDD///###piiiiiikkkoootttyyy|||ttteee]]][[[\\\cccooo|||zzzmmmaaa\\\\\\\\\\\\\\\]]]WWWDDD,,, piiiiiikkkoootttwwwzzzggg]]][[[\\\```iiiwwwvvvhhh___\\\\\\\\\\\\]]]VVV<<<$$$piiiiiikkkooosss}}}oooaaa\\\[[[\\\dddssspppccc\\\\\\\\\\\\\\\LLL---piiiiiikkkooowwwkkk]]][[[\\\\\\dddttt|||wwwtttsssrrrooommmkkkhhhgggdddccc```___]]]]]]\\\[[[[[[[[[[[[[[[[[[[[[\\\]]]aaaeeeiiimmmsssyyysssccc\\\\\\\\\]]]UUU222piiiiiikkkooozzzppp]]][[[\\\\\\```rrr|||wwwsssooommmkkkiiihhhgggdddcccaaa```___\\\[[[ZZZXXXVVVUUUTTTRRRPPPOOOMMMLLLJJJIIIGGGFFFFFFFFFFFFFFFFFFHHHMMMPPPVVV```iiitttooo___\\\\\\]]]XXX444piiiiiikkkooohhh\\\\\\\\\\\\ggg}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBB@@@???>>><<<;;;:::;;;===@@@GGGPPPZZZeeerrr|||ddd\\\\\\]]]WWW---piiiiiikkkiii___\\\\\\\\\kkk}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<:::999888666555333333333555;;;HHHXXXlll}}}hhh\\\\\\]]]PPP###piiiiiiiii___XXXXXXXXXhhh}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333222111000......111777EEEVVVkkk}}}dddXXXXXXZZZ777piiilllaaaNNNJJJJJJTTT}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,******---333FFF```|||zzzQQQJJJLLLBBBpiiirrrTTT===<<<<<<___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))(((&&&)))111EEEgggWWW<<<===:::"""qeeerrrDDD//////222hhh}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%###'''777WWWzzz]]]000//////"""jggg:::$$$$$$&&&___}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$###"""###///RRR|||TTT$$$$$$$$$Pzzz666>>>}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######!!! !!!///ZZZ}}}444-QQQq"""ttt}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" !!!111(((}}}XXXM111QQQ}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" eeeu C(((VVV}}}}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" AAAO Dԍtttwww}}}}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" \\\M Itttwww|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" ###߆i dtttsssyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" 222 sssooosssyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" """$ ooopppllloootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" Ikkkiiikkkoootttyyy|||}}}yyyssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" fiiiiiikkkoootttyyy||||||wwwssspppmmmlllkkkhhhgggeeedddaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||}}}yyysssooolllkkkiiihhheeedddcccaaa```___]]][[[ZZZXXXWWWUUUTTTRRRQQQOOONNNMMMLLLIIIHHHGGGFFFDDDCCCBBBAAA@@@>>>===<<<;;;999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||zzzvvvrrrmmmiiiddd___[[[[[[ZZZWWWVVVUUUTTTRRRPPPOOONNNMMMJJJHHHGGGEEEDDDCCCBBB@@@???>>>===<<<:::999888777666444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy||||||wwwsssmmmiiieeeaaa___]]]\\\\\\\\\\\\\\\[[[[[[[[[ZZZZZZXXXXXXWWWUUURRRPPPNNNJJJHHHEEEBBBAAA???<<<:::999888666555444333333222000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||}}}vvvooohhhccc```___\\\[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[ZZZXXXVVVTTTOOOIIIDDD???:::777555333222111000///...---,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||wwwoooeee```]]][[[[[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\[[[[[[[[[[[[[[[[[[[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[[[ZZZVVVPPPJJJEEE>>>888333///------,,,+++***)))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||wwwlllccc```\\\[[[[[[[[[[[[[[[\\\\\\]]]___```aaadddeeeggghhhiiiiiikkklllmmmoooppppppoooooommmlllkkkiiihhhggggggeeedddaaa```___]]]\\\\\\[[[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]]]\\\[[[WWWPPPFFF<<<333...+++))))))((('''&&&%%%$$$######""" piiiiiikkkoootttyyy|||ssshhhaaa]]][[[[[[[[[]]]___cccgggiiilllpppssswwwzzzzzzvvvssspppllliiieeeaaa___]]]\\\[[[\\\\\\\\\\\\\\\\\\\\\]]][[[VVVNNNCCC888///)))&&&&&&%%%$$$######""" piiiiiikkkoootttyyy|||sssggg___\\\[[[\\\___aaagggmmmsssyyyyyyssslllgggaaa___]]]\\\\\\\\\\\\\\\\\\]]]]]]ZZZUUUFFF666***%%%$$$######""" piiiiiikkkoootttyyy|||yyykkkaaa\\\[[[]]]aaaiiirrryyywwwppphhhaaa]]]\\\\\\\\\\\\\\\\\\]]]ZZZPPP>>>...%%%"""!!! piiiiiikkkoootttyyy|||ttteee]]][[[\\\```hhhrrrzzzzzzpppggg```]]]\\\\\\\\\\\\]]]\\\WWWHHH666&&& piiiiiikkkoootttyyy|||ssseee]]][[[]]]dddoooyyyyyymmmccc]]]\\\\\\\\\\\\]]][[[NNN555$$$piiiiiikkkoootttwww}}}vvveee]]][[[\\\aaalllzzzyyykkk```\\\\\\\\\\\\]]][[[LLL///piiiiiikkkooosssyyylll```[[[[[[___hhhtttssseee]]]\\\\\\\\\]]]WWW>>>###piiiiiikkkooottt|||ddd\\\[[[[[[___kkk|||zzzhhh]]]\\\\\\\\\\\\III'''piiiiiikkkooo|||eee\\\\\\\\\\\\hhh|||yyyeee\\\\\\\\\]]]OOO)))piiiiiikkkooommm___\\\\\\\\\```sssppp___\\\\\\]]]OOO%%%piiiiiikkklll```\\\\\\\\\ccc|||yyyaaa\\\\\\]]]FFFpiiiiiikkkddd\\\\\\[[[ccc|||```[[[\\\[[[111piiillleeeTTTPPPPPPUUUwwwsssRRRPPPQQQBBBpiiipppXXXBBBAAA@@@ZZZTTT@@@AAA>>>!!!pgggrrrHHH333333444eee\\\333333333"""naaattt;;;''''''***dddZZZ(((''''''Yiii 444JJJAAA8iii ///m###tttlll---888!333zzz,,,ZTTT i888}}}www000 ###*** ---mmmggg(((!LLL|||FFF+)))XXXQQQ%%%$ +++PPPvvvrrrJJJ(((H888___}}}ZZZ444I$$$t%%%EEEkkk}}}gggBBB###o""",,,"|%%%999RRRooolllOOO666###v ###'''c(((===VVVrrr}}}oooTTT:::%%%`CCC ...<"""###000>>>OOOaaatttsss___MMM===..."""7 111aaa;;;***V%%%111???JJJUUU```lllwww||||||vvvkkk___TTTIII>>>///###N---&&&dddyyy<<<4447...r%%%!!! '''...666???FFFIIIMMMPPPTTTWWW[[[___cccgggkkkllliiieeeaaa]]]ZZZWWWRRRPPPMMMIIIEEE>>>555---&&& j/ ???000UUUQQQP555+++###y$$$B$$$===555UUU\\\6QQQd888333...$$$ y---X///))))TTT mmm*oooTPPPu<<<999555///)))### $$$''''''%%%000k???B444NNN ttt#sss;pppXeeepPPPCCC>>><<<:::888666333111///---)))&&&$$$###$$$%%%(((***,,,---///000111222222000111>>>{LLLdQQQJMMM-DDDaaa??????sqlitebrowser-3.11.2/src/macapp.icns000066400000000000000000006527321345112435200174300ustar00rootroot00000000000000icnsUTOC hic08Aic10agic13Aic09ic12 ~ic07il32 l8mkic11is32s8mkic14ic08APNG  IHDR\rf pHYs  @IDATx UOHB!BT 4 _#*.q:㠬tnue`h :VC D& IHH$!oU:u^|{}޻um۶5L 0WWvG>SO=3<3^|"_~]^| ȗ^zi@??-[m~ק~zG`!?@7 $0<yȼ0y)~KV"$@=@9瞛iӦ7oON<֭[OXA.Ǝ;ʗ 5{j#fQ2r!K-ɮyߧi"8x≹7Znׯfd+[w2p3߰0tG+ݶ! I@f1f1l~fEz ',V܂R)Nյ[@~ʕ+]v;loKVa0BxѬ'&Mxڴiw>̛7}J h%'o  oZlq LnYanՈas>Qmڠ'[g߶dɒJ>.k֬g{6ܛ8vu׍F wtA7]N8{ҪU>hѢz4|_ދӳ=c/ۣ̍f)ܾ{sU{zVS/^i۷grO}x&1eaxǓq~'OtiVKF+,o}_Эgtc~cNJ+}{%jjg ?dqo.]k;ٛc߿1cƌdu繱xc@˗/OWCO6jc_02z|3y)[vcZ{mao%sn05E 2/ԭ ی25\s[^OO0S|;}GgYgΜ|O C׈V#f]n6.oSӧ_`567FO[[WEX Dάg%G_k8+`>gہέ*k̚5a js^5YZvY?v pg퇾e٣g\ ܹsS3)3>-m\`뮻PB[ ?^*;619s' +[*dZjDp;m}=km/ݞ 4?@\ o/XѬΟ?ڥ? 2oYG'xbcVo55 pVpwQr,vv ;8rcE5ͻph/W `,XqwzH`W^y%JFioOUdty 7hˌ% 🬷rK{ϐ3UW].]F~m88[ݹYn_ {XoF*TIZλOMJr)~ p>pm%ۂ"fdm{W\~ze;c38a;׀k`}ƍ7ޘ|[qt_R2o.OW\FHX<Ƕ_h^fy ޾sd^x;yJ<@>Kwg6%(gdt蛘0}dNXeC?/';H18 NJ ;썤̾=

V*0z>_>JォvL@`4..@e]MX v>3|UVIÕy1; qpa?ʯMx50;(hѢtU ?Q+<%3qm I`aÆ *T] be~,w&x oǺ0|EO+BC_j!Wb̙WM/_^Џ}(Js U vd_ }W;s-@C'!fV【' 7LcOX,te5!E-z M@L{Vt ,f!o?A53xV^K/h^nVA.78ӦMKLȀ2y",u!Ю;@/k L5E`/H0"yp%;(s^" LKGmo ^`~3EƆ̪_vBt3~`a"  yʁԇ |wk=hďM']&Ϊ*οy,7qs! o?XbQ'%վrFf?]o+0hX|x@&1eʔCZr\ E^Oj]3_y,[,~|]_ Po:-V @ceX~=|PPOģXB+~CDA" BCK?5Z0\ؑu5B1guЇU` (UP%igl'B;H]Nzʪ/bdB2DLH'p0eY^}u-,J] WzB*,a@'4`sSW'\cTKK S~$yi6TOt tJf?7iPɂ\ o7_W} \hVZ%ʴ6<5 {+hk_XUUm\si,n}WiE+`LU&NO&Oier*6Os ԩ?f'Լao?J ~y7|bڸäZ x,a\G eZ8,bŷ%_ve'*-2x㍧?:%Hݮ%CfѸWyCPa*k z~X߆TX#+Dx[GIu#Xft (M2,Fzk. ix~cĎ xgW4^7nܸ?lw}1T 8-k JOG*]3gyfNKŘp"k /*V*3e9{DuE PX2k\J\HS$e.za<,|*'Ϝ9sAXbEfsX ,8 sfpO2ƙGzZ"*T0Amxq{S00iyq(=z5PF ^;l?I#ج=?GAJX,` 2@eC} +GJ<\4~Ν 9LQ,lnE]8p]v\C55xɾ-0|БWG`?iyԆT{.]yWxϚ5+yeK?yV5O A&Na͛7``! B@&QVe0pZ4<r*K׀49̃:˲i+x?`|ٶX N*dlXٱ$[Oh p8WY Jm)YtՕ k@s=c#J7~D &o@k׮DA#dHs.:Hꥁ_eȏ]ü0ؿ7t['U]%=<5|NnݺwjڊMKD4ą YnÆ ʝg)dJ b`@ !<` q_JlU.{)S$ĉrq[lI^:d^+J`uF{M>igZYi1;J`c,PWYiaٸw94 'O]5fjs@؊Ltاg9d_n _!kˀ=7K[|0lphywvr + !Lf͚tʻ*yX%<ӷ, 4*sVaZVXe]^4Cm_>ײPPbͩǻ &xzE_@ywi="Cѯ_FzKfzb^=CI!k!SNM`_ԃD긨NerGFX*7E YY+:q sc$,m4ꍅ}+9jj%&/0` GcϞq`9퍰 ,^:,{nc1y9>ҥK.eێJ49`x!rl^q*Cӎ^l-\欶meIE%ٺUʷM8,LفDA9<s tSl]-s8~RTf\Ʋe˒tʵ4xx?RV^<Ԑ h;hЋ/w](P&~eUVm%*A:EXlX e1]mrԇ   4ih|c5;.>D\  VH6#ڦS2@uЭ fi]|yxuzŏSL~ * @Ekh!,e9JJ)`-s `0zu7`Zl;2ų%L-mT|m9EȀG[xYHe 0X0+u;,|EW81G)lj~(ixL{7T\H(U <S^.@Ru׎7UG+ ni+P 8 g[cs@pB!q A҉A] SPΘ5r{{@YTy׮qmkhn/pyX ڳ`#A=+^I#J{6'927:0 @!@V|ʳʳ)@^@0)Pdȉ1a%R ;Y> \.=z_V (CDE A=<7%mP8,OB8&nvbFRPXRi’;”Bm% gЇ:)ۃ˒(5`f <߅qcEHȤIDZbRP5^Fy[iXQV_zt!Ln8l7z@=#&1P]k"l=g8vj;4ŀ9@ LX9`CUHU'haS^@$G)b^@5&( W\4 IU8E &}\~ѡK4$ NJ.:}N5jwC8Mx1 VaQڡH)@Ht$mvO׭RNךP<ϻyC4ti8d9eTOc%OdA@"|rj?+=8ug˅uIeq t\;:ď%!-C1qQ0Oa$]Nfe^nXV] 8po"Γyyq]Ya'k^= f1Mnv 5 8pGD &HN5,'MtEU+[﴿4PU`U7t@7f)iIU۔&zcI*l'ugoZk6\jЧϟl;U`u6Ӽe{P^ I3J䨺YmKNTpYgmdJglr^q@;5`s='UDp*a:1Nò*0? ڔ +=ʺt tJ:ujOPU".̬H_p1/UX]Kray:Ə~?_e0Yj?Y&--~1\VasSN9+3fxo+t\X} VSѬpVKSZ( >,a@'50w܋9眅Ys}c9R[ZD]qA`ӤI ><h|K_ WH3?f'xn'pO 0/ʅiEê'WM/hU| ƾan9\UP۾կ~GnH~YՋ˫/eɼq^Vimڥ>Ə}?OUm?j7$?LN 4kqqFZ0îvj@3A|qҥK`Q-ȥLBo 5kJ\h+K8Yq]⡏˨|؆]uk۾x= W%m-YdǸ3 ꤵ sS$9_s'^wugyE:w)!@I;G5pd_+frzhjaV. aɇ\^Xyȴ0m(O2G}t +^ٳGWeA}%9w3+`g}d9 g%k/{K)KË H9@G[iA ePOpOS5L&Lh̛7ʲx9V&+4XCqEI3Ǡ9d!@~Eu'O NW.]yh^3Z"LpxDƾ;xLC녃4<"PPR]h΢ 6n>j,k9֯_WP^K@z<1(n9ơ'Y!d-b.=v!{y9{BaKXwYBx"$.+LȂ4ʓ 0ھQX>%  O3|EY`Al:eFtz'G:y S+Bb5:k,n29/?>S'c ȏs@ !p<e"D(jRmک0{{f _8rJ~#Eej' p$ f̦(K]s ;=[NE ڞWÙz< c{!= wnjwH=yW8˗/oX" ymTk0`K?;waˁ:(#ˡpO}Ȁo4ukB\nHsiVbX!@{-&=J8lpmEMHa"tz zPY>D-v0yVHj (][Ȁ}p3dVDyҭDSZ`}_%Q[FTjS#عPs8U== ŰR eBa*n8"NiZ4S 9VV[oL}^1P%ʇ'7D.&H@d= a9'o i:)r(Cy1=a:pNO:1:[MYT()~ԩəh Ѧ X)z[,.:ad3+ի}K3]ktЧ9`!hU: Me!4>pU "/+~ Jd<9V{`PzD7& FҙD"UV@&Y""` KiY^CO$V8* z+cku>bz|`a47Hd@[iMnu(Gy<7զUI 4b <룕\OdLea4ؐKD" $"dTsVIIL@Lz{v^iEqC؀:kuޞ" 1F]oxZso@/I!p/013I!֥, S )p= rO幧چwoy` Mz)\dI;:R6ӎz55~Eܻ^*\oZ_*N;1ɦ'ՅqX D%g7zΚ4NC xR90QLLIl#qR_:kT_ҋt% ~8;5α؏@*O U\_tHx\a q V1$p¥:…4PHM)XH CNS\aɴbVLtz^N5"@"`-f@R+S-Ptc? 8pϜjP7 8tEީk74P޹)ģ@ilV!ݸ:?ֽ>BLu\AʶQ:5Se;j|7 pVܷ]_OC}n& pA}Q{f<5 ?:~َZ-Nvڸ:qIR>,<.gU:+6U:!´0V&WI؅my5A Uq|O{U:ZG@ xvU:aXm(M2,G%UϥkK^[iADC lkg0S^vF\ܶ]j_ ~CGUGӤ/-L3J ݩN,6<Šmy5! |VULtw_M|je`+:JԘG=s}5K+DCͭ hHpT/Mfmu5o24/QNaɬ4SZTydזj{hho:o4vhqxZieV/hQ?'hz-@K~MB)\T'n^mI\5j\uU|->q*q˰-)- JH0Qطh]M_pMe66 Ns_`0LX`@*mJӊUV.]-h 3ζZt w'b |n/R |vPjNW$N N +)M<''@'-[4!M.N#.2H:X ,+^|m'Vs^ܹs9$~ɒ%M~"l1ڎNz9]OS.yi'd4Iz¼˻ϚT8CªoA[O}jL=z\vm[w zYN|w|l6k@0r]IENDB`ic10agPNG  IHDR+ pHYs%%IR$@IDATx Wy[RnI-ZŖ`ۀ ؀8v`̝ye2r3&;$Ó} c&p! 7` xY%kwvrM}ZUwtW9S}{sم " @ @&0գv @  @ @*T @ 0 G2+D,w>ύ[X#A P"%jL@!iYN2ݸNQ-:N:wܤK'?v-=_ve&Mtn[?F+J.0\&;yϗ:哖Of'? @ @h@@ Ȁ4}ݍ ?<ԩS'Oves̙i{Ȟ,[F-'261~%ڗ̣׼h[|?ymznAlK۫|jԩIA_J4CK p V@ Gϲt2'4֓Ǜ'C]c] gƻ-6C>^43϶TEѬkv{+׺]`ZϢ%!<NM2-lgm3 6*$HL8=}XL嘘`矰k'= KX@B =+- Ȉiyhrf5cc{e0cc}hnďF DZGWSoN}&er]szoϾk\}gszֵ-9ǧMcjk]/v]ϱ{0*&u\LrTLHN+a1QZ&}/~ @ `&'/fD:q937ꝷ 3,0]/47Ҵ:Y9֭,񺖾ޮmu^usbݑ.#A1T .DGlˆ& 1cƈ̙3Ϛ5kd``}>`Im  2q" C޶փ<`fFFZQgvb7]$iˎK|2O/e J@^.RZP X+q܃A 'Q@ ܋@@ YP@hٖF򗘁 Q_h~M{Fy3WϾ]C FmZ*'w@pDC lx!y8pxpp03a^P_( ۖq?jq>ˍzҺɨ1wc_$@@Zp CH~Ojv;"b` =pм6uvzX@dN s( 2#~/Ѿ yf6\ ֕e˨?tE'@/-PK,>G3L 8oG4<0DŽ/~z;D€j€A AEAe% 6пN=2͘xxbn7}|ݗq^@8(8p gϞ7yH lW[C@!V 2o3wrtAs#ߗc[)A$ |i"Iv('l&런rjil0 @XS]t43[fn7XT`/#֭qヨGRQ, @Xc-50k֬c6  >f1+|J2ۊՄ!P"ȌӔ{j7-5ޔ;vn'@fF h $D͛k[K,Yo!`J!"B gR3_kFؿcǎMW-[ ;w/ 6( q<.(pfbAY`^җ~ۆlZ ȃ@Թ'K`W[=0C:Kׯ|7x} @'0eʔym`ܨ &|[n ~SpO &hgfւdͅЌd{6wo™ tIg% ,^X7q[/n7@n> 9r:sV3_mzĿxS-G6l1^sL9 Pɩ -if}޻(e@>]! n3E_n]] 4L @N:,vfΜw-k P@m.l@6'udoA֋BC >%!ppxx`kz6w.\(* @llvoWkƍ#! ]aڰ p0R@(eR0#y޽N3/72+`m/kթ @鉇 ~zT!>v f"-\ 0222 ~E+؟^~w@{h1 ;n6;b@NCxw.]%:t .dD #8us=30zm[8@MzUg}I۷fU'<=)8ܖ\hm:bYÚerOX:B@a,A xܦ{a"h'h?mo37U ٳ A: 'E@‚ `1aQȏ/TmśnoxNW" "P Eǎ[`'|3L߾}{ȥ!PL=HcSYozq\ec}RZA=/kneyG3:;w2/rСf@ t)WEl~3P^Yu>\["J|(2Iz6mZM 0!\_O.m(؄D@B}![Kof??&zqH IYKAH%FW=zf\zehŤ<K`e-6`ٗ[O@qk!A wf̙Ox1M 8J)'B&rQB0׶̝_nڴ~3+RDI(c=nҍxlc9#\r׀ܓ -Wʆ]01` ~;3w@ Tͩq8p`Ν;6nZs|e"[erl2IZ}ݗڮYHȚ; ggͺ e&P֥n'i7 7 6L!S1s˸wc>Oo} ! ?~8"kI}cLM\JT]LJ͕7͛7_~Ak*P༴A4.} P ҅If+Z\`"Vʞ~r}(; uYxqhdFm677Y! (7Hl: tb \< A`W2p~keiM_L4 >T9˗/~޽{o%* ={vdsG6En2m cƥ mY݈vlNʄUy|b\|Ā=׃@ CK_hѢ_ll%?Ice仡ˁH" C@1$H Pva@K 2\<9P{zGCJx׻޵xxx7?\Sq h,~gk E@H.ȫ'`t[6T|};KT@[bu>0lƦ{`׮]-ne?i㮟* (`Rp  )q,y5{'}sۼC 85noo16]߰"C55 , pA dHA$?<[Ч?i<oRj qHlLu]ǎ۷41a4]Ke%l@uhBK$`HAh%la[܀gU@"ChYl{ͭͽӧO-Fr۟7o^`,}\'n@ )޽;2/Ctpq.dbl71 ֙/*N( '>C13'C eJEv]"^?44Y[Gץ;rY@@kSHX@*.ػ###ѦqѴ@?ʛlym?)=%E@=2e?gΜZ   HF M xƖC?abkDJ-HzTןw3)6L+K' @& ()mxYy|Ԇ>dbѦlJ^Jby}]ZJ$ W}Oϟ?_c钇@<MG8Ia@1Μc9WOYi&B*?ey!klF"+Ϙ3^QBRHsI+h  (fHZ7O/w#QOLXy! $3^_1{G˱{ۺY.1ں&'C Q!7F/){>|ڀ&P [H~);.-P\/^<HN t l߾=۶ml:zxG. {:jb'&kN@$M5.35WM )"۩-,YÑSvN M@Ν;D H `C.XG+>C_1JE)Habwe?BexknU̙3cC_)R?  rPA `1!`yS>b^'@ Wb?dFf_pb.OE/o˧r~ @>pA@fPAR>lxY{Wyy!vU\3'Y/_4mq]|d_~cF @@^N81&nkGv{gϞs 8ݻq@({ w~fK~i.eR4%߲eˢ+VĹ?u!@@qHؼysiӦ8p%+21/M%Ɉ@FCY;,O E. ~ې"A v ?|`qe~̈́C"T7qc>˸7cocF___gr @sw!$uuX\jBw\ڲ- Tok"`ZPrW~m#A *ػww jRgμ->#|3W*e%P֖m^fN?,S93f𫷿Ql @$ph˖- (~#G õ6!oy\\  ۩eu~z-Z4˯ @@c nN䨚Li; 5!W& +jkJ>֯^iӈ6T.@@ 9s&|fVILgUk3!UU%:DHUY9G 4Zdɘ?d  @+$ {;~O5w&G@ZN}ve$Z*ꪫ/44@"uE###$л[-Xϙ@@$&nV[~e&oNk}Q6p@ dI ^{X дS}&<UeiT=c~/Y5DW^ye$@ yhĀ7Fe41)S{Mu9 Њ:Ht2e:4ٲe/7f@ g"M3Ϥ,Hy +/,PG ЊV3r_fTS ?_}Qooo@ PP7olZ2T+udM`ҚĀL~F6@ro1 vݏXƲM;wn/_$@ Gѣf͚hZ}+-zx%5Z?fekU ~e @ b ۷K8mB/q)+XJ!f϶iY*4_5_I @$ % "M/~@f{_+WF7|sbŊHI @6]vEOϏt=,]ZbӧOn覛nfϖ#  @LO=T,:t($ kXbQ  L(f_[|9Rw+H|GIqLIѢEܓ@ @UyCϛXP28+G/}Ko11cF&& @P >OU-SU^ !;칡|+ _I!@b;v숅kFΝ{C6cG>O\T,@΍dۭM]wu?wˍ @ %hѓO>9r$[z/eLxxb}2ÿn[~f7FϏ%C4p{@ dC… ц b^x!.ΆxA9~n-'M]uUdɒL @ P4gy&:uTъDgm\p 4*/u̙3~ >8@ 8sLb޽{KTU!gmH2/j, dAa4[|dt\n3<<zѪU" @ hXwh֭^ 6o/s& :A f3!˷fp\n!W򕑢 @ l۶-6oɁNBlq~DՁ4DrSKK/nhRi$@ @]v튅,c p^:N]l3.Gt6\zŊqŋs?7 @@ ٳ'[.LeK@_|S:Z>]h3{.\>K^y啱p\!@ P5k֔N2eo2Mx*mW=:LތaW,Kz9zիK9!W @8tP,<ӥDL ƭYf_e)\WR4' @(D)Fh*q>kM&*AS j3oK}r)|׼5zI @@l߾=7رxkD a߶D}-\S!0Fw=Iu;n!?  @(6Gַ"y!I:uF |xϧ?P͖0-v,OoR>mڴnn)nC @8|z;NtN.3f̐pȊ(`,@fOYbVo9۫ H @@Μ9}ߏӧCF\nMhg/YHm@hhgɯX"z_͙3E @ >ԁ!'y*Kǖ˄!'#fNH ^]}Յ( @C`˖-׿Dʏ4WEKE=%e/nHD$@ @GE"bJx3L9"fM7v,dɒϟD9 @( #GD7 6Yј [Fhdf6-k[P*sw5XU @JL`ƍpj)fP,`pȱ 7sGs j믿>zk_A3)@ @U pv@=AUYSN]7_5y;wC [o|+0e  @@l۶-W &MT @#({ot=LǢ(l{ޞ)וR G@js> Dy{e+ @&pF?S?-XPphgΜGӫlwkFZobsV-[moΑ @ t }kњ5ku\׃5׆|#/EH4nэn-ɟID @ tԩS}k=^wnU#7:yd*<(`)>IzE}(7)kZD@ -[FFF [K- iI໾K{~~=6gϝ;Wah, @Aȑ##<޽PiLM{lr6*/+/U>3 =!Ez VXL"q, @@w={6g ڼH saPec_͛7CQ뮻.~@ @U#-+^BVF79 $@ @%0iҤ8ɓsP +r-Xo>ﰛO{#=dyUVEK(!  @!}`Py~7r+XoeߧF=p@,H:+ڿ A @/0k慄 Fφ ^M0:ڷo_ܨj<ҏ؏E}v@=!@ ;#7l ! 4W,Yj{)>RyZg޽kn  @ i]w]SOE#T\J n,AGO74w @$ ;UzU.Z$[w]Py(]y*dx߿?zI @ 01*={v;|:ϝ;WmK-PJ0AkUj /Ypa4wܬo @ I`ڴiW\_>#,wX.P!/'FCΑu?  @'jժm7ي qd< +]# : g}K@ @ hCCCє)Sb;.H'@T: { nzu̙\H̚5+9sfå @ ɓ#Yo{IZ u4>$k OΥ_,  @'xj{m6GЕmޢ0F0//,X @ 4O@3 yu?~~Jjoootĉ\M1rAM!@ @6)aya޾}{lٲۘC @(yM>/ pD{&O#)P$!@ @/P4OW)4{[R=.>uTn*/+"sc@ @E# _y jR  J9r$ϫ @@a(Ne ľ} #˂^17f̘A@@ @$e[l.<<vޝǭsg=T2GFFr @@A?i+^P%{{{$@A|q!@ TF>|8W֔UM4`ڴi&@$H @B@>qb}ĉ8@UY @V,sΥg,[,?sC@ @4^vRz&_`ԩTKChѢ(Ex( @ P {l;v:k@zT i6C @cǎ/ !ʩR@OOOaU @(?SλIˋl@IDATIU}:OYYĤ WΜ9S^&k ͽ1ܹs¦$@ @y8~xlٸ޸qcFDEMR4;B  @%@E/I\e|瓛XO\PorQfhh(2+j;Q.@ /˿3$u Fq Zq7^N @@dwl߾ƿ?ӑ⧑'q4˩ @:A@)y3m޼9Ҕ C^Ѵi]WӡChaPt @b;HqBLBi P2އ'A @hѣGcPu>xD7u`)Y" !i^ܹ37RF@ T޽;vWп?Pޢ`p`Ҥp0ISw$@ @8~xl?7==X 46'r2Dv k.rzn- @L@)< zl&g'J:4Wm" d"e @@d=h `fc @ 0J@ u 6Ю"Pz5b\Bܹs8Z`du} "Cr? @@X jR,gy&zBB!qEn 7( fϞhx7 ^u)C Tt,!@ b="D6Jȶ(O=Ty=P?ڣ=\j| ٳceԏ@O<h޼y8^x)>P$hìYG\@ nPg9r$hFHXn]m۶F.@\ 025'|K@=p#Z_ !&M_f{A0< ֤ @"`zG=rLFyg64zu@غSU_+<$&(Ni@s}KNY‡yh@ *Pe*[.Sm4ZwN.xHP1d8bIo/sY+@@c"/b"H w  @e$125%x𭴋ꭱF*;v 跕3(phE^zb$!@ PVl @ dF 87?mzC.?@Z=d$WL4H ,%QB\B?/}IhDQ'!@ 5~T 6SW!KyFn#oR 2u hFk,Y#( C$h  @E& \ʻ5Nv>|8ZfM%=e]$.v׮]Ш1+oeFB@#_"1а`x*yHy 5.40Ԗ @.o\UvuM6E[lin)V^سgO첯FVFT$\Y(Vr7Z (z52"q@ j:ڔԯV++ڵkVʾ  h@/#e#!5.htU*+A C \D@NUoUO\ܸqc\u! Vk@fϞ] o/jKGʚPs$Ș1 GAR∼*3BlM @K@HSde(?lܱN3 zol2pO> J?y̙3':_eQ ȿSBb!4hq0 @( wL^$!֭ :m"IET~2v=UU@ T֗yE'hP4 1@ ֍*N7P;voTݣؕKI&P[:al^cS/_25 /Q8% U+p@L{*_ĤUDk v@-*Ntjjx޺ P]z;ߝgAB޽{&A*ر>$`ٱލBP_0R՛eRA>P,1@Yc%UdV w~WW$gl p@@+T<}wR<k dM<ӗ^U8Ȕgʢ"(2zU&e%8*gYǼ Im$O 4  pJn2ʏJ9r"[~^3~4S<O?N}/`rx+˜I@R~_ 4F@I(QJC)n[UdUiz*6 =zE?$Rb~X+1$(c s Cа)um'A =2Nĝ{۽FQ5ߥڽ&CS:E2KIcdqiL G%g0448v1@_Em^zЋGcgpa@ XM'UE0d@Μ93ŪǢp1<<.H{^ͼpѽ\CK@(32<ڦzoVl-WahhY۱Bj˧$}ڝG_ H:VԍeYD$XeUXB~,2k !`JCG@~ON U2.DݦU-=@U[F%&cU?XqV$*3b \@UN_%)K{ W Iu@(I#_E}')ˠԥԐˢzg@O@߁R3гٚdǟ硺BkPo՗z^֢'u ,w{2D01@|ejAQq GQQ˫׀o+H) g# ō~˒ Peŷު:'qúkS9^$eHF{7̟??1$H paV614*K`I&$i@ ;mN'CŝW@?~'QS2pX{EOu@E,TJrgs->C -ZzEK׋ CM«~\wq΢qWRN9ZZB *p9]eU -ɈN AuZ5_Q=Ƚ\% oM->icճ*F~y L̈#$t}pЀiӦv$#ڽt;0Eڟ(Lý н{*/@ ԆN% PIC{۴N@' ${Xa:IkU@Z9:_W.F6w@h/826CéS#~Ys1^DH @SF/=WhszX~zQb;#/n^ܠЀ=Ֆ%XuNz%+z=0 :aEeN 5%6 QZoø/O{Vѯw=<"-2"NIʦ 44 42;@S ʇ ZR|v2H* T%UJ <Ѻ PlqubgJgVLW&b՞5W~z9q,cR5l=2. >D~U/e~hYEK4H %qMO1k_(.d/2Tqی@y2F_ O:57SP {g`r/ꥬz)iz釼z38ܨ#QQSJpCޗ8F@Ͻ=7R6E PVpd8G@ eeATOPKqA ~8HQ3gN\|ЫNʪfzCd@_$C(`(zzYk_84B@ϲqe_O/k6})F1(]m$@ %0n0½d9yE Y d4l0(~. 3 "R4 ZB}행!vr\Oyc)9w@9I.hOjQnnj2kꪒdx8{#Xr)"/];wn\L}.vx=C=̾*eF![2ۚ]vq#JZ&}[VQme6dG@ޛnGώ=w@%]!/]x uٳg/2lc+YK؆I^yBP@59uZTvUODM#h PI/>1=RR@8cri˥%1--=rĐۆGG}^ (1 __H$<3 ջ7cƌ8+E- W,HP=y^v 2ݝ0ڎRBP㜮y]$$2Lϗ:Y^ -U%^$@@7o&_ 5!P,jJ3J< SNLGݭEN>J: Nj/ @1zo~ ]$P:޳Q(#2jI'bU*^ XObr 0?2$Q XB@$#ApNe d$>=&zQaIlJ!ē/J)ψN% 7KYZE|~ϊz @ȏ=w@! P퍳 e. z/RPtc @aडc)ț@-.w$ >}K ?.ܹs⫮. $=+:R^@(&El3J b*/?tolT6CT}:¤(|(XBx䮯ߑd%?Qc .v r~5]yE|C\J s^d"V T%xA@.rM!0X{7j_!J.CoH߫m cdƾB(-A9.!at mpc+6W rT$Ca``(=4 !cd@ Ir_ĻL@ (CMhRSLߓzN/[{UjPU07 #c})#_zvN'<3Ȉ?62= (QOPŋXkzB:K:) Z# }\_C]i gAe$PV-I-ICv2C ύ^j ]ر3b̙qN^T/.h; ^$~}_}}Nv$a@l֢%?%j̜ ϒ>1LSћ{G̚5T'S wxwL DMEU  NLqDk4Łd4+@€ZS2z؅-],H$9,!G'}}(F9 "@(B+P]&!UϢ Z}H2آY/.$VOK@ ,ߵi?]Vm)-  dǚ;5I&qx G]Sպ]Z>|HA__%E8Pk@A%'(}W1igrY 3 @gőG>cܮ-V, @~NQ.(a2.H PvO-I@5uiC_ەT% b@(F;Px1MAD[ے@r]/\"@!]&ۅZ‶Q>@qԿnK[t9 @ ʁ֑@bE ) ZW Iד5^&ZC T>)-g@ wnkW/^Y@ iϵ*/zY׺^ֵ׺Vƛ@eQY%$E_xI~(u7;\/K@h@ B D h@`ɫ ~@D9y,ד^+dx5"פ!ܖ$@u5$fЁaA6}Um7>h={KM= } &#ZRe1Re T@5=Z2LSQ !?mZ&gGn,U  0z#g֟Z˴!< f}l JUr ^2M U2=%c|于_ѥ37A:{Kns{:ZkYo[r=/.a>>C"i^ZI( `T~Dߗ:/שq~֌w^>PP,ʚg>˞g=RKǤ7=}>!@E#P<uA| $|}>-9Gi2ymZw }ύ?Y񎯷θyr&[9'y> *@bTz/xUBgd)ig?>i'%kv{ϭ\sr/YN!@p"b@r#zڟ4zƼz޾f׻>!@@' t&8z/Z& Y۟>?y\~Ωu@B#ZUW%??Ͼ?D_O/X=_Jm~nIGy^ker#ۓǰ@ 0>7gKLĉ*FoZz/ޱ~~kcz~\;~]@ P|oJ0ixTόH>2-ܯ$@ tN^kA0:MMD 9-DDz @!@*XV 6zUFȹ= @@ t -NP@hB D ֪`Y*T @ `墝")\Qx4J @B#ZUl#|n @ U];A @ PuU?@T"PƤ* @@HR2!m @:?E8@ P"%j̲V, @$%mqRhA @ᛈ" dI K  @ KY^-@h 'A @E8PDEl -5 @U'P' #H%*"@@ \D"|(""Jy˄P޶f @"zCen]@ (Y GT qRhA _Bmeiq1y˗C 5\&4L͖F 7>U @@Jck"0Q  L%@Gqr1@ PxPFD:Ak4JQR@*C6uil)*C2MME!@@hT!d;[5q@ #_ΔDb,KPK \ʄ-!@wrU@ (fG,6n@#8U<_<@ Pz+S $ϝ{ ܜ9s&c +ǫoV}5ֵ|$<1 @}AkW:@r\F v5:y'w~n䵼,!@$p5|3̒O\R 殱wP$ଌ6{e~?-MV=of{#]e @@^x[hkT,v ˗/?aÆ:s(!@%vo-MF8 @͛{S ss7.¯wqzs S;VZ+&+u/kVϪ꤫F뤫&v. @I-{OE6<ܲeW.p$)l]S,#w2KICղE A`۶m^tE{{)FaLVt|{SoqP.wN<ʔeqai'@ @>Gm_h ,x37UU Ə}f̊gi'@ @m{Nx|}o45駟~Gi ȖO K4%1?Ցw82xΪKǺX}: @@//f-ѧhGFeУz饗RLԾJJU֩CWבEtyu/hg @@-Z7~7>Ĕ쎣1X p§=O' 'FU근-w$Uݣj3Fs%|1x("\@ض,ͷjhƺg|W @"bŊ~7̵ܱcʓ| .|hdhF2Xܶ2eMٻQo,߼E)y@$pq_?Ksc5Ζ:v)ߴiӮO<3or;enlKVM$YG.Jلi!@Jx_&^0Sw.k~˽Ʊ(f])~yY*W?2OR.@) @ /2!Y1V@%nzի>tVJDd/ن0]R*ymz,e2 ,)A  r)o_0$=_W_/~JB eO^oo'+_qr:SOYq<792Z܊g4GX @@O>{%5ſdpax^[]}?ӻ{oakߕ<ܮ6K'[,d @ԯ|Znڞz95я~UɅH#:(SO|=1 pLX / PNM_v,2#2 @@/\UX=ygc5~k9.y W&n׿YQI17m}2y-o`$C ? H'PMR 7Ow>e`f&J18p`n?&fE^Ly}ȼO¬u}VCͺ/ =@IDAT@ȿ[wݗ'dm'^;~dD"k4|2dկ~J⎀)yUxpT7?ҕ'E[{奊'f<,( 5 @Ј~3<32]KW|#%;I.K9!Mƒ>8g>39x`lH1FSح,C &7SBj5d @ vh^b_ŏd䥎kX׌J̺ ߿ƛo>I{<$YMrcǎi،@Z4eYRYv=Mf*֬(n}7/!@%c=vĂ~U%Қg瓅W''gU=~Lwv 7˼YI&Z S" UF}dҾih3 @hRܥk4˿||CK?=ܳ-q?MmM'<׾;2ǚ_-ߦR4/Q;@&RNݶZoܐ,W^y{-;:mϛni{JF,5jy*׾jh-|gy2Yny}@ 4_+|݉ᘶ5Q3wyݻ;oےu8yYc,@ڐabuWED,nQ܇ @hF5vo埞N^V@bҗarw'ԧXɱ1Sbo嚌cx# @F:tb}m˟^ P󂭮׶m`o?7lR&\sMgRD)KmCkϒl3Gٲ,e*Z\=kA2 @;(ཬ&CtÓO>>,kGmH{MvԂ}5 '&vIUXm+c6wvZE,^}@ 4hQ-gHs={,S!ʊ|d>QwqYր)q (rJ R$e"l],EEr @*%#k1ڊ '_QwA[/qyMϟ?YsUQHW9Y2V)Nܬ2}fuQ6d @c!r֭['`UZ P$?xn6 &}5$I+d -{mҥk% #F~]Y oV+1Ϫq˶勡,1A r9ɪUL'̚|!`߿\mŒJ/$$;vTŸ~<4@./iYB;/Ϊ%ongP6*,@ P+&W\qds ^O>Ν}vmoHd׾髼( yG.(1h'{nn[J.me&7Cnqb_"ny(Wy( F@^x .8j=N;m:`U[Fp3oyk^3\] \(ՋUjLcHɳBe7˿ī?涶WaQ%o&i- @ɖ-[˗/!}+ˍkz.4$ 7L52)^]Q޶m/!#@YbG3ŭ(Α9sVC4U/JU @e/\~SO=9Gk׮zLr-91>`nL'ч~ 6t+Gg?:qP,7e]V9m||(klީ°Jܲ׍ׇ,}Q @"}gO^WL,XPZWăt>"&ɯЇ>c|eYFt&yO<P U"Yɍ"RLeY,yxeeeyr/P%U%M?{@ rh::<餓&>`ZOLߝe]d(ӽ{6yR/SDV 0x2Z;-B_LAmW%~ J`…/x:ߤϫw9H5yKû "XGF>1@ Mڔç4ݗyq|Y$B.6y.NuX}C 1est*yN>ҥK'"la~rM˸쥨 I+l_T)^38m!ezYyyjfiZ䮛tutUo @P_Xdɒ:kr7gٌTv@Y:09@WLq>|x2]6"eE4)rcc) w\uI#2n:=Gp(  K@K&WDQ7tS'yed*0md ʿ\a,|Q牒RM ؔݦ Mv][ƭCm}@ @ $rbqgEތH;:)xL1\uUk;] 2*c1H ufXㆫ|Vlu(:N<@ "-j~OWsaӦM;vY䴬`U +32R7]2)N@B#yR<ɼyêҧ <^ZΒw%Y{sCd5)=e_G(u̖:IJS7}tnC  ,^xryMy ,~RXaC:7&84Emm򆶘U 24>,M-oQsn=iMYWʂ @](N;mtYV5 <֩ib2}r\g|Z@p+BWDCge(iMӋ{y ~@Xltq?`iYWɣP00S)SWed۷r(wPk}꒓)wed%S4UwYסvYԑ%e:u'  @+#zjn_r#>X 05@<ԖhVŔRZHfքWZy_e ٺ^F8CϒPć @l޼y)-[̊=(%l;X5@VTjun |a_H޲,MCLk&uiGMd'- @hB@S}5gO4bbAhpUWH, a"z7CE1?/xN?S7֩f$ @Њ駟>YpaovQ빕/b袱2I{b ~'!,hjVT}ry8yujRw_U˩Mgu) 7{J# M ! DzxwՑizL_re A@ٓN:iS8| z< fA\oGSPZ%c)_2SxЦBꐮPmV>f^Cq\@C`ѢEN;mrgLc>Zn(豄( yGn #eWK!sմreiʕ I@}M6MN8aOҧ05>pR$[`[ŭIZDYe5'mk^CF@FO@#۶mnK, b(1 6@ԇI9tdDUDu:]!Lխ!.#W&n8mk^Ux 4!~͛+k?DM>! 14mӛ{{jM<R|u붝/mRW @"SO=u:2-gϞAadxK@t҉\H?SNyIm2ЅWUQKRv(Mqfӭ~9묳ΈSjmrzf (jOS0 RMvb6qeo#< giZe-;A 0˗1>|zD)jFJ*zdҊr"'`ge <*(YtfZ+V4ϐ}Rmo$ zIQ|'z()iKb;[0J1/ H9W O:ʺ)z<)-V^Mei3qk3ϼ,kz-?A Ps}Ы1+XZ3m>(b׵=Q:)Ckg7m4Q ;ڤ`M+lJB^PU8eʫ=*L7 i!@7'O8Hի ٳgO:H*m!z,X`"E|o߾ɲe˦ƈd\)rҦG d5 X9}*Vfd̺5\2y[O߯z6m+e țTR׮]}#/Ax284@# QeFoa)C/ SO=*@ H!!VnyCF O@St7n8ҕ N$-Q};vLy|׮]VܣFa܎mQj "WI!s cs8e{ֆxѹ]?/wre;vs @@aÆMkI' [F!ˤa{-QJA.f͚!eG5Q1+,Ю0?ıŽm?ZtD^D@=MFM]U^u.*/}@#_~:_4bx9oijh ZN\Nr9ٲe /ow@ CIWJxۖ6yv}Ƚd!el@ F5/~G Bv?J%be45 I@1Ov=-r;@/Y)5U@d:zZ{|x{K"0[ Sm6Eq@@4}SWX~t ھ`}ep9Fi/2EO%h:<|X c'3p K6=s.`Φ^q[F*7_^;~1&!@?Rmd[PAN4tkc.o뱯o,@\%Cׇ B\)V4%/[+`kK /BGT oQr @ 8V\9<~S}Kh5-;e@ ^F=Z(Ì('U' TQd)U5(ҏ)۶W}tܗa@ i7ڬ @`_f͚^ʿ^cmꭁ.y2Ns#6峀è ;wzK&cw T 3hgoLN}1 DQ;@@-}^}x W|Z_ZCz=c_"0Z{8oTH6Y 54]0>zhΊR%k+a<ش#!G9(zbf@薀 ?u;{jO7S G@H4*˕+SSr!exW}M1شk{5 #3Dc~; C@˗/ݗCP4?}5`v뭷 2`xY4zzС#ܒ}j1&/M 'ʒ7m5yq5]} kc>E4Xū}[Dݕ[7tCcxͯ!/;vL֯_Ȯ[7!5m@ w6>Ó۷)R`,[>`jRsm]^F}]#_ mQ )uY 7&K}3]|Ç'rA@ `}^D5Nsp֭[ǔ¾5zȤuB!`O!h :A w6K?GWٳg5k5 So~zBu@V`hV=[AXb-lb˧gN!/3^Fۛ@@wt}H>xG[8y(Yʖ{wLe.0<?ՋG닼 'M!O`uΔ 0\roʾ3?Z#J%{sx qfТḧ-}&pΝϺ. Mt1c R@mK7E_xŵA<"裏Nk4u]덜 BYG&Y80\7,|"6孢͂:E2hޣmvq( _HWQ{O7_Z 9дN˓3Oz!썬J4hf(A Y :rS+[[ M5FJ" o,_ ?(P m`S `pht+\crnZ5kXTƗAJPG,U* 0JJ{G#1J SipFz]c_ ֯_?"˒\-hR#Zӽn}ޫ^v~?V~|n-dB@=Y?`0{eJM'ubRCYmY< <=N^zn_# R4^sfBϡC&k׮Ttn^x)o쳲Jئq&3@`hRYqRC BN<ʤ(KL3 KһK@m xD4Y`^Hl ,CMF` .ZRt*2Ȫ,1}VOʲh݌Ysy@Z@ M@Ad>kٹs@|L7%>k~}|mO!~,,}& =E#$G ݗ' 6l3KB~0KŒ xƃ-  fDKg=@CР;Z/E|]1CeӇ춗n̅xW'hM-[uؕD?l7nΧYdt}O 9hDSsd膀y>@!C])Y{),y@ur[k-?xN>c(Z9_۴iQCT&]pS˽ Zl C'7)i-Ha4R*8.Ba@&>R>umOu@k!:Oϻ~fHc'c 䮻J^@fk~p5ڟ6ꩧN ;޽{#-ojC;@L}Q-0k/c{(OCGR泮b{e,3@ dr!Cn`dP4Eo5h-<d@T]5H:# %tlƁ?>zhL6)ڻ z1=%H>~xlAu曧k}0h+2_=6y?45@P!" "%P`bp:VH_Kaau !*ꦰ)vMtܬ8_q $C;1 ǴA^]}fk{)yA5Z^YVX1#Cd; %*mp⦯~{욝/O}r1%ult@KW?;֠rwGcoРE4_ )kM2<䎣ꡯ2A %X<;]w)tl/}رrMce 0f<"._ a`hȽ@slJY4r~'N6n8G'B txᇧ_ QD_uBn@U =j>ć P+M}RtQ=}(:y˗/\*6lꞚ &2hh1D[q&nB @`${"|Сcl?{]}ZH B@KIN\ Z<Zl2?6YlX'7@ 5QiZHn4x@b. ,~Hs}~e˖ɦMF2|o_y#@ H}Ǧ3<sUUm6U%~?0tYʹիW*A ׀)u릛hj~`R @<$0E@뮻&ck:l!-~'#ڵkKEͧ@!JEK?&D @B.;e_0t"/#_hL @`|uQtkK} =}s `mk^F|N ȓ@Fm*_^@g{PE]8 !@FI@GK>{ RM @Ub CMZJд: k,^xmYAGmZP\dP0ؚ @" %WJx9a2fקa經4_%htҩ@/%Y$)<ЧY,lʄʮP!@#~})(G{g|B$PM ,[F/ZH`ina) e/)–C2CcC ~Ygp-v;w*>lUM0 R&u릊jU1l{…ӗVJw 1@nO!ʬ_P3!@" _Dy8GkhE3B\0 ؞Rr<_'hZ kNin2,S c^!&Vf yb @`2]?JJFQ~H OJF׮][[-M21r)PЦuMe1@/M/Yy`XH0Ev@&~jЌVM@4OmJtַ9]J!@*S^ TMh]!+ioݲ @𙀍ү'R_M@ ydc(ڐS}={LzYyǸ`mJJiJ˖-`+%gp?-O))z#iq2b-*xdž^E @ "YP},U1ҿ{(*MN`kkSRU(צ2+2|&YFdGtЦ @@ @}PD kҾGU/Q?WCRY K6+WZ{Ae^m^ ʑ".C!FUOy&hۼyt<KaCaIG @h/ڵk:עԌR| VhQ녭yR!`mܸq*yH-|Цv2ؾk#PL<  @`4d#ş/[kq? ]Ձ@V\9UGʦHr*{ȗuM7Y3@F!=#mk(\@.F K@}5WW1QĺMmwީlVQ#&04qZ)3pT TC͗LdU.1G\?7mw ]-AFI@0W_6FHUZ}dkE0q #c\d|.̪FEtK!MA21 f˫~쵩5ciS4 MίM &axR80UYoFFXA^ի'cdlذa `k]< ft O oe\}KmD0 IG#Zo rٲeMiF"qdժUMVZ) ycX=meд{@@[-eRޝԏꗆi0In#@|heG.GCzXum]segO/G)2h۴i׌w uu0Y[K@F0B!@P?~ݽO}vjW.j7-'߼,! [!Ѣ#g um2Leh~BMFYvep!Yv]m,1cy +  hZ~_5o'A@# }vI>({Z^LR`lK7d-(oAT͛7O'CIѦ[>㡟1= @`(*194U_U@U00 ݫRC$W%yhr;tH`C˖U\mk׮N wM1ufdq 8jW0>;/ S:|ќ~mjOB# P^)xr3NRf_˗/nB|%Rm'ߝB`+p @>p/_{ ~ےL&x %/wߔ0dW^>[`-Z4ѶnݺiG@2A@cjtjm<@= F.c>)!@ biɖ!%U?hy1 eF+CN+>ɮnR'B9EjS3lꀼl0`C@[Q|wSC݄8 H7~w cVc%`-_rgoV؞ڻLR> cjuTs?GodUVRQc)B0>b0c~4݁PL@;Wdy ص✉@>H7O4,zK%c%`-ߠ24=QT-'eZ곑FپüC N3MσR?p-BDϋXM7S;Bh9d.F^R5.TuHY| jF<ʟTL)H@wvYǘ}"[:5! =N%+YꐂFzɠm͚5sΫ>Bku|wwʃ <5@M!MF;^x4'E&Uʚ{k:F@Y]l_H}u%  1! `M(%Vh@b/ m2l(Q-XW'D\gM0`'@)7Eߔ{ hJFKg)Qҏ1vu(>@HMк괘1@~lU? A,G莀nsWd$a3 0m3QסZ'r칣g.v>SrLH+jʽ^gAug)غR9,}.QrQ@ #ce(20 !,1EC۵ YZ81_{pI& ^:u%eSS%i)!vdj#u;@{&C0ʳdwPGҥ$av -ѿC/Xg@e,O3YYp 臀:{niJG@}o*I@IDAT$J 0Q,CR8dԀF ݵ֭[7Z6K1m T`SB\!vh[f ]`td76gd<ߏ+'gZSgy@  M葶6ub0j@Շ`,wmJC RУ6udU:maug˭_meWϊ< fyQA{m fw#w)Y)߱c'@ v({|%ז\rQ&EVo_w:RmAP qUٺJA4cՓ^m.me'mf p 5u/n1K:NﳮY=]'@/t<aC@?))2˗Qw=u()!w*Ou1cկhzCI@ϊ6OdpYFk&d}B7Vs؞ݳ|\!0_2?TN<4,jQH Yct`t馴b!S֪y_RK@ªuԑP I[Wϗo34wV fg+JkCy `nO Pz%`^ 0)25V^=P#fo#~m@m=d>Z=:K`>~zd`@H.-TP&zncF>֬Y3ؼ}WBB@@7d>-ͺaNS^)Ȕ4tSrl~sX-eI69(/Yd:uHQ6cF t} }jQufAutz]~!@ ]dWᗲO P23 `+T}.Z:frP]uT5mq@  xޚŸJw-CavE-=?h5<2l=ͷ C3 >sVO=EW,tՏ=  C@}q}~Kc@. uɑsuϟ?ѦQt ̘1@{m+ }}`ժUViMl sZ%Sm~O H©?-HuS4Rnf>6 f p{Fu Mqks_k@{ X>~k|͵7em_u҆maEwA!yiF;|S^!1!~`3 *5$  ,hsR'<ΔMXl-$#kб:@o~pm:'@Zi2_y&4}2c/4zfY|誏y s8 V kgFJ>ӸZEMf0 "Y+WCb!iR5꘩f3ast*#k0՝@onϻ?bAafBj hV+y΀%(8@ug67!À6Tٱ!ӭл{Q@z F,?wٔ+ڞ,iu-}/QpR0U `%@=䛲[h!p`F')?أkA*,7{[Oϝ f PgҎ-$UCf3a@:vyVg"m9視ښ@[rnHIޘFԵгik=n\xdҥGzt#pq4$`Pj:;NC$FO#oی]2y hD]7Ϭ}Mi_'HPuM{ @.{)}^Ќ;$pɺsZOBֳk[؎t ^.\8I$2duM$@qܧgY B- Km3z M~un^k_hs ct OCi^f.ۧλ9 tO@)&: 5,R5< ܊i〮cntۢO|<;W Ќ{Kc@^!1 9f$:约 `)E` }Շnۦ۵Y婡`[V_u@ f^y{}&EBLzF5PUORA}z&ϺY!zV\A@0ݾ׎NKMH% ÛvlJӛPص3B,, }gS,>=܎mfi{#@Piz#@'7FX4Luͮ۱]xm%}L~A XFt=ʔCa X{%y*w݉! @5ZCIF]cU?p`<Ɋ}=wkv/ooSg]B-mȺ>ʟk/wJٹWd'}/z: `<"@g&"A`\;is؅wݍ@}ѽW،u"8k_U2(^ռgϻgmkv}Sc@@,0Ғ#iu 3*=di+twk6_)}'iU|ɋW^iC 2 /C:H@ n1Z{rknj y7^@f0'@w&@J@Y)>KN_sϕMOW,}w]gK9 @[gs=7!7)szѱOU]˪gוG^@b" ֌.t#ldϥ枻v{?XJrV^הh^K+/fj`y޽/׍c @@0ϔ[$*-fKV%p"==Ksqֵ|ֽo2 @4JLT2h6{l@ -(`G[pgF C DE@T_e0צ @aS* )< @@(0R#c:EB B@/)  M @b1@K@mcU   J }3c>) % ) B DoFax;xL>s' qk  @Jn( /12 @ `L<ZH P!@XDk0G6zb@ @[xt˷VXej>D"n\FA$@ 0}pŷ[rL}6 7M  @W^ysT:&Tf#@.uBN) @@4j wD!w1 Ō@ Ns0yv׷!Aa2] 6Gz@ 2oߠp[BAiRxg #c/m3<CELkSqo2w&6r]W֬tYܲ򎻪[^y\ @I't?Ҵ/IYguqw}d8q^ͺZ^UڤNyԸ@%}p2ƍ`6KYKǭrUUdh3է<ѾJ.6ʟk @شi.$TM G @~gxW8j ٲe?VCBl_ Q*P|ZjᛖsJ~ܖ-ˮU̓c@ p r)< $0袋1 *gm(wG]>ne:S2,MuT<{@ ?D_M#^Oklݺj;g.SNm,W'|"]-MS^M["7 @8sG~ܓH\_Ҙ=$| I`h\T:mbifu5<p E`ѢEگh ̿t\jSU)JȔȪ/[Y7W%KSE:i$StUC\@ \ve=1<$@h:[/^zHSbq+ QfuUؤ@zą @aX|ߐ^ DJDOGcWKxkSʖe]%MټCWI4S6]|Cm @hN;￾)啅" C̆[f́N:*z 8S}ajTA^'M/eH K/_WMj;[ْjȭ^xe˾(VU -~n.V)DYUd4gYi@ > 6|6¯I zK.[|TE! )rCv>)&KuSڤO^ @I/7n|"vҟF{g߼rʯs&S~Ȳo2byjO @@~_O-nB K/y֧֨-oh%IM=]W{r-_,}7> @H|ïIl($s?uӀu)Q"jF++!)ed8ym},r * @'Oxg_ݹs碗2x!\77ggϞ?SO=phy`*YyJ5 ЮB Yy?>y>|?M3+݌{٣T3p J8p]ڻwt#dv]{=$i~^{[y @九(S>_25I?{wn}M>=PK-uܥ)eD @J@ʿ;`{cǎЇ>I;V@yӹ _җοc^O>Nx≼(\ 07ed8y[:<{@ 'Mv}2}zn?}c1j*jG}t'>9#B>2鼒Y=SOnYi{yg;/=~I"YҲs@ )k=[0K||+0`JZG?_۽{2EF{Ltt@%JLKS>EYؽj"_QYEMZ@ H/6; Yp?I~GմTR1S\o} ;/O<&W_}Dk'X׿D*1] QfQ^YPUI@!>eQ%\?g{3nq)fLM28Yw_OARʳY1䡲 }ݖ@ P_Lvos^ܷØ 3Y_߾/iM=x<7#&ЦX$[Jթmo>j68 @;kV#U @כ,dzBwp뭷^կ~: O7ID͋r C*kC2pͲ|̋)1 @F5b >Y`?__Fg_KGkvO?.2ZdT)?e4i23d`h4Wz @Hiv:rT҃>sww6:@߻oem7Ν;'0ٿYCUuE2Ȼi&[ӺC^m֡i _u,n> RcOl߾T:)(8;<o|mٿNX ''i1Sc֋ak_7GݲNfݫU%1b `@#duzA+`Ӈ?%3~'?DJpsۓ+J,גo~G3)Jr5 M7)ϴu<+C% @# wwgp)/ɮ]/}iSw+X GQN;8GkoSoY0eIIMڏ5TaP%n*yYܢ<@ sociIpg>,8}3ZCM]wgї%.`iu̪g2IW6Ӟ@ 0 yPkT}۷ǯm}?t0?xE2?;o3k&C{%=/ E𼪝g/ͬ-nֽ˩rUh T#>崙-[eek9?UPa7q",z…ɟsu<)TxcR:Mxtgpyfxq_fl>܅ @eH'{c_;RO`G7t{z}LB Yr/I!5ydҥE@FLID>D|O"$SDi{ߕطo`ʿ>vm䣒ٸR 3A3ck?W&M^7:ʤQ[!n@ H hUʻ;IP]w],ZOxw]뮼=g>`>O,F1py جmJYmE"/]?K>+ӕӮ2oX7隔S @18S&v믟Z0P |w_{["'<<\2雎C+L O)Eq;0ΌCUi+[N뤫F,A 493"@WW/KiiJҽ=^ؿTBs Qǐ-}鹛ĭwuI#S;M[q!@/^<駟ي+&'pdΝ1,N(پ3PÝի'WrMJA_ZNBf׊ocU[&62_y)_ݲkA _ |Zs-I6ϨڵIf$V^W]uDQ;S=36mVu*#&YrZ.TȦ W OrUi骔aq,k2l @GgN?ɢEzqÆ p"8܎಄1O\[ZA+ !@ cYU.ˤe־mY'dka@B$)B7fk֬H l &yDb3LT 0L-MXHiCI/ISNٱ[7I2*!@ k ^E֯_4BYV0]Pe^3[t,\C\zb Rf)gu8K3+__WuuߗkC9TpG@ G@ʾ\MF w]$g5 ޅx4m0ճ^!l/RM_7 4 L@ZO_-U'NUILL9᜜]Z@Si<>̒QJ #65Yu{KVuҺ{keӸC=vRڐy5-7},@ P˧nvZ0I[ۂ21y;Nr+o-q&O m2h;,UioqUfUes[Y]Yd7M|fz7/ @i4۲eK(P;Cscx$Es݇xhBvD|-2:Ͻ)k]+j}SOiS]WmQW~A )LGW\9U=E q˶F ғ5zԉÇO QC^UſN>۴:t6YT6 @p h~g9~$s;N5.A 8CݚR(u* l[^](n*uNUӐy6dhWmԁ< @@֬Y3ߺu suqzꩧ; s+k1MPCO&1 Q<Zai&ʗ| @@'?[~} Kw-+U0;h +\>~Kk}Aʒxj!|UUІL>զ,.u %xɶm&Zɒ%u " M =EǸ O<1uYqt* 1:)lvoy1{ܔAy5 ZOl޼y47(_@zIt@&2 09'\\(" oo dA IڬvwzI/Ig'aޝzO9KU_]WU9uW}sߵCXbozg4`I(s$[o]Xzd%r6 9\D9b f m[iWHPt)_/y@ 0k_Q#S Ŏ nH0֦u dp9zV}mJ:izku-5˺L>괺I!@@4pi6mj\ڥLc%Bo$z`km&c 8s/h96 kVw%k.N.??~]~^*B @`+Wr)sO?Y=Qzk5п: F@׆~whra*kcxt۷oA$<@@oG28FWC!^cW~~% @2YmwI'e wQl8 ZN%${T|;wP;2mX΀+ᘎ_J+ tYTgl_oS@ h0Ҍ~c&,_Z<@]35C s6;N8F϶S'x77~6qtA2:ІtcݻwgS|h;6lBt:m8keD[,65c}}+w @[zZ~MѯYȄfnԼlh-+@0ٓy0>9nl*gzJ-ooii.]z.z:Xiݖ_- @гƍ3_1-iev5/=4/}^ 1<:2d5eLhA67P})GbS2}]^E}caXt/7B_-?wCշ.@@dWdo76c^Zv FM)#/2ҦjyXC}%MzԜ6sVYkOg1K ٖ/my_ L2I۳ ǘ:ԭBז@^렙;v`/ MlQ+gc(32 y;?tj2X|^߬| @ \z+7mڔ Jd{oaƿl1mızw~!^#W {nE@Pvn-r 2lkjʑ 9l@2,pj?/MKh6 @H=H?pa={!y4+qIfhɘAFۼyb"A4;.x3-{]rCT>_.?ߴC 6 hd_#25Ofek#"׵ 00أ:*cw֙Ԇ#Q@_J Pg`}ɒ?vˎeC 7=i_!grMn63t-9ZcSte<) @ЌY߰aC#h^+wFä2{/p~ dP!Kzk%f轱k+cK"fruqy@ PE@oSzcS\дgx~ E]1):IC0Rr &[nMѬs4; ,͟oٯ򖶩k @H µk6y_Fbć͆om6R i)=ܳ)1ݖuE CvH^XҮMq}&@  x׎QB{iۡo}E䘜@5 @BƄ=t'BZԷQA'sh13-Kf/ n{ իW3"c۞C+X2\C1I )7Xd׮]V4hrIJČqKEY|vRky;G @@;HWʛiUm :t(8_h0YӔP6ƀZ Xo(OXjvJc{~:S}`|ۺ "=Kk:W3K2N([vHAv'<@`E5RІr!0 J_j9qG\3-MCw @E|c_oCJ/p7.hVv27w߽s΅M6IL4Aq߾}y#,gP_=X!OyC2 ~f}2-j@2hAokBkTy&yZ@NSœ!Ӏe9!4%$rS@= @薀{3Y_|SMh/vO˾ @!mh#CON iߦiklsC@3}6T;}@ #M ~=3 ДިיhGI-G|;2dl@i8 W˚:lـm@.G)m閷TEaN@@hlUHmڧ3@ḩ"&,DI} K.Y 8"!GvۂֿL:)q@s ľ@:& l༡4~!ӿvB1yN^:u,Uoξ^펀fU~3@QEqBC'ڕ+Wٷ~wϚghF5rЀW\ˆ ԨhY$ nݺlWN>BsyϐC9AS! L~ST, zf!G'IC^B7(腐0q5Rmj† 50З'X) TN^ hY5ȷ'z7QԾ}L/_u]V6Dv ␌/- _Atɤc@TE!< C@{¿b )vvb:iGSC^#߱cǂ"FʠG7K~XBd- K G6tHkr(jY{ '3=7*ѯiF@iT.hPnh3.6nƍ C `[/-0`)ATNC@offy׽a L5`󭚒^xaU@EKަ5W FZwܹzꅵk2,^A&Mf6Ѭ=dqM(S|_y * "jʿf4o}1Ɛo5KFv%h*д4R ϴbs6ctG@膀~+d[4c_ @`J\M48gAgƤXI^QdxԬbbrXhUVe`. Ig3R'  0 }ߛ21 i_@%E]AL8hk's?hz i|LAg$;B fS_9u /}Wƽgc=nд׉Ǧfe_|řMȋ 27oޜGQ1zvޝP;|,/?@S  M.2Z^ke~9M28-s^({(2(艛oya˖- '|F!3A6@ e$p͚51u F@?eE$0R@ {3{=s nU̲ibkWf7'wرpI'e19ߟ2,Y1PPMu? p@9/) PsXU D {ߨ1cQd ~ruW,tM8JC)?׾רxR[_vʦѭ[.—0 В@';te\@3NȽMfr*@ke4XX5XѺ.[n] mB7p(ٜڵk;%' vʶ,@o:~6O蟀lyKo 3ҩsBN@zsỸXO3PRj9jJ5u^34@VTi- &@ 7Ha 'ya1A>9;@ N3ߢSSW 7=6y`z@:|l,;F 58j\Sv~<7nܘhl9 y^y"fS `: ќv̯< /~%v@`lwuׂ^rm_z\tE $tO@MٓKY-E Z@ =$TU:R(2͸4oç~WcǼ_^{"?Aռ^!}Р742fEA?4PQ޽{_}(P%@& #@I`+9VV)ceqMc~ޣMG@Z~)#?eա =M(e裏^86lؐsʀ݋D95tՁeq@)2d΂:l/ce:We7uxG!h]4395[_veϢ>Тda@ye$ f[BNkr׊+p@ڇ1V 0.ƔlrٌQT?f2tcj6쳟u\fҮ@!7f۶m _}Hȓ@@a@'255ڤCꟸχjվL3vޝ(,G{FGA@ @2,woIU*LǪthh$m ? nݚc~`),!K34r\OM=)'HCC92T @J;ҔtC@S$ AJQ_zh%`NC13&רw굂{l۾6 1kA_Vr&rC  M@3,m՞ޘvWF=:>պN `Kl_N56 Ԍ}ڕT:KN͎m:mU@ @oi  窫Zؾ}{jHiĻj- p_۷/[c/shR-#@ @: WssA4_a\8:䯙 UN˖-[Ќ9l&Elْt4_'-ZiAEћ.ӱ9=А#@Q: @ t M-ȎٶmXZ=v^/5kjES5@q/ MWwfĺF_@6 ^@ N`j]v٤7(1= sXn]4-^hs:o:M6-wq cAz+i`= @`_g5yu-\[ggFeoذvkugblE],:+Mk. @m?)mWW\qQ/I.+c8]}IB^~ fl޼9 дyb پdW=i`l @ nZiʹKKڅni,:D]8؆,T}_7hoZM3j#'` C!Ơ/={d{؛ @ @kIgxthk&qu?3^҂ x&@h[UG/ 9֯_E[" 1N]3CXE-0g @ Ж3e+ꙙ ^}bK}/o9{_Wi怌]6 y4YaK=x` 1gN @ PE@t`Ab nZ?x% W4sl&@Qk9V^y%-/PLaf30g@ Ֆ&lS]L̄Hqؗ2ƀ2T$P}yY/Z{{@Kx(J12g@Y># @/c_3`_ܗ2޽0*FQ#wtkDMв+Wfu苬`޴io4 :h9 @ K@2hyv 7ܰc|6pIRnÆ Eke#@3 {}w4y3C#7 @ 8Uvr~Z`bR @@(Z_NZ0ȴ־kͻ9rJueQ_ ^ΆM40oZlY6b Z^A @f|Z1NzCu]͖XSiog:/gzc6lE=cЗb''U)3 Ef@B@^2e3z]5vײB}dI`7ʠ@3^}`Ƭqއ.GdUՖ c3^c]C@ Y&c"3 @3keٙP^-_hkھ]vaժUsKiFeKY{lev[L@ 5@ ?=i h19sᯑt e@X_~\rhS?hK/GړloЗ9b{H?-#A @QY:O;cz%L_ƳhFػ2^5@Tm| 94(uZݟ3]ܡ@hTF2?Y2;_E\tݻw/Y&Jl94#`ŊUuUwY=jK_ K^T9Q̑7&3@(8@ h_#2:%W^ ' O$22ߟ}9u|*0K5i_q˖-&.IbvE J@H6/ÿUrZ?$WeKSjI@Ƥ9C| Ӕ%-Y{ح%}lv802 L o]ŜL8"JIFлz 鑟C akoВ:@$`6Q~k`I K@]RA/ u샡Ge+rl{л@{NYlpΝsy 2#cXp /@_#r.a/u[J9.N{l到Z20 9įTCeQfXd3J @gz b(e_z֕ѯW_֩׎ 1]6ߧZr2(jB訣ZX~}e8Ɛ`TNŁ@$*=| /}2n1+d.`=tA1:%%u}, UhO?tPԏFmHo C@ Ɍ}z G@[Q|8[c?p$FLJ!P-E#@q/+9&VZE T` -?C@A}H K@ύ2:axhz^kZԞ- LpXzuf|#`L[ƯfxgKlf~R 5+@s h ia)c7SY:cj0Gx5گgg&o#֯/xye0lSW-WY#Ԓc젍 FɥZ2⏟#owg @i}-cofSbr@^E9jZQtmdJf9jЌ E`l G/@H4/ =s 0cPM}hcWSmm-DAkVEpə\Slt; @oR">iI2,HSD@ Hucj˳hMҗmjqT27Q?؃+,9,SB'gzS fU}-Qk5sn4+8"Q=趌9q $ֶBki0M?K1bɍ`z}^~|س|mY+ L@pثA}@v#kŊY4gdG;DiU2b׭[EUY 7մџv]s83 FR5!|8իW/Y21(իЌB{,)FV,Nd@o "c)N6#ѲUEFSety r}] e]9b _qÆ tPHI?_R#?3n@ qϢϑ(f!s%H88e8Ձ' FG2 <%:Prhp'ZR0+9wNhΜ$A`΂XGn@ 2}ch>UJNڴ~=c$@hǍjÂF35AQt~2P[0}4AA3o0ce*' p/2c[bzs~)~FqZ՗`S ^1(6Ybo*@!۞kez,瓜rU,ʗq@ U4bY 8B -c_F;t )5c6 =I4]Z{zS(9b\Qr&{XNu"@@SٓlXk9BtYŒ~[%@pQ —a, f:dD{͌f UVeQ}Nc:!o}?Xa`#B fA_Y_dO ?볐yF@l=!P(f!hW2Z!v;n~)tuBft?7c)PfR|jƽ"C^t S!H?Sy {gBHƢ?+@FAAFf(*xlsۊ+qL?K?ȰL:|ǀ:ܤ;$Q嫌">>@gou("`,[H@?2~5Ҁ"ťիzecEG@ ` ү!Xēc]Y竜 :P'*ӕ>ccYMҲf|ug[}c}J@8sE7}4pIr!ß!Y9El~l4|r{(hY^ ,#C:)5A0d/:?r ;+u&k?@2m!KfXUBQ{(?xu,AGO ұ}@`dﯥ|/M^@H?҆ݩ)f4`>rzg ^ 6 ]mV @hG ?OsO<% ޾K^r~huޤPl9:ldBiEJCA )'_.5h.>6n,e3@xWK#֯_ )h'm\y[?tH Ii3Z]DG,(j7~ h$ CYgBc@ҕ{lI@x~"LĆ@pt #Uw,jҔznQQAhOƱE}/4bŊY4r Jy@2:  7'jc@Lp[;\GEk]`NK}?k) " fX{~څ@|pg0ZE?htAS Ci(m@ӏ##=A 68b ɋ EM 91`LlY!?S@cw7 @ iƾ~OJ }PN㠕he˖ehd15ڵkM7?Ju= @͞3c_i`oFsզjf! ]Å@@R;go T ! BPC@:#)`L6J}ԓrvsľd"M #ssh+Uw֫R%_>'hʀ"Le %瀥-Y1`!֟b%`NjQc=?hG@;n\5~Pp32B e?,6V7W4]ৱ/C4@`F+2y.MH:45uMGGƲ[{&0AfG\2R=s sz Noo+oߝ[G @`L8ƤOەDDB;m`X&fGs1KՃ9lM}Q%@ oFJ-}h$H!0TO~#/sC}V[&Cs3MoEEF}Y:-2h @b. ?ځtDrs*>Sw {f hI,_< w}W^Mٗ,1~Őv F4H-Jo%tTKrKO駘_R 4[9`y= %L?6bNm˃ I@t{nύ z& 6#TSE^9ϛg1^z}YW&9 PZ$_!4 woyE"* 0?3 #\@I` w1엵CIlbٲeY,IN!$1@#%ߘfwi" LNR*! #ZQ )PZc /_^(;ʇ[B@?gF2)0 HKRm#`N%z8q+ )H/{L.9|-/Ye8{}W_ @ D8Bd:L(@vQIЯ4[=cuf3R9 d(ՈbX."/!o~_§A@pQkȃI݇0gAEwf8Me˾c~ M7V?Weʎ3 M@vаiP;rq3?77]*/_怱rEz+;^T @C04qkDF( 0%eEe딑\@A!4ǁ/K|yM5|Oˮː L@ʽnz`zhODUԀ""簾H~CmzMY33 @pT3`NyDJ@C 9ce ʖsMq@ Д(?8A@`._V4<.+g sG|QPvxY= @!b   xhƳ}4|g;g(WjA-y.+gg]!@  xeA#`tȱvrMϺg]g,5d:ykluL @rMQA5z+1KuQQ_vuR @ <Ρi3@ Q"^p2ND@ B8 p0$8Be~! @*SQg!* @ ,v Ft2m@ AipQxN8 @l `$H!@ '=;@LF @j&:3UpDQ @ ЈF(<cPM@ @ 58R`3 ă @hE@+l\L@ʽn @`pLќtB @p pp' MC=@ !2mM' `Q @ 8i `?8&N{ @C0eژR @ 0q8&~Ģ>Xz* 9F? @R)9[R" _B $ao80 @s0 l @7Sr! AfK@#pgq`PJ[zD#0rLypԅ @ }:)9}XRqpK!@@zlNL2F8gH  @@+hߋo>cff5 @(!h_WObg 0;'Ap$ة@HfyJKԝ{)WL@Ƚl8S4 @s=ǵA]"  MQuB \4TC}}q`=VuXecStLeS$@&M@%cg>,Lc뗹񍳹+h{ѱhBP@ \vg$\j tGvW!l}}I΢EdžЩ]ci DA()dRKܛrz@I?2"wR7 @ Yx7Ɯ}.*St ^g|??dL;Rt?_' :(@&A@݌ j+^_h`1ue%odžm @4[R"ꛤ<4)l2AX%/O#ƾ|U}~,Y-:?g@ { 7bW:|CyBZdY U16Ld}}m߯m\@ 3S"9nt$" ?_ŢcӕҾwyq @IwH[ST ( D!i穳I~xv퐲fQ1e @&Onr6e `]omb >h$8wцvl%@&Ic)j`>bMY'ߠ3#o֎vmcLJlL. Qѕ@ -o|4Zg;fΩ2$xU uj YK.,! ڂ @AHr_uO}Nu!\edz Wu۟UX*S\uL]ՅA9@ ;6S.ɐ`乹?ɞCV0ޢb?6oT:d.jdh{]Ӻ#@&AN[S4ibKI |(2ꊎ寛ٮ/jou13a`n7ˮu@ DI47S:y+_A 45VGuYWS^jbk:F Yt8@#i)`Q߷PNw>FF`}}.$a9/'D6H658i @Qxkk'&pv;O3I'`FZ[MzmCum{ԵM[mö ͟ @z%>Yp,*r-6T+ke C(kc&,cWv2z0A $M7Ikdn^oZ3(V: &F{]}L_mY) @$|= Mq,v]zT:7U=e ctcYEek0= @Q{v$?S?u?@ި3cmۭ^2kVovMײ4 @Ax>d !&SK6_F[9ЦlB2Mv 35@ OУ s,C^Ј *WU7)oeѦ~Ij25NY׮F2VgSYުv9@ 0*}׸jbT1o|ɟ-{'3p볭6Lױ>SK/ @uhPI:9povȒ&J=oYizή/ckװHB |F `\zv^@i[MnP>.:f3V].@ ^ls#t7 @Cuq$5y1͸&PfIm\kc]cŔV:ߗnYv^iQ:_t @#u7@s|%ϾgT j[B"PpгvY̪'sc_ 3 @ߺz~׍n@6wl@Xv݀P+1+Η1 J`c!@ vg_;gI;ᗻx[iH o (f(rc}8KߪaeusJdΗq@ ` v{pDpwNݩxkI@ Κ F;?|]kuyzA:!@@ڟkzm%q?ϝ~fT̸,2`۞ TUꀀTE @k9|i@E_9'7\( 71AO>v k @ 2|d4I5:'\:(3C1yڵsU @@p.t=;,@pӞwQJF$P׀k*WVu~HME8@ sF/p?5@MP*lK@@aXG3͗zg˷QH\U}cRުΏ6!@jGW%?X428 %sQ;LF [Ue떫UTB˶b& @A['O8@-:9r=ŋZ\%=0MiQE8 T䬽ڪΗ]Wt˺ @ Zy3yXb K_қ/=5_9X4%3v0kvɯX=.ӕ @ӵs?{K 7 9:9nwwQ 6$0A,ŴCʓa]od`e]Er  @s7??Ws2tNoj^"Pr3抮s]ExeM4)b# @s?0's˝S.ByA)X.tXrK鼡I]M5e!Ezs  B#N8Ww!HU󒗼3 IDAT<.:F臀}hV$~km߮U= c5VpZ@ Js*KRf4U]9uKS *OʴiWX}V8@z!}S//U.Ey03Cqt)פ.+kΓ֭)2e@&F@3NLe @O@Ȼ:묳]z)u|ïfu^eSXUkrU|ui2 @p%~,I0`.|E/+T?S]u1tMȓB&|W Cwڄ @azqM.6@i !cP!G,mXBX"' @H}NLg_N9>OO_wM~E-Ђ@IV_ߣ֎d-Y:-:fl禪wl $A@'?s&"%0pg9'5gNݱl`]lNZfeuE]cф\皾af2Tru @G;$# r`^ ^Mg}.tP@_ǬjNTDv8@ N關%G0(f {ic.E!t@@^#&Rپ7ѱ/ $N~\w43F+/|E <ŧ,$ѳF\2j/gNYpMƠ;2B | ' :A"c~0 zs׉}kZ^ȃ'j0aznocuwϷC 1 h]|3SڮO@}Vt9g8!~wxx/3Q`fK1K.5>Mlso{]( @!ON7:D8"g?ٙs[']|+#RaQ͐ڠW]7cG;mns]k9Bg @3\νcؗfT )Yz֝.ݝs dGmkozmV6r< @_\|2=(63"ىsw]n_:s]U\&tϷZmQm+ @@:OgMN% ts\xr'V/*إa6iwk$Sm5MY@ 9{rm%r]#{|?|_.Gd0#Ҙ $;h`>hl뚶Cy@  pGDfl@@X1}3]'G#S..&'fqXY]|]VDYmo{K @"&^A@XO;GNuQ]L"XS@o֝mܶ5c;FGj@ 0CgEQp7OT;w8.78 |j+_皦UoU*;yl{}16 @6{~F&``c5?]\pZ#Gf"am3c]oZjB І~u018&O{2G7O:mF@tYF3*oR꺺lgV.h۶ӾNyZ@ 3>\ 3o-;O~P;|shFϸk.>(ofl}eGqs m[:gu\@R#oN\G>RS}МYRW,:Q.u/AI}mj`l[G {_n뻐tԯ< @_r4g܈:@>_v~.zK]<`ku}umvbydyG!ɒ @ G@2ȝ#28 ͥECo2z:k8 @Z]1?XS hE@+l\'>GxK_p .X  dVy_nxݺ.׵L]Eƭ˺NR@ Ђ^ۭ]<ݟ ;GAGA|`֭rfţ],Fo@7h{}.k nU{&U:S 8.~C@K89'{euQb/+C^ Xu]绖 @ vtgmκpD[߿]/.լWx3vizm Ԭ̗%ź'_yL%k !@@ 29gQ"qqSO=lWl8֥+?T!։`u~ޥB62f:fɘ9Ե>}kr]C @Yo\  '=C@0]1A_}ūJ Op`F<zzf}G:}oZEz: @~Egٟ}K| ^}ots\3?řAߟ/2} N.Q&[W݆_) @<􆬿sQFYwʸ]5QkE౏}kUm۶E9~ŕ.9CR7 D6e}\_!09l$ @`9-E_>p$F( 1yw[kYҗ(g\| ץGK(30ǚ %d@A~~蠇|YB @CkL}ųO!-M=@زe˕!vرܥsvC9cLޕ/i䱴ؠ}YB @]NZ/˧vڶ*H@s8pŸp7?#.Bٷc/i(TJ0 @abm0-U~6 h]gѯ PA@ NOƍq>w^m/uQNm,8z ^?ߥ`zl˺|9-o]K] tN@e]y{ؼsT88 6*_ݷo^-h+:iJ|[ercȉ y(3ټo"/_jOuu}Pqp^/hNuoZ}.)@ J@Sy wB-䊖hC"vڻ<'?;enFy|ۺ $vZ墌3O$B L@hXzN+zu\|^L4Pdw1[WڰT_< @Qe.uQk; "jժ.KC=%C߻q1 tKv Ku('@h s].%@#0"|.+W^W wqN@@u_䢍;"!08&(e˖_{$X1ԾQcY!@#{f|cH$%@`ŊW;=?)}>]"9uS!@f}hyx;_-4D"%ʼnqm@\4: T(Rh;!@` nwJ.٬8:B`pL9Imw;YC F @'pk_GGYZB  ^@@`͚5]st5o>m$ǹ| t2 P|1lZS {??H Mi#Xnnc&-ܲeY@ :NK\g{ 009F`w8x{ьuw ()+@ }׺(Cۋoۯsy J8*Q#qW.ƿ0vS@KjeH!@脀_uR;@$`ݎhG3cVΝ;L~ c,! PIFW7My  %A`6oެz}bo߮%qџ-$ @$7\co}i@k@`h8&N{-[h7޸}w%R!)w}^J"$ NCdJOdŘqk .j/mfTu勎e7)j]A#-;bo\}x8+j4Ys[ d  А8 Niŭe_xkܹA0#e9L]<¨w7I f*! ֺN?;R׬vgYK*?y!g|cc)+j4Kh}rc%sfs:7~7X@`$8FO%}vYL-m{޿nȺԮG[v55Xڿ]#Khqho_uvL 0wA("p9hS{9wgG4 fYUymTՕ Ɏ,mf]SV5Ջw?Qƾ8[W:^.FOw7AN DN@|+_ў r d :sGe;㖖)Wq5=N]b)Py{v(1oʾ&@lT PEଳZ Z+|(_tLNj>[rv5`_1T^cr^vW~Wn< @"* /v g8C&s*Pyc-Yeʎ:WvMqjW{cUj̻sG/!@:'sT@U~+kJTAJp:9 㺰\53j-ە혥\VF5~~I@@p @p㰃bqVȜ ޱNkWv\5=N]Gׁ;:2%ƺGexK  d HkQ  WWG9ќ Jf?c{hW}޹ZKǿ]s;W+kרPݹs[SO=3<3^|"_~]^| ȗ^zi@??-[m~ק~zG`!?@7 $0<yȼ0y)~KV"$@=@9瞛iӦ7oON<֭[OXA.Ǝ;ʗ 5{j#fQ2r!K-ɮyߧi"8x≹7Znׯfd+[w2p3߰0tG+ݶ! I@f1f1l~fEz ',V܂R)Nյ[@~ʕ+]v;loKVa0BxѬ'&Mxڴiw>̛7}J h%'o  oZlq LnYanՈas>Qmڠ'[g߶dɒJ>.k֬g{6ܛ8vu׍F wtA7]N8{ҪU>hѢz4|_ދӳ=c/ۣ̍f)ܾ{sU{zVS/^i۷grO}x&1eaxǓq~'OtiVKF+,o}_Эgtc~cNJ+}{%jjg ?dqo.]k;ٛc߿1cƌdu繱xc@˗/OWCO6jc_02z|3y)[vcZ{mao%sn05E 2/ԭ ی25\s[^OO0S|;}GgYgΜ|O C׈V#f]n6.oSӧ_`567FO[[WEX Dάg%G_k8+`>gہέ*k̚5a js^5YZvY?v pg퇾e٣g\ ܹsS3)3>-m\`뮻PB[ ?^*;619s' +[*dZjDp;m}=km/ݞ 4?@\ o/XѬΟ?ڥ? 2oYG'xbcVo55 pVpwQr,vv ;8rcE5ͻph/W `,XqwzH`W^y%JFioOUdty 7hˌ% 🬷rK{ϐ3UW].]F~m88[ݹYn_ {XoF*TIZλOMJr)~ p>pm%ۂ"fdm{W\~ze;c38a;׀k`}ƍ7ޘ|[qt_R2o.OW\FHX<Ƕ_h^fy ޾sd^x;yJ<@>Kwg6%(gdt蛘0}dNXeC?/';H18 NJ ;썤̾=

V*0z>_>JォvL@`4..@e]MX v>3|UVIÕy1; qpa?ʯMx50;(hѢtU ?Q+<%3qm I`aÆ *T] be~,w&x oǺ0|EO+BC_j!Wb̙WM/_^Џ}(Js U vd_ }W;s-@C'!fV【' 7LcOX,te5!E-z M@L{Vt ,f!o?A53xV^K/h^nVA.78ӦMKLȀ2y",u!Ю;@/k L5E`/H0"yp%;(s^" LKGmo ^`~3EƆ̪_vBt3~`a"  yʁԇ |wk=hďM']&Ϊ*οy,7qs! o?XbQ'%վrFf?]o+0hX|x@&1eʔCZr\ E^Oj]3_y,[,~|]_ Po:-V @ceX~=|PPOģXB+~CDA" BCK?5Z0\ؑu5B1guЇU` (UP%igl'B;H]Nzʪ/bdB2DLH'p0eY^}u-,J] WzB*,a@'4`sSW'\cTKK S~$yi6TOt tJf?7iPɂ\ o7_W} \hVZ%ʴ6<5 {+hk_XUUm\si,n}WiE+`LU&NO&Oier*6Os ԩ?f'Լao?J ~y7|bڸäZ x,a\G eZ8,bŷ%_ve'*-2x㍧?:%Hݮ%CfѸWyCPa*k z~X߆TX#+Dx[GIu#Xft (M2,Fzk. ix~cĎ xgW4^7nܸ?lw}1T 8-k JOG*]3gyfNKŘp"k /*V*3e9{DuE PX2k\J\HS$e.za<,|*'Ϝ9sAXbEfsX ,8 sfpO2ƙGzZ"*T0Amxq{S00iyq(=z5PF ^;l?I#ج=?GAJX,` 2@eC} +GJ<\4~Ν 9LQ,lnE]8p]v\C55xɾ-0|БWG`?iyԆT{.]yWxϚ5+yeK?yV5O A&Na͛7``! B@&QVe0pZ4<r*K׀49̃:˲i+x?`|ٶX N*dlXٱ$[Oh p8WY Jm)YtՕ k@s=c#J7~D &o@k׮DA#dHs.:Hꥁ_eȏ]ü0ؿ7t['U]%=<5|NnݺwjڊMKD4ą YnÆ ʝg)dJ b`@ !<` q_JlU.{)S$ĉrq[lI^:d^+J`uF{M>igZYi1;J`c,PWYiaٸw94 'O]5fjs@؊Ltاg9d_n _!kˀ=7K[|0lphywvr + !Lf͚tʻ*yX%<ӷ, 4*sVaZVXe]^4Cm_>ײPPbͩǻ &xzE_@ywi="Cѯ_FzKfzb^=CI!k!SNM`_ԃD긨NerGFX*7E YY+:q sc$,m4ꍅ}+9jj%&/0` GcϞq`9퍰 ,^:,{nc1y9>ҥK.eێJ49`x!rl^q*Cӎ^l-\欶meIE%ٺUʷM8,LفDA9<s tSl]-s8~RTf\Ʋe˒tʵ4xx?RV^<Ԑ h;hЋ/w](P&~eUVm%*A:EXlX e1]mrԇ   4ih|c5;.>D\  VH6#ڦS2@uЭ fi]|yxuzŏSL~ * @Ekh!,e9JJ)`-s `0zu7`Zl;2ų%L-mT|m9EȀG[xYHe 0X0+u;,|EW81G)lj~(ixL{7T\H(U <S^.@Ru׎7UG+ ni+P 8 g[cs@pB!q A҉A] SPΘ5r{{@YTy׮qmkhn/pyX ڳ`#A=+^I#J{6'927:0 @!@V|ʳʳ)@^@0)Pdȉ1a%R ;Y> \.=z_V (CDE A=<7%mP8,OB8&nvbFRPXRi’;”Bm% gЇ:)ۃ˒(5`f <߅qcEHȤIDZbRP5^Fy[iXQV_zt!Ln8l7z@=#&1P]k"l=g8vj;4ŀ9@ LX9`CUHU'haS^@$G)b^@5&( W\4 IU8E &}\~ѡK4$ NJ.:}N5jwC8Mx1 VaQڡH)@Ht$mvO׭RNךP<ϻyC4ti8d9eTOc%OdA@"|rj?+=8ug˅uIeq t\;:ď%!-C1qQ0Oa$]Nfe^nXV] 8po"Γyyq]Ya'k^= f1Mnv 5 8pGD &HN5,'MtEU+[﴿4PU`U7t@7f)iIU۔&zcI*l'ugoZk6\jЧϟl;U`u6Ӽe{P^ I3J䨺YmKNTpYgmdJglr^q@;5`s='UDp*a:1Nò*0? ڔ +=ʺt tJ:ujOPU".̬H_p1/UX]Kray:Ə~?_e0Yj?Y&--~1\VasSN9+3fxo+t\X} VSѬpVKSZ( >,a@'50w܋9眅Ys}c9R[ZD]qA`ӤI ><h|K_ WH3?f'xn'pO 0/ʅiEê'WM/hU| ƾan9\UP۾կ~GnH~YՋ˫/eɼq^Vimڥ>Ə}?OUm?j7$?LN 4kqqFZ0îvj@3A|qҥK`Q-ȥLBo 5kJ\h+K8Yq]⡏˨|؆]uk۾x= W%m-YdǸ3 ꤵ sS$9_s'^wugyE:w)!@I;G5pd_+frzhjaV. aɇ\^Xyȴ0m(O2G}t +^ٳGWeA}%9w3+`g}d9 g%k/{K)KË H9@G[iA ePOpOS5L&Lh̛7ʲx9V&+4XCqEI3Ǡ9d!@~Eu'O NW.]yh^3Z"LpxDƾ;xLC녃4<"PPR]h΢ 6n>j,k9֯_WP^K@z<1(n9ơ'Y!d-b.=v!{y9{BaKXwYBx"$.+LȂ4ʓ 0ھQX>%  O3|EY`Al:eFtz'G:y S+Bb5:k,n29/?>S'c ȏs@ !p<e"D(jRmک0{{f _8rJ~#Eej' p$ f̦(K]s ;=[NE ڞWÙz< c{!= wnjwH=yW8˗/oX" ymTk0`K?;waˁ:(#ˡpO}Ȁo4ukB\nHsiVbX!@{-&=J8lpmEMHa"tz zPY>D-v0yVHj (][Ȁ}p3dVDyҭDSZ`}_%Q[FTjS#عPs8U== ŰR eBa*n8"NiZ4S 9VV[oL}^1P%ʇ'7D.&H@d= a9'o i:)r(Cy1=a:pNO:1:[MYT()~ԩəh Ѧ X)z[,.:ad3+ի}K3]ktЧ9`!hU: Me!4>pU "/+~ Jd<9V{`PzD7& FҙD"UV@&Y""` KiY^CO$V8* z+cku>bz|`a47Hd@[iMnu(Gy<7զUI 4b <룕\OdLea4ؐKD" $"dTsVIIL@Lz{v^iEqC؀:kuޞ" 1F]oxZso@/I!p/013I!֥, S )p= rO幧چwoy` Mz)\dI;:R6ӎz55~Eܻ^*\oZ_*N;1ɦ'ՅqX D%g7zΚ4NC xR90QLLIl#qR_:kT_ҋt% ~8;5α؏@*O U\_tHx\a q V1$p¥:…4PHM)XH CNS\aɴbVLtz^N5"@"`-f@R+S-Ptc? 8pϜjP7 8tEީk74P޹)ģ@ilV!ݸ:?ֽ>BLu\AʶQ:5Se;j|7 pVܷ]_OC}n& pA}Q{f<5 ?:~َZ-Nvڸ:qIR>,<.gU:+6U:!´0V&WI؅my5A Uq|O{U:ZG@ xvU:aXm(M2,G%UϥkK^[iADC lkg0S^vF\ܶ]j_ ~CGUGӤ/-L3J ݩN,6<Šmy5! |VULtw_M|je`+:JԘG=s}5K+DCͭ hHpT/Mfmu5o24/QNaɬ4SZTydזj{hho:o4vhqxZieV/hQ?'hz-@K~MB)\T'n^mI\5j\uU|->q*q˰-)- JH0Qطh]M_pMe66 Ns_`0LX`@*mJӊUV.]-h 3ζZt w'b |n/R |vPjNW$N N +)M<''@'-[4!M.N#.2H:X ,+^|m'Vs^ܹs9$~ɒ%M~"l1ڎNz9]OS.yi'd4Iz¼˻ϚT8CªoA[O}jL=z\vm[w zYN|w|l6k@0r]IENDB`ic09PNG  IHDRx pHYs  @IDATx ]Gy,YŲvk7xƬIXCIc !L} tNӝItH2Y{ c'W$[e˒,K%Y%RRwyzUWUdB@B`luWB@! @x @ox̅ O\ni>z)켧~z;{vܹO}r޼yn2>b1ufy'-!X!3DzvCԜC8kIf]h{T]pS:)fO} B^`Djsy9Gܹu%|Ǚ= h'05ӐC?g<OT@2A4?fN8aI'w…{/^B8 p:d2B@TGz1) #v1 ;_{&W _nd'ք1~fCV a#s ?+pMP ޣ~Š\ә8]8C?#< , Q턅>b!}ȈÃ'|UV82{Ь4C@ OO>bx=zkMjBxefO1 &TO@Pa-Z~\p[cᵧ9" q! YFAaYA9x,X˴ ;W\vY/dL! 0S{;z̄Gy\oY&O3"_hB} -B v\.q%ABBf\c]#-]kWE@``5b00gؗ`X#faAbG̢MAU+J P,%m6ѭ>x&/4~ 3̮5,p7=B^FAɁF}K, Yw)]0}r?hkWp}իW{Cg/#@9W`im> 96=e_7P)Z4d3\uU/6l=M&N=CȇOfgj!0!1IݻӺY'vRW?O?:!i)vl%}ZiBY"{QzPۇ&=! GPSLqY;;Ft$PПkm?؆*ӫlmb`QsNFB ;$MY|ۖ?kd]wޟ/P_f͚_fE%&9A#jfߛۣ)`ؑt$l36i 7S h&_f_%۱S0[oI>1X~P5DZ0i6 >iD/myw^?wN]gHڻ(1woeU5T BpеLh\FWf$~Yf>@#`L{~Ң~vNĎ7vy晃C+qeU !όˣCr0)o5`b0D;ldEe=3Gcٝ/#h 4E!>JVio6#<%؍4W%>W.8 }7KmSo0s=C-AG`D}h$sLgת>bHi#k./_ܝO!T)}49}ʈnj>H4I`tK6{?s9g8?t$H8bܾ8BdOF`f>S[&|[4-/kjU%hy睃M6 ch6x4bm/FKjL+  {zL1ذaP37ԨB@L<xC2QCO&9[]#hT L50,ߘp#9gB@L+ݔ!@3s^t̾#pc/p#% c8x6uYÙ>.2B@!=d7vmly#m|4YMGS.yߥ^:3B@͂;cp뭷 09kl΋*`vvv .`pe xB@TC馛_3VJ\&Svڞ>я~~i*a* >l٬tG_xz9OoF)@OCou}[xH??1v ךScjbQ*=s=w(/#"`m6ظqc'/2-.{f{NKLlmGwXۿKeB}xZ-[zm߶ |0nD/pk իW^ geB{{챡F怗eloN:U:S3qLOI FVy+W\yC0! ^2}mxꩧZi-<`ϴRaJ&o}6o5lC^!  8:OOC@_(.F47mD}`hb;jm\t|=z=oh|! @3~[n,lt״o2pG3=J_j :'L%K ?G$E>! $#|+ 7ŋE]w.Ӄ}_~{lɭ0pC-0|pNoD/yի^4B@>wӦMƚ5kozӛK $B@!gn RD%g;"6}/OO_lk07:t(_R#a^6}ww$B@ݻwO~2gdF\a$i(a矵MyJ> +X:WN?=ݫhLͱ'w,N ݻ_T+_8!3@ràzYNtj:#O޵k}L-ETB@L65˼xĴ?%:nyv -[V(B@!{^gƕ D OGWg W-KB@BK/\~壒C0 &'Å*Nh<{ŷZn1/Byk/x  Yf?*mSqȻlٲn^W6lPB@!P^7yty^6A$; U_VX??d;R8 WNB@! R!T.6V.bV G]Vl0A/#B+x&D@6-@=Bƴ\Sy)^T/6! \r%or3 G^Y yW*nW+u cB@!WU{w.m`e@KTB8)#B/,X`2ꫯ0nۚz/yʳǼhѢFPB@! "vW5@;~\m&Vu]g۷2 Ae ! %Kv>k_)? pĴ)ct^{tGM֭kY*R! @}8Jea׍y[X_yǪx_ռ!B@ASO%|Iǒ_aД өb/**B@BUڪ2.X8N7BB@ U}G#DX.Ǫj[Yi c+3СC{$+j 6UU#K B@! @n96N ]Ri<"tB@!ԪŸ̓,swaZ%'tRe l߾}pYguB@!<x?\Y!3>&Z% bdXhdB@t;qxO^?$K `_6&T ! &,'=VzaP/ H@JŮ?*K! AU7ߜTt"Ƴ!=)ߍ̍d%_\Zby+\! f dG)?(rBn}DW/gSaw, |Ƀe˖%]nUB`4я#~ B&nst+krp/yQpFZQ)N! ™s,7!]wi fÙ9705*Ԇ2@B궪`ۇ:!lhi)hf~&{Ma?uM4ŸS|/^zRAP7aN-Z$"*S!,"8xm7N޲75@?&4$20o޼aB@@k}Eza֏ \! f T1hڇY0K9W63y^֓e`Xݻwhy8S PdR 2i%@@#˸'ڳu֡<#nMi fΧ})a[-ڀxVF#a~r%EU:! @`Be>4&Ϣ  7Z|"@>d dBNh#@{;({&ZR6!wڕ-cjẃ+W| !TB0`!@h dzYpE|x! @0nvG"i󬛩"Lǘ-3'@CK- !<9`SP3ДK14ep1_G ]w2ơ(_횄|3AF$efy)8{(&$ B+_\gǺu!!2B@L| @75h=K3vb;OWu܈Cd]a @U^Xڝ<'UFv~,{0 eUZ!;ige!0sOf*!Ep4P&DڄN84b B)@!@wޅMmgϞmLkf E8ci `]= yNhsx>!!ϩm2t 0^w!n/g۱Nh$ޛ&%*ŋڀ: AB u m}5k HAy! ! }ݗ\k%:w]ygPw,,G1MB;'p[ٲn AN'[!un'Mn&'aUm-uVXB`HA#C, =-Nrf]>"N!PyojUmfΐܺutpT6xuե/W 2C6D~HyS@Q!̦!TR}#d A2Otm+|eld]4X) y ,cYwv ;?N 8>cx`Xֶ9z:t?8InI,w@BIfhu0,%|#q2@}QiؑH,8AkQ??q|L"5AM "0\@# ].0`Φu>B~gN br^~OOnVɋ2g,7+pXxa~4Euΐ#o2Ӂ@ hMFh@BB.@RR;\@njmŠbbaZg p܀c:OK00yPuB$T9hxF}.FYCx=$z>fiHxaƎdd֏M~flz7TQB`J>Έ$b/%@3ڔjN3sb஫%f/醀c&iQGE: |?)3_`O8!L#$W5@B\gȩ N$fqp FnuABb)#&6thyƄ?}UE@ !gD8B~' `5ɺ eAHbm(EHpͳG]YO" iMX%:N>:18A4U;"| g}r@yg?uWC@`B%-%Ek{ B#]K1a2KY:wzR#ϤK܄G@=dD=ӁfI1uc Ip[8!A{dPwqi Ϙ ww]M0BO$'sLQ=sػ AKc:s8x!!ޮ  }g;~ ]xB`H|2#{ A;s\c°Q0+"dY)ߧ{n(C|jW*!0$w &"Am8_<ḡy~ɞ% E IC0]',EC7ó .= q} F@ E!Yf0oz?D$^2B0@ X 0w°O_~t^\! # PB)AP%z\Hu],rM8݄]?+hnB@t@b3q*܇<8I߯_{:wxǛε~yB@*TAmD #ő:>S ~Yօ*Ed6 /s]%-y0)#;"j"Y%[OCMj+B`3{]nDr+B@E@,bcҋ('Z  ! B@ 1"r ! " P|"9(X! z@n6Fٽ wi*P 7B@TE@*r9DrQB@ 6s/Uכi@5\r !0"7'W]uՓv{[) P II NG8\eT0.,{T0B@YAlmv0mvT4yy=HQm ~Ci<+ @B@ 61o:E]qm0BqYq?.M^:yu^5珯=\!  prʕo``xslm/Q^n.ӆ:yq8]XB@iBSO|OmKDgyϺuk R 0M/.u7aqں^.nX4!2 !0,\}k@n|xpM77X\:x3Ozsΰ[sv6} ԡ=}~*6!  ؆l=x'O=믿瞓2OoڵkעCdhp禇3ә:qYׄ5DYeaqya}R:! $ 3 <8xiܲ__ #yxnhU__~4 >- [ۋ_{=qxqiʶU酀}CpDז/?0m'''2f~_җ_$I}B B?ikϗڍ뉯#Mta`٬ZƄacH8O|MEJ״!/, qu-3[{|V_>6FpD [%[lg _*f޽{a`ǎU"nՑ*yyay^.izx|_ B@L /v8UEJ*0M6ݰa̛7]PKB)+܍py"nV޼I.+,._B@>!`uC_Ypm۶W֢aid0f ˪[aB@>!yK^2/uW oTnε}g +$.Y +,AΝ[M 𲗽lh1 ̙3g(X Mk< m'a0 =}ء0/SyqUڤZ_kP^W-L֖v{aPeI'4xы^7 5nf^[ڗ͊Uv^\! @W}+oxgťepBl$bWV4q8ЯC?tAMemĹ.i퇷NQeaz!8B@6`<:s_~`…U#l܄9qϾKw9IWp/s!)S_&X*ME򚓗?/}V?xqܨQqq9\U„M#fs'g݉'88묳#F2__"/g$jzlYs ' /_^6ps 7 !x\ ˫LQee^6./)W!~.,]ZXuMt`Kꓮ ƴ5k9nQ XP@<_n[T:iQ5/./2Syyz ! @ ~WXQիWW18\~+5DERhTmG \sds *&/./2<ݰ\²=MVnB@6nfu K e%֖!+N2h m[(kӨp҄epMzL> ,deW5|fEaB@0G3OaUU^ 1LѦqeXΠ_UU -e;]0"ԙq°Lx4uiG^w7lB@`I]ׯO^G`&07Uq`G![U [sJR*|pe4 U%Ơ B@Z"~c_Yi]Yqi%ӸkO;.+lK=N7CFU$Vq^Fh_ߵkW' =x@j5\z`|a۳EӑlڢI6 B@>؇m󲻪oϫU8-k@IDATv|Qdx^ `y`a| K.B1 Y$ yHWuM"=M2ڧ0! ]臟2ʳN܅i (2$y8*N6 8p`h!(_O_5.Z^)^4;v,i+*\TU `#Tcu{;\!zC߉k HG%zf<G:σL~B`v`ldٲeq1Ww 78㌣:e5 %q$|n81p2qe\/ݲy=˔AZl9J/"8F>vc'I;hz_UO9=Pqގ:nT8 EΦTq`;8p@LYiS^oKʲڪ0! &&?ƿI5LbW{hwiZ'tGγkGȪetc#X P GZUiY=\:e+‘/!|.w {R4T&ت0CP2tX.X+ 4qXqq^v._B@<;C[O]UdwNef@GlÇɠ`s$B,! PӋ|G9qpϞ=k6!;Yϯc)C؇7BK^^hO !:]s~! ;rX=yB|0/ #>wݯ.{֐`;+al:M5 .Uh*$V0w'UNkFH cַS{,XVVM7ݔdAݶx y°R,jH,.pfO4EO`un(bvpgPe%?)~t6euAd,)AA/_>,;ET8?vg"Q!CXLB9yZX֭[;w z fN|vX!*@@BeB]Lޅ=gSv{Mm I}ZvJ"P`) G7o>ŸE!bm VP9lZB͞Iy0׏B\{)5I[#˯{ 0bPWI}3bd d#Y7Y2B1RBusz`,BdCxK=hR7n8ܔ\܋ aNTH/@K3YԷdɒ)ܻAH3Sx>]|̄0<)ȴ[ou.N,g9@BvVYqszdAA\2%]ou {iq}֏ ÒŸ}7!ۖg6 `B.q>IS#\?P7<xYiKX N|jz&n47dgrbzef@up"1qx/ćy~tnB?aOl0,o\!P#8&?7o#?0 `94f rXʇ @> NH&#B``|fg|nb"Ш'a^5{8kPAPcy8ĺ, ,$#h}P a ! 1A./F*Z9P}ݍ7ϯݘ#G>,pY{`~ʕC;cPV  PF! c%0> 38$nD)nIe]m vZ>e~Ud ː6 ! >ZZ]Cli߆ٺukO 7eFu$6<\ U@ grh* B@L+y}`M;PFھO MmcE"adRh).!00.RgMqYv_ m2Z߾q\;I26BFY Ș =5S`YwmlB@tZV=B;n! *!t5$5>Q,,'Cp@7E( /8! F4c ˦)㟖{Tn&7cx<|+`8+^D#㭃NS3+^ІQK%pq1|o+.!SGks4hmC"TPmC7$_&hBDl~tځq ,B(L􌍌kA}7%m۶ $vѾ%C&4H@Eb}`Y>K Ae&8z,8"U! "؇wK$Y.j|?cXTe{|C ̷f>ᐓe5aP!,?hhB0΅xu,v.zڀ23cfa!f^[ "'|,Ɨ ܼcEtB@LAz {؇~;83hx· \ T! +VZ`\, ?eS.Pk:\S@FA=3zT.'}L_X8Oj" Z!ff^֐}] 5 ?*Rvr6IS(J'E kw æ>?ǯO]ޗ#6_CWYG0@+PH B XpsB@MpOH2(MY YDqihGYg/L:f8:*6"تWUdž2ָG/ 3O?#tF:`Zdv`1Ql ,Ïy6  ״[FF߅~K[| a{42;`iy"e1 @PSO a ar7rGۆ>$ۉd u1_L .qw}x;B(.".anx !T`֐f縉.mt?ήL1=h[bRZ0}"SL&`3BI;Dru'ڏ":@ RX7lާ. A9f91` ?d?2MXB*s,0n(ڿ8iO$S"[,19@@ @ ީ/d *uS2u1x`.'NpShnV#ąz(52H\cU?y/ -AQ.yckT@fnda 83$1I@$7<; }62~g q#H(yO,xșA#@Q#h0@C@~?#~RE}G\!NB7{šߴG<< a\G q-3YT_ &h ~٤kXgC(\R]>u91I7~  $;{Hwcn #';O2@{ lVk t|#!„sR!;Ą HAjU׺t3{XןOu_?t#OxCc?lZU2hIו 0t,be+`0|W3{)?b@{> !o>Y@B'awbPwC&;>@8I3pPZv`Cp@ R8T{ zF3+"#@9/f0" l2CCFF^Ya`0a`qR8S'ۄ & hޮ0B`$=pwpQ# P)/ONBw,H%-'x6.$ ӂdI8$sG$wv;rz|]{|/eR_H\޺V~!P "H*MDT0Kc t0~/!n}Šr_'WAg <_ ,|.SLUZNasPc .0|)NᳫЅ$0:ϵ {\lHzBWTA@ j9ygfL1`I8 ʀ ]):7:!LH!)vg!N^ TB젤wH`ZQ]PغcמLN%x pII3*uzrGBݟ%Eȇ8}O!0 R2,-`91&CbpCRWA8Q0L7ޟ wbsxB`H|(AIB`a.(YzyžRRf򸚸UGV_'a9N!y~O+WL+",@bP[,{ap%0 BӇ,dV}.} 1xw~&rxH $#iIߨg /. 4"8'8uhXgӆy~xO>.B"pl1j,^<;xVOyuyG+@?H|0q3YF\ Ÿ@~Ƒ>:}+;:+ ! R ŠpP=pPx"hGRLFEZ! !nIk;u`CB@" 0qS_\n; ! z@ P' VjJP 7B@TE@*r9Dr,0 E ! # PĀ8! hİTTj)B*"U'̘`1)Z!6L}T*P 7B`*hEn6Nv{[) P$exLi'GpNZ>jwLj)S@+2-g*oQFD2@)$P$%B`VhEfE~ ! @+2-`LTvi]! i޷EFgR n;?r=ki=] BHaB@gPya 4PaB ܏3)H!0̙3矯g`GNFP 2maX҆ y=oؾПI 2B@2m@gN:餿jS] PiWr¶?+yy4"y()\Aٵk^V_[#/x _Գmuz\e8ݬyaa9Yiy-qxxaz7Nk! "dɒ_mm5po7-muzBG;Qm+ \OtV4s~H"%\m5@L6;U].F_$/Įn_JqqzzB@YB`޼y]r}n\|<`u!\nܞ0qʺ^.2Iƅ08piB@^x-Z9; W> ~T~ҌrFEQe3B@L:'x?3?*sr6Zgim,v64q^Ί EܼW (/ җ%VN6 :N7kC^rGQ%}' _!0 ,[-Sr2!zsCza\J?1..qyu/k\4!r !06|>_~*N+~ &4e:F՟ׄ{yi ! s~Ot׶ 1*Wb;|[ 0x-/uE6s裏OywqG}nlrRiJ6Yu]&-ȵ &^|C$CGyd`_=h"q.a'8 a|a˺^v_{:B@IG੧ p:4/[_5/}Kl, )D-o8uv*+.'j'itc9ߏz$ϰp 7 FۗX kuurk?.+:ΛuB@L2ȁے[X:3p5׼?i\|uqI{ A:P6}X^).,;˟WV\~|U„6\<`vs;ŝTy~_Tgcǎ_?ػwoVt/b8NMs]$‹Z!0); 5xc-l,={ ~?K +[Wr]4^Y*L!7N9wwV\9lڮ][lL4EA l6bʅ*5W]ռկsFr 0 ۂa0 8z>6+,/*'+=ݰެ0^~! @q袋]v125yfGgui2'Q&ok:t7 6B=3,PcVbuVXxxV{ʤq_J ! FV;xӛ4+O/.-\b;ǯlMqƍW*G>a G%+ml晬0ϟV$|_B ,X0\?F9C+pm _8ho+ejBKHQ)~YТpҞdgUl1#.Fϋ#<+ (/hOJx; `} NQP ˏ҅2+2fT|2QZ! @=:I'&]"iثƛڄ|:b.pOn[`sUR f./k2K"< ^w^JNsT;?\ ! !jժ gqF2mrVȐr.yg5.#-αFthNvkM',NltC4a^W@o[^9GQ<~T.(!yOFhL\b' BGڽB 66Wet  Q6ϋs"i(Hqiکp! @%Kj~d]3Y*/"9wܗUOp 4=x̀m @+PŸQ_xgT:GW&EҌOB@,?O;lYIc_r #rɆE}@Vپ%:pau&$Fy݅bxGq~/۟I2-egOaB@qs9qy\&[7ñ&6*`Odcl؞={֭0<ڏAwqaڪ~(jB=.OU6/"6OZ$oz2Ub~J`kU%dnIhF}y3J4PGA80]GQ' &/!mSl/1MRB(| ώqh=C7d[Ud\U<.tԨ:} * D~Bpy` iGW$ͨyqq7/{C=Y[': z k̨'̈́dA^H}_ Kːr47ͯtB@g.N*ڹsg-BX cXsᡪr:uʋC pBPU08R?/rn/@`YlQϫxǍCѱc"g6kWS~b:!Dp%NX;s|ɼ b߾}CKn /˗vA<0tU|H֧|B@498? ك[e昐~ى fu g]:& Ų2dr<|XLӅEgQ4(^鄀pf{?c,Gym۶U~3n*;%:'!8$o4Ab1k_*N:\s.@@G2̚ACƿ|˖-u3@#o HBe9`ܝ<~;!bPNwBx#Wn`6ޅ=">ŸU߇SEuJPkP!4#%ue궣𣆴m'% @RB;]azO9唣3|MF J,æR/a_LRC\" `O@#uus^z;Ygrğ<&5m &B>K,9:gy>&N3vmI[[>sk)`c _!>?$TK/K\.D{epF_wZ;wqTkY2:h5o֡JUfQ2y[nk5M?HwS&r8p?.3nzZCM.W܋O6y.kEG9+#@&e|!P>BTm[K^O E2 &?7&!PP&KN=B@b0c͝"2h~I6'pk]R֏x@RkXdf ! hb>6 "{D@fM* pf,\+$upDݲ_! `G7욿I{l۶-2Φ'o;o <ޗB^ևREN|4XPB@0f3ZduA2K$A5fx*$YXnkR5Q,mu2ѵӎK.cMmW}Mȓv?U;Y`O@֚;>-P2V6̝5(f) B+! ,KQp}g2Af'od?424iE3v SGNt/_/ Wewu=$D&ؓثDF!L|x'~LެU JM<|? @P̪C"PVu@r?JjCX[*HBg.V %H o>ݷ=SK\_@PDu/ @P}C2J7”SUZhn>nB``\ab t;)=BDډ.qz<|PtC'?̗?BY3s6Mhk >^:D%DCX#@o.G&͠?v3@eXʀ0ۮd?B2ba8~b#B@|(qo,21nTz6 #';_uT=7=ڀ3P+ʆ?u 9bpv2rA[//aX*pYF40𿏅GB~4ƃe` 5w )̺-[6N4Ї61}C#k%B2@{1{`P c&LLưU^#R7Z2A,C`s/2K@҅+ۉw+*!XDR:Œ*(*1bB* u &$bbEgXrd L{~z.~;O{28N=6=]7in "T}> 4 BpR < wϤ"x t2 B7K?-C!Dž@w4/?F3iS8%`k;UU/5D?8@_59sp~F'ˬ]5x:Uo-0@PAz*B tt,MfS93B f!Wpe@`\W>]:U~}5A#kAq2Ż~/8@!3Y<!MRS@t#g 2~wWp8Rd%p2n㉑'>X`okKNNOnq>JB`|]8T-t+<-|8"7D7U@pE@+ '0vy$0`2S&L]8{;v*Շ ^|"HkPI@Tq G >74S89Ac  g`!̝B_)Xp2Hg^}c2*5>Ā6׹3PP>0p $t3(Kx'Bb0w&&K%E011nw1/"p,3& g\ACApx8. w%FO(3c@:8燦ô^E@@B|~`Wo ΙW)A J&#9e).B ༄rM?gu&A@i+vp`'r)΄1!G@=c\ˀ,l/K'Jm~^8fx e^[D$^CIDAT;8gp @NVu"#ǁ l@8j&ⅫL*}E>'erU^!36gSuB 5S[=ŃCp8({^QerlQOoN=L;'ZuPxuAtoQ@CLbe_k2! @XbY| n a';4:9?XO!!?>yPc9=D\[p)&Ջ]Q&k:꒣+ѮL[x}uɩ|X:q! @x[[05uMlЙyN'DzQHJlա8ed! z@Zwm%ve]l12f՗)/kzyNllyuY/.!E>y|ɯ.s;5/HE:E};2<8T&~9Z]k'uNʩWHg^My/GC=B`[{pI'sh/Yz=/fS'V+<<8e|Xaq! @ҮkǶ`Esle_*7.V>&̳|:S$ ! z6ljH`g^ dC#Ϛd*ϲW7yԅz)Y#[ڇshl>l۔ˎ=ezò N)-A2.\:5c}$8СetQ//&f76,=?PG;B@ 6?1#ȍNޑG#ǤwZBN(Pc:aE¶amX[ڊrB@#ٷr˼szx0Z qi"| eMNޙW)j@'UzؼU&h ma{-[pć~8o]i'Ш sp2?2E:WVhk[ vB<--@yq7|ڂg 0;lݡz^ ƥ+SFG'+1{nn Q^!q|œ?6d{サ0}~Ù-]1l;mxHfY1XQQ?|9^q! @97o[1Ah4..ce~N^}@?VrL?U B@LO7č7)L;0pM>`ɒ%_hjO1Wfh7+*jW>l`$! {-0ǿnLt'"5:XW'c :˔a1ݔsc6SyO ! &jR+n[":`>x'<чjKIƂ@ЦnVaʡǙmV0c}L!0h9~l*&>|?|0c%O84u[V?obdS/ulCrr ! jB__wuxЯwWy^e<׌%QDGsYuYUG[YmQ71\!P8{|8^оSMzpk/>x[SF_6]0]Mрu^(i#U'(@_G|}s=%t}#@@ .a gcl_FJB@ F '*|%c=?c}8n~s1W`//,WVTFhB` Yi"]ԗXfYB@wF!%n=phٲe=pF`C" Yec1SBVmk6V$+n sٙ6`b Ƹ; 3?sjx` xe Hm/ }amm}>Gy! zફ҇zj( nuu.hʕ7~ѱFmaM1˲*: KtC4SFW}+?5U0зvn^|?J%:N+zj,Y$XH9s<ʸ4]Gf;/aL> @QCv %!0$/>ۈ;Җԅ@QXTXS4[˗/n08/AGIl{{=ES 5nvi'|)z˖- uJB ;s9.LPsh/+Y흂F5.]}~_⸝>y r| p Uʫ)_J}1͘/g-'o`(5\zh+Sa@`:P2$9aJQ[#*r6eKiQdN;s˯yWuYo%!Vu4B/^`$QeY#75v1eHceʩrJ[~|)֛>o; N3<+ N#˫ɕE{G0 teԻ" ly;)Nm^ޙ>o$qZǢ) D!0 wuVGa򀗔?d3^`' Yő-8^<Ѿ@^7=n u^;Q$(@5;0'`bsu@9àn|ҙ68߶2<;hi޸ D@@ECB@!0n6w/B@4[H! P0vՁB@!yk ! ; :B@!<+.9i8IENDB`ic12 ~PNG  IHDR@@iq pHYs%%IR$ (IDATxݛYVovE!HFy ƅ #  !< Ј$ F L1kkڝO{WuNNU}emmmQW\zq>ɓ?V:ٳgUJt֭gϞw~W^{q V_[[{uMұ+^ k>yfݍ7F߽{+Fϟ?.DN$b[+** pjOMMo,YrqZڵk+ƍL4۷o'h#fԻw8ʷF8f_x`-++L\ׯ߿6lWZ&UV=zgW^2(2xhш#8dȐ+f YW5"UЅS㒈YiӦ/3 zQjٳggj!CGF\]]ifb!4ZZZN3M/~s|ZoΝ;3cΓ&MM;5/ǣK.O4hغukEt"`Ŋ=4_/^8F&͘1#qi-͝;w{vնm~l\rʳZ4(?~|~É'={D[޾}<[|P`˟3&vHpP>sCd;-8S(ȑ /'g|rĂIl>agU.\I=+l:RcxD`dcO1M-A )NiirI  jOR\c9tqR777 :40K@8pҳ\+A,G7Q?e{@ 3 @#L2^81MPݻ=z(&g@kyU~PPDn e \29~U(H50Qfj0[Ǟ"#,sA!ʌ,}(dїY#1n($̾O>3Q m0_ ހIS H6 `*GA 3 ܿ',}^U8B2[Y Z~]i#hOVf/#Ginm=`>ITZ-[/^#Gر׉` YFN'pk\'O:th!@>W 0bHKvٳg~nwVq phBJ!%DSNv$VI/ @m89ލ@$Q 7 qfwt}*`i:G$36@.pu7H֭[q]dՁj ,%O|%Z*eQySdM)Ia3|/HYa,@?KM"~iqx>uT5* hSd:3gR`j@dp,-(yR[J< i}lT%JI.8Vr)e:iRHP4R:@*#N4TϜ9O_n>+%gLV=b%8b,$@;Β,.DXQ v1'VcmS@XfZ X[=zɆ  AB0Dkc)coZb&mݠN2P՝Hf&Y?9  00{H,W蠌QD340&7RX#~Mj&yE )bgkӁ 噼' -Q=y m]JWA?L #4F@&4o_AaH2%'R"c@^))RmUb^wOb QR4PLj$2 M{|k֬iD,0ԀZ^x$?I*XQxѢE>:pc)yoK(.eOAEҺH\@+~ hJ`DP^bk ]}*kږ-[RPhaΜ9\o"# $xbFiWn4o޼| L0+s6%oY=YOR 3/ XƍO)y,e<S%"msTݕOUޠ (^aׂ7σ4NȐZk׮ HJMy]^SI )R"IENDB`ic07PNG  IHDR>a pHYs  IDATx Uvmlf5`0A,f1f"$6GBXI<$ `2"D@1L#b'$6(6w=+?]^wnבn[w[ﹷڹsg2Ȥˮg/ ÷n:?W_ٲe˘m۶Fm߾}Qv{[4dȐ:tƽk73f7Z;[-l 3H2ޛiӦc7l0壏>:~,~ƍǚcy?Āb wNL'}0Na; u޸>9rQF8~oq̘ $vuO;|?{P] le^2YfMt-Wߦ- 诞x5yeDoq]ύ!kɱL0!9l Jy삖jSN&LM"ܹs}lO!O6-w--^l:̪l/2YdIbz|nw "u]w-t>SNIQk` /HH`wQ~GcB\uUc6z)ҥKS( $u"+ӹE8ٳOg{Ж:k#)iπ"@,0逇B慁Nx< v*pt/M;Es i"FX><.M*YpضĶDONC:GxHS!4cx]l7"G{T"[A<`'natB4*rAׄб#<0Q+) @g pĹ#l%qT8q; @s @2 B`B:eLGN"w΀- q5[.O@BYdA Ȁ&HC Fi=Z/i:!KU&*!.ú0@9.@ ^D @ `3?@ʹ6t 0#|>8Nc cҾ΅nDj"1U60( >EH& Cz=ԯ\+}jZ8xm;bdQ 2hԣI0Jy[~8רk+b\1"<1d\ LkCYiՍۧsnNT[Ҟ߾)y@2tL !bH:q_6U^!,yMhbZ5:c@ys << 6c6^],%Цw|,ki巏^3(gI$QuCOd 屮E `s_U*JϚgUZ%^K8#k%J3es0_ɮ$~PaJ' 7,`_Cs?+%L8qGgUWzW"asV=ox=x祗^SK\?ŋWT%K+kei_[ .`\{ q^N*U {}5 Iv9/:q `Kޤv M[/GQk3HWxmY<а*Kx-f\f 烦o]WPVP t;^OaQ{f}=9묳3gv>-=}`Y#/R^J|Y8Z+ש-N;-Rmq5M S(lhP5ic'x(JS,-"d;loO9f=I9t{~x`qcm>z](If3?KN~xLXXqi}\kIҟcV7mtd'ʧ9!ߺgu~t|9>J~:yy%`ۯ$4'P׀ȭ_"0gѦ=vg|]..> ΡNCT-^d ?egz"yhF 8HP@`Ϫȩx,!1be)-*" ,lU,s8kҜ<\ȜU:tSG%VٷKT"I=8 뗿"MCzkp^$ؓ}ąLU# &s1!tE.Chgh'eL76>駟n#ABBce|=EWyp- owE bŊc JV]˷cimfl%  BCij^ۛ$ ,!യx:'uD&#?O0@ͦх[fV%G[?a'N'V"Ah.N8JZ[7=-^+K+@l ~)wV/3*vl µ8ۯwե>af5%eV-F<{V}BF=0MX;pc%L,TNm..ؕrHmViyQ'i:<ĀI \(DYO?5`@Cbyxa !O;ipr. l<I'B:™" y\'DZA@3%Ӓw暱 h骀6x8nug٨%AF5 6 <1 S-s& ehWF@SPUD8emW->yIyCj{͖o+P$)RPyK@SȸW95kއx8>CNf.!s>a FXtx WʠF}hʨة7 v`< (h8C 00 Ž Wq;Лmt4pzAFfIS:yY *˧ ?,=^ `lѽbv8o0 Ҳ u&@u%o]yx#V(+xxB +GR-VI}>O>`[hq(EG p%0<bzǂ'S+[-Z4V+J]~hXXUރ|@ej]`gyr `6²F<x2>:J*[JpoG:^x!UJ `J?WZ.yE5 @s߱" Z::a- |Hɉ~8k֬%K\i @L0ȄkKw\Zx;\ݤv`y[ƛk׎,ha.M|. I=i[na1oȲ㿶t^`bwSY^e%a6W.ǻp \KKs`P6"@q[|o q4ꫯ6lPɠ#B.beIENDB`il32 |uohhkoqtvmXk{bU`hrkg‹[_df›Yc`Zgu sqöt]röwgb]qź|vqlgb]q¶{vqlgb]r׶¶{nvqlgb^q¶{vqlgrW¶{vst¶ÿ|mʹƒ^l̸hb]lvqlgb]kĸ{vqlgb]kɷ¶{vlqlgb]ф¶{vqlgfZ¶{vqxwl¶ðe¶adӻqb]Y¹Mrlgb]Y¸{vqlgb]W·{vqlgb]X·{vqlgb\·{vqlf`·{vrn |uohhkoqtvmXk{bU`hrkg‹[_df›Yc`Zgu sqöt]röwgb]qź|vqlgb]q¶{vqlgb]r׶¶{nvqlgb^q¶{vqlgrW¶{vst¶ÿ|mʹƒ^l̸hb]lvqlgb]kĸ{vqlgb]kɷ¶{vlqlgb]ф¶{vqlgfZ¶{vqxwl¶ðe¶adӻqb]Y¹Mrlgb]Y¸{vqlgb]W·{vqlgb]X·{vqlgb\·{vqlf`·{vrn |uohhkoqtvmXk{bU`hrkg‹[_df›Yc`Zgu sqöt]röwgb]qź|vqlgb]q¶{vqlgb]r׶¶{nvqlgb^q¶{vqlgrW¶{vst¶ÿ|mʹƒ^l̸hb]lvqlgb]kĸ{vqlgb]kɷ¶{vlqlgb]ф¶{vqlgfZ¶{vqxwl¶ðe¶adӻqb]Y¹Mrlgb]Y¸{vqlgb]W·{vqlgb]X·{vqlgb\·{vqlf`·{vrn l8mkzͶgvWzcWE|{zzrG6Z?wvvurL:7(zyxxirhpgo@C85-xؤp%ARbr~n_O; ic11PNG  IHDR szz pHYs%%IR$KIDATX IHW_[v 2BPYB #< ɓ/9$$$JBABLDAƵ]FvԯS>=99ɌD"i2l4111NHH8yHW?VTT utt\]]jmmL'AWRR222\jjKKK c}ooω;88pB$,Ex27tww?_YY,Ε:x{/..Ԕ/b477j{h#sxWOgffkoow鏦hkkˍOƒ8$(RR۲\}}~_4%N\۹/m5 ]LDa5r^vbD(Wb,05xdN46663)tk< Jx#s_d 8ȣIBjN$F@`ba9ii!1 #ggguf{òJ[Bd)aCrT; S}qq1Wrʆ:'k9`#X+RC<:2yY+űXq'@FS"oT|W  lE(F)ED/f\o*lpWȾg< qYgX?]8<<̰n(-,,+?O JY}GRz)1K±k/G0_98$#kf ;[zxX9 ic14PNG  IHDRx pHYs%%IR$@IDATx ]Gy,YŲvk7xƬIXCIc !L} tNӝItH2Y{ c'W$[e˒,K%Y%RRwyzUWUdB@B`luWB@! @x @ox̅ O\ni>z)켧~z;{vܹO}r޼yn2>b1ufy'-!X!3DzvCԜC8kIf]h{T]pS:)fO} B^`Djsy9Gܹu%|Ǚ= h'05ӐC?g<OT@2A4?fN8aI'w…{/^B8 p:d2B@TGz1) #v1 ;_{&W _nd'ք1~fCV a#s ?+pMP ޣ~Š\ә8]8C?#< , Q턅>b!}ȈÃ'|UV82{Ь4C@ OO>bx=zkMjBxefO1 &TO@Pa-Z~\p[cᵧ9" q! YFAaYA9x,X˴ ;W\vY/dL! 0S{;z̄Gy\oY&O3"_hB} -B v\.q%ABBf\c]#-]kWE@``5b00gؗ`X#faAbG̢MAU+J P,%m6ѭ>x&/4~ 3̮5,p7=B^FAɁF}K, Yw)]0}r?hkWp}իW{Cg/#@9W`im> 96=e_7P)Z4d3\uU/6l=M&N=CȇOfgj!0!1IݻӺY'vRW?O?:!i)vl%}ZiBY"{QzPۇ&=! GPSLqY;;Ft$PПkm?؆*ӫlmb`QsNFB ;$MY|ۖ?kd]wޟ/P_f͚_fE%&9A#jfߛۣ)`ؑt$l36i 7S h&_f_%۱S0[oI>1X~P5DZ0i6 >iD/myw^?wN]gHڻ(1woeU5T BpеLh\FWf$~Yf>@#`L{~Ң~vNĎ7vy晃C+qeU !όˣCr0)o5`b0D;ldEe=3Gcٝ/#h 4E!>JVio6#<%؍4W%>W.8 }7KmSo0s=C-AG`D}h$sLgת>bHi#k./_ܝO!T)}49}ʈnj>H4I`tK6{?s9g8?t$H8bܾ8BdOF`f>S[&|[4-/kjU%hy睃M6 ch6x4bm/FKjL+  {zL1ذaP37ԨB@L<xC2QCO&9[]#hT L50,ߘp#9gB@L+ݔ!@3s^t̾#pc/p#% c8x6uYÙ>.2B@!=d7vmly#m|4YMGS.yߥ^:3B@͂;cp뭷 09kl΋*`vvv .`pe xB@TC馛_3VJ\&Svڞ>я~~i*a* >l٬tG_xz9OoF)@OCou}[xH??1v ךScjbQ*=s=w(/#"`m6ظqc'/2-.{f{NKLlmGwXۿKeB}xZ-[zm߶ |0nD/pk իW^ geB{{챡F怗eloN:U:S3qLOI FVy+W\yC0! ^2}mxꩧZi-<`ϴRaJ&o}6o5lC^!  8:OOC@_(.F47mD}`hb;jm\t|=z=oh|! @3~[n,lt״o2pG3=J_j :'L%K ?G$E>! $#|+ 7ŋE]w.Ӄ}_~{lɭ0pC-0|pNoD/yի^4B@>wӦMƚ5kozӛK $B@!gn RD%g;"6}/OO_lk07:t(_R#a^6}ww$B@ݻwO~2gdF\a$i(a矵MyJ> +X:WN?=ݫhLͱ'w,N ݻ_T+_8!3@ràzYNtj:#O޵k}L-ETB@L65˼xĴ?%:nyv -[V(B@!{^gƕ D OGWg W-KB@BK/\~壒C0 &'Å*Nh<{ŷZn1/Byk/x  Yf?*mSqȻlٲn^W6lPB@!P^7yty^6A$; U_VX??d;R8 WNB@! R!T.6V.bV G]Vl0A/#B+x&D@6-@=Bƴ\Sy)^T/6! \r%or3 G^Y yW*nW+u cB@!WU{w.m`e@KTB8)#B/,X`2ꫯ0nۚz/yʳǼhѢFPB@! "vW5@;~\m&Vu]g۷2 Ae ! %Kv>k_)? pĴ)ct^{tGM֭kY*R! @}8Jea׍y[X_yǪx_ռ!B@ASO%|Iǒ_aД өb/**B@BUڪ2.X8N7BB@ U}G#DX.Ǫj[Yi c+3СC{$+j 6UU#K B@! @n96N ]Ri<"tB@!ԪŸ̓,swaZ%'tRe l߾}pYguB@!<x?\Y!3>&Z% bdXhdB@t;qxO^?$K `_6&T ! &,'=VzaP/ H@JŮ?*K! AU7ߜTt"Ƴ!=)ߍ̍d%_\Zby+\! f dG)?(rBn}DW/gSaw, |Ƀe˖%]nUB`4я#~ B&nst+krp/yQpFZQ)N! ™s,7!]wi fÙ9705*Ԇ2@B궪`ۇ:!lhi)hf~&{Ma?uM4ŸS|/^zRAP7aN-Z$"*S!,"8xm7N޲75@?&4$20o޼aB@@k}Eza֏ \! f T1hڇY0K9W63y^֓e`Xݻwhy8S PdR 2i%@@#˸'ڳu֡<#nMi fΧ})a[-ڀxVF#a~r%EU:! @`Be>4&Ϣ  7Z|"@>d dBNh#@{;({&ZR6!wڕ-cjẃ+W| !TB0`!@h dzYpE|x! @0nvG"i󬛩"Lǘ-3'@CK- !<9`SP3ДK14ep1_G ]w2ơ(_횄|3AF$efy)8{(&$ B+_\gǺu!!2B@L| @75h=K3vb;OWu܈Cd]a @U^Xڝ<'UFv~,{0 eUZ!;ige!0sOf*!Ep4P&DڄN84b B)@!@wޅMmgϞmLkf E8ci `]= yNhsx>!!ϩm2t 0^w!n/g۱Nh$ޛ&%*ŋڀ: AB u m}5k HAy! ! }ݗ\k%:w]ygPw,,G1MB;'p[ٲn AN'[!un'Mn&'aUm-uVXB`HA#C, =-Nrf]>"N!PyojUmfΐܺutpT6xuե/W 2C6D~HyS@Q!̦!TR}#d A2Otm+|eld]4X) y ,cYwv ;?N 8>cx`Xֶ9z:t?8InI,w@BIfhu0,%|#q2@}QiؑH,8AkQ??q|L"5AM "0\@# ].0`Φu>B~gN br^~OOnVɋ2g,7+pXxa~4Euΐ#o2Ӂ@ hMFh@BB.@RR;\@njmŠbbaZg p܀c:OK00yPuB$T9hxF}.FYCx=$z>fiHxaƎdd֏M~flz7TQB`J>Έ$b/%@3ڔjN3sb஫%f/醀c&iQGE: |?)3_`O8!L#$W5@B\gȩ N$fqp FnuABb)#&6thyƄ?}UE@ !gD8B~' `5ɺ eAHbm(EHpͳG]YO" iMX%:N>:18A4U;"| g}r@yg?uWC@`B%-%Ek{ B#]K1a2KY:wzR#ϤK܄G@=dD=ӁfI1uc Ip[8!A{dPwqi Ϙ ww]M0BO$'sLQ=sػ AKc:s8x!!ޮ  }g;~ ]xB`H|2#{ A;s\c°Q0+"dY)ߧ{n(C|jW*!0$w &"Am8_<ḡy~ɞ% E IC0]',EC7ó .= q} F@ E!Yf0oz?D$^2B0@ X 0w°O_~t^\! # PB)AP%z\Hu],rM8݄]?+hnB@t@b3q*܇<8I߯_{:wxǛε~yB@*TAmD #ő:>S ~Yօ*Ed6 /s]%-y0)#;"j"Y%[OCMj+B`3{]nDr+B@E@,bcҋ('Z  ! B@ 1"r ! " P|"9(X! z@n6Fٽ wi*P 7B@TE@*r9DrQB@ 6s/Uכi@5\r !0"7'W]uՓv{[) P II NG8\eT0.,{T0B@YAlmv0mvT4yy=HQm ~Ci<+ @B@ 61o:E]qm0BqYq?.M^:yu^5珯=\!  prʕo``xslm/Q^n.ӆ:yq8]XB@iBSO|OmKDgyϺuk R 0M/.u7aqں^.nX4!2 !0,\}k@n|xpM77X\:x3Ozsΰ[sv6} ԡ=}~*6!  ؆l=x'O=믿瞓2OoڵkעCdhp禇3ә:qYׄ5DYeaqya}R:! $ 3 <8xiܲ__ #yxnhU__~4 >- [ۋ_{=qxqiʶU酀}CpDז/?0m'''2f~_җ_$I}B B?ikϗڍ뉯#Mta`٬ZƄacH8O|MEJ״!/, qu-3[{|V_>6FpD [%[lg _*f޽{a`ǎU"nՑ*yyay^.izx|_ B@L /v8UEJ*0M6ݰa̛7]PKB)+܍py"nV޼I.+,._B@>!`uC_Ypm۶W֢aid0f ˪[aB@>!yK^2/uW oTnε}g +$.Y +,AΝ[M 𲗽lh1 ̙3g(X Mk< m'a0 =}ء0/SyqUڤZ_kP^W-L֖v{aPeI'4xы^7 5nf^[ڗ͊Uv^\! @W}+oxgťepBl$bWV4q8ЯC?tAMemĹ.i퇷NQeaz!8B@6`<:s_~`…U#l܄9qϾKw9IWp/s!)S_&X*ME򚓗?/}V?xqܨQqq9\U„M#fs'g݉'88묳#F2__"/g$jzlYs ' /_^6ps 7 !x\ ˫LQee^6./)W!~.,]ZXuMt`Kꓮ ƴ5k9nQ XP@<_n[T:iQ5/./2Syyz ! @ ~WXQիWW18\~+5DERhTmG \sds *&/./2<ݰ\²=MVnB@6nfu K e%֖!+N2h m[(kӨp҄epMzL> ,deW5|fEaB@0G3OaUU^ 1LѦqeXΠ_UU -e;]0"ԙq°Lx4uiG^w7lB@`I]ׯO^G`&07Uq`G![U [sJR*|pe4 U%Ơ B@Z"~c_Yi]Yqi%ӸkO;.+lK=N7CFU$Vq^Fh_ߵkW' =x@j5\z`|a۳EӑlڢI6 B@>؇m󲻪oϫU8-k@IDATv|Qdx^ `y`a| K.B1 Y$ yHWuM"=M2ڧ0! ]臟2ʳN܅i (2$y8*N6 8p`h!(_O_5.Z^)^4;v,i+*\TU `#Tcu{;\!zC߉k HG%zf<G:σL~B`v`ldٲeq1Ww 78㌣:e5 %q$|n81p2qe\/ݲy=˔AZl9J/"8F>vc'I;hz_UO9=Pqގ:nT8 EΦTq`;8p@LYiS^oKʲڪ0! &&?ƿI5LbW{hwiZ'tGγkGȪetc#X P GZUiY=\:e+‘/!|.w {R4T&ت0CP2tX.X+ 4qXqq^v._B@<;C[O]UdwNef@GlÇɠ`s$B,! PӋ|G9qpϞ=k6!;Yϯc)C؇7BK^^hO !:]s~! ;rX=yB|0/ #>wݯ.{֐`;+al:M5 .Uh*$V0w'UNkFH cַS{,XVVM7ݔdAݶx y°R,jH,.pfO4EO`un(bvpgPe%?)~t6euAd,)AA/_>,;ET8?vg"Q!CXLB9yZX֭[;w z fN|vX!*@@BeB]Lޅ=gSv{Mm I}ZvJ"P`) G7o>ŸE!bm VP9lZB͞Iy0׏B\{)5I[#˯{ 0bPWI}3bd d#Y7Y2B1RBusz`,BdCxK=hR7n8ܔ\܋ aNTH/@K3YԷdɒ)ܻAH3Sx>]|̄0<)ȴ[ou.N,g9@BvVYqszdAA\2%]ou {iq}֏ ÒŸ}7!ۖg6 `B.q>IS#\?P7<xYiKX N|jz&n47dgrbzef@up"1qx/ćy~tnB?aOl0,o\!P#8&?7o#?0 `94f rXʇ @> NH&#B``|fg|nb"Ш'a^5{8kPAPcy8ĺ, ,$#h}P a ! 1A./F*Z9P}ݍ7ϯݘ#G>,pY{`~ʕC;cPV  PF! c%0> 38$nD)nIe]m vZ>e~Ud ː6 ! >ZZ]Cli߆ٺukO 7eFu$6<\ U@ grh* B@L+y}`M;PFھO MmcE"adRh).!00.RgMqYv_ m2Z߾q\;I26BFY Ș =5S`YwmlB@tZV=B;n! *!t5$5>Q,,'Cp@7E( /8! F4c ˦)㟖{Tn&7cx<|+`8+^D#㭃NS3+^ІQK%pq1|o+.!SGks4hmC"TPmC7$_&hBDl~tځq ,B(L􌍌kA}7%m۶ $vѾ%C&4H@Eb}`Y>K Ae&8z,8"U! "؇wK$Y.j|?cXTe{|C ̷f>ᐓe5aP!,?hhB0΅xu,v.zڀ23cfa!f^[ "'|,Ɨ ܼcEtB@LAz {؇~;83hx· \ T! +VZ`\, ?eS.Pk:\S@FA=3zT.'}L_X8Oj" Z!ff^֐}] 5 ?*Rvr6IS(J'E kw æ>?ǯO]ޗ#6_CWYG0@+PH B XpsB@MpOH2(MY YDqihGYg/L:f8:*6"تWUdž2ָG/ 3O?#tF:`Zdv`1Ql ,Ïy6  ״[FF߅~K[| a{42;`iy"e1 @PSO a ar7rGۆ>$ۉd u1_L .qw}x;B(.".anx !T`֐f縉.mt?ήL1=h[bRZ0}"SL&`3BI;Dru'ڏ":@ RX7lާ. A9f91` ?d?2MXB*s,0n(ڿ8iO$S"[,19@@ @ ީ/d *uS2u1x`.'NpShnV#ąz(52H\cU?y/ -AQ.yckT@fnda 83$1I@$7<; }62~g q#H(yO,xșA#@Q#h0@C@~?#~RE}G\!NB7{šߴG<< a\G q-3YT_ &h ~٤kXgC(\R]>u91I7~  $;{Hwcn #';O2@{ lVk t|#!„sR!;Ą HAjU׺t3{XןOu_?t#OxCc?lZU2hIו 0t,be+`0|W3{)?b@{> !o>Y@B'awbPwC&;>@8I3pPZv`Cp@ R8T{ zF3+"#@9/f0" l2CCFF^Ya`0a`qR8S'ۄ & hޮ0B`$=pwpQ# P)/ONBw,H%-'x6.$ ӂdI8$sG$wv;rz|]{|/eR_H\޺V~!P "H*MDT0Kc t0~/!n}Šr_'WAg <_ ,|.SLUZNasPc .0|)NᳫЅ$0:ϵ {\lHzBWTA@ j9ygfL1`I8 ʀ ]):7:!LH!)vg!N^ TB젤wH`ZQ]PغcמLN%x pII3*uzrGBݟ%Eȇ8}O!0 R2,-`91&CbpCRWA8Q0L7ޟ wbsxB`H|(AIB`a.(YzyžRRf򸚸UGV_'a9N!y~O+WL+",@bP[,{ap%0 BӇ,dV}.} 1xw~&rxH $#iIߨg /. 4"8'8uhXgӆy~xO>.B"pl1j,^<;xVOyuyG+@?H|0q3YF\ Ÿ@~Ƒ>:}+;:+ ! R ŠpP=pPx"hGRLFEZ! !nIk;u`CB@" 0qS_\n; ! z@ P' VjJP 7B@TE@*r9Dr,0 E ! # PĀ8! hİTTj)B*"U'̘`1)Z!6L}T*P 7B`*hEn6Nv{[) P$exLi'GpNZ>jwLj)S@+2-g*oQFD2@)$P$%B`VhEfE~ ! @+2-`LTvi]! i޷EFgR n;?r=ki=] BHaB@gPya 4PaB ܏3)H!0̙3矯g`GNFP 2maX҆ y=oؾПI 2B@2m@gN:餿jS] PiWr¶?+yy4"y()\Aٵk^V_[#/x _Գmuz\e8ݬyaa9Yiy-qxxaz7Nk! "dɒ_mm5po7-muzBG;Qm+ \OtV4s~H"%\m5@L6;U].F_$/Įn_JqqzzB@YB`޼y]r}n\|<`u!\nܞ0qʺ^.2Iƅ08piB@^x-Z9; W> ~T~ҌrFEQe3B@L:'x?3?*sr6Zgim,v64q^Ί EܼW (/ җ%VN6 :N7kC^rGQ%}' _!0 ,[-Sr2!zsCza\J?1..qyu/k\4!r !06|>_~*N+~ &4e:F՟ׄ{yi ! s~Ot׶ 1*Wb;|[ 0x-/uE6s裏OywqG}nlrRiJ6Yu]&-ȵ &^|C$CGyd`_=h"q.a'8 a|a˺^v_{:B@IG੧ p:4/[_5/}Kl, )D-o8uv*+.'j'itc9ߏz$ϰp 7 FۗX kuurk?.+:ΛuB@L2ȁے[X:3p5׼?i\|uqI{ A:P6}X^).,;˟WV\~|U„6\<`vs;ŝTy~_Tgcǎ_?ػwoVt/b8NMs]$‹Z!0); 5xc-l,={ ~?K +[Wr]4^Y*L!7N9wwV\9lڮ][lL4EA l6bʅ*5W]ռկsFr 0 ۂa0 8z>6+,/*'+=ݰެ0^~! @q袋]v125yfGgui2'Q&ok:t7 6B=3,PcVbuVXxxV{ʤq_J ! FV;xӛ4+O/.-\b;ǯlMqƍW*G>a G%+ml晬0ϟV$|_B ,X0\?F9C+pm _8ho+ejBKHQ)~YТpҞdgUl1#.Fϋ#<+ (/hOJx; `} NQP ˏ҅2+2fT|2QZ! @=:I'&]"iثƛڄ|:b.pOn[`sUR f./k2K"< ^w^JNsT;?\ ! !jժ gqF2mrVȐr.yg5.#-αFthNvkM',NltC4a^W@o[^9GQ<~T.(!yOFhL\b' BGڽB 66Wet  Q6ϋs"i(Hqiکp! @%Kj~d]3Y*/"9wܗUOp 4=x̀m @+PŸQ_xgT:GW&EҌOB@,?O;lYIc_r #rɆE}@Vپ%:pau&$Fy݅bxGq~/۟I2-egOaB@qs9qy\&[7ñ&6*`Odcl؞={֭0<ڏAwqaڪ~(jB=.OU6/"6OZ$oz2Ub~J`kU%dnIhF}y3J4PGA80]GQ' &/!mSl/1MRB(| ώqh=C7d[Ud\U<.tԨ:} * D~Bpy` iGW$ͨyqq7/{C=Y[': z k̨'̈́dA^H}_ Kːr47ͯtB@g.N*ڹsg-BX cXsᡪr:uʋC pBPU08R?/rn/@`YlQϫxǍCѱc"g6kWS~b:!Dp%NX;s|ɼ b߾}CKn /˗vA<0tU|H֧|B@498? ك[e昐~ى fu g]:& Ų2dr<|XLӅEgQ4(^鄀pf{?c,Gym۶U~3n*;%:'!8$o4Ab1k_*N:\s.@@G2̚ACƿ|˖-u3@#o HBe9`ܝ<~;!bPNwBx#Wn`6ޅ=">ŸU߇SEuJPkP!4#%ue궣𣆴m'% @RB;]azO9唣3|MF J,æR/a_LRC\" `O@#uus^z;Ygrğ<&5m &B>K,9:gy>&N3vmI[[>sk)`c _!>?$TK/K\.D{epF_wZ;wqTkY2:h5o֡JUfQ2y[nk5M?HwS&r8p?.3nzZCM.W܋O6y.kEG9+#@&e|!P>BTm[K^O E2 &?7&!PP&KN=B@b0c͝"2h~I6'pk]R֏x@RkXdf ! hb>6 "{D@fM* pf,\+$upDݲ_! `G7욿I{l۶-2Φ'o;o <ޗB^ևREN|4XPB@0f3ZduA2K$A5fx*$YXnkR5Q,mu2ѵӎK.cMmW}Mȓv?U;Y`O@֚;>-P2V6̝5(f) B+! ,KQp}g2Af'od?424iE3v SGNt/_/ Wewu=$D&ؓثDF!L|x'~LެU JM<|? @P̪C"PVu@r?JjCX[*HBg.V %H o>ݷ=SK\_@PDu/ @P}C2J7”SUZhn>nB``\ab t;)=BDډ.qz<|PtC'?̗?BY3s6Mhk >^:D%DCX#@o.G&͠?v3@eXʀ0ۮd?B2ba8~b#B@|(qo,21nTz6 #';_uT=7=ڀ3P+ʆ?u 9bpv2rA[//aX*pYF40𿏅GB~4ƃe` 5w )̺-[6N4Ї61}C#k%B2@{1{`P c&LLưU^#R7Z2A,C`s/2K@҅+ۉw+*!XDR:Œ*(*1bB* u &$bbEgXrd L{~z.~;O{28N=6=]7in "T}> 4 BpR < wϤ"x t2 B7K?-C!Dž@w4/?F3iS8%`k;UU/5D?8@_59sp~F'ˬ]5x:Uo-0@PAz*B tt,MfS93B f!Wpe@`\W>]:U~}5A#kAq2Ż~/8@!3Y<!MRS@t#g 2~wWp8Rd%p2n㉑'>X`okKNNOnq>JB`|]8T-t+<-|8"7D7U@pE@+ '0vy$0`2S&L]8{;v*Շ ^|"HkPI@Tq G >74S89Ac  g`!̝B_)Xp2Hg^}c2*5>Ā6׹3PP>0p $t3(Kx'Bb0w&&K%E011nw1/"p,3& g\ACApx8. w%FO(3c@:8燦ô^E@@B|~`Wo ΙW)A J&#9e).B ༄rM?gu&A@i+vp`'r)΄1!G@=c\ˀ,l/K'Jm~^8fx e^[D$^CIDAT;8gp @NVu"#ǁ l@8j&ⅫL*}E>'erU^!36gSuB 5S[=ŃCp8({^QerlQOoN=L;'ZuPxuAtoQ@CLbe_k2! @XbY| n a';4:9?XO!!?>yPc9=D\[p)&Ջ]Q&k:꒣+ѮL[x}uɩ|X:q! @x[[05uMlЙyN'DzQHJlա8ed! z@Zwm%ve]l12f՗)/kzyNllyuY/.!E>y|ɯ.s;5/HE:E};2<8T&~9Z]k'uNʩWHg^My/GC=B`[{pI'sh/Yz=/fS'V+<<8e|Xaq! @ҮkǶ`Esle_*7.V>&̳|:S$ ! z6ljH`g^ dC#Ϛd*ϲW7yԅz)Y#[ڇshl>l۔ˎ=ezò N)-A2.\:5c}$8СetQ//&f76,=?PG;B@ 6?1#ȍNޑG#ǤwZBN(Pc:aE¶amX[ڊrB@#ٷr˼szx0Z qi"| eMNޙW)j@'UzؼU&h ma{-[pć~8o]i'Ш sp2?2E:WVhk[ vB<--@yq7|ڂg 0;lݡz^ ƥ+SFG'+1{nn Q^!q|œ?6d{サ0}~Ù-]1l;mxHfY1XQQ?|9^q! @97o[1Ah4..ce~N^}@?VrL?U B@LO7č7)L;0pM>`ɒ%_hjO1Wfh7+*jW>l`$! {-0ǿnLt'"5:XW'c :˔a1ݔsc6SyO ! &jR+n[":`>x'<чjKIƂ@ЦnVaʡǙmV0c}L!0h9~l*&>|?|0c%O84u[V?obdS/ulCrr ! jB__wuxЯwWy^e<׌%QDGsYuYUG[YmQ71\!P8{|8^оSMzpk/>x[SF_6]0]Mрu^(i#U'(@_G|}s=%t}#@@ .a gcl_FJB@ F '*|%c=?c}8n~s1W`//,WVTFhB` Yi"]ԗXfYB@wF!%n=phٲe=pF`C" Yec1SBVmk6V$+n sٙ6`b Ƹ; 3?sjx` xe Hm/ }amm}>Gy! zફ҇zj( nuu.hʕ7~ѱFmaM1˲*: KtC4SFW}+?5U0зvn^|?J%:N+zj,Y$XH9s<ʸ4]Gf;/aL> @QCv %!0$/>ۈ;Җԅ@QXTXS4[˗/n08/AGIl{{=ES 5nvi'|)z˖- uJB ;s9.LPsh/+Y흂F5.]}~_⸝>y r| p Uʫ)_J}1͘/g-'o`(5\zh+Sa@`:P2$9aJQ[#*r6eKiQdN;s˯yWuYo%!Vu4B/^`$QeY#75v1eHceʩrJ[~|)֛>o; N3<+ N#˫ɕE{G0 teԻ" ly;)Nm^ޙ>o$qZǢ) D!0 wuVGa򀗔?d3^`' Yő-8^<Ѿ@^7=n u^;Q$(@5;0'`bsu@9àn|ҙ68߶2<;hi޸ D@@ECB@!0n6w/B@4[H! P0vՁB@!yk ! ; :B@!<+.9i8IENDB`sqlitebrowser-3.11.2/src/main.cpp000066400000000000000000000005161345112435200167240ustar00rootroot00000000000000#include "Application.h" int main( int argc, char ** argv ) { // Create application object. All the initialisation stuff happens in there Application a(argc, argv); // Quit application now if user doesn't want to see the UI if(a.dontShowMainWindow()) return 0; // Run application return a.exec(); } sqlitebrowser-3.11.2/src/os2app.rc000066400000000000000000000000461345112435200170240ustar00rootroot00000000000000ICON 1 DISCARDABLE "iconos2.ico"sqlitebrowser-3.11.2/src/sqlite.h000066400000000000000000000004011345112435200167370ustar00rootroot00000000000000#ifndef SQLITE_H #define SQLITE_H #ifdef ENABLE_SQLCIPHER #define SQLITE_TEMP_STORE 2 #define SQLITE_HAS_CODEC #ifdef Q_OS_WIN32 #include #else #include #endif #else #include #endif #endif sqlitebrowser-3.11.2/src/sqlitedb.cpp000066400000000000000000002241171345112435200176140ustar00rootroot00000000000000#include "sqlitedb.h" #include "sqlite.h" #include "sqlitetablemodel.h" #include "CipherDialog.h" #include "CipherSettings.h" #include "DotenvFormat.h" #include "Settings.h" #include #include #include #include #include #include #include #include #include #include #include #include #include QStringList DBBrowserDB::Datatypes = QStringList() << "INTEGER" << "TEXT" << "BLOB" << "REAL" << "NUMERIC"; // Helper template to allow turning member functions into a C-style function pointer // See https://stackoverflow.com/questions/19808054/convert-c-function-pointer-to-c-function-pointer/19809787 template struct Callback; template struct Callback { template static Ret callback(Args... args) { return func(args...); } static std::function func; }; template std::function Callback::func; // collation callbacks int collCompare(void* /*pArg*/, int sizeA, const void* sA, int sizeB, const void* sB) { if(sizeA == sizeB) return memcmp(sA, sB, sizeA); return sizeA - sizeB; } static int sqlite_compare_utf16( void* /*arg*/,int size1, const void *str1, int size2, const void* str2) { const QString string1 = QString::fromRawData(reinterpret_cast(str1), size1 / sizeof(QChar)); const QString string2 = QString::fromRawData(reinterpret_cast(str2), size2 / sizeof(QChar)); return QString::compare(string1, string2, Qt::CaseSensitive); } static int sqlite_compare_utf16ci( void* /*arg*/,int size1, const void *str1, int size2, const void* str2) { const QString string1 = QString::fromRawData(reinterpret_cast(str1), size1 / sizeof(QChar)); const QString string2 = QString::fromRawData(reinterpret_cast(str2), size2 / sizeof(QChar)); return QString::compare(string1, string2, Qt::CaseInsensitive); } void DBBrowserDB::collationNeeded(void* /*pData*/, sqlite3* /*db*/, int eTextRep, const char* sCollationName) { QString name(sCollationName); // Don't request built-in collations. SQLite requests these collations even though they are built into // the library. Since we have no need for overriding them, we just silently ignore these requests. if(name.compare("BINARY", Qt::CaseInsensitive) && name.compare("NOCASE", Qt::CaseInsensitive) && name.compare("RTRIM", Qt::CaseInsensitive)) { emit requestCollation(name, eTextRep); } } static void regexp(sqlite3_context* ctx, int /*argc*/, sqlite3_value* argv[]) { // Get arguments and check their values QRegExp arg1((const char*)sqlite3_value_text(argv[0])); QString arg2((const char*)sqlite3_value_text(argv[1])); if(!arg1.isValid()) return sqlite3_result_error(ctx, "invalid operand", -1); // Set the pattern matching syntax to a Perl-like one. This is the default in Qt 4.x but Qt 5 // changes this to a greedy one (QRegExp::RegExp2). To make sure the behaviour of our application // doesn't change depending on the build environment, we make sure to always set the same pattern // matching syntax. arg1.setPatternSyntax(QRegExp::RegExp); // Perform the actual matching and return the result. Note that Qt's QRegExp returns -1 if the regex // doesn't match and the position in the string otherwise; SQLite expects a 0 for not found and a 1 for found. sqlite3_result_int(ctx, arg1.indexIn(arg2) >= 0); } bool DBBrowserDB::isOpen ( ) const { return _db != nullptr; } bool DBBrowserDB::getDirty() const { return !savepointList.empty(); } bool DBBrowserDB::open(const QString& db, bool readOnly) { if (isOpen()) close(); isEncrypted = false; dontCheckForStructureUpdates = false; // Get encryption settings for database file CipherSettings* cipherSettings = nullptr; if(tryEncryptionSettings(db, &isEncrypted, cipherSettings) == false) return false; // Open database file if(sqlite3_open_v2(db.toUtf8(), &_db, readOnly ? SQLITE_OPEN_READONLY : SQLITE_OPEN_READWRITE, nullptr) != SQLITE_OK) { lastErrorMessage = QString::fromUtf8((const char*)sqlite3_errmsg(_db)); return false; } // Set encryption details if database is encrypted #ifdef ENABLE_SQLCIPHER if(isEncrypted && cipherSettings) { executeSQL(QString("PRAGMA key = %1").arg(cipherSettings->getPassword()), false, false); executeSQL(QString("PRAGMA cipher_page_size = %1;").arg(cipherSettings->getPageSize()), false, false); executeSQL(QString("PRAGMA kdf_iter = %1;").arg(cipherSettings->getKdfIterations()), false, false); executeSQL(QString("PRAGMA cipher_hmac_algorithm = %1;").arg(cipherSettings->getHmacAlgorithm()), false, false); executeSQL(QString("PRAGMA cipher_kdf_algorithm = %1;").arg(cipherSettings->getKdfAlgorithm()), false, false); } #endif delete cipherSettings; if (_db) { // add UTF16 collation (comparison is performed by QString functions) sqlite3_create_collation(_db, "UTF16", SQLITE_UTF16, nullptr, sqlite_compare_utf16); // add UTF16CI (case insensitive) collation (comparison is performed by QString functions) sqlite3_create_collation(_db, "UTF16CI", SQLITE_UTF16, nullptr, sqlite_compare_utf16ci); // register collation callback Callback::func = std::bind(&DBBrowserDB::collationNeeded, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4); void (*c_callback)(void*, sqlite3*, int, const char*) = static_cast(Callback::callback); sqlite3_collation_needed(_db, nullptr, c_callback); // Set foreign key settings as requested in the preferences bool foreignkeys = Settings::getValue("db", "foreignkeys").toBool(); setPragma("foreign_keys", foreignkeys ? "1" : "0"); // Register REGEXP function if(Settings::getValue("extensions", "disableregex").toBool() == false) sqlite3_create_function(_db, "REGEXP", 2, SQLITE_UTF8, nullptr, regexp, nullptr, nullptr); // Check if file is read only QFileInfo fi(db); QFileInfo fid(fi.absoluteDir().absolutePath()); isReadOnly = readOnly || !fi.isWritable() || !fid.isWritable(); // Load extensions loadExtensionsFromSettings(); // Execute default SQL if(!isReadOnly) { QByteArray default_sql = Settings::getValue("db", "defaultsqltext").toByteArray(); if(!default_sql.isEmpty()) executeMultiSQL(default_sql, false, true); } curDBFilename = db; updateSchema(); return true; } else { return false; } } bool DBBrowserDB::attach(const QString& filePath, QString attach_as) { if(!_db) return false; waitForDbRelease(); // Check if this file has already been attached and abort if this is the case QString sql = "PRAGMA database_list;"; logSQL(sql, kLogMsg_App); sqlite3_stmt* db_vm; if(sqlite3_prepare_v2(_db, sql.toUtf8(), sql.toUtf8().length(), &db_vm, nullptr) == SQLITE_OK) { // Loop through all the databases QFileInfo fi(filePath); while(sqlite3_step(db_vm) == SQLITE_ROW) { QFileInfo path(QString::fromUtf8((const char*)sqlite3_column_text(db_vm, 2))); if(fi == path) { QString schema = QString::fromUtf8((const char*)sqlite3_column_text(db_vm, 1)); QMessageBox::information(nullptr, qApp->applicationName(), tr("This database has already been attached. Its schema name is '%1'.").arg(schema)); return false; } } sqlite3_finalize(db_vm); } // Ask for name to be given to the attached database if none was provided if(attach_as.isEmpty()) attach_as = QInputDialog::getText(nullptr, qApp->applicationName(), tr("Please specify the database name under which you want to access the attached database"), QLineEdit::Normal, QFileInfo(filePath).baseName() ).trimmed(); if(attach_as.isNull()) return false; #ifdef ENABLE_SQLCIPHER // Try encryption settings CipherSettings* cipherSettings = nullptr; bool is_encrypted; if(tryEncryptionSettings(filePath, &is_encrypted, cipherSettings) == false) return false; // Attach database QString key; if(cipherSettings && is_encrypted) key = "KEY " + cipherSettings->getPassword(); else key = "KEY ''"; // Only apply cipher settings if the database is encrypted if(cipherSettings && is_encrypted) { if(!executeSQL(QString("PRAGMA cipher_default_page_size = %1").arg(cipherSettings->getPageSize()), false)) { QMessageBox::warning(nullptr, qApp->applicationName(), lastErrorMessage); return false; } if(!executeSQL(QString("PRAGMA cipher_default_kdf_iter = %1").arg(cipherSettings->getKdfIterations()), false)) { QMessageBox::warning(nullptr, qApp->applicationName(), lastErrorMessage); return false; } if(!executeSQL(QString("PRAGMA cipher_hmac_algorithm = %1").arg(cipherSettings->getHmacAlgorithm()), false)) { QMessageBox::warning(nullptr, qApp->applicationName(), lastErrorMessage); return false; } if(!executeSQL(QString("PRAGMA cipher_kdf_algorithm = %1").arg(cipherSettings->getKdfAlgorithm()), false)) { QMessageBox::warning(nullptr, qApp->applicationName(), lastErrorMessage); return false; } } if(!executeSQL(QString("ATTACH '%1' AS %2 %3").arg(filePath).arg(sqlb::escapeIdentifier(attach_as)).arg(key), false)) { QMessageBox::warning(nullptr, qApp->applicationName(), lastErrorMessage); return false; } // Clean up cipher settings delete cipherSettings; #else // Attach database if(!executeSQL(QString("ATTACH '%1' AS %2").arg(filePath).arg(sqlb::escapeIdentifier(attach_as)), false)) { QMessageBox::warning(nullptr, qApp->applicationName(), lastErrorMessage); return false; } #endif // Update schema to load database schema of the newly attached database updateSchema(); return true; } bool DBBrowserDB::tryEncryptionSettings(const QString& filePath, bool* encrypted, CipherSettings*& cipherSettings) { lastErrorMessage = tr("Invalid file format"); // Open database file sqlite3* dbHandle; if(sqlite3_open_v2(filePath.toUtf8(), &dbHandle, SQLITE_OPEN_READONLY, nullptr) != SQLITE_OK) return false; // Try reading from database #ifdef ENABLE_SQLCIPHER bool isDotenvChecked = false; // Determine default encryption settings depending on the SQLCipher version we use QString sqlite_version, sqlcipher_version; getSqliteVersion(sqlite_version, sqlcipher_version); int enc_default_page_size, enc_default_kdf_iter; QString enc_default_hmac_algorithm, enc_default_kdf_algorithm; if(sqlcipher_version.startsWith('4')) { enc_default_page_size = 4096; enc_default_kdf_iter = 256000; enc_default_hmac_algorithm = "SHA512"; enc_default_kdf_algorithm = "SHA512"; } else { enc_default_page_size = 1024; enc_default_kdf_iter = 64000; enc_default_hmac_algorithm = "SHA1"; enc_default_kdf_algorithm = "SHA1"; } #endif *encrypted = false; cipherSettings = nullptr; while(true) { QString statement = "SELECT COUNT(*) FROM sqlite_master;"; QByteArray utf8Statement = statement.toUtf8(); sqlite3_stmt* vm; const char* tail; int err = sqlite3_prepare_v2(dbHandle, utf8Statement, utf8Statement.length(), &vm, &tail); if(err == SQLITE_BUSY || err == SQLITE_PERM || err == SQLITE_NOMEM || err == SQLITE_IOERR || err == SQLITE_CORRUPT || err == SQLITE_CANTOPEN) { lastErrorMessage = QString::fromUtf8((const char*)sqlite3_errmsg(dbHandle)); sqlite3_close(dbHandle); return false; } if(sqlite3_step(vm) != SQLITE_ROW) { sqlite3_finalize(vm); #ifdef ENABLE_SQLCIPHER bool foundDotenvPassword = false; // Being in a while loop, we don't want to check the same file multiple times if (!isDotenvChecked) { QFile databaseFile(filePath); QFileInfo databaseFileInfo(databaseFile); QString databaseDirectoryPath = databaseFileInfo.dir().path(); QString databaseFileName(databaseFileInfo.fileName()); QString dotenvFilePath = databaseDirectoryPath + "/.env"; static const QSettings::Format dotenvFormat = QSettings::registerFormat("env", &DotenvFormat::readEnvFile, nullptr); QSettings dotenv(dotenvFilePath, dotenvFormat); QVariant passwordValue = dotenv.value(databaseFileName); foundDotenvPassword = !passwordValue.isNull(); isDotenvChecked = true; if (foundDotenvPassword) { QString password = passwordValue.toString(); QVariant keyFormatValue = dotenv.value(databaseFileName + "_keyFormat", QVariant(CipherSettings::KeyFormats::Passphrase)); CipherSettings::KeyFormats keyFormat = CipherSettings::getKeyFormat(keyFormatValue.toInt()); int pageSize = dotenv.value(databaseFileName + "_pageSize", enc_default_page_size).toInt(); int kdfIterations = dotenv.value(databaseFileName + "_kdfIter", enc_default_kdf_iter).toInt(); QString hmacAlgorithm = dotenv.value(databaseFileName + "_hmacAlgorithm", enc_default_hmac_algorithm).toString(); QString kdfAlgorithm = dotenv.value(databaseFileName + "_kdfAlgorithm", enc_default_kdf_algorithm).toString(); delete cipherSettings; cipherSettings = new CipherSettings(); cipherSettings->setKeyFormat(keyFormat); cipherSettings->setPassword(password); cipherSettings->setPageSize(pageSize); cipherSettings->setKdfIterations(kdfIterations); cipherSettings->setHmacAlgorithm(hmacAlgorithm); cipherSettings->setKdfAlgorithm(kdfAlgorithm); } } if(foundDotenvPassword) { // Skip the CipherDialog prompt for now to test if the dotenv password was correct } else { CipherDialog *cipherDialog = new CipherDialog(nullptr, false); if(cipherDialog->exec()) { delete cipherSettings; cipherSettings = new CipherSettings(cipherDialog->getCipherSettings()); } else { sqlite3_close(dbHandle); *encrypted = false; delete cipherSettings; cipherSettings = nullptr; return false; } } // Close and reopen database first to be in a clean state after the failed read attempt from above sqlite3_close(dbHandle); if(sqlite3_open_v2(filePath.toUtf8(), &dbHandle, SQLITE_OPEN_READONLY, nullptr) != SQLITE_OK) { delete cipherSettings; cipherSettings = nullptr; return false; } // Set the key sqlite3_exec(dbHandle, QString("PRAGMA key = %1").arg(cipherSettings->getPassword()).toUtf8(), nullptr, nullptr, nullptr); // Set the page size if it differs from the default value if(cipherSettings->getPageSize() != enc_default_page_size) sqlite3_exec(dbHandle, QString("PRAGMA cipher_page_size = %1;").arg(cipherSettings->getPageSize()).toUtf8(), nullptr, nullptr, nullptr); if(cipherSettings->getKdfIterations() != enc_default_kdf_iter) sqlite3_exec(dbHandle, QString("PRAGMA kdf_iter = %1;").arg(cipherSettings->getKdfIterations()).toUtf8(), nullptr, nullptr, nullptr); if(cipherSettings->getHmacAlgorithm() != enc_default_hmac_algorithm) sqlite3_exec(dbHandle, QString("PRAGMA cipher_hmac_algorithm = %1;").arg(cipherSettings->getHmacAlgorithm()).toUtf8(), nullptr, nullptr, nullptr); if(cipherSettings->getKdfAlgorithm() != enc_default_kdf_algorithm) sqlite3_exec(dbHandle, QString("PRAGMA cipher_kdf_algorithm = %1;").arg(cipherSettings->getKdfAlgorithm()).toUtf8(), nullptr, nullptr, nullptr); *encrypted = true; #else lastErrorMessage = QString::fromUtf8((const char*)sqlite3_errmsg(dbHandle)); sqlite3_close(dbHandle); return false; #endif } else { sqlite3_finalize(vm); sqlite3_close(dbHandle); return true; } } } void DBBrowserDB::getSqliteVersion(QString& sqlite, QString& sqlcipher) { sqlite = QString(SQLITE_VERSION); // The SQLCipher version must be queried via a pragma and for a pragma we need a database connection. // Because we want to be able to query the SQLCipher version without opening a database file first, we // open a separate connection to an in-memory database here. sqlcipher = QString(); #ifdef ENABLE_SQLCIPHER sqlite3* dummy; if(sqlite3_open(":memory:", &dummy) == SQLITE_OK) { sqlite3_stmt* stmt; if(sqlite3_prepare_v2(dummy, "PRAGMA cipher_version", -1, &stmt, nullptr) == SQLITE_OK) { if(sqlite3_step(stmt) == SQLITE_ROW) sqlcipher = QByteArray(static_cast(sqlite3_column_blob(stmt, 0)), sqlite3_column_bytes(stmt, 0)); sqlite3_finalize(stmt); } sqlite3_close(dummy); } #endif } bool DBBrowserDB::setSavepoint(const QString& pointname) { if(!isOpen()) return false; if(savepointList.contains(pointname)) return true; QString query = QString("SAVEPOINT %1;").arg(sqlb::escapeIdentifier(pointname)); executeSQL(query, false, false); savepointList.append(pointname); emit dbChanged(getDirty()); return true; } bool DBBrowserDB::releaseSavepoint(const QString& pointname) { if(!isOpen()) return false; if(savepointList.contains(pointname) == false) // If there is no such savepoint in the list, // we have already released it, so in this case // the operation should be successfull return true; QString query = QString("RELEASE %1;").arg(sqlb::escapeIdentifier(pointname)); if(!executeSQL(query, false, false)) return false; // SQLite releases all savepoints that were created between // creation of given savepoint and releasing of it, // so we should too int point_index = savepointList.lastIndexOf(pointname); savepointList.erase(savepointList.begin()+point_index, savepointList.end()); emit dbChanged(getDirty()); return true; } bool DBBrowserDB::revertToSavepoint(const QString& pointname) { if(!isOpen() || savepointList.contains(pointname) == false) return false; QString query = QString("ROLLBACK TO SAVEPOINT %1;").arg(sqlb::escapeIdentifier(pointname)); executeSQL(query, false, false); query = QString("RELEASE %1;").arg(sqlb::escapeIdentifier(pointname)); executeSQL(query, false, false); // SQLite releases all savepoints that were created between // creation of given savepoint and releasing of it, // so we should too int point_index = savepointList.lastIndexOf(pointname); savepointList.erase(savepointList.begin()+point_index, savepointList.end()); emit dbChanged(getDirty()); return true; } bool DBBrowserDB::releaseAllSavepoints() { if(!_db) return false; waitForDbRelease(); for(const QString& point : savepointList) { if(!releaseSavepoint(point)) return false; } // When still in a transaction, commit that too if(sqlite3_get_autocommit(_db) == 0) executeSQL("COMMIT;", false, false); return true; } bool DBBrowserDB::revertAll() { for(const QString& point : savepointList) { if(!revertToSavepoint(point)) return false; } return true; } bool DBBrowserDB::create ( const QString & db) { if (isOpen()) close(); // read encoding from settings and open with sqlite3_open for utf8 and sqlite3_open16 for utf16 QString sEncoding = Settings::getValue("db", "defaultencoding").toString(); int openresult = SQLITE_OK; if(sEncoding == "UTF-8" || sEncoding == "UTF8" || sEncoding == "Latin1") openresult = sqlite3_open(db.toUtf8(), &_db); else openresult = sqlite3_open16(db.utf16(), &_db); if( openresult != SQLITE_OK ){ lastErrorMessage = QString::fromUtf8((const char*)sqlite3_errmsg(_db)); sqlite3_close(_db); _db = nullptr; return false; } if (_db) { // Set foreign key settings as requested in the preferences bool foreignkeys = Settings::getValue("db", "foreignkeys").toBool(); setPragma("foreign_keys", foreignkeys ? "1" : "0"); // Register REGEXP function if(Settings::getValue("extensions", "disableregex").toBool() == false) sqlite3_create_function(_db, "REGEXP", 2, SQLITE_UTF8, nullptr, regexp, nullptr, nullptr); // force sqlite3 do write proper file header // if we don't create and drop the table we might end up // with a 0 byte file, if the user cancels the create table dialog { NoStructureUpdateChecks nup(*this); executeSQL("CREATE TABLE notempty (id integer primary key);", false, false); executeSQL("DROP TABLE notempty;", false, false); } // Load extensions loadExtensionsFromSettings(); // Execute default SQL QByteArray default_sql = Settings::getValue("db", "defaultsqltext").toByteArray(); if(!default_sql.isEmpty()) executeMultiSQL(default_sql, false, true); curDBFilename = db; isEncrypted = false; isReadOnly = false; updateSchema(); return true; } else { return false; } } bool DBBrowserDB::close() { waitForDbRelease(); if(_db) { if (getDirty()) { // In-memory databases can't be saved to disk. So the need another text than regular databases. // Note that the QMessageBox::Yes option in the :memory: case and the QMessageBox::No option in the regular case are // doing the same job: proceeding but not saving anything. QMessageBox::StandardButton reply; if(curDBFilename == ":memory:") { reply = QMessageBox::question(nullptr, QApplication::applicationName(), tr("Do you really want to close this temporary database? All data will be lost."), QMessageBox::Yes | QMessageBox::Cancel); } else { reply = QMessageBox::question(nullptr, QApplication::applicationName(), tr("Do you want to save the changes made to the database file %1?").arg(curDBFilename), QMessageBox::Save | QMessageBox::No | QMessageBox::Cancel); } // If the user clicked the cancel button stop here and return false if(reply == QMessageBox::Cancel) return false; // If he didn't it was either yes or no if(reply == QMessageBox::Save) releaseAllSavepoints(); else revertAll(); //not really necessary, I think... but will not hurt. } sqlite3_close(_db); _db = nullptr; } schemata.clear(); savepointList.clear(); emit dbChanged(getDirty()); emit structureUpdated(); // Return true to tell the calling function that the closing wasn't cancelled by the user return true; } DBBrowserDB::db_pointer_type DBBrowserDB::get(QString user) { if(!_db) return nullptr; waitForDbRelease(); db_user = user; db_used = true; return db_pointer_type(_db, DatabaseReleaser(this)); } void DBBrowserDB::waitForDbRelease() { if(!_db) return; std::unique_lock lk(m); while(db_used) { // notify user, give him the opportunity to cancel that auto str = db_user; lk.unlock(); QMessageBox msgBox; msgBox.setText(tr("The database is currently busy: ") + str); msgBox.setInformativeText(tr("Do you want to abort that other operation?")); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::No); int ret = msgBox.exec(); if(ret == QMessageBox::Yes) sqlite3_interrupt(_db); lk.lock(); cv.wait(lk, [this](){ return !db_used; }); } } bool DBBrowserDB::dump(const QString& filePath, const QStringList& tablesToDump, bool insertColNames, bool insertNewSyntx, bool exportSchema, bool exportData, bool keepOldSchema) { waitForDbRelease(); // Open file QFile file(filePath); if(file.open(QIODevice::WriteOnly|QIODevice::Text)) { QApplication::setOverrideCursor(Qt::WaitCursor); // Count the total number of all records in all tables for the progress dialog size_t numRecordsTotal = 0, numRecordsCurrent = 0; objectMap objMap = schemata["main"]; // We only always export the main database, not the attached databases QList tables = objMap.values("table"); QMutableListIterator it(tables); while(it.hasNext()) { it.next(); // Remove the sqlite_stat1 and the sqlite_sequence tables if they exist. Also remove any tables which are not selected for export. if(it.value()->name() == "sqlite_stat1" || it.value()->name() == "sqlite_sequence" || !tablesToDump.contains(it.value()->name())) { it.remove(); } else { // Otherwise get the number of records in this table numRecordsTotal += querySingleValueFromDb(QString("SELECT COUNT(*) FROM %1;") .arg(sqlb::ObjectIdentifier("main", it.value()->name()).toString())).toUInt(); } } QProgressDialog progress(tr("Exporting database to SQL file..."), tr("Cancel"), 0, numRecordsTotal); progress.setWindowModality(Qt::ApplicationModal); progress.show(); qApp->processEvents(); // Open text stream to the file QTextStream stream(&file); // Put the SQL commands in a transaction block stream << "BEGIN TRANSACTION;\n"; // First export the schema of all selected tables. We need to export the schema of all tables before we export the first INSERT statement to // make sure foreign keys are working properly. if(exportSchema) { for(auto it : tables) { // Write the SQL string used to create this table to the output file if(!keepOldSchema) stream << QString("DROP TABLE IF EXISTS %1;\n").arg(sqlb::escapeIdentifier(it->name())); if(it->fullyParsed()) stream << it->sql("main", true) << "\n"; else stream << it->originalSql() << ";\n"; } } // Now export the data as well if(exportData) { for(auto it : tables) { // get columns QStringList cols(std::dynamic_pointer_cast(it)->fieldNames()); QString sQuery = QString("SELECT * FROM %1;").arg(sqlb::escapeIdentifier(it->name())); QByteArray utf8Query = sQuery.toUtf8(); sqlite3_stmt *stmt; QString lineSep(QString(")%1\n").arg(insertNewSyntx?',':';')); int status = sqlite3_prepare_v2(_db, utf8Query.data(), utf8Query.size(), &stmt, nullptr); if(SQLITE_OK == status) { int columns = sqlite3_column_count(stmt); size_t counter = 0; qApp->processEvents(); while(sqlite3_step(stmt) == SQLITE_ROW) { if (counter) stream << lineSep; if (!insertNewSyntx || !counter) { stream << "INSERT INTO " << sqlb::escapeIdentifier(it->name()); if (insertColNames) stream << " (" << sqlb::escapeIdentifier(cols).join(",") << ")"; stream << " VALUES ("; } else { stream << " ("; } for (int i = 0; i < columns; ++i) { int fieldsize = sqlite3_column_bytes(stmt, i); int fieldtype = sqlite3_column_type(stmt, i); QByteArray bcontent( (const char*)sqlite3_column_blob(stmt, i), fieldsize); if(bcontent.left(2048).contains('\0')) // binary check { stream << QString("X'%1'").arg(QString(bcontent.toHex())); } else { switch(fieldtype) { case SQLITE_TEXT: case SQLITE_BLOB: stream << "'" << bcontent.replace("'", "''") << "'"; break; case SQLITE_NULL: stream << "NULL"; break; case SQLITE_FLOAT: if(bcontent.indexOf("Inf") != -1) stream << "'" << bcontent << "'"; else stream << bcontent; break; default: stream << bcontent; } } if(i != columns - 1) stream << ','; } progress.setValue(++numRecordsCurrent); if(counter % 5000 == 0) qApp->processEvents(); counter++; if(progress.wasCanceled()) { sqlite3_finalize(stmt); file.close(); file.remove(); QApplication::restoreOverrideCursor(); return false; } } if (counter > 0) stream << ");\n"; } sqlite3_finalize(stmt); } } // Finally export all objects other than tables if(exportSchema) { for(auto it : objMap) { // Make sure it's not a table again if(it->type() == sqlb::Object::Types::Table) continue; // If this object is based on a table (e.g. is an index for that table) it depends on the existence of this table. // So if we didn't export the base table this depends on, don't export this object either. if(!it->baseTable().isEmpty() && !tablesToDump.contains(it->baseTable())) continue; // Write the SQL string used to create this object to the output file if(!it->originalSql().isEmpty()) { if(!keepOldSchema) stream << QString("DROP %1 IF EXISTS %2;\n") .arg(sqlb::Object::typeToString(it->type()).toUpper()) .arg(sqlb::escapeIdentifier(it->name())); if(it->fullyParsed()) stream << it->sql("main", true) << "\n"; else stream << it->originalSql() << ";\n"; } } } // Done stream << "COMMIT;\n"; file.close(); QApplication::restoreOverrideCursor(); qApp->processEvents(); return true; } return false; } bool DBBrowserDB::executeSQL(QString statement, bool dirtyDB, bool logsql) { waitForDbRelease(); if(!_db) { lastErrorMessage = tr("No database file opened"); return false; } statement = statement.trimmed(); if (logsql) logSQL(statement, kLogMsg_App); if (dirtyDB) setSavepoint(); char* errmsg; if (SQLITE_OK == sqlite3_exec(_db, statement.toUtf8(), nullptr, nullptr, &errmsg)) { // Update DB structure after executing an SQL statement. But try to avoid doing unnecessary updates. if(!dontCheckForStructureUpdates && (statement.startsWith("ALTER", Qt::CaseInsensitive) || statement.startsWith("CREATE", Qt::CaseInsensitive) || statement.startsWith("DROP", Qt::CaseInsensitive) || statement.startsWith("ROLLBACK", Qt::CaseInsensitive))) updateSchema(); return true; } else { lastErrorMessage = QString("%1 (%2)").arg(QString::fromUtf8(errmsg)).arg(statement); qWarning() << "executeSQL: " << statement << "->" << errmsg; sqlite3_free(errmsg); return false; } } bool DBBrowserDB::executeMultiSQL(QByteArray query, bool dirty, bool log) { waitForDbRelease(); if(!_db) { lastErrorMessage = tr("No database file opened"); return false; } // Log the statement if needed if(log) logSQL(query, kLogMsg_App); // Show progress dialog QProgressDialog progress(tr("Executing SQL..."), tr("Cancel"), 0, 100); progress.setWindowModality(Qt::ApplicationModal); progress.show(); // Execute the statement by looping until SQLite stops giving back a tail string sqlite3_stmt* vm; const char *tail = query.constData(); const char * const tail_start = tail; const char * const tail_end = tail + query.size() + 1; size_t total_tail_length = static_cast(tail_end - tail_start); int res = SQLITE_OK; unsigned int line = 0; bool structure_updated = false; int last_progress_value = -1; QString savepoint_name; while(tail && *tail != 0 && (res == SQLITE_OK || res == SQLITE_DONE)) { line++; // Update progress dialog, keep UI responsive. Make sure to not spend too much time updating the progress dialog in case there are many small statements. int progress_value = static_cast(static_cast(tail - tail_start) / total_tail_length * 100.0f); if(progress_value > last_progress_value) { progress.setValue(progress_value); qApp->processEvents(); if(progress.wasCanceled()) { lastErrorMessage = tr("Action cancelled."); return false; } last_progress_value = progress_value; } // Check next statement { // Ignore all whitespace at the start of the current tail const char* tail_ptr = tail; while(std::isspace(*tail_ptr)) tail_ptr++; // Convert the first couple of bytes of the tail to a C++ string for easier handling. We only need the first 8 bytes (in cae it's a ROLLBACK // statement), so no need to convert the entire tail. If the tail is less than 8 bytes long, make sure not to read past its end. size_t length = std::min(static_cast(tail_end - tail + 1), static_cast(8)); std::string next_statement(tail_ptr, length); std::transform(next_statement.begin(), next_statement.end(), next_statement.begin(), ::toupper); // Check for transaction statements and skip until the next semicolon if(next_statement.compare(0, 6, "COMMIT") == 0 || next_statement.compare(0, 4, "END ") == 0 || next_statement.compare(0, 6, "BEGIN ") == 0) { while(tail != tail_end) { if(*tail++ == ';') break; } // Set DB to dirty and create a restore point if we haven't done that yet if(savepoint_name.isNull()) { savepoint_name = generateSavepointName("execmultisql"); setSavepoint(savepoint_name); dirty = true; } // Don't just execute next statement. Start next statement with the same checks continue; } // Check whether the DB structure is changed by this statement if(!dontCheckForStructureUpdates && !structure_updated) { // Check if it's a modifying statement if(next_statement.compare(0, 5, "ALTER") == 0 || next_statement.compare(0, 6, "CREATE") == 0 || next_statement.compare(0, 4, "DROP") == 0 || next_statement.compare(0, 8, "ROLLBACK") == 0) structure_updated = true; } } // Execute next statement res = sqlite3_prepare_v2(_db, tail, tail_end - tail + 1, &vm, &tail); if(res == SQLITE_OK) { switch(sqlite3_step(vm)) { case SQLITE_OK: case SQLITE_ROW: case SQLITE_DONE: case SQLITE_MISUSE: // This is a workaround around problematic user scripts. If they lead to empty commands, // SQLite will return a misuse error which we hereby ignore. sqlite3_finalize(vm); break; default: // In case of *any* error abort the execution and roll back the transaction // Make sure to save the error message first before any other function can mess around with it lastErrorMessage = tr("Error in statement #%1: %2.\nAborting execution%3.") .arg(line) .arg(sqlite3_errmsg(_db)) .arg(dirty ? tr(" and rolling back") : ""); qWarning() << lastErrorMessage; // Clean up sqlite3_finalize(vm); if(dirty) revertToSavepoint(savepoint_name); return false; } } else { lastErrorMessage = tr("Error in statement #%1: %2.\nAborting execution%3.") .arg(line) .arg(sqlite3_errmsg(_db)) .arg(dirty ? tr(" and rolling back") : ""); qWarning() << lastErrorMessage; if(dirty) revertToSavepoint(savepoint_name); return false; } } // If the DB structure was changed by some command in this SQL script, update our schema representations if(structure_updated) updateSchema(); // Exit return true; } QVariant DBBrowserDB::querySingleValueFromDb(const QString& statement, bool log) { waitForDbRelease(); if(!_db) return QVariant(); if(log) logSQL(statement, kLogMsg_App); QByteArray utf8Query = statement.toUtf8(); sqlite3_stmt* stmt; if(sqlite3_prepare_v2(_db, utf8Query, utf8Query.size(), &stmt, nullptr) == SQLITE_OK) { if(sqlite3_step(stmt) == SQLITE_ROW) { if(sqlite3_column_count(stmt) > 0 && sqlite3_column_type(stmt, 0) != SQLITE_NULL) { int bytes = sqlite3_column_bytes(stmt, 0); if(bytes) return QByteArray(static_cast(sqlite3_column_blob(stmt, 0)), bytes); else return ""; } } else { lastErrorMessage = tr("didn't receive any output from %1").arg(statement); qWarning() << lastErrorMessage; } sqlite3_finalize(stmt); } else { lastErrorMessage = tr("could not execute command: %1").arg(sqlite3_errmsg(_db)); qWarning() << lastErrorMessage; } return QVariant(); } bool DBBrowserDB::getRow(const sqlb::ObjectIdentifier& table, const QString& rowid, QVector& rowdata) { waitForDbRelease(); if(!_db) return false; QString sQuery = QString("SELECT * FROM %1 WHERE %2='%3';") .arg(table.toString()) .arg(sqlb::escapeIdentifier(getObjectByName(table)->rowidColumn())) .arg(rowid); QByteArray utf8Query = sQuery.toUtf8(); sqlite3_stmt *stmt; bool ret = false; if(sqlite3_prepare_v2(_db, utf8Query, utf8Query.size(), &stmt, nullptr) == SQLITE_OK) { // even this is a while loop, the statement should always only return 1 row while(sqlite3_step(stmt) == SQLITE_ROW) { for (int i = 0; i < sqlite3_column_count(stmt); ++i) { if(sqlite3_column_type(stmt, i) == SQLITE_NULL) { rowdata.append(QByteArray()); } else { int bytes = sqlite3_column_bytes(stmt, i); if(bytes) rowdata.append(QByteArray(static_cast(sqlite3_column_blob(stmt, i)), bytes)); else rowdata.append(QByteArray("")); } } ret = true; } } sqlite3_finalize(stmt); return ret; } QString DBBrowserDB::max(const sqlb::ObjectIdentifier& tableName, const sqlb::Field& field) const { QString sQuery = QString("SELECT MAX(CAST(%2 AS INTEGER)) FROM %1;").arg(tableName.toString()).arg(sqlb::escapeIdentifier(field.name())); QByteArray utf8Query = sQuery.toUtf8(); sqlite3_stmt *stmt; QString ret = "0"; if(sqlite3_prepare_v2(_db, utf8Query, utf8Query.size(), &stmt, nullptr) == SQLITE_OK) { // even this is a while loop, the statement should always only return 1 row while(sqlite3_step(stmt) == SQLITE_ROW) { if(sqlite3_column_count(stmt) == 1) ret = QString::fromUtf8(reinterpret_cast(sqlite3_column_text(stmt, 0))); } } sqlite3_finalize(stmt); return ret; } QString DBBrowserDB::emptyInsertStmt(const QString& schemaName, const sqlb::Table& t, const QString& pk_value) const { QString stmt = QString("INSERT INTO %1.%2").arg(sqlb::escapeIdentifier(schemaName)).arg(sqlb::escapeIdentifier(t.name())); QStringList vals; QStringList fields; for(const sqlb::Field& f : t.fields) { sqlb::ConstraintPtr pk = t.constraint({f.name()}, sqlb::Constraint::PrimaryKeyConstraintType); if(pk) { fields << f.name(); if(!pk_value.isNull()) { vals << (f.isText()? "'" + pk_value + "'" : pk_value); } else { if(f.notnull()) { QString maxval = this->max(sqlb::ObjectIdentifier(schemaName, t.name()), f); QString newval = QString::number(maxval.toLongLong() + 1); vals << (f.isText()? "'" + newval + "'" : newval); } else { vals << "NULL"; } } } else if(f.notnull() && f.defaultValue().length() == 0) { fields << f.name(); if(f.isInteger()) vals << "0"; else vals << "''"; } else { // don't insert into fields with a default value // or we will never see it. if(f.defaultValue().length() == 0) { fields << f.name(); vals << "NULL"; } } } if(fields.empty()) { stmt.append(" DEFAULT VALUES;"); } else { stmt.append("("); stmt.append(sqlb::escapeIdentifier(fields).join(",")); stmt.append(") VALUES ("); stmt.append(vals.join(",")); stmt.append(");"); } return stmt; } QString DBBrowserDB::addRecord(const sqlb::ObjectIdentifier& tablename) { waitForDbRelease(); if(!_db) return QString(); sqlb::TablePtr table = getObjectByName(tablename); if(!table) return QString(); // For tables without rowid we have to set the primary key by ourselves. We do so by querying for the largest value in the PK column // and adding one to it. QString sInsertstmt; QString pk_value; if(table->isWithoutRowidTable()) { pk_value = QString::number(max(tablename, *sqlb::findField(table, table->rowidColumn())).toLongLong() + 1); sInsertstmt = emptyInsertStmt(tablename.schema(), *table, pk_value); } else { sInsertstmt = emptyInsertStmt(tablename.schema(), *table); } if(!executeSQL(sInsertstmt)) { qWarning() << "addRecord: " << lastErrorMessage; return QString(); } else { if(table->isWithoutRowidTable()) return pk_value; else return QString::number(sqlite3_last_insert_rowid(_db)); } } bool DBBrowserDB::deleteRecords(const sqlb::ObjectIdentifier& table, const QStringList& rowids, const QString& pseudo_pk) { if (!isOpen()) return false; // Get primary key of the object to edit. QString pk = primaryKeyForEditing(table, pseudo_pk); if(pk.isNull()) { lastErrorMessage = tr("Cannot delete this object"); return false; } QStringList quoted_rowids; for(QString rowid : rowids) quoted_rowids.append("'" + rowid.replace("'", "''") + "'"); QString statement = QString("DELETE FROM %1 WHERE %2 IN (%3);") .arg(table.toString()) .arg(pk) .arg(quoted_rowids.join(", ")); if(executeSQL(statement)) { return true; } else { qWarning() << "deleteRecord: " << lastErrorMessage; return false; } } bool DBBrowserDB::updateRecord(const sqlb::ObjectIdentifier& table, const QString& column, const QString& rowid, const QByteArray& value, bool itsBlob, const QString& pseudo_pk) { waitForDbRelease(); if (!isOpen()) return false; // Get primary key of the object to edit. QString pk = primaryKeyForEditing(table, pseudo_pk); if(pk.isNull()) { lastErrorMessage = tr("Cannot set data on this object"); return false; } QString sql = QString("UPDATE %1 SET %2=? WHERE %3='%4';") .arg(table.toString()) .arg(sqlb::escapeIdentifier(column)) .arg(sqlb::escapeIdentifier(pk)) .arg(QString(rowid).replace("'", "''")); logSQL(sql, kLogMsg_App); setSavepoint(); // If we get a NULL QByteArray we insert a NULL value, and for that // we can pass NULL to sqlite3_bind_text() so that it behaves like sqlite3_bind_null() const char *rawValue = value.isNull() ? nullptr : value.constData(); sqlite3_stmt* stmt; int success = 1; if(sqlite3_prepare_v2(_db, sql.toUtf8(), -1, &stmt, nullptr) != SQLITE_OK) success = 0; if(success == 1) { if(itsBlob) { if(sqlite3_bind_blob(stmt, 1, rawValue, value.length(), SQLITE_STATIC)) success = -1; } else { if(sqlite3_bind_text(stmt, 1, rawValue, value.length(), SQLITE_STATIC)) success = -1; } } if(success == 1 && sqlite3_step(stmt) != SQLITE_DONE) success = -1; if(success != 0 && sqlite3_finalize(stmt) != SQLITE_OK) success = -1; if(success == 1) { return true; } else { lastErrorMessage = sqlite3_errmsg(_db); qWarning() << "updateRecord: " << lastErrorMessage; return false; } } QString DBBrowserDB::primaryKeyForEditing(const sqlb::ObjectIdentifier& table, const QString& pseudo_pk) const { // This function returns the primary key of the object to edit. For views we support 'pseudo' primary keys which must be specified manually. // If no pseudo pk is specified we'll take the rowid column of the table instead. If this neither a table nor was a pseudo-PK specified, // it is most likely a view that hasn't been configured for editing yet. In this case we return a null string to abort. if(pseudo_pk.isEmpty()) { sqlb::TablePtr tbl = getObjectByName(table); if(tbl) return tbl->rowidColumn(); } else { return pseudo_pk; } return QString(); } bool DBBrowserDB::createTable(const sqlb::ObjectIdentifier& name, const sqlb::FieldVector& structure) { // Build SQL statement sqlb::Table table(name.name()); for(size_t i=0;i(tablename); // Check if field actually exists if(!name.isNull() && sqlb::findField(oldSchema, name) == oldSchema->fields.end()) { lastErrorMessage = tr("renameColumn: cannot find column %1.").arg(name); return false; } // Create savepoint to be able to go back to it in case of any error QString savepointName = generateSavepointName("renamecolumn"); if(!setSavepoint(savepointName)) { lastErrorMessage = tr("renameColumn: creating savepoint failed. DB says: %1").arg(lastErrorMessage); return false; } // Create a new table with a name that hopefully doesn't exist yet. // Its layout is exactly the same as the one of the table to change - except for the column to change // of course, and the table constraints which are copied from the table parameter. sqlb::Table newSchema = *oldSchema; QString temp_table_name = generateTemporaryTableName(newSchemaName); newSchema.setName(temp_table_name); newSchema.setConstraints(table.allConstraints()); newSchema.setRowidColumn(table.rowidColumn()); QString select_cols; if(!to) { // We want drop the column - so just remove the field. If the name is set to null, skip this step. This effectively leaves all fields as they are, // thus only changing the table constraints. if(!name.isNull()) sqlb::removeField(newSchema, name); for(size_t i=0;iname(), to->name()); *(index + move) = *to; } // Create the new table NoStructureUpdateChecks nup(*this); if(!executeSQL(newSchema.sql(newSchemaName), true, true)) { QString error(tr("renameColumn: creating new table failed. DB says: %1").arg(lastErrorMessage)); revertToSavepoint(savepointName); lastErrorMessage = error; return false; } // Copy the data from the old table to the new one if(!executeSQL(QString("INSERT INTO %1.%2 SELECT %3 FROM %4;") .arg(sqlb::escapeIdentifier(newSchemaName)) .arg(sqlb::escapeIdentifier(temp_table_name)) .arg(select_cols) .arg(tablename.toString()))) { QString error(tr("renameColumn: copying data to new table failed. DB says:\n%1").arg(lastErrorMessage)); revertToSavepoint(savepointName); lastErrorMessage = error; return false; } // Save all indices, triggers and views associated with this table because SQLite deletes them when we drop the table in the next step QStringList otherObjectsSql; for(auto it : schemata[tablename.schema()]) { // If this object references the table and it's not the table itself save it's SQL string if(it->baseTable() == tablename.name() && it->type() != sqlb::Object::Types::Table) { // If this is an index, update the fields first. This highly increases the chance that the SQL statement won't throw an // error later on when we try to recreate it. if(it->type() == sqlb::Object::Types::Index) { sqlb::IndexPtr idx = std::dynamic_pointer_cast(it); // Are we updating a field name or are we removing a field entirely? if(to) { // We're updating a field name. So search for it in the index and replace it whereever it is found for(size_t i=0;ifields.size();i++) { if(idx->fields[i].name() == name) idx->fields[i].setName(to->name()); } } else { // We're removing a field. So remove it from any indices, too. while(sqlb::removeField(idx, name)) ; } // Only try to add the index later if it has any columns remaining. Also use the new schema name here, too, to basically move // any index that references the table to the same new schema as the table. if(idx->fields.size()) otherObjectsSql << idx->sql(newSchemaName); } else { // If it's a view or a trigger we don't have any chance to corrections yet. Just store the statement as is and // hope for the best. otherObjectsSql << it->originalSql().trimmed() + ";"; } } } // We need to disable foreign keys here. The reason is that in the next step the entire table will be dropped and there might be foreign keys // in other tables that reference this table. These foreign keys would then cause the drop command in the next step to fail. However, we can't // simply disable foreign keys here since that is not allowed from inside a transaction and we definitely are inside a transaction at that point. // So what we do instead is defer foreign key enforcement until the end of the transaction which effectively disables foreign keys for us here. // But because we don't really want to defer foreign keys, the former value of that pragma is saved here in order to restore the old value later. QString foreignKeysOldSettings = getPragma("defer_foreign_keys"); setPragma("defer_foreign_keys", "1"); // Delete the old table if(!executeSQL(QString("DROP TABLE %1;").arg(tablename.toString()), true, true)) { QString error(tr("renameColumn: deleting old table failed. DB says: %1").arg(lastErrorMessage)); revertToSavepoint(savepointName); lastErrorMessage = error; return false; } // Rename the temporary table if(!renameTable(newSchemaName, temp_table_name, tablename.name())) { revertToSavepoint(savepointName); return false; } // Restore the former foreign key settings setPragma("defer_foreign_keys", foreignKeysOldSettings); // Restore the saved triggers, views and indices QString errored_sqls; for(const QString& sql : otherObjectsSql) { if(!executeSQL(sql, true, true)) errored_sqls += sql + "\n"; } if(!errored_sqls.isEmpty()) { QMessageBox::information(nullptr, qApp->applicationName(), tr("Restoring some of the objects associated with this table failed. " "This is most likely because some column names changed. " "Here's the SQL statement which you might want to fix and execute manually:\n\n") + errored_sqls); } // Release the savepoint - everything went fine if(!releaseSavepoint(savepointName)) { lastErrorMessage = tr("renameColumn: releasing savepoint failed. DB says: %1").arg(lastErrorMessage); return false; } // Success, update the DB schema before returning updateSchema(); return true; } bool DBBrowserDB::renameTable(const QString& schema, const QString& from_table, const QString& to_table) { // Do nothing if table names are the same if(from_table == to_table) return true; // Check if table names only differ in case. If they do, we have to rename the table twice because SQLite can't rename 'table' to 'Table'. // To solve this we rename 'table' to 'some temp name' and then 'some temp name' to 'Table'. if(from_table.compare(to_table, Qt::CaseInsensitive) == 0) { // Generate a temporary table name and rename the table via that by recusrively calling this function QString temp_name = generateTemporaryTableName(schema); if(!renameTable(schema, from_table, temp_name)) return false; if(!renameTable(schema, temp_name, to_table)) return false; // Exit here return true; } // The old and the new table names differ (and that not only in case) // Rename the table QString sql = QString("ALTER TABLE %1.%2 RENAME TO %3") .arg(sqlb::escapeIdentifier(schema)) .arg(sqlb::escapeIdentifier(from_table)) .arg(sqlb::escapeIdentifier(to_table)); if(!executeSQL(sql)) { QString error = tr("Error renaming table '%1' to '%2'." "Message from database engine:\n%3").arg(from_table).arg(to_table).arg(lastErrorMessage); lastErrorMessage = error; qWarning() << lastErrorMessage; return false; } else { return true; } } objectMap DBBrowserDB::getBrowsableObjects(const QString& schema) const { objectMap res; for(auto it=schemata[schema].constBegin();it!=schemata[schema].constEnd();++it) { if(it.key() == "table" || it.key() == "view") res.insert(it.key(), it.value()); } return res; } void DBBrowserDB::logSQL(QString statement, int msgtype) { // Remove any leading and trailing spaces, tabs, or line breaks first statement = statement.trimmed(); // Replace binary log messages by a placeholder text instead of printing gibberish for(int i=0;i0?i-1:0); statement.append(tr("... ...")); // early exit if we detect a binary character, // to prevent checking all characters in a potential big string break; } } emit sqlExecuted(statement, msgtype); } void DBBrowserDB::updateSchema() { waitForDbRelease(); schemata.clear(); // Exit here is no DB is opened if(!isOpen()) return; // Get a list of all databases. This list always includes the main and the temp database but can include more items if there are attached databases QString db_statement = "PRAGMA database_list;"; QByteArray db_utf8Statement = db_statement.toUtf8(); logSQL(db_statement, kLogMsg_App); sqlite3_stmt* db_vm; if(sqlite3_prepare_v2(_db, db_utf8Statement, db_utf8Statement.length(), &db_vm, nullptr) == SQLITE_OK) { // Loop through all the databases while(sqlite3_step(db_vm) == SQLITE_ROW) { // Get the schema name which is in column 1 (counting starts with 0). 0 contains an ID and 2 the file path. QString schema_name = QString::fromUtf8((const char*)sqlite3_column_text(db_vm, 1)); // Always add the schema to the map. This makes sure it's even then added when there are no objects in the database schemata[schema_name] = objectMap(); // Get a list of all the tables for the current database schema. We need to do this differently for normal databases and the temporary schema // because SQLite doesn't understand the "temp.sqlite_master" notation. QString statement; if(schema_name == "temp") statement = QString("SELECT type,name,sql,tbl_name FROM sqlite_temp_master;"); else statement = QString("SELECT type,name,sql,tbl_name FROM %1.sqlite_master;").arg(sqlb::escapeIdentifier(schema_name)); QByteArray utf8Statement = statement.toUtf8(); logSQL(statement, kLogMsg_App); sqlite3_stmt* vm; int err = sqlite3_prepare_v2(_db, utf8Statement, utf8Statement.length(), &vm, nullptr); if(err == SQLITE_OK) { while(sqlite3_step(vm) == SQLITE_ROW) { QString val_type = QString::fromUtf8((const char*)sqlite3_column_text(vm, 0)); QString val_name = QString::fromUtf8((const char*)sqlite3_column_text(vm, 1)); QString val_sql = QString::fromUtf8((const char*)sqlite3_column_text(vm, 2)); QString val_tblname = QString::fromUtf8((const char*)sqlite3_column_text(vm, 3)); val_sql.replace("\r", ""); if(!val_sql.isEmpty()) { sqlb::ObjectPtr object; if(val_type == "table") object = sqlb::Table::parseSQL(val_sql); else if(val_type == "index") object = sqlb::Index::parseSQL(val_sql); else if(val_type == "trigger") object = sqlb::Trigger::parseSQL(val_sql); else if(val_type == "view") object = sqlb::View::parseSQL(val_sql); else continue; // If parsing wasn't successful set the object name manually, so that at least the name is going to be correct if(!object->fullyParsed()) object->setName(val_name); // For virtual tables and views query the column list using the SQLite pragma because for both we can't yet rely on our grammar parser if((object->type() == sqlb::Object::Types::Table && std::dynamic_pointer_cast(object)->isVirtual()) || object->type() == sqlb::Object::Types::View) { auto columns = queryColumnInformation(schema_name, val_name); if(object->type() == sqlb::Object::Types::Table) { sqlb::TablePtr tab = std::dynamic_pointer_cast(object); for(const auto& column : columns) tab->fields.emplace_back(column.first, column.second); } else { sqlb::ViewPtr view = std::dynamic_pointer_cast(object); for(const auto& column : columns) view->fields.emplace_back(column.first, column.second); } } else if(object->type() == sqlb::Object::Types::Trigger) { // For triggers set the name of the table the trigger operates on here because we don't have a parser for trigger statements yet. sqlb::TriggerPtr trg = std::dynamic_pointer_cast(object); trg->setTable(val_tblname); } schemata[schema_name].insert(val_type, object); } } sqlite3_finalize(vm); } else { qWarning() << tr("could not get list of db objects: %1, %2").arg(err).arg(sqlite3_errmsg(_db)); } } sqlite3_finalize(db_vm); } else { qWarning() << tr("could not get list of databases: %1").arg(sqlite3_errmsg(_db)); } emit structureUpdated(); } QString DBBrowserDB::getPragma(const QString& pragma) { waitForDbRelease(); if(!isOpen()) return QString(); QString sql; if (pragma=="case_sensitive_like") sql = "SELECT 'x' NOT LIKE 'X'"; else sql = QString("PRAGMA %1").arg(pragma); sqlite3_stmt* vm; const char* tail; QString retval; // Get value from DB int err = sqlite3_prepare_v2(_db, sql.toUtf8(), sql.toUtf8().length(), &vm, &tail); if(err == SQLITE_OK){ logSQL(sql, kLogMsg_App); if(sqlite3_step(vm) == SQLITE_ROW) retval = QString::fromUtf8((const char *) sqlite3_column_text(vm, 0)); else qWarning() << tr("didn't receive any output from pragma %1").arg(pragma); sqlite3_finalize(vm); } else { qWarning() << tr("could not execute pragma command: %1, %2").arg(err).arg(sqlite3_errmsg(_db)); } // Return it return retval; } bool DBBrowserDB::setPragma(const QString& pragma, const QString& value) { // Set the pragma value QString sql = QString("PRAGMA %1 = '%2';").arg(pragma).arg(value); // In general, we want to commit changes before running pragmas because most of them can't be rolled back and some of them // even fail when run in a transaction. However, the defer_foreign_keys pragma has neither problem and we need it to be settable // inside transactions (see the renameColumn() function where it is set and reset at some point and where we don't want the changes // to be committed just because of this pragma). if(pragma != "defer_foreign_keys") releaseSavepoint(); bool res = executeSQL(sql, false, true); // PRAGMA statements are usually not transaction bound, so we can't revert if( !res ) qWarning() << tr("Error setting pragma %1 to %2: %3").arg(pragma).arg(value).arg(lastErrorMessage); // If this is the page_size or the auto_vacuum pragma being set, we need to execute the vacuum command right after the pragma statement or the new // settings won't be saved. if(res && (pragma == "page_size" || pragma == "auto_vacuum")) res = executeSQL("VACUUM;", false, true); return res; } bool DBBrowserDB::setPragma(const QString& pragma, const QString& value, QString& originalvalue) { if( originalvalue != value ) { if( setPragma(pragma, value)) { originalvalue = value; return true; } } return false; } bool DBBrowserDB::setPragma(const QString& pragma, int value, int& originalvalue) { if( originalvalue != value ) { QString val = QString::number(value); QString origval = QString::number(originalvalue); if( setPragma(pragma, val, origval)) { originalvalue = value; } } return false; } bool DBBrowserDB::loadExtension(const QString& filePath) { waitForDbRelease(); if(!_db) return false; // Check if file exists if(!QFile::exists(filePath)) { lastErrorMessage = tr("File not found."); return false; } // Enable extension loading sqlite3_enable_load_extension(_db, 1); // Try to load extension char* error; int result = sqlite3_load_extension(_db, filePath.toUtf8(), nullptr, &error); // Disable extension loading if so configured // (we don't want to leave the possibility of calling load_extension() from SQL without user informed permission) if (!Settings::getValue("extensions", "enable_load_extension").toBool()) sqlite3_enable_load_extension(_db, 0); if (result == SQLITE_OK) { return true; } else { lastErrorMessage = QString::fromUtf8(error); sqlite3_free(error); return false; } } void DBBrowserDB::loadExtensionsFromSettings() { if(!_db) return; sqlite3_enable_load_extension(_db, Settings::getValue("extensions", "enable_load_extension").toBool()); QStringList list = Settings::getValue("extensions", "list").toStringList(); for(const QString& ext : list) { if(loadExtension(ext) == false) QMessageBox::warning(nullptr, QApplication::applicationName(), tr("Error loading extension: %1").arg(lastError())); } } QVector> DBBrowserDB::queryColumnInformation(const QString& schema_name, const QString& object_name) { waitForDbRelease(); QVector> result; QString statement = QString("PRAGMA %1.TABLE_INFO(%2);").arg(sqlb::escapeIdentifier(schema_name)).arg(sqlb::escapeIdentifier(object_name)); logSQL(statement, kLogMsg_App); sqlite3_stmt* vm; const char* tail; if(sqlite3_prepare_v2(_db, statement.toUtf8(), statement.length(), &vm, &tail) == SQLITE_OK) { while(sqlite3_step(vm) == SQLITE_ROW) { QString name = QString::fromUtf8((const char *)sqlite3_column_text(vm, 1)); QString type = QString::fromUtf8((const char *)sqlite3_column_text(vm, 2)); result.push_back(qMakePair(name, type)); } sqlite3_finalize(vm); } else{ lastErrorMessage = tr("could not get column information"); } return result; } QString DBBrowserDB::generateSavepointName(const QString& identifier) const { // Generate some sort of unique name for a savepoint for internal use. return QString("db4s_%1_%2").arg(identifier).arg(QDateTime::currentMSecsSinceEpoch()); } QString DBBrowserDB::generateTemporaryTableName(const QString& schema) const { // We're using a static variable as a counter here instead of checking from the beginning onwards every time. This has // two reasons: 1) It makes the function thread-safe, and 2) it saves us some time because in case older temporary tables // are still in use. Both reasons don't matter too much for now, but just in case... static std::atomic_uint counter; while(true) { QString table_name = QString("sqlb_temp_table_%1").arg(++counter); if(!getObjectByName(sqlb::ObjectIdentifier(schema, table_name))) return table_name; } } sqlitebrowser-3.11.2/src/sqlitedb.h000066400000000000000000000224001345112435200172500ustar00rootroot00000000000000#ifndef SQLITEDB_H #define SQLITEDB_H #include "sqlitetypes.h" #include #include #include #include #include #include struct sqlite3; class CipherSettings; enum { kLogMsg_User, kLogMsg_App }; typedef QMultiMap objectMap; // Maps from object type (table, index, view, trigger) to a pointer to the object representation typedef QMap schemaMap; // Maps from the schema name (main, temp, attached schemas) to the object map for that schema int collCompare(void* pArg, int sizeA, const void* sA, int sizeB, const void* sB); /// represents a single SQLite database. except when noted otherwise, /// all member functions are to be called from the main UI thread /// only. class DBBrowserDB : public QObject { Q_OBJECT private: /// custom unique_ptr deleter releases database for further use by others struct DatabaseReleaser { DatabaseReleaser(DBBrowserDB * pParent_ = nullptr) : pParent(pParent_) {} DBBrowserDB * pParent; void operator() (sqlite3 * db) const { if(!db || !pParent) return; std::unique_lock lk(pParent->m); pParent->db_used = false; lk.unlock(); pParent->cv.notify_one(); } }; public: explicit DBBrowserDB () : _db(nullptr), db_used(false), isEncrypted(false), isReadOnly(false), dontCheckForStructureUpdates(false) {} virtual ~DBBrowserDB (){} bool open(const QString& db, bool readOnly = false); bool attach(const QString& filename, QString attach_as = ""); bool create ( const QString & db); bool close(); // This returns the SQLite version as well as the SQLCipher if DB4S is compiled with encryption support static void getSqliteVersion(QString& sqlite, QString& sqlcipher); typedef std::unique_ptr db_pointer_type; /** borrow exclusive address to the currently open database, until releasing the returned unique_ptr. the intended use case is that the main UI thread can call this any time, and then optionally pass the obtained pointer to a background worker, or release it after doing work immediately. if database is currently used by somebody else, opens a dialog box and gives user the opportunity to sqlite3_interrupt() the operation of the current owner, then tries again. \param user a string that identifies the new user, and which can be displayed in the dialog box. \returns a unique_ptr containing the SQLite database handle, or nullptr in case no database is open. **/ db_pointer_type get (QString user); bool setSavepoint(const QString& pointname = "RESTOREPOINT"); bool releaseSavepoint(const QString& pointname = "RESTOREPOINT"); bool revertToSavepoint(const QString& pointname = "RESTOREPOINT"); bool releaseAllSavepoints(); bool revertAll(); bool dump(const QString& filename, const QStringList& tablesToDump, bool insertColNames, bool insertNew, bool exportSchema, bool exportData, bool keepOldSchema); bool executeSQL(QString statement, bool dirtyDB = true, bool logsql = true); bool executeMultiSQL(QByteArray query, bool dirty = true, bool log = false); QVariant querySingleValueFromDb(const QString& statement, bool log = true); const QString& lastError() const { return lastErrorMessage; } /** * @brief getRow Executes a sqlite statement to get the rowdata(columns) * for the given rowid. * @param schemaName Name of the database schema. * @param sTableName Table to query. * @param rowid The rowid to fetch. * @param rowdata A list of QByteArray containing the row data. * @return true if statement execution was ok, else false. */ bool getRow(const sqlb::ObjectIdentifier& table, const QString& rowid, QVector& rowdata); private: /** * @brief max Queries the table t for the max value of field. * @param tableName Table to query * @param field Field to get the max value * @return the max value of the field or 0 on error */ QString max(const sqlb::ObjectIdentifier& tableName, const sqlb::Field& field) const; public: void updateSchema(); private: /** * @brief Creates an empty insert statement. * @param schemaName The name of the database schema in which to find the table * @param pk_value This optional parameter can be used to manually set a specific value for the primary key column * @return An sqlite conform INSERT INTO statement with empty values. (NULL,'',0) */ QString emptyInsertStmt(const QString& schemaName, const sqlb::Table& t, const QString& pk_value = QString()) const; public: QString addRecord(const sqlb::ObjectIdentifier& tablename); bool deleteRecords(const sqlb::ObjectIdentifier& table, const QStringList& rowids, const QString& pseudo_pk = QString()); bool updateRecord(const sqlb::ObjectIdentifier& table, const QString& column, const QString& rowid, const QByteArray& value, bool itsBlob, const QString& pseudo_pk = QString()); bool createTable(const sqlb::ObjectIdentifier& name, const sqlb::FieldVector& structure); bool renameTable(const QString& schema, const QString& from_table, const QString& to_table); bool addColumn(const sqlb::ObjectIdentifier& tablename, const sqlb::Field& field); /** * @brief alterTable Can be used to rename, modify or drop an existing column of a given table * @param schema Specifies the name of the schema, i.e. the database name, of the table * @param tablename Specifies the name of the table to edit * @param table Specifies the table to edit. The table constraints are used from this but not the columns * @param name Name of the column to edit * @param to The new field definition with changed name, type or the like. If Null-Pointer is given the column is dropped. * @param move Set this to a value != 0 to move the new column to a different position * @param newSchema Set this to a non-empty string to move the table to a new schema * @return true if renaming was successful, false if not. In the latter case also lastErrorMessage is set */ bool alterTable(const sqlb::ObjectIdentifier& tablename, const sqlb::Table& table, const QString& name, const sqlb::Field* to, int move = 0, QString newSchemaName = QString()); objectMap getBrowsableObjects(const QString& schema) const; template const std::shared_ptr getObjectByName(const sqlb::ObjectIdentifier& name) const { for(auto& it : schemata[name.schema()]) { if(it->name() == name.name()) return std::dynamic_pointer_cast(it); } return std::shared_ptr(); } bool isOpen() const; bool encrypted() const { return isEncrypted; } bool readOnly() const { return isReadOnly; } bool getDirty() const; QString currentFile() const { return curDBFilename; } /// log an SQL statement [thread-safe] void logSQL(QString statement, int msgtype); QString getPragma(const QString& pragma); bool setPragma(const QString& pragma, const QString& value); bool setPragma(const QString& pragma, const QString& value, QString& originalvalue); bool setPragma(const QString& pragma, int value, int& originalvalue); bool loadExtension(const QString& filename); void loadExtensionsFromSettings(); static QStringList Datatypes; private: QVector> queryColumnInformation(const QString& schema_name, const QString& object_name); public: QString generateSavepointName(const QString& identifier = QString()) const; // This function generates the name for a temporary table. It guarantees that there is no table with this name yet QString generateTemporaryTableName(const QString& schema) const; schemaMap schemata; signals: void sqlExecuted(QString sql, int msgtype); void dbChanged(bool dirty); void structureUpdated(); void requestCollation(QString name, int eTextRep); private: /// external code needs to go through get() to obtain access to the database sqlite3 * _db; std::mutex m; std::condition_variable cv; bool db_used; QString db_user; /// wait for release of the DB locked through a previous get(), /// giving users the option to discard running task through a /// message box. void waitForDbRelease(); QString curDBFilename; QString lastErrorMessage; QStringList savepointList; bool isEncrypted; bool isReadOnly; QString primaryKeyForEditing(const sqlb::ObjectIdentifier& table, const QString& pseudo_pk) const; void collationNeeded(void* pData, sqlite3* db, int eTextRep, const char* sCollationName); bool tryEncryptionSettings(const QString& filename, bool* encrypted, CipherSettings*& cipherSettings); bool dontCheckForStructureUpdates; class NoStructureUpdateChecks { public: explicit NoStructureUpdateChecks(DBBrowserDB& db) : m_db(db) { m_db.dontCheckForStructureUpdates = true; } ~NoStructureUpdateChecks() { m_db.dontCheckForStructureUpdates = false; } private: DBBrowserDB& m_db; }; }; #endif sqlitebrowser-3.11.2/src/sqlitetablemodel.cpp000066400000000000000000000774351345112435200213500ustar00rootroot00000000000000#include "sqlitetablemodel.h" #include "sqlitedb.h" #include "sqlite.h" #include "Settings.h" #include "Data.h" #include #include #include #include #include #include #include #include #include "RowLoader.h" SqliteTableModel::SqliteTableModel(DBBrowserDB& db, QObject* parent, size_t chunkSize, const QString& encoding) : QAbstractTableModel(parent) , m_db(db) , m_lifeCounter(0) , m_currentRowCount(0) , m_chunkSize(chunkSize) , m_encoding(encoding) { worker = new RowLoader( [this](){ return m_db.get(tr("reading rows")); }, [this](QString stmt){ return m_db.logSQL(stmt, kLogMsg_App); }, m_headers, m_mutexDataCache, m_cache ); worker->start(); // any UI updates must be performed in the UI thread, not in the worker thread: connect(worker, &RowLoader::fetched, this, &SqliteTableModel::handleFinishedFetch, Qt::QueuedConnection); connect(worker, &RowLoader::rowCountComplete, this, &SqliteTableModel::handleRowCountComplete, Qt::QueuedConnection); reset(); } SqliteTableModel::~SqliteTableModel() { worker->stop(); worker->wait(); worker->disconnect(); delete worker; } SqliteTableModel::RowCount SqliteTableModel::rowCountAvailable () const { return m_rowCountAvailable; } void SqliteTableModel::handleFinishedFetch (int life_id, unsigned int fetched_row_begin, unsigned int fetched_row_end) { if(life_id < m_lifeCounter) return; Q_ASSERT(fetched_row_end >= fetched_row_begin); auto old_row_count = m_currentRowCount; auto new_row_count = std::max(old_row_count, fetched_row_begin); new_row_count = std::max(new_row_count, fetched_row_end); Q_ASSERT(new_row_count >= old_row_count); if(new_row_count != old_row_count) { beginInsertRows(QModelIndex(), old_row_count, new_row_count - 1); m_currentRowCount = new_row_count; endInsertRows(); } if(fetched_row_end != fetched_row_begin) { // TODO optimize int num_columns = m_headers.size(); emit dataChanged(createIndex(fetched_row_begin, 0), createIndex(fetched_row_end - 1, num_columns - 1)); } if(m_rowCountAvailable != RowCount::Complete) m_rowCountAvailable = RowCount::Partial; emit finishedFetch(fetched_row_begin, fetched_row_end); } void SqliteTableModel::handleRowCountComplete (int life_id, int num_rows) { if(life_id < m_lifeCounter) return; m_rowCountAvailable = RowCount::Complete; handleFinishedFetch(life_id, num_rows, num_rows); } void SqliteTableModel::reset() { beginResetModel(); clearCache(); m_sTable.clear(); m_sRowidColumn.clear(); m_iSortColumn = 0; m_sSortOrder = "ASC"; m_headers.clear(); m_mWhere.clear(); m_vDataTypes.clear(); m_vDisplayFormat.clear(); m_pseudoPk.clear(); endResetModel(); } void SqliteTableModel::setChunkSize(size_t chunksize) { m_chunkSize = chunksize; } void SqliteTableModel::setTable(const sqlb::ObjectIdentifier& table, int sortColumn, Qt::SortOrder sortOrder, const QMap filterValues, const QVector& display_format) { // Unset all previous settings. When setting a table all information on the previously browsed data set is removed first. reset(); // Save the other parameters m_sTable = table; m_vDisplayFormat = display_format; for(auto filterIt=filterValues.constBegin(); filterIt!=filterValues.constEnd(); ++filterIt) updateFilter(filterIt.key(), filterIt.value(), false); // The first column is the rowid column and therefore is always of type integer m_vDataTypes.push_back(SQLITE_INTEGER); // Get the data types of all other columns as well as the column names bool allOk = false; if(m_db.getObjectByName(table) && m_db.getObjectByName(table)->type() == sqlb::Object::Types::Table) { sqlb::TablePtr t = m_db.getObjectByName(table); if(t && t->fields.size()) // parsing was OK { m_sRowidColumn = t->rowidColumn(); m_headers.push_back(m_sRowidColumn); m_headers.append(t->fieldNames()); // parse columns types static QStringList dataTypes = QStringList() << "INTEGER" << "REAL" << "TEXT" << "BLOB"; for(const sqlb::Field& fld : t->fields) { QString name(fld.type().toUpper()); int colType = dataTypes.indexOf(name); colType = (colType == -1) ? SQLITE_TEXT : colType + 1; m_vDataTypes.push_back(colType); } allOk = true; } } // If for one reason or another (either it's a view or we couldn't parse the table statement) we couldn't get the field // information we retrieve it from SQLite using an extra query. // NOTE: It would be nice to eventually get rid of this piece here. As soon as the grammar parser is good enough... if(!allOk) { QString sColumnQuery = QString::fromUtf8("SELECT * FROM %1;").arg(table.toString()); m_sRowidColumn = "rowid"; m_headers.push_back("rowid"); m_headers.append(getColumns(nullptr, sColumnQuery, m_vDataTypes)); } // Set sort parameters. We're setting the sort column to an invalid value before calling sort() because this way, in sort() the // current sort order is always changed and thus buildQuery() is always going to be called. // This is also why we don't need to call buildQuery() here again. m_iSortColumn = -1; sort(sortColumn, sortOrder); } void SqliteTableModel::setQuery(const QString& sQuery, bool dontClearHeaders) { // clear if(!dontClearHeaders) reset(); else clearCache(); if(!m_db.isOpen()) return; m_sQuery = sQuery.trimmed(); removeCommentsFromQuery(m_sQuery); worker->setQuery(m_sQuery); worker->triggerRowCountDetermination(m_lifeCounter); if(!dontClearHeaders) m_headers.append(getColumns(worker->getDb(), sQuery, m_vDataTypes)); // now fetch the first entries triggerCacheLoad(m_chunkSize / 2 - 1); emit layoutChanged(); } int SqliteTableModel::rowCount(const QModelIndex&) const { return m_currentRowCount; } int SqliteTableModel::columnCount(const QModelIndex&) const { return m_headers.size(); } int SqliteTableModel::filterCount() const { return m_mWhere.size(); } QVariant SqliteTableModel::headerData(int section, Qt::Orientation orientation, int role) const { if (role != Qt::DisplayRole) return QVariant(); if (orientation == Qt::Horizontal) { // if we have a VIRTUAL table the model will not be valid, with no header data if(section < m_headers.size()) return m_headers.at(section); return QString("%1").arg(section + 1); } else return QString("%1").arg(section + 1); } QVariant SqliteTableModel::data(const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); if (index.row() >= rowCount()) return QVariant(); QMutexLocker lock(&m_mutexDataCache); Row blank_data; bool row_available; const Row * cached_row; if(m_cache.count(index.row())) { cached_row = &m_cache.at(index.row()); row_available = true; } else { blank_data = makeDefaultCacheEntry(); cached_row = &blank_data; row_available = false; } if(role == Qt::DisplayRole || role == Qt::EditRole) { if(!row_available) return tr("loading..."); if(role == Qt::DisplayRole && cached_row->at(index.column()).isNull()) { return Settings::getValue("databrowser", "null_text").toString(); } else if(role == Qt::DisplayRole && nosync_isBinary(index)) { return Settings::getValue("databrowser", "blob_text").toString(); } else if(role == Qt::DisplayRole) { int limit = Settings::getValue("databrowser", "symbol_limit").toInt(); QByteArray displayText = cached_row->at(index.column()); if (displayText.length() > limit) { // Add "..." to the end of truncated strings return decode(displayText.left(limit).append(" ...")); } else { return decode(displayText); } } else { return decode(cached_row->at(index.column())); } } else if(role == Qt::FontRole) { QFont font; if(!row_available || cached_row->at(index.column()).isNull() || nosync_isBinary(index)) font.setItalic(true); return font; } else if(role == Qt::ForegroundRole) { if(!row_available) return QColor(100, 100, 100); if(cached_row->at(index.column()).isNull()) return QColor(Settings::getValue("databrowser", "null_fg_colour").toString()); else if (nosync_isBinary(index)) return QColor(Settings::getValue("databrowser", "bin_fg_colour").toString()); return QColor(Settings::getValue("databrowser", "reg_fg_colour").toString()); } else if (role == Qt::BackgroundRole) { if(!row_available) return QColor(255, 200, 200); if(cached_row->at(index.column()).isNull()) return QColor(Settings::getValue("databrowser", "null_bg_colour").toString()); else if (nosync_isBinary(index)) return QColor(Settings::getValue("databrowser", "bin_bg_colour").toString()); return QColor(Settings::getValue("databrowser", "reg_bg_colour").toString()); } else if(role == Qt::ToolTipRole) { sqlb::ForeignKeyClause fk = getForeignKeyClause(index.column()-1); if(fk.isSet()) return tr("References %1(%2)\nHold %3Shift and click to jump there").arg(fk.table()).arg(fk.columns().join(",")) .arg(QKeySequence(Qt::CTRL).toString(QKeySequence::NativeText)); else return QString(); } return QVariant(); } sqlb::ForeignKeyClause SqliteTableModel::getForeignKeyClause(int column) const { static const sqlb::ForeignKeyClause empty_foreign_key_clause; // No foreign keys when not browsing a table. This usually happens when executing custom SQL statements // and browsing the result set instead of browsing an entire table. if(m_sTable.isEmpty()) return empty_foreign_key_clause; // Retrieve database object and check if it is a table. If it isn't stop here and don't return a foreign // key. This happens for views which don't have foreign keys (though we might want to think about how we // can check for foreign keys in the underlying tables for some purposes like tool tips). sqlb::ObjectPtr obj = m_db.getObjectByName(m_sTable); if(obj->type() != sqlb::Object::Table) return empty_foreign_key_clause; // Convert object to a table and check if the column number is in the valid range sqlb::TablePtr tbl = std::dynamic_pointer_cast(obj); if(tbl && tbl->name().size() && (column >= 0 && column < static_cast(tbl->fields.size()))) { // Note that the rowid column has number -1 here, it can safely be excluded since there will never be a // foreign key on that column. sqlb::ConstraintPtr ptr = tbl->constraint({tbl->fields.at(column).name()}, sqlb::Constraint::ForeignKeyConstraintType); if(ptr) return *(std::dynamic_pointer_cast(ptr)); } return empty_foreign_key_clause; } bool SqliteTableModel::setData(const QModelIndex& index, const QVariant& value, int role) { // Don't even try setting any data if we're not browsing a table, i.e. the model data comes from a custom query if(!isEditable()) return false; // This function is for in-place editing. // So, BLOB flag is false every times. return setTypedData(index, false, value, role); } bool SqliteTableModel::setTypedData(const QModelIndex& index, bool isBlob, const QVariant& value, int role) { if(readingData()) { // can't insert rows while reading data in background return false; } if(index.isValid() && role == Qt::EditRole) { QMutexLocker lock(&m_mutexDataCache); auto & cached_row = m_cache.at(index.row()); QByteArray newValue = encode(value.toByteArray()); QByteArray oldValue = cached_row.at(index.column()); // Special handling for integer columns: instead of setting an integer column to an empty string, set it to '0' when it is also // used in a primary key. Otherwise SQLite will always output an 'datatype mismatch' error. if(newValue == "" && !newValue.isNull()) { sqlb::TablePtr table = m_db.getObjectByName(m_sTable); if(table) { auto field = sqlb::findField(table, m_headers.at(index.column())); if(contains(table->primaryKey(), field->name()) && field->isInteger()) newValue = "0"; } } // Don't do anything if the data hasn't changed // To differentiate NULL and empty byte arrays, we also compare the NULL flag if(oldValue == newValue && oldValue.isNull() == newValue.isNull()) return true; if(m_db.updateRecord(m_sTable, m_headers.at(index.column()), cached_row.at(0), newValue, isBlob, m_pseudoPk)) { cached_row.replace(index.column(), newValue); if(m_headers.at(index.column()) == m_sRowidColumn) { cached_row.replace(0, newValue); const QModelIndex& rowidIndex = index.sibling(index.row(), 0); lock.unlock(); emit dataChanged(rowidIndex, rowidIndex); } else { lock.unlock(); } emit dataChanged(index, index); return true; } else { lock.unlock(); QMessageBox::warning(nullptr, qApp->applicationName(), tr("Error changing data:\n%1").arg(m_db.lastError())); return false; } } return false; } Qt::ItemFlags SqliteTableModel::flags(const QModelIndex& index) const { if(!index.isValid()) return Qt::ItemIsEnabled; Qt::ItemFlags ret = QAbstractTableModel::flags(index) | Qt::ItemIsDropEnabled; // Custom display format set? bool custom_display_format = false; if(m_vDisplayFormat.size()) { if(index.column() > 0) custom_display_format = m_vDisplayFormat.at(index.column()-1) != sqlb::escapeIdentifier(headerData(index.column(), Qt::Horizontal).toString()); } if(!isBinary(index) && !custom_display_format) ret |= Qt::ItemIsEditable; return ret; } void SqliteTableModel::sort(int column, Qt::SortOrder order) { // Don't do anything when the sort order hasn't changed if(m_iSortColumn == column && m_sSortOrder == (order == Qt::AscendingOrder ? "ASC" : "DESC")) return; // Save sort order if (column >= 0 && column < m_headers.size()) m_iSortColumn = column; m_sSortOrder = (order == Qt::AscendingOrder ? "ASC" : "DESC"); // Set the new query (but only if a table has already been set if(!m_sTable.isEmpty()) buildQuery(); } SqliteTableModel::Row SqliteTableModel::makeDefaultCacheEntry () const { Row blank_data; for(int i=0; i < m_headers.size(); ++i) blank_data.push_back(""); return blank_data; } bool SqliteTableModel::readingData() const { return worker->readingData(); } bool SqliteTableModel::insertRows(int row, int count, const QModelIndex& parent) { if(!isEditable()) return false; if(readingData()) { // can't insert rows while reading data in background return false; } const auto blank_data = makeDefaultCacheEntry(); std::vector tempList; for(int i=row; i < row + count; ++i) { QString rowid = m_db.addRecord(m_sTable); if(rowid.isNull()) { return false; } tempList.push_back(blank_data); tempList.back().replace(0, rowid.toUtf8()); // update column with default values Row rowdata; if(m_db.getRow(m_sTable, rowid, rowdata)) { for(int j=1; j < m_headers.size(); ++j) { tempList.back().replace(j, rowdata[j - 1]); } } } beginInsertRows(parent, row, row + count - 1); for(unsigned int i = 0; i < tempList.size(); ++i) { m_cache.insert(i + row, std::move(tempList.at(i))); m_currentRowCount++; } endInsertRows(); return true; } bool SqliteTableModel::removeRows(int row, int count, const QModelIndex& parent) { if(!isEditable()) return false; if(readingData()) { // can't delete rows while reading data in background return false; } QStringList rowids; for(int i=count-1;i>=0;i--) { if(m_cache.count(row+i)) { rowids.append(m_cache.at(row + i).at(0)); } } bool ok = m_db.deleteRecords(m_sTable, rowids, m_pseudoPk); if (ok) { beginRemoveRows(parent, row, row + count - 1); for(int i=count-1;i>=0;i--) { m_cache.erase(row + i); m_currentRowCount--; } endRemoveRows(); } return ok; } QModelIndex SqliteTableModel::dittoRecord(int old_row) { if(!isEditable()) return QModelIndex(); if (!insertRow(rowCount())) return QModelIndex(); int firstEditedColumn = 0; int new_row = rowCount() - 1; sqlb::TablePtr t = m_db.getObjectByName(m_sTable); QStringList pk = t->primaryKey(); for (size_t col = 0; col < t->fields.size(); ++col) { if(!contains(pk, t->fields.at(col).name())) { if (!firstEditedColumn) firstEditedColumn = col + 1; QVariant value = data(index(old_row, col + 1), Qt::EditRole); setData(index(new_row, col + 1), value); } } return index(new_row, firstEditedColumn); } QString SqliteTableModel::customQuery(bool withRowid) { QString where; if(m_mWhere.size()) { where = "WHERE "; for(QMap::const_iterator i=m_mWhere.constBegin();i!=m_mWhere.constEnd();++i) { QString columnId = sqlb::escapeIdentifier(m_headers.at(i.key())); if(m_vDisplayFormat.size() && m_vDisplayFormat.at(i.key()-1) != columnId) columnId = m_vDisplayFormat.at(i.key()-1); where.append(QString("%1 %2 AND ").arg(columnId).arg(i.value())); } // Remove last 'AND ' where.chop(4); } QString selector; if (withRowid) selector = sqlb::escapeIdentifier(m_headers.at(0)) + ","; if(m_vDisplayFormat.empty()) { selector += "*"; } else { QString columnId; for(int i=0;i= 0 && m_iSortColumn < m_headers.size()) order_by = QString("ORDER BY %1 %2").arg(sqlb::escapeIdentifier(m_headers.at(m_iSortColumn))).arg(m_sSortOrder); // Note: Building the SQL string is intentionally split into several parts here instead of arg()'ing it all together as one. // The reason is that we're adding '%' characters automatically around search terms (and even if we didn't the user could add // them manually) which means that e.g. searching for '1' results in another '%1' in the string which then totally confuses // the QString::arg() function, resulting in an invalid SQL. return QString("SELECT %1 FROM %2 ") .arg(selector) .arg(m_sTable.toString()) + where + order_by; } void SqliteTableModel::buildQuery() { setQuery(customQuery(true), true); } void SqliteTableModel::removeCommentsFromQuery(QString& query) { int oldSize = query.size(); // first remove block comments { QRegExp rxSQL("^((?:(?:[^'/]|/(?![*]))*|'[^']*')*)(/[*](?:[^*]|[*](?!/))*[*]/)(.*)$"); // set up regex to find block comment QString result; while(query.size() != 0) { int pos = rxSQL.indexIn(query); if(pos > -1) { result += rxSQL.cap(1) + " "; query = rxSQL.cap(3); } else { result += query; query = ""; } } query = result; } // deal with end-of-line comments { /* The regular expression for removing end of line comments works like this: * ^((?:(?:[^'-]|-(?!-))*|(?:'[^']*'))*)(--.*)$ * ^ $ # anchor beginning and end of string so we use it all * ( )( ) # two separate capture groups for code and comment * --.* # comment starts with -- and consumes everything afterwards * (?: | )* # code is none or many strings alternating with non-strings * (?:'[^']*') # a string is a quote, followed by none or more non-quotes, followed by a quote * (?:[^'-]|-(?!-))* # non-string is a sequence of characters which aren't quotes or hyphens, */ QRegExp rxSQL("^((?:(?:[^'-]|-(?!-))*|(?:'[^']*'))*)(--[^\\r\\n]*)([\\r\\n]*)(.*)$"); // set up regex to find end-of-line comment QString result; while(query.size() != 0) { int pos = rxSQL.indexIn(query); if(pos > -1) { result += rxSQL.cap(1) + rxSQL.cap(3); query = rxSQL.cap(4); } else { result += query; query = ""; } } query = result.trimmed(); } if (oldSize != query.size()) { // Remove multiple line breaks that might have been created by deleting comments till the end of the line but not including the line break query.replace(QRegExp("\\n+"), "\n"); // Also remove any remaining whitespace at the end of each line query.replace(QRegExp("[ \t]+\n"), "\n"); } } QStringList SqliteTableModel::getColumns(std::shared_ptr pDb, const QString& sQuery, QVector& fieldsTypes) { if(!pDb) pDb = m_db.get(tr("retrieving list of columns")); sqlite3_stmt* stmt; QByteArray utf8Query = sQuery.toUtf8(); int status = sqlite3_prepare_v2(pDb.get(), utf8Query, utf8Query.size(), &stmt, nullptr); QStringList listColumns; if(SQLITE_OK == status) { sqlite3_step(stmt); int columns = sqlite3_data_count(stmt); for(int i = 0; i < columns; ++i) { listColumns.append(QString::fromUtf8((const char*)sqlite3_column_name(stmt, i))); fieldsTypes.push_back(sqlite3_column_type(stmt, i)); } } sqlite3_finalize(stmt); return listColumns; } void SqliteTableModel::updateFilter(int column, const QString& value, bool applyQuery) { // Check for any special comparison operators at the beginning of the value string. If there are none default to LIKE. QString op = "LIKE"; QString val, val2; QString escape; bool numeric = false, ok = false; // range/BETWEEN operator if (value.contains("~")) { int sepIdx = value.indexOf('~'); val = value.mid(0, sepIdx); val2 = value.mid(sepIdx+1); val.toFloat(&ok); if (ok) { val2.toFloat(&ok); ok = ok && (val.toFloat() < val2.toFloat()); } } if (ok) { op = "BETWEEN"; numeric = true; } else { val.clear(); val2.clear(); if(value.left(2) == ">=" || value.left(2) == "<=" || value.left(2) == "<>") { // Check if we're filtering for '<> NULL'. In this case we need a special comparison operator. if(value.left(2) == "<>" && value.mid(2) == "NULL") { // We are filtering for '<>NULL'. Override the comparison operator to search for NULL values in this column. Also treat search value (NULL) as number, // in order to avoid putting quotes around it. op = "IS NOT"; numeric = true; val = "NULL"; } else if(value.left(2) == "<>" && value.mid(2) == "''") { // We are filtering for "<>''", i.e. for everything which is not an empty string op = "<>"; numeric = true; val = "''"; } else { value.mid(2).toFloat(&numeric); op = value.left(2); val = value.mid(2); } } else if(value.left(1) == ">" || value.left(1) == "<") { value.mid(1).toFloat(&numeric); op = value.left(1); val = value.mid(1); } else if(value.left(1) == "=") { val = value.mid(1); // Check if value to compare with is 'NULL' if(val != "NULL") { // It's not, so just compare normally to the value, whatever it is. op = "="; } else { // It is NULL. Override the comparison operator to search for NULL values in this column. Also treat search value (NULL) as number, // in order to avoid putting quotes around it. op = "IS"; numeric = true; } } else { // Keep the default LIKE operator // Set the escape character if one has been specified in the settings dialog QString escape_character = Settings::getValue("databrowser", "filter_escape").toString(); if(escape_character == "'") escape_character = "''"; if(escape_character.length()) escape = QString("ESCAPE '%1'").arg(escape_character); // Add % wildcards at the start and at the beginning of the filter query, but only if there weren't set any // wildcards manually. The idea is to assume that a user who's just typing characters expects the wildcards to // be added but a user who adds them herself knows what she's doing and doesn't want us to mess up her query. if(!value.contains("%")) { val = value; val.prepend('%'); val.append('%'); } } } if(val.isEmpty()) val = value; // If the value was set to an empty string remove any filter for this column. Otherwise insert a new filter rule or replace the old one if there is already one if(val == "" || val == "%" || val == "%%") m_mWhere.remove(column); else { // Quote and escape value, but only if it's not numeric and not the empty string sequence if(!numeric && val != "''") val = QString("'%1'").arg(val.replace("'", "''")); QString whereClause(op + " " + QString(encode(val.toUtf8()))); if (!val2.isEmpty()) whereClause += " AND " + QString(encode(val2.toUtf8())); whereClause += " " + escape; m_mWhere.insert(column, whereClause); } // Build the new query if (applyQuery) buildQuery(); } void SqliteTableModel::clearCache() { m_lifeCounter++; if(m_db.isOpen()) { worker->cancel(); worker->waitUntilIdle(); } if(m_currentRowCount > 0) { beginRemoveRows(QModelIndex(), 0, m_currentRowCount - 1); endRemoveRows(); } m_cache.clear(); m_currentRowCount = 0; m_rowCountAvailable = RowCount::Unknown; } bool SqliteTableModel::isBinary(const QModelIndex& index) const { QMutexLocker lock(&m_mutexDataCache); return nosync_isBinary(index); } bool SqliteTableModel::nosync_isBinary(const QModelIndex& index) const { if(!m_cache.count(index.row())) return false; const auto & cached_row = m_cache.at(index.row()); return !isTextOnly(cached_row.at(index.column()), m_encoding, true); } QByteArray SqliteTableModel::encode(const QByteArray& str) const { if(m_encoding.isEmpty()) return str; else return QTextCodec::codecForName(m_encoding.toUtf8())->fromUnicode(str); } QByteArray SqliteTableModel::decode(const QByteArray& str) const { if(m_encoding.isEmpty()) return str; else return QTextCodec::codecForName(m_encoding.toUtf8())->toUnicode(str).toUtf8(); } Qt::DropActions SqliteTableModel::supportedDropActions() const { return Qt::CopyAction; } bool SqliteTableModel::dropMimeData(const QMimeData* data, Qt::DropAction, int row, int column, const QModelIndex& parent) { // What has been dropped on the widget? if(data->hasUrls()) { // If it's a URL, open the file and paste the content in the current cell QList urls = data->urls(); QFile file(urls.first().toLocalFile()); if(file.exists() && file.open(QFile::ReadOnly)) { setData(index(row, column, parent), file.readAll()); return true; } } else if(data->hasText()) { // If it's just text we can set the cell data directly setData(index(row, column, parent), data->text()); } return false; } void SqliteTableModel::setPseudoPk(const QString& pseudoPk) { // Do nothing if the value didn't change if(m_pseudoPk == pseudoPk) return; if(pseudoPk.isEmpty()) { m_pseudoPk.clear(); if(m_headers.size()) m_headers[0] = m_sRowidColumn; } else { m_pseudoPk = pseudoPk; if(m_headers.size()) m_headers[0] = pseudoPk; } buildQuery(); } bool SqliteTableModel::isEditable() const { return !m_sTable.isEmpty() && m_db.isOpen() && ((m_db.getObjectByName(m_sTable) && m_db.getObjectByName(m_sTable)->type() == sqlb::Object::Types::Table) || !m_pseudoPk.isEmpty()); } void SqliteTableModel::triggerCacheLoad (int row) const { size_t row_begin = std::max(0, row - int(m_chunkSize) / 2); size_t row_end = row + m_chunkSize / 2; if(rowCountAvailable() == RowCount::Complete) { row_end = std::min(row_end, size_t(rowCount())); } else { // will be truncated by reader } // avoid re-fetching data QMutexLocker lk(&m_mutexDataCache); m_cache.smallestNonAvailableRange(row_begin, row_end); if(row_end != row_begin) worker->triggerFetch(m_lifeCounter, row_begin, row_end); } void SqliteTableModel::triggerCacheLoad (int row_begin, int row_end) const { if(row_end == row_begin) return; triggerCacheLoad((row_begin + row_end) / 2); } bool SqliteTableModel::completeCache () const { // Show progress dialog because fetching all data might take some time but only show // cancel button if we allow cancellation here. This isn't QProgressDialog progress(tr("Fetching data..."), tr("Cancel"), 0, rowCount()); progress.setWindowModality(Qt::ApplicationModal); progress.show(); waitUntilIdle(); // This loop fetches all data by loading it block by block into the cache for(int i=0;i(m_chunkSize)/2;i+=m_chunkSize) { progress.setValue(i); qApp->processEvents(); if(progress.wasCanceled()) return false; triggerCacheLoad(i); worker->waitUntilIdle(); } return true; } bool SqliteTableModel::isCacheComplete () const { if(readingData()) return false; QMutexLocker lock(&m_mutexDataCache); return m_cache.numSet() == m_currentRowCount; } void SqliteTableModel::waitUntilIdle () const { worker->waitUntilIdle(); } sqlitebrowser-3.11.2/src/sqlitetablemodel.h000066400000000000000000000163551345112435200210070ustar00rootroot00000000000000#ifndef SQLITETABLEMODEL_H #define SQLITETABLEMODEL_H #include #include #include #include #include #include #include "sqlitetypes.h" #include "RowCache.h" struct sqlite3; class DBBrowserDB; class SqliteTableModel : public QAbstractTableModel { Q_OBJECT #ifdef REGEX_UNIT_TEST friend class TestRegex; #endif public: explicit SqliteTableModel(DBBrowserDB& db, QObject *parent = nullptr, size_t chunkSize = 50000, const QString& encoding = QString()); ~SqliteTableModel(); /// reset to state after construction void reset(); /// returns logical amount of rows, whether currently cached or not int rowCount(const QModelIndex &parent = QModelIndex()) const override; int columnCount(const QModelIndex &parent = QModelIndex()) const override; int filterCount() const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; bool setTypedData(const QModelIndex& index, bool isBlob, const QVariant& value, int role = Qt::EditRole); enum class RowCount { Unknown, //< still finding out in background... Partial, //< some chunk was read and at least a lower bound is thus known Complete //< total row count of table known }; /// what kind of information is available through rowCount()? RowCount rowCountAvailable () const; /// trigger asynchronous loading of (at least) the specified row /// into cache. void triggerCacheLoad (int single_row) const; /// trigger asynchronous loading of (at least) the specified rows /// into cache. \param row_end is exclusive. void triggerCacheLoad (int row_begin, int row_end) const; /// wait until not reading any data (that does not mean data is /// complete, just that the background reader is idle) void waitUntilIdle () const; /// load all rows into cache, return when done. Returns true if all data was loaded, false if the loading was cancelled. bool completeCache() const; /// returns true if all rows are currently available in cache /// [NOTE: potentially unsafe in case we have a limited-size /// cache, where entries can vanish again -- however we can't do /// this for the current implementation of the PlotDock] bool isCacheComplete () const; bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()) override; bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override; QModelIndex dittoRecord(int old_row); /// configure for browsing results of specified query void setQuery(const QString& sQuery, bool dontClearHeaders = false); QString query() const { return m_sQuery; } QString customQuery(bool withRowid); /// configure for browsing specified table void setTable(const sqlb::ObjectIdentifier& table, int sortColumn = 0, Qt::SortOrder sortOrder = Qt::AscendingOrder, const QMap filterValues = QMap(), const QVector &display_format = QVector()); void setChunkSize(size_t chunksize); void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override; const sqlb::ObjectIdentifier& currentTableName() const { return m_sTable; } Qt::ItemFlags flags(const QModelIndex& index) const override; bool isBinary(const QModelIndex& index) const; void setEncoding(const QString& encoding) { m_encoding = encoding; } QString encoding() const { return m_encoding; } // The pseudo-primary key is exclusively for editing views void setPseudoPk(const QString& pseudoPk); QString pseudoPk() const { return m_pseudoPk; } sqlb::ForeignKeyClause getForeignKeyClause(int column) const; // This returns true if the model is set up for editing. The model is able to operate in more or less two different modes, table browsing // and query browsing. We only support editing data for the table browsing mode and not for the query mode. This function returns true if // the model is currently editable, i.e. it's running in table mode and it isn't a view. bool isEditable() const; // Helper function for removing all comments from a SQL query static void removeCommentsFromQuery(QString& query); public slots: void updateFilter(int column, const QString& value, bool applyQuery = true); signals: void finishedFetch(int fetched_row_begin, int fetched_row_end); protected: virtual Qt::DropActions supportedDropActions() const override; virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override; private: friend class RowLoader; class RowLoader * worker; /// clears the cache, resets row-count to unknown (but keeps table /// & query info), increase life_counter void clearCache(); void handleFinishedFetch(int life_id, unsigned int fetched_row_begin, unsigned int fetched_row_end); void handleRowCountComplete(int life_id, int num_rows); void buildQuery(); /// \param pDb connection to query; if null, obtains it from 'm_db'. QStringList getColumns(std::shared_ptr pDb, const QString& sQuery, QVector& fieldsTypes); QByteArray encode(const QByteArray& str) const; QByteArray decode(const QByteArray& str) const; DBBrowserDB& m_db; /// counts numbers of clearCache() since instantiation; using this /// to avoid processing of queued signals originating in an era /// before the most recent reset(). int m_lifeCounter; /// note: the row count can be determined by the row-count query /// (which yields the "final" row count"), or, if it is faster, by /// the first chunk reading actual data (in which case the row /// count will be set to that chunk's size and later updated to /// the full row count, when the row-count query returns) RowCount m_rowCountAvailable; unsigned int m_currentRowCount; QStringList m_headers; /// reading something in background right now? (either counting /// rows or actually loading data, doesn't matter) bool readingData() const; using Row = QVector; mutable RowCache m_cache; Row makeDefaultCacheEntry () const; bool nosync_isBinary(const QModelIndex& index) const; QString m_sQuery; sqlb::ObjectIdentifier m_sTable; QString m_sRowidColumn; QString m_pseudoPk; int m_iSortColumn; QString m_sSortOrder; QMap m_mWhere; QVector m_vDisplayFormat; QVector m_vDataTypes; /** * @brief m_chunkSize Size of the next chunk fetch more will try to fetch. * This value should be rather high, because our query * uses LIMIT and sqlite3 will still execute the whole query and * just skip the not wanted rows, but the execution will * still take nearly the same time as doing the query at all up * to that row count. */ size_t m_chunkSize; QString m_encoding; /** * These are used for multi-threaded population of the table */ mutable QMutex m_mutexDataCache; }; #endif sqlitebrowser-3.11.2/src/sqlitetypes.cpp000066400000000000000000001242251345112435200203720ustar00rootroot00000000000000#include "sqlitetypes.h" #include "grammar/Sqlite3Lexer.hpp" #include "grammar/Sqlite3Parser.hpp" #include #include #include // This include seems to only be necessary for the Windows build namespace sqlb { static escapeQuoting customQuoting = DoubleQuotes; void setIdentifierQuoting(escapeQuoting toQuoting) { customQuoting = toQuoting; } QString escapeIdentifier(QString id) { switch(customQuoting) { case GraveAccents: return '`' + id.replace('`', "``") + '`'; case SquareBrackets: // There aren't any escaping possibilities for square brackets inside the identifier, // so we rely on the user to not enter these characters when this kind of quoting is // selected. return '[' + id + ']'; case DoubleQuotes: default: // This may produce a 'control reaches end of non-void function' warning if the // default branch is removed, even though we have covered all possibilities in the // switch statement. return '"' + id.replace('"', "\"\"") + '"'; } } QStringList escapeIdentifier(const QStringList& ids) { QStringList ret; for(const QString& id : ids) ret.push_back(escapeIdentifier(id)); return ret; } /** * @brief The SetLocaleToC class * This is a stupid helper class which sets the current locale as used by the C++ standard library to the C locale. * Upon destruction it resets it to whatever the previous locale was. This is used to work around a problem in Antlr's * string comparison which because it is case-independent relies on the current locale. However, when parsind SQL * statements we don't want the locale to interfere here. Especially the Turkish locale is problematic here because * of the dotted I problem. */ class SetLocaleToC { public: SetLocaleToC() { // Query current locale and save it oldLocale = std::setlocale(LC_CTYPE, nullptr); // Set locale for standard library functions std::setlocale(LC_CTYPE, "C.UTF-8"); } ~SetLocaleToC() { // Reset old locale std::setlocale(LC_CTYPE, oldLocale.c_str()); } private: std::string oldLocale; }; /** * @brief The CreateTableWalker class * Goes trough the createtable AST and returns * Table object. */ class CreateTableWalker { public: explicit CreateTableWalker(antlr::RefAST r) : m_root(r) {} TablePtr table(); private: void parsecolumn(Table* table, antlr::RefAST c); QString parseConflictClause(antlr::RefAST c); private: antlr::RefAST m_root; }; /** * @brief The CreateIndexWalker class * Goes trough the createtable AST and returns * Index object. */ class CreateIndexWalker { public: explicit CreateIndexWalker(antlr::RefAST r) : m_root(r) {} IndexPtr index(); private: void parsecolumn(Index* index, antlr::RefAST c); private: antlr::RefAST m_root; }; QString Object::typeToString(Types type) { switch(type) { case Types::Table: return "table"; case Types::Index: return "index"; case Types::View: return "view"; case Types::Trigger: return "trigger"; } return QString(); } bool ForeignKeyClause::isSet() const { return m_override.size() || m_table.size(); } QString ForeignKeyClause::toString() const { if(!isSet()) return QString(); if(m_override.size()) return m_override; QString result = escapeIdentifier(m_table); if(m_columns.size()) result += "(" + escapeIdentifier(m_columns).join(",") + ")"; if(m_constraint.size()) result += " " + m_constraint; return result; } void ForeignKeyClause::setFromString(const QString& fk) { m_override = fk; } QString ForeignKeyClause::toSql(const QStringList& applyOn) const { QString result; if(!m_name.isNull()) result += QString("CONSTRAINT %1 ").arg(escapeIdentifier(m_name)); result += QString("FOREIGN KEY(%1) REFERENCES %2").arg(escapeIdentifier(applyOn).join(",")).arg(this->toString()); return result; } QString UniqueConstraint::toSql(const QStringList& applyOn) const { QString result; if(!m_name.isNull()) result += QString("CONSTRAINT %1 ").arg(escapeIdentifier(m_name)); result += QString("UNIQUE(%1)").arg(escapeIdentifier(applyOn).join(",")); return result; } QString PrimaryKeyConstraint::toSql(const QStringList& applyOn) const { QString result; if(!m_name.isNull()) result += QString("CONSTRAINT %1 ").arg(escapeIdentifier(m_name)); result += QString("PRIMARY KEY(%1)").arg(escapeIdentifier(applyOn).join(",")); if(!m_conflictAction.isEmpty()) result += " ON CONFLICT " + m_conflictAction; return result; } QString CheckConstraint::toSql(const QStringList&) const { QString result; if(!m_name.isNull()) result += QString("CONSTRAINT %1 ").arg(escapeIdentifier(m_name)); result += QString("CHECK(%1)").arg(m_expression); return result; } QString Field::toString(const QString& indent, const QString& sep) const { QString str = indent + escapeIdentifier(m_name) + sep + m_type; if(m_notnull) str += " NOT NULL"; if(!m_defaultvalue.isEmpty()) str += QString(" DEFAULT %1").arg(m_defaultvalue); if(!m_check.isEmpty()) str += " CHECK(" + m_check + ")"; if(m_autoincrement) str += " PRIMARY KEY AUTOINCREMENT"; if(m_unique) str += " UNIQUE"; if(!m_collation.isEmpty()) str += " COLLATE " + m_collation; return str; } bool Field::isText() const { QString norm = m_type.trimmed().toLower(); return norm.startsWith("character") || norm.startsWith("varchar") || norm.startsWith("varying character") || norm.startsWith("nchar") || norm.startsWith("native character") || norm.startsWith("nvarchar") || norm == "text" || norm == "clob"; } bool Field::isInteger() const { QString norm = m_type.trimmed().toLower(); return norm == "int" || norm == "integer" || norm == "tinyint" || norm == "smallint" || norm == "mediumint" || norm == "bigint" || norm == "unsigned big int" || norm == "int2" || norm == "int8"; } bool Field::isReal() const { QString norm = m_type.trimmed().toLower(); return norm == "real" || norm == "double" || norm == "double precision" || norm == "float"; } bool Field::isNumeric() const { QString norm = m_type.trimmed().toLower(); return norm.startsWith("decimal") || norm == "numeric" || norm == "boolean" || norm == "date" || norm == "datetime"; } bool Field::isBlob() const { QString norm = m_type.trimmed().toLower(); return norm.isEmpty() || norm == "blob"; } QString Field::affinity() const { if (isInteger()) return "INTEGER"; if (isText()) return "TEXT"; if (isBlob()) return "BLOB"; if (isReal()) return "REAL"; return "NUMERIC"; } Table::~Table() { } Table& Table::operator=(const Table& rhs) { // Base class Object::operator=(rhs); // Just assign the strings m_rowidColumn = rhs.m_rowidColumn; m_virtual = rhs.m_virtual; // Clear the fields and the constraints first in order to avoid duplicates and/or old data in the next step fields.clear(); m_constraints.clear(); // Make copies of the fields and the constraints. This is necessary in order to avoid any unwanted changes to the application's main database // schema representation just by modifying a reference to the fields or constraints and thinking it operates on a copy. for(const Field& f : rhs.fields) fields.push_back(f); m_constraints = rhs.m_constraints; return *this; } Table::field_iterator Table::findPk() { // TODO This is a stupid function (and always was) which should be fixed/improved QStringList pk = primaryKey(); if(pk.empty()) return fields.end(); else return findField(this, pk.at(0)); } QStringList Table::fieldList() const { QStringList sl; for(const Field& f : fields) sl << f.toString(); return sl; } QStringList Table::fieldNames() const { QStringList sl; for(const Field& f : fields) sl << f.name(); return sl; } FieldInfoList Table::fieldInformation() const { FieldInfoList result; for(const Field& f : fields) result.emplace_back(f.name(), f.type(), f.toString(" ", " ")); return result; } bool Table::hasAutoIncrement() const { for(const Field& f : fields) { if(f.autoIncrement()) return true; } return false; } TablePtr Table::parseSQL(const QString& sSQL) { SetLocaleToC locale; std::stringstream s; s << sSQL.toStdString(); Sqlite3Lexer lex(s); Sqlite3Parser parser(lex); antlr::ASTFactory ast_factory; parser.initializeASTFactory(ast_factory); parser.setASTFactory(&ast_factory); try { parser.createtable(); CreateTableWalker ctw(parser.getAST()); auto t = ctw.table(); t->setOriginalSql(sSQL); return t; } catch(antlr::ANTLRException& ex) { std::cerr << "Sqlite parse error: " << ex.toString() << "(" << sSQL.toStdString() << ")" << std::endl; } catch(...) { std::cerr << "Sqlite parse error: " << sSQL.toStdString() << std::endl; //TODO } return TablePtr(new Table("")); } QString Table::sql(const QString& schema, bool ifNotExists) const { // Special handling for virtual tables: just build an easy create statement and copy the using part in there if(isVirtual()) return QString("CREATE VIRTUAL TABLE %1 USING %2;").arg(ObjectIdentifier(schema, m_name).toString(true)).arg(m_virtual); // This is a normal table, not a virtual one QString sql = QString("CREATE TABLE%1 %2 (\n") .arg(ifNotExists ? QString(" IF NOT EXISTS") : QString("")) .arg(ObjectIdentifier(schema, m_name).toString(true)); sql += fieldList().join(",\n"); // Constraints ConstraintMap::const_iterator it = m_constraints.cbegin(); bool autoincrement = hasAutoIncrement(); while(it != m_constraints.cend()) { // Ignore auto increment primary key constraint if((!autoincrement || it->second->type() != Constraint::PrimaryKeyConstraintType)) { // Ignore all constraints without any fields, except for check constraints which don't rely on a field vector if(!(it->first.empty() && it->second->type() != Constraint::CheckConstraintType)) { sql += QString(",\n\t"); sql += it->second->toSql(it->first); } } ++it; } sql += "\n)"; // without rowid if(isWithoutRowidTable()) sql += " WITHOUT ROWID"; return sql + ";"; } void Table::addConstraint(QStringList fields, ConstraintPtr constraint) { m_constraints.insert({fields, constraint}); } void Table::setConstraint(QStringList fields, ConstraintPtr constraint) { // Delete any old constraints of this type for these fields removeConstraints(fields, constraint->type()); // Add the new constraint to the table, effectively overwriting all old constraints for that fields/type combination addConstraint(fields, constraint); } void Table::removeConstraints(QStringList fields, Constraint::ConstraintTypes type) { for(auto it = m_constraints.begin();it!=m_constraints.end();) { if(it->first == fields && it->second->type() == type) m_constraints.erase(it++); else ++it; } } ConstraintPtr Table::constraint(QStringList fields, Constraint::ConstraintTypes type) const { auto list = constraints(fields, type); if(list.size()) return list.at(0); else return ConstraintPtr(nullptr); } std::vector Table::constraints(QStringList fields, Constraint::ConstraintTypes type) const { ConstraintMap::const_iterator begin, end; if(fields.empty()) { begin = m_constraints.begin(); end = m_constraints.end(); } else { std::tie(begin, end) = m_constraints.equal_range(fields); } std::vector clist; std::transform(begin, end, std::back_inserter(clist), [](std::pair elem){return elem.second;}); if(type == Constraint::NoType) { return clist; } else { std::vector clist_typed; for(const ConstraintPtr& ptr : clist) { if(ptr->type() == type) clist_typed.push_back(ptr); } return clist_typed; } } void Table::setConstraints(const ConstraintMap& constraints) { m_constraints = constraints; } QStringList& Table::primaryKeyRef() { return const_cast(static_cast(this)->primaryKey()); } const QStringList& Table::primaryKey() const { auto it = m_constraints.cbegin(); while(it != m_constraints.cend()) { if(it->second->type() == Constraint::PrimaryKeyConstraintType) return it->first; ++it; } static QStringList emptyFieldVector; return emptyFieldVector; } void Table::removeKeyFromAllConstraints(const QString& key) { // First remove all constraints with exactly that one key m_constraints.erase({key}); // Then delete all occurrences of the key in compound columns for(auto it=m_constraints.begin();it!=m_constraints.end();) { if(it->first.contains(key)) { QStringList k = it->first; k.removeAll(key); m_constraints.insert({k, it->second}); it = m_constraints.erase(it); } else { ++it; } } } void Table::renameKeyInAllConstraints(const QString& key, const QString& to) { // Do nothing if the key hasn't really changed if(key == to) return; // Find all occurrences of the key and change it to the new one for(auto it=m_constraints.begin();it!=m_constraints.end();) { if(it->first.contains(key)) { QStringList k = it->first; k.replaceInStrings(QRegExp("^" + key + "$"), to); m_constraints.insert({k, it->second}); it = m_constraints.erase(it); } else { ++it; } } } namespace { QString identifier(antlr::RefAST ident) { QString sident = ident->getText().c_str(); if(ident->getType() == sqlite3TokenTypes::QUOTEDID || ident->getType() == Sqlite3Lexer::QUOTEDLITERAL || ident->getType() == sqlite3TokenTypes::STRINGLITERAL) { // Remember the way the identifier is quoted QChar quoteChar = sident.at(0); // Remove first and final character, i.e. the quotes sident.remove(0, 1); sident.chop(1); // Replace all remaining occurences of two succeeding quote characters and replace them // by a single instance. This is done because two quotes can be used as a means of escaping // the quote character, thus only the visual representation has its two quotes, the actual // name contains only one. sident.replace(QString(quoteChar) + quoteChar, quoteChar); } return sident; } QString textAST(antlr::RefAST t) { // When this is called for a KEYWORDASTABLENAME token, we must take the child's content to get the actual value // instead of 'KEYWORDASTABLENAME' as a string. The same applies for KEYWORDASCOLUMNNAME tokens. if(t != antlr::nullAST && (t->getType() == sqlite3TokenTypes::KEYWORDASTABLENAME || t->getType() == sqlite3TokenTypes::KEYWORDASCOLUMNNAME)) return t->getFirstChild()->getText().c_str(); else return t->getText().c_str(); } QString concatTextAST(antlr::RefAST t, bool withspace = false) { QStringList stext; while(t != antlr::nullAST) { stext.append(textAST(t)); t = t->getNextSibling(); } return stext.join(withspace ? " " : ""); } QString concatExprAST(antlr::RefAST t) { QString expr; int num_paren = 1; while(t) { if(t->getType() == sqlite3TokenTypes::LPAREN) num_paren++; else if(t->getType() == sqlite3TokenTypes::RPAREN) num_paren--; if(num_paren == 0) break; switch(t->getType()) { case sqlite3TokenTypes::AND: case sqlite3TokenTypes::OR: case sqlite3TokenTypes::IN: case sqlite3TokenTypes::LIKE: case sqlite3TokenTypes::MATCH: case sqlite3TokenTypes::REGEXP: case sqlite3TokenTypes::EXISTS: case sqlite3TokenTypes::GLOB: case sqlite3TokenTypes::BETWEEN: expr.append(" " + textAST(t) + " "); break; case sqlite3TokenTypes::NOT: expr.append(" " + textAST(t)); break; default: expr.append(textAST(t)); } t = t->getNextSibling(); } return expr.trimmed(); } } namespace { QString tablename(const antlr::RefAST& n) { if(n->getType() == sqlite3TokenTypes::KEYWORDASTABLENAME) return concatTextAST(n->getFirstChild()); else return identifier(n); } QString columnname(const antlr::RefAST& n) { if(n->getType() == sqlite3TokenTypes::KEYWORDASCOLUMNNAME) return concatTextAST(n->getFirstChild()); else if(n->getType() == sqlite3TokenTypes::INDEXEDCOLUMN) return columnname(n->getFirstChild()); else return identifier(n); } } TablePtr CreateTableWalker::table() { Table* tab = new Table(""); tab->setFullyParsed(true); if( m_root ) //CREATE TABLE { antlr::RefAST s = m_root->getFirstChild(); // If the primary tree isn't filled, this isn't a normal CREATE TABLE statement. Switch to the next alternative tree. if(s == nullptr) s = m_root->getNextSibling(); // Skip to table name bool is_virtual_table = false; while(s->getType() != Sqlite3Lexer::ID && s->getType() != Sqlite3Lexer::QUOTEDID && s->getType() != Sqlite3Lexer::QUOTEDLITERAL && s->getType() != Sqlite3Lexer::STRINGLITERAL && s->getType() != sqlite3TokenTypes::KEYWORDASTABLENAME) { // Is this one of these virtual tables? if(s->getType() == Sqlite3Lexer::VIRTUAL) is_virtual_table = true; s = s->getNextSibling(); } // Extract and set table name tab->setName(tablename(s)); // Special handling for virtual tables. If this is a virtual table, extract the USING part and skip all the // rest of this function because virtual tables don't have column definitons if(is_virtual_table) { s = s->getNextSibling(); // USING s = s->getNextSibling(); // module name tab->setVirtualUsing(concatTextAST(s, true)); tab->setFullyParsed(false); return TablePtr(tab); } // This is a normal table, not a virtual one s = s->getNextSibling(); // LPAREN s = s->getNextSibling(); // first column name antlr::RefAST column = s; // loop columndefs while(column != antlr::nullAST && column->getType() == sqlite3TokenTypes::COLUMNDEF) { parsecolumn(tab, column->getFirstChild()); column = column->getNextSibling(); //COMMA or RPAREN column = column->getNextSibling(); //null or tableconstraint s = s->getNextSibling(); // COLUMNDEF s = s->getNextSibling(); // COMMA or RPAREN } // now we are finished or it is a tableconstraint while(s != antlr::nullAST) { // Is this a 'without rowid' definiton? if(s->getType() != sqlite3TokenTypes::WITHOUT) { // It's not, so treat this as table constraints antlr::RefAST tc = s->getFirstChild(); // Extract constraint name, if there is any QString constraint_name; if(tc->getType() == sqlite3TokenTypes::CONSTRAINT) { tc = tc->getNextSibling(); // CONSTRAINT constraint_name = identifier(tc); tc = tc->getNextSibling(); // identifier } switch(tc->getType()) { case sqlite3TokenTypes::PRIMARY: { PrimaryKeyConstraint* pk = new PrimaryKeyConstraint; pk->setName(constraint_name); tc = tc->getNextSibling()->getNextSibling(); // skip primary and key tc = tc->getNextSibling(); // skip LPAREN QStringList fields; do { antlr::RefAST indexed_column = tc->getFirstChild(); QString col = columnname(indexed_column); fields.push_back(col); indexed_column = indexed_column->getNextSibling(); if(indexed_column != antlr::nullAST && (indexed_column->getType() == sqlite3TokenTypes::ASC || indexed_column->getType() == sqlite3TokenTypes::DESC)) { // TODO save ASC / DESC information? tab->setFullyParsed(false); indexed_column = indexed_column->getNextSibling(); } if(indexed_column != antlr::nullAST && indexed_column->getType() == sqlite3TokenTypes::COLLATE) { indexed_column = indexed_column->getNextSibling(); // COLLATE // TODO save collation name tab->setFullyParsed(false); indexed_column = indexed_column->getNextSibling(); // collation name } if(indexed_column != antlr::nullAST && indexed_column->getType() == sqlite3TokenTypes::AUTOINCREMENT) { auto field = findField(tab, col); field->setAutoIncrement(true); indexed_column = indexed_column->getNextSibling(); } tc = tc->getNextSibling(); // indexed column while(tc != antlr::nullAST && tc->getType() == sqlite3TokenTypes::COMMA) { tc = tc->getNextSibling(); // skip ident and comma } } while(tc != antlr::nullAST && tc->getType() != sqlite3TokenTypes::RPAREN); // We're either done now or there is a conflict clause tc = tc->getNextSibling(); // skip RPAREN pk->setConflictAction(parseConflictClause(tc)); tab->addConstraint(fields, ConstraintPtr(pk)); } break; case sqlite3TokenTypes::UNIQUE: { UniqueConstraint* unique = new UniqueConstraint; unique->setName(constraint_name); tc = tc->getNextSibling(); // skip UNIQUE tc = tc->getNextSibling(); // skip LPAREN QStringList fields; do { antlr::RefAST indexed_column = tc->getFirstChild(); QString col = columnname(indexed_column); auto field = findField(tab, col); fields.push_back(field->name()); indexed_column = indexed_column->getNextSibling(); if(indexed_column != antlr::nullAST && (indexed_column->getType() == sqlite3TokenTypes::ASC || indexed_column->getType() == sqlite3TokenTypes::DESC)) { // TODO save ASC / DESC information? tab->setFullyParsed(false); indexed_column = indexed_column->getNextSibling(); } if(indexed_column != antlr::nullAST && indexed_column->getType() == sqlite3TokenTypes::COLLATE) { indexed_column = indexed_column->getNextSibling(); // COLLATE // TODO save collation name tab->setFullyParsed(false); indexed_column = indexed_column->getNextSibling(); // collation name } tc = tc->getNextSibling(); // indexed column while(tc != antlr::nullAST && tc->getType() == sqlite3TokenTypes::COMMA) { tc = tc->getNextSibling(); // skip ident and comma } } while(tc != antlr::nullAST && tc->getType() != sqlite3TokenTypes::RPAREN); if(fields.size() == 1 && constraint_name.isEmpty()) { findField(tab, fields[0])->setUnique(true); delete unique; } else { tab->addConstraint(fields, ConstraintPtr(unique)); } } break; case sqlite3TokenTypes::FOREIGN: { ForeignKeyClause* fk = new ForeignKeyClause; fk->setName(constraint_name); tc = tc->getNextSibling(); // FOREIGN tc = tc->getNextSibling(); // KEY tc = tc->getNextSibling(); // LPAREN QStringList fields; do { QString col = columnname(tc); fields.push_back(findField(tab, col)->name()); tc = tc->getNextSibling(); while(tc != antlr::nullAST && tc->getType() == sqlite3TokenTypes::COMMA) tc = tc->getNextSibling(); // skip ident and comma } while(tc != antlr::nullAST && tc->getType() != sqlite3TokenTypes::RPAREN); tc = tc->getNextSibling(); tc = tc->getNextSibling(); // REFERENCES fk->setTable(identifier(tc)); tc = tc->getNextSibling(); // identifier if(tc != antlr::nullAST && tc->getType() == sqlite3TokenTypes::LPAREN) { tc = tc->getNextSibling(); // LPAREN QStringList fk_cols; while(tc != antlr::nullAST && tc->getType() != sqlite3TokenTypes::RPAREN) { if(tc->getType() != sqlite3TokenTypes::COMMA) fk_cols.push_back(identifier(tc)); tc = tc->getNextSibling(); } fk->setColumns(fk_cols); tc = tc->getNextSibling(); // RPAREN } fk->setConstraint(concatTextAST(tc, true)); tab->addConstraint(fields, ConstraintPtr(fk)); } break; case sqlite3TokenTypes::CHECK: { CheckConstraint* check = new CheckConstraint; check->setName(constraint_name); tc = tc->getNextSibling(); // skip CHECK tc = tc->getNextSibling(); // skip LPAREN check->setExpression(concatExprAST(tc)); tab->addConstraint(QStringList(), ConstraintPtr(check)); } break; default: { std::cout << "unknown table constraint in " << tab->name().toStdString() << std::endl; tab->setFullyParsed(false); } break; } s = s->getNextSibling(); //COMMA or RPAREN if(s->getType() == sqlite3TokenTypes::COMMA || s->getType() == sqlite3TokenTypes::RPAREN) s = s->getNextSibling(); } else { // It is s = s->getNextSibling(); // WITHOUT s = s->getNextSibling(); // ROWID tab->setRowidColumn(tab->findPk()->name()); } } } return TablePtr(tab); } void CreateTableWalker::parsecolumn(Table* table, antlr::RefAST c) { QString colname; QString type = "TEXT"; bool autoincrement = false; bool notnull = false; bool unique = false; QString defaultvalue; QString check; QString collation; sqlb::PrimaryKeyConstraint* primaryKey = nullptr; std::vector foreignKeys; colname = columnname(c); c = c->getNextSibling(); //type? if(c != antlr::nullAST && c->getType() == sqlite3TokenTypes::TYPE_NAME) { antlr::RefAST t = c->getFirstChild(); if(t != antlr::nullAST) { type.clear(); } while(t != antlr::nullAST) { int thisType = t->getType(); type.append(textAST(t)); t = t->getNextSibling(); if(t != antlr::nullAST) { int nextType = t->getType(); if(nextType != sqlite3TokenTypes::LPAREN && nextType != sqlite3TokenTypes::RPAREN && thisType != sqlite3TokenTypes::LPAREN) { type.append(" "); } } } c = c->getNextSibling(); } // finished with type parsing // now columnconstraints while(c != antlr::nullAST) { antlr::RefAST con = c->getFirstChild(); // Extract constraint name, if there is any QString constraint_name; if(con->getType() == sqlite3TokenTypes::CONSTRAINT) { con = con->getNextSibling(); // CONSTRAINT constraint_name = identifier(con); con = con->getNextSibling(); // identifier } switch(con->getType()) { case sqlite3TokenTypes::PRIMARY: { // If we have already allocated a primary key object, delete it first. This should never happen in real world situations because // SQLite only supports one primary key constraint per field. if(primaryKey) delete primaryKey; primaryKey = new PrimaryKeyConstraint; primaryKey->setName(constraint_name); con = con->getNextSibling()->getNextSibling(); // skip KEY if(con != antlr::nullAST && (con->getType() == sqlite3TokenTypes::ASC || con->getType() == sqlite3TokenTypes::DESC)) { table->setFullyParsed(false); con = con->getNextSibling(); //skip } primaryKey->setConflictAction(parseConflictClause(con)); if(con != antlr::nullAST && con->getType() == sqlite3TokenTypes::AUTOINCREMENT) autoincrement = true; } break; case sqlite3TokenTypes::NOT: { // TODO Support constraint names here if(!constraint_name.isEmpty()) table->setFullyParsed(false); notnull = true; } break; case sqlite3TokenTypes::NULL_T: { notnull = false; } break; case sqlite3TokenTypes::CHECK: { // TODO Support constraint names here if(!constraint_name.isEmpty()) table->setFullyParsed(false); con = con->getNextSibling(); //CHECK con = con->getNextSibling(); //LPAREN check = concatExprAST(con); } break; case sqlite3TokenTypes::DEFAULT: { // TODO Support constraint names here if(!constraint_name.isEmpty()) table->setFullyParsed(false); con = con->getNextSibling(); //SIGNEDNUMBER,STRING,LPAREN defaultvalue = concatTextAST(con); } break; case sqlite3TokenTypes::UNIQUE: { // TODO Support constraint names here if(!constraint_name.isEmpty()) table->setFullyParsed(false); unique = true; } break; case sqlite3TokenTypes::REFERENCES: { con = con->getNextSibling(); // REFERENCES sqlb::ForeignKeyClause* foreignKey = new ForeignKeyClause; foreignKey->setTable(identifier(con)); foreignKey->setName(constraint_name); con = con->getNextSibling(); // identifier if(con != antlr::nullAST && con->getType() == sqlite3TokenTypes::LPAREN) { con = con->getNextSibling(); // LPAREN QStringList fk_cols; while(con != antlr::nullAST && con->getType() != sqlite3TokenTypes::RPAREN) { if(con->getType() != sqlite3TokenTypes::COMMA) fk_cols.push_back(identifier(con)); con = con->getNextSibling(); } foreignKey->setColumns(fk_cols); con = con->getNextSibling(); // RPAREN } foreignKey->setConstraint(concatTextAST(con, true)); foreignKeys.push_back(foreignKey); } break; case sqlite3TokenTypes::COLLATE: { con = con->getNextSibling(); // COLLATE collation = identifier(con); con = con->getNextSibling(); // collation name } break; default: { std::cout << "unknown column constraint in " << table->name().toStdString() << "." << colname.toStdString() << std::endl; table->setFullyParsed(false); } break; } c = c->getNextSibling(); } Field f(colname, type, notnull, defaultvalue, check, unique, collation); f.setAutoIncrement(autoincrement); table->fields.push_back(f); for(sqlb::ForeignKeyClause* fk : foreignKeys) table->addConstraint({f.name()}, ConstraintPtr(fk)); if(primaryKey) { QStringList v; if(table->constraint(v, Constraint::PrimaryKeyConstraintType)) { table->primaryKeyRef().push_back(f.name()); // Delete useless primary key constraint. There already is a primary key object for this table, we // don't need another one. delete primaryKey; } else { table->addConstraint({f.name()}, ConstraintPtr(primaryKey)); } } } QString CreateTableWalker::parseConflictClause(antlr::RefAST c) { QString conflictAction; if(c != antlr::nullAST && c->getType() == sqlite3TokenTypes::ON && c->getNextSibling()->getType() == sqlite3TokenTypes::CONFLICT) { c = c->getNextSibling(); // skip ON c = c->getNextSibling(); // skip CONFLICT conflictAction = identifier(c); c = c->getNextSibling(); // skip action } return conflictAction; } QString IndexedColumn::toString(const QString& indent, const QString& sep) const { QString name = m_isExpression ? m_name : escapeIdentifier(m_name); QString order = (m_order.isEmpty() ? "" : (sep + m_order)); return indent + name + order; } Index::~Index() { } Index& Index::operator=(const Index& rhs) { // Base class Object::operator=(rhs); // Just assign the easy stuff m_unique = rhs.m_unique; m_table = rhs.m_table; m_whereExpr = rhs.m_whereExpr; // Make copies of the column for(const IndexedColumn& c : rhs.fields) fields.push_back(c); return *this; } QStringList Index::columnSqlList() const { QStringList sl; for(const IndexedColumn& c : fields) sl << c.toString(); return sl; } QString Index::sql(const QString& schema, bool ifNotExists) const { // Start CREATE (UNIQUE) INDEX statement QString sql = QString("CREATE %1INDEX%2 %3 ON %4 (\n") .arg(m_unique ? QString("UNIQUE ") : QString("")) .arg(ifNotExists ? QString(" IF NOT EXISTS") : QString("")) .arg(ObjectIdentifier(schema, m_name).toString(true)) .arg(sqlb::escapeIdentifier(m_table)); // Add column list sql += columnSqlList().join(",\n"); // Add partial index bit sql += QString("\n)"); if(!m_whereExpr.isEmpty()) sql += QString(" WHERE ") + m_whereExpr; return sql + ";"; } FieldInfoList Index::fieldInformation() const { FieldInfoList result; for(const IndexedColumn& c : fields) result.emplace_back(c.name(), c.order(), c.toString(" ", " ")); return result; } IndexPtr Index::parseSQL(const QString& sSQL) { SetLocaleToC locale; std::stringstream s; s << sSQL.toStdString(); Sqlite3Lexer lex(s); Sqlite3Parser parser(lex); antlr::ASTFactory ast_factory; parser.initializeASTFactory(ast_factory); parser.setASTFactory(&ast_factory); try { parser.createindex(); CreateIndexWalker ctw(parser.getAST()); auto i = ctw.index(); i->setOriginalSql(sSQL); return i; } catch(antlr::ANTLRException& ex) { std::cerr << "Sqlite parse error: " << ex.toString() << "(" << sSQL.toStdString() << ")" << std::endl; } catch(...) { std::cerr << "Sqlite parse error: " << sSQL.toStdString() << std::endl; //TODO } return IndexPtr(new Index("")); } IndexPtr CreateIndexWalker::index() { Index* index = new Index(""); index->setFullyParsed(true); if(m_root) // CREATE INDEX { antlr::RefAST s = m_root->getFirstChild(); // Skip to index name while(s->getType() != Sqlite3Lexer::ID && s->getType() != Sqlite3Lexer::QUOTEDID && s->getType() != Sqlite3Lexer::QUOTEDLITERAL && s->getType() != Sqlite3Lexer::STRINGLITERAL && s->getType() != sqlite3TokenTypes::KEYWORDASTABLENAME) { // Is this a unique index? if(s->getType() == Sqlite3Lexer::UNIQUE) index->setUnique(true); s = s->getNextSibling(); } // Extract and set index name index->setName(tablename(s)); // Get table name s = s->getNextSibling(); // ON s = s->getNextSibling(); // table name index->setTable(tablename(s)); s = s->getNextSibling(); // LPAREN s = s->getNextSibling(); // first column name antlr::RefAST column = s; // loop columndefs while(column != antlr::nullAST && column->getType() == sqlite3TokenTypes::INDEXEDCOLUMN) { parsecolumn(index, column->getFirstChild()); column = column->getNextSibling(); // COMMA or RPAREN column = column->getNextSibling(); // null or WHERE s = s->getNextSibling(); // COLUMNDEF s = s->getNextSibling(); // COMMA or RPAREN } // Now we are finished or it is a partial index if(s != antlr::nullAST) { // This should be a 'where' then if(s->getType() != sqlite3TokenTypes::WHERE) { // It is something else index->setFullyParsed(false); } else { s = s->getNextSibling(); // expr index->setWhereExpr(concatTextAST(s, true)); } } } return IndexPtr(index); } void CreateIndexWalker::parsecolumn(Index* index, antlr::RefAST c) { QString name; bool isExpression; QString order; // First count the number of nodes used for the name or the expression. We reach the end of the name nodes list when we either // get to the end of the list, get to a COMMA or a RPAREN, or get to the COLLATE keyword or get to the ASC/DESC keywords. // Then see how many items there are: if it's one it's a normal index column with only a column name. In this case get the identifier. // If it's more than one item it's an expression. In this case get all the items as they are. int number_of_name_items = 0; antlr::RefAST n = c; while(n != antlr::nullAST && n->getType() != sqlite3TokenTypes::COLLATE && n->getType() != sqlite3TokenTypes::ASC && n->getType() != sqlite3TokenTypes::DESC && n->getType() != sqlite3TokenTypes::COMMA && n->getType() != sqlite3TokenTypes::RPAREN) { number_of_name_items++; n = n->getNextSibling(); } if(number_of_name_items == 1) { name = identifier(c); isExpression = false; c = c->getNextSibling(); } else { for(int i=0;igetText().c_str() + QString(" "); c = c->getNextSibling(); } name.chop(1); isExpression = true; } // Parse the rest of the column definition while(c != antlr::nullAST) { switch(c->getType()) { case sqlite3TokenTypes::ASC: case sqlite3TokenTypes::DESC: order = c->getText().c_str(); break; default: // TODO Add support for COLLATE index->setFullyParsed(false); } c = c->getNextSibling(); } index->fields.emplace_back(name, isExpression, order); } View::~View() { } ViewPtr View::parseSQL(const QString& sSQL) { // TODO auto v = ViewPtr(new View("")); v->setOriginalSql(sSQL); return v; } QStringList View::fieldNames() const { QStringList sl; for(const Field& f : fields) sl << f.name(); return sl; } FieldInfoList View::fieldInformation() const { FieldInfoList result; for(const Field& f : fields) result.emplace_back(f.name(), f.type(), f.toString(" ", " ")); return result; } TriggerPtr Trigger::parseSQL(const QString& sSQL) { // TODO auto t = TriggerPtr(new Trigger("")); t->setOriginalSql(sSQL); return t; } } //namespace sqlb sqlitebrowser-3.11.2/src/sqlitetypes.h000066400000000000000000000435721345112435200200440ustar00rootroot00000000000000#pragma once #ifndef SQLITETYPES_H #define SQLITETYPES_H #include #include #include #include #include template bool contains(const C& container, E element) { return std::find(container.begin(), container.end(), element) != container.end(); } namespace sqlb { #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) struct QHashCombine { typedef uint result_type; template Q_DECL_CONSTEXPR result_type operator()(uint seed, const T &t) const Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(t))) // combiner taken from N3876 / boost::hash_combine { return seed ^ (qHash(t) + 0x9e3779b9 + (seed << 6) + (seed >> 2)) ; } }; template inline uint qHashRange(InputIterator first, InputIterator last, uint seed = 0) Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(*first))) // assume iterator operations don't throw { return std::accumulate(first, last, seed, QHashCombine()); } #endif template uint qHash(const QList& key, uint seed = 0) Q_DECL_NOEXCEPT_EXPR(noexcept(qHashRange(key.cbegin(), key.cend(), seed))) { return qHashRange(key.cbegin(), key.cend(), seed); } #endif enum escapeQuoting { DoubleQuotes, GraveAccents, SquareBrackets }; // Set quoting style for escapeIdentifier void setIdentifierQuoting(escapeQuoting toQuoting); QString escapeIdentifier(QString id); QStringList escapeIdentifier(const QStringList& ids); class ObjectIdentifier { public: ObjectIdentifier(const QString& schema, const QString& name) : m_schema(schema), m_name(name) { } ObjectIdentifier() : m_schema("main"), m_name(QString()) { } explicit ObjectIdentifier(QVariant variant) { QStringList str = variant.toStringList(); if(str.size()) { m_schema = str.first(); if(str.size() >= 2) m_name = str.last(); } } bool operator==(const ObjectIdentifier& rhs) const { return (rhs.m_schema == m_schema && rhs.m_name == m_name); } bool operator<(const ObjectIdentifier& rhs) const { return toDisplayString() < rhs.toDisplayString(); } const QString& schema() const { return m_schema; } const QString& name() const { return m_name; } void setSchema(const QString& schema) { m_schema = schema; } void setName(const QString& name) { m_name = name; } void clear() { m_schema = "main"; m_name.clear(); } bool isEmpty() const { return m_name.isEmpty(); } // This returns a string which can be used in SQL statements QString toString(bool shortName = false) const { if(shortName && m_schema == "main") return sqlb::escapeIdentifier(m_name); else return QString("%1.%2").arg(sqlb::escapeIdentifier(m_schema)).arg(sqlb::escapeIdentifier(m_name)); } // This returns a string which can be used in the user interface QString toDisplayString() const { if(m_schema == "main") return m_name; else return QString("%1.%2").arg(m_schema).arg(m_name); } QVariant toVariant() const { QStringList result; result << m_schema << m_name; return QVariant(result); } private: QString m_schema; QString m_name; }; struct StringListHash { size_t operator()(const QStringList& key) const { return qHash(key); } }; class Object; class Table; class Index; class View; class Trigger; class Field; class Constraint; class IndexedColumn; struct FieldInfo; using ObjectPtr = std::shared_ptr; using TablePtr = std::shared_ptr; using IndexPtr = std::shared_ptr; using ViewPtr = std::shared_ptr; using TriggerPtr = std::shared_ptr; using ConstraintPtr = std::shared_ptr; using FieldVector = std::vector; using IndexedColumnVector = std::vector; using ConstraintMap = std::unordered_multimap; using FieldInfoList = std::vector; struct FieldInfo { FieldInfo(const QString& name_, const QString& type_, const QString& sql_) : name(name_), type(type_), sql(sql_) {} QString name; QString type; QString sql; }; class Object { public: enum Types { Table, Index, View, Trigger }; explicit Object(const QString& name): m_name(name), m_fullyParsed(false) {} virtual ~Object() {} virtual Types type() const = 0; static QString typeToString(Types type); void setName(const QString& name) { m_name = name; } const QString& name() const { return m_name; } void setOriginalSql(const QString& original_sql) { m_originalSql = original_sql; } QString originalSql() const { return m_originalSql; } virtual QString baseTable() const { return QString(); } void setFullyParsed(bool fully_parsed) { m_fullyParsed = fully_parsed; } bool fullyParsed() const { return m_fullyParsed; } virtual FieldInfoList fieldInformation() const { return FieldInfoList(); } /** * @brief Returns the CREATE statement for this object * @param schema The schema name of the object * @param ifNotExists If set to true the "IF NOT EXISTS" qualifier will be added to the create statement * @return A QString with the CREATE statement. */ virtual QString sql(const QString& schema = QString("main"), bool ifNotExists = false) const = 0; protected: QString m_name; QString m_originalSql; bool m_fullyParsed; }; class Constraint { public: enum ConstraintTypes { NoType, PrimaryKeyConstraintType, UniqueConstraintType, ForeignKeyConstraintType, CheckConstraintType, }; explicit Constraint(const QString& name = QString()) : m_name(name) { } virtual ~Constraint() {} virtual ConstraintTypes type() const = 0; void setName(const QString& name) { m_name = name; } const QString& name() const { return m_name; } virtual QString toSql(const QStringList& applyOn) const = 0; protected: QString m_name; }; class ForeignKeyClause : public Constraint { public: ForeignKeyClause(const QString& table = QString(), const QStringList& columns = QStringList(), const QString& constraint = QString()) : m_table(table), m_columns(columns), m_constraint(constraint), m_override(QString()) { } bool isSet() const; QString toString() const; void setFromString(const QString& fk); void setTable(const QString& table) { m_override = QString(); m_table = table; } const QString& table() const { return m_table; } void setColumns(const QStringList& columns) { m_columns = columns; } const QStringList& columns() const { return m_columns; } void setConstraint(const QString& constraint) { m_constraint = constraint; } const QString& constraint() const { return m_constraint; } virtual QString toSql(const QStringList& applyOn) const; virtual ConstraintTypes type() const { return ForeignKeyConstraintType; } private: QString m_table; QStringList m_columns; QString m_constraint; QString m_override; }; class UniqueConstraint : public Constraint { public: UniqueConstraint() {} virtual QString toSql(const QStringList& applyOn) const; virtual ConstraintTypes type() const { return UniqueConstraintType; } }; class PrimaryKeyConstraint : public Constraint { public: PrimaryKeyConstraint() {} void setConflictAction(const QString& conflict) { m_conflictAction = conflict; } const QString& conflictAction() const { return m_conflictAction; } virtual QString toSql(const QStringList& applyOn) const; virtual ConstraintTypes type() const { return PrimaryKeyConstraintType; } private: QString m_conflictAction; }; class CheckConstraint : public Constraint { public: explicit CheckConstraint(const QString& expr = QString()) : m_expression(expr) { } void setExpression(const QString& expr) { m_expression = expr; } QString expression() const { return m_expression; } virtual QString toSql(const QStringList& applyOn) const; virtual ConstraintTypes type() const { return CheckConstraintType; } private: QString m_expression; }; class Field { public: Field() : m_notnull(false), m_autoincrement(false), m_unique(false) {} Field(const QString& name, const QString& type, bool notnull = false, const QString& defaultvalue = "", const QString& check = "", bool unique = false, const QString& collation = QString()) : m_name(name) , m_type(type) , m_notnull(notnull) , m_check(check) , m_defaultvalue(defaultvalue) , m_autoincrement(false) , m_unique(unique) , m_collation(collation) {} bool operator==(const Field& rhs) const { return m_name == rhs.name(); } QString toString(const QString& indent = "\t", const QString& sep = "\t") const; void setName(const QString& name) { m_name = name; } void setType(const QString& type) { m_type = type; } void setNotNull(bool notnull = true) { m_notnull = notnull; } void setCheck(const QString& check) { m_check = check; } void setDefaultValue(const QString& defaultvalue) { m_defaultvalue = defaultvalue; } void setAutoIncrement(bool autoinc) { m_autoincrement = autoinc; } void setUnique(bool u) { m_unique = u; } void setCollation(const QString& collation) { m_collation = collation; } bool isText() const; bool isInteger() const; bool isBlob() const; bool isReal() const; bool isNumeric() const; // Type affinity of the column according to SQLite3 rules QString affinity() const; const QString& name() const { return m_name; } const QString& type() const { return m_type; } bool notnull() const { return m_notnull; } const QString& check() const { return m_check; } const QString& defaultValue() const { return m_defaultvalue; } bool autoIncrement() const { return m_autoincrement; } bool unique() const { return m_unique; } const QString& collation() const { return m_collation; } private: QString m_name; QString m_type; bool m_notnull; QString m_check; QString m_defaultvalue; bool m_autoincrement; //! this is stored here for simplification bool m_unique; QString m_collation; }; class Table : public Object { public: explicit Table(const QString& name): Object(name), m_rowidColumn("_rowid_") {} virtual ~Table(); Table& operator=(const Table& rhs); virtual Types type() const { return Object::Table; } FieldVector fields; using field_type = Field; using field_iterator = FieldVector::iterator; /** * @brief Returns the CREATE TABLE statement for this table object * @return A QString with the CREATE TABLE object. */ QString sql(const QString& schema = QString("main"), bool ifNotExists = false) const; QStringList fieldNames() const; void setRowidColumn(const QString& rowid) { m_rowidColumn = rowid; } const QString& rowidColumn() const { return m_rowidColumn; } bool isWithoutRowidTable() const { return m_rowidColumn != "_rowid_"; } void setVirtualUsing(const QString& virt_using) { m_virtual = virt_using; } QString virtualUsing() const { return m_virtual; } bool isVirtual() const { return !m_virtual.isEmpty(); } virtual FieldInfoList fieldInformation() const; void addConstraint(QStringList fields, ConstraintPtr constraint); void setConstraint(QStringList fields, ConstraintPtr constraint); void removeConstraints(QStringList fields = QStringList(), Constraint::ConstraintTypes type = Constraint::NoType); //! Only removes the first constraint, if any ConstraintPtr constraint(QStringList fields = QStringList(), Constraint::ConstraintTypes type = Constraint::NoType) const; //! Only returns the first constraint, if any std::vector constraints(QStringList fields = QStringList(), Constraint::ConstraintTypes type = Constraint::NoType) const; ConstraintMap allConstraints() const { return m_constraints; } void setConstraints(const ConstraintMap& constraints); QStringList& primaryKeyRef(); const QStringList& primaryKey() const; void removeKeyFromAllConstraints(const QString& key); void renameKeyInAllConstraints(const QString& key, const QString& to); field_iterator findPk(); /** * @brief parseSQL Parses the create Table statement in sSQL. * @param sSQL The create table statement. * @return The table object. The table object may be empty if parsing failed. */ static TablePtr parseSQL(const QString& sSQL); private: QStringList fieldList() const; bool hasAutoIncrement() const; private: QString m_rowidColumn; ConstraintMap m_constraints; QString m_virtual; }; class IndexedColumn { public: IndexedColumn(const QString& name, bool expr, const QString& order = QString()) : m_name(name), m_isExpression(expr), m_order(order) { } void setName(const QString& name) { m_name = name; } QString name() const { return m_name; } void setExpression(bool expr) { m_isExpression = expr; } bool expression() const { return m_isExpression; } void setOrder(const QString& order) { m_order = order.toUpper(); } QString order() const { return m_order; } QString toString(const QString& indent = "\t", const QString& sep = "\t") const; private: QString m_name; bool m_isExpression; QString m_order; }; class Index : public Object { public: explicit Index(const QString& name): Object(name), m_unique(false) {} virtual ~Index(); Index& operator=(const Index& rhs); virtual Types type() const { return Object::Index; } IndexedColumnVector fields; using field_type = IndexedColumn; using field_iterator = IndexedColumnVector::iterator; virtual QString baseTable() const { return m_table; } void setUnique(bool unique) { m_unique = unique; } bool unique() const { return m_unique; } void setTable(const QString& table) { m_table = table; } const QString& table() const { return m_table; } void setWhereExpr(const QString& expr) { m_whereExpr = expr; } const QString& whereExpr() const { return m_whereExpr; } /** * @brief Returns the CREATE INDEX statement for this index object * @return A QString with the CREATE INDEX object. */ QString sql(const QString& schema = QString("main"), bool ifNotExists = false) const; /** * @brief parseSQL Parses the CREATE INDEX statement in sSQL. * @param sSQL The create index statement. * @return The index object. The index object may be empty if the parsing failed. */ static IndexPtr parseSQL(const QString& sSQL); virtual FieldInfoList fieldInformation() const; private: QStringList columnSqlList() const; bool m_unique; QString m_table; QString m_whereExpr; }; class View : public Object { public: explicit View(const QString& name): Object(name) {} virtual ~View(); virtual Types type() const { return Object::View; } FieldVector fields; QString sql(const QString& schema = QString("main"), bool ifNotExists = false) const { /* TODO */ Q_UNUSED(schema); Q_UNUSED(ifNotExists); return m_originalSql; } static ViewPtr parseSQL(const QString& sSQL); QStringList fieldNames() const; virtual FieldInfoList fieldInformation() const; }; class Trigger : public Object { public: explicit Trigger(const QString& name): Object(name) {} virtual ~Trigger() {} virtual Types type() const { return Object::Trigger; } QString sql(const QString& schema = QString("main"), bool ifNotExists = false) const { /* TODO */ Q_UNUSED(schema); Q_UNUSED(ifNotExists); return m_originalSql; } static TriggerPtr parseSQL(const QString& sSQL); virtual QString baseTable() const { return m_table; } void setTable(const QString& table) { m_table = table; } QString table() const { return m_table; } private: QString m_table; }; /** * @brief findField Finds a field in the database object and returns an iterator to it. * @param object * @param name * @return The iterator pointing to the field in the field container of the object if the field was found. * object.fields.end() if the field couldn't be found. */ template typename T::field_iterator findField(T* object, const QString& name) { return std::find_if(object->fields.begin(), object->fields.end(), [&name](const typename T::field_type& f) {return f.name().compare(name, Qt::CaseInsensitive) == 0;}); } template typename T::field_iterator findField(std::shared_ptr object, const QString& name) { return findField(object.get(), name); } template typename T::field_iterator findField(T& object, const QString& name) { return findField(&object, name); } template struct is_shared_ptr : std::false_type {}; template struct is_shared_ptr> : std::true_type {}; /** * @brief removeField Finds and removes a field in the database object * @param object * @param name * @return true if sucessful, otherwise false */ template bool removeField(T* object, const QString& name) { auto index = findField(object, name); if(index != object->fields.end()) { object->fields.erase(index); return true; } return false; } template::value>::type> bool removeField(T object, const QString& name) { return removeField(object.get(), name); } template::value>::type> bool removeField(T& object, const QString& name) { return removeField(&object, name); } } //namespace sqlb #endif sqlitebrowser-3.11.2/src/sqltextedit.cpp000066400000000000000000000054031345112435200203520ustar00rootroot00000000000000#include "sqlitetypes.h" #include "sqltextedit.h" #include "Settings.h" #include "SqlUiLexer.h" SqlUiLexer* SqlTextEdit::sqlLexer = nullptr; SqlTextEdit::SqlTextEdit(QWidget* parent) : ExtendedScintilla(parent) { // Create lexer object if not done yet if(sqlLexer == nullptr) sqlLexer = new SqlUiLexer(this); // Set the SQL lexer setLexer(sqlLexer); // Set icons for auto completion registerImage(SqlUiLexer::ApiCompleterIconIdKeyword, QImage(":/icons/keyword")); registerImage(SqlUiLexer::ApiCompleterIconIdFunction, QImage(":/icons/function")); registerImage(SqlUiLexer::ApiCompleterIconIdTable, QImage(":/icons/table")); registerImage(SqlUiLexer::ApiCompleterIconIdColumn, QImage(":/icons/field")); registerImage(SqlUiLexer::ApiCompleterIconIdSchema, QImage(":/icons/database")); // Do rest of initialisation reloadSettings(); } SqlTextEdit::~SqlTextEdit() { } void SqlTextEdit::reloadSettings() { // Enable auto completion if it hasn't been disabled if(Settings::getValue("editor", "auto_completion").toBool()) { setAutoCompletionThreshold(3); setAutoCompletionCaseSensitivity(true); setAutoCompletionShowSingle(true); setAutoCompletionSource(QsciScintilla::AcsAPIs); } else { setAutoCompletionThreshold(0); } ExtendedScintilla::reloadSettings(); setupSyntaxHighlightingFormat(sqlLexer, "comment", QsciLexerSQL::Comment); setupSyntaxHighlightingFormat(sqlLexer, "comment", QsciLexerSQL::CommentLine); setupSyntaxHighlightingFormat(sqlLexer, "comment", QsciLexerSQL::CommentDoc); setupSyntaxHighlightingFormat(sqlLexer, "keyword", QsciLexerSQL::Keyword); setupSyntaxHighlightingFormat(sqlLexer, "table", QsciLexerSQL::KeywordSet6); setupSyntaxHighlightingFormat(sqlLexer, "function", QsciLexerSQL::KeywordSet7); setupSyntaxHighlightingFormat(sqlLexer, "string", QsciLexerSQL::SingleQuotedString); // Highlight double quote strings as identifier or as literal string depending on user preference switch(static_cast(Settings::getValue("editor", "identifier_quotes").toInt())) { case sqlb::DoubleQuotes: setupSyntaxHighlightingFormat(sqlLexer, "identifier", QsciLexerSQL::DoubleQuotedString); sqlLexer->setQuotedIdentifiers(false); break; case sqlb::GraveAccents: sqlLexer->setQuotedIdentifiers(true); // Fall through, treat quoted string as literal string case sqlb::SquareBrackets: setupSyntaxHighlightingFormat(sqlLexer, "string", QsciLexerSQL::DoubleQuotedString); break; } setupSyntaxHighlightingFormat(sqlLexer, "identifier", QsciLexerSQL::Identifier); setupSyntaxHighlightingFormat(sqlLexer, "identifier", QsciLexerSQL::QuotedIdentifier); } sqlitebrowser-3.11.2/src/sqltextedit.h000066400000000000000000000006771345112435200200270ustar00rootroot00000000000000#ifndef SQLTEXTEDIT_H #define SQLTEXTEDIT_H #include "ExtendedScintilla.h" class FindReplaceDialog; class SqlUiLexer; /** * @brief The SqlTextEdit class * This class is based on the QScintilla widget */ class SqlTextEdit : public ExtendedScintilla { Q_OBJECT public: explicit SqlTextEdit(QWidget *parent = nullptr); virtual ~SqlTextEdit(); static SqlUiLexer* sqlLexer; public slots: void reloadSettings(); }; #endif sqlitebrowser-3.11.2/src/src.pro000066400000000000000000000162031345112435200166050ustar00rootroot00000000000000TEMPLATE = app QT += core gui network widgets printsupport concurrent xml macx: QT += opengl TARGET = sqlitebrowser CONFIG += debug_and_release CONFIG += qt CONFIG += warn_on QMAKE_CXXFLAGS += -std=c++11 # create a unittest option CONFIG(unittest) { QT += testlib HEADERS += tests/testsqlobjects.h tests/TestImport.h tests/TestRegex.h tests/TestRowCache.h SOURCES += tests/testsqlobjects.cpp tests/TestImport.cpp tests/TestRegex.cpp tests/TestRowCache.cpp } else { SOURCES += main.cpp } HEADERS += \ sqlitedb.h \ MainWindow.h \ EditIndexDialog.h \ AboutDialog.h \ EditTableDialog.h \ AddRecordDialog.h \ Settings.h \ PreferencesDialog.h \ EditDialog.h \ ExportDataDialog.h \ ImportCsvDialog.h \ sqltextedit.h \ sqlitetypes.h \ csvparser.h \ ExtendedTableWidget.h \ grammar/Sqlite3Lexer.hpp \ grammar/Sqlite3Parser.hpp \ grammar/sqlite3TokenTypes.hpp \ sqlitetablemodel.h \ RowCache.h \ RowLoader.h \ FilterTableHeader.h \ version.h \ SqlExecutionArea.h \ VacuumDialog.h \ DbStructureModel.h \ Application.h \ sqlite.h \ CipherDialog.h \ ExportSqlDialog.h \ SqlUiLexer.h \ FileDialog.h \ ColumnDisplayFormatDialog.h \ FilterLineEdit.h \ RemoteDatabase.h \ ForeignKeyEditorDelegate.h \ PlotDock.h \ RemoteDock.h \ RemoteModel.h \ RemotePushDialog.h \ docktextedit.h \ FindReplaceDialog.h \ ExtendedScintilla.h \ FileExtensionManager.h \ Data.h \ CipherSettings.h \ DotenvFormat.h SOURCES += \ sqlitedb.cpp \ MainWindow.cpp \ EditIndexDialog.cpp \ EditTableDialog.cpp \ AddRecordDialog.cpp \ Settings.cpp \ PreferencesDialog.cpp \ AboutDialog.cpp \ EditDialog.cpp \ ExportDataDialog.cpp \ ImportCsvDialog.cpp \ sqltextedit.cpp \ sqlitetypes.cpp \ csvparser.cpp \ ExtendedTableWidget.cpp \ grammar/Sqlite3Lexer.cpp \ grammar/Sqlite3Parser.cpp \ sqlitetablemodel.cpp \ RowLoader.cpp \ FilterTableHeader.cpp \ SqlExecutionArea.cpp \ VacuumDialog.cpp \ DbStructureModel.cpp \ Application.cpp \ CipherDialog.cpp \ ExportSqlDialog.cpp \ SqlUiLexer.cpp \ FileDialog.cpp \ ColumnDisplayFormatDialog.cpp \ FilterLineEdit.cpp \ RemoteDatabase.cpp \ ForeignKeyEditorDelegate.cpp \ PlotDock.cpp \ RemoteDock.cpp \ RemoteModel.cpp \ RemotePushDialog.cpp \ docktextedit.cpp \ FindReplaceDialog.cpp \ ExtendedScintilla.cpp \ FileExtensionManager.cpp \ Data.cpp \ CipherSettings.cpp \ DotenvFormat.cpp RESOURCES += icons/icons.qrc \ translations/flags/flags.qrc \ translations/translations.qrc \ certs/CaCerts.qrc FORMS += \ MainWindow.ui \ EditIndexDialog.ui \ AboutDialog.ui \ EditTableDialog.ui \ AddRecordDialog.ui \ PreferencesDialog.ui \ EditDialog.ui \ ExportDataDialog.ui \ ImportCsvDialog.ui \ SqlExecutionArea.ui \ VacuumDialog.ui \ CipherDialog.ui \ ExportSqlDialog.ui \ ColumnDisplayFormatDialog.ui \ PlotDock.ui \ RemoteDock.ui \ RemotePushDialog.ui \ FindReplaceDialog.ui \ FileExtensionManager.ui TRANSLATIONS += \ translations/sqlb_ar_SA.ts \ translations/sqlb_cs.ts \ translations/sqlb_zh.ts \ translations/sqlb_zh_TW.ts \ translations/sqlb_de.ts \ translations/sqlb_es_ES.ts \ translations/sqlb_fr.ts \ translations/sqlb_ru.ts \ translations/sqlb_pl.ts \ translations/sqlb_pt_BR.ts \ translations/sqlb_en_GB.ts \ translations/sqlb_ko_KR.ts \ translations/sqlb_tr.ts \ translations/sqlb_uk_UA.ts \ translations/sqlb_it.ts # SQLite / SQLCipher switch pieces CONFIG(sqlcipher) { QMAKE_CXXFLAGS += -DENABLE_SQLCIPHER LIBS += -lsqlcipher # Add the paths for Homebrew installed SQLCipher mac { INCLUDEPATH += /usr/local/opt/sqlcipher/include LIBS += -L/usr/local/opt/sqlcipher/lib } } else { LIBS += -lsqlite3 # Add the paths for Homebrew installed SQLite mac { INCLUDEPATH += /usr/local/opt/sqlite/include LIBS += -L/usr/local/opt/sqlite/lib } } LIBPATH_QHEXEDIT=$$OUT_PWD/../libs/qhexedit LIBPATH_ANTLR=$$OUT_PWD/../libs/antlr-2.7.7 LIBPATH_QCUSTOMPLOT=$$OUT_PWD/../libs/qcustomplot-source LIBPATH_QSCINTILLA=$$OUT_PWD/../libs/qscintilla/Qt4Qt5 unix { LIBS += -ldl } os2 { RC_FILE = os2app.rc } win32 { TARGET = "DB Browser for SQLite" RC_FILE = winapp.rc INCLUDEPATH += $$PWD CONFIG(debug,debug|release) { LIBPATH_QHEXEDIT = $$LIBPATH_QHEXEDIT/debug LIBPATH_ANTLR = $$LIBPATH_ANTLR/debug LIBPATH_QCUSTOMPLOT = $$LIBPATH_QCUSTOMPLOT/debug LIBPATH_QSCINTILLA = $$LIBPATH_QSCINTILLA/debug } CONFIG(release,debug|release) { LIBPATH_QHEXEDIT = $$LIBPATH_QHEXEDIT/release LIBPATH_ANTLR = $$LIBPATH_ANTLR/release LIBPATH_QCUSTOMPLOT = $$LIBPATH_QCUSTOMPLOT/release LIBPATH_QSCINTILLA = $$LIBPATH_QSCINTILLA/release } QMAKE_CXXFLAGS += -DCHECKNEWVERSION # Added SQLite installation path variables, matching our setup guide LIBS += -L$$PWD/../../../dev/SQLite/ -lsqlite3 INCLUDEPATH += $$PWD/../../../dev/SQLite DEPENDPATH += $$PWD/../../../dev/SQLite } mac { TARGET = "DB Browser for SQLite" RC_FILE = macapp.icns QT+= macextras INCLUDEPATH += /usr/local/include LIBS += -L/usr/local/lib -framework Carbon QMAKE_INFO_PLIST = app.plist QMAKE_CXXFLAGS += -DCHECKNEWVERSION } UI_DIR = .ui INCLUDEPATH += $$PWD/../libs/antlr-2.7.7 $$PWD/../libs/qhexedit $$PWD/../libs/qcustomplot-source $$PWD/../libs/qscintilla/Qt4Qt5 $$PWD/.. LIBS += -L$$LIBPATH_QHEXEDIT -L$$LIBPATH_ANTLR -L$$LIBPATH_QCUSTOMPLOT -L$$LIBPATH_QSCINTILLA -lantlr -lqhexedit -lqcustomplot -lqscintilla2 DEPENDPATH += $$PWD/../libs/antlr-2.7.7 $$PWD/../libs/qhexedit $$PWD/../libs/qcustomplot-source $$PWD/../libs/qscintilla/Qt4Qt5 unix { # Below, the user can specify where all generated file can be placed # through a set of variables, being them: # # PREFIX -> the root directory where the files will be placed # BINDIR -> where executables accessible by the user resides # DATADIR -> where data files and resources should be placed # # The values of each variable changes between supported platforms and are describe as follow # Default configuration for package sqlitebrowser. # The default prefix is /usr/local !defined(PREFIX, var): PREFIX = /usr/local !defined(BINDIR, var): BINDIR = $$PREFIX/bin !defined(DATADIR, var): DATADIR = $$PREFIX/share # The executable target.path = $$BINDIR INSTALLS += target # Icon icon.path = $$DATADIR/icons/hicolor/256x256/apps/ icon.files = icons/sqlitebrowser.png INSTALLS += icon # Desktop metadata desktop.path = $$DATADIR/applications/ desktop.files = ../distri/sqlitebrowser.desktop INSTALLS += desktop appdata.path = $$DATADIR/appdata/ appdata.files = ../distri/sqlitebrowser.desktop.appdata.xml INSTALLS += appdata } # Rules for creating/updating {ts|qm}-files include(i18n.pri) sqlitebrowser-3.11.2/src/tests/000077500000000000000000000000001345112435200164345ustar00rootroot00000000000000sqlitebrowser-3.11.2/src/tests/CMakeLists.txt000066400000000000000000000070561345112435200212040ustar00rootroot00000000000000include_directories("${CMAKE_CURRENT_BINARY_DIR}" ..) if(NOT WIN32) set(LPTHREAD pthread) endif() # test-sqlobjects set(TESTSQLOBJECTS_SRC ../sqlitedb.cpp ../sqlitetablemodel.cpp ../RowLoader.cpp ../sqlitetypes.cpp ../csvparser.cpp ../grammar/Sqlite3Lexer.cpp ../grammar/Sqlite3Parser.cpp ../Settings.cpp testsqlobjects.cpp ../Data.cpp ../CipherSettings.cpp ../DotenvFormat.cpp ) set(TESTSQLOBJECTS_HDR ../grammar/sqlite3TokenTypes.hpp ../grammar/Sqlite3Lexer.hpp ../grammar/Sqlite3Parser.hpp ../sqlitetypes.h ../Data.h ) set(TESTSQLOBJECTS_MOC_HDR ../sqlitedb.h ../sqlitetablemodel.h ../Settings.h testsqlobjects.h ../CipherSettings.h ../DotenvFormat.h ) if(sqlcipher) list(APPEND TESTSQLOBJECTS_SRC ../CipherDialog.cpp) list(APPEND TESTSQLOBJECTS_FORMS ../CipherDialog.ui) list(APPEND TESTSQLOBJECTS_MOC_HDR ../CipherDialog.h) endif() QT5_WRAP_UI(TESTSQLOBJECTS_FORM_HDR ${TESTSQLOBJECTS_FORMS}) add_executable(test-sqlobjects ${TESTSQLOBJECTS_MOC} ${TESTSQLOBJECTS_HDR} ${TESTSQLOBJECTS_SRC} ${TESTSQLOBJECTS_FORM_HDR}) find_package(Qt5 REQUIRED COMPONENTS Test Widgets Gui) target_link_libraries(test-sqlobjects Qt5::Test Qt5::Widgets Qt5::Gui) set(QT_LIBRARIES "") if(NOT ANTLR2_FOUND) add_dependencies(test-sqlobjects antlr) endif() target_link_libraries(test-sqlobjects ${QT_LIBRARIES} ${LIBSQLITE}) if(ANTLR2_FOUND) target_link_libraries(test-sqlobjects ${ANTLR2_LIBRARIES}) else() target_link_libraries(test-sqlobjects antlr) endif() target_link_libraries(test-sqlobjects ${LPTHREAD}) add_test(test-sqlobjects test-sqlobjects) # test-import set(TESTIMPORT_SRC ../csvparser.cpp TestImport.cpp ) set(TESTIMPORT_MOC_HDR TestImport.h ) add_executable(test-import ${TESTIMPORT_MOC} ${TESTIMPORT_SRC}) find_package(Qt5 REQUIRED COMPONENTS Core) target_link_libraries(test-import Qt5::Test Qt5::Core) set(QT_LIBRARIES "") target_link_libraries(test-import ${QT_LIBRARIES}) add_test(test-import test-import) # test regex set(TESTREGEX_SRC ../sqlitedb.cpp ../sqlitetablemodel.cpp ../RowLoader.cpp ../sqlitetypes.cpp ../grammar/Sqlite3Lexer.cpp ../grammar/Sqlite3Parser.cpp ../Settings.cpp TestRegex.cpp ../Data.cpp ../CipherSettings.cpp ../DotenvFormat.cpp ) set(TESTREGEX_HDR ../grammar/sqlite3TokenTypes.hpp ../grammar/Sqlite3Lexer.hpp ../grammar/Sqlite3Parser.hpp ../sqlitetypes.h ../Data.h ) set(TESTREGEX_MOC_HDR ../sqlitedb.h ../sqlitetablemodel.h ../Settings.h TestRegex.h ../CipherSettings.h ../DotenvFormat.h ) if(sqlcipher) list(APPEND TESTREGEX_SRC ../CipherDialog.cpp) list(APPEND TESTREGEX_MOC_HDR ../CipherDialog.h) endif() add_executable(test-regex ${TESTREGEX_MOC} ${TESTREGEX_HDR} ${TESTREGEX_SRC}) target_link_libraries(test-regex Qt5::Test Qt5::Core Qt5::Gui Qt5::Widgets) set(QT_LIBRARIES "") if(NOT ANTLR2_FOUND) add_dependencies(test-regex antlr) endif() target_link_libraries(test-regex ${QT_LIBRARIES} ${LIBSQLITE}) if(ANTLR2_FOUND) target_link_libraries(test-regex ${ANTLR2_LIBRARIES}) else() target_link_libraries(test-regex antlr) endif() target_link_libraries(test-regex ${LPTHREAD}) add_test(test-regex test-regex) # test cache set(TESTCACHE_SRC TestRowCache.cpp ) set(TESTCACHE_MOC_HDR TestRowCache.h ) add_executable(test-cache ${TESTCACHE_MOC} ${TESTCACHE_SRC}) target_link_libraries(test-cache Qt5::Test Qt5::Core) set(QT_LIBRARIES "") target_link_libraries(test-cache ${QT_LIBRARIES}) add_test(test-cache test-cache) sqlitebrowser-3.11.2/src/tests/TestImport.cpp000066400000000000000000000147201345112435200212560ustar00rootroot00000000000000// force QtCore-only main application by QTEST_MAIN #undef QT_GUI_LIB #include #include #include #include #include #include "csvparser.h" #include "TestImport.h" QTEST_MAIN(TestImport) TestImport::TestImport() { } TestImport::~TestImport() { } void TestImport::csvImport() { // Fetch data QFETCH(QString, csv); QFETCH(char, separator); QFETCH(char, quote); QFETCH(QString, encoding); QFETCH(int, numfields); QFETCH(QVector>, result); // Create temporary CSV file QTemporaryFile file; QVERIFY(file.open()); { QTextStream out(&file); out.setCodec(encoding.toUtf8()); out << csv; } file.flush(); CSVParser csvparser(true, separator, quote); file.seek(0); QTextStream tstream(&file); tstream.setCodec(encoding.toUtf8()); QVector> parsedCsv; int parsedCsvColumns = 0; csvparser.parse([&parsedCsv, &parsedCsvColumns](size_t /*rowNum*/, const CSVRow& data) -> bool { QVector row; for(size_t i=0;i parsedCsvColumns) parsedCsvColumns = row.size(); return true; }, tstream); // Check return values QCOMPARE(parsedCsvColumns, numfields); QCOMPARE(parsedCsv.size(), result.size()); for(int i=0;i("csv"); QTest::addColumn("separator"); QTest::addColumn("quote"); QTest::addColumn("encoding"); QTest::addColumn("numfields"); QTest::addColumn>>("result"); QVector> result; result.append(QVector() << "a" << "b" << "c"); result.append(QVector() << "d" << "e" << "f"); result.append(QVector() << "g" << "h" << "i"); QTest::newRow("commas_noquotes") << "a,b,c\nd,e,f\ng,h,i\n" << ',' << (char)0 << "UTF-8" << 3 << result; QTest::newRow("semicolons_noquotes") << "a;b;c\nd;e;f\ng;h;i\n" << ';' << (char)0 << "UTF-8" << 3 << result; QTest::newRow("commas_doublequotes") << "\"a\",\"b\",\"c\"\n\"d\",\"e\",\"f\"\n\"g\",\"h\",\"i\"\n" << ',' << '"' << "UTF-8" << 3 << result; QTest::newRow("noquotes_butquotesset") << "a,b,c\nd,e,f\ng,h,i\n" << ',' << '"' << "UTF-8" << 3 << result; QTest::newRow("windowslinebreaks") << "a,b,c\r\nd,e,f\r\ng,h,i\r\n" << ',' << (char)0 << "UTF-8" << 3 << result; QTest::newRow("oldmaclinebreaks") << "a,b,c\rd,e,f\rg,h,i\r" << ',' << (char)0 << "UTF-8" << 3 << result; result.clear(); result.append(QVector() << "a" << "b" << ""); result.append(QVector() << "c" << ""); result.append(QVector() << "d" << "" << "e"); result.append(QVector() << ""); result.append(QVector() << "" << "" << "f"); QTest::newRow("emptyvalues") << "a,b,\nc,\nd,,e\n\n,,f" << ',' << (char)0 << "UTF-8" << 3 << result; result.clear(); result.append(QVector() << "a" << "b" << "c"); QTest::newRow("oneline") << "a,b,c" << ',' << (char)0 << "UTF-8" << 3 << result; result.clear(); result.append(QVector() << "a,a\"" << "b" << "c"); result.append(QVector() << "d" << "e" << "\"\"f,f"); QTest::newRow("manyquotes") << "\"a,a\"\"\",\"b\",\"c\"\n\"d\",\"e\",\"\"\"\"\"f,f\"\n" << ',' << '"' << "UTF-8" << 3 << result; result.clear(); result.append(QVector() << QByteArray("\xC2\xAE") << QByteArray("\xC9\x85") << QByteArray("\xC6\x89")); QString csv = QString::fromUtf8("\xC2\xAE") + "," + QString::fromUtf8("\xC9\x85") + "," + QString::fromUtf8("\xC6\x89") + "\n"; QTest::newRow("utf8chars") << csv << ',' << (char)0 << "UTF-8" << 3 << result; result.clear(); result.append(QVector() << QByteArray("\u4E18") << QByteArray("\u4E26") << QByteArray("\u4E4B")); QString csv2 = QString::fromUtf8("\u4E18") + "," + QString::fromUtf8("\u4E26") + "," + QString::fromUtf8("\u4E4B") + "\n"; QTest::newRow("utf16chars") << csv2 << ',' << (char)0 << "UTF-16" << 3 << result; } sqlitebrowser-3.11.2/src/tests/TestImport.h000066400000000000000000000003521345112435200207170ustar00rootroot00000000000000#ifndef TESTIMPORT_H #define TESTIMPORT_H #include class TestImport : public QObject { Q_OBJECT public: TestImport(); ~TestImport(); private slots: void csvImport(); void csvImport_data(); }; #endif sqlitebrowser-3.11.2/src/tests/TestRegex.cpp000066400000000000000000000043251345112435200210560ustar00rootroot00000000000000#include "TestRegex.h" #include "../sqlitedb.h" #include "../sqlitetablemodel.h" #include QTEST_APPLESS_MAIN(TestRegex) void TestRegex::sqlQueryComments_data() { QTest::addColumn("dirtyQuery"); QTest::addColumn("clearQuery"); QTest::newRow("test1") << // dirtyQuery "SELECT * -- asd ffdsf\n" "-- saf ewf sf\n" "-- dsaf fd\n" "FROM \t-- sfsdf\n" "qwfwqf -- asdasd" << // clearQuery "SELECT *\nFROM\nqwfwqf"; QTest::newRow("test2") << // dirtyQuery "SELECT *-- comment\n" "FROM\n\n" "-- something\n" "qwfqwf" << // cleanQuery "SELECT *\nFROM\nqwfqwf"; QTest::newRow("test3") << // dirtyQuery "-- Comment before the query\n" "SELECT * FROM test" << // cleanQuery "SELECT * FROM test"; QTest::newRow("test4") << // dirtyQuery "SELECT * FROM test\n" "-- Comment after the query" << // cleanQuery "SELECT * FROM test"; QTest::newRow("test5") << // dirtyQuery "SELECT 40+2 -- get the answer\n" "AS answer" << // cleanQuery "SELECT 40+2\n" "AS answer"; QTest::newRow("test6") << // dirtyQuery "SELECT '-- comment inside quotes'" << // cleanQuery "SELECT '-- comment inside quotes'"; /* TODO Fix issue #1270, then activate these QTest::newRow("single_quote_comment") << // dirtyQuery "SELECT 'something--something' -- comment" << // cleanQuery "SELECT 'something--something'"; QTest::newRow("double_quote_comment") << // dirtyQuery "SELECT \"something--something\" -- comment" << // cleanQuery "SELECT \"something--something\"";*/ } void TestRegex::sqlQueryComments() { DBBrowserDB db; SqliteTableModel model(db); QFETCH(QString, dirtyQuery); QFETCH(QString, clearQuery); model.removeCommentsFromQuery(dirtyQuery); QCOMPARE(dirtyQuery, clearQuery); } sqlitebrowser-3.11.2/src/tests/TestRegex.h000066400000000000000000000003401345112435200205140ustar00rootroot00000000000000#ifndef TESTREGEX_H #define TESTREGEX_H #define REGEX_UNIT_TEST #include class TestRegex : public QObject { Q_OBJECT private slots: void sqlQueryComments(); void sqlQueryComments_data(); }; #endif sqlitebrowser-3.11.2/src/tests/TestRowCache.cpp000066400000000000000000000114371345112435200215010ustar00rootroot00000000000000#include #include "TestRowCache.h" #include "../RowCache.h" QTEST_APPLESS_MAIN(TestRowCache) TestRowCache::TestRowCache() { } TestRowCache::~TestRowCache() { } using C = RowCache; void TestRowCache::construction() { C c; QCOMPARE(c.numSet(), static_cast(0)); QVERIFY(c.count(0) == false); QVERIFY(c.count(1) == false); QVERIFY(c.count(2) == false); QVERIFY_EXCEPTION_THROWN(c.at(0), std::out_of_range); } void TestRowCache::setGet() { C c; c.set(1, 10); c.set(5, 50); c.set(0, 0); c.set(6, 60); c.set(100, 1000); QCOMPARE(c.numSet(), static_cast(5)); QCOMPARE(c.numSegments(), static_cast(4)); // the '0' set after the '1' position does not merge currently int cnt = 0; const C & cc = c; for(size_t i = 0; i < 200; i++) { if(c.count(i)) { QCOMPARE(c.at(i), static_cast(10*i)); QCOMPARE(cc.at(i), static_cast(10*i)); cnt++; } else { QVERIFY_EXCEPTION_THROWN(c.at(i), std::out_of_range); QVERIFY_EXCEPTION_THROWN(cc.at(i), std::out_of_range); } } QCOMPARE(cnt, 5); } void TestRowCache::insert() { C c; c.insert(3, 30); QCOMPARE(c.numSet(), static_cast(1)); QCOMPARE(c.numSegments(), static_cast(1)); QCOMPARE(c.at(3), 30); c.insert(3, 31); QCOMPARE(c.numSet(), static_cast(2)); QCOMPARE(c.numSegments(), static_cast(1)); QCOMPARE(c.at(3), 31); QCOMPARE(c.at(4), 30); c.insert(0, 0); QCOMPARE(c.numSet(), static_cast(3)); QCOMPARE(c.numSegments(), static_cast(2)); QCOMPARE(c.at(0), 0); QVERIFY_EXCEPTION_THROWN(c.at(3), std::out_of_range); QCOMPARE(c.at(4), 31); QCOMPARE(c.at(5), 30); QVERIFY_EXCEPTION_THROWN(c.at(6), std::out_of_range); c.insert(1, 100); QCOMPARE(c.numSet(), static_cast(4)); QCOMPARE(c.numSegments(), static_cast(2)); QCOMPARE(c.at(0), 0); QCOMPARE(c.at(1), 100); QCOMPARE(c.at(5), 31); QCOMPARE(c.at(6), 30); c.insert(8, 1); QCOMPARE(c.numSet(), static_cast(5)); QCOMPARE(c.numSegments(), static_cast(3)); QCOMPARE(c.at(0), 0); QCOMPARE(c.at(1), 100); QCOMPARE(c.at(5), 31); QCOMPARE(c.at(6), 30); QCOMPARE(c.at(8), 1); } void TestRowCache::erase() { C c; c.insert(3, 30); c.insert(3, 31); c.insert(0, 0); c.insert(8, 1); QCOMPARE(c.numSet(), static_cast(4)); QCOMPARE(c.numSegments(), static_cast(3)); QCOMPARE(c.at(0), 0); QCOMPARE(c.at(4), 31); QCOMPARE(c.at(5), 30); QCOMPARE(c.at(8), 1); // erase entire segment c.erase(0); QCOMPARE(c.numSet(), static_cast(3)); QCOMPARE(c.numSegments(), static_cast(2)); QCOMPARE(c.at(3), 31); QCOMPARE(c.at(4), 30); QCOMPARE(c.at(7), 1); // erase inside segment c.erase(4); QCOMPARE(c.numSet(), static_cast(2)); QCOMPARE(c.numSegments(), static_cast(2)); QCOMPARE(c.at(3), 31); QCOMPARE(c.at(6), 1); // erase non-filled row c.erase(5); QCOMPARE(c.numSet(), static_cast(2)); QCOMPARE(c.numSegments(), static_cast(2)); QCOMPARE(c.at(3), 31); QCOMPARE(c.at(5), 1); c.erase(5); QCOMPARE(c.numSet(), static_cast(1)); QCOMPARE(c.numSegments(), static_cast(1)); QCOMPARE(c.at(3), 31); c.erase(3); QCOMPARE(c.numSet(), static_cast(0)); QCOMPARE(c.numSegments(), static_cast(0)); } void TestRowCache::smallestNonAvailableRange() { C c; c.insert(3, 0); c.insert(3, 0); c.insert(0, 0); c.insert(8, 0); QCOMPARE(c.numSet(), static_cast(4)); QVERIFY(c.count(0)); QVERIFY(c.count(4)); QVERIFY(c.count(5)); QVERIFY(c.count(8)); using P = std::pair; auto test = [&](size_t begin, size_t end) { P p{ begin, end }; c.smallestNonAvailableRange(p.first, p.second); return p; }; QCOMPARE(test( 0, 0), P( 0, 0)); QCOMPARE(test( 0, 1), P( 1, 1)); QCOMPARE(test( 0, 2), P( 1, 2)); QCOMPARE(test( 0, 3), P( 1, 3)); QCOMPARE(test( 0, 4), P( 1, 4)); QCOMPARE(test( 0, 5), P( 1, 4)); QCOMPARE(test( 0, 6), P( 1, 4)); QCOMPARE(test( 0, 7), P( 1, 7)); QCOMPARE(test( 0, 8), P( 1, 8)); QCOMPARE(test( 0, 9), P( 1, 8)); QCOMPARE(test( 0,10), P( 1,10)); QCOMPARE(test( 1,10), P( 1,10)); QCOMPARE(test( 2,10), P( 2,10)); QCOMPARE(test( 3,10), P( 3,10)); QCOMPARE(test( 4,10), P( 6,10)); QCOMPARE(test( 5,10), P( 6,10)); QCOMPARE(test( 6,10), P( 6,10)); QCOMPARE(test( 7,10), P( 7,10)); QCOMPARE(test( 8,10), P( 9,10)); QCOMPARE(test( 9,10), P( 9,10)); QCOMPARE(test(10,10), P(10,10)); } sqlitebrowser-3.11.2/src/tests/TestRowCache.h000066400000000000000000000004721345112435200211430ustar00rootroot00000000000000#ifndef TESTROWCACHE_H #define TESTROWCACHE_H #include class TestRowCache : public QObject { Q_OBJECT public: TestRowCache(); ~TestRowCache(); private slots: void construction(); void setGet(); void insert(); void erase(); void smallestNonAvailableRange(); }; #endif sqlitebrowser-3.11.2/src/tests/testsqlobjects.cpp000066400000000000000000000417111345112435200222150ustar00rootroot00000000000000#include "testsqlobjects.h" #include "../sqlitetypes.h" #include QTEST_APPLESS_MAIN(TestTable) using namespace sqlb; #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) namespace QTest { template inline bool qCompare(const T1 &t1, const T2 &t2, const char *actual, const char *expected, const char *file, int line) { return compare_helper(t1 == t2, "Compared values are not the same", toString(t1), toString(t2), actual, expected, file, line); } } #endif void TestTable::sqlOutput() { Table tt("testtable"); Field f("id", "integer"); Field fkm("km", "integer", false, "", "km > 1000"); tt.fields.push_back(f); tt.fields.emplace_back("car", "text"); tt.fields.push_back(fkm); tt.addConstraint({f.name(), fkm.name()}, ConstraintPtr(new PrimaryKeyConstraint())); QCOMPARE(tt.sql(), QString("CREATE TABLE \"testtable\" (\n" "\t\"id\"\tinteger,\n" "\t\"car\"\ttext,\n" "\t\"km\"\tinteger CHECK(km > 1000),\n" "\tPRIMARY KEY(\"id\",\"km\")\n" ");")); } void TestTable::sqlGraveAccentOutput() { Table tt("testtable"); Field f("id", "integer"); Field fkm("km", "integer", false, "", "km > 1000"); tt.fields.push_back(f); tt.fields.emplace_back("car", "text"); tt.fields.push_back(fkm); tt.addConstraint({f.name(), fkm.name()}, ConstraintPtr(new PrimaryKeyConstraint())); sqlb::setIdentifierQuoting(sqlb::GraveAccents); QCOMPARE(tt.sql(), QString("CREATE TABLE `testtable` (\n" "\t`id`\tinteger,\n" "\t`car`\ttext,\n" "\t`km`\tinteger CHECK(km > 1000),\n" "\tPRIMARY KEY(`id`,`km`)\n" ");")); sqlb::setIdentifierQuoting(sqlb::DoubleQuotes); } void TestTable::sqlSquareBracketsOutput() { Table tt("testtable"); Field f("id", "integer"); Field fkm("km", "integer", false, "", "km > 1000"); tt.fields.push_back(f); tt.fields.emplace_back("car", "text"); tt.fields.push_back(fkm); tt.addConstraint({f.name(), fkm.name()}, ConstraintPtr(new PrimaryKeyConstraint())); sqlb::setIdentifierQuoting(sqlb::SquareBrackets); QCOMPARE(tt.sql(), QString("CREATE TABLE [testtable] (\n" "\t[id]\tinteger,\n" "\t[car]\ttext,\n" "\t[km]\tinteger CHECK(km > 1000),\n" "\tPRIMARY KEY([id],[km])\n" ");")); sqlb::setIdentifierQuoting(sqlb::DoubleQuotes); } void TestTable::autoincrement() { Table tt("testtable"); Field f("id", "integer"); f.setAutoIncrement(true); Field fkm("km", "integer"); tt.fields.push_back(f); tt.fields.emplace_back("car", "text"); tt.fields.push_back(fkm); tt.addConstraint({f.name()}, ConstraintPtr(new PrimaryKeyConstraint())); QCOMPARE(tt.sql(), QString("CREATE TABLE \"testtable\" (\n" "\t\"id\"\tinteger PRIMARY KEY AUTOINCREMENT,\n" "\t\"car\"\ttext,\n" "\t\"km\"\tinteger\n" ");")); } void TestTable::notnull() { Table tt("testtable"); Field f("id", "integer"); f.setAutoIncrement(true); Field fkm("km", "integer"); tt.fields.push_back(f); tt.fields.emplace_back("car", "text", true); tt.fields.push_back(fkm); tt.addConstraint({f.name()}, ConstraintPtr(new PrimaryKeyConstraint())); QCOMPARE(tt.sql(), QString("CREATE TABLE \"testtable\" (\n" "\t\"id\"\tinteger PRIMARY KEY AUTOINCREMENT,\n" "\t\"car\"\ttext NOT NULL,\n" "\t\"km\"\tinteger\n" ");")); } void TestTable::withoutRowid() { Table tt("testtable"); Field f("a", "integer"); f.setAutoIncrement(true); tt.fields.push_back(f); tt.fields.emplace_back("b", "integer"); tt.setRowidColumn("a"); tt.addConstraint({f.name()}, ConstraintPtr(new PrimaryKeyConstraint())); QCOMPARE(tt.sql(), QString("CREATE TABLE \"testtable\" (\n" "\t\"a\"\tinteger PRIMARY KEY AUTOINCREMENT,\n" "\t\"b\"\tinteger\n" ") WITHOUT ROWID;")); } void TestTable::foreignKeys() { Table tt("testtable"); Field f("a", "integer"); tt.fields.push_back(f); tt.addConstraint({f.name()}, sqlb::ConstraintPtr(new sqlb::ForeignKeyClause("b", QStringList("c")))); QCOMPARE(tt.sql(), QString("CREATE TABLE \"testtable\" (\n" "\t\"a\"\tinteger,\n" "\tFOREIGN KEY(\"a\") REFERENCES \"b\"(\"c\")\n" ");")); } void TestTable::uniqueConstraint() { Table tt("testtable"); Field f1("a", "integer"); Field f2("b", "integer"); Field f3("c", "integer"); f1.setUnique(true); tt.fields.push_back(f1); tt.fields.push_back(f2); tt.fields.push_back(f3); tt.addConstraint({f2.name(), f3.name()}, sqlb::ConstraintPtr(new sqlb::UniqueConstraint())); QCOMPARE(tt.sql(), QString("CREATE TABLE \"testtable\" (\n" "\t\"a\"\tinteger UNIQUE,\n" "\t\"b\"\tinteger,\n" "\t\"c\"\tinteger,\n" "\tUNIQUE(\"b\",\"c\")\n" ");")); } void TestTable::parseSQL() { QString sSQL = "create TABLE hero (\n" "\tid integer PRIMARY KEY AUTOINCREMENT,\n" "\tname text NOT NULL DEFAULT 'xxxx',\n" "\tinfo VARCHAR(255) CHECK (info == 'x')\n" ");"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "hero"); QCOMPARE(tab.rowidColumn(), "_rowid_"); QCOMPARE(tab.fields.at(0).name(), "id"); QCOMPARE(tab.fields.at(1).name(), "name"); QCOMPARE(tab.fields.at(2).name(), "info"); QCOMPARE(tab.fields.at(0).type(), "integer"); QCOMPARE(tab.fields.at(1).type(), "text"); QCOMPARE(tab.fields.at(2).type(), QString("VARCHAR(255)")); QStringList pk = tab.primaryKey(); QVERIFY(tab.fields.at(0).autoIncrement()); QCOMPARE(pk.size(), 1); QCOMPARE(pk.at(0), tab.fields.at(0).name()); QVERIFY(tab.fields.at(1).notnull()); QCOMPARE(tab.fields.at(1).defaultValue(), QString("'xxxx'")); QCOMPARE(tab.fields.at(1).check(), QString("")); QCOMPARE(tab.fields.at(2).check(), QString("info=='x'")); } void TestTable::parseSQLdefaultexpr() { QString sSQL = "CREATE TABLE chtest(\n" "id integer primary key,\n" "dumpytext text default('axa') CHECK(dumpytext == \"aa\"),\n" "date datetime default CURRENT_TIMESTAMP," "zoi integer)"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), QString("chtest")); QCOMPARE(tab.fields.at(0).name(), QString("id")); QCOMPARE(tab.fields.at(1).name(), QString("dumpytext")); QCOMPARE(tab.fields.at(2).name(), QString("date")); QCOMPARE(tab.fields.at(3).name(), QString("zoi")); QCOMPARE(tab.fields.at(0).type(), QString("integer")); QCOMPARE(tab.fields.at(1).type(), QString("text")); QCOMPARE(tab.fields.at(2).type(), QString("datetime")); QCOMPARE(tab.fields.at(3).type(), QString("integer")); QCOMPARE(tab.fields.at(1).defaultValue(), QString("('axa')")); QCOMPARE(tab.fields.at(1).check(), QString("dumpytext==\"aa\"")); QCOMPARE(tab.fields.at(2).defaultValue(), QString("CURRENT_TIMESTAMP")); QCOMPARE(tab.fields.at(2).check(), QString("")); QCOMPARE(tab.fields.at(3).defaultValue(), QString("")); QCOMPARE(tab.fields.at(3).check(), QString("")); QStringList pk = tab.primaryKey(); QCOMPARE(pk.size(), 1); QCOMPARE(pk.at(0), tab.fields.at(0).name()); } void TestTable::parseSQLMultiPk() { QString sSQL = "CREATE TABLE hero (\n" "\tid1 integer,\n" "\tid2 integer,\n" "\tnonpkfield blob,\n" "PRIMARY KEY(\"id1\",\"id2\")\n" ");"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "hero"); QCOMPARE(tab.fields.at(0).name(), "id1"); QCOMPARE(tab.fields.at(1).name(), "id2"); QCOMPARE(tab.fields.at(0).type(), "integer"); QCOMPARE(tab.fields.at(1).type(), "integer"); QStringList pk = tab.primaryKey(); QCOMPARE(pk.size(), 2); QCOMPARE(pk.at(0), tab.fields.at(0).name()); QCOMPARE(pk.at(1), tab.fields.at(1).name()); } void TestTable::parseSQLForeignKey() { QString sSQL = "CREATE TABLE grammar_test(id, test, FOREIGN KEY(test) REFERENCES other_table);"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "grammar_test"); QCOMPARE(tab.fields.at(0).name(), "id"); QCOMPARE(tab.fields.at(1).name(), "test"); } void TestTable::parseSQLSingleQuotes() { QString sSQL = "CREATE TABLE 'test'('id','test');"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "test"); QCOMPARE(tab.fields.at(0).name(), "id"); QCOMPARE(tab.fields.at(1).name(), "test"); } void TestTable::parseSQLSquareBrackets() { QString sSQL = "CREATE TABLE [test]([id],[test]);"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "test"); QCOMPARE(tab.fields.at(0).name(), "id"); QCOMPARE(tab.fields.at(1).name(), "test"); } void TestTable::parseSQLKeywordInIdentifier() { QString sSQL = "CREATE TABLE deffered(key integer primary key, if text);"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "deffered"); QCOMPARE(tab.fields.at(0).name(), "key"); QCOMPARE(tab.fields.at(1).name(), "if"); } void TestTable::parseSQLSomeKeywordsInIdentifier() { QString sSQL = "CREATE TABLE \"Average Number of Volunteers by Area of Work\" (" "`Area of Work` TEXT," "`Average Number of Volunteers` INTEGER);"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "Average Number of Volunteers by Area of Work"); QCOMPARE(tab.fields.at(0).name(), "Area of Work"); QCOMPARE(tab.fields.at(1).name(), "Average Number of Volunteers"); } void TestTable::parseSQLWithoutRowid() { QString sSQL = "CREATE TABLE test(a integer primary key, b integer) WITHOUT ROWID;"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.findPk()->name(), "a"); QCOMPARE(tab.rowidColumn(), "a"); } void TestTable::parseNonASCIIChars() { QString sSQL = "CREATE TABLE `lösung` (" "`Fieldöäüß` INTEGER," "PRIMARY KEY(`Fieldöäüß`)" ");"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "lösung"); QCOMPARE(tab.fields.at(0).name(), "Fieldöäüß"); } void TestTable::parseNonASCIICharsEs() { QString sSQL = "CREATE TABLE \"Cigüeñas de Alcalá\" (" "\"Field áéíóúÁÉÍÓÚñÑçÇ\" INTEGER," "PRIMARY KEY(\"Field áéíóúÁÉÍÓÚñÑçÇ\")" ");"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "Cigüeñas de Alcalá"); QCOMPARE(tab.fields.at(0).name(), "Field áéíóúÁÉÍÓÚñÑçÇ"); } void TestTable::parseSQLEscapedQuotes() { QString sSql = "CREATE TABLE double_quotes(a text default 'a''a');"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSql))); QCOMPARE(tab.name(), QString("double_quotes")); QCOMPARE(tab.fields.at(0).name(), QString("a")); QCOMPARE(tab.fields.at(0).defaultValue(), QString("'a''a'")); } void TestTable::parseSQLForeignKeys() { QString sql = "CREATE TABLE foreign_key_test(a int, b int, foreign key (a) references x, foreign key (b) references w(y,z) on delete set null);"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sql))); QCOMPARE(tab.name(), QString("foreign_key_test")); QCOMPARE(tab.fields.at(0).name(), QString("a")); QCOMPARE(tab.fields.at(0).type(), QString("int")); QCOMPARE(std::dynamic_pointer_cast(tab.constraint({tab.fields.at(0).name()}, sqlb::Constraint::ForeignKeyConstraintType))->table(), QString("x")); QCOMPARE(tab.fields.at(1).name(), QString("b")); QCOMPARE(tab.fields.at(1).type(), QString("int")); QCOMPARE(std::dynamic_pointer_cast(tab.constraint({tab.fields.at(1).name()}, sqlb::Constraint::ForeignKeyConstraintType))->toString(), QString("\"w\"(\"y\",\"z\") on delete set null")); } void TestTable::parseSQLCheckConstraint() { QString sql = "CREATE TABLE a (\"b\" text CHECK(\"b\"='A' or \"b\"='B'));"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sql))); QCOMPARE(tab.name(), QString("a")); QCOMPARE(tab.fields.at(0).name(), QString("b")); QCOMPARE(tab.fields.at(0).type(), QString("text")); QCOMPARE(tab.fields.at(0).check(), QString("\"b\"='A' or \"b\"='B'")); } void TestTable::parseDefaultValues() { QString sql = "CREATE TABLE test(a int DEFAULT 0, b int DEFAULT -1, c text DEFAULT 'hello', d text DEFAULT '0');"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sql))); QCOMPARE(tab.name(), QString("test")); QCOMPARE(tab.fields.at(0).name(), QString("a")); QCOMPARE(tab.fields.at(0).type(), QString("int")); QCOMPARE(tab.fields.at(0).defaultValue(), QString("0")); QCOMPARE(tab.fields.at(1).name(), QString("b")); QCOMPARE(tab.fields.at(1).type(), QString("int")); QCOMPARE(tab.fields.at(1).defaultValue(), QString("-1")); QCOMPARE(tab.fields.at(2).name(), QString("c")); QCOMPARE(tab.fields.at(2).type(), QString("text")); QCOMPARE(tab.fields.at(2).defaultValue(), QString("'hello'")); QCOMPARE(tab.fields.at(3).name(), QString("d")); QCOMPARE(tab.fields.at(3).type(), QString("text")); QCOMPARE(tab.fields.at(3).defaultValue(), QString("'0'")); } void TestTable::createTableWithIn() { QString sSQL = "CREATE TABLE not_working(" "_id PRIMARY KEY NOT NULL," "value NVARCHAR(5) CHECK (value IN ('a', 'b', 'c'))" ");"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "not_working"); QCOMPARE(tab.fields.at(1).check(), "value IN ('a','b','c')"); } void TestTable::createTableWithNotLikeConstraint() { QString sSQL = "CREATE TABLE hopefully_working(\n" "value TEXT CONSTRAINT 'value' CHECK(value NOT LIKE 'prefix%'),\n" "value2 TEXT CONSTRAINT 'value' CHECK(value2 NOT MATCH 'prefix%'),\n" "value3 TEXT CONSTRAINT 'value' CHECK(value3 NOT REGEXP 'prefix%'),\n" "value4 TEXT CONSTRAINT 'value' CHECK(value4 NOT GLOB 'prefix%'),\n" "value5 INTEGER CONSTRAINT 'value' CHECK(value5 BETWEEN 1+4 AND 100 OR 200),\n" "value6 INTEGER CONSTRAINT 'value' CHECK(value6 NOT BETWEEN 1 AND 100)\n" ");"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sSQL))); QCOMPARE(tab.name(), "hopefully_working"); QCOMPARE(tab.fields.at(0).check(), "value NOT LIKE 'prefix%'"); QCOMPARE(tab.fields.at(1).check(), "value2 NOT MATCH 'prefix%'"); QCOMPARE(tab.fields.at(2).check(), "value3 NOT REGEXP 'prefix%'"); QCOMPARE(tab.fields.at(3).check(), "value4 NOT GLOB 'prefix%'"); QCOMPARE(tab.fields.at(4).check(), "value5 BETWEEN 1+4 AND 100 OR 200"); QCOMPARE(tab.fields.at(5).check(), "value6 NOT BETWEEN 1 AND 100"); } void TestTable::rowValues() { QString sql = "CREATE TABLE test(\n" "a INTEGER,\n" "b INTEGER,\n" "CHECK((a, b) = (1, 2))\n" ");"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sql))); QCOMPARE(tab.name(), "test"); QCOMPARE(std::dynamic_pointer_cast(tab.constraint({}, sqlb::Constraint::CheckConstraintType))->expression(), QString("(a,b)=(1,2)")); } void TestTable::complexExpressions() { QString sql = "CREATE TABLE test(\n" "a INTEGER CHECK((a > 0)),\n" "b INTEGER CHECK((b > 0 and b > 1)),\n" "c INTEGER CHECK((c = -1) or (c > 0 and c > 1) or (c = 0)),\n" "d INTEGER CHECK((((d > 0))))\n" ");"; Table tab = *(std::dynamic_pointer_cast(Table::parseSQL(sql))); QCOMPARE(tab.name(), "test"); QCOMPARE(tab.fields.at(0).check(), "(a>0)"); QCOMPARE(tab.fields.at(1).check(), "(b>0 and b>1)"); QCOMPARE(tab.fields.at(2).check(), "(c=-1) or (c>0 and c>1) or (c=0)"); QCOMPARE(tab.fields.at(3).check(), "(((d>0)))"); } sqlitebrowser-3.11.2/src/tests/testsqlobjects.h000066400000000000000000000017271345112435200216650ustar00rootroot00000000000000#ifndef TESTSQLOBJECTS_H #define TESTSQLOBJECTS_H #include class TestTable: public QObject { Q_OBJECT private slots: void sqlOutput(); void sqlGraveAccentOutput(); void sqlSquareBracketsOutput(); void autoincrement(); void notnull(); void withoutRowid(); void foreignKeys(); void uniqueConstraint(); void parseSQL(); void parseSQLSquareBrackets(); void parseSQLdefaultexpr(); void parseSQLMultiPk(); void parseSQLForeignKey(); void parseSQLSingleQuotes(); void parseSQLKeywordInIdentifier(); void parseSQLSomeKeywordsInIdentifier(); void parseSQLWithoutRowid(); void parseNonASCIIChars(); void parseNonASCIICharsEs(); void parseSQLEscapedQuotes(); void parseSQLForeignKeys(); void parseSQLCheckConstraint(); void parseDefaultValues(); void createTableWithIn(); void createTableWithNotLikeConstraint(); void rowValues(); void complexExpressions(); }; #endif sqlitebrowser-3.11.2/src/tools/000077500000000000000000000000001345112435200164325ustar00rootroot00000000000000sqlitebrowser-3.11.2/src/tools/create_windows_icon.sh000077500000000000000000000004341345112435200230170ustar00rootroot00000000000000#!/bin/sh # This script depends on imagemagick being installed for imgsize in 16 32 64 128 do convert ../icons/sqlitebrowser.png -resize "$imgsize"x"$imgsize" -background transparent icon"$imgsize".png files="$files icon$imgsize.png" done convert $files ../iconwin.ico rm $files sqlitebrowser-3.11.2/src/translations/000077500000000000000000000000001345112435200200135ustar00rootroot00000000000000sqlitebrowser-3.11.2/src/translations/README000066400000000000000000000002101345112435200206640ustar00rootroot00000000000000TS files for the application should be all named according to a convention such as _, e.g. sqlb_de, sqlb_ru etc. sqlitebrowser-3.11.2/src/translations/flags/000077500000000000000000000000001345112435200211075ustar00rootroot00000000000000sqlitebrowser-3.11.2/src/translations/flags/ar.png000066400000000000000000000011201345112435200222110ustar00rootroot00000000000000PNG  IHDRFggAMA a cHRMz&u0`:pQ<PLTEQ Q PNPO%d$I}HRQ4n3;s9VUTREzD@w@\[Ax@|z~LKa_pokjigQPed S 9q8nlsqwu\Za`?v>WVMK=u<0k/YT U[W2m1F{F_(f(3m2 Q %%stRNS@fbKGDHtIME IDATm0 Eٓ "6#('YiAġNQ )>[Zyx2R̓eHaMnw^E!Ɏ:&>綝eU2`[ɮ7crcA( >mB ùm.4 DJB%tEXtdate:create2016-07-11T02:24:19+02:00%tEXtdate:modify2016-07-11T02:24:19+02:00M\IENDB`sqlitebrowser-3.11.2/src/translations/flags/br.png000066400000000000000000000010601345112435200222150ustar00rootroot00000000000000PNG  IHDRUsRGBbKGD pHYs  tIME/k"IDAT8͓?H[A|/6y' C]$%RqҎE SVIڂJF`4$KR]$mIB~ݏ,*Q5LD~Gq>R'WLz.H@pKL l@h[0wZX6 ^^bU;_]0h,~}f #͛x7ϯ>&h+^|HE_vD'Hlj$vA -E}D "n稙`ab6q) NJSHǬEXc* ~ANLF?4C-o1EqGX\n\o9lw`*;ng+Fi;gf G_ ?c%ó.y wۙO#ڋ T4׏SՀ Ɨ'm_IENDB`sqlitebrowser-3.11.2/src/translations/flags/cn.png000066400000000000000000000060771345112435200222270ustar00rootroot00000000000000PNG  IHDRU /iCCPICC profileHǝwTTϽwz0z.0. Qf Ml@DEHb!(`HPb0dFJ|yyǽgs{.$O./ 'z8WGбx0Y驾A@$/7z HeOOҬT_lN:K"N3"$F/JPrb[䥟}Qd[Sl1x{#bG\NoX3I[ql2$ 8xtrp/8 pCfq.Knjm͠{r28?.)ɩL^6g,qm"[Z[Z~Q7%" 3R`̊j[~: w!$E}kyhyRm333: }=#vʉe tqX)I)B>== <8Xȉ9yP:8p΍Lg kk Ѐ$t!0V87`ɀ2A. @JPA#h'@8 .: ``a!2D!UH 2 dA>P ECqB**Z:]B=h~L2  5pN:|ó@ QC !H,G6 H9R ]H/r Aw( Q(OTJCm@*QGQ-(j MF+ 6h/*t:].G7Зw7 Xa<1:L1s3bXyeb~19 vGĩp+5qy^ oó|= ?'Htv`Ba3BDxHxE$Չ"XAP44077&9$An0;T2421t.54ld+s;# V]=iY9FgM֚k&=%Ō:nc1gcbcfX.}lGv{c)LŖN퉛w/p+/<j$.$%&㒣OdxTԂԑ4i3|o~C:&S@L u[Uo3C3OfIgwdO|;W-wsz 17jl8c͉̈́3+{%lKWr[ $ llGmnacOkE&EEY׾2⫅;K,KhtiN=e²{^-_V^Oo§s]?TWީrjVQ=w}`嚢zԶiו8>k׍ E  [ly邟~_Y53rW򯎼^{7so}x>|쇊z>yz;lbKGD pHYs  tIME '.IDAT8˥JA33_~R(x;P޽5F^A­ǟX73_41 33#tܨ. )~p/~։T1no쳈Df_`@t~=&+т* Tfrζ-Z;3?*ҴpBzo O^erhb酌$J竣23˝wV Jw:ϵ#?ޏr JChQk [IrÓ7 K%G @ΖC##xwC `ז>JŸ'E#:>M'r֬,:;d+"P ?#zIe/IENDB`sqlitebrowser-3.11.2/src/translations/flags/cs.png000066400000000000000000000003741345112435200222260ustar00rootroot00000000000000PNG  IHDRUIDAT8˭`FH0#|Jrp X &2ܬ@a9MoթwwqV"MBVOHN PH IJ:Q_0<`S|+e7\7l*ڪEe[== <8Xȉ9yP:8p΍Lg kk Ѐ$t!0V87`ɀ2A. @JPA#h'@8 .: ``a!2D!UH 2 dA>P ECqB**Z:]B=h~L2  5pN:|ó@ QC !H,G6 H9R ]H/r Aw( Q(OTJCm@*QGQ-(j MF+ 6h/*t:].G7Зw7 Xa<1:L1s3bXyeb~19 vGĩp+5qy^ oó|= ?'Htv`Ba3BDxHxE$Չ"XAP44077&9$An0;T2421t.54ld+s;# V]=iY9FgM֚k&=%Ō:nc1gcbcfX.}lGv{c)LŖN퉛w/p+/<j$.$%&㒣OdxTԂԑ4i3|o~C:&S@L u[Uo3C3OfIgwdO|;W-wsz 17jl8c͉̈́3+{%lKWr[ $ llGmnacOkE&EEY׾2⫅;K,KhtiN=e²{^-_V^Oo§s]?TWީrjVQ=w}`嚢zԶiו8>k׍ E  [ly邟~_Y53rW򯎼^{7so}x>|쇊z>yz;lbKGD pHYs  tIME (]1]IDAT8˥ӽJA̮+J`c#6@z+;%|cPH*%`ϝs$*ʙ֑x Au+ګ(C"FRAz$zPH)05Ww˺oMS +j4*˔L!3Ҹ{=v+& -SC#Ki\u`dn_\[IiD/wz)ar6P|L0NH ]zIENDB`sqlitebrowser-3.11.2/src/translations/flags/eg.png000066400000000000000000000003571345112435200222150ustar00rootroot00000000000000PNG  IHDRUbKGD pHYs B(xIDAT81 @6 bcBW k-R#a3}#rJ ŴC\a/ Uq {Qԫ-ogkj3axw\A29 z,VOIENDB`sqlitebrowser-3.11.2/src/translations/flags/es.png000066400000000000000000000004021345112435200222200ustar00rootroot00000000000000PNG  IHDRkx pHYsOO8IDATxc<-@.`bPO'ٚAQ6o_~xCW$ogHIENDB`sqlitebrowser-3.11.2/src/translations/flags/flags.qrc000066400000000000000000000014111345112435200227070ustar00rootroot00000000000000 ar.png cs.png de.png es.png us.png fr.png it.png ru.png cn.png br.png gb.png roc.png kr.png tr.png ua.png eg.png pl.png sqlitebrowser-3.11.2/src/translations/flags/fr.png000066400000000000000000000060131345112435200222240ustar00rootroot00000000000000PNG  IHDRU /iCCPICC profileHǝwTTϽwz0z.0. Qf Ml@DEHb!(`HPb0dFJ|yyǽgs{.$O./ 'z8WGбx0Y驾A@$/7z HeOOҬT_lN:K"N3"$F/JPrb[䥟}Qd[Sl1x{#bG\NoX3I[ql2$ 8xtrp/8 pCfq.Knjm͠{r28?.)ɩL^6g,qm"[Z[Z~Q7%" 3R`̊j[~: w!$E}kyhyRm333: }=#vʉe tqX)I)B>== <8Xȉ9yP:8p΍Lg kk Ѐ$t!0V87`ɀ2A. @JPA#h'@8 .: ``a!2D!UH 2 dA>P ECqB**Z:]B=h~L2  5pN:|ó@ QC !H,G6 H9R ]H/r Aw( Q(OTJCm@*QGQ-(j MF+ 6h/*t:].G7Зw7 Xa<1:L1s3bXyeb~19 vGĩp+5qy^ oó|= ?'Htv`Ba3BDxHxE$Չ"XAP44077&9$An0;T2421t.54ld+s;# V]=iY9FgM֚k&=%Ō:nc1gcbcfX.}lGv{c)LŖN퉛w/p+/<j$.$%&㒣OdxTԂԑ4i3|o~C:&S@L u[Uo3C3OfIgwdO|;W-wsz 17jl8c͉̈́3+{%lKWr[ $ llGmnacOkE&EEY׾2⫅;K,KhtiN=e²{^-_V^Oo§s]?TWީrjVQ=w}`嚢zԶiו8>k׍ E  [ly邟~_Y53rW򯎼^{7so}x>|쇊z>yz;lbKGD pHYs  tIME (ُ-]IDAT8;JCQ9\1&AP5bg lsV.Xk(XY1/ q$S?0#cb'Al]~ ^%mMMĔP$1W7w,Η0& GtM4U}.ٸ6p܅[PN+{:Ni¸b C :2G= .Q`C.4,ǂ ~l>\:^Cvy"aoXqA>i%:>flz,^TG˧7IO!r}gד#Ʌy}NHpV.WTE[-R恲|vFf|IENDB`sqlitebrowser-3.11.2/src/translations/flags/gb.png000066400000000000000000000013371345112435200222110ustar00rootroot00000000000000PNG  IHDRUbKGDIDAT8YHQGǦPkqqMid\#1,*B$J")… PtH)ܗ1qG"],f,8x\Ton[ai}7fsZ%`IIMA^':;Mq jnGff%OLIS<zCC2HG{6mm$'x:^Fn§ V uTͼ/2`Bm-L;tv4`шG]%xUT2ps Y(ؘbe` 54֔]aEQZQoAW$`pkf؞D(VBaX&eˢ|j3% ]r6ejIlRyTk_p>Zbb ~>JjĞ\^Ql[mPT r#]]!4. [joDՈEGsiUvI =ÇV>(5C=pf?K$ƍ##x{PbG[u;:($<ڙro*23=)99F<Ϥ_h7hM*S~.ҽ\hȃf쬸ge_t IENDB`sqlitebrowser-3.11.2/src/translations/flags/it.png000066400000000000000000000012221345112435200222260ustar00rootroot00000000000000PNG  IHDRkxzTXtRaw profile type exifxڝTi )z8Lȼ{- ~9dAS\sZx9/xź~Ĺ77GS|7G|]@߉ _m\f+)33GM43ADZὬ53D/(]L\z>?W(Y+ &|*ѪW~:#F"CG.ۼ,y oƺvt5ڟ]bETRcǎu{QЏct~tښ9Qu6 HhX3uѩTj1K􌭗s+?3&:OX4,[xsBITOAIDAT(˱ ,;YKK &U:[o8RE2Q]{@5uğIENDB`sqlitebrowser-3.11.2/src/translations/flags/kr.png000066400000000000000000000015751345112435200222410ustar00rootroot00000000000000PNG  IHDRkxtRNSC W pHYs  IDATxUKh\ewu<Cc6u[h4H-J %.\XnB R *bR&ԡ3Ě268orqw"xk?D&A`13ifM @0U@X];;Le`u7oѹ3dQrl @ kW[RJF0fXfϜ2^4@`lt&; ܜxAs&~> cyyCB7ccdz {X(ܜPJBt:SO>5,=cVǏړqH52CRBݷ??u;q !f$b@p]o v|g7﷏مR{4"i- -XmxzkԸHv۶'$y.sw=:sfxT Zý'ՓzitD$>so=#)VԝRƉaN<岡fV4V GFfLbimK-Oʨy&R̼%:wùp AxB,Hv>hj"_*E ò,usiww&X^ 5; Db%ZX"3m=Fk&h&&@:*H(IENDB`sqlitebrowser-3.11.2/src/translations/flags/pl.png000066400000000000000000000002131345112435200222240ustar00rootroot00000000000000PNG  IHDRUbKGD pHYs B(x+IDAT8c*&*Q멚l30QIIENDB`sqlitebrowser-3.11.2/src/translations/flags/roc.png000066400000000000000000000005111345112435200223750ustar00rootroot00000000000000PNG  IHDRkxsRGBgAMA a pHYsodIDAT8Oc`` CS&10Lu @P͌SfZ[,/ hњ'{zn9p{;:;(SxxG<30Xv< 6o|s<g0s5]R~tj_|!H&2  d4?BӀ$!t>IOB瓄$!H$wKIENDB`sqlitebrowser-3.11.2/src/translations/flags/ru.png000066400000000000000000000057261345112435200222550ustar00rootroot00000000000000PNG  IHDRU /iCCPICC profileHǝwTTϽwz0z.0. Qf Ml@DEHb!(`HPb0dFJ|yyǽgs{.$O./ 'z8WGбx0Y驾A@$/7z HeOOҬT_lN:K"N3"$F/JPrb[䥟}Qd[Sl1x{#bG\NoX3I[ql2$ 8xtrp/8 pCfq.Knjm͠{r28?.)ɩL^6g,qm"[Z[Z~Q7%" 3R`̊j[~: w!$E}kyhyRm333: }=#vʉe tqX)I)B>== <8Xȉ9yP:8p΍Lg kk Ѐ$t!0V87`ɀ2A. @JPA#h'@8 .: ``a!2D!UH 2 dA>P ECqB**Z:]B=h~L2  5pN:|ó@ QC !H,G6 H9R ]H/r Aw( Q(OTJCm@*QGQ-(j MF+ 6h/*t:].G7Зw7 Xa<1:L1s3bXyeb~19 vGĩp+5qy^ oó|= ?'Htv`Ba3BDxHxE$Չ"XAP44077&9$An0;T2421t.54ld+s;# V]=iY9FgM֚k&=%Ō:nc1gcbcfX.}lGv{c)LŖN퉛w/p+/<j$.$%&㒣OdxTԂԑ4i3|o~C:&S@L u[Uo3C3OfIgwdO|;W-wsz 17jl8c͉̈́3+{%lKWr[ $ llGmnacOkE&EEY׾2⫅;K,KhtiN=e²{^-_V^Oo§s]?TWީrjVQ=w}`嚢zԶiו8>k׍ E  [ly邟~_Y53rW򯎼^{7so}x>|쇊z>yz;lbKGD pHYs  tIME (,h (IDAT8˥ӱJQJAD+A_g{ b-$`cc#6!iYB:I$j v{E)83"%bf9_sn-eY/fQ:U4cIQ%3",* F4 {#Mj$ZT! T'IFB  0fuf(5RRC6>-@r'yA f8@߳ )HPg ض]a$opwfZX`k~")//ׄIENDB`sqlitebrowser-3.11.2/src/translations/flags/tr.png000066400000000000000000000014301345112435200222400ustar00rootroot00000000000000PNG  IHDRU pHYs  ~IDATxڕKQ{ܕ(2G^D=x*р&*.`PTA\c7/%3=ӎuL2h1RH== <8Xȉ9yP:8p΍Lg kk Ѐ$t!0V87`ɀ2A. @JPA#h'@8 .: ``a!2D!UH 2 dA>P ECqB**Z:]B=h~L2  5pN:|ó@ QC !H,G6 H9R ]H/r Aw( Q(OTJCm@*QGQ-(j MF+ 6h/*t:].G7Зw7 Xa<1:L1s3bXyeb~19 vGĩp+5qy^ oó|= ?'Htv`Ba3BDxHxE$Չ"XAP44077&9$An0;T2421t.54ld+s;# V]=iY9FgM֚k&=%Ō:nc1gcbcfX.}lGv{c)LŖN퉛w/p+/<j$.$%&㒣OdxTԂԑ4i3|o~C:&S@L u[Uo3C3OfIgwdO|;W-wsz 17jl8c͉̈́3+{%lKWr[ $ llGmnacOkE&EEY׾2⫅;K,KhtiN=e²{^-_V^Oo§s]?TWީrjVQ=w}`嚢zԶiו8>k׍ E  [ly邟~_Y53rW򯎼^{7so}x>|쇊z>yz;lbKGD pHYs  tIME 'QXIDAT8˕YlQLh;XBJUm:tMԕ [ 4Z*jƒH:U-j-j}Em S}s<p5˩ AqLVšMX,V́[;f"MW@$B?=y6BGo 7:IC_@PG^v}3j:Z0J^#kXę3]b`3#+CNOP݇Ԥ$;6o]hO9^g"ΘBϟ(rRJ;wTSGoTJiiR+1"\iBo;0)rt] Rv[d%mU4^1iBV2U$>2Kˈ*fYA V`ObZS/*  ;)zlGRb@Mpm`;*O7IENDB`sqlitebrowser-3.11.2/src/translations/place_translations_here000066400000000000000000000000001345112435200246140ustar00rootroot00000000000000sqlitebrowser-3.11.2/src/translations/sqlb_ar_SA.ts000066400000000000000000012263641345112435200224070ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite عن «متصفّح قواعد بيانات SQLite» Version الإصدارة <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>«متصفّح قواعد بيانات SQLite» أداة رسوميّة مفتوحة المصدر ومجانية، تُستخدم لإنشاء ملفّات قواعد بيانات SQLite وتصميمها وتحريرها.</p><p>الأداة مرخّصة برخصتين، الإصدارة الثانية من رخصة موزيلا العمومية، والإصدارة الثالثة وما بعدها من رخصة غنو العمومية. يمكنك تعديل الأداة أو إعادة توزيعها بشروط تلك الرخص.</p><p>طالع <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> و<a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> للتفاصيل.</p><p>من فضلك زُر موقع الوِب هذا لمعلومات أكثر عن البرمجية: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">تستخدم هذه البرمجية عُدّة أدوات كيوت المرخّصة تحت GPL/LGPL وذلك من </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>طالع </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> لشروط الترخيص والمعلومات.</span></p><p><span style=" font-size:small;">تستخدم البرمجية أيضًا طقم أيقونات الحرير/Silk للمؤلّف Mark James المرخّصة برخصة المشاع الإبداعي - النسبة ٢٫٥ و٣٫٠.<br/>طالع </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> للتفاصيل.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">http://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html dir="rtl"><p>«متصفّح قواعد بيانات SQLite» أداة رسوميّة مفتوحة المصدر ومجانية، تُستخدم لإنشاء ملفّات قواعد بيانات SQLite وتصميمها وتحريرها.</p><p>الأداة مرخّصة برخصتين، الإصدارة الثانية من رخصة موزيلا العمومية، والإصدارة الثالثة وما بعدها من رخصة غنو العمومية. يمكنك تعديل الأداة أو إعادة توزيعها بشروط تلك الرخص.</p><p>طالع <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> و<a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> للتفاصيل.</p><p>من فضلك زُر موقع الوِب هذا لمعلومات أكثر عن البرمجية: <a href="http://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">http://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">تستخدم هذه البرمجية عُدّة أدوات كيوت المرخّصة تحت GPL/LGPL وذلك من </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org</span></a><span style=" font-size:small;"><br/>طالع </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> لشروط الترخيص والمعلومات.</span></p><p><span style=" font-size:small;">تستخدم البرمجية أيضًا طقم أيقونات الحرير/Silk للمؤلّف Mark James المرخّصة برخصة المشاع الإبداعي - النسبة ٢٫٥ و٣٫٠.<br/>طالع </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> للتفاصيل.</span></p></html> (based on SQLite %1) (مبنيّ على SQLite %1) Version الإصدارة Built for Qt Version إصدارة كيوت: SQLCipher Version إصدارة SQLCipher: ‏ SQLite Version إصدارة SQLite: ‏ AddRecordDialog Add New Record أضِف سجلًا جديدًا Enter values for the new record considering constraints. Fields in bold are mandatory. أدخِل القيم للسجلّ الجديد بأخذ القيود بعين الاعتبار. الحقول الثخينة ضرورية. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. يمكنك تحديد قيمة الحقل المحدّد في عمود ”الاسم“ وذلك في عمود ”القيمة“. يُشير عمود ”النوع“ إلى نوع الحقل. تُعرض القيم المبدئية بنفس نمط قيم NULL. Name الاسم Type النوع Value القيمة Values to insert. Pre-filled default values are inserted automatically unless they are changed. القيم التي ستُدرج. تُدرج القيم المبدئية المعبّأة مسبقًا آليًا لو لم تتغيّر. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. عندما تحرّر القيم في الإطار أعلاه، ستظهر هنا إفادة SQL لإدراج هذا السجلّ. يمكنك تحرير الإفادة يدويًا قبل الحفظ. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <p>سيُرسل زرّ <span style=" font-weight:600;">احفظ</span> إفادة SQL الظاهرة إلى قاعدة البيانات لإدراج السجلّ الجديد.</p><p>سيستعيد زرّ <span style=" font-weight:600;">استعد المبدئيات</span> القيمة الأولية في عمود ”<span style=" font-weight:600;">القيمة</span>“.</p><p>سيُغلق زرّ <span style=" font-weight:600;">ألغِ</span> هذا الحواريّ دون تنفيذ الاستعلام.</p> Auto-increment زيادة آليّة Unique constraint قيد ”فريد“ Check constraint: %1 قيد الفحص: %L1 Foreign key: %1 المفتاح الأجنبي: %L1 Default value: %1 القيمة المبدئية: %L1 Error adding record. Message from database engine: %1 خطأ أثناء إضافة السجلّ. الرسالة من محرّك قواعد البيانات: %L1 Are you sure you want to restore all the entered values to their defaults? أمتأكّد من استعادة كلّ القيم المُدخلة إلى مبدئياتها؟ Application Usage: %1 [options] [db] ‎الاستخدام:‎ %L1 [options] [db] Possible command line arguments: معطيات سطر الأوامر الممكنة: -h, --help Show command line options -h, --help اعرض خيارات سطر الأوامر -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [ملف]‎ ‫نفّذ ملف SQL المذكور بعد فتح قاعدة البيانات -t, --table [table] Browse this table after opening the DB -t, --table [جدول]‎ تصفّح الجدول المذكور بعد فتح قاعدة البيانات -o, --option [group/setting=value] Run application with this setting temporarily set to value This is DB Browser for SQLite version %1. هذا «متصفّح قواعد بيانات» للإصدارة %L1 من SQLite. -q, --quit Exit application after running scripts -q, --quit أنهِ التطبيق بعد تشغيل السكربتات -R, --read-only Open database in read-only mode -R, --read-only افتح قاعدة البيانات بوضع القراءة فقط -v, --version Display the current version -v, --version اعرض الإصدارة الحالية [file] Open this SQLite database ‎ [ملف]‎ ‫افتح قاعدة بيانات SQLite المذكورة This is DB Browser for SQLite version %1%2. هذا «متصفّح قواعد بيانات» للإصدارة %L1%L2 من SQLite. The -s/--sql option requires an argument يتطلّب الخيار ‎-s/--sql معطًى The file %1 does not exist الملف %L1 غير موجود The -t/--table option requires an argument يتطلّب الخيار ‎-t/--table معطًى The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 خيار غير صالح/ملف غير موجود: %L1 CipherDialog SQLCipher encryption تعمية SQLCipher &Password &كلمة السر &Reenter password أ&عِد إدخال كلمة السر Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze م&قاس الصفحة &KDF iterations HMAC algorithm KDF algorithm Passphrase عبارة السر Raw key المفتاح خام Page &size ح&جم الصّفحة Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. من فضلك اضبط مفتاحًا لتعمية قاعدة البيانات. لاحظ أنه إن غيّرت أيًا من الإعدادات الأخرى (الاختيارية)، فسيكون عليك إعادة إدخالها أيضًا في كلّ مرّة تفتح فيها ملف قاعدة البيانات. اترك حقول كلمة السر فارغة لتعطيل التعمية. قد تأخذ عملية التعمية وقتًا وعليك الاحتفاظ بنسخة من قاعدة البيانات احتياطًا! ستُطبّق التعديلات غير المحفوظة قبل تعديل التعمية. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. من فضلك أدخِل المفتاح المستخدم لتعمية قاعدة البيانات. إن كانت هناك معلومات أخرى قد تغيّرت في ملف قاعدة البيانات هذا، فعليك توفيرها أيضًا. ColumnDisplayFormatDialog Choose display format اختر تنسيق العرض Display format تنسيق العرض Choose a display format for the column '%1' which is applied to each value prior to showing it. اختر تنسيق عرض العمود ”%L1“ ليُطبّق على كلّ قيمة قبل عرضها. Default المبدئي Decimal number عدد عشري Exponent notation تدوين أُسّي Hex blob ‏BLOB ستّ‌عشري Hex number عدد ستّ‌عشري Apple NSDate to date ”تاريخ آبل/Apple NSDate“ إلى تاريخ Java epoch (milliseconds) to date عَصر جاڤا (ملّي‌ثانية) إلى تاريخ Julian day to date يوم جولياني إلى تاريخ Unix epoch to local time عَصر لينكس إلى الوقت المحلي Date as dd/mm/yyyy التاريخ بنسق dd/mm/yyyy Lower case حالة الأحرف صغيرة Octal number عدد ثماني Round number عدد تقريبي Unix epoch to date عَصر لينكس إلى تاريخ Upper case حالة الأحرف كبيرة Windows DATE to date ”تاريخ وندوز/Windows DATE“ إلى تاريخ Custom مخصّص DBBrowserDB Please specify the database name under which you want to access the attached database من فضلك اختر اسم قاعدة البيانات حيث تريد أن تصل إلى قاعدة البيانات المرفقة Invalid file format تنسيق الملف غير صالح Do you want to save the changes made to the database file %1? أتريد حفظ التعديلات المُجراة على ملف قاعدة البيانات %L1؟ Exporting database to SQL file... يصدّر قاعدة البيانات إلى ملف SQL... Cancel ألغِ Executing SQL... ينفّذ SQL... Action cancelled. أُلغي الإجراء. Error in statement #%1: %2. Aborting execution. خطأ في الإفادة #%1: %2. أُجهض التّنفيذ. renameColumn: cannot find table %1. ‏renameColumn: تعذّر إيجاد الجدول %1. This database has already been attached. Its schema name is '%1'. أُرفقت قاعدة البيانات هذه بالفعل. اسم المخطّط هو ”%L1“. Do you really want to close this temporary database? All data will be lost. أمتأكّد من إغلاق قاعدة البيانات المؤقّتة هذه؟ ستفقد كلّ البيانات. The database is currently busy: قاعدة البيانات مشغولة حاليًا: Do you want to abort that other operation? أتريد إجهاض العملية الأخرى؟ No database file opened لم يُفتح ملف قاعدة بيانات Error in statement #%1: %2. Aborting execution%3. خطأ في الإفادة رقم %L1: %L2. سأُجهض التنفيذ%L3. and rolling back وأُرجع ما كان موجودًا. didn't receive any output from %1 could not execute command: %1 Cannot delete this object تعذّر حذف هذا الكائن Cannot set data on this object تعذّر ضبط البيانات على هذا الكائن A table with the name '%1' already exists in schema '%2'. هناك جدول بنفس الاسم ”%L1“ بالفعل في المخطّط ”%L2“. renameColumn: cannot find column %1. ‏renameColumn: تعذّر العثور على العمود %L1. renameColumn: creating savepoint failed. DB says: %1 ‏renameColumn: فشل إنشاء نقطة الحفظ. تقول قاعدة البيانات: %L1 renameColumn: creating new table failed. DB says: %1 ‏renameColumn: فشل إنشاء جدول جديد. تقول قاعدة البيانات: %L1 renameColumn: copying data to new table failed. DB says: %1 ‏renameColumn: فشل نسخ البيانات إلى جدول جديد. تقول قاعدة البيانات: %L1 renameColumn: deleting old table failed. DB says: %1 ‏renameColumn: فشل حذف الجدول القديم. تقول قاعدة البيانات: %L1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: فشلت استعادة بعض الكائنات المرتبطة بهذا الجدول. غالبًا ما يحدث هذا بسبب تغيّر اسم الأعمدة. هذه إفادة SQL التي قد ترغب بتنفيذها لإصلاح الأمر يدويًا: renameColumn: releasing savepoint failed. DB says: %1 ‏renameColumn: فشل إطلاق نقطة الحفظ. تقول قاعدة البيانات: %L1 Error renaming table '%1' to '%2'.Message from database engine: %3 خطأ أثناء تغيير اسم الجدول ”%L1“ إلى ”%L2“. الرسالة من محرّك قواعد البيانات: %L3 ... <string can not be logged, contains binary data> ... ... <لا يمكن تسجيل السلسلة النصّية، فهي تحتوي على بيانات ثنائيّة> ... could not get list of databases: %1 تعذّر جلب قائمة قواعد البيانات: %L1 Error loading extension: %1 خطأ أثناء تحميل الامتداد: %L1 could not get column information تعذّر جلب معلومات العمود unknown object type %1 نوع الكائن %1 مجهول could not get list of db objects: %1, %2 تعذّر جلب قائمة بكائنات قاعدة البيانات: %L1، ‏%L2 could not get types تعذّر جلب الأنواع didn't receive any output from pragma %1 حافظ المكان بالإنجليزية ولا يُترجم لم أستقبل أيّ خرج من pragma %L1 could not execute pragma command: %1, %2 تعذّر تنفيذ أمر pragma:‏ %L1، ‏%L2 Error setting pragma %1 to %2: %3 تعذّر ضبط pragma %L1 إلى %L2:‏ %L3 File not found. تعذّر العثور على الملف. DbStructureModel Name الاسم Object الكائن Type النوع Schema المخطّط Browsables (%1) ما يمكن تصفّحه (%L1) Database قاعدة البيانات Browsables ما يمكن تصفّحه All الكلّ Temporary مؤقّتة Tables (%1) الجداول (%L1) Indices (%1) الفهارس (%L1) Views (%1) المناظير (%L1) Triggers (%1) المحفّزات (%L1) EditDialog Edit database cell تحرير خليّة قاعدة البيانات Mode: الوضع: This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. هذه قائمة بالنماذج المتوفّرة في محرّر الخلايا. اختر وضعًا لعرض أو تحرير البيانات في الخليّة الحالية. Text نصّيّ Binary ثنائيّ Image صوريّ JSON JSON XML XML Automatically adjust the editor mode to the loaded data type اضبط وضع المحرّر آليًا على نوع البيانات المحمّل This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. هذا الزرّ الذي يمكن تأشيره يُفعّل أو يُعطّل التبديل الآلي لوضع المحرّر. عند تحديد خليّة جديدة أو استيراد بيانات جديدة والتبديل الآلي مفعّل، سيُضبط الوضع على نوع البيانات المكتشف. يمكنك بعدها تغيير وضع المحرّر يدويًا. إن أردت إبقاء الوضع الذي بدّلته يدويًا هذا عند التنقّل بين الخلايا، عطّل هذا الزرّ. Auto-switch التبديل الآلي Auto-format: pretty print on loading, compact on saving. التنسيق الآلي: طباعة جميلة عند التحميل، رصّ عند الحفظ. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. إن فُعّل، ستُنسّق ميزة التنسيق الآلي البيانات عند تحميلها، بكسر النصوص في أسطر وإزاحتها لأفضل قراءة. عند حفظ البيانات، سترصّ ميزة التنسيق الآلي البيانات بإزالة الأسطر والمسافات غير الضرورية. Autoformat التنسيق الآلي Import from file استورِد من ملف Opens a file dialog used to import any kind of data to this database cell. يفتح حواريّ ملفات يُستخدم لاستيراد أيّ نوع من البيانات في خليّة قاعدة البيانات هذه. Export to file صدّر إلى ملف Opens a file dialog used to export the contents of this database cell to a file. يفتح حواريّ ملفات يُستخدم لتصدير محتويات خليّة قاعدة البيانات هذه إلى ملف. Print... اطبع... Open preview dialog for printing displayed image يفتح حواريّ المعاينة لطباعة الصورة المعروضة Ctrl+P Ctrl+P Open preview dialog for printing displayed text يفتح حواريّ المعاينة لطباعة النص المعروض Copy Hex and ASCII انسخ Hex وآسكي Copy selected hexadecimal and ASCII columns to the clipboard انسخ الأعمدة الستّ‌عشرية وآسكي المحدّدة إلى الحافظة Ctrl+Shift+C Ctrl+Shift+C Import text استورِد نصًا Opens a file dialog used to import text to this database cell. يفتح حواريّ ملفات يُستخدم لاستيراد النصوص إلى خليّة قاعدة البيانات هذه. &Import ا&ستورِد Export text صدّر النص Opens a file dialog used to export the contents of this database cell to a text file. يفتح حواريّ ملفات يُستخدم لتصدير محتويات خليّة قاعدة البيانات هذه إلى ملف نصّي. &Export &صدّر Set this cell to NULL اضبط هذه الخليّة على NULL Erases the contents of the cell يمسح محتويات هذه الخليّة Set as &NULL ا&ضبط على NULL <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warning: Editing binary content in text mode may result in corrupted data!</span></p></body></html> <span style=" font-weight:600; color:#c00000;">تحذير: تحرير المحتوى الثّنائيّ في وضع النّصوص قد يتسبّب بتلف البيانات!</span> This area displays information about the data present in this database cell تعرض هذه المنطقة معلومات عن البيانات الموجودة في خليّة قاعدة البيانات هذه This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. يتيح لك وضع المحرّر هذا تحرير بيانات JSON وXML مع دعم إبراز الصياغة والتنسيق الآلي والتحقّق قبل الحفظ. يُشار إلى الأخطاء بخط مسطّر أحمر مخبرش. Type of data currently in cell نوع البيانات في الخليّة حاليًا Size of data currently in table حجم البيانات في الخليّة حاليًا Apply data to cell [Ctrl+Return] طبّق البيانات على الخليّة [Ctrl+Enter] This button saves the changes performed in the cell editor to the database cell. يحفظ هذا الزرّ التغييرات المُجراة داخل محرّر الخلايا في خليّة قاعدة البيانات. Apply طبّق Choose a file اختر ملفًا Text files(*.txt);;Image files(%1);;All files(*) الملفات النصّية(*.txt);;ملفات الصور(%L1);;كلّ الملفات(*) Choose a filename to export data اختر اسمًا للملف لتصدير البيانات Text files(*.txt);;All files(*) الملفات النصّية(*.txt);;كلّ الملفات(*) Image data can't be viewed with the text editor لا يمكن عرض البيانات الصوريّة داخل محرّر النصوص Binary data can't be viewed with the text editor لا يمكن عرض البيانات الثنائيّة داخل محرّر النّصوص Type of data currently in cell: %1 Image نوع البيانات في الخليّة حاليًا: صورة %L1 %1x%2 pixel(s) %L1×%L2 بكسل Type of data currently in cell: NULL نوع البيانات في الخليّة حاليًا: NULL %n byte(s) لا بايتات بايت واحد بايتان %Ln بايتات %Ln بايتًا %Ln بايت Type of data currently in cell: Text / Numeric نوع البيانات في الخليّة حاليًا: نصّ/عدد Image data can't be viewed in this mode. لا يمكن عرض بيانات الصور في هذا الوضع. Try switching to Image or Binary mode. بدّل التبديل إلى وضع ”صورة“ أو ”ثنائيّ“. Binary data can't be viewed in this mode. لا يمكن عرض البيانات الثنائيّة في هذا الوضع. Try switching to Binary mode. بدّل التبديل إلى وضع ”ثنائيّ“. Text files (*.txt) الملفات النصّية (*.txt) JSON files (*.json) ملفات JSON ‏(*.json) XML files (*.xml) ملفات XML ‏(*.xml) Image files (%1) ملفات الصور (%L1) Binary files (*.bin) الملفات الثنائيّة (*.bin) All files (*) كلّ الملفات (*) Choose a file to import اختر ملفًا لاستيراده %1 Image صورة %L1 SVG files (*.svg) ملفات SVG ‏(*.svg) Hex dump files (*.txt) ملفات Hex المفرّغة (*.txt) Invalid data for this mode بيانات غير صالحة في هذا الوضع The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? تحتوي الخليّة بيانات %L1 غير صالحة. السبب: %L2. أمتأكّد من تطبيقها على الخليّة؟ %n char(s) لا محارف محرف واحد محرفان %Ln محارف %Ln محرفًا %Ln محرف Type of data currently in cell: Valid JSON نوع البيانات في الخليّة حاليًا: JSON صالحة Type of data currently in cell: Binary نوع البيانات في الخليّة حاليًا: بيانات ثنائيّة EditIndexDialog Create New Index إنشاء فهرس جديد &Name الا&سم &Columns الأ&عمدة Column العمود Use in Index استخدمه في الفهرس Order الترتيب &Table الج&دول Edit Index Schema تحرير مخطّط الفهرس &Unique &فريد For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed إن أردت حصر الفهرس على جزء من الجدول فحسب، يمكنك هنا تحديد بند WHERE والذي سيُحدّد جزء الجدول الذي يجب فهرسته Partial inde&x clause بند ف&هرس جزئي Colu&mns الأ&عمدة Table column عمود الجدول Type النوع Add a new expression column to the index. Expression columns contain SQL expression rather than column names. أضِف عمود تعبير جديد إلى الفهرس. تحتوي أعمدة التعابير على تعابير SQL بدل أسماء الأعمدة. Index column عمود الفهرس Deleting the old index failed: %1 فشل حذف الفهرس القديم: %L1 Creating the index failed: %1 فشل إنشاء الفهرس: %L1 EditTableDialog Edit table definition تحرير تعريف الجدول Table الجدول Advanced متقدّم Database schema مخطّط قاعدة البيانات Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. اجعل هذا الجدول بلا معرّف للصفوف ”WITHOUT rowid“. لضبط هذه الراية تحتاج حقلًا بنوع ”أعداد صحيحة/INTEGER“ وأيضا عليك ضبط راية المفتاح الأساسي وألّا تضبط راية الزيادة الآليّة. Without Rowid بلا معرّف للصفوف Set this to create a temporary table that is deleted when closing the database. اضبط هذا لإنشاء جدول مؤقّت يُحذف عند إغلاق قاعدة البيانات. Temporary table جدول مؤقّت Fields الحقول Add field أضِف حقلًا Remove field أزِل الحقل Move field up انقل الحقل لأعلى Move field down انقل الحقل لأسفل Name الاسم Type النوع NN NN Not null ليس NULL PK PK Primary key مفتاح أساسي Primary key AI AI Autoincrement زيادة آليّة Auto Increment U U Unique فريد Unique Default المبدئي Default value القيمة المبدئية Check الفحص Check constraint قيد الفحص Check constraint Foreign Key مفتاح أجنبي <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><span style=" font-weight:600; color:#ff0000;">تحذير: </span>ثمّة خطب بتعريف هذا الجدول تعذّر على المحلّل فهمه تمامًا. يمكن أن يؤدّي تعديل وحفظ هذا الجدول ببعض المشاكل.</html> Error creating table. Message from database engine: %1 خطأ أثناء إنشاء الجدول. الرسالة من محرّك قواعد البيانات: %L1 There already is a field with that name. Please rename it first or choose a different name for this field. هناك حقل بهذا الاسم بالفعل. من فضلك غيّر اسمه أو اختر اسمًا مختلفًا لهذا الحقل. This column is referenced in a foreign key in table %1, column %2 and thus its name cannot be changed. هذا العمود مذكور في مفتاح أجنبيّ في الجدول %1، العمود %2 ولا يمكن تغيير اسمه. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. هذا العمود مذكور في مفتاح أجنبي في الجدول %L1 ولا يمكن تغيير اسمه. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. ثمّة صفّ واحد على الأقل ضُبط هذا الحقل فيه على NULL. لهذا السبب يستحيل ضبط هذه الراية. من فضلك غيّر بيانات الجدول أوّلًا. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. ثمّة صفّ واحد على الأقل ضُبط هذا الحقل فيه على قيمة ليست بنوع ”عدد صحيح“. لهذا السبب يستحيل ضبط راية الزيادة الآليّة. من فضلك غيّر بيانات الجدول أوّلًا. Column '%1' has no unique data. ليس للعمود ”%L1“ بيانات فريدة. This makes it impossible to set this flag. Please change the table data first. لهذا السبب يستحيل ضبط هذه الراية. من فضلك غيّر بيانات الجدول أوّلًا. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Modifying this column failed. Error returned from database: %1 فشل تعديل هذا العمود. الخطأ الذي أرجعته قاعدة البيانات: %L1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. أمتأكّد من حذف الحقل ”%L1“؟ ستفقد كل البيانات المخزّنة فيه حاليًا. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled من فضلك أضِف حقلًا يُطابق المعايير الآتية قبل ضبط راية ”بلا معرّف صفوف/rowid“: - راية ”مفتاح أساسي“ مضبوطة - الزيادة الآلية معطّلة Setting the rowid column for the table failed. Error message: %1 فشل ضبط عمود rowid للجدول. رسالة الخطأ: %L1 Changing the table schema failed. Error message: %1 فشل تغيير مخطّط الجدول. رسالة الخطأ: %L1 Setting the temporary flag for the table failed. Error message: %1 فشل ضبط راية ”مؤقّت“ للجدول. رسالة الخطأ: %L1 ExportDataDialog Export data as CSV تصدير البيانات بنسق CSV &Table(s) ال&جداول &Column names in first line أسماء الأ&عمدة في أوّل سطر Field &separator &فاصل الحقول Tab&le(s) الج&داول Colu&mn names in first line أسماء الأ&عمدة في أوّل سطر Fie&ld separator فاصل الح&قول , , ; ; Tab الجدولات | | Other شيء آخر &Quote character محرف ال&تنصيص " " ' ' New line characters محرف الأسطر الجديدة Windows: CR+LF (\r\n) وندوز: CR+LF ‏(‎\r\n) Unix: LF (\n) يُنكس: LF ‏(‎\n) Pretty print طباعة جميلة Could not open output file: %1 تعذّر فتح ملف الخرج: %L1 Choose a filename to export data اختر اسمًا للملف لتصدير البيانات Text files(*.csv *.txt) الملفات النصّية(*.csv *.txt) Export data as JSON تصدير البيانات بنسق JSON exporting CSV يصدّر CSV exporting JSON يصدّر JSON Text files(*.json *.js *.txt) الملفات النصّية(*.json *.js *.txt) Please select at least 1 table. من فضلك حدّد جدولًا واحدًا على الأقل. Choose a directory اختر دليلًا Export completed. اكتمل التصدير. ExportSqlDialog Export SQL... تصدير SQL... Tab&le(s) الج&دول Select All حدّد الكل Deselect All ألغِ تحديد الكلّ &Options &خيارات Keep column names in INSERT INTO أبقِ أسماء الأعمدة في INSERT INTO Multiple rows (VALUES) per INSERT statement عدّة صفوف (VALUES) لكلّ إفادة INSERT Export everything صدّر كل شيء Export schema only صدّر المخطّط فقط Export data only صدّر البيانات فقط Keep old schema (CREATE TABLE IF NOT EXISTS) أبقِ المخطّط القديم (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) اكتب على المخطّط القديم (DROP TABLE، وبعدها CREATE TABLE) Please select at least 1 table. من فضلك حدّد جدولًا واحدًا على الأقل. Please select at least one table. من فضلك حدّد جدولًا واحدًا على الأقل. Choose a filename to export اختر اسمًا للملف لتصديره Text files(*.sql *.txt) الملفات النصّية(*.sql *.txt) Export completed. اكتمل التصدير. Export cancelled or failed. إمّا أنّ التصدير أُلغي أو أنّه فشل. ExtendedScintilla Ctrl+H Ctrl+H Ctrl+P Ctrl+P Find and Replace... ابحث واستبدل... Print... اطبع... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? محتوى الحافظة أكبر من المدى المحدّد. أتريد إدراجه بأيّ حال؟ Use as Exact Filter استخدمها كمرشّح كما هي Containing تحتوي Not equal to لا تساوي Greater than أكبر من Less than أصغر من Greater or equal أكبر من أو تساوي Less or equal أصغر من أو تساوي Between this and... بين هذه و... Set to NULL اضبطها على NULL Copy انسخ Copy with Headers انسخ مع الترويسات Copy as SQL انسخ كَ‍ SQL Paste ألصِق Print... اطبع... Use in Filter Expression استخدمها في تعبير الترشيح Alt+Del Alt+Del Ctrl+Shift+C Ctrl+Shift+C Ctrl+Alt+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? محتوى الحافظة أكبر من المجال المحدّد. أتريد إدراجه بأي حال؟ FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) ملفّات قواعد بيانات SQLite ‏(*.db *.sqlite *.sqlite3 *.db3);;كلّ الملفّات (*) FileExtensionManager File Extension Manager مدير امتدادات الملفات &Up لأ&على &Down لأ&سفل &Add أ&ضِف &Remove أ&زِل Description الوصف Extensions الامتدادات *.extension ‎*.الامتداد FilterLineEdit Filter رشّح These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y تتيح لك حقول الدخل هذه إجراء ترشيح سريع في الجدول المحدّد حاليًا. مبدئيًا، تُرشّح الصفوف التي تحتوي نص الدخل. المُعاملات الآتية مدعومة أيضًا: % حرف بَدل ‏‎>‎ أكبر من ‏‎<‎ أصغر من ‏‎>=‎ أكبر من أو تساوي ‏‎<=‎ أصغر من أو تساوي = تساوي: مطابقة تامة <> لا تساوي: مطابقة تامة معكوسة ‏x~y المجال: القيم بين x و y Set Filter Expression اضبط تعبير الترشيح What's This? ما هذا؟ Is NULL تساوي NULL Is not NULL لا تساوي NULL Is empty فارغة Is not empty ليست فارغة Equal to... تساوي... Not equal to... لا تساوي... Greater than... أكبر من... Less than... أصغر من... Greater or equal... أكبر من أو تساوي... Less or equal... أصغر من أو تساوي... In range... في المدى... FindReplaceDialog Find and Replace البحث والاستبدال Fi&nd text: ابح&ث عن النص: Re&place with: ا&ستبدله بِ‍: Match &exact case طابِق &حالة الأحرف Match &only whole words طابِق الكلمات الكاملة &فحسب When enabled, the search continues from the other end when it reaches one end of the page إن أُشّر عليه، سيتابع البحث من الطرف التالي عندما يصل إلى نهاية الصفحة &Wrap around البحث يلت&فّ When set, the search goes backwards from cursor position, otherwise it goes forward إن أُشّر إليه، يجري البحث إلى خلف مكان المؤشّر، وإلا فإلى أمامه Search &backwards ابحث لل&خلف <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <p>إن أُشّر، سيُتعامل مع نمط البحث على أنّه تعبير يونكس نمطي. طالع <a href="https://en.wikibooks.org/wiki/Regular_Expressions">التعابير النمطية في ويكي‌كتب (بالإنجليزية)</a>.</p> Use regular e&xpressions استخدم الت&عابير النمطية Find the next occurrence from the cursor position and in the direction set by "Search backwards" ابحث عن الحدوث التالي من موقع المؤشّر حسب الاتجاه الذي حدّده ”البحث للخلف“ &Find Next جِد ال&تالي &Replace ا&ستبدل Highlight all the occurrences of the text in the page أبرِز كلّ الحدوثات في نصّ الصفحة F&ind All جِد ال&كل Replace all the occurrences of the text in the page استبدل كل الحدوثات في نصّ الصفحة Replace &All اس&تبدل الكل The searched text was not found لم يُعثر على نصّ البحث The searched text was not found. لم يُعثر على نصّ البحث. The searched text was found one time. عُثر على نصّ البحث مرّة واحدة. The searched text was found %1 times. عُثر على نصّ البحث %L1 من المرّات. The searched text was replaced one time. استُبدل نصّ البحث مرّة واحدة. The searched text was replaced %1 times. استُبدل نصّ البحث %L1 من المرّات. ForeignKeyEditor &Reset &صفّر Foreign key clauses (ON UPDATE, ON DELETE etc.) بنود المفاتيح الأجنبية (ON UPDATE، أو ON DELETE، إلخ.) ImportCsvDialog Import CSV file استيراد ملف CSV &Table name اسم الج&دول Table na&me ا&سم الجدول &Column names in first line أسماء الأ&عمدة في أوّل سطر Field &separator &فاصل الحقول , , ; ; Tab الجدولات | | Other شيء آخر &Quote character محرف الت&نصيص " " ' ' &Encoding ال&ترميز UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? أأقلّم الحقول؟ Separate tables افصل الجداول Advanced متقدّم When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. عند استيراد قيمة فارغة من ملف CSV إلى جدول موجود يحمل قيمة مبدئية لهذا العمود، تُضاف تلك القيمة المبدئية. فعّل هذا الخيار لإدراج قيمة فارغة عوضًا عن ذلك. Ignore default &values تجاهل ال&قيم المبدئية Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. فعّل هذا الخيار لإيقاف الاستيراد عند محاولة استيراد قيمة فارغة في عمود ”ليس NULL“ ليس له قيمة مبدئية. Fail on missing values يفشل الاستيراد إن كانت القيم ناقصة Disable data type detection عطّل اكتشاف نوع البيانات Disable the automatic data type detection when creating a new table. عطّل الاكتشاف الآلي لنوع البيانات عند إنشاء جدول جديد. Deselect All ألغِ تحديد الكل Match Similar طابِق المتشابهات Select All حدّد الكل Inserting data... يدرج البيانات... Cancel ألغِ There is already a table of that name and an import into an existing table is only possible if the number of columns match. هناك جدول بنفس الاسم بالفعل ولا يمكن الاستيراد داخل أحد الجداول الموجودة إلّا إن تطابق عدد الأعمدة. There is already a table of that name. Do you want to import the data into it? هناك جدول بنفس الاسم بالفعل. أتريد استيراد البيانات داخله؟ Import completed اكتمل الاستيراد There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. هناك جدول بنفس الاسم ”%L1“ بالفعل ولا يمكن الاستيراد داخل أحد الجداول الموجودة إلّا إن تطابق عدد الأعمدة. There is already a table named '%1'. Do you want to import the data into it? هناك جدول بنفس الاسم ”%L1“ بالفعل. أتريد استيراد البيانات داخله؟ Creating restore point failed: %1 فشل إنشاء نقطة استعادة: %L1 Creating the table failed: %1 فشل إنشاء الجدول: %L1 importing CSV يستورد CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. أخذ استيراد الملف ”%L1“ ‏%L2م‌ث. منها %L3م‌ث على دالة الصفّ. Missing field for record %1 حقل السجلّ %L1 ناقص Inserting row failed: %1 فشل إدراج الصفّ: %L1 MainWindow DB Browser for SQLite متصفّح قواعد بيانات SQLite Database Structure بنية قاعدة البيانات This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. هذه بنية قاعدة البيانات المفتوحة. يمكنك سحب إفادات SQL من صفّ في الكائن وإسقاطها في التطبيقات الأخرى أو إلى سيرورة أخرى من ”متصفّح قواعد بيانات SQLite“. Refresh the data in the selected table [F5, Ctrl+R] أنعشِ البيانات في الجدول المحدّد [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. يمسح هذا الزرّ كلّ المرشّحات المضبوطة في حقول الدخل في الترويسة للجدول المتصفّح حاليًا. Save the table as currently displayed احفظ الجدول كما هو معروض حاليًا <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> <p>توفّر القائمة المنبثقة هذه الخيارات الآتية والتي تنطبق على الجدول المتصفّح والمرشّح حاليًا:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">صدّر بنسق CSV: يُصدّر هذا الخيار البيانات في الجدول المتصفّح كما هي معروضة حاليًا (بعد المرشّحات وتنسيقات العرض وعمود الفرز) إلى ملف بنسق CSV.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">احفظ كمنظور: يحفظ هذا الخيار الإعداد الحالي للجدول المتصفّح (المرشّحات وتنسيقات العرض وعمود الفرز) في منظور SQL يمكنك تصفّحه لاحقًا أو استخدامه في إفادات SQL.</li></ul> ... ... Print currently browsed table data [Ctrl+P] اطبع بيانات الجدول المتصفّح حاليًا [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. اطبع بيانات الجدول المتصفّح حاليًا. اطبع التحديد إن كانت هناك أكثر من خليّة واحدة محدّدة. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> <p>يُنشئ هذا الزرّ سجلًا جديدًا في قاعدة البيانات. أبقِ زرّ الفأرة مضغوطًا لفتح قائمة منبثقة فيها عدّ’ خيارات:</p><ul><li><span style=" font-weight:600;">سجلّ جديد</span>: لإدراج سجلّ جديد يحمل القيم المبدئية في قاعدة البيانات.</li><li><span style=" font-weight:600;">أدرِج قيم...</span>: لفتح حواريّ لإدخال القيم قبل إدراجها في جدول البيانات. يتيح هذا إدخال القيم حسب القيود المختلفة. يُفتح هذا الحواريّ أيضًا إن فشل الخيار <span style=" font-weight:600;">سجلّ جديد</span> بسبب هذه القيود.</li></ul> This button deletes the record or records currently selected in the table يحذف هذا الزرّ السجلّ أو السجلّات المحدّدة حاليًا في الجدول This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. هذا هو منظور جدول قاعدة البيانات. يمكنك إجراء الآتي فيه: - البدء بالكتابة لتحرير القيمة داخل الخط. - النقر مزدوجًا على أيّ سجلّ لتحرير محتوياته في نافذة محرّر الخلايا. - ضغط Alt+Del لحذف محتوى الخليّة وضبطه على NULL. - ضغط Ctrl+"‎ لتكرار السجلّ الحالي. - ضغط Ctrl+'‎ لنسخ القيمة من الخلية أعلاه. - التحديد الطبيعي وعمليات النسخ واللصق. <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> <p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p> Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. تحذير: لا يمكن قراءة pragma هذه، ولهذا استُنتجت هذه القيمة. كتابة pragma قد يكتب على LIKE مُعاد تعريفها وفّرها امتداد SQLite. toolBar1 شريط الأدوات1 Browse Data تصفّح البيانات Table: الجدول: Select a table to browse data اختر جدولًا لتصفّح بياناته Use this list to select a table to be displayed in the database view استخدم هذه القائمة لاختيار جدول ليُعرض في منظور قاعدة البيانات Refresh the data in the selected table. أنعِش البيانات في الجدول المحدّد. This button refreshes the data in the currently selected table. يُنعش هذا الزرّ البيانات في الجدول المحدّد حاليًا. Scroll one page upwards مرّر صفحة واحدة للأمام <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html>ينقلك هذا الزرّ صفحة واحدة من السجلّات لأعلى في منظور الجدول أعلاه.</html> Scroll one page downwards مرّر صفحة واحدة للأسفل <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html>ينقلك هذا الزرّ صفحة واحدة من السجلّات لأسفل في منظور الجدول أعلاه.</html> SQLCipher &FAQ... أ&سئلة شائعة عن SQLCipher... Table(s) to JSON... الجدول/الجداول إلى JSON... Export one or more table(s) to a JSON file صدّر جدولًا أو أكثر إلى ملف JSON Refresh أنعِش F5 F5 Clear all filters امسح كلّ المرشّحات &Table: الج&دول: Insert a new record in the current table أدرِج سجلًا جديدًا في الجدول الحالي This button creates a new, empty record in the database يُنشئ هذا الزرّ سجلًا جديدًا فارغًا في جدول البيانات New Record سجلّ جديد Delete the current record احذف السجلّ الحالي This button deletes the record currently selected in the database يحذف هذا الزرّ السجلّ المحدّد حاليًا في قاعدة البيانات Delete Record احذف السجلّ This is the database view. You can double-click any record to edit its contents in the cell editor window. هذا منظور قاعدة البيانات. يمكنك نقر أيّ سجلّ مزدوجًا لتحرير محتوياته في نافذة محرّر الخلايا. <html><head/><body><p>Scroll to the beginning</p></body></html> <html>مرّر إلى البداية</html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html>ينقلك هذا الزرّ إلى بداية منظور الجدول أعلاه.</html> |< |< Scroll 100 records upwards مرّر 100 سجلّ للأمام <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>نقر هذا الزّرّ سينقلك إلى ال‍ 100 سطر التّالية في منظور الجدول أعلاه.</p></body></html> < < 0 - 0 of 0 ٠ - ٠ من أصل ٠ <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>مرّر 100 سجلّ للخلف</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>نقر هذا الزّرّ سينقلك إلى ال‍ 100 سطر السّابقة في منظور الجدول أعلاه.</p></body></html> > > Scroll to the end مرّر إلى النهاية <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html>ينقلك هذا الزرّ إلى نهاية منظور الجدول أعلاه.</html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html>انقر هنا للانتقال إلى السجلّ المحدّد</html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html>يُستخدم هذا الزرّ في التنقّل إلى رقم السطر المحدّد في منطقة ”انتقل إلى“.</html> Go to: انتقل إلى: Enter record number to browse أدخِل رقم السجلّ لتصفّحه Type a record number in this area and click the Go to: button to display the record in the database view اكتب رقم سجلّ في هذا المربّع وانقر زرّ ”انتقل إلى:“ لعرض السجلّ في منظور قاعدة البيانات 1 ١ Edit Pragmas حرّر Pragmas <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">نظّف آليًا</span></html> None None Full Full <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">فهرس آلي</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">نقطة فحص مزامنة FSYNC كاملة</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">المفاتيح الأجنبية</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">مزامنة FSYNC كاملة</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">تجاهل قيود الفحص</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">وضع المجلة</span></a></p></body></html> Delete Delete Truncate Truncate Persist Persist Memory Memory WAL WAL Off Off <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">حدّ مقاس المجلة</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">وضع القفل</span></a></p></body></html> Normal Normal Exclusive Exclusive <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">أقصى عدد للصفحات</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">مقاس الصفحة</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">المحفّزات تكرارية</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">الحذف الآمن</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">التزامن</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">التخزين المؤقّت</span></a></p></body></html> Default Default File File <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">إصدارة المستخدم</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">نقطة فحص WAL الآلية</span></a></p></body></html> Edit Database &Cell تحرير &خليّة قاعدة البيانات DB Sche&ma م&خطّط قاعدة البيانات This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. هذه بنية قاعدة البيانات المفتوحة. يمكنك سحب عدد من أسماء الكائنات من عمود ”الاسم“ وإسقاطها في محرّر SQL ويمكنك ضبط خصائص تلك الأسماء المُسقطة مستخدمًا قائمة السياق. سيساعد هذا في كتابة إفادات SQL. يمكنك سحب إفادات SQL من عمود ”المخطّط“ وإسقاطها في محرّر SQL أو في أيّ تطبيق آخر. &Remote الب&عيد Execute SQL [F5, Ctrl+Return, Ctrl+R] نفّذ SQL ‏[F5, Ctrl+Enter, Ctrl+R] Execute current line [Shift+F5] نفّذ السطر الحالي [Shift+F5] This button executes the SQL statement present in the current editor line يُنفّذ هذا الزرّ إفادة SQL الظاهرة في سطر المحرّر الحالي Shift+F5 Shift+F5 &Open Database Read Only... ا&فتح قاعدة بيانات للقراءة فقط... Open an existing database file in read only mode افتح ملف قاعدة بيانات موجود في وضع القراءة فقط Unlock view editing اسمح بتحرير المنظور This unlocks the current view for editing. However, you will need appropriate triggers for editing. يسمح هذا بتحرير المنظور الحالي. مع ذلك ستحتاج إلى المحفّزات المناسبة لإجراء التحرير. SQLCipher FAQ... أسئلة شائعة عن SQLCipher... Opens the SQLCipher FAQ in a browser window يفتح الأسئلة الشائعة عن SQLCipher في نافذة المتصفّح E&xecute SQL ن&فّذ SQL &File مل&ف &Import ا&ستورِد &Export &صدّر &Edit ت&حرير &View من&ظور &Help م&ساعدة &Tools أ&دوات DB Toolbar شريط قاعدة البيانات SQL &Log س&جلّ SQL Show S&QL submitted by اعرض SQL الذي ن&فّذه User المستخدم Application التطبيق This button clears the contents of the SQL logs يمسح هذا الزرّ محتويات سجلّات SQL &Clear ا&مسح This panel lets you examine a log of all SQL commands issued by the application or by yourself تتيح لك هذه اللوحة فحص كلّ أوامر SQL التي نفّذها التطبيق أو المستخدم &Plot الر&سم البياني Columns الأعمدة X س Y ص _ _ Line type: نوع الخطوط: Line خطّ StepLeft عتبة يسرى StepRight عتبة يمنى StepCenter عتبة وسطى Impulse نبض Point shape: شكل النّقط: Cross علامة ضرب Plus علامة جمع Circle دائرة Disc قرص Square مربّع Diamond معيّن Star نجمة Triangle مثلّث TriangleInverted مثلّث مقلوب CrossSquare علامة ضرب في مربّع PlusSquare علامة جمع في مربّع CrossCircle علامة ضرب في دائرة PlusCircle علامة جمع في دائرة Peace رمز السّلام <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html dir="rtl"><head/><body><p>احفظ الرّسم البيانيّ الحاليّ...</p><p>نسق الملفّ يحدّده الامتداد (png،‏ jpg،‏ pdf وbmp)</p></body></html> Save current plot... احفظ الرّسم البيانيّ الحاليّ... Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. حمّل كلّ البيانات. يؤثّر هذا فقط إن لم تكن كلّ البيانات قد جُلبت من الجدول بسبب آليّة جلب جزئيّة. DB Schema مخطّط قاعدة البيانات Edit Database Cell حرّر خليّة قاعدة البيانات &New Database... قاعدة بيانات &جديدة... Create a new database file أنشِئ ملف قاعدة بيانات جديد This option is used to create a new database file. يُستخدم هذا الخيار لإنشاء ملف قاعدة بيانات جديد. Ctrl+N Ctrl+N &Open Database... ا&فتح قاعدة بيانات... Open an existing database file افتح ملف قاعدة بيانات موجود This option is used to open an existing database file. يُستخدم هذا الخيار لفتح ملف قاعدة بيانات موجود. Ctrl+O Ctrl+O &Close Database أ&غلِق قاعدة البيانات This button closes the connection to the currently open database file يُغلق هذا الزرّ الاتصال بملف قاعدة البيانات المفتوح حاليًا Ctrl+W Ctrl+W &Revert Changes أرجِ&ع التعديلات Revert database to last saved state أرجِع قاعدة البيانات إلى آخر حالة محفوظة This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. يُستخدم هذا الخيار لإرجاع ملف قاعدة البيانات إلى آخر حالة محفوظة له. ستفقد كلّ التعديلات عليه منذ آخر عملية حفظ مُجراة. &Write Changes ا&كتب التعديلات Write changes to the database file اكتب التعديلات في ملف قاعدة البيانات This option is used to save changes to the database file. يُستخدم هذا الخيار لكتابة التعديلات في ملف قاعدة البيانات. Ctrl+S Ctrl+S Compact &Database... رُصّ &قاعدة البيانات Compact the database file, removing space wasted by deleted records رُصّ ملف قاعدة البيانات، مُزيلًا المساحة الضائعة بسبب حذف السجلّات Compact the database file, removing space wasted by deleted records. رُصّ ملف قاعدة البيانات، مُزيلًا المساحة الضائعة بسبب حذف السجلّات. E&xit ا&خرج Ctrl+Q Ctrl+Q &Database from SQL file... &قاعدة بيانات من ملف SQL... Import data from an .sql dump text file into a new or existing database. استورِد بيانات من ملف ‎.sql نصّي مفرّغ إلى قاعدة بيانات جديدة أو موجودة. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. يتيح لك هذا الخيار استيراد البيانات من ملف ‎.sql نصّي مفرّغ إلى قاعدة بيانات جديدة أو موجودة. يمكن إنشاء ملفات SQL المفرّغة في أغلب محرّكات قواعد البيانات، بما فيها MySQL وPostgreSQL. &Table from CSV file... ج&دولًا من ملف CSV... Open a wizard that lets you import data from a comma separated text file into a database table. افتح مرشدًا يساعدك في استيراد البيانات من ملف نصّي مقسوم بفواصل إلى جدول قاعدة البيانات. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. افتح مرشدًا يساعدك في استيراد البيانات من ملف نصّي مقسوم بفواصل إلى جدول قاعدة البيانات. يمكن إنشاء ملفات CSV في أغلب تطبيقات قواعد البيانات والجداول الممتدّة. &Database to SQL file... &قاعدة بيانات إلى ملف SQL... Export a database to a .sql dump text file. صدّر قاعدة بيانات إلى ملف ‎.sql نصّي مفرّغ. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. يتيح لك هذا الخيار تصدير قاعدة بيانات إلى ملف ‎.sql نصّي مفرّغ. يمكن لملفات SQL المفرّغة احتواء كلّ البيانات الضرورية لإعادة إنشاء قاعدة البيانات في أغلب محرّكات قواعد البيانات، فما فيها MySQL وPostgreSQL. &Table(s) as CSV file... الج&داول كملف CSV... Export a database table as a comma separated text file. صدّر جدول قاعدة بيانات كملف نصّي مقسوم بفواصل. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. صدّر جدول قاعدة بيانات كملف نصّي مقسوم بفواصل، جاهز ليُستورد إلى تطبيقات قواعد البيانات أو الجداول الممتدّة الأخرى. &Create Table... أ&نشِئ جدولًا... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database افتح مرشد إنشاء الجدول، حيث تستطيع تحديد اسم وحقول للجدول الجديد في قاعدة البيانات &Delete Table... ا&حذف الجدول... Delete Table احذف الجدول Open the Delete Table wizard, where you can select a database table to be dropped. افتح مرشد حذف الجدول، حيث يمكنك تحديد جدول قاعدة البيانات الذي سيُحذف. &Modify Table... &عدّل الجدول... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. افتح مرشد تعديل الجدول، حيث يمكنك تغيير اسم أحد الجداول الموجودة. يمكنك أيضًا إضافة حقول أو حذفها إلى ومن الجدول، كما وتعديل أسماء الحقول وأنواعها. Create &Index... أنشِئ &فهرسًا... Open the Create Index wizard, where it is possible to define a new index on an existing database table. افتح جدول إنشاء الفهارس، حيث يمكنك تحديد فهرس جديد في جدول قاعدة بيانات موجود. &Preferences... التف&ضيلات... Open the preferences window. افتح نافذة التفضيلات. &DB Toolbar شريط &قاعدة البيانات Shows or hides the Database toolbar. يعرض أو يُخفي شريط قاعدة البيانات.. Ctrl+T Ctrl+T W&hat's This? ما ه&ذا؟ Shift+F1 Shift+F1 Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] نفّذ كلّ إفادات SQL أو المحدّد [F5, Ctrl+Return, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. يُنفّذ هذا الزرّ إفادات SQL المحدّدة حاليًا. إن لم هناك أيّ نصّ محدّد، ستُنفّذ كلّ إفادات SQL. &Load Extension... &حمّل امتدادًا... &Wiki الوي&كي Bug &Report... أبلِغ عن علّ&ة... Feature Re&quest... ا&طلب ميزة... Web&site موقع الو&بّ &Donate on Patreon... تبرّع &عبر باتريون... Sa&ve Project... اح&فظ المشروع... This button lets you save all the settings associated to the open DB to a DB4S project file يتيح لك هذا الزرّ حفظ كلّ الإعدادات المرتبطة بقاعدة البيانات المفتوحة في ملفّ مشروع DB4S Open &Project... افتح م&شروعًا... This button lets you open a DB4S project file يتيح لك هذا الزرّ فتح ملف مشروع DB4S &Attach Database... أر&فِق قاعدة بيانات... Add another database file to the current database connection أضِف ملف قاعدة بيانات آخر إلى اتصال قاعدة البيانات الحالي This button lets you add another database file to the current database connection يتيح لك هذا الزرّ إضافة ملف قاعدة بيانات آخر إلى اتصال قاعدة البيانات الحالي &Set Encryption... ا&ضبط التعمية... SQLCipher &FAQ أ&سئلة شائعة عن SQLCipher Table(&s) to JSON... الج&دول/الجداول إلى JSON... Open Data&base Read Only... افتح قاع&دة بيانات للقراءة فقط... Save results احفظ النتائج Save the results view احفظ منظور النتائج This button lets you save the results of the last executed query يتيح لك هذا الزرّ حفظ نتائج آخر استعلام نُفّذ Find text in SQL editor ابحث عن النصوص في محرّر SQL Find text in SQL editor [Ctrl+F] ابحث عن النصوص في محرّر SQL ‏[Ctrl+F] This button opens the search bar of the editor يفتح هذا الزرّ شريط البحث للمحرّر Ctrl+F Ctrl+F Find or replace text in SQL editor ابحث أو استبدل النصوص في محرّر SQL Find or replace text in SQL editor [Ctrl+H] ابحث أو استبدل النصوص في محرّر SQL ‏[Ctrl+H] This button opens the find/replace dialog for the current editor tab يفتح هذا الزرّ حواريّ البحث والاستبدال للسان المحرّر الحالي Export to &CSV &صدّر بنسق CSV Save as &view احفظ كمن&ظور Save as view احفظ كمنظور Hide column(s) أخفِ العمود/الأعمدة Hide selected column(s) أخفِ العمود/الأعمدة المحدّدة Show all columns أعرض كلّ الأعمدة Show all columns that were hidden اعرض كلّ الأعمدة التي أُخفيت Shows or hides the Project toolbar. اعرض أو أخفِ شريط أدوات المشروع. Extra DB Toolbar شريط أدوات قواعد البيانات الإضافي Export the filtered data to CSV صدّر البيانات المرشّحة إلى CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. يُصدّر هذا الزرّ بيانات الجدول المتصفّح كما هي معروضة حاليًا (بعد المرشّحات وتنسيقات العرض وعمود الفرز) كملف CSV. Save the current filter, sort column and display formats as a view احفظ المرشّح الحالي وعمود الفرز وتنسيقات العرض كمنظور This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. يحفظ هذا الزرّ الإعداد الحالي للجدول المتصفّح (المرشّحات وتنسيقات العرض وعمود الفرز) في منظور SQL يمكنك تصفّحه لاحقًا أو استخدامه في إفادات SQL. Insert Values... أدرِج قيم... Open a dialog for inserting values in a new record افتح حواريّ لإدراج القيم في سجلّ جديد Insert new record using default values in browsed table أدرِج سجلًا جديدًا مستخدمًا القيم المبدئية في الجدول المتصفّح New In-&Memory Database قاعدة بيانات جديدة في ال&ذاكرة Drag && Drop Qualified Names اسحب وأسقِط الأسماء المؤهّلة Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor استخدم الأسماء المؤهّلة (مثل ‎"Table"."Field"‎) عند سحب الكائنات وإسقاطها في المحرّر. Drag && Drop Enquoted Names اسحب وأسقِط الأسماء مقتبسةً Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor استخدم المُعرّفات مهرّبة (مثلًا "Table1") عند سحب الكائنات وإسقاطها في المحرّر &Integrity Check فحص ال&سلامة Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. يُشغّل integrity_check pragma على قاعدة البيانات المفتوحة ويُعيد النتائج في لسان ”نفّذ SQL“. يُجري pragma فحص سلامة على قاعدة البيانات كاملةً. &Foreign-Key Check فحص الم&فتاح الأجنبي Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab يُشغّل foreign_key_check pragma على قاعدة البيانات المفتوحة ويُعيد النتائج في لسان ”نفّذ SQL“ &Quick Integrity Check فحص سلام&ة سريع Run a quick integrity check over the open DB يُشغّل فحص سلامة سريع على قاعدة البيانات المفتوحة Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. يُشغّل quick_check pragma على قاعدة البيانات المفتوحة ويُعيد النتائج في لسان ”نفّذ SQL“. يُجري هذا الأمر أغلب ما تُجريه PRAGMA integrity_check إلّا أنّه أسرع. &Optimize ح&سّن Attempt to optimize the database حاوِل تحسين قاعدة البيانات Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. يُشغّل optimize pragma على قاعدة البيانات المفتوحة. قد تؤدّي pragma تحسينات تُحسّن من أداء الاستعلامات مستقبلًا. Print اطبع Print text from current SQL editor tab [Ctrl+P] اطبع النصّ من لسان محرّر SQL الحالي [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab افتح حواريّ لطباعة النصّ في لسان محرّر SQL الحالي Print the structure of the opened database [Ctrl+P] اطبع بنية قاعدة البيانات المفتوحة [Ctrl+P] Open a dialog for printing the structure of the opened database افتح حواريّ لطباعة بنية قاعدة البيانات المفتوحة &About... &عن... &Recently opened المفتوحة حدي&ثًا Open &tab افتح ل&سانًا Execute SQL نفّذ SQL Project Toolbar شريط أدوات المشروع Extra DB toolbar شريط أدوات قواعد البيانات الإضافي Close the current database file أغلِق ملف قاعدة البيانات الحالي &About &عن This button opens a new tab for the SQL editor يفتح هذا الزرّ لسانًا جديدًا لمحرّر SQL &Execute SQL ن&فّذ SQL Execute SQL [F5, Ctrl+Return] نفّذ SQL ‏[F5, Ctrl+Return] Open SQL file افتح ملف SQL This button opens a file containing SQL statements and loads it in a new editor tab يفتح هذا الزرّ ملفًا يحتوي إفادات SQL ويحمّله في لسان محرّر جديد Save SQL file احفظ ملف SQL &Load extension &حمّل امتدادًا Execute current line نفّذ السطر الحالي Execute current line [Ctrl+E] نفّذ السّطر الحاليّ [Ctrl+E] Ctrl+E Ctrl+E Export as CSV file صدّر كملف بنسق CSV Export table as comma separated values file صدّر الجدول كملف نصّي مقسوم بفواصل &Wiki... الوي&كي... Bug &report... أبلِغ عن علّ&ة... Web&site... موقع الو&بّ... Sa&ve Project احف&ظ المشروع Save the current session to a file احفظ الجلسة الحالية في ملف Open &Project افتح م&شروعًا Load a working session from a file حمّل جلسة عمل من ملف &Attach Database أ&رفِق قاعدة بيانات &Set Encryption ا&ضبط التعمية Save SQL file as احفظ ملف SQL كَ‍ This button saves the content of the current SQL editor tab to a file يحفظ هذا الزرّ محتويات لسان محرّر SQL الحالي في ملف &Browse Table ت&صفّح الجدول Copy Create statement انسخ إفادة الإنشاء Copy the CREATE statement of the item to the clipboard انسخ إفادة CREATE للعنصر إلى الحافظة Edit display format حرّر تنسيق العرض Edit the display format of the data in this column حرّر تنسيق عرض البيانات في هذا العمود Show rowid column اعرض عمود معرّف الصفوف Toggle the visibility of the rowid column بدّل ظهور عمود معرّف الصفوف/rowid Set encoding اضبط الترميز Change the encoding of the text in the table cells غيّر ترميز النصوص في خلايا الجدول Set encoding for all tables اضبط ترميز كلّ الجداول Change the default encoding assumed for all tables in the database غيّر الترميز المبدئي المفترض في كلّ جداول قاعدة البيانات Duplicate record كرّر السّجلّ Ctrl+Return Ctrl+Enter Ctrl+L Ctrl+L Ctrl+P Ctrl+P Ctrl+D Ctrl+D Ctrl+I Ctrl+I Encrypted معمّاة Database is encrypted using SQLCipher قاعدة البيانات معمّاة باستخدام SQLCipher Read only للقراءة فقط Database file is read only. Editing the database is disabled. ملف قاعدة البيانات للقراءة فقط. تحرير قاعدة البيانات معطّل. Database encoding ترميز قاعدة البيانات Choose a database file اختر ملف قاعدة بيانات Invalid file format. نسق الملفّ غير صالح. Choose a filename to save under اختر اسمًا للملف لحفظه به Error adding record: خطأ أثناء إضافة السجلّ: Error deleting record: %1 خطأ أثناء حذف السجلّ: %L1 Please select a record first من فضلك اختر سجلًا أوّلًا %1 - %2 of %3 ‏%L1 - ‏%L2 من أصل %L3 There is no database opened. Please open or create a new database file. لا قواعد بيانات مفتوحة. من فضلك افتح ملف قاعدة بيانات أو أنشِئ واحدًا جديدًا. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. أمتأكّد من حذف %L1 ‏”%L2“؟ ستفقد كلّ البيانات المرتبطة بالجدول %L1. Error: could not delete the %1. Message from database engine: %2 خطأ: تعذّر حذف %L1. الرسالة من محرّك قاعدة البيانات: %L2 There is no database opened. لا قواعد بيناتا مفتوحة. %1 rows returned in %2ms from: %3 أُرجع من الصّفوف %L1 خلال %L2م‌ث من: %L3 Error executing query: %1 خطأ أثناء تنفيذ الاستعلام: %L1 , %1 rows affected ، عدد الصفوف المتأثّرة هو %L1 Query executed successfully: %1 (took %2ms%3) نُفّذ الاستعلام بنجاح: %L1 (أخذ %L2م‌ث%L3) Choose a text file اختر ملفًّا نصّيًّا Text files(*.csv *.txt);;All files(*) الملفات النصّية(*.csv *.txt);;كلّ الملفات(*) Import completed اكتمل الاستيراد Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 خطأ أثناء حفظ ملف قاعدة البيانات. هذا يعني أنّه تعذّر حفظ كلّ التغييرات في قاعدة البيانات. عليك حلّ الخطأ الآتي أوّلًا: %L1 Are you sure you want to undo all changes made to the database file '%1' since the last save? أمتأكّد من التراجع عن كلّ التعديلات المُجراة على ملف قاعدة البيانات ”%L1“ منذ آخر حفظ؟ Choose a file to import اختر ملفًا لاستيراده Text files(*.sql *.txt);;All files(*) الملفات النصّية(*.sql *.txt);;كلّ الملفات(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. أتريد إنشاء ملف قاعدة بيانات جديد ليحتفظ بالبيانات المستوردة؟ إن كانت إجابتك ”لا“ فسنحاول استيراد البيانات من ملف SQL إلى قاعدة البيانات الحالية. File %1 already exists. Please choose a different name. الملف %L1 موجود بالفعل. من فضلك اختر اسمًا آخر. Error importing data: %1 خطأ أثناء استيراد البيانات: %L1 Import completed. اكتمل الاستيراد. Delete View احذف المنظور Modify View عدّل المنظور Delete Trigger احذف المحفّز Modify Trigger عدّل المحفّز Delete Index احذف الفهرس Modify Index عدّل الفهرس Modify Table عدّل الجدول &%1 %2 &%L1 %L2 Extensions(*.so *.dylib *.dll);;All files(*) Choose a project file to open اختر ملف مشروع لفتحه This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. يستخدم ملف المشروع هذا نسق ملفات قديم لأنه أُنشأ باستخدام «متصفّح قواعد بيانات SQLite» بإصدارة ٣٫١٠ أو أقل. تحميل نسق الملفات هذا مدعوم بشكل كلي حتى الآن، إلا أننا ننصحك بتحويل كل ملفات المشاريع لديك لتستخدم النسق الجديد لأن دعم النسق القديمة قد ينتهي في المستقبل. يمكنك تحويل ملفاتك بفتحها وإعادة حفظها فحسب. Duplicate records كرّر السجلّات Ctrl+" Ctrl+" Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. من فضلك أدخِل مفتاحًا أساسيًا زائفًا (pseudo) لتفعيل التحرير في هذا المنظور. يجب أن يكون المفتاح اسمًا لأحد الأعمدة الفريدة في المنظور. Setting PRAGMA values will commit your current transaction. Are you sure? سيؤّدي ضبط قيم PRAGMA إلى إيداع المعاملة الحالية. أمتأكّد؟ Could not open database file. Reason: %1 تعذّر فتح ملف قاعدة البيانات. السبب: %L1 In-Memory database قاعدة بيانات في الذاكرة determining row count... يحدّد عدد الصفوف... %1 - %2 of >= %3 ‏%L1 - ‏%L2 من أصل >= ‏%L3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. أمتأكّد من حذف الجدول ”%L1“؟ ستفقد كلّ البيانات المرتبطة بالجدول. Are you sure you want to delete the view '%1'? أمتأكّد من حذف المنظور ”%L1“؟ Are you sure you want to delete the trigger '%1'? أمتأكّد من حذف المحفّز ”%L1“؟ Are you sure you want to delete the index '%1'? أمتأكّد من حذف الفهرس ”%L1“؟ Error: could not delete the table. خطأ: تعذّر حذف الجدول. Error: could not delete the view. خطأ: تعذّر حذف المنظور. Error: could not delete the trigger. خطأ: تعذّر حذف المحفّز. Error: could not delete the index. خطأ: تعذّر حذف الفهرس. Message from database engine: %1 الرسالة من محرّك قواعد البيانات: %L1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? تحرير الجدول يطلب حفظ كلّ التغييرات المرجأة الآن. أمتأكّد من حفظ قاعدة البيانات؟ Error checking foreign keys after table modification. The changes will be reverted. خطأ أثناء فحص المفاتيح الأجنبية بعد تعديل الجدول. ستُعكس التغييرات. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. لم يمرّ الجدول من فحص المفتاح الأجنبي.<br/>عليك تشغيل ”أدوات -> فحص المفتاح الأجنبي“ وإصلاح المشاكل المبلّغ عنها. -- EXECUTING SELECTION IN '%1' -- -- ينفّذ التحديد في ”%1“ -- -- EXECUTING LINE IN '%1' -- -- ينفّذ السطر في ”%1“ -- -- EXECUTING ALL IN '%1' -- -- ينفّذ الكلّ في ”%1“ -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? سيؤّدي ضبط قيم PRAGMA أو التنظيف إلى إيداع المعاملة الحالية. أمتأكّد؟ Execution aborted by user أجهض المستخدم التنفيذ executing query ينفّذ الاستعلام %1 rows returned in %2ms أُرجع من الصّفوف %L1 خلال %L2م‌ث query executed successfully. Took %1ms%2 نُفّذ الاستعلام بنجاح: أخذ %L1م‌ث%L2 -- At line %1: %4 -- Result: %3 -- في السطر %L1: %L4 -- النتيجة: %L3 Choose text files اختر ملفات نصّية Import completed. Some foreign key constraints are violated. Please fix them before saving. اكتمل الاستيراد. انتُهكت بعض قيود المفتاح الأجنبي. من فضلك أصلِحها قبل الحفظ. Select SQL file to open اختر ملف SQL لفتحه Couldn't read file: %1. تعذّرت قراءة الملف: %L1. Couldn't save file: %1. تعذّر حفظ الملف: %L1. Select file name اختر اسم الملف Select extension file اختر ملف الامتداد Extensions(*.so *.dll);;All files(*) الامتدادات(*.so *.dll);;كلّ الملفات(*) Extension successfully loaded. نجح تحميل الامتداد. Error loading extension: %1 خطأ أثناء تحميل الامتداد: %L1 Don't show again لا تعرض ثانيةً New version available. تتوفّر إصدارة جديدة. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. تتوفّر إصدارة جديدة من «متصفّح قواعد بيانات SQLite» ‏(%L1٫‏%L2٫‏%L3).<br/><br/>من فضلك نزّلها من <a href='%4'>%L4</a>. Collation needed! Proceed? التجميع مطلوب! أنتابع؟ A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! يحتاج أحد الجداول في قاعدة البيانات هذه دالة التجميع الخاصّة ”%L1“ والتي لا يستطيع البرنامج توفيرها دون معلومات أخرى. احذر إن اخترت المتابعة، فقد تحدث أمور غير حسنة لقاعدة البيانات. خُذ نسخة احتياطيّة! creating collation يُنشئ تجميعة Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. ضع اسمًا جديدًا للسان SQL. استخدم محرف ”&&“ ليُتاح استخدام المحرف الذي يليه كاختصار لوحة مفاتيح. Please specify the view name من فضلك حدّد اسم المنظور There is already an object with that name. Please choose a different name. هناك كائن بنفس الاسم. من فضلك اختر اسمًا آخر. View successfully created. نجح إنشاء المنظور. Error creating view: %1 خطأ أثناء إنشاء المنظور: %L1 There is no filter set for this table. View will not be created. لا مرشّح مضبوط لهذا الجدول. لن يُنشأ المنظور. Delete Records احذف السجلّات This action will open a new SQL tab for running: سيفتح هذا الإجراء لسان SQL جديد لتشغيل: Press Help for opening the corresponding SQLite reference page. انقر ”مساعدة“ لفتح صفحة SQLite المرجعية المناسبة. Choose a axis color اختر لونًا للمحور PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;كلّ الملفّات(*) Choose a file to open اختر ملفًا لفتحه DB Browser for SQLite project file (*.sqbpro) ملف مشروع «متصفّح قواعد بيانات SQLite» ‏(*.sqbpro) Please choose a new encoding for this table. من فضلك اختر ترميزًا جديدًا لهذا الجدول. Please choose a new encoding for all tables. من فضلك اختر ترميزًا جديدًا لكلّ الجداول. At line %1: Result: %2 %1 Leave the field empty for using the database encoding. %L1 اترك الحقل فارغًا لاستخدام ترميز قاعدة البيانات. This encoding is either not valid or not supported. إمّا أنّ هذا الترميز غير صالح أو أنّه غير مدعوم. Cancel ألغِ NullLineEdit Set to NULL اضبطه على NULL Alt+Del Alt+Del PlotDock Plot رسم بياني <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> <p>تعرض هذه اللوحة قائمة الأعمدة للمجدول المتصفّح حاليًا أو للاستعلام الذي نُفّذ حديثًا. يمكنك تحديد الأعمدة التي تريد استخدامها كمحاور X أو Y للوحة الرسم البياني أدناه. يعرض الجدول نوع المحور المكتشف والذي سيؤثّر على الرسم البياني الناتج. يمكنك تحديد الأعمدة العددية فقط لمحور Y، عكس محور X حيث يمكنك تحديد:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">تاريخ/وقت</span>: السلاسل النصّية التي لها التنسيق ”yyyy-MM-dd hh:mm:ss“ أو ”yyyy-MM-ddThh:mm:ss“</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">تاريخ</span>: السلاسل النصّية التي لها التنسيق ”yyyy-MM-dd“</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">وقت</span>: السلاسل النصّية التي لها التنسيق ”hh:mm:ss“</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">لصيقة</span>: السلاسل النصّية التي لها تنسيقات أخرى. تحديد هذا العمود كمحور x سيُنتج رسم بياني بأشرطة حيث قيم الأعمدة ستكون لصيقات للأشرطة</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">عددي</span>: قيم عددية صحيحة أو حقيقية</li></ul><p>بنقر خلايا Y مزدوجًا يمكنك تغيير اللون المستخدم لذاك الرسم.</p> Columns الأعمدة X س Y ص _ _ Axis Type نوع المحور Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. هنا تجد الرسم البياني المرسوم عند تحديد قيم x و y أعلاه. انقر النقاط لتحديدها في الرسم البياني والجدول. انقر مع Ctrl لتحديد مدًى من النقاط. استخدم عجلة الفأرة للتقريب والإبعاد، وحرّك الفأرة لتغيير مدى المحور. اختر المحاور أو لصيقات المحاور لتحريكها أو قرّب/بعّد بذاك الاتجاه فحسب. Line type: نوع الخطوط: None بلا Line خطّ StepLeft عتبة يسرى StepRight عتبة يمنى StepCenter عتبة وسطى Impulse نبض Point shape: شكل النقط: Cross علامة ضرب Plus علامة جمع Circle دائرة Disc قرص Square مربّع Diamond معيّن Star نجمة Triangle مثلّث TriangleInverted مثلّث مقلوب CrossSquare علامة ضرب في مربّع PlusSquare علامة جمع في مربّع CrossCircle علامة ضرب في دائرة PlusCircle علامة جمع في دائرة Peace رمز السلام <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html dir="rtl"><p>احفظ الرسم البياني الحالي...</p><p>نسق الملف يحدّده الامتداد (png وjpg وpdf وbmp)</p></html> Save current plot... احفظ الرسم البياني الحالي... Load all data and redraw plot حمّل كلّ البيانات وأعِد رسم الرسم البياني Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. حمّل كلّ البيانات. لا فائدة من هذا إن لم تكن كلّ البيانات قد جُلبت أساسًا من الجدول (بسبب استخدام آليّة جلب جزئية). Row # صفّ # Choose a axis color اختر لونًا للمحور Copy انسخ Print... اطبع... Show legend اعرض مفتاح الرسم Stacked bars أشرطة مرصوصة Date/Time تاريخ/وقت Date تاريخ Time وقت Numeric عددي Label لصيقة Invalid غير صالح Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. حمّل كلّ البيانات وأعِد رسم الرسم البياني. تحذير: لم تُجلب كلّ البيانات من الجدول بسبب استخدام آليّة جلب جزئية. Choose an axis color اختر لونًا للمحور Choose a filename to save under اختر اسمًا للملف لحفظه PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;كلّ الملفات(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. توجد منحنيات في هذا الرسم البياني ولا يمكن تطبيق نمط الخطوط المحدّد إلّا على الرسوم البيانية المفروزة حسب X. إمّا أن تفرز الجدول أو الاستعلام حسب X لإزالة المنحنيات أو تحديد أحد الأنماط التي تدعمها المنحنيات: ”بل“ أو ”خطّ“. Fetching all data... يجلب كل البيانات... Cancel ألغِ PreferencesDialog Preferences التفضيلات &General &عام Remember last location تذكّر آخر مكان Always use this location استخدم هذا المكان دائمًا Remember last location for session only تذكّر آخر مكان لهذه الجلسة فقط ... ... Default &location الم&كان المبدئي Lan&guage الل&غة Automatic &updates الت&حديثات الآلية enabled مفعّلة Show remote options اعرض خيارات البعيد &Database &قاعدة البيانات Database &encoding &ترميز قاعدة البيانات Open databases with foreign keys enabled. افتح قواعد البيانات والمفاتيح الأجنبية مفعّلة. &Foreign keys الم&فاتيح الأجنبية Remove line breaks in schema &view أزِل كاسرات الأسطر في من&ظور المخطّط Prefetch block si&ze &حجم الكتلة لجلبها مسبقًا Advanced متقدّم SQL to execute after opening database إفادة SQL لتُنفّذ بعد فتح قاعدة البيانات SQ&L to execute after opening database إ&فادة SQL لتُنفّذ بعد فتح قاعدة البيانات Default field type نوع الحقل المبدئي Data &Browser مت&صفّح البيانات Font الخط &Font ال&خط Font si&ze: &حجم الخط: Content المحتوى Symbol limit in cell أقصى عدد من الرموز في كلّ خليّة NULL fields حقول NULL &Text ال&نص Field colors ألوان الحقول NULL NULL Regular العادية Text النصّ Binary الثنائيّة Background الخلفية Filters المرشّحات Escape character محرف الهروب Delay time (&ms) وقت التأخير (&م‌ث) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. اضبط وقت انتظار قبل تطبيق قيمة المرشّح الجديدة. يمكن ضبطه إلى القيمة صِفر لتعطيل الانتظار. &SQL م&حرّر SQL Settings name الاسم في الإعدادات Context السياق Colour اللون Bold ثخين Italic مائل Underline مسطّر Keyword الكلمات المفتاحية function function Function الدوال Table الجداول Comment التعليقات Identifier المعرّفات String السلاسل النصّية currentline currentline Current line السطر الحالي SQL &editor font size حجم الخط في م&حرّر SQL SQL &log font size حجم الخط في &سجلّ SQL Tab size حجم التبويبات SQL editor &font &خط محرّر SQL Error indicators مؤشّرات الأخطاء Enabling error indicators highlights the SQL code lines that caused errors during the last execution تفعيل مؤشّرات الأخطاء سيُلوّن أسطر كود SQL التي سبّبت أخطاء أثناء آخر تنفيذ Hori&zontal tiling التراتب أف&قيًا If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. إن فُعّل، سيظهر محرّر أكواد SQL ومنظور جدول النتائج جنبًا إلى جنب بدلًا من أن يكونان فوق بعض. Code co&mpletion إ&كمال الكود Toolbar style نمط شريط الأدوات Only display the icon اعرض الأيقونة فحسب Only display the text اعرض النصّ فحسب The text appears beside the icon يظهر النصّ بجانب الأيقونة The text appears under the icon يظهر النصّ أسفل الأيقونة Follow the style اتبع النمط DB file extensions امتدادات ملفات قواعد البيانات Manage أدِر When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. إن فُعّل، ستُزال كاسرات الأسطر في عمود ”المخطّط“ في لسان ”بنية قاعدة البيانات“ كما والرصيف والخرج المطبوع. Font si&ze &حجم الخط This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. هذا أقصى عدد من الصفوف في كلّ جدول لتفعيل إكمال القيمة حسب البيانات الحالية في العمود. يمكن ضبطه على صفر لتعطيل الإكمال. Row count threshold for completion عتبة عدد الصفوف للإكمال Field display عرض الحقول Displayed &text ال&نصّ المعروض Text color لون النصّ Background color لون الخلفية Preview only (N/A) معاينة فقط (غير متوفّر) Foreground الأمامية SQL &results font size حجم خط ن&تائج SQL &Wrap lines لُ&فّ الأسطر Never أبدًا At word boundaries عند حدود الكلمات At character boundaries عند حدود المحارف At whitespace boundaries عند حدود المسافات &Quotes for identifiers &علامات التنصيص للمُعرّفات Choose the quoting mechanism used by the application for identifiers in SQL code. اختر آليّة التنصيص التي سيستخدمها التطبيق للمُعرّفات في كود SQL. "Double quotes" - Standard SQL (recommended) "علامات تنصيص مزدوجة" - SQL القياسية (مستحسن) `Grave accents` - Traditional MySQL quotes `نبر الإطالة` - علامات اقتباس MySQL التقليدية [Square brackets] - Traditional MS SQL Server quotes [أقواس مربّعة] - علامات تنصيص خادوم SQL لِمايكروسوفت التقليدي Keywords in &UPPER CASE الكلمات المفتاحية &كبيرة الحالة When set, the SQL keywords are completed in UPPER CASE letters. إن أُشّر عليه، ستُكمل كلمات SQL بأحرف حالتها كبيرة. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background إن أُشر، ستُبرز الأسطر في كود SQL التي تسبّبت بأخطاء أثناء آخر تنفيذ وسيُشير إطار النتائج إلى الخطأ في الخلفية &Extensions الامت&دادات Select extensions to load for every database: حدّد الامتدادات لتُحمّل لكلّ قاعدة بيانات: Add extension أضِف امتدادًا Remove extension أزِل الامتداد <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html dir="rtl">مع أنّ معامل REGEX مدعوم، إلّا أنّ SQLITE ليس فيها أية خوارزمية تعابير نمطية منجزة، بل تنادي التطبيق الجاري. «متصفّح قواعد بيانات SQLite» ينفّذ هذه الخوارزمية لك لتستخدم REGEXP دون عناء. مع ذلك، يختلف تنفيذ هذه الميزة ولربّما تحتاج استخدام واحدة أخرى، لذا فأنت حرّ في تعطيل طريقة التطبيق في التنفيذ وتحميل أيّ من تلك باستخدام احد الامتدادات. إعادة تشغيل التطبيق مطلوبة.</html> Disable Regular Expression extension عطّل ملحقة العبارات النمطية <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> <p>توفّر SQLite دالة SQL لتحميل الامتدادات من ملف مكتبة مشتركة. فعّل هذا إن أردت استخدام دالة <span style=" font-style:italic;">load_extension()‎</span> من كود SQL.</p><p>لأسباب أمنية، تحميل الامتدادا معطّل مبدئيًا ويجب تفعيله بهذا الإعداد. يمكنك دائمًا تحميل الامتدادات عبر الواجهة الرسومية، حتى لو كان هذا الخيار معطّلًا.</p> Allow loading extensions from SQL code اسمح بتحميل الامتدادات من كود SQL Remote البعيد CA certificates شهادات سلطة الشهادات Subject CN اش موضوع التعمية Common Name الاسم الشائع Subject O منظّمة موضوع التعمية Organization المنظّمة Valid from صالحة من Valid to صالحة حتى Serial number الرقم التسلسلي Your certificates شهاداتك File الملف Subject Common Name الاسم الشائع لموضوع التعمية Issuer CN اش المُصدِر Issuer Common Name الاسم الشائع للمُصدِر Clone databases into استنسخ قواعد البيانات إلى Choose a directory اختر دليلًا The language will change after you restart the application. ستتغيّر اللغة بعد إعادة تشغيل التطبيق. Select extension file اختر ملف الامتداد Extensions(*.so *.dll);;All files(*) الامتدادات(*.so *.dll);;كلّ الملفات(*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file استورِد ملف شهادة No certificates found in this file. لم تُعثر على شهادات في هذا الملف. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! أمتأكّد من إزالة هذه الشهادة؟ ستُحذف كلّ بيانات الشهادة من إعدادات التطبيق! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. أمتأكّد من مسح كلّ الإعدادات المحفوظة؟ ستفقد كلّ التفضيلات لديك وستُستخدم القيمة المبدئية. QObject Error importing data خطأ في استيراد البيانات from record number %1 من السجلّ رقم %L1 . %1 . %L1 Importing CSV file... يستورد ملف CSV... Decoding CSV file... يفكّ ترميز ملف CSV... Cancel ألغِ Collation needed! Proceed? التجميع مطلوب! أنتابع؟ A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! يحتاج أحد الجداول في قاعدة البيانات هذه دالة التجميع الخاصّة ”%L1“ والتي لا يستطيع البرنامج توفيرها دون معلومات أخرى. احذر إن اخترت المتابعة، فقد تحدث أمور غير حسنة لقاعدة البيانات. خُذ نسخة احتياطيّة! SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) ملفات قواعد بيانات SQLite ‏(*.db *.sqlite *.sqlite3 *.db3);;كلّ الملفات (*) All files (*) كلّ الملفات (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) ملفّات قواعد بيانات SQLite ‏(*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 خطأ أثناء الاتصال بِ‍ %L1. %L2 Error opening remote file at %1. %2 خطأ أثناء فتح الملف البعيد في %L1. %L2 Error: Invalid client certificate specified. خطأ: حُدّدت شهادة عميل غير صالحة. Please enter the passphrase for this client certificate in order to authenticate. من فضلك أدخِل عبارة السر لشهادة العميل لإجراء الاستيثاق. Cancel ألغِ Uploading remote database to %1 يرفع قاعدة البيانات البعيدة إلى %L1 Downloading remote database from %1 ينزّل قاعدة البيانات البعيدة من %L1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. لم تُحدّث أيّة قاعدة بيانات منذ آخر عمليّة جلب/checkout. أتريد تحديث قاعدة البيانات المحلية إلى أحدث إصدارة؟ لاحظ بأنّ هذا سيُهمل أيّ تغيير أجريته محليًا! إن لم ترد فقد هذه التغييرات المُجراة محليًا، فانقر ”لا“ لفتح النسخة المحلية. Uploading remote database to %1. يرفع قاعدة البيانات البعيدة إلى %L1. Downloading remote database from %1. ينزّل قاعدة البيانات البعيدة من %L1. Error: The network is not accessible. خطأ: تعذّر الوصول إلى الشبكة. Error: Cannot open the file for sending. خطأ: تعذّر فتح الملف لإرساله. Error opening local databases list. %1 خطأ أثناء فتح قائمة قواعد البيانات المحلية. %L1 Error creating local databases list. %1 خطأ أثناء إنشاء قائمة قواعد البيانات المحلية. %L1 RemoteDock Remote البعيد Identity الهويّة Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. اتّصل بالخادوم البعيد مستخدمًا الهويّة المحدّدة حاليًا. يُأخذ الخادوم الصحيح من الهوّية هو الآخر. Go انتقل Push currently opened database to server ادفع قاعدة البيانات المفتوحة حاليًا إلى الخادوم <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> <p>يمكن في هذه اللوحة إضافة قواعد البيانات البعيدة من موقع الوبّ dbhub.io إلى DB4S. تحتاج بداية إلى هويّة:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">لِج إلى موقع الوبّ dbhub.io (استخدم بياناتك على غِت‌هَب أو أيّ بيانات تريد)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">انقر على الزرّ لإنشاء شهادة DB4S (وهذه ستكون الهويّة). بهذا ستسلتم ملف شهادة (احفظه في قرص محليّ).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">انتقل إلى لسان ”البعيد“ في تفضيلات DB4S. انقر الزرّ لإضافة شهادة جديدة إلى DB4S واختر ملف الشهادة الذي نزّلته لتوّك.</li></ol><p>ستعرض لوحة ”البعيد“ الآن الهويّة وستقدر على إضافة قواعد البيانات البعيدة.</p> RemoteModel Name الاسم Version الإصدارة Last modified آخر تعديل Size الحجم Commit الإيداع bytes بايت RemotePushDialog Push database دفع قاعدة البيانات Database na&me to push to ا&سم قاعدة البيانات الذي سيُدفع إليها Commit message رسالة الإيداع <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence رخصة قاعدة البيانات Public عامّة Branch الفرع Force push أجبِر الدفع Database will be public. Everyone has read access to it. ستكون قاعدة البيانات عامّة. يملك الجميع تصريح القراءة منها. Database will be private. Only you have access to it. ستكون قاعدة البيانات خاصّة. أنت من لديك حقّ الوصول إليها لا غير. Use with care. This can cause remote commits to be deleted. استخدمه بحذر. يمكن أن يتسبّب هذا بحذف الإيداعات البعيدة. Unspecified غير محدّدة SqlExecutionArea Form استمارة Find previous match [Shift+F3] جِد المطابقة السابقة [Shift+F3] Find previous match with mapping جِد المطابقة السابقة مع الالتفاف Shift+F3 Shift+F3 The found pattern must be a whole word يجب أن يكون النمط الذي سيُبحث عنه كلمة كاملة Whole Words الكلمات الكاملة Text pattern to find considering the checks in this frame نمط البحث للبحث عنه بأخذ الفحوص في هذا الإطار بعين الاعتبار Find in editor ابحث في المحرّر The found pattern must match in letter case يجب أن يطابق النمط الذي سيُبحث عنه حالة الأحرف Case Sensitive حسّاس لحالة الأحرف Find next match [Enter, F3] جِد المطابقة التالية [Enter, F3] Find next match with wrapping جِد المطابقة التالية مع الالتفاف F3 F3 Interpret search pattern as a regular expression تعامل مع نمط البحث كتعبير نمطي <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <p>إن أُشّر، سيُتعامل مع نمط البحث على أنّه تعبير يونكس نمطي. طالع <a href="https://en.wikibooks.org/wiki/Regular_Expressions">التعابير النمطية في ويكي‌كتب (بالإنجليزية)</a>.</p> Regular Expression تعبير نمطي Close Find Bar أغلِق شريط البحث <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements نتائج آخر الإفادات المنفّذة This field shows the results and status codes of the last executed statements. يعرض هذا الحقل نتائج ورموز حالة آخر الإفادات المنفّذة. Export to &CSV &صدّر بنسق CSV Save as &view احفظ كمن&ظور Save as view احفظ كمنظور Please specify the view name من فضلك حدّد اسم المنظور There is already an object with that name. Please choose a different name. هناك كائن بنفس الاسم. من فضلك اختر اسمًا آخر. View successfully created. نجح إنشاء المنظور. Error creating view: %1 خطأ أثناء إنشاء المنظور: %L1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. (X) ‫تُعيد الدالة abs(X) القيمة المُطلقة للمعطى العددي X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. ‎() ‫تُعيد الدالة changes()‎ عدد الصفوف في قاعدة البيانات التي تغيّرت أو أُدرجت أو حُذفت باستخدام أحدث إفادة INSERT أو DELETE أو UPDATE أُجريت بنجاح. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1,X2,...) ‫تُعيد الدالة char(X1,X2,...,XN) سلسلة نصّية مؤلّفة من محارفَ قيمُ نقاط رموزها اليونيكودية هي الأعداد الصحيحة بدءًا من X1 وحتّى XN بالترتيب. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y,...) ‫تُعيد الدالة coalesce()‎ نسخة من أوّل معطًى ليس NUL، أو NULL إن كانت كلّ المعطيات تساوي NULL. (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) ‫الدالة glob(X,Y) تعادل التعبير ”Y GLOB X“. (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) تُعيد الدالة‫ ifnull()‎ نسخة من أوّل معطًى ليس NUL، أو NULL إن كان كِلا المعطيين يساويان NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X,Y) ‫تبحث الدالة instr(X,Y) عن أوّل حدوث للسلسلة النصّية Y داخل السلسلة النصّية X وتُعيد عدد المحارف قبلها زائدًا ١، أو تُعيد القيمة صِفر إن لم توجد Y في أيّ مكان في X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) ‫تفسّر الدالة hex()‎ المطى على أنّه BLOB وتُعيد سلسلة نصّية تمثّل عرضًا ستّ‌عشري بحالة أحرف كبيرة لمحتوى كائن BLOB ذاك. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. ‎() ‫تُعيد الدالة last_insert_rowid()‎ معرّف الصّف/ROWID لآخر عمليّة إدراج صفّ من اتّصال قاعدة البيانات والتي نفّذت الدالة. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X) ‫باعتبار X سلسلة نصّية، تُعيد الدالة length(X) عدد المحارف (وليس البايتات) داخل X والموجودة قبل أوّل محرف NUL فيها. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y) تُستخدم الدالة‫ like()‎ لتنفيذ التعبير ”Y LIKE X“. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X,Y,Z) تُستخدم الدالة‫ like()‎ لتنفيذ التعبير ”Y LIKE X ESCAPE Z“. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. (X) ‫تُحمّل الدالة load_extension(X) امتدادات SQLite من ملف مكتبة مشتركة اسمه X. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. (X,Y) ‫تُحمّل الدالة load_extension(X) امتدادات SQLite من ملف مكتبة مشتركة اسمه X باستخدام نقطة الإدخال Y. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X) ‫تُحمّل الدالة load_extension(X) امتدادات SQLite من ملف مكتبة مشتركة اسمه X. يجب السماح باستخدام هذه الدالة من التفضيلات. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X,Y) ‫تُحمّل الدالة load_extension(X) امتدادات SQLite من ملف مكتبة مشتركة اسمه X باستخدام نقطة الإدخال Y. يجب السماح باستخدام هذه الدالة من التفضيلات. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) ‫تُعيد الدالة lower(X) نسخة من السلسلة النصّية X حيث محارف آسكي كلّها محوّلة إلى حالة الأحرف الصغيرة. (X) ltrim(X) removes spaces from the left side of X. (X) ‫تُزيل ltrim(X) المسافات من الجانب الأيسر للسلسلة النصّية X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y) ‫تُعيد الدالة ltrim(X,Y) سلسلة نصّية بإزالة كلّ المحارف التي قد تظهر في Y من الجانب الأيسر للسلسلة X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) ‫تُعيد الدالة متعدّدة المعطيات max()‎ المعطى الذي له أكبر قيمة، أو NULL إن كان أحد المعطيات هو NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) ‫تُعيد الدالة متعدّدة المعطيات min()‎ المعطى الذي له أصغر قيمة. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (X,Y) ‫تُعيد الدالة nullif(X,Y) أوّل معطًى إن كانت المعطيات مختلفة، وتُعيد NULL إن كانت المعطيات متطابقة. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (FORMAT,...) ‫تعمل دالة SQL هذه printf(FORMAT,...) تمامًا مثل دالة لغة سي sqlite3_mprintf()‎ ودالة printf()‎ من مكتبة سي القياسية. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. (X) ‫تُعيد الدالة quote(X) نص SQL حرفيّ تكون قيمة معامله مناسبة لتوضع في عبارة SQL. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. ‎() ‫تُعيد الدالة random()‎ عددًا صحيحًا عشوائيًا زائفًا بين -٩٢٢٣٣٧٢٠٣٦٨٥٤٧٧٥٨٠٨ و +٩٢٢٣٣٧٢٠٣٦٨٥٤٧٧٥٨٠٧. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (N) ‫تُعيد الدالة randomblob(N) كائن BLOB بحجم N بايت يحتوي على بايتات عشوائية زائفة. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X,Y,Z) ‫تُعيد الدالة replace(X,Y,Z) سلسلة نصّية باستبدال كلّ ظهور للسلسة النصّية Y في السلسلة النصّية X بالسلسلة النصّية Z. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X) تُعيد الدالة‫ round(X) قيمة X عشرية عائمة مُقرّبة إلى خانات الصِفر يمين الفاصلة العشرية. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X,Y) تُعيد الدالة‫ round(X,Y) قيمة X عشرية عائمة مُقرّبة إلى خانات Y يمين الفاصلة العشرية. (X) rtrim(X) removes spaces from the right side of X. (X) ‫تُزيل rtrim(X) المسافات من الجانب الأيمن للسلسلة النصّية X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X,Y) ‫تُعيد الدالة rtrim(X,Y) سلسلة نصّية بإزالة كلّ المحارف التي قد تظهر في Y من الجانب الأيمن للسلسلة X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X) ‫تُعيد الدالة soundex(X) سلسلة نصّية بترميز Soundex من السلسلة النصّية X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y) ‫تُعيد substr(X,Y) كلّ المحارف حتّى نهاية السلسلة النصّية X بدايةً من المحرف رقم Y. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. (X,Y,Z) ‫تُعيد الدالة substr(X,Y,Z) سلسلة نصّية جزئيّة من السلسلة الدخل X والتي تبدأ بالمحرف رقم Y وبطول Z من المحارف. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. ‎() ‫تُعيد الدالة total_changes()‎ عدد الصفوف المتأثّرة بإفادة INSERT أو UPDATE أو DELETE مذ فُتح اتّصال قاعدة البيانات الحالية. (X) trim(X) removes spaces from both ends of X. (X) ‫تُزيل trim(X) المسافات من جانبي للسلسلة النصّية X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X,Y) ‫تُعيد الدالة trim(X,Y) سلسلة نصّية بإزالة كلّ المحارف التي قد تظهر في Y من كِلا جانبي X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) ‫تُعيد الدالة typeof(X) سلسلة نصّية توضّح نوع بيانات التعبير X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) ‫تُعيد دالة unicode(X) النقطة الرمزية اليونيكودية العددية لأوّل محرف من السلسلة النصّية X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (X) ‫تُعيد الدالة upper(X) نسخة من السلسلة النصّية الدخل X حيث محارف آسكي بحالة الأحرف الكبيرة محوّلة كلّها إلى حالة الأحرف الكبيرة. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (N) ‫تُعيد الدالة zeroblob(N) كائن BLOB يحتوي N بايت بالمحتوى 0x00. (timestring,modifier,modifier,...) (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) تُعيد الدالة‫ avg()‎ القيمة المتوسّطة لكلّ X لا تساوي NULL داخل مجموعة ما. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) ‫تُعيد الدالة count(X) عدد المرات التي لا يكون فيها X يساوي NULL في مجموعة ما. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X) ‫تُعيد الدالة group_concat()‎ سلسلة نصّية تجمع كلّ قيم X التي لا تساوي NULL. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X,Y) ‫تُعيد الدالة group_concat()‎ سلسلة نصّية تجمع كلّ قيم X التي لا تساوي NULL. إن كان المعطى Y موجودًا، فسيُستخدم كفاصل بين سيرورات X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) ‫تُعيد الدالة الجامعة max()‎ أكبر قيمة لكلّ القيم في المجموعة. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) ‫تُعيد الدالة الجامعة min()‎ أدنى قيمة لا تساوي NULL لكلّ القيم في المجموعة. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) ‫تُعيد الدالتان الجامعتان sum()‎ و total()‎ مجموع كل القيم التي لا تساوي NULL في المجموعة. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. ‎() ‫رقم الصفّ داخل القسم الحالي. تُرقّم الصفوف بدءًا من ١ بالترتيب الذي حدّده بند ORDER BY في تعريف النافذة، أو بترتيب اعتباطي إن لم يكن كذلك.‏ () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. ‎() ‫ناتج row_number()‎ لأوّل فرد في كلّ مجموعة - رتبة الصفّ الحالي مع الفراغات. إن لم يكن هناك بند ORDER BY، فستُعتبر كلّ الصفوف أفراد وستُعيد هذه الدالة ١ دومًا. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. ‎() ‫رقم مجموعة الأفراد للصفّ الحالي داخل القسم - رتبة الصفّ الحالي مع الفراغات. تُرقّم الأقسام بدءًا من 1 الترتيب الذي حدّده بند ORDER BY في تعريف النافذة. إن لم يوجد بند ORDER BY، فستُعتبر كلّ الصفوف أفراد وستُعيد هذه الدالة ١ دومًا. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. ‎() ب‫غضّ النظر عن الاسم، تُعيد هذه الدالة دومًا قيمة بين ٠٫٠ و١٫٠ مساويةً لِ‍ (الرتبة - ١)/(صفوف القسم - ١)، حيث ”الرتبة“ هي القيمة التي تُعيدها دالة النافذة المضمّنة rank()‎ و”صفوف القسم“ هو إجمال عدد الصفوف في القسم. إن احتوى القسم صفًا واحدًا فحسب، فستُعيد هذه الدالة ٠٫٠. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. ‎() التوزيع التصاعدي. يُحسب بالمعادلة رقم الصف/صفوف القسم، حيث ”رقم الصف“ هي القيمة التي أرجعتها‫ row_number()‎ لآخر فرد في المجموعة، و”صفوف القسم“ هي عدد الصفوف في القسم. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (N) ‫يُتعامل مع المعطى N على أنّه عدد صحيح. تقسم هذه الدالة القسم إلى N مجموعة إلى حد الإمكان من المساواة، وتُسند عددًا صحيحًا بين 1 وN لكل مجموعة، بالترتيب الذي حدّده بند ORDER BY، أو بترتيب اعتباطي إن كان عكس ذلك. إن كان ضروريا، فستحدث المجموعات الأكبر أولا. تُعيد هذه الدالة قيمة العدد الصحيح المُسنحدة إلى المجموعة التي هي جزء من الصف الحالي. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr) ‫تُعيد ناتج حساب التعبير expr على الصفّ السابق في القسم. أو NULL إن لم يكن هناك صفّ سابق (لأنّ الصف الحالي هو الأوّل). (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. SqliteTableModel References %1(%2) Hold Ctrl+Shift and click to jump there المراجع %L1‏(%L2) أبقِ الضغط على Ctrl+Shift وانقر للانتقال إلى هناك reading rows يقرأ الصفوف loading... يحمّل... References %1(%2) Hold %3Shift and click to jump there التفضيلات %L1‏(%L2) اضغط %L3Shift وانقر للانتقال إلى هناك Error changing data: %1 خطأ أثناء تغيير البيانات: %L1 retrieving list of columns يجلب قائمة الأعمدة Fetching data... يجلب البيانات... Cancel ألغِ VacuumDialog Compact Database رصّ قاعدة البيانات Warning: Compacting the database will commit all of your changes. تحذير: برصّ قاعدة البيانات ستُودع كلّ التعديلات التي أجريتها. Please select the databases to co&mpact: من فضلك اختر قواعد البيانات لر&صّها: Warning: Compacting the database will commit all changes you made. تحذير: برصّ قاعدة البيانات أنت تُودع كلّ التعديلات التي أجريتها. Please select the objects to compact: من فضلك اختر الكائنات لرصّها: sqlitebrowser-3.11.2/src/translations/sqlb_cs.ts000066400000000000000000010355101345112435200220160ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite O DB Browser pro SQLite Version Verze <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser pro SQLite je open source, freeware a vizualizační nástroj užívaný k tvorbě, návrhu a úpravě SQLite souborů databáze.</p><p>Je multilicencován pod Mozilla Public License Version 2, jakož i GNU General Public License Version 3 nebo pozdější. Můžete jej upravovat nebo redistribuovat podle podmínek těchto licencí.</p><p>Viz <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> a <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> pro více informací.</p><p>Pro získání více informací o tomto programu prosím navštivte naše webové stránky na: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">Tento software užívá GPL/LGPL Qt Toolkit od </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Viz </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> pro licenční podmínky a informace.</span></p><p><span style=" font-size:small;">Také využívá Silk icon set od Marka Jamese licencovaný pod licencí Creative Commons Attribution 2.5 a 3.0.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> pro více informací.</span></p></body></html> (based on SQLite %1) Version Verze Built for Qt Version verze Qt SQLCipher Version verze SQLCipher SQLite Version verze SQLite AddRecordDialog Add New Record Enter values for the new record considering constraints. Fields in bold are mandatory. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. Name Název Type Typ Value Values to insert. Pre-filled default values are inserted automatically unless they are changed. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> Auto-increment Unique constraint Check constraint: %1 Foreign key: %1 Default value: %1 Error adding record. Message from database engine: %1 Are you sure you want to restore all the entered values to their defaults? Application Usage: %1 [options] [db] Použití: %1 [volby] [db] Possible command line arguments: Možné parametry pro příkazový řádek: -h, --help Show command line options -h, --help Zobrazit volby příkazové řádky -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [file] Vykonat tento SQL soubor po otevření DB -t, --table [table] Browse this table after opening the DB -t, --table [table] Prohlížet tuto tabulku po otevření DB This is DB Browser for SQLite version %1. -q, --quit Exit application after running scripts -q, --quit Po vykonání skriptů ukončit aplikaci -R, --read-only Open database in read-only mode -o, --option [group/setting=value] Run application with this setting temporarily set to value -v, --version Display the current version -v, --version Zobrazit aktuální verzi [file] Open this SQLite database [file] Otevřít tuto SQLite databázi The -s/--sql option requires an argument Volba -s/--sql vyžaduje parametry The file %1 does not exist Soubor %1 neexistuje The -t/--table option requires an argument Volba -t/--table vyžaduje parametry The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 Neplatná volba/neexistující soubor: %1 CipherDialog SQLCipher encryption šifrování SQLCipher &Password &Heslo &Reenter password &Zadejte heslo znovu Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze Velikost strany &KDF iterations HMAC algorithm KDF algorithm Passphrase Raw key Page &size Velikost strany Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. ColumnDisplayFormatDialog Choose display format Vyberte formát zobrazení Display format Formát zobrazení Choose a display format for the column '%1' which is applied to each value prior to showing it. Vyberte formát zobrazení pro sloupec '%1' který je použit na každou hodnotu před zobrazením. Default Výchozí Decimal number Desetinné číslo Exponent notation Notace exponentu Hex blob Šestnáctkový blob Hex number Šestnáctkové číslo Apple NSDate to date Apple NSDate na datum Java epoch (milliseconds) to date Julian day to date Juliánský den na datum Unix epoch to local time Date as dd/mm/yyyy Datum jako dd/mm/yyyy Lower case Malá písmena Octal number Osmičkové číslo Round number Zaokrouhlit číslo Unix epoch to date Unix epoch na datum Upper case Velká písmena Windows DATE to date Windows DATE na datum Custom Vlastní DBBrowserDB Please specify the database name under which you want to access the attached database Prosím specifikujte jméno databáze, pod kterým chcete přistupovat k připojené databázi Invalid file format Neplatný formát souboru Do you want to save the changes made to the database file %1? Chcete uložit změny provedené do databázového souboru %1? Exporting database to SQL file... Exportuji databázi do souboru SQL... Cancel Zrušit Executing SQL... Provádím SQL... Action cancelled. Akce zrušena. Error in statement #%1: %2. Aborting execution. Chyba v příkazu #%1: %2. Ruším provedení. renameColumn: cannot find table %1. renameColumn: nemohu nalézt tabulku %1. This database has already been attached. Its schema name is '%1'. Do you really want to close this temporary database? All data will be lost. The database is currently busy: Databáze je právě zaneprázdněná: Do you want to abort that other operation? No database file opened Error in statement #%1: %2. Aborting execution%3. and rolling back didn't receive any output from %1 could not execute command: %1 Cannot delete this object Nemohu smazat tento objekt Cannot set data on this object A table with the name '%1' already exists in schema '%2'. renameColumn: cannot find column %1. renameColumn: nemohu nalézt sloupec %1. renameColumn: creating savepoint failed. DB says: %1 renameColumn: vytváření bodu obnovy selhalo. DB říká: %1 renameColumn: creating new table failed. DB says: %1 renameColumn: vytváření nové tabulky selhalo. DB říká: %1 renameColumn: copying data to new table failed. DB says: %1 renameColumn: kopírování dat do nové tabulky selhalo. DB říká: %1 renameColumn: deleting old table failed. DB says: %1 renameColumn: smazání staré tabulky selhalo. DB říká: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: renameColumn: releasing savepoint failed. DB says: %1 renameColumn: uvolňování bodu obnovy selhalo. DB říká: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Chyba při přejmenování tabulky '%1' to '%2'.Zpráva z databáze: %3 ... <string can not be logged, contains binary data> ... ... <string nemůže být zaznamenán, obsahuje binární data> ... could not get list of databases: %1 Error loading extension: %1 Chyba při načítání přípony: %1 could not get column information unknown object type %1 neznámý typ objektu %1 could not get list of db objects: %1, %2 nemohu získat seznam objektů db: %1, %2 could not get types nemohu získat typy didn't receive any output from pragma %1 could not execute pragma command: %1, %2 nemohu provést příkaz pragma: %1, %2 Error setting pragma %1 to %2: %3 Chyba při nastavování pragma %1 na %2: %3 File not found. Soubor nebyl nalezen. DbStructureModel Name Název Object Objekt Type Typ Schema Schéma Browsables (%1) Možné prohlížet (%1) Database Databáze Browsables All Všechny Temporary Dočasný Tables (%1) Tabulky (%1) Indices (%1) Indexy (%1) Views (%1) Pohledy (%1) Triggers (%1) Triggery (%1) EditDialog Edit database cell Upravit buňku databáze Mode: Mód: Image Obrázek Import text Importovat text Opens a file dialog used to import text to this database cell. Otevře dialog pro následný import textu do této databázové buňky. &Import &Import Export text Exportovat text Opens a file dialog used to export the contents of this database cell to a text file. Otevře dialog pro následný export obsahu databázové buňky do textového souboru. &Export &Export Set this cell to NULL Nastavit buňku na hodnotu NULL Set as &NULL Nastavit na &NULL This button saves the changes performed in the cell editor to the database cell. Apply Provést Text Text This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Binary Binární JSON XML XML Automatically adjust the editor mode to the loaded data type This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Auto-switch Auto-format: pretty print on loading, compact on saving. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Autoformat Import from file Importovat ze souboru Opens a file dialog used to import any kind of data to this database cell. Export to file Exportovat do souboru Opens a file dialog used to export the contents of this database cell to a file. Erases the contents of the cell Vymazat obsah buňky This area displays information about the data present in this database cell Tato oblast zobrazuje informace o aktuálních datech v této databázové buňce This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Type of data currently in cell Současný typ dat v buňce Size of data currently in table Současná velikost dat v tabulce Apply data to cell [Ctrl+Return] Print... Tisk... Open preview dialog for printing displayed image Ctrl+P Ctrl+P Open preview dialog for printing displayed text Copy Hex and ASCII Copy selected hexadecimal and ASCII columns to the clipboard Ctrl+Shift+C Ctrl+Shift+C Choose a file Vybrat soubor Text files(*.txt);;Image files(%1);;All files(*) Textové soubory(*.txt);;Soubory s obrázky(%1);;Všechny soubory(*) Choose a filename to export data Vyberte název souboru pro export dat Text files(*.txt);;All files(*) Textové soubory(*.txt);;Všechny soubory(*) Image data can't be viewed with the text editor Obrazová data nelze zobrazit pomocí textového editoru Binary data can't be viewed with the text editor Binární data nemohou být prohlížena v textovém editoru Type of data currently in cell: %1 Image Aktuální typ dat v buňce: %1 Obrázek %1x%2 pixel(s) %1x%2 pixel/ů Type of data currently in cell: NULL Aktuální typ dat v buňce: NULL Type of data currently in cell: Text / Numeric Aktuální typ dat v buňce: Text / Číselný Image data can't be viewed in this mode. Try switching to Image or Binary mode. Binary data can't be viewed in this mode. Try switching to Binary mode. Zkuste přepnout do binárního režimu. Text files (*.txt) Textové soubory (*.txt) JSON files (*.json) Soubory JSON (*.json) XML files (*.xml) Soubory XML (*.xml) Image files (%1) Soubory obrázků (%1) Binary files (*.bin) Binární soubory (*.bin) All files (*) Všechny soubory (*) Choose a file to import Vyberte soubor pro import %1 Image %1 Obrázek SVG files (*.svg) Soubory SVG (*.svg) Hex dump files (*.txt) Invalid data for this mode Neplatná data pro tento režim The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? %n char(s) %n znak %n znaků Type of data currently in cell: Valid JSON Type of data currently in cell: Binary Aktuální typ dat v buňce: Binární %n byte(s) %n byte %n bytů EditIndexDialog Create New Index Vytvořit Nový Index &Name Název &Columns Sloupce Column Sloupec Order Řadit &Table Tabulka Edit Index Schema Upravit schéma indexů &Unique Unikátní For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Partial inde&x clause Colu&mns Sloupce Table column Sloupec tabulky Type Typ Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Index column Index sloupce Deleting the old index failed: %1 Creating the index failed: %1 Vytváření indexu se nezdařilo: %1 EditTableDialog Edit table definition Upravit definici tabulky Table Tabulka Advanced Pokročilé Database schema Schéma databáze Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Without Rowid Bez id řádku Fields Pole Add field Přidat pole Remove field Odstranit pole Move field up Posunout pole nahoru Move field down Posunout pole dolů Name Název Type Typ NN NN Not null Není null PK PK Primary key Primární klíč AI AI Autoincrement Autoincrement U U Unique Unikátní Default Výchozí Default value Výchozí hodnota Check Zkontrolovat Check constraint Zkontrolovat omezení Foreign Key Cizí klíč <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result it in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Upozornění: </span>Není něco v pořádku s definicí tabulky, jelikož ji náš parser plně neporozumněl. Úprava a uložení tabulky může vést k problémům.</p></body></html> Error creating table. Message from database engine: %1 Chyba při vytváření tabulky. Zpráva z databáze: %1 There already is a field with that name. Please rename it first or choose a different name for this field. Pole s tímto názvem již existuje. Nejdříve jej přejmenujte, nebo vyberte pro toto pole jiný název, prosím. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. Tento sloupec je použit jako cizí klíč v tabulce %1 a jeho název nemůže být změněn. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. Existuje alespoň jeden řádek, který je nastaven na NULL. Z tohoto důvodu je nemožné nastavit tento flag. Nejprve změňte data v tabulce, prosím. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Existuje alespoň jeden řádek, který neobsahuje hodnotu typu integer. Z tohoto důvodu je nemožné nastavit AI flag. Nejprve změňte data v tabulce, prosím. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Column '%1' has no unique data. Sloupec '%1' neobsahuje unikátní data. This makes it impossible to set this flag. Please change the table data first. Není možné nastavit tento flag. Nejdříve změňte data v tabulce, prosím. Modifying this column failed. Error returned from database: %1 Úprava sloupce selhala. Chyba z databáze: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Setting the rowid column for the table failed. Error message: %1 V tabulce selhalo nastavování rowid sloupce. Chybová zpráva: %1 Changing the table schema failed. Error message: %1 ExportDataDialog Export data as CSV Exportovat data do CSV Tab&le(s) Tabulka/ky Colu&mn names in first line Názvy sloupců v prvním řádku Fie&ld separator Oddělovač pole , , ; ; Tab Karta | | Other Ostatní &Quote character &Uvozovka " " ' ' New line characters Znaky nového řádku Windows: CR+LF (\r\n) Windows: CR+LF (\r\n) Unix: LF (\n) Unix: LF (\n) Pretty print Pretty print Could not open output file: %1 Nemohu otevřít výstupní soubor: %1 Choose a filename to export data Vyberte název souboru pro export dat Text files(*.csv *.txt) Textové soubory(*.csv *.txt) Export data as JSON Exportovat data jako JSON exporting CSV exportování CSV exporting JSON exportování JSONu Text files(*.json *.js *.txt) Textové soubory(*.json *.js *.txt) Please select at least 1 table. Vyberte alespoň jednu tabulku, prosím. Choose a directory Vybrat složku Export completed. Export byl dokončen. ExportSqlDialog Export SQL... Exportovat SQL... Tab&le(s) Tabulka/ky Select All Vybrat vše Deselect All Zrušit výběr &Options Volby Keep column names in INSERT INTO Zachovat názvy sloupců v INSERT INTO Multiple rows (VALUES) per INSERT statement Více řádků (VALUES) pro příkaz INSERT Export everything Exportovat vše Export data only Exportovat pouze data Keep old schema (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Přepsat staré schéma (DROP TABLE, then CREATE TABLE) Export schema only Exportovat pouze schéma Please select at least 1 table. Vyberte alespoň jednu tabulku, prosím. Please select at least one table. Vyberte prosím aspoň jednu tabulku. Choose a filename to export Vyberte název souboru pro export Text files(*.sql *.txt) Textové soubory(*.sql *.txt) Export completed. Export dokončen. Export cancelled or failed. Export byl zrušen nebo selhal. ExtendedScintilla Ctrl+H Ctrl+H Ctrl+P Ctrl+P Find and Replace... Najít a nahradit... Print... Tisk... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? Obsah schránky je větší, než je rozsah výběru. Chcete jej přesto vložit? Use as Exact Filter Containing Not equal to Greater than Větší než Less than Menší než Greater or equal Větší nebo rovno Less or equal Menší nebo rovno Between this and... Mezi tímto a... Set to NULL Nastavit na NULL Copy Kopírovat Copy with Headers Kopírovat s hlavičkami Copy as SQL Kopírovat jako SQL Paste Vložit Print... Tisk... Use in Filter Expression Alt+Del Alt+Del Ctrl+Shift+C Ctrl+Shift+C Ctrl+Alt+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Databázové soubory SQLite (*.db *.sqlite *.sqlite3 *.db3);;Všechny soubory (*) FileExtensionManager File Extension Manager &Up Nahoru &Down Dolů &Add Přidat &Remove Odstranit Description Popis Extensions Rozšíření *.extension *.extension FilterLineEdit Filter Filtr These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Set Filter Expression What's This? Co je toto? Is NULL je NULL Is not NULL Není NULL Is empty Je prázdný Is not empty Není prázdný Equal to... Rovný k... Not equal to... Není rovný k... Greater than... Větší než... Less than... Menší než... Greater or equal... Větší nebo rovno... Less or equal... Menší nebo rovno... In range... V rozmezí... FindReplaceDialog Find and Replace Najít a nahradit Fi&nd text: Najít text Re&place with: Nahradit s: Match &exact case Match &only whole words When enabled, the search continues from the other end when it reaches one end of the page &Wrap around When set, the search goes backwards from cursor position, otherwise it goes forward Search &backwards <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Use regular e&xpressions Find the next occurrence from the cursor position and in the direction set by "Search backwards" &Find Next Najít další &Replace Nahradit Highlight all the occurrences of the text in the page F&ind All Najít vše Replace all the occurrences of the text in the page Replace &All Nahradit vše The searched text was not found Hledaný text nebyl nalezen The searched text was not found. Hledaný text nebyl nalezen. The searched text was found one time. Hledaný text byl nalezen jednou. The searched text was found %1 times. Hledaný text byl nalezen %1 krát. The searched text was replaced one time. Hledaný text byl nahrazen jednou. The searched text was replaced %1 times. Hledaný text byl nahrazen %1 krát. ForeignKeyEditor &Reset Foreign key clauses (ON UPDATE, ON DELETE etc.) ImportCsvDialog Import CSV file Importovat soubor CSV &Table name &Název tabulky Table na&me Název tabulky &Column names in first line &Názvy sloupců v prvním řádku Field &separator Oddělovač pole , , ; ; Tab Karta | | Other Ostatní &Quote character &Uvozovka " " ' ' &Encoding Kódování UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? Ořezat pole? Separate tables Oddělit tabulky Advanced Pokročilé When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Ignore default &values Ignorovat výchozí hodnoty Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Fail on missing values Disable data type detection Disable the automatic data type detection when creating a new table. Deselect All Zrušit celý výběr Match Similar Select All Vybrat vše Inserting data... Vkládám data... Cancel Zrušit There is already a table of that name and an import into an existing table is only possible if the number of columns match. Tabulka s tímto názvem již existuje. Import do existující tabulky je možný jen v případě stejného počtu sloupců. There is already a table of that name. Do you want to import the data into it? Tabulka s tímto názvem již existuje. Chcete data importovat do ní? Import completed Import dokončen There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. There is already a table named '%1'. Do you want to import the data into it? Creating restore point failed: %1 Vytváření bodu obnovy selhalo: %1 Creating the table failed: %1 Vytváření tabulky selhalo: %1 importing CSV importování CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Missing field for record %1 Chybí pole pro záznam %1 Inserting row failed: %1 Vkládání řádku selhalo: %1 MainWindow DB Browser for SQLite DB Browser pro SQLite toolBar1 toolBar1 Select a table to browse data Vyberte tabulku pro prohlížení dat Use this list to select a table to be displayed in the database view Pro zobrazení v databázovém pohledu použijte pro výběr tabulky tento seznam Refresh the data in the selected table. Obnovit data ve vybrané tabulce. This button refreshes the data in the currently selected table. Toto tlačítko obnoví data v aktuálně vybrané tabulce. SQLCipher &FAQ... SQLCipher FAQ... Opens the SQLCipher FAQ in a browser window Otevře SQLCipher FAQ v okně prohlížeče Table(s) to JSON... Tabulka/y do JSONu... Export one or more table(s) to a JSON file Export jedné nebo více tabulek do souboru JSON Open from Remote Otevřít ze vzdálena Save to Remote Uložit do vzdálena Refresh Obnovit F5 F5 Clear all filters Vymazat všechny filtry &Table: &Tabulka: Insert a new record in the current table Vložit nový záznam do současné tabulky This button creates a new, empty record in the database Toto tlačítko vytvoří nový, prázdný záznam v databázi New Record Nový záznam Delete the current record Smazat aktuální záznam This button deletes the record currently selected in the database Toto tlačítko smaže právě vybraný záznam v databázi Delete Record Smazat záznam This is the database view. You can double-click any record to edit its contents in the cell editor window. Toto je pohled databáze. Můžete udělat double-click na jakýkoliv záznam pro jeho editaci obsahu v editoru buněk <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Posune na úplný začátek</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Kliknutím na toto tlačítko se přesunete na začátek pohledu tabulky výše.</p></body></html> |< |< Scroll 100 records upwards Posunout o 100 záznamů nahoru <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>Kliknutím na toto tlačítko se přesunete o 100 záznamů nahoru v pohledu tabulky výše.</p></body></html> < < 0 - 0 of 0 0 - 0 z 0 <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>Posunout o 100 záznamů dolů</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>Kliknutím na toto tlačítko se přesunete o 100 záznamů dolů v pohledu tabulky nahoře</p></body></html> > > Scroll to the end Posunout na konec <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>Kliknutím zde přeskočíte na určený záznam</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>Toto tlačítko je určeno k navigaci k záznamu, jehož číslo je nastaveno v poli Jít na.</p></body></html> Go to: Jít na: Enter record number to browse Vložte číslo záznamu pro jeho procházení Type a record number in this area and click the Go to: button to display the record in the database view Napiště číslo záznamu do tohoto pole a klikněte na Jít na: tlačítko k zobrazení záznamu v pohledu databáze 1 1 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> None Žádná Full Plná Incremental Inkrementální <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatické Indexy</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Cizí klíče</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Plný FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignorovat Kontrolu Omezení</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Žurnálování</span></a></p></body></html> Delete Smazat Truncate Osekat Persist Zachovat Memory Paměť WAL WAL Off Vypnout <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Maximální velikost žurnálu</span></a></p></body></html> Normal Normální Exclusive Exkluzivní <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronní</span></a></p></body></html> Default Výchozí File Soubor <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">Verze Uživatele</span></a></p></body></html> &File &Soubor &Import &Import &Export &Export Open an existing database file in read only mode Unlock view editing This unlocks the current view for editing. However, you will need appropriate triggers for editing. Remote Vzdálený &Edit Upravit &View Pohled &Help Pomoc DB Toolbar Panel nástrojů DB Edit Database &Cell Upravit databázovou buňku DB Sche&ma DB Schéma Execute SQL Proveďte SQL &Load extension Načíst rozšíření Execute current line Provést aktuální řádek This button executes the SQL statement present in the current editor line Shift+F5 Shift+F5 Sa&ve Project Ulo&žit Projekt Open &Project Otevřít projekt &Set Encryption Nastavit šifrování Edit display format Upravit formát zobrazení Edit the display format of the data in this column Upravit formát zobrazení dat v tomto sloupci Show rowid column Zobrazit rowid sloupce Toggle the visibility of the rowid column Přepnout viditelnost rowid sloupců Set encoding Nastavit kódování Change the encoding of the text in the table cells Změnit kódování textu v buňkách tabulky Set encoding for all tables Nastavit kódování pro všechny tabulky Change the default encoding assumed for all tables in the database User Uživatel Database Structure Databázová Struktura Browse Data Prohlížet data Refresh the data in the selected table [F5, Ctrl+R] Print currently browsed table data [Ctrl+P] Edit Pragmas Editovat Pragma Application Aplikace &Clear &Vyčistit Columns Sloupce X X Y Y _ _ Line type: Typ řádku: Line Řádek StepLeft KrokVlevo StepRight KrokVpravo StepCenter KrokDoprostřed Impulse Impuls Cross Kříž Plus Plus Circle Kruh Disc Disk Square Čtverec Diamond Diamand Star Hvězda Triangle Trojúhelník TriangleInverted ObrácenýTrojúhelník PlusSquare PlusČtverec &New Database... Nová databáze... Create a new database file Vytvořit nový databázový soubor This option is used to create a new database file. Tato volba slouží k vytvoření nového souboru databáze. Ctrl+N Ctrl+N &Open Database... Otevřít databázi... Open an existing database file Otevřít existující soubor databáze This option is used to open an existing database file. Tato volba slouží k otevření existujícího souboru databáze. Ctrl+O Ctrl+O &Close Database &Zavřít databázi This button closes the connection to the currently open database file Ctrl+W Ctrl+W Revert database to last saved state Vrátit databázi do posledního uloženého stavu This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Write changes to the database file Zapsat změny do souboru databáze This option is used to save changes to the database file. Tato volba slouží k uložení provedených změn do souboru databáze. Ctrl+S Ctrl+S Compact &Database... Compact the database file, removing space wasted by deleted records Compact the database file, removing space wasted by deleted records. E&xit Exit Ctrl+Q Ctrl+Q Import data from an .sql dump text file into a new or existing database. Importovat data z textového souboru .sql do nové nebo již existující databáze. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Open a wizard that lets you import data from a comma separated text file into a database table. Otevře průzkumníka, kde můžete importovat data z textového souboru, kde jsou data oddělena čárkami, do databázové tabulky. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Export a database to a .sql dump text file. Exportovat databázi do textového souboru .sql This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Export a database table as a comma separated text file. Exportovat databázovou tabulku jako textový soubor oddělený čárkami. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Delete Table Smazat Tabulku Open the Delete Table wizard, where you can select a database table to be dropped. Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Open the Create Index wizard, where it is possible to define a new index on an existing database table. &Preferences... &Možnosti... Open the preferences window. Otevřít okno s možnostmi. &DB Toolbar Panel nástrojů DB Shows or hides the Database toolbar. Zobrazí nebo skryje lištu Databáze. Shift+F1 Shift+F1 Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] Execute current line [Shift+F5] &Wiki Wiki Bug &Report... Nahlásit chybu... Feature Re&quest... Požadavek na funkci... Web&site Webová stránka &Donate on Patreon... Přispět na Patreon... Sa&ve Project... Uložit projekt... This button lets you open a DB4S project file &Attach Database... Přiložit databázi... Add another database file to the current database connection This button lets you add another database file to the current database connection &Set Encryption... Nastavit šifrování... SQLCipher &FAQ SQLCipher FAQ Table(&s) to JSON... Tabulka(ky) do JSONu... Open Data&base Read Only... Save results Uložit výsledky Save the results view This button lets you save the results of the last executed query Find text in SQL editor Najít text v SQL editoru Find text in SQL editor [Ctrl+F] This button opens the search bar of the editor Ctrl+F Ctrl+F Find or replace text in SQL editor Najít a nahradit text v SQL editoru Find or replace text in SQL editor [Ctrl+H] This button opens the find/replace dialog for the current editor tab Export to &CSV Export do CSV Save as &view Uložit jako pohled Save as view Uložit jako pohled Hide column(s) Skrýt sloupec(ce) Hide selected column(s) Skrýt vybraný sloupec(ce) Show all columns Zobrazit všechny sloupce Show all columns that were hidden Shows or hides the Project toolbar. Zobrazit nebo skrýt lištu projektu Extra DB Toolbar Extra DB Toolbar Export the filtered data to CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Save the current filter, sort column and display formats as a view This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Insert Values... Vložit hodnoty... Open a dialog for inserting values in a new record Insert new record using default values in browsed table New In-&Memory Database Drag && Drop Qualified Names Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Drag && Drop Enquoted Names Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor &Integrity Check Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. &Foreign-Key Check Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab &Quick Integrity Check Run a quick integrity check over the open DB Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. &Optimize Attempt to optimize the database Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Print Tisk Print text from current SQL editor tab [Ctrl+P] Print the structure of the opened database [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Open a dialog for printing the structure of the opened database &About... O... &Recently opened &Nedávno otevřené Open &tab Otevřít kartu Ctrl+T Ctrl+T This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. This button clears all the filters set in the header input fields for the currently browsed table. Save the table as currently displayed <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> ... ... Print currently browsed table data Tisk právě prohlížených dat tabulky Print currently browsed table data. Print selection if more than one cell is selected. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> This button deletes the record or records currently selected in the table This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Scroll one page upwards <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> Scroll one page downwards <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. &Tools Nástroje SQL &Log SQL &Log Show S&QL submitted by This button clears the contents of the SQL logs This panel lets you examine a log of all SQL commands issued by the application or by yourself &Plot This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. &Remote Vzdálené Project Toolbar Extra DB toolbar Extra DB toolbar Close the current database file &Revert Changes Vrátit Změny &Write Changes Zapsat Změny &Database from SQL file... Databáze z SQL souboru... &Table from CSV file... Tabulka ze souboru CSV... &Database to SQL file... Databáze do souboru SQL... &Table(s) as CSV file... Tabulka/ky jako soubor CSV... &Create Table... Vytvořit Tabulku... &Delete Table... Smazat Tabulku... &Modify Table... Upravit Tabulku... Create &Index... Vytvořit Index... W&hat's This? Co je toto? &About O This button opens a new tab for the SQL editor &Execute SQL &Provést příkaz SQL Execute all/selected SQL Provést všechny/vybrané SQL This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. Open SQL file Otevřít SQL soubor This button opens a file containing SQL statements and loads it in a new editor tab Save SQL file Uložit SQL soubor &Load Extension... Načíst rozšíření... Ctrl+E Ctrl+E Export as CSV file Exportovat jako soubor CSV Export table as comma separated values file Exportovat tabulku do souboru jako hodnoty oddělené čárkami &Wiki... &Wiki... Bug &report... Nahlášení &chyby... Web&site... Webová&stránka... Save the current session to a file Uložit aktuální session do souboru This button lets you save all the settings associated to the open DB to a DB4S project file Open &Project... Otevřít projekt... Load a working session from a file &Attach Database &Přiložit databázi Save SQL file as Uložit soubor SQL jako This button saves the content of the current SQL editor tab to a file &Browse Table &Prohlížet Tabulku Copy Create statement Kopírovat příkaz Create Copy the CREATE statement of the item to the clipboard Zkopírovat do schránky příkaz CREATE Ctrl+Return Ctrl+Return Ctrl+L Ctrl+L Ctrl+P Ctrl+P Ctrl+D Ctrl+D Ctrl+I Ctrl+I Encrypted Šifrováno Read only Pouze pro čtení Database file is read only. Editing the database is disabled. Soubor databáze je určen pouze pro čtení. Úprava databáze je zakázána. Database encoding Kódování databáze Database is encrypted using SQLCipher Databáze je šifrována přes SQLCipher Choose a database file Vyberte soubor databáze Invalid file format. Nesprávný formát souboru. Choose a filename to save under Vyberte název souboru pro uložení Error adding record: Chyba při přidávání záznamu: Error deleting record: %1 Chyba při mazání záznamu: %1 Please select a record first Prosím vyberte záznam jako první %1 - %2 of %3 %1 - %2 z %3 There is no database opened. Please open or create a new database file. Žádná databáze není otevřena. Otevřete nebo vytvořte nový soubor databáze, prosím. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. Jste si jisti, že chcete smazat %1 '%2'? Všechna přidružená data se %1 budou ztracena. Error: could not delete the %1. Message from database engine: %2 Chyba: nemohu smazat %1. Zpráva z databáze: %2 There is no database opened. Žádná databáze není otevřena. Error executing query: %1 Chyba při vykonávání příkazu: %1 %1 rows returned in %2ms from: %3 %1 řádků vráceno za %2ms z: %3 , %1 rows affected , %1 řádků bylo ovlivněno Query executed successfully: %1 (took %2ms%3) Příkaz byl proveden úspěšně: %1 (za dobu %2ms%3) Choose a text file Vyberte textový soubor Text files(*.csv *.txt);;All files(*) Textové soubory(*.csv *.txt);;Všechny soubory(*) Import completed Import dokončen Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Are you sure you want to undo all changes made to the database file '%1' since the last save? Jste si jisti, že chcete vrátit zpět všechny provedené změny v databázi '%1' od posledního uložení? Choose a file to import Vyberte soubor pro import Text files(*.sql *.txt);;All files(*) Textové soubory(*.sql *.txt);;Všechny soubory(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. File %1 already exists. Please choose a different name. Soubor %1 již existuje. Vyberte jiný název, prosím. Error importing data: %1 Chyba při importu dat: %1 Import completed. Import dokončen. Delete View Smazat Pohled Modify View Delete Trigger Smazat Spoušť Modify Trigger Delete Index Smazat Index Modify Index Změnit Index Modify Table Změnit tabulku &%1 %2 &%1 %2 Extensions(*.so *.dylib *.dll);;All files(*) Choose a project file to open Vybrat soubor projektu k otevření This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Duplicate records Duplicate record Ctrl+" Ctrl+ Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Setting PRAGMA values will commit your current transaction. Are you sure? Could not open database file. Reason: %1 In-Memory database determining row count... %1 - %2 of >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Are you sure you want to delete the view '%1'? Are you sure you want to delete the trigger '%1'? Are you sure you want to delete the index '%1'? Error: could not delete the table. Error: could not delete the view. Error: could not delete the trigger. Error: could not delete the index. Message from database engine: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? -- EXECUTING SELECTION IN '%1' -- -- EXECUTING LINE IN '%1' -- -- EXECUTING ALL IN '%1' -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Execution aborted by user executing query %1 rows returned in %2ms query executed successfully. Took %1ms%2 Choose text files Vybrat textové soubory Import completed. Some foreign key constraints are violated. Please fix them before saving. Select SQL file to open Vyberte soubor SQL k otevření Couldn't read file: %1. Couldn't save file: %1. Select file name Vyberte název souboru Select extension file Vyberte soubor s rozšířením Extensions(*.so *.dll);;All files(*) Přípony(*.so *.dll);;Všechny soubory(*) Extension successfully loaded. Rozšíření bylo úspěšně načteno. Error loading extension: %1 Chyba při načítání přípony: %1 Don't show again Znovu nezobrazovat New version available. Dostupná nová verze. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Nová verze DB Browseru pro SQLite je nyní dostupná (%1.%2.%3).<br/><br/>Stáhněte ji prosím na <a href='%4'>%4</a>. Collation needed! Proceed? Je potřeba provést collation! Potvrdit? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! creating collation Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Please specify the view name Specifikujte název pohledu, prosím There is already an object with that name. Please choose a different name. Objekt s tímto názvem již existuje. Vyberte jiný název, prosím. View successfully created. Pohled byl úspěšně vytvořen. Error creating view: %1 Chyba při vytváření pohledu: %1 There is no filter set for this table. View will not be created. Delete Records This action will open a new SQL tab for running: Press Help for opening the corresponding SQLite reference page. Row # Řádek # Choose a axis color Vyberte barvu osy PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Všechny Soubory(*) Please enter the URL of the database file to open. Zadejte URL k databázového souboru pro jeho otevření, prosím. Please enter the URL of the database file to save. Zadejte URL k databázového souboru pro jeho uložení, prosím. Choose a file to open Vyberte soubor k otevření DB Browser for SQLite project file (*.sqbpro) DB Browser pro SQLite project file (*.sqbpro) Please choose a new encoding for this table. Vyberte nové kódování pro tuto tabulku, prosím. Please choose a new encoding for all tables. Vyberte nové kódování pro všechny tabulky, prosím. Error checking foreign keys after table modification. The changes will be reverted. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. At line %1: Result: %2 %1 Leave the field empty for using the database encoding. %1 Pro použití kódování databáze ponechte pole prázdné. This encoding is either not valid or not supported. Toto kódování není buď platné, nebo podporováno. Fetching all data... Načítám všechna data... Cancel Zrušit NullLineEdit Set to NULL Nastavit na NULL Alt+Del Alt+Del PlotDock Plot <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> Columns Sloupce X X Y Y _ _ Axis Type Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Line type: Typ řádku: None Žádná Line Řádek StepLeft KrokVlevo StepRight KrokVpravo StepCenter KrokDoprostřed Impulse Impuls Point shape: Cross Kříž Plus Plus Circle Kruh Disc Disk Square Čtverec Diamond Diamand Star Hvězda Triangle Trojúhelník TriangleInverted ObrácenýTrojúhelník CrossSquare PlusSquare PlusČtverec CrossCircle PlusCircle Peace <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> Save current plot... Load all data and redraw plot Row # Řádek # Choose a axis color Vyberte barvu osy Copy Kopírovat Print... Tisk... Show legend Zobrazit legendu Stacked bars Date/Time Datum/čas Date Datum Time Čas Numeric Label Štítek Invalid Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Choose an axis color Vyberte barvu osy Choose a filename to save under Vyberte název souboru pro uložení PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Všechny Soubory(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. Fetching all data... Načítám všechna data... Cancel Zrušit PreferencesDialog Preferences Možnosti &General &Obecné Remember last location Zapamatovat poslední umístění Always use this location Vždy použít toto umístění Remember last location for session only Pamatovat poslední umístění pouze po dobu trvání session ... ... Default &location Výchozí &umístění Lan&guage Jazyk Automatic &updates Automatické &aktualizace enabled povoleno Show remote options Zobrazit vzdálené možnosti &Database &Databáze Database &encoding Kódování &databáze Open databases with foreign keys enabled. Otevře databázi s povolenými cizími klíči. &Foreign keys &Cizí klíče SQ&L to execute after opening database SQ&L k vykonání po otevření databáze Data &Browser Prohlížeč Dat NULL fields pole s NULL &Text Text Remove line breaks in schema &view Prefetch block si&ze Advanced Pokročilé Default field type Výchozí typ pole Font Font &Font &Font Font si&ze: Velikost fontu Content Obsah Symbol limit in cell Maximální počet znaků v buňce Field colors Barvy pole NULL NULL Regular Regulární Text Text Binary Binární Background Pozadí Filters Filtry Escape character Delay time (&ms) Zpoždění (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. &SQL &SQL Settings name Název možností Context Kontext Colour Barva Bold Tučný Italic Kurzíva Underline Podtržený Keyword Klíčové slovo function funkce Function Funkce Table Tabulka Comment Komentář Identifier Identifikátor String String currentline aktuální řádek Current line Aktuální řádek SQL &editor font size velikost fontu SQL &editoru SQL &log font size Velikost fontu SQL &logu Tab size SQL editor &font &font SQL editoru Error indicators Hori&zontal tiling If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Code co&mpletion Toolbar style Only display the icon Only display the text The text appears beside the icon The text appears under the icon Follow the style DB file extensions Manage When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Font si&ze Velikost písma This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Row count threshold for completion Field display Displayed &text Text color Barva textu Background color Barva pozadí Preview only (N/A) Foreground Popředí SQL &results font size &Wrap lines Never Nikdy At word boundaries At character boundaries At whitespace boundaries &Quotes for identifiers Choose the quoting mechanism used by the application for identifiers in SQL code. "Double quotes" - Standard SQL (recommended) `Grave accents` - Traditional MySQL quotes [Square brackets] - Traditional MS SQL Server quotes Keywords in &UPPER CASE When set, the SQL keywords are completed in UPPER CASE letters. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background &Extensions &Rozšíření Select extensions to load for every database: Vyberte rozšíření k načtení pro každou databázi: Add extension Přidat rozšíření Remove extension Odebrat rozšíření <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> Disable Regular Expression extension Zakázat rozšíření pro regulární výrazy <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Remote Vzdálený CA certificates certifikáty CA Subject CN předmět CN Common Name Subject O předmět O Organization Organizace Valid from Platné od Valid to Platné do Serial number Sériové číslo Your certificates Vaše certifikáty File Soubor Subject Common Name Issuer CN Issuer Common Name Clone databases into Choose a directory Vyberte složku The language will change after you restart the application. Jazyk bude změněn po restartu aplikace. Select extension file Vybrat soubor rozšíření Extensions(*.so *.dll);;All files(*) Přípony(*.so *.dll);;Všechny soubory(*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file Importovat soubor certifikátu No certificates found in this file. V tomto souboru nebyly nalezeny žádné certifikáty. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Opravdu chcete smazat tento certifikát? Všechny data certifikátu budou smazány z nastavení aplikace! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. QObject Error importing data Chyba při importu dat from record number %1 ze záznamu číslo %1 . %1 . %1 Importing CSV file... Decoding CSV file... Dekóduji soubor CSV... Cancel Zrušit Collation needed! Proceed? Je potřeba provést collation! Potvrdit? SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Databázové soubory SQLite (*.db *.sqlite *.sqlite3 *.db3);;Všechny soubory (*) All files (*) Všechny soubory (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error opening remote database file from %1. %2 Chyba při otevírání vzdálené databáze ze souboru %1. %2 Error when connecting to %1. %2 Chyba při připojování k %1. %2 Error opening remote file at %1. %2 Error: Invalid client certificate specified. Please enter the passphrase for this client certificate in order to authenticate. Cancel Zrušit Uploading remote database to %1 Nahrávám vzdálenou databázi do %1. {1?} Downloading remote database from %1 Stahuji vzdálenou databázi z %1. {1?} The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. Uploading remote database to %1. Nahrávám vzdálenou databázi do %1. Downloading remote database from %1. Stahuji vzdálenou databázi z %1. Error: The network is not accessible. Chyba: síť není dostupná. Error: Cannot open the file for sending. Chyba: Nemohu otevřít soubor k odeslání. Error opening local databases list. %1 Error creating local databases list. %1 RemoteDock Remote Vzdálený Identity Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Go Push currently opened database to server <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> RemoteModel Name Název Commit Last modified Poslední změněné Size Velikost bytes bytů RemotePushDialog Push database Database na&me to push to Commit message <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Public Veřejný Branch Větev Force push Database will be public. Everyone has read access to it. Database will be private. Only you have access to it. Use with care. This can cause remote commits to be deleted. Unspecified Nespecifikovaný SqlExecutionArea Form Formulář Find previous match [Shift+F3] Find previous match with mapping Shift+F3 Shift+F3 The found pattern must be a whole word Whole Words Celá slova Text pattern to find considering the checks in this frame Find in editor Najít v editoru The found pattern must match in letter case Case Sensitive Find next match [Enter, F3] Find next match with wrapping F3 F3 Interpret search pattern as a regular expression <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Regular Expression Regulární výraz Close Find Bar Zavřít lištu pro hledání <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements Výsledky naposledy provedených příkazů This field shows the results and status codes of the last executed statements. Export to &CSV Export do CSV Save as &view Uložit jako pohled Save as view Uložit jako pohled Please specify the view name Specifikujte název pohledu, prosím There is already an object with that name. Please choose a different name. Objekt s tímto názvem již existuje. Vyberte jiný název, prosím. View successfully created. Pohled byl úspěšně vytvořen. Error creating view: %1 Chyba při vytváření pohledu: %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) ltrim(X) removes spaces from the left side of X. (X) ltrim(X) odstraní mezery z levé strany X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) Funkce s více parametry min() vrací parametr s minimální hodnotou. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (X,Y) Funkce nullif(X,Y) vrací první parametr, pokud jsou parametry odlišné. NULL vrací, pokud jsou parametry stejné. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. () Funkce random() vrací pseudo-náhodný integer v rozmezí -9223372036854775808 a +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X) rtrim(X) removes spaces from the right side of X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. (X) trim(X) removes spaces from both ends of X. (X) trim(X) odstraní mezery z obou stran X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) Agregační funkce max() vrací maximální hodnotu ze všech hodnot ve skupině. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) Agregační funkce min() vrací minimální hodnotu ze všech hodnot ve skupině, která není NULL. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) Agregační funkce sum() a total() vrací součet všech hodnot ve skupině, které nejsou NULL. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. SqliteTableModel reading rows čtení sloupců loading... načítání... References %1(%2) Hold %3Shift and click to jump there Error changing data: %1 Chyba při změně dat: %1 retrieving list of columns Fetching data... Načítám data... Cancel Zrušit VacuumDialog Compact Database Compact Database Warning: Compacting the database will commit all of your changes. Varování: Procesem 'compact the database' budou aplikovány všechny vaše provedené změny. Please select the databases to co&mpact: Prosím vyberte databázi pro proces 'compact': sqlitebrowser-3.11.2/src/translations/sqlb_de.ts000066400000000000000000012366021345112435200220060ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite Über DB-Browser für SQLite Version Version <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB-Browser für SQLite ist ein grafisches, freies Open-Source-Tool zum Erstellen, Entwerfen und Bearbeiten von SQLite-Datenbankdateien.</p><p>Es steht unter zwei Lizenzen zur Verfügung: der Mozilla Public License Version 2 und der GNU General Public License Version 3 oder aktueller. Sie können das Programm unter den Bedingungen dieser Lizenzen verändern und weiterverteilen.</p><p>Siehe <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> und <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> für Details.</p><p>Für mehr Informationen über dieses Programm besuchen Sie bitte unsere Website: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">Diese Software verwendet das GPL/LGPL QT Toolkit von </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Siehe </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> für Lizenzbedingungen und -informationen.</span></p><p><span style=" font-size:small;">Sie verwendet ebenso das Silk-Iconset von Mark James, welches unter einer Creative Commons Attribution 2.5 und 3.0 Lizenz verfügbar ist.<br/>Siehe </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> für Details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB-Browser für SQLite ist ein grafisches, freies Open Source Tool zum Erstellen, Bearbeiten und Ändern von SQLite-Datenbankdateien.</p><p>Es steht unter zwei Lizenzen, der Mozilla Public License Version 2 und der GNU General Public License Version 3 oder aktueller. Sie können das Programm unter den Bedingungen dieser Lizenzen ändern und weitergeben.</p><p>Siehe <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> und <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> für Details.</p><p>Für mehr Informationen über dieses Programm besuchen Sie unsere Website unter: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">Diese Anwendung verwendet das GPL/LGPL Qt Toolkit von </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Siehe </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> für Lizenzinformationenund weitere Informationen.</span></p><p><span style=" font-size:small;">Sie verwendet außerdem das Silk Iconset von Mark James, das unter einer Creative Commons Attribution 2.5 und 3.0 Lizenz steht.<br/>Siehe </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> für Details.</span></p></body></html> Qt Version Qt-Version SQLite Version SQLite-Version <html><head/><body><p>SQLite Database Browser is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>SQLite Database Browser ist ein grafisches, freies Open Source Tool zum Erstellen, Bearbeiten und Ändern von SQLite-Datenbankdateien.</p><p>Es steht unter zwei Lizenzen, der Mozilla Public License Version 2 und der GNU General Public License Version 3 oder aktueller. Sie können das Programm unter den Bedingungen dieser Lizenzen ändern und weitergeben.</p><p>Siehe <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> und <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> für Details.</p><p>Für mehr Informationen über dieses Programm besuchen Sie unsere Website unter: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">Diese Anwendung verwendet das GPL/LGPL Qt Toolkit von </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Siehe </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> für Lizenzinformationenund weitere Informationen.</span></p><p><span style=" font-size:small;">Sie verwendet außerdem das Silk iconset von Mark James, das unter einer Creative Commons Attribution 2.5 und 3.0 Lizenz steht.<br/>Siehe </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> für Details.</span></p></body></html> (based on SQLite %1) (basierend auf SQLite %1) Version Version Built for Erstellt für Qt Version Qt-Version SQLCipher Version SQLCipher-Version SQLite Version SQLite-Version AddRecordDialog Add New Record Neue Zeile hinzufügen Enter values for the new record considering constraints. Fields in bold are mandatory. Geben Sie Werte für die neue Zeile unter Beachtung der Constraints ein. Fette Felder sind Pflichtfelder. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. In der Wertspalte können Sie den Wert für das durch die Namensspalte identifizierte Feld angeben. Die Typspalte zeigt den Feldtyp an. Standardwerte werden im Stil von NULL-Werten angezeigt. Name Name Type Typ Value Wert Values to insert. Pre-filled default values are inserted automatically unless they are changed. Einzufügende Werte. Vorausgefüllte Standardwerte werden automatisch eingefügt, insofern sie nicht geändert wurden. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. Wenn Sie die Werte im oberen Teil ändern, wird hier das SQL-Query für das Einfügen der neuen Zeile angezeigt. Sie können das Query vor dem Speichern manuell bearbeiten. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">Speichern</span> wird das dargestellte SQL-Statement zum Einfügen des neuen Eintrags an die Datenbank übermitteln.</p><p><span style=" font-weight:600;">Voreinstellungen</span> wird die ursprünglichen Werte der <span style=" font-weight:600;">Wert</span>-Spalte wiederherstellen.</p><p><span style=" font-weight:600;">Abbrechen</span> schließt diesen Dialog, ohne die Query auszuführen.</p></body></html> Auto-increment Auto-Inkrement Unique constraint Unique-Constraint Check constraint: %1 Prüfungsconstraint: %1 Foreign key: %1 Fremdschlüssel: %1 Default value: %1 Standardwert: %1 Error adding record. Message from database engine: %1 Fehler beim Hinzufügen der Zeile. Mitteilung der Datenbank-Engine: %1 Are you sure you want to restore all the entered values to their defaults? Sind Sie sicher, dass Sie alle eingegebenen Werte auf deren Standardwerte zurücksetzen möchten? Application Usage: %1 [options] [db] Verwendung: %1 [Optionen] [db] Possible command line arguments: Mögliche Kommandozeilen-Argumente: -h, --help Show command line options -h, --help Kommandozeilen-Optionen anzeigen -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [Datei] Führe diese SQL-Datei nach dem Öffnen der DB aus -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [Datei] Führe nach dem Öffnen der Datenbank diese SQL-Datei aus -t, --table [table] Browse this table after opening the DB -t, --table [Tabelle] Navigiere nach dem Öffnen der Datenbank durch diese Tabelle -q, --quit Exit application after running scripts -q, --quit Beende die Anwendung nach Ausführung der Skripte -R, --read-only Open database in read-only mode -R, --read-only: Datenbank im rein lesenden Modus öffnen -o, --option [group/setting=value] Run application with this setting temporarily set to value -o, --option [Gruppe/Einstellung=Wert] Anwendung mit dem temporär gesetzten Wert für diese Einstellung ausführen -v, --version Display the current version -v, --version Die aktuelle Version anzeigen [file] Open this SQLite database [Datei] Diese SQLite-Datenbank öffnen This is DB Browser for SQLite version %1. Dies ist DB-Browser für SQLite Version %1. This is DB Browser for SQLite version %1%2. Dies ist DB Browser für SQLite Version %1%2. The -s/--sql option requires an argument Die -s/--sql Option benötigt ein Argument The file %1 does not exist Die Datei %1 existiert nicht The -t/--table option requires an argument Die -t/--table Option benötigt ein Argument The -o/--option option requires an argument in the form group/setting=value Die Option -o/--option benötigt ein Argument in der Form Gruppe/Einstellung=Wert Invalid option/non-existant file: %1 Ungültige Option/nicht existente Datei: %1 CipherDialog SQLCipher encryption SQLCipher-Verschlüsselung &Password &Passwort &Reenter password Wiede&rhole Passwort Encr&yption settings &Verschlüsselung SQLCipher &3 defaults SQLCipher &3 Standard SQLCipher &4 defaults SQLCiper &4 Standard Custo&m Eige&ne Page si&ze Seiten&größe &KDF iterations &KDF-Iterationen HMAC algorithm HMAC-Algorithmus KDF algorithm KDF-Algorithmus Passphrase Passphrase Raw key Originalschlüssel Page &size &Seitengröße Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Setzen Sie bitte einen Schlüssel zum Verschlüsseln der Datenbank. Beachten Sie, dass bei Änderung der optionalen Einstellungen diese bei jedem Öffnen der Datenbank-Datei eingegeben werden müssen. Lassen Sie die Passwortfelder leer, um die Verschlüsselung zu deaktivieren. Der Verschlüsselungsprozess benötigt unter Umständen ein bisschen Zeit und Sie sollten ein Backup-Kopie Ihrer Datenbank haben! Ungespeicherte Änderungen werden vor der Änderung der Verschlüsselung übernommen. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. Geben Sie bitte den zur Verschlüsselung der Datenbank genutzten Schlüssel ein. Falls weitere Einstellungen für diese Datenbank-Datei vorgenommen worden sind, müssen Sie diese Informationen zusätzlich angeben. ColumnDisplayFormatDialog Choose display format Anzeigeformat auswählen Display format Anzeigeformat Choose a display format for the column '%1' which is applied to each value prior to showing it. Wählen Sie ein Anzeigeformat für die Spalte '%1', welches bei der Anzeige eines jeden Wertes angewendet wird. Default Voreinstellung Decimal number Dezimalzahl Exponent notation Exponentnotation Hex blob Hex-Blob Hex number Hexwert Apple NSDate to date Apple NSDate zu Datum Java epoch (milliseconds) to date Java-Epoche (Millisekunden) zu Datum Julian day to date Julianischer Tag zu Datum Unix epoch to local time Unix-Epoche zu lokaler Zeit Date as dd/mm/yyyy Datum als dd/mm/yyyy Lower case Kleinschreibung Octal number Oktalwert Round number Gerundeter Wert Unix epoch to date Unix-Epoche zu Datum Upper case Großschreibung Windows DATE to date Windows DATUM zu Datum Custom Benutzerdefiniert DBBrowserDB Please specify the database name under which you want to access the attached database Geben Sie bitte einen Datenbanknamen an, mit dem Sie auf die anhängte Datenbank zugreifen möchten Invalid file format Ungültiges Dateiformat Do you want to save the changes made to the database file %1? Sollen die getätigten Änderungen an der Datenbank-Datei %1 gespeichert werden? Exporting database to SQL file... Datenbank in SQL-Datei exportieren... Cancel Abbrechen Executing SQL... SQL ausführen... Action cancelled. Vorgang abgebrochen. Error in statement #%1: %2. Aborting execution. Fehler im Statement #%1: %2. Ausführung wird abgebrochen. renameColumn: cannot find table %1. Spalte umbenennen: Tabelle %1 nicht gefunden. This database has already been attached. Its schema name is '%1'. Diese Datenbank wurde bereits angehängt. Ihr Schemaname ist '%1'. Do you really want to close this temporary database? All data will be lost. Möchten Sie diese temporäre Datenbank wirklich schließen? Alle Daten gehen damit verloren. The database is currently busy: Die Datenbank ist zur Zeit beschäfigt: Do you want to abort that other operation? Möchten Sie die andere Operation abbrechen? No database file opened Keine Datenbankdatei geöffnet Error in statement #%1: %2. Aborting execution%3. Fehler im Statement #%1: %2. Ausführung wird abgebrochen %3. and rolling back und der Zustand zurückgesetzt didn't receive any output from %1 %1 hat nichts ausgegeben could not execute command: %1 Befehl konnte nicht ausgeführt werden: %1 Cannot delete this object Dieses Objekt kann nicht gelöscht werden Cannot set data on this object Daten können für dieses Objekt nicht gesetzt werden A table with the name '%1' already exists in schema '%2'. Es existiert eine Tabelle mit dem Namen '%1' im Schema '%2'. renameColumn: cannot find column %1. Spalte umbennen: Spalte %1 nicht gefunden. renameColumn: creating savepoint failed. DB says: %1 Spalte umbenennen: Anlegen von Speicherpunkt fehlgeschlagen. DB meldet: %1 renameColumn: creating new table failed. DB says: %1 Spalte umbenennen: Erstellen neuer Tabelle fehlgeschlagen. DB meldet: %1 renameColumn: copying data to new table failed. DB says: %1 Spalte umbenennen: Kopieren der Daten in neue Tabelle fehlgeschlagen. DB meldet: %1 renameColumn: deleting old table failed. DB says: %1 Spalte umbenennen: Löschen der alten Tabelle fehlgeschlagen. DB meldet: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: Wiederherstellung einiger mit dieser Tabelle verbundener Objekte fehlgeschagen. Dies passiert häufig durch geänderte Spaltennamen. SQL-Statement zum manuellen Reparieren und Ausführen: renameColumn: releasing savepoint failed. DB says: %1 Spalte umbenennen: Freigeben des Speicherpunktes fehlgeschlagen. DB meldet: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Fehler beim Umbenennen der Tabelle '%1' zu '%2'. Meldung von Datenbank: %3 ... <string can not be logged, contains binary data> ... ... <String kann nicht geloggt werden, enthält binäre Daten> ... could not get list of databases: %1 konnte keine Datenbankliste abrufen: %1 Error loading extension: %1 Fehler beim Laden der Erweiterung: %1 could not get column information Spalteninformationen konnten nicht errmittelt werden unknown object type %1 unbekannter Objekttyp %1 could not get list of db objects: %1, %2 Liste mit DB-Ojekten konnte nicht bezogen werden: %1, %2 could not get types Typen konnten nicht bezogen werden didn't receive any output from pragma %1 keine Ausgabe erhalten von Pragma %1 could not execute pragma command: %1, %2 Pragma-Kommando konnte nicht ausgeführt werden: %1, %2 Error setting pragma %1 to %2: %3 Fehler beim Setzen des Pragmas %1 auf %2: %3 File not found. Datei nicht gefunden. DbStructureModel Name Name Object Objekt Type Typ Schema Schema Browsables (%1) Durchsuchbar (%1) Database Datenbank Browsables Durchsuchbar All Alle Temporary Temporär Tables (%1) Tabellen (%1) Indices (%1) Indizes (%1) Views (%1) Ansichten (%1) Triggers (%1) Trigger (%1) EditDialog Edit database cell Datenbank-Zelle bearbeiten Mode: Modus: This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Dies ist die Liste der unterstützten Modi des Zelleneditors. Wählen Sie einen Modus für die Anzeige oder Bearbeitung der Daten der aktuellen Zelle aus. Image Bild JSON JSON XML XML Automatically adjust the editor mode to the loaded data type Den Editormodus automatisch dem geladenen Datentyp anpassen This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Dieser Button aktiviert oder deaktiviert den automatischen Wechsel des Editormodus. Wenn eine neue Zelle ausgewählt wird oder neue Daten importiert werden und der automatische Wechsel aktiviert ist, passt sich der Modus dem erkannten Datentyp an. Sie können den Editormodus danach manuell ändern. Falls Sie dies bei der Bewegung durch die Zellen im manuell eingestellten Modus behalten möchten, deaktivieren Sie den Button. Auto-switch Auto-Wechsel Auto-format: pretty print on loading, compact on saving. Auto-Format: Druckoptimierung (Pretty Print) beim Laden, kompakt beim Speichern. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Falls aktiviert, formatiert die Auto-Format-Funktion die Daten beim Laden, bricht den Text in Zeilen und rückt ihn ein für maximale Lesbarkeit. Beim Speichern der Daten verdichtet die Auto-Format-Funktion die Daten durch das Entfernen der Zeilenumbrüche und unnötigen Leerzeichen. Autoformat Auto-Format Import from file Aus Datei importieren Opens a file dialog used to import any kind of data to this database cell. Öffnet einen Dateidialog, um jegliche Art von Daten in diese Datenbankzelle zu importieren. Export to file In Datei exportieren Opens a file dialog used to export the contents of this database cell to a file. Öffnet einen Dateidialog, um den Inhalt dieser Datenbankzelle in eine Datei zu exportieren. Print... Drucken... Open preview dialog for printing displayed image Vorschaudialog zum Drucken des angezeigten Bildes öffnen Ctrl+P Strg+P Open preview dialog for printing displayed text Vorschaudialog zum Drucken des angezeigten Textes öffnen Copy Hex and ASCII Hex und ASCII kopieren Copy selected hexadecimal and ASCII columns to the clipboard Ausgewählte hexadezimale und ASCII-Spalten in die Zwischenablage kopieren Ctrl+Shift+C Strg+Umschalt+C Import text Text importieren Opens a file dialog used to import text to this database cell. Öffnet einen Dateiauswahldialog, um Text in diese Datenbank-Zelle zu importieren. &Import &Importieren Export text Text exportieren Opens a file dialog used to export the contents of this database cell to a text file. Öffnet einen Dateiauswahldialog, um den Inhalt dieser Datenbank-Zelle in eine Textdatei zu exportieren. &Export &Exportieren Set this cell to NULL Diese Zelle auf NULL setzen Set as &NULL Auf &NULL setzen This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Dieser Editormodus erlaubt Ihnen das Bearbeiten von JSON- oder XML-Daten mit Syntaxhervorhebung, automatischer Formatierung und Validierung vor dem Speichern. Fehler werden durch eine rote Wellenlinie gekennzeichnet. Apply data to cell [Ctrl+Return] Daten auf Zelle anwenden [Strg+Return] This button saves the changes performed in the cell editor to the database cell. Dieser Button speichert die im Zelleneditor für die Datenbankzelle durchgeführten Änderungen. Apply Übernehmen Text Text Binary Binär Clear cell data Zelldaten löschen Erases the contents of the cell Löscht den Inhalt der Zelle &Clear &Leeren <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warning: Editing binary content in text mode may result in corrupted data!</span></p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warnung: Das Bearbeiten von Binärdaten im Textmodus produziert eventuell ungültige Daten!</span></p></body></html> This area displays information about the data present in this database cell Dieser Bereich stellt Informationen über die Daten in dieser Datenbank-Zelle dar Type of data currently in cell Art der Daten in dieser Zelle Size of data currently in table Größe der Daten in dieser Tabelle Choose a file Datei auswählen Text files(*.txt);;Image files(%1);;All files(*) Text-Dateien(*.txt);;Bild-Dateien(%1);;Alle Dateien(*) Choose a filename to export data Dateinamen für den Datenexport wählen Text files(*.txt);;All files(*) Text-Dateien(*.txt);;Alle Dateien(*) Image data can't be viewed with the text editor Bilddaten können nicht mit dem Texteditor angezeigt werden Binary data can't be viewed with the text editor Binärdaten können nicht mit dem Texteditor angezeigt werden Type of data currently in cell: %1 Image Art der Daten in der aktuellen Zelle: %1 Bild %1x%2 pixel(s) %1x%2 Pixel Type of data currently in cell: NULL Art der Daten in dieser Zelle: NULL Type of data currently in cell: Text / Numeric Art der Daten in dieser Zelle: Text / Numerisch Image data can't be viewed in this mode. In diesem Modus können keine Bilddaten angezeigt werden. Try switching to Image or Binary mode. Versuchen Sie, in den Bild- oder Binär-Modus zu wechseln. Binary data can't be viewed in this mode. Binärdaten können in diesem Modus nicht angezeigt werden. Try switching to Binary mode. Versuchen Sie, in den Binär-Modus zu wechseln. Text files (*.txt) Textdateien (*.txt) JSON files (*.json) JSON-Dateien (*.json) XML files (*.xml) XML-Dateien (*.xml) Image files (%1) Bilddateien (%1) Binary files (*.bin) Binärdateien (*.bin) All files (*) Alle Dateien (*) Choose a file to import Datei für Import auswählen %1 Image %1 Bild SVG files (*.svg) SVG-Dateien (*.svg) Hex dump files (*.txt) Hex-Dump-Dateien (*.txt) Invalid data for this mode Ungültige Daten für diesen Modus The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? Die Zelle enthält ungültige %1-Daten. Grund: %2. Möchten Sie diese wirklich auf die Zelle anwenden? %n char(s) %n Zeichen %n Zeichen Type of data currently in cell: Valid JSON Aktueller Datentyp in dieser Zelle: Gültiges JSON Type of data currently in cell: Image Art der Daten in dieser Zelle: Bild %1x%2 pixel %1x%2 Pixel Type of data currently in cell: Binary Art der Daten in dieser Zelle: Binär %n byte(s) %n Byte %n Bytes EditIndexDialog Create New Index Neuen Index erstellen &Name &Name &Columns character after ampersand changed &Spalten Column Spalte Use in Index Im Index verwenden Order Sortierung &Table &Tabelle Edit Index Schema Index-Schema bearbeiten &Unique Einde&utig For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Zum Einschränken des Index auf einen Teil der Tabelle kann hier eine WHERE-Klausel angegeben werden, die den Teil der Tabelle auswählt, der indexiert werden soll Partial inde&x clause Teilinde&x-Klausel Colu&mns &Spalten Table column Tabellenspalte Type Typ Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Fügt eine neue Ausdrucksspalte zum Index hinzu. Ausdrucksspalten enthalten SQL-Ausdrücke statt Spaltennamen. Index column Indexspalte Deleting the old index failed: %1 Löschen des alten Index fehlgeschlagen: %1 Creating the index failed: %1 Erstellen des Index fehlgeschlagen: %1 EditTableDialog Edit table definition Tabellen-Definition bearbeiten Table Tabelle Advanced Erweitert Database schema Datenbankschema Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Als 'WITHOUT rowid'-Tabelle markieren. Das Setzen dieses Flags erfordert ein Feld vom Typ INTEGER mit gesetzten Primärkey-Flag und nicht gesetztem Autoinkrement-Flag. Without Rowid Ohne Rowid Set this to create a temporary table that is deleted when closing the database. Dies erzeugt eine temporäre Tabelle, welche beim Schließen der Datenbank gelöscht wird. Temporary table Temporäre Tabelle Fields Felder Add field Feld hinzufügen Remove field Feld entfernen Move field up Ein Feld nach oben Move field down Ein Feld nach unten Name Name Type Typ NN NN Not null Nicht Null PK PK Primary key Primärschlüssel AI AI Autoincrement Autoinkrement U Unique Eindeutig Default Voreinstellung Default value Voreingestellter Wert Check Prüfen Check constraint Beschränkung prüfen Foreign Key Fremdschlüssel <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style="font-weight:600; color:#ff0000;">Warnung: </span>Diese Tabellendefinitionenthält Elemente, die unser Parser nicht vollständig versteht. Das Ändern und Speichern der Tabelle kann zu Problemen führen.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result it in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warnung: </span>Die Definition dieser Tabelle enthält Elemente, die unser Parser nicht vollständig versteht. Ändern und Speichern dieser Tabelle könnte zu Problemen führen.</p></body></html> Error creating table. Message from database engine: %1 Fehler beim Erstellen der Tabelle. Meldung der Datenbank: %1 There already is a field with that name. Please rename it first or choose a different name for this field. Es existiert bereits ein Feld mit diesem Namen. Bitte benennen Sie es zunächst um oder wählen Sie einen anderen Namen für dieses Feld. This column is referenced in a foreign key in table %1, column %2 and thus its name cannot be changed. Diese Spalte wird über einen Fremdschlüssel in Tabelle %1, Spalte %2 referenziert, sodass deren Name nicht geändert werden kann. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. Diese Spalte wird in einem Fremdschlüssel in Tabelle %1 referenziert und kann aus diesem Grund nicht geändert werden. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. Mindestens eine Reihe enthält ein Feld mit dem Wert NULL. Dies verhindert das Setzen dieser Markierung. Bitte zunächst die Tabellendaten ändern. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Mindestens eine Reihe enthält ein Feld mit einem nicht ganzzahligen Wert. Dies verhindert das Setzen der AI-Markierung. Bitte zunächst die Tabellendaten ändern. Column '%1' has no unique data. Spalte '%1' hat keine eindeutigen Daten. This makes it impossible to set this flag. Please change the table data first. Dies verhindert das Setzen dieses Flags. Bitte zunächst die Tabellendaten ändern. Column '%1' has duplicate data. Spalte '%1' enthält Daten-Duplikate. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Das macht es unmöglich, das 'Unique'-Flag zu setzen. Bitte entfernen Sie die Duplikate, um die Aktivierung des 'Unique'-Flag zu ermöglichen. Modifying this column failed. Error returned from database: %1 Ändern dieser Spalte fehlgeschlagen: Die Datenbank meldet diesen Fehler: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Soll das Feld '%1' wirklich gelöscht werden? Alle aktuell in diesem Feld gespeicherten Daten gehen verloren. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Bitte fügen Sie vor dem Setzen des "Without rowid"-Flags ein Feld hinzu, welches folgenden Kriterien entspricht: - Primärschlüssel-Flag gesetzt - Autoinkrement deaktiviert Setting the rowid column for the table failed. Error message: %1 Setzen der Zeilenid-Spalte dieser Tabelle fehlgeschlagen. Fehlermeldung: %1 Changing the table schema failed. Error message: %1 Die Änderung des Tabellenschemas ist fehlgeschlagen. Fehlermeldung: %1 Setting the temporary flag for the table failed. Error message: %1 Setzen des Temporär-Flags dieser Tabelle fehlgeschlagen. Fehlermeldung: %1 ExportDataDialog Export data as CSV Daten als CSV exportieren &Table &Tabelle &Table(s) &Tabelle(n) &Column names in first line &Spaltennamen in erster Zeile Field &separator Feld-&Separator Tab&le(s) Tabe&lle(n) Colu&mn names in first line &Spaltennamen in der ersten Zeile Fie&ld separator Fe&ld-Separator , , ; ; Tab Tab | | Other Anderer &Quote character &String-Zeichen " " ' ' New line characters Zeilenumbruchs-Zeichen Windows: CR+LF (\r\n) Windows: CR+LF (\r\n) Unix: LF (\n) Unix: LF (\n) Pretty print Pretty Print Could not open output file: %1 Ausgabedatei konnte nicht geöffnet werden: %1 Choose a filename to export data Dateinamen für den Datenexport wählen Text files(*.csv *.txt) Text-Dateien(*.csv *.txt) Export data as JSON Daten als JSON exportieren exporting CSV exportiere CSV exporting JSON exportiere JSON Text files(*.json *.js *.txt) Text-Dateien(*.json *.js *.txt) Please select at least 1 table. Bitte mindestens eine Tabelle auswählen. Choose a directory Verzeichnis wählen Export completed. Export abgeschlossen. Could not open output file. Ausgabedatei konnte nicht geöffnet werden. ExportSqlDialog Export SQL... SQL exportieren... Tab&le(s) Tabe&lle(n) Select All Alle auswählen Deselect All Alle abwählen &Options &Optionen Keep column names in INSERT INTO Spaltennamen in INSERT INTO belassen Multiple rows (VALUES) per INSERT statement Mehrere Reihen (VALUES) je INSERT-Statement Export everything Alles exportieren Export schema only Nur Schema exportieren Export data only Nur Daten exportieren Keep old schema (CREATE TABLE IF NOT EXISTS) Altes Schema behalten (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Altes Schema überschreiben (DROP TABLE, dann CREATE TABLE) Please select at least 1 table. Bitte mindestens eine Tabelle auswählen. Please select at least one table. Bitte wählen Sie mindestens eine Tabelle aus. Choose a filename to export Dateinamen zum Export auswählen Text files(*.sql *.txt) Textdateien(*.sql *.txt) Export completed. Export abgeschlossen. Export cancelled or failed. Export abgebrochen oder fehlgeschlagen. ExtendedScintilla Ctrl+H Strg+H Ctrl+P Strg+P Find and Replace... Suchen und ersetzen... Print... Drucken... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? Der Inhalt der Zwischenablage ist größer als der ausgewählte Bereich. Möchten Sie ihn dennoch einfügen? Use as Exact Filter Als exakten Filter verwenden Containing Enthält Not equal to Ungleich zu Greater than Größer als Less than Kleiner als Greater or equal Größer oder gleich Less or equal Kleiner oder gleich Between this and... Zwischen diesem und... Set to NULL Auf NULL setzen Copy Kopieren Copy with Headers Mit Headern kopieren Copy as SQL Als SQL kopieren Paste Einfügen Print... Drucken... Use in Filter Expression In Filterausdruck verwenden Alt+Del Alt+Entf Ctrl+Shift+C Strg+Umschalt+C Ctrl+Alt+C Strg+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? Der Inhalt der Zwischenablage ist größer als der ausgewählte Bereich. Soll er dennoch eingefügt werden? FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite Datenbankdateien (*.db *.sqlite *.sqlite3 *.db3);;Alle Dateien (*) FileExtensionManager File Extension Manager Dateierweiterungs-Manager &Up H&och &Down &Runter &Add &Hinzufügen &Remove &Entfernen Description Beschreibung Extensions Erweiterungen *.extension *.erweiterung FilterLineEdit Filter Filtern These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Diese Eingabefelder erlauben Ihnen das Anwenden von schnellen Filtern in der aktuell ausgewählten Tabelle. Standardmäßig werden Zeilen, die den Eingabetext beinhalten, herausgefiltert. Zudem werden die folgenden Operatoren unterstützt: % Wildcard > Größer als < Kleiner als >= Größer oder gleich <= Kleiner oder gleich = Gleich: exakte Übereinstimmung <> Ungleich:exakte inverse Übereinstimmung x~y Bereich: Werte zwischen x und y Set Filter Expression Filterausdruck setzen What's This? Was ist das? Is NULL Ist NULL Is not NULL Ist nicht NULL Is empty Ist leer Is not empty Ist nicht leer Equal to... Gleich zu... Not equal to... Ungleich zu... Greater than... Größer als... Less than... Kleiner als... Greater or equal... Größer oder gleich... Less or equal... Kleiner oder gleich... In range... Im Bereich... FilterTableHeader Filter Filtern FindReplaceDialog Find and Replace Suchen und Ersetzen Fi&nd text: Text fi&nden: Re&place with: Er&setzen mit: Match &exact case &Exakte Schreibung Match &only whole words Nur &ganze Wörter When enabled, the search continues from the other end when it reaches one end of the page Falls aktiviert, fährt die Suche am anderen Ende fort, wenn sie das Ende der Seite erreicht hat &Wrap around &Umbrechen When set, the search goes backwards from cursor position, otherwise it goes forward Falls gesetzt, erfolgt die Suche rückwärts von der Cursorposition, andernfalls erfolgt sie vorwärts Search &backwards Rück&wärts suchen <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>Falls aktiviert, wird das Suchmuster als regulärer Ausdruck (UNIX-Stil) interpretiert. Siehe <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks (englisch)</a>.</p></body></html> Use regular e&xpressions Reguläre A&usdrücke verwenden Find the next occurrence from the cursor position and in the direction set by "Search backwards" Das nächste Auftreten ausgehend von der Cursorpositoin und in der durch "Rückwärts suchen" gesetzten Richtung finden &Find Next Nächste &finden &Replace &Ersetzen Highlight all the occurrences of the text in the page Alle Auftreten des Textes auf der Seite hervorheben F&ind All Alle f&inden Replace all the occurrences of the text in the page Alle Auftreten des Textes auf der Seite ersetzen Replace &All &Alle ersetzen The searched text was not found Der gesuchte Text wurde nicht gefunden The searched text was not found. Der gesuchte Text wurde nicht gefunden. The searched text was found one time. Der gesuchte Text wurde einmal gefunden. The searched text was found %1 times. Der gesuchte Text wurde %1-mal gefunden. The searched text was replaced one time. Der gesuchte Text wurde einmal ersetzt. The searched text was replaced %1 times. Der gesuchte Text wurde %1-mal ersetzt. ForeignKeyEditor &Reset Zu&rücksetzen Foreign key clauses (ON UPDATE, ON DELETE etc.) Fremdschlüssel-Klauseln (ON UPDATE, ON DELETE etc.) (foreign key clauses(ON UPDATE, ON DELETE etc.) (Fremdschlüssel-Klauseln(ON UPDATE, ON DELETE etc.)) ImportCsvDialog Import CSV file CSV-Datei importieren &Table name &Tabellenname Table na&me Tabellenna&me &Column names in first line &Spaltennamen in erster Zeile Field &separator Feld-&Separator , , ; ; Tab Tab | | Other Anderer &Quote character &String-Zeichen " " ' ' &Encoding &Codierung UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? Felder trimmen? Separate tables Tabellen trennen Advanced Erweitert When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Beim Import eines leeren Wertes aus einer CSV-Datei in eine existierende Tabelle mit einem Standardwert für diese Spalte wird dieser Standardwert eingefügt. Aktivieren Sie diese Option, um stattdessen einen leeren Wert einzufügen. Ignore default &values Standard&werte ignorieren Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Aktivieren Sie diese Option, um den Import zu stoppen, falls ein leerer Wert in eine NOT-NULL-Spalte ohne Standardwert importiert werden soll. Fail on missing values Fehler bei fehlenden Werten Disable data type detection Datentyp-Erkennung deaktivieren Disable the automatic data type detection when creating a new table. Die automatische Datentyperkennung bei der Erstellung einer neuen Tabelle deaktivieren. Deselect All Alle abwählen Match Similar Ähnliche suchen Select All Alle auswählen Inserting data... Füge Daten ein... Cancel Abbrechen There is already a table of that name and an import into an existing table is only possible if the number of columns match. Es gibt bereits eine Tabelle mit diesem Namen. Ein Import in eine existierende Tabelle ist nur bei übereinstimmender Spaltenanzahl möglich. There is already a table of that name. Do you want to import the data into it? Es gibt bereits eine Tabelle mit diesem Namen. Sollen die Daten in diese importiert werden? Import completed Import vollständig There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. Es gibt bereits eine Tabelle namens '%1' und ein Import in eine existierende Tabelle ist nur bei übereinstimmender Spaltenanzahl möglich. There is already a table named '%1'. Do you want to import the data into it? Es gibt bereits eine Tabelle namens '%1'. Möchten Sie die Daten in diese importieren? Creating restore point failed: %1 Erstellung des Wiederherstellungspunktes fehlgeschlagen: %1 Creating the table failed: %1 Erstellung der Tabelle fehlgeschlagen: %1 importing CSV importierte CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Import der Datei '%1' benötigte %2ms. Davon wurden %3ms in der Zeilenfunktion verbracht. Missing field for record %1 Fehlendes Feld für Record %1 Inserting row failed: %1 Einfügen der Zeile fehlgeschlagen: %1 MainWindow SQLiteBrowser SQLiteBrowser Database &Structure Datenbank&struktur toolBar1 Toolbar1 &Browse Data &Daten durchsuchen Table: Tabelle: Select a table to browse data Anzuzeigende Tabelle auswählen Use this list to select a table to be displayed in the database view Mit dieser Liste können Sie die in der Tabllenansicht anzuzeigende Tabelle auswählen Refresh the data in the selected table. Aktualisiert die angezeigten Tabellendaten. This button refreshes the data in the currently selected table. Dieser Button aktualisiert die Daten der aktuellen Tabellenansicht. Scroll one page upwards Eine Seite nach oben scrollen <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html><head/><body><p>Ein Klick auf diesen Button navigiert in den Einträgen der Tabellenansicht oben eine Seite nach oben.</p></body></html> Scroll one page downwards Eine Seite nach unten scrollen <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>Ein Klick auf diesen Button navigiert in den Einträgen der Tabellenansicht oben eine Seite nach unten.</p></body></html> SQLCipher &FAQ... SQLCipher &FAQ... Opens the SQLCipher FAQ in a browser window Öffnt die SQLCiper FAQ in einem Browserfenster Table(s) to JSON... Tabelle(n) zu JSON... Export one or more table(s) to a JSON file Exportiert eine oder mehrere Tabelle(n) in eine JSON-Datei Save to Remote Entfernt speichern Refresh Aktualisieren F5 F5 Insert a new record in the current table Fügt eine neue Zeile zur aktuellen Tabelle hinzu This button creates a new, empty record in the database Dieser Button erzeugt eine neue, leere Zeile in der Tabelle New Record Neue Zeile Delete the current record Aktuelle Zeile löschen This button deletes the record currently selected in the database Dieser Button löscht die aktuell in der Tabellenansicht ausgewählte Zeile Delete Record Zeile löschen This is the database view. You can double-click any record to edit its contents in the cell editor window. Dies ist die Tabellenansicht. Mit einem Doppelklick auf eine Zeile können Sie ihren Inhalt in einem Editorfenster bearbeiten. < < 0 - 0 of 0 0 - 0 von 0 > > Scroll 100 records upwards 100 Zeilen nach oben scrollen DB Browser for SQLite DB Browser für SQLite This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Dies ist die Struktur der geöffneten Datenbank. Sie können SQL-Statements aus einer Objektzeile fassen und in anderen Anwendungen oder einer anderen 'DB-Browser für SQLite'-Instanz ablegen. &Table: &Tabelle: Refresh the data in the selected table [F5, Ctrl+R] Die Daten in der ausgewählten Tabelle aktualisieren [F5, Strg+R] Clear all filters Alle Filter löschen This button clears all the filters set in the header input fields for the currently browsed table. Dieser Button löscht alle gesetzten Filter in den Header-Eingabefeldern der aktuell angezeigten Tabelle. Save the table as currently displayed Tabelle wie aktuell angezeigt speichern <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> <html><head/><body><p>Dieses Popup-Menü bietet die folgenden Optionen zur Anwendung auf die aktuell ausgewählte und gefilterte Tabelle:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">CSV exportieren: diese Option exportiert die Daten der ausgewählten Tabelle wie aktuell angezeigt (gefiltert, Anzeigeformat und Spaltenreihenfolge) in eine CSV-Datei.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Als Ansicht speichern: diese Option speichert die aktuelle Einstellung der ausgewählten Tabelle (Filter, Anzeigeformat und Spaltenreihenfolge) als eine SQL-View, die Sie später durchsuchen oder in SQL-Statements verwenden können.</li></ul></body></html> ... ... Print currently browsed table data [Ctrl+P] Aktuell angezeigte Tabellendaten drucken [Strg+P] Print currently browsed table data. Print selection if more than one cell is selected. Die aktuell angezeigten Tabellendaten drucken. Druckauswahl, falls mehr als eine Zelle ausgewählt ist. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> <html><head/><body><p>Dieser Button erstellt eine neue Zeile in der Datenbank. Halten sie die Maustaste gedrückt, um ein Popup-Menü mit verschiedenen Optionen zu öffnen:</p><ul><li><span style=" font-weight:600;">Neuer Eintrag</span>: eine neue Zeile mit Standardwerten in die Datenbank einfügen.</li><li><span style=" font-weight:600;">Werte einfügen...</span>: einen Dialog zur Eingabe von Werten öffnen, bevor diese in die Datenbank eingefügt werden. Dies erlaubt die Eingabe von Werten, die den Constraints Genüge tun. Dieser Dialog wird auch geöffnet, falls die <span style=" font-weight:600;">Neuer Eintrag</span>-Option aufgrund dieser Constraints fehlschlägt.</li></ul></body></html> This button deletes the record or records currently selected in the table Dieser Button löscht die Zeile oder Zeilen, die aktuell in der Tabelle ausgewählt sind This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Dies ist die Datenbanktabellen-Ansicht. Sie können die folgenden Aktionen durchführen: - Mit Schreiben beginnen, um die Werte inline zu bearbeiten. - Doppelt auf einen Eintrag klicken, um dessen Inhalte im Zelleneditor-Fenster zu bearbeiten. - Alt+Entf zum Löschen des Zellinhaltes zu NULL. - Strg+" zur Duplizierung des aktuellen Eintrags. - Ctrl+' zum Kopieren des Wertes der darüberliegenden Zelle. - Standardmäßige Auswahl- und Kopieren/Einfügen-Operationen. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Zum Anfang scrollen</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Ein Klick auf diesen Button navigiert zum Anfang der oben angezeigten Tabelle.</p></body></html> |< |< Compact &Database... &Datenbank komprimieren... Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] Komplettes/ausgewähltes SQL ausführen [F5, Strg+Enter, Strg+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. Dieser Button führt das aktuell ausgewählte SQL-Statement aus. Falls kein Text ausgewählt ist, werden alle SQL-Statements ausgeführt. This button opens a file containing SQL statements and loads it in a new editor tab Dieser Button öffnet eine Datei mit SQL-Statements und lädt diese in einen neuen Editortab &Load Extension... Erweiterung &laden... &Wiki &Wiki Bug &Report... Fehle&rmeldung... Feature Re&quest... Funktions&anfrage... Web&site Web&seite &Donate on Patreon... Über &Patreon spenden... Sa&ve Project... Projekt &speichern... This button lets you save all the settings associated to the open DB to a DB4S project file Dieser Button erlaubt Ihnen das Speichern aller mit der geöffneten DB verbundenen Einstellungen in einer DB4S-Projektdatei Open &Project... &Projekt öffnen... This button lets you open a DB4S project file Dieser Button erlaubt Ihnen das Öffnen einer DB4S-Projektdatei &Attach Database... Datenbank &anhängen... Add another database file to the current database connection Eine andere Datenbankdatei zur aktuellen Datenbankverbindung hinzufügen This button lets you add another database file to the current database connection Dieser Button erlaubt Ihnen das Hinzufügen einer anderen Datenbankdatei zur aktuellen Datenbankverbindung &Set Encryption... Verschlüsselung &setzen... SQLCipher &FAQ SQLCiper &FAQ Table(&s) to JSON... Tabelle(&n) zu JSON... Open Data&base Read Only... Daten&bank im Lesemodus öffnen... Save results Ergebnisse speichern Save the results view Ergebnisansicht speichern This button lets you save the results of the last executed query Dieser Button erlaubt Ihnen das Speichern der Ergebnisse der zuletzt ausgeführten Query Find text in SQL editor Text im SQL-Editor finden Find text in SQL editor [Ctrl+F] Text im SQL-Editor finden [Strg+F] This button opens the search bar of the editor Dieser Button öffnet die Suchleiste des Editors Ctrl+F Strg+F Find or replace text in SQL editor Text im SQL-Editor suchen oder ersetzen Find or replace text in SQL editor [Ctrl+H] Text im SQL-Editor suchen oder ersetzen [Strg+H] This button opens the find/replace dialog for the current editor tab Dieser Button öffnet den Suchen-/Ersetzen-Dialog für den aktuellen Editortab Export to &CSV Nach &CSV exportieren Save as &view Als &View speichern Save as view Als View speichern Hide column(s) Spalte(n) verbergen Hide selected column(s) Ausgewählte Spalte(n) verbergen Show all columns Alle Spalten anzeigen Show all columns that were hidden Alle versteckten Spalten anzeigen Shows or hides the Project toolbar. Zeigt oder versteckt die Projekt-Werkzeugleiste. Extra DB Toolbar Extra-DB-Werkzeugleiste Export the filtered data to CSV Die gefilterten Daten als CSV exportieren This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Dieser Button exportiert die Daten der ausgewählten Tabelle wie aktuell angezeigt (gefiltert, Anzeigeformate und Spaltenreihenfolge) als CSV-Datei. Save the current filter, sort column and display formats as a view Den aktuellen Filter, die Spaltenreihenfolge und Anzeigeformate als View speichern This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Dieser Button speichert die aktuellen Einstellungen der ausgewählten Tabelle (Filter, Anzeigeformate und Spaltenreihenfolge) als SQL-View, welche Sie später durchsuchen oder in SQL-Statements verwenden können. Insert Values... Werte einfügen... Open a dialog for inserting values in a new record Einen Dialog zum Einfügen von Werten in eine neue Zeile öffnen Insert new record using default values in browsed table Eine neue Zeile mit den Standardwerten in den ausgewählte Tabelle einfügen New In-&Memory Database Neue In-&Memory-Datenbank Drag && Drop Qualified Names Drag && Drop qualifizierter Namen Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Qualifizierte Namen (z.B. "Tabelle."Feld") verwenden, wenn die Objekte gefasst und im Editor abgelegt werden Drag && Drop Enquoted Names Drag && Drop zitierter Namen Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor Geschützte Identifier (z.B. "Tabelle1") verwenden, wenn die Objekte gefasst und im Editor abgelegt werden &Integrity Check &Integritätsprüfung Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. Führt das integrity_check-Pragma auf der geöffneten Datenbank aus und gibt die Ergebnisse im SQL-Tab zurück. Dieses Pragma führt eine Integritätsprüfung der gesamten Datenbank durch. &Foreign-Key Check &Fremdschlüssel-Prüfung Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab Führt das foreign_key_check-Pragma auf der geöffneten Datenbank aus und gibt die Ergebnisse im SQL-Tab zurück &Quick Integrity Check &Schnelle Integritätsprüfung Run a quick integrity check over the open DB Führt eine schnelle Integritätsprüfung der geöffneten DB aus Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. Führt das quick_check-Pragma auf der geöffneten Datenbank aus und gibt die Ergebnisse im SQL-Tab zurück. Dieser Befehl führt einen Großteil der Prüfung des integrity_check-Pragmas aus, ist aber deutlich schneller. &Optimize &Optimieren Attempt to optimize the database Versuchen, die Datenbank zu optimieren Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Führt das optimize-Pragma auf der geöffneten Datenbank aus. Dieses Pragma führt möglicherweise Optimierungen durch, die die Performanz zukünftiger Queries verbessern. Print Drucken Print text from current SQL editor tab [Ctrl+P] Den Text aus dem aktuellen SQL-Editortab drucken [Strg+P] Open a dialog for printing the text in the current SQL editor tab Einen Dialog zum Drucken des Textes im aktuellen SQL-Editortab öffnen Print the structure of the opened database [Ctrl+P] Die Struktur der geöffneten Datenbank drucken [Strg+P] Open a dialog for printing the structure of the opened database Einen Dialog zum Drucken der Struktur der geöffneten Datenbank öffnen <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>Ein Klick auf diesen Button navigiert 100 Einträge höher in der oben angezeigten Tabelle.</p></body></html> <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>100 Zeilen nach unten scrollen</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>Ein Klick auf diesen Button navigiert 100 Einträge nach unten in der oben angezeigten Tabelle.</p></body></html> Scroll to the end Zum Ende scrollen <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>Ein Klick auf diesen Button navigiert zum Ende der oben angezeigten Tabelle.</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><body><p>Klicken Sie hier, um zu einer bestimmten Zeile zu springen</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><body><p>Dieser Button kann zum Navigieren zu einer im "Springe zu"-Bereich festgelegten Zeile verwendet werden.</p></body></html> Go to: Springe zu: Enter record number to browse Zeilennummer zum Suchen auswählen Type a record number in this area and click the Go to: button to display the record in the database view Geben Sie eine Zeilennummer in diesem Bereich ein und klicken Sie auf den "Springe zu:"-Button, um die Zeile in der Datenbankansicht anzuzeigen 1 1 Edit &Pragmas &Pragmas bearbeiten <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline, color:#0000ff;">Automatisches Vakuum</span></a></p></body></html> None Nichts Full Vollständig Incremental Inkrementell <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatischer Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Vollständiger FSYNC Speicherpunkt</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_key"><span style=" text-decoration: underline; color:#0000ff;">Fremdschlüssel</span></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Vollständiger FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Beschränkungsprüfung ignorieren</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Modus</span></a></p></body></html> Delete Löschen Truncate Kürzen Persist Behalten Memory Speicher WAL WAL Off Aus <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Größenbegrenzung</span></a></p></body><html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Sperrmodus</span></a><p></body></html> Normal Normal Exclusive Exklusiv <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text decoration: underline; color:#0000ff;">Maximale Seitenanzahl</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Seitengröße</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Rekursive Trigger</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Sicheres Löschen</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronisierung</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Zwischenspeicherung</span></a></p></body></html> Default Voreinstellung File Datei <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">Schemaversion</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">Automatischer WAL Speicherpunkt</span></a></p></body></html> &Open Database Read Only... Datenbank schreibgeschützt &öffnen... Open an existing database file in read only mode Eine existierende Datenbank schreibgeschützt öffnen Unlock view editing Ansicht zur Bearbeitung entsperren This unlocks the current view for editing. However, you will need appropriate triggers for editing. Dies entsperrt die aktuelle Ansicht zur Bearbeitung. Allerdings werden zur Bearbeitung passende Trigger benötigt. E&xecute SQL S&QL ausführen &File &Datei &Import &Import &Export &Export Remote Entfernt &Edit &Bearbeiten &View &Ansicht &Help &Hilfe Edit Database &Cell Datenbank&zelle bearbeiten This button clears the contents of the SQL logs Dieser Button löscht den Inhalt der SQL-Logs This panel lets you examine a log of all SQL commands issued by the application or by yourself Dieses Panel erlaubt Ihnen das Betrachten eines Logs aller SQL-Kommandos, die von der Anwendung oder von Ihnen selbst ausgegangen sind DB Sche&ma DB Sche&ma This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Dies ist die Struktur der geöffneten Datenbank. Sie können mehrere Objektnamen aus der Namensspalte nehmen und in den SQL-Editor ziehen und Sie können die Eigenschaften der abgelegten Namen über das Kontextmenü anpassen. Dies kann Sie bei der Erstellung von SQL-Statements unterstützen. Sie können SQL-Statements aus der Schemaspalte nehmen und in den SQL-Editor oder in anderen Anwendungen ablegen. &Remote Entfe&rnt Execute SQL [F5, Ctrl+Return, Ctrl+R] SQL ausführen [F5, Ctrl+Return, Ctrl+R] Execute current line [Shift+F5] Aktuelle Zeile ausführen [Shift+F5] This button executes the SQL statement present in the current editor line Dieser Button führt das SQL-Statement in der aktuellen Editorzeile aus Shift+F5 Shift+F5 Sa&ve Project &Projekt speichern Open &Project &Projekt öffnen &Attach Database Datenbank &anhängen &Set Encryption Verschlüsselung &setzen Save SQL file as SQL-Datei speichern als This button saves the content of the current SQL editor tab to a file Dieser Button speichert den Inhalt des aktuellen SQL-Editortabs in einer Datei &Browse Table Tabelle &durchsuchen Copy Create statement Create-Statement kopieren Copy the CREATE statement of the item to the clipboard CREATE-Statement des Elements in die Zwischenablage kopieren Edit display format Anzeigeformat bearbeiten Edit the display format of the data in this column Anzeigeformat der Daten in dieser Spalte bearbeiten Show rowid column Rowid-Spalte anzeigen Toggle the visibility of the rowid column Sichtbarkeit der Rowid-Spalte umschalten Set encoding Codierung setzen Change the encoding of the text in the table cells Kodierung des Textes in den Tabellenzellen ändern Set encoding for all tables Kodierung für alle Tabellen setzen Change the default encoding assumed for all tables in the database Voreingestellte Kodierung für alle Tabellen in der Datenbank ändern Duplicate record Zeile duplizieren toolBar Toolbar SQL Log SQL-Log &Show SQL submitted by Zeige SQL von User Benutzer Application Anwendung &Clear &Leeren Plot Anzeigen Columns Spalten X X Y Y _ _ Line type: Zeilentyp: Line Zeile StepLeft Nach links StepRight Nach rechts StepCenter Zur Mitte Impulse Impuls Point shape: Punktform: Cross Kreuz Plus Plus Circle Kreis Disc Scheibe Square Quadrat Diamond Diamant Star Stern Triangle Dreieck TriangleInverted Invertiertes Dreieck CrossSquare Quadrat mit Kreuz PlusSquare Quadrat mit Plus CrossCircle Kreis mit Kreuz PlusCircle Kreis mit Plus Peace Peace Save current plot... Aktuelles Diagramm speichern... Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Alle Daten laden. Dies bringt nur etwas, wenn aufgrund des partiellen Abrufmechanismus noch nicht alle Daten der Tabelle abgerufen wurden. DB Schema DB Schema &New Database... &Neue Datenbank... Create a new database file Neue Datenbank-Datei erstellen This option is used to create a new database file. Diese Option wird zum Erstellen einer neuen Datenbank-Datei verwendet. Ctrl+N Strg+N &Open Database... Datenbank &öffnen... Open an existing database file Existierende Datenbank-Datei öffnen This option is used to open an existing database file. Diese Option wird zum Öffnen einer existierenden Datenbank-Datei verwendet. Ctrl+O Strg+O &Close Database Datenbank &schließen This button closes the connection to the currently open database file Dieser Button schließt die Verbindung zu der aktuell geöffneten Datenbankdatei Ctrl+W Strg+W Revert Changes Änderungen rückgängig machen Revert database to last saved state Datenbank auf zuletzt gespeicherten Zustand zurücksetzen This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Diese Option wird zum Zurücksetzen der aktuellen Datenbank-Datei auf den zuletzt gespeicherten Zustand verwendet. Alle getätigten Änderungen gehen verloren. Write Changes Änderungen schreiben Write changes to the database file Änderungen in Datenbank-Datei schreiben This option is used to save changes to the database file. Diese Option wird zum Speichern von Änderungen in der Datenbank-Datei verwendet. Ctrl+S Strg+S Compact Database Datenbank komprimieren Compact the database file, removing space wasted by deleted records Datenbank-Datei komprimieren, löscht Speicherplatz von gelöschten Zeilen Compact the database file, removing space wasted by deleted records. Datenbank-Datei komprimieren, löscht Speicherplatz von gelöschten Zeilen. E&xit &Beenden Ctrl+Q Strg+Q Database from SQL file... Datenbank aus SQL-Datei... Import data from an .sql dump text file into a new or existing database. Daten von einer .sql-Dump-Textdatei in eine neue oder existierende Datenbank importieren. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Diese Option wird zum Importieren von Daten von einer .sql-Dump-Textdatei in eine neue oder existierende Datenbank verwendet. SQL-Dumpdateien können von den meisten Datenbankanwendungen erstellt werden, inklusive MySQL und PostgreSQL. Table from CSV file... Tabelle aus CSV-Datei... Open a wizard that lets you import data from a comma separated text file into a database table. Öffnet einen Assistenten zum Importieren von Daten aus einer kommaseparierten Textdatei in eine Datenbanktabelle. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Öffnet einen Assistenten zum Importieren von Daten aus einer kommaseparierten Textdatei in eine Datenbanktabelle. CSV-Dateien können von den meisten Datenbank- und Tabellenkalkulations-Anwendungen erstellt werden. Database to SQL file... Datenbank zu SQL-Datei... Export a database to a .sql dump text file. Daten in eine .sql-Dump-Textdatei exportieren. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Diese Option ermöglicht den Export einer Datenbank in eine .sql-Dump-Textdatei. SQL-Dumpdateien enthalten alle notwendigen Daten, um die Datenbank mit den meisten Datenbankanwendungen neu erstellen zu können, inklusive MySQL und PostgreSQL. Table as CSV file... Tabelle als CSV-Datei... Export a database table as a comma separated text file. Datenbank als kommaseparierte Textdatei exportieren. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Exportiert die Datenbank als kommaseparierte Textdatei, fertig zum Import in andere Datenbank- oder Tabellenkalkulations-Anwendungen. Create Table... Tabelle erstellen... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Den Assistenten zum Erstellen einer Tabelle öffnen, wo der Name und die Felder für eine neue Tabelle in der Datenbank festgelegt werden können Delete Table... Tabelle löschen... Open the Delete Table wizard, where you can select a database table to be dropped. Den Assistenten zum Löschen einer Tabelle öffnen, wo eine zu entfernende Datenbanktabelle ausgewählt werden kann. Modify Table... Tabelle ändern... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Den Assistenten zum Ändern einer Tabelle öffnen, wo eine existierende Tabelle umbenannt werden kann. Ebenso können Felder hinzugefügt und gelöscht sowie Feldnamen und -typen geändert werden. Create Index... Index erstellen... Open the Create Index wizard, where it is possible to define a new index on an existing database table. Den Assistenten zum Erstellen des Index öffnen, wo ein neuer Index für eine existierende Datenbanktabelle gewählt werden kann. &Preferences... &Einstellungen... Open the preferences window. Das Einstellungsfenster öffnen. &DB Toolbar &DB Toolbar Shows or hides the Database toolbar. Zeigt oder versteckt die Datenbank-Toolbar. What's This? Funktionen erläutern Shift+F1 Shift+F1 &About... &Über... &Recently opened &Kürzlich geöffnet Open &tab &Tab öffnen Ctrl+T Strg+T Database Structure Datenbankstruktur Browse Data Daten durchsuchen Edit Pragmas Pragmas bearbeiten <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Warnung: dieses Pragma ist nicht lesbar und dieser Wert wurde abgeleitet. Das Schreiben des Pragmas überschreibt möglicherweise ein geändertes LIKE, welches von einer SQLite-Erweiterung zur Verfügung gestellt wird. Execute SQL SQL ausführen &Tools &Werkzeuge DB Toolbar DB Toolbar Edit Database Cell Datenbankzelle bearbeiten SQL &Log SQL-&Log Show S&QL submitted by Anzeige des übergebenen S&QL von &Plot &Diagramm Project Toolbar Projekt-Werkzeugleiste Extra DB toolbar Extra-DB-Werkzeugleiste Close the current database file Die aktuelle Datenbankdatei schließen &Revert Changes Änderungen &rückgängig machen &Write Changes Änderungen &schreiben Compact &Database &Datenbank komprimieren &Database from SQL file... &Datenbank aus SQL-Datei... &Table from CSV file... &Tabelle aus CSV-Datei... &Database to SQL file... &Datenbank zu SQL-Datei... &Table(s) as CSV file... &Tabelle(n) als CSV-Datei... &Create Table... Tabelle &erstellen... &Delete Table... Tabelle &löschen... &Modify Table... Tabelle &ändern... Create &Index... &Index erstellen... W&hat's This? &Was ist das? &About &Über This button opens a new tab for the SQL editor Dieser Button öffnet einen neuen Tab im SQL-Editor &Execute SQL SQL &ausführen Execute SQL [F5, Ctrl+Return] SQL ausführen [F5, Strg+Return] &Load extension Erweiterung &laden &Wiki... &Wiki... Bug &report... Fehler &melden... Web&site... Web&site... Save Project Projekt speichern Save the current session to a file Aktuelle Sitzung in einer Datei speichern Open Project Projekt öffnen Load a working session from a file Sitzung aus einer Datei laden Open SQL file SQL-Datei öffnen <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Aktuelles Diagramm speichern...</p><p>Dateiformat durch Endung auswählen (png, jpg, pdf, bmp)</p></body></html> Save SQL file SQL-Datei speichern Load extension Erweiterung laden Execute current line Aktuelle Zeile ausführen Execute current line [Ctrl+E] Aktuelle Zeile ausführen [Strg+E] Ctrl+E Strg+E Export as CSV file Als CSV-Datei exportieren Export table as comma separated values file Tabelle als kommaseparierte Wertedatei exportieren Ctrl+L Strg+L Ctrl+P Strg+P Database encoding Datenbank-Kodierung Choose a database file Eine Datenbankdatei auswählen Ctrl+Return Strg+Return Ctrl+D Strg+D Ctrl+I Strg+I Encrypted Verschlüsselt Database is encrypted using SQLCipher Datenbank ist mittels SQLCipher verschlüsselt Read only Nur lesen Database file is read only. Editing the database is disabled. Zugriff auf Datenbank nur lesend. Bearbeiten der Datenbank ist deaktiviert. Could not open database file. Reason: %1 Datenbankdatei konnte nicht geöffnet werden. Grund: %1 Choose a filename to save under Dateinamen zum Speichern auswählen Error adding record: Fehler beim Hinzufügen der Zeile: Error deleting record: %1 Fehler beim Löschen der Zeile: %1 Please select a record first Bitte zuerst eine Zeile auswählen %1 - %2 of %3 %1 - %2 von %3 There is no database opened. Please open or create a new database file. Es ist keine Datenbank geöffnet. Bitte eine Datenbank-Datei öffnen oder eine neue erstellen. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. Sollen %1 '%2' wirklich gelöscht werden? Alle mit %1 verbundenen Daten gehen verloren. Error: could not delete the %1. Message from database engine: %2 Fehler: %1 konnte nicht gelöscht werden. Meldung der Datenbank: %2 There is no database opened. Keine Datenbank geöffnet. %1 rows returned in %2ms from: %3 %1 Reihen innerhalb von %2ms zurückgegeben von: %3 , %1 rows affected , %1 Zeilen betroffen Query executed successfully: %1 (took %2ms%3) Query erfolgreich ausgeführt: %1 (innerhalb von %2ms%3) Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Fehler beim Speichern der Datenbankdatei. Dies bedeutet, dass nicht alle Änderungen an der Datenbank gespeichert wurden. Der folgende Fehler muss zuvor gelöst werden: %1 A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Eine neue Version des DB Browsers für SQLite ist verfügbar (%1.%2.%3).<br/><br/>Bitte laden Sie diese von <a href='%4'>%4</a> herunter. Please enter the URL of the database file to save. Bitte die URL der zu speichernden Datenbankdatei eingeben. DB Browser for SQLite project file (*.sqbpro) DB Browser für SQLite Projektdatei (*.sqbpro) Please choose a new encoding for this table. Bitte wählen Sie eine neue Kodierung für diese Tabelle. Please choose a new encoding for all tables. Bitte wählen Sie eine neue Kodierung für alle Tabellen. Error checking foreign keys after table modification. The changes will be reverted. Fehler beim Prüfen von Fremdschlüsseln nach der Änderung an der Tabelle. Die Änderungen werden rückgängig gemacht. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. Diese Tabelle hat die Fremdschlüsselprüfung nicht bestanden.<br/>Sie sollten 'Werkzeuge | Fremdschlüssel-Prüfng' ausführen und die gemeldeten Probleme beheben. At line %1: In Zeile %1: Result: %2 Ergebnis: %2 Extensions(*.so *.dylib *.dll);;All files(*) Erweiterungen(*.so *.dylib *.dll);;Alle Dateien(*) %1 Leave the field empty for using the database encoding. %1 Lassen Sie das Feld leer, um die Datenbankodierung zu verwenden. This encoding is either not valid or not supported. Diese Kodierung ist entweder nicht gültig oder nicht unterstützt. Cancel Abbrechen %1 Rows returned from: %2 (took %3ms) %1 Reihen zurückgegeben von: %2 (in %3ms) Error executing query: %1 Fehler beim Ausführen der Anfrage: %1 Query executed successfully: %1 (took %2ms) Anfrage erfolgreich ausgeführt: %1 (in %2ms) Choose a text file Textdatei auswählen Text files(*.csv *.txt);;All files(*) Textdateien(*.csv *.txt);;Alle Dateien(*) Import completed Import vollständig Are you sure you want to undo all changes made to the database file '%1' since the last save? Sollen wirklich alle Änderungen an der Datenbankdatei '%1' seit dem letzten Speichern rückgängig gemacht werden? Choose a filename to export Dateinamen zum Export auswählen Text files(*.sql *.txt) Textdateien(*.sql *.txt) Export cancelled or failed. Export abgebrochen oder fehlgeschlagen. Export completed. Export abgeschlossen. Choose a file to import Datei für Import auswählen Text files(*.sql *.txt);;All files(*) Textdateien(*.sql *.txt);;Alle Dateien(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. Soll für die importierten Daten eine neue Datenbank erstellt werden? Bei der Antwort NEIN werden die Daten in die SQL-Datei der aktuellen Datenbank importiert. File %1 already exists. Please choose a different name. Datei %1 existiert bereits. Bitte einen anderen Namen auswählen. Error importing data: %1 Fehler beim Datenimport: %1 Import completed. Import abgeschlossen. Delete View Ansicht löschen Delete Trigger Trigger löschen Delete Index Index löschen Delete Table Tabelle löschen &%1 %2 &%1 %2 Setting PRAGMA values will commit your current transaction. Are you sure? Das Setzen von PRAGMA-Werten übermittelt den aktuellen Vorgang. Sind Sie sicher? Execution aborted by user Ausführung durch Benutzer abgebrochen In-Memory database In-Memory-Datenbank determining row count... bestimmte Zeilenanzahl... %1 - %2 of >= %3 %1 - %2 von >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Möchten Sie die Tabelle '%1' wirklich löschen? Alle mit dieser Tabelle verbundenen Daten gehen verloren. Are you sure you want to delete the view '%1'? Möchten Sie die Ansicht '%1' wirklich löschen? Are you sure you want to delete the trigger '%1'? Möchten Sie den Trigger '%1' wirklich löschen? Are you sure you want to delete the index '%1'? Möchten Sie den Index '%1' wirklich löschen? Error: could not delete the table. Fehler: Tabelle konnte nicht gelöscht werden. Error: could not delete the view. Fehler: Ansicht konnte nicht gelöscht werden. Error: could not delete the trigger. Fehler: Trigger konnte nicht gelöscht werden. Error: could not delete the index. Fehler: Index konnte nicht gelöscht werden. Message from database engine: %1 Nachricht von Datenbank-Engine: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? Das Bearbeiten der Tabelle setzt das Speichern aller ausstehenden Änderungen voraus. Möchten Sie die Datenbank wirklich speichern? -- EXECUTING SELECTION IN '%1' -- -- FÜHRE AUSWAHL IN '%1' AUS -- -- EXECUTING LINE IN '%1' -- -- FÜHRE ZEILE IN '%1' AUS -- -- EXECUTING ALL IN '%1' -- -- FÜHRE ALLES IN '%1' AUS -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Das Setzen von PRAGMA-Werten oder des Vakuumings wird Ihre aktuelle Transaktion committen. Sind Sie sich sicher? executing query führe Query aus %1 rows returned in %2ms %1 Zeilen in %2ms zurückgegeben query executed successfully. Took %1ms%2 Query erfolgreich ausgeführt. Benötigte %1ms%2 -- At line %1: %4 -- Result: %3 -- In Zeile %1: %4 -- Ergebnis: %3 Choose text files Textdateien auswählen Import completed. Some foreign key constraints are violated. Please fix them before saving. Import vollständig. Ein paar Fremdschlüssel wurden verletzt. Bitten beheben Sie diese vor dem Speichern. Modify View Ansicht verändern Modify Trigger Trigger verändern Modify Index Index verändern Modify Table Tabelle verändern Select SQL file to open SQL-Datei zum Öffnen auswählen Couldn't read file: %1. Datei konnte nicht gelesen werden: %1. Couldn't save file: %1. Datei konnte nicht gespeichert werden: %1. Select file name Dateinamen auswählen Select extension file Erweiterungsdatei auswählen Extensions(*.so *.dll);;All files(*) Erweiterungen(*.so *.dll);;Alle Dateien(*) Extension successfully loaded. Erweiterung erfolgreich geladen. Error loading extension: %1 Fehler beim Laden der Erweiterung: %1 Don't show again Nicht wieder anzeigen New version available. Neue Version verfügbar. Choose a project file to open Wählen Sie die zu öffnende Projektdatei This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Diese Projektdatei verwendet ein altes Dateiformat, da es mit DB-Browser für SQLite Version 3.10 oder niedriger erstellt wurde. Das Laden dieses Dateiformats wird noch vollständig unterstützt, wird empfehlen Ihnen allerdings, alle Ihre Projektdateien in das neue Dateiformat zu überführen, da die Unterstützung für ältere Formate in Zukunft möglicherweise entfernt wird. Sie können Ihre Dateien einfach durch Öffnen und Neuspeichern umwandeln. Duplicate records Doppelte Einträge Ctrl+" Strg+" Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Bitte einen Pseudo-Primärschlüssel eingeben, um die Bearbeitung dieser Ansicht zu ermöglichen. Dies sollte der Name der eindeutigen Spalte dieser Ansicht sein. Collation needed! Proceed? Kollation notwendig! Fortführen? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Eine Tabelle in dieser Datenbank benötigt eine spezielle Kollationsfunktion '%1', welche diese Anwendung ohne weiterem Wissen nicht zur Verfügung stellen kann. Wenn Sie fortfahren, sollten Sie im Hinterkopf behalten, dass mit Ihrer Datenbank unerwartete Dinge geschehen können. Erstellen Sie ein Backup! creating collation erstelle Kollation Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Vergeben Sie einen Namen für den SQL-Tab. Verwenden Sie das '&&'-Zeichen, um das folgende Zeichen als Tastaturkürzel zu verwenden. Please specify the view name Geben Sie bitte einen Namen für Ansicht an There is already an object with that name. Please choose a different name. Es gibt bereits ein Objekt mit diesem Namen. Bitte wählen Sie einen anderen aus. View successfully created. Ansicht erfolgreich erstellt. Error creating view: %1 Fehler beim Erstellen der Ansicht: %1 There is no filter set for this table. View will not be created. Es gibt kein Filterset für diese Tabelle. Die Ansicht wird nicht erstellt. Delete Records Einträge löschen This action will open a new SQL tab for running: Diese Aktion öffnet einen neuen SQL-Tab zur Ausführung: Press Help for opening the corresponding SQLite reference page. Drücken Sie auf 'Hilfe', um die entsprechende SQLite-Referenzseite zu öffnen. A new sqlitebrowser version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Eine neue sqlitebrowser-Version ist verfügbar (%1.%2.%3).<br/><br/>Bitte von <a href='%4'>%4</a> herunterladen. Choose a axis color Achsenfarbe auswählen PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Alle Dateien(*) Choose a file to open Datei zum Öffnen auswählen SQLiteBrowser project(*.sqbpro) SQLiteBrowser-Projekt(*.sqbpro) Invalid file format. Ungültiges Dateiformat. NullLineEdit Set to NULL Auf NULL setzen Alt+Del Alt+Entf PlotDock Plot Diagramm <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> <html><head/><body><p>Dieses Pane zeigt die Liste der Spalten der aktuell ausgewählten Tabelle oder des soeben ausgeführtne Queries. Sie können die für die X- und Y-Achse gewünschten Spalten für das Plot-Pane unten auswählen. Die Tabelle zeigt den erkannten Axentyp, der den entstehenden Plot beeinflusst. Für die Y-Achse sind nur numerische Spalten zulässig, während Sie für die X-Achse aus folgenden Optionen auswählen können:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Datum/Zeit</span>: Strings im Format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Datum</span>: Strings im Format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Zeit</span>: Strings im Format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Beschriftung</span>: andere Stringformate. Die Auswahl dieser Spalte als X-Achse erzeugt einen Barplot mit den Spaltenwerten als Beschriftungen der Bars.</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numerisch</span>: Integer- oder Real-Werte</li></ul><p>Ein Doppelklick auf die Y-Zellen ermöglicht Ihnen das Ändern der für den Graph verwendeten Farbe.</p></body></html> Columns Spalten X X Y Y _ _ Axis Type Achsentyp Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Hier wird ein Plot angezeigt, wenn Sie oben die x- und y-Werte auswählen. Klicken Sie auf Punkte, um diese im Plot und in der Tabelle auszuwählen. Strg+Klick zur Auswahl eines Punktebereichs. Verwenden Sie das Mausrad zum Zoomen und Ziehen Sie mit der Maus, um den Achsenbereich zu ändern. Wählen Sie die Achsen oder Achsenbeschriftungen aus, um nur in diese Richtung zu zoomen oder zu verschieben. Line type: Linientyp: None Keine Line Linie StepLeft Linksschritt StepRight Rechtsschritt StepCenter Mittelschritt Impulse Impuls Point shape: Punktform: Cross Kreuz Plus Plus Circle Kreis Disc Scheibe Square Quadrat Diamond Diamant Star Stern Triangle Dreieck TriangleInverted Invertiertes Dreieck CrossSquare Quadrat mit Kreuz PlusSquare Quadrat mit Plus CrossCircle Kreis mit Kreuz PlusCircle Kreis mit Plus Peace Peace <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Aktuelles Diagramm speichern...</p><p>Dateiformat durch Endung auswählen (png, jpg, pdf, bmp)</p></body></html> Save current plot... Aktuelles Diagramm speichern... Load all data and redraw plot Alle Daten laden und Plot neu zeichnen Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Alle Daten laden. Dies bringt nur etwas, wenn aufgrund des partiellen Abrufmechanismus noch nicht alle Daten der Tabelle abgerufen wurden. Row # Zeile # Choose a axis color Achsenfarbe auswählen Copy Kopieren Print... Drucken... Show legend Legende anzeigen Stacked bars Gestapelte Bars Date/Time Datum/Zeit Date Datum Time Zeit Numeric Numerisch Label Beschriftung Invalid Ungültig Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Alle Daten laden und Plot neu zeichnen. Warnung: es wurden aufgrund der partiellen Abrufmechanismus noch nicht alle Daten aus der Tabelle abgerufen. Choose an axis color Eine Achsenfarbe wählen Choose a filename to save under Dateinamen zum Speichern auswählen PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Alle Dateien(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. Dieser Plot enthält Kurven und der ausgewählte Linienstil kann nur auf nach X sortierte Graphen angewendet werden. Sortieren Sie entweder die Tabelle oder Query nach X oder entfernen Sie die Kurven oder wählen Sie eine der Stile, die von Kurven unterstützt werden: Keiner oder Linie. Fetching all data... Alle Daten werden abgerufen... Cancel Abbrechen PreferencesDialog Preferences Einstellungen &General All&gemeines Remember last location Letztes Verzeichnis merken Always use this location Immer dieses Verzeichnis verwenden Remember last location for session only Letztes Verzeichnis nur innerhalb der Sitzung merken Lan&guage &Sprache Show remote options Fernzugriffs-Optionen anzeigen Automatic &updates Automatische &Updates &Database &Datenbank Database &encoding Datenbank-&Kodierung Open databases with foreign keys enabled. Öffnen von Datenbanken mit Fremdschlüsseln aktiviert. &Foreign keys &Fremdschlüssel enabled aktiviert Default &location Voreingestellter &Speicherort ... ... &Prefetch block size &Prefetch Blockgröße Remove line breaks in schema &view Zeilenumbrüche in der Schema&ansicht entfernen Prefetch block si&ze Block&größe für Prefetch Advanced Erweitert SQL to execute after opening database Nach dem Öffnen einer Datenbank auszuführendes SQL SQ&L to execute after opening database Nach dem Öffnen einer Datenbank auszuführendes SQ&L Default field type Voreingestellter Feldtyp Data &Browser Daten&auswahl Font Schrift &Font Schri&ft Font si&ze: Schrift&größe: Content Inhalt Symbol limit in cell Symbolbegrenzung in Zelle NULL fields NULL-Felder &Text &Text Field colors Feldfarben NULL NULL Regular Normal Text Text Binary Binär Background Hintergrund Filters Filter Escape character Escape-Zeichen Delay time (&ms) Verzögerung (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. Verzögerung vor der Anwendung eines neuen Filters setzen. Kann auf 0 gesetzt werden, um dies zu deaktivieren. &SQL &SQL Settings name Einstellungsname Context Kontext Colour Farbe Bold Fett Italic Kursiv Underline Unterstreichung Keyword Schlüsselwort function Funktion Function Funktion Table Tabelle Comment Kommentar Identifier Bezeichner String String currentline Aktuelle Zeile Current line Aktuelle Zeile SQL &editor font size SQL-&Editor Schriftgröße SQL &log font size SQL-&Log Schriftgröße Tab size Tab-Größe SQL editor &font SQL Editor &Schrift Error indicators Fehleranzeige Enabling error indicators highlights the SQL code lines that caused errors during the last execution Durch Aktivieren der Fehleranzeige werden SQL-Codezeilen hervorgehoben, die während der letzten Ausführung Fehler verursacht haben Hori&zontal tiling Hori&zontale Anordnung If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Im aktivierten Zustand werden der SQL-Codeeditor und die Ergebnistabelle neben- statt untereinander angezeigt. Code co&mpletion &Codevervollständung Toolbar style Werkzeugleisten-Stil Only display the icon Nur das Symbol anzeigen Only display the text Nur den Text anzeigen The text appears beside the icon Der Text erscheint neben dem Symbol The text appears under the icon Der Text erscheint unter dem Symbol Follow the style Dem Stil folgen DB file extensions DB-Datei-Erweiterungen Manage Verwalten When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Falls aktiviert, werden die Zeilenumbrüche in der Schemaspalte des DB-Strukturtabs, Docks und der gedruckten Ausgabe entfernt. Font si&ze Schrift&größe This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Dies ist die maximale Anzahl an Zeilen in einer Tabelle, die zur Wertvervollständigung basierend auf aktuellen Werten in dieser Spalte erlaubt ist. Kann auf 0 gesetzt werden, um die Vervollständigung zu deaktivieren. Row count threshold for completion Zeilenanzahl-Grenzwert für Vervollständigung Field display Feldanzeige Displayed &text Angezeigter &Text Text color Textfarbe Background color Hintergrundfarbe Preview only (N/A) Nur Vorschau (N/A) Foreground Vordergrund SQL &results font size Schriftgröße SQL-&Ergebnisse &Wrap lines Zeilen &umbrechen Never Nie At word boundaries An Wortgrenzen At character boundaries An Zeichengrenzen At whitespace boundaries An Leerzeichengrenzen &Quotes for identifiers &Anführungszeichen für Identifiers Choose the quoting mechanism used by the application for identifiers in SQL code. Wählen Sie den Zitiermechanismus aus, der von der Anwendung für Identifier im SQL-Code verwendet wird. "Double quotes" - Standard SQL (recommended) "Doppelt Anführungszeichen" - Standard-SQL (empfohlen) `Grave accents` - Traditional MySQL quotes `Akzente` - Traditionelle MySQL-Anführungszeichen [Square brackets] - Traditional MS SQL Server quotes [Eckige Klammern] - Traditionelle MS-SQL-Server-Anführungszeichen Keywords in &UPPER CASE Schlüsselwörter in &GROSSSCHREIBUNG When set, the SQL keywords are completed in UPPER CASE letters. Falls gesetzt, werden die SQL-Schlüsselwörter in GROßSCHREIBUNG vervollständigt. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background Falls gesetzt, werden die SQL-Codezeilen, die während der letzten Ausführung Fehler verursacht haben, hervorgehoben und das Ergebnisfenster zeigt den Fehler im Hintergrund na &Extensions &Erweiterungen Select extensions to load for every database: Bei jeder Datenbank zu ladende Erweiterungen auswählen: Add extension Erweiterung hinzufügen Remove extension Erweiterung entfernen <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>Auch wenn der REGEXP-Operator unterstützt wird, implementiert SQLite keinerlei Algorithmus für reguläre<br/>Ausdrücke, sondern leitet diese an die laufende Anwendung weiter. DB Browser für SQLite implementierte diesen<br/>Algorithmus für Sie, um REGEXP ohne Zusätze verwenden zu können. Allerdings gibt es viele mögliche<br/>Implementierungen und Sie möchten unter Umständen eine andere wählen, dann können Sie die<br/>Implementierung der Anwendung deaktivieren und Ihre eigene durch Laden einer Erweiterung verwenden. Ein Neustart der Anwendung ist notwendig.</p></body></html> Disable Regular Expression extension Erweiterung für reguläre Ausdrücke deaktivieren <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> <html><head/><body><p>SQLite bietet eine SQL-Funktion an, um Erweiterungen aus einer Shared-Library-Datei zu laden. Aktivieren Sie dies, falls Sie die <span style=" font-style:italic;">load_extension()</span>-Funktion aus SQL-Code heraus benutzen möchten.</p><p>Aus Sicherheitsgründen ist das Laden von Erweiterungen standardmäßig deaktiviert und muss durch diese Einstellung aktiviert werden. Sie können alternativ immer die gewünschten Erweiterungen über die GUI laden, auch wenn diese Option deaktiviert ist.</p></body></html> Allow loading extensions from SQL code Erlaube das Laden von Erweiterungen aus SQL-Code Remote Entfernt CA certificates CA-Zertifikate Subject CN Subject CN Common Name Common Name Subject O Subject O Organization Organisation Valid from Gültig ab Valid to Gültig bis Serial number Seriennummer Your certificates Ihre Zertifikate File Datei Subject Common Name Subject Common Name Issuer CN CN des Ausstellers Issuer Common Name Common Name des Ausstellers Clone databases into Datenbank klonen nach Choose a directory Verzeichnis wählen The language will change after you restart the application. Die Sprache wird nach einem Neustart der Anwendung geändert. Select extension file Erweiterungsdatei wählen Extensions(*.so *.dll);;All files(*) Erweiterungen(*.so *.dll);;Alle Dateien(*) Extensions(*.so *.dylib *.dll);;All files(*) Erweiterungen(*.so *.dylib *.dll);;Alle Dateien(*) Import certificate file Zertifikatsdatei importieren No certificates found in this file. In dieser Datei wurden keine Zertifikate gefunden. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Soll dieses Zertifikat wirklich entfernt werden? Jegliche Zertifikatdaten werden aus den Anwendungseinstellungen gelöscht! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. Möchten Sie wirklich alle gespeicherten Einstellungen löschen? Alle Ihre Einstellungen gehen dadurch verloren und die Standardwerte werden verwendet. QObject Error importing data. Message from database engine: %1 Fehler beim Datenimport. Meldung der Datenbank: %1 File is not a SQLite 3 database Datei ist keine SQLite 3-Datenbank File could not be read Datei konnte nicht gelesen werden no error kein Fehler Do you want to save the changes made to the database file %1? Sollen die getätigten Änderungen an der Datenbank-Datei %1 gespeichert werden? Exporting database to SQL file... Datenbank in SQL-Datei exportieren... Error importing data Fehler beim Datenimport from record number %1 von Zeilennummer %1 . %1 %1 Importing CSV file... Importiere CSV-Datei... Cancel Abbrechen Executing SQL... SQL ausführen... Action cancelled. Vorgang abgebrochen. Error in statement #%1: %2. Aborting execution. Fehler im Statement #%1: %2. Ausführung wird abgebrochen. renameColumn: cannot find table %1. Spalte umbenennen: Tabelle %1 nicht gefunden. renameColumn: cannot find column %1. Spalte umbennen: Spalte %1 nicht gefunden. renameColumn: creating savepoint failed. DB says: %1 Spalte umbenennen: Anlegen von Speicherpunkt fehlgeschlagen. DB meldet: %1 renameColumn: creating new table failed. DB says: %1 Spalte umbenennen: Erstellen neuer Tabelle fehlgeschlagen. DB meldet: %1 renameColumn: copying data to new table failed. DB says: %1 Spalte umbenennen: Kopieren der Daten in neue Tabelle fehlgeschlagen. DB sagt: %1 renameColumn: deleting old table failed. DB says: %1 Spalte umbenennen: Löschen der alten Tabelle fehlgeschlagen. DB meldet: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: Wiederherstellung einiger mit dieser Tabelle verbundener Objekte fehlgeschagen. Dies passiert häufig durch geänderte Spaltennamen. Hier das SQL-Statement zum manuellen Reparieren und Ausführen: renameColumn: releasing savepoint failed. DB says: %1 Spalte umbenennen: Freigeben des Speicherpunktes fehlgeschlagen. DB meldet: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Fehler beim Umbenennen der Tabelle '%1' zu '%2'. Meldung von Datenbank: %3 ... <string can not be logged, contains binary data> ... ... <String kann nicht geloggt werden, enthält binäre Daten> ... unknown object type %1 unbekannter Objekttyp %1 could not get list of db objects: %1, %2 Liste mit DB-Ojekten konnte nicht bezogen werden: %1, %2 could not get types Typen konnten nicht bezogen werden Decoding CSV file... CSV-Datei dekodieren... didn't receive any output from pragma %1 keine Ausgabe von Pragma %1 could not execute pragma command: %1, %2 Pragma-Kommando konnte nicht ausgeführt werden: %1, %2 Error setting pragma %1 to %2: %3 Fehler beim Setzen des Pragmas %1 auf %2: %3 File not found. Datei nicht gefunden. Collation needed! Proceed? Kollation notwendig! Fortführen? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Eine Tabelle in dieser Datenbank benötigt eine spezielle Kollationsfunktion '%1', welche diese Anwendung ohne weiterem Wissen nicht zur Verfügung stellen kann. Wenn Sie fortfahren, sollten Sie im Hinterkopf behalten, dass mit Ihrer Datenbank unerwartete Dinge geschehen können. Erstellen Sie ein Backup! SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite Datenbankdateien (*.db *.sqlite *.sqlite3 *.db3);;Alle Dateien (*) All files (*) Alle Dateien (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) SQLite Datenbankdateien (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 Fehler beim Verbinden zu %1. %2 Error opening remote file at %1. %2 Fehler beim Öffnen der entfernten Datei unter %1. %2 Error: Invalid client certificate specified. Fehler: Ungültiges Benutzerzertifikat angegeben. Please enter the passphrase for this client certificate in order to authenticate. Bitte die Passphrase für diese Benutzerzertifikat eingeben, um die Authentifizierung durchzuführen. Cancel Abbrechen Uploading remote database to %1 Entfernte Datenbank wird hochgeladen zu %1 Downloading remote database from %1 Entfernte Datenbank wird heruntergeladen von %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. Die entfernte Datenbank wurde seit dem letzten Checkout verändert. Möchten Sie die lokale Datenbank mit der neuesten Version aktualisieren? Beachten Sie, dass dies alle Ihre lokalen Änderungen verwirft! Falls Sie Ihre lokalen Änderungen nicht verlieren möchten, klicken Sie auf Nein, um die lokale Version zu öffnen. Uploading remote database to %1. Entfernte Datenbank wird hochgeladen zu %1. Downloading remote database from %1. Entfernte Datenbank wird heruntergeladen von %1. Error: The network is not accessible. Fehler: Netzwerkzugriff nicht möglich. Error: Cannot open the file for sending. Fehler: Öffnen der Datei zum Senden nicht möglich. Error opening local databases list. %1 Fehler beim Öffnen der lokalen Datenbankliste. %1 Error creating local databases list. %1 Fehler beim Erstellen der lokalen Datenbankliste. %1 RemoteDock Remote Entfernt B&rowse &Durchsuchen Local Lokal Identity Identität Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Verbindung zum entfernten Server unter Verwendung der aktuell ausgewählten Identität. Der richtige Server wird ebenso von der Identität genommen. Go Los Push currently opened database to server Aktuell geöffnete Datenbank an den Server schicken <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> <html><head/><body><p>In diesem Pane könnten entfernte Datenbanken von der dbhub.io-Webseite zu DB4S hinzugefügt werden. Zunächst benötigen Sie eine Identität:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Melden Sie sich auf der dbhub.io-Webseite an (unter Verwendung Ihrer GitHub-Daten oder wie gewünscht)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Klicken Sie auf den Button, um ein DB4S-Zertifikat zu erstellen (das ist Ihre Identität). Dies erzeugt Ihnen eine Zertifikatsdatei (speichern Sie dies auf ihrer lokalen Festplatte).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Öffnen Sie den Remote-Tab in den DB4S-Einstellungen. Klicken Sie auf den Button, um ein neues Zertifikat zu DB4S hinzuzufügen und wählen Sie die soeben heruntergeladene Zertifikatsdatei aus.</li></ol><p>Jetzt zeigt das Remote-Panel Ihre Identität und Sie können entfernte Datenbanken hinzufügen.</p></body></html> RemoteModel Name Name Version Version Last modified Letzte Änderung Size Größe Commit Commit bytes Bytes RemotePushDialog Push database Datenbank pushen Database na&me to push to Zu pushender Datenbankna&me Commit message Commit-Nachricht <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Datenbanklizenz Public Öffentlich Branch Branch Force push Push erzwingen Database will be public. Everyone has read access to it. Datenbank wird öffentlich sein. Jeder hat Lesezugriff darauf. Database will be private. Only you have access to it. Datenbank wird privat sein. Nur Sie haben Zugriff darauf. Use with care. This can cause remote commits to be deleted. Verwenden Sie dies mit Vorsicht. Dadurch können entfernte Commits gelöscht werden. Unspecified Nicht festgelegt SqlExecutionArea Form Formular Find previous match [Shift+F3] Vorherige Übereinstimmung finden [Umschalt+F3] Find previous match with mapping Vorherige Übereinstimmung mit Mapping finden Shift+F3 Umschalt+F3 The found pattern must be a whole word Das Pattern muss ein ganzes Wort sein Whole Words Ganze Wörter Text pattern to find considering the checks in this frame Zu findendes Textpattern unter Einbeziehung der Prüfungen in diesem Fenster Find in editor Im Editor finden The found pattern must match in letter case Das Fundpattern muss in Groß-/Kleinschreibung übereinstimmen Case Sensitive Schreibungsabhängig Find next match [Enter, F3] Nächste Übereinstimmung finden [Enter, F3] Find next match with wrapping Nächste Übereinstimmung mit Umbruch finden F3 F3 Interpret search pattern as a regular expression Suchpattern als regulären Ausdruck interpretieren <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>Falls aktiviert, wird das Suchmuster als regulärer Ausdruck (UNIX-Stil) interpretiert. Siehe <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks (englisch)</a>.</p></body></html> Regular Expression Regulärer Ausdruck Close Find Bar Suchbar schließen <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> <html><head/><body><p>Ergebnisse der zuletzt ausgeführten Statements..</p><p>Alternativ kann dieses Panel zusammengeklappt und stattdessen der <span style=" font-style:italic;">SQL-Log</span>-Dock mit der Auswahl <span style=" font-style:italic;">Benutzer</span> verwendet werden.</p></body></html> Results of the last executed statements Ergebnisse des zuletzt ausgeführten Statements This field shows the results and status codes of the last executed statements. Dieses Feld zeigt die Ergebnisse und Statuscodes der zuletzt ausgeführten Statements. Export to &CSV Nach &CSV exportieren Save as &view Ansicht &speichern Save as view Ansicht speichern Please specify the view name Namen für Ansicht angeben There is already an object with that name. Please choose a different name. Es gibt bereits ein Objekt mit diesem Namen. Bitte einen anderen auswählen. View successfully created. Ansicht erfolgreich erstellt. Error creating view: %1 Fehler beim Erstellen der Ansicht: %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. (X) Die abs(X)-Funktion gibt einen absoluten Wert des numerischen Arguments X zurück. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. () Die changes()-Funktion gibt die Anzahl der Datenbankzeilen zurück, die mit dem zuletzt abgeschlossenen INSERT-, DELETE- oder UPDATE-Statement geändert, einfügt oder gelöscht worden sind. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1,X2,...) Die char(X1,X2,...,XN)-Funktion gibt eine Zeichenkette zurück, die aus den Zeichen der Unicode-Werte der Ganzzahlen X1 bis XN zusammengesetzt ist. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y,...) Die coalesce()-Funktion gibt eine Kopie des ersten nicht-NULL-Arguments zurück, oder NULL wenn alle Argumente NULL sind (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) Die glob(X,Y)-Funktion ist äquivalent zum Ausdruck "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) Die ifnull()-Funktion gibt eine Kopie des ersten nicht-NULL-Arguments zurück, oder NULL, wenn beide Argumente NULL sind. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X,Y) Die instr(X,Y)-Funktion sucht das erste Auftreten von Zeichenkette Y innerhalb der Zeichenkette X und gibt die Anzahl vorhergehender Charakter plus 1 zurück, oder 0, wenn Y in X nicht gefunden werden konnte. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) Die hex()-Funktion interpretiert ihr Argument als BLOB und gibt eine Zeichenkette zurück, die die Hexadezimaldarstellung des Blob-Inhaltes in Großbuchstaben enthält. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. () Die last_insert_rowid()-Funktion gibt die ROWID der letzte Zeile zurück, die von der diese Funktion aufrufenden Datenbankverbindung eingefügt wurde. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X) Für eine Zeichenkette X gibt die length(X)-Funktion die Anzahl der Zeichen (keine Bytes) von X zurück, die sich for dem ersten NUL-Zeichen befinden. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y) Die like()-Funktion wird als Implementierung des "Y LIKE X"-Ausdrucks verwendet. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X,Y,Z) Die like()-Funktion wird als Implementierung des "Y LIKE X ESCAPE Z"-Ausdrucks verwendet. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. (X) Die load_extension(X)-Funktion lädt SQLite-Erweiterungen aus der geteilten Bibliotheksdatei mit dem Namen X. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. (X,Y) Die load_extension(X)-Funktion lädt SQLite-Erweiterungen aus der geteilten Bibliotheksdatei mit dem Namen X unter Verwendung des Eintrittspunktes Y. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X) Die load_extension(X)-Funktion lädt SQLite-Erweiterungen aus der Shared-Library-Datei namens X. Die Verwendung dieser Funktion muss in den Einstellungen authorisiert werden. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X,Y) Die load_extension(X,Y)-Funktion lädt SQLite-Erweiterungen aus der Shared-Library-Datei namens X unter Verwendung des Eintrittspunktes Y. Die Verwendung dieser Funktion muss in den Einstellungen authorisiert werden. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) Die lower(X)-Funktion gibt eine Kopie der Zeichenkette X mit allen ASCII-Zeichen in Kleinschreibung zurück. (X) ltrim(X) removes spaces from the left side of X. (X) ltrim(X) entfernt Leerzeichen aus der linken Seite von X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y) Die ltrim(X,Y)-Funktion gibt eine Zeichenkette zurück, die durch Entfernen aller Zeichen innerhalb von Y aus der linken Seite von X gebildet wird. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) Die max()-Funktion mit mehreren Argumenten gibt das Argument mit dem größten Wert zurück, oder NULL, wenn ein Argument NULL ist. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) Die max()-Funktion mit mehreren Argumenten gibt das Argument mit dem kleinsten Wert zurück. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (X,Y) Die nullif(X,Y)-FUnktion gibt ihr erstes Argument zurück, wenn die Argumente verschieden sind und NULL, wenn die Argumente gleich sind. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (FORMAT,...) Die printf(FORMAT,...) SQL-Funktion arbeitet wie die sqlite3_mprintf() C-Funktion und die printf()-Funktion aus der C-Standardbibliothek. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. (X) Die quote(X)-Funktion gibt den Text eines SQL-Literals zurück, wobei der Wert des Arguments zum Einfügen in ein SQL-Statement geeignet ist. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. () Die random()-Funktion gibt eine pseudo-zufällige Ganzzahl zwischen -9223372036854775808 und +9223372036854775807 zurück. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (N) Die randomblob(N)-Funktion gibt einen N-Byte Blob aus pseudo-zufälligen Bytes zurück. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X,Y,Z) Die replace(X,Y,Z)-Funktion gibt einen String zurück, der durch Ersetzen der Zeichenkette Z bei jedem Auftreten von Zeichenkette Y in Zeichenkette X gebildet wird. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X) Die round(X)-Funktion gibt einen Gleitkommawert X auf nulll Nachkommastellen gerundet zurück. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X,Y) Die round(X,Y)-Funktion gibt eine Gleitkommazahl X auf Y Nachkommastellen gerundet zurück. (X) rtrim(X) removes spaces from the right side of X. (X) rtrim(X) entfernt Leerzeichen aus der rechten Seite von X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X,Y) Die rtrim(X,Y)-Funktion gibt eine Zeichenkette zurück, die durch Entfernen aller Zeichen innerhalb von Y aus der rechten Seite von X gebildet wird. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X) Die soundex(X)-Funktion gibt eine Zeichenkette zurück, die aus der Soundex-Kodierung von Zeichenkette X besteht. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y) substr(X,Y) gibt alle Zeichen bis zum Ende der Zeichenkette X zurück, beginnend mit dem Y-ten. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. (X,Y,Z) Die substr(X,Y)-Funktion gibt einen Teil der Zeichenkette X zurück, die mit dem Y-ten Zeichen beginnt und Z Zeichen lang ist. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. () Die changes()-Funktion gibt die Anzahl dergeänderten Datenbankzeilen zurück, die seit dem Öffnen der aktuellen Datenbankverbindung mit INSERT-, DELETE- oder UPDATE-Statement geändert, einfügt oder gelöscht worden sind. (X) trim(X) removes spaces from both ends of X. (X) trim(X) entfernt Leerzeichen an beiden Enden von X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X,Y) Die ltrim(X,Y)-Funktion gibt eine Zeichenkette zurück, die durch Entfernen aller Zeichen innerhalb von Y aus der von beiden Seiten von X gebildet wird. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) Die typeof(X)-Funktion gibt einen String zurück, der den Datentyp des Ausdruckes X angibt. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) Die unicode(X)-Funktion gibt einen numerischen Unicode-Wert zurück, der dem ersten Zeichen der Zeichenkette X entspricht. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (X) Die lower(X)-Funktion gibt eine Kopie der Zeichenkette X mit allen ASCII-Zeichen in Großschreibung zurück. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (N) Die zeroblob(N)-Funktion gibt einen BLOB aus N Bytes mit 0x00 zurück. (timestring,modifier,modifier,...) (Zeitstring,Modifikation,Modifikation,...) (format,timestring,modifier,modifier,...) (Format,Zeitstring,Modifikation,Modifikation,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) Die avg()-Funktion gibt den Durchschnittswert alle nicht-NULL X in einer Gruppe zurück. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) Die count(X)-Funktion gibt die Anzahl der nicht-NULL-Elemente von X in einer Gruppe zurück. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X) Die group_conact()-Funktion gibt eine Zeichenkette zurück, die eine Verkettung aller nicht-NULL-Werte von X ist. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X,Y) Die group_conact()-Funktion gibt eine Zeichenkette zurück, die eine Verkettung aller nicht-NULL-Werte von X ist. Wenn der Parameter Y aktiv ist, wird dieser als Trennzeichen zwischen Instanzen von X behandelt. (X) The max() aggregate function returns the maximum value of all values in the group. (X) Die max()-Sammelfunktion gibt den Maximalwert aller Werte in der Gruppe zurück. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) Die min()-Sammelfunktion gibt den Minimalwert aller nicht-NULL-Werte in der Gruppe zurück. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) Die sum()- und total()-Sammelfunktionen geben die Summe aller nicht-NULL-Werte in der Gruppe zurück. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () Die Anzahl der Zeilen in der aktuellen Partition. Zeilen werden beginnend bei 1 in der durch den ORDER-BY-Befehl in der Fensterdefinition nummeriert, ansonsten in willkürlicher Reihenfolge. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Die row_number() des ersten Peer in jeder Gruppe - der Rang der aktuellen Zeile mit Lücken. Falls es keinen ORDER-BY-Befehl gibt, dann werden alle Zeilen als Peers angesehen und diese Funktion gibt immer 1 zurück. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Die Nummer der Peer-Gruppe der aktuellen Zeile in der Partition - der Rang der aktuellen Reihe ohne Lücken. Partitionen werden mit 1 startend nummeriert in der Reihenfolge, wie sie durch den ORDER-BY-Befehl in der Fensterdefinition festgelegt ist. Falls es keinen ORDER-BY-Befehl gibt, werden alle Zeilen als Peers angesehen und diese Funktion gibt immer 1 zurück. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () Ungeachtet des Namens gibt diese Funktion immer einen Wert zwischen 0.0 und 1.0 identisch zu (Rang - 1)/(Partitionszeilen - 1) zurück, wobei Rang der Wert der eingebauten Fensterfunktion rank() und Partitionszeilen die Gesamtanzahl der Zeilen in der Partition ist. Falls die Partition nur eine Zeile enthält, gibt diese Funktion 0.0 zurück. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. () Die kumulative Verteilung. Berechnet als Zeilenanzahl/Partitionszeilen, wobei Zeilenanzahl der durch row_number() zurückgegebene Wert für den letzten Peer in der Gruppe ist und Partitionszeilen die Anzahl der Zeilen in der Partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (N) Das Argument N wird als Integer behandelt. Diese Funktion teilt die Partition in N Gruppen so gleichmäßig wie möglich auf und weist jeder Gruppe einen Integer zwischen 1 und N zu, in der Reihenfolge, die durch den ORDER-BY-Befehl definiert ist, ansonsten in beliebiger Reihenfolge. Falls notwendig tauchen größere Gruppen als erstes auf. Diese Funktion gibt einen Integerwert zurück, der der Gruppe zugewiesen ist, zu der die aktuelle Zeile gehört. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr) Gibt das Ergebnis der Evaluation des Ausdrucks expr gegen die vorherige Zeile in der Partition zurück. Falls es keine vorhergehende Zeile gibt (weil die aktuelle Zeile die erste ist), wird NULL zurückgegeben. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset) Falls das Offset-Argument angegeben ist, dann muss dieses ein nicht-negativer Integerwert sein. In diesem Fall ist der Rückgabewert das Ergebnis der Evaluation von expr gegen die Zeile, die innerhalb der Partition offset Zeilen weiter oben liegt. Falls offset 0 ist, wird expr gegen die aktuelle Zeile evaluiert. Falls vor der aktuellen Zeile nicht genügend Zeilen vorhanden sind, wird NULL zurückgegeben. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr,offset,default) Falls auch default angegeben ist, dann wird dieser Wert anstatt NULL zurückgegeben, falls die durch offset angegebene Zeile nicht existiert. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr) Gibt das Ergebnis der Evaluation des Ausdrucks expr gegen die nächste Zeile in der Partition zurück. Falls es keine nächste Zeile gibt (weil die aktuelle Zeile die letzte ist), wird NULL zurückgegeben. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr,offset) Falls das Offset-Argument angegeben ist, dann muss dieses ein nicht-negativer Integerwert sein. In diesem Fall ist der Rückgabewert das Ergebnis der Evaluation von expr gegen die Zeile, die innerhalb der Partition offset Zeilen weiter unten liegt. Falls offset 0 ist, wird expr gegen die aktuelle Zeile evaluiert. Falls nach der aktuellen Zeile nicht genügend Zeilen vorhanden sind, wird NULL zurückgegeben. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) Diese eingebaute Fensterfunktion berechnet das Windowframe für jede Zeile auf die gleiche Art wie ein aggregierte Fensterfunktion. Sie gibt den Wert von expr evaluiert gegen die erste Zeile des Windowframes für jede Zeile zurück. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr) Diese eingebaute Fensterfunktion berechnet das Windowframe für jede Zeile auf die gleiche Art wie ein aggregierte Fensterfunktion. Sie gibt den Wert von expr evaluiert gegen die letzte Zeile des Windowframes für jede Zeile zurück. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. (expr,N) Diese eingebaute Fensterfunktion berechnet das Windowframe für jede Zeile auf die gleiche Art wie ein aggregierte Fensterfunktion. Sie gibt den Wert von expr evaluiert gegen die N-te Zeile des Windowframes für zurück. Die Zeilen werden beginnend bei 1 in der durch den ORDER-BY-Befehl definierten Reihenfolge nummeriert, falls dieser vorhanden ist, ansonsten in beliebiger Reihenfolge. Falls es keine N-te Zeile in der Partition gibt, dann wird NULL zurückgegeben. SqliteTableModel References %1(%2) Hold Ctrl+Shift and click to jump there Referenzen %1(%2) Strg+Shift halten und klicken, um hierher zu springen reading rows lese Zeilen loading... lade... References %1(%2) Hold %3Shift and click to jump there Referenzen %1(%2) Halten Sie %3Umschalt und klicken Sie, um hierher zu springen Error changing data: %1 Fehler beim Ändern der Daten: %1 retrieving list of columns ermittle Liste der Spalten Fetching data... Rufe Daten ab... Cancel Abbrechen VacuumDialog Compact Database Datenbank komprimieren Warning: Compacting the database will commit all of your changes. Warnung: Das Verdichten der Datenbank wird alle Ihre Änderungen übermitteln. Please select the databases to co&mpact: Bitte wählen Sie die zu ver&dichtenden Datenbanken aus: Warning: Compacting the database will commit all changes you made. Warnung: Das Komprimieren der Datenbank wird alle getätigten Änderungen übernehmen. Please select the objects to compact: Bitte zu komprimierende Objekte auswählen: sqlitebrowser-3.11.2/src/translations/sqlb_en_GB.ts000066400000000000000000007001461345112435200223660ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite Version <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> (based on SQLite %1) Version Built for Qt Version SQLCipher Version SQLite Version AddRecordDialog Add New Record Enter values for the new record considering constraints. Fields in bold are mandatory. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. Name Type Value Values to insert. Pre-filled default values are inserted automatically unless they are changed. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> Auto-increment Unique constraint Check constraint: %1 Foreign key: %1 Default value: %1 Error adding record. Message from database engine: %1 Are you sure you want to restore all the entered values to their defaults? Application Usage: %1 [options] [db] Possible command line arguments: -h, --help Show command line options -s, --sql [file] Execute this SQL file after opening the DB -t, --table [table] Browse this table after opening the DB This is DB Browser for SQLite version %1. -q, --quit Exit application after running scripts -R, --read-only Open database in read-only mode -o, --option [group/setting=value] Run application with this setting temporarily set to value -v, --version Display the current version [file] Open this SQLite database The -s/--sql option requires an argument The file %1 does not exist The -t/--table option requires an argument The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 CipherDialog SQLCipher encryption &Password &Reenter password Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze &KDF iterations HMAC algorithm KDF algorithm Passphrase Raw key Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. ColumnDisplayFormatDialog Choose display format Display format Choose a display format for the column '%1' which is applied to each value prior to showing it. Default Decimal number Exponent notation Hex blob Hex number Apple NSDate to date Java epoch (milliseconds) to date Julian day to date Unix epoch to local time Date as dd/mm/yyyy Lower case Octal number Round number Unix epoch to date Upper case Windows DATE to date Custom DBBrowserDB Please specify the database name under which you want to access the attached database Invalid file format Do you really want to close this temporary database? All data will be lost. Do you want to save the changes made to the database file %1? The database is currently busy: Do you want to abort that other operation? Exporting database to SQL file... Cancel No database file opened Executing SQL... Action cancelled. Error in statement #%1: %2. Aborting execution%3. and rolling back didn't receive any output from %1 could not execute command: %1 Cannot delete this object Cannot set data on this object A table with the name '%1' already exists in schema '%2'. renameColumn: cannot find column %1. renameColumn: creating savepoint failed. DB says: %1 renameColumn: creating new table failed. DB says: %1 renameColumn: copying data to new table failed. DB says: %1 renameColumn: deleting old table failed. DB says: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: renameColumn: releasing savepoint failed. DB says: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 ... <string can not be logged, contains binary data> ... could not get list of databases: %1 Error loading extension: %1 could not get column information could not get list of db objects: %1, %2 This database has already been attached. Its schema name is '%1'. didn't receive any output from pragma %1 could not execute pragma command: %1, %2 Error setting pragma %1 to %2: %3 File not found. DbStructureModel Name Object Type Schema Database Browsables All Temporary Tables (%1) Indices (%1) Views (%1) Triggers (%1) EditDialog Edit database cell Mode: Image &Import &Export Set this cell to NULL Set as &NULL Apply data to cell [Ctrl+Return] This button saves the changes performed in the cell editor to the database cell. Apply Text This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Binary JSON XML Automatically adjust the editor mode to the loaded data type This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Auto-switch Auto-format: pretty print on loading, compact on saving. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Autoformat Import from file Opens a file dialog used to import any kind of data to this database cell. Export to file Opens a file dialog used to export the contents of this database cell to a file. Erases the contents of the cell This area displays information about the data present in this database cell This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Type of data currently in cell Size of data currently in table Print... Open preview dialog for printing displayed image Ctrl+P Open preview dialog for printing displayed text Copy Hex and ASCII Copy selected hexadecimal and ASCII columns to the clipboard Ctrl+Shift+C Choose a filename to export data Type of data currently in cell: %1 Image %1x%2 pixel(s) Type of data currently in cell: NULL Type of data currently in cell: Text / Numeric Image data can't be viewed in this mode. Try switching to Image or Binary mode. Binary data can't be viewed in this mode. Try switching to Binary mode. Text files (*.txt) JSON files (*.json) XML files (*.xml) Image files (%1) Binary files (*.bin) All files (*) Choose a file to import %1 Image SVG files (*.svg) Hex dump files (*.txt) Invalid data for this mode The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? %n char(s) Type of data currently in cell: Valid JSON Type of data currently in cell: Binary %n byte(s) EditIndexDialog &Name Order &Table Edit Index Schema &Unique For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Partial inde&x clause Colu&mns Table column Type Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Index column Deleting the old index failed: %1 Creating the index failed: %1 EditTableDialog Edit table definition Table Advanced Database schema Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Without Rowid Fields Add field Remove field Move field up Move field down Name Type NN Not null PK Primary key AI Autoincrement U Unique Default Default value Check Check constraint Foreign Key <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> Error creating table. Message from database engine: %1 There already is a field with that name. Please rename it first or choose a different name for this field. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Modifying this column failed. Error returned from database: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Setting the rowid column for the table failed. Error message: %1 Changing the table schema failed. Error message: %1 ExportDataDialog Export data as CSV Tab&le(s) Colu&mn names in first line Fie&ld separator , ; Tab | Other &Quote character " ' New line characters Windows: CR+LF (\r\n) Unix: LF (\n) Pretty print Could not open output file: %1 Choose a filename to export data Text files(*.csv *.txt) Export data as JSON exporting CSV exporting JSON Text files(*.json *.js *.txt) Please select at least 1 table. Choose a directory Export completed. ExportSqlDialog Export SQL... Tab&le(s) Select All Deselect All &Options Keep column names in INSERT INTO Multiple rows (VALUES) per INSERT statement Export everything Export data only Keep old schema (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Export schema only Please select at least one table. Choose a filename to export Text files(*.sql *.txt) Export completed. Export cancelled or failed. ExtendedScintilla Ctrl+H Ctrl+P Find and Replace... Print... ExtendedTableWidget Use as Exact Filter Containing Not equal to Greater than Less than Greater or equal Less or equal Between this and... Set to NULL Copy Copy with Headers Copy as SQL Paste Print... Use in Filter Expression Alt+Del Ctrl+Shift+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? FileExtensionManager File Extension Manager &Up &Down &Add &Remove Description Extensions *.extension FilterLineEdit Filter These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Set Filter Expression What's This? Is NULL Is not NULL Is empty Is not empty Equal to... Not equal to... Greater than... Less than... Greater or equal... Less or equal... In range... FindReplaceDialog Find and Replace Fi&nd text: Re&place with: Match &exact case Match &only whole words When enabled, the search continues from the other end when it reaches one end of the page &Wrap around When set, the search goes backwards from cursor position, otherwise it goes forward Search &backwards <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Use regular e&xpressions Find the next occurrence from the cursor position and in the direction set by "Search backwards" &Find Next &Replace Highlight all the occurrences of the text in the page F&ind All Replace all the occurrences of the text in the page Replace &All The searched text was not found The searched text was not found. The searched text was found one time. The searched text was found %1 times. The searched text was replaced one time. The searched text was replaced %1 times. ForeignKeyEditor &Reset Foreign key clauses (ON UPDATE, ON DELETE etc.) ImportCsvDialog Import CSV file Table na&me &Column names in first line Field &separator , ; Tab | Other &Quote character " ' &Encoding UTF-8 UTF-16 ISO-8859-1 Trim fields? Separate tables Advanced When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Ignore default &values Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Fail on missing values Disable data type detection Disable the automatic data type detection when creating a new table. Deselect All Match Similar Select All Import completed There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. There is already a table named '%1'. Do you want to import the data into it? Creating restore point failed: %1 Creating the table failed: %1 importing CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Inserting row failed: %1 MainWindow DB Browser for SQLite toolBar1 Select a table to browse data Use this list to select a table to be displayed in the database view This button refreshes the data in the currently selected table. Opens the SQLCipher FAQ in a browser window Export one or more table(s) to a JSON file Refresh F5 Clear all filters &Table: Insert a new record in the current table New Record Delete the current record Delete Record <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> |< < 0 - 0 of 0 > Scroll to the end <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> Go to: Enter record number to browse Type a record number in this area and click the Go to: button to display the record in the database view 1 &File &Import &Export &Edit &View &Help DB Toolbar Edit Database &Cell DB Sche&ma &Remote Execute current line [Shift+F5] This button executes the SQL statement present in the current editor line Shift+F5 Edit display format Edit the display format of the data in this column Show rowid column Toggle the visibility of the rowid column Set encoding Change the encoding of the text in the table cells Set encoding for all tables Change the default encoding assumed for all tables in the database Open an existing database file in read only mode Unlock view editing This unlocks the current view for editing. However, you will need appropriate triggers for editing. User Database Structure This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Browse Data Refresh the data in the selected table [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. Save the table as currently displayed <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> ... Print currently browsed table data [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> This button deletes the record or records currently selected in the table This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Scroll one page upwards <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> Scroll one page downwards <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> Edit Pragmas Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Execute SQL &Tools Application This button clears the contents of the SQL logs &Clear This panel lets you examine a log of all SQL commands issued by the application or by yourself This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Project Toolbar Extra DB toolbar Close the current database file &New Database... Create a new database file This option is used to create a new database file. Ctrl+N &Open Database... Open an existing database file This option is used to open an existing database file. Ctrl+O &Close Database This button closes the connection to the currently open database file Ctrl+W Revert database to last saved state This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Write changes to the database file This option is used to save changes to the database file. Ctrl+S Compact &Database... Compact the database file, removing space wasted by deleted records Compact the database file, removing space wasted by deleted records. E&xit Ctrl+Q Import data from an .sql dump text file into a new or existing database. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Open a wizard that lets you import data from a comma separated text file into a database table. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Export a database to a .sql dump text file. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Export a database table as a comma separated text file. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Delete Table Open the Delete Table wizard, where you can select a database table to be dropped. Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Open the Create Index wizard, where it is possible to define a new index on an existing database table. &Preferences... Open the preferences window. &DB Toolbar Shows or hides the Database toolbar. Shift+F1 &Wiki Bug &Report... Feature Re&quest... Web&site &Donate on Patreon... Sa&ve Project... This button lets you open a DB4S project file &Attach Database... Add another database file to the current database connection This button lets you add another database file to the current database connection &Set Encryption... SQLCipher &FAQ Table(&s) to JSON... Open Data&base Read Only... Save results Save the results view This button lets you save the results of the last executed query Find text in SQL editor Find text in SQL editor [Ctrl+F] This button opens the search bar of the editor Ctrl+F Find or replace text in SQL editor Find or replace text in SQL editor [Ctrl+H] This button opens the find/replace dialog for the current editor tab Export to &CSV Save as &view Save as view Hide column(s) Hide selected column(s) Show all columns Show all columns that were hidden Shows or hides the Project toolbar. Extra DB Toolbar Export the filtered data to CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Save the current filter, sort column and display formats as a view This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Insert Values... Open a dialog for inserting values in a new record Insert new record using default values in browsed table New In-&Memory Database Drag && Drop Qualified Names Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Drag && Drop Enquoted Names Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor &Integrity Check Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. &Foreign-Key Check Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab &Quick Integrity Check Run a quick integrity check over the open DB Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. &Optimize Attempt to optimize the database Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Print Print text from current SQL editor tab [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Print the structure of the opened database [Ctrl+P] Open a dialog for printing the structure of the opened database &Recently opened Open &tab Ctrl+T SQL &Log Show S&QL submitted by &Plot &Revert Changes &Write Changes &Database from SQL file... &Table from CSV file... &Database to SQL file... &Table(s) as CSV file... &Create Table... &Delete Table... &Modify Table... Create &Index... W&hat's This? &About This button opens a new tab for the SQL editor &Execute SQL Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. Open SQL file This button opens a file containing SQL statements and loads it in a new editor tab Save SQL file &Load Extension... Execute current line Ctrl+E Export as CSV file Export table as comma separated values file Save the current session to a file This button lets you save all the settings associated to the open DB to a DB4S project file Open &Project... Load a working session from a file Save SQL file as This button saves the content of the current SQL editor tab to a file &Browse Table Copy Create statement Copy the CREATE statement of the item to the clipboard Ctrl+Return Ctrl+L Ctrl+P Ctrl+D Ctrl+I Encrypted Read only Database file is read only. Editing the database is disabled. Database encoding Database is encrypted using SQLCipher Choose a database file Choose a filename to save under Error deleting record: %1 Please select a record first %1 - %2 of %3 There is no database opened. Please open or create a new database file. Error checking foreign keys after table modification. The changes will be reverted. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? , %1 rows affected At line %1: Result: %2 Text files(*.csv *.txt);;All files(*) Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Are you sure you want to undo all changes made to the database file '%1' since the last save? Choose a file to import Text files(*.sql *.txt);;All files(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. File %1 already exists. Please choose a different name. Error importing data: %1 Import completed. Delete View Modify View Delete Trigger Modify Trigger Delete Index Modify Index Modify Table &%1 %2 Extensions(*.so *.dylib *.dll);;All files(*) Choose a project file to open This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Duplicate records Duplicate record Ctrl+" Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Setting PRAGMA values will commit your current transaction. Are you sure? Could not open database file. Reason: %1 In-Memory database determining row count... %1 - %2 of >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Are you sure you want to delete the view '%1'? Are you sure you want to delete the trigger '%1'? Are you sure you want to delete the index '%1'? Error: could not delete the table. Error: could not delete the view. Error: could not delete the trigger. Error: could not delete the index. Message from database engine: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? -- EXECUTING SELECTION IN '%1' -- -- EXECUTING LINE IN '%1' -- -- EXECUTING ALL IN '%1' -- Execution aborted by user executing query %1 rows returned in %2ms query executed successfully. Took %1ms%2 Choose text files Import completed. Some foreign key constraints are violated. Please fix them before saving. Select SQL file to open Couldn't read file: %1. Couldn't save file: %1. Select file name Select extension file Extension successfully loaded. Error loading extension: %1 Don't show again New version available. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Collation needed! Proceed? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! creating collation Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Please specify the view name There is already an object with that name. Please choose a different name. View successfully created. Error creating view: %1 There is no filter set for this table. View will not be created. Delete Records This action will open a new SQL tab for running: Press Help for opening the corresponding SQLite reference page. Choose a axis color Choose an axis colour DB Browser for SQLite project file (*.sqbpro) Please choose a new encoding for this table. Please choose a new encoding for all tables. %1 Leave the field empty for using the database encoding. This encoding is either not valid or not supported. NullLineEdit Set to NULL Alt+Del PlotDock Plot <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> Columns X Y Axis Type Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Line type: None Line StepLeft StepRight StepCenter Impulse Point shape: Cross Plus Circle Disc Square Diamond Star Triangle TriangleInverted CrossSquare PlusSquare CrossCircle PlusCircle Peace <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> Save current plot... Load all data and redraw plot Row # Choose a axis color Choose an axis colour Copy Print... Show legend Stacked bars Date/Time Date Time Numeric Label Invalid Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Choose an axis color Choose a filename to save under PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. PreferencesDialog Preferences &General Remember last location Always use this location Remember last location for session only ... Default &location Lan&guage Automatic &updates enabled Show remote options &Database Database &encoding Open databases with foreign keys enabled. &Foreign keys SQ&L to execute after opening database Data &Browser Remove line breaks in schema &view Prefetch block si&ze Advanced Default field type Font &Font Content Symbol limit in cell NULL Regular Binary Background Filters Escape character Delay time (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. &SQL Settings name Context Colour Bold Italic Underline Keyword Function Table Comment Identifier String Current line SQL &editor font size Tab size SQL editor &font Error indicators Hori&zontal tiling If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Code co&mpletion Toolbar style Only display the icon Only display the text The text appears beside the icon The text appears under the icon Follow the style DB file extensions Manage When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Font si&ze This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Row count threshold for completion Field display Displayed &text Text color Background color Preview only (N/A) Foreground SQL &results font size &Wrap lines Never At word boundaries At character boundaries At whitespace boundaries &Quotes for identifiers Choose the quoting mechanism used by the application for identifiers in SQL code. "Double quotes" - Standard SQL (recommended) `Grave accents` - Traditional MySQL quotes [Square brackets] - Traditional MS SQL Server quotes Keywords in &UPPER CASE When set, the SQL keywords are completed in UPPER CASE letters. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background &Extensions Select extensions to load for every database: Add extension Remove extension <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> Disable Regular Expression extension <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Remote CA certificates Subject CN Common Name Subject O Organization Valid from Valid to Serial number Your certificates File Subject Common Name Issuer CN Issuer Common Name Clone databases into Choose a directory The language will change after you restart the application. Select extension file Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file No certificates found in this file. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. QObject Error importing data from record number %1 . %1 Importing CSV file... Cancel All files (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 Error opening remote file at %1. %2 Error: Invalid client certificate specified. Please enter the passphrase for this client certificate in order to authenticate. Cancel Uploading remote database to %1 Downloading remote database from %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. Error: The network is not accessible. Error: Cannot open the file for sending. Error opening local databases list. %1 Error creating local databases list. %1 RemoteDock Remote Identity Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Go Push currently opened database to server <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> RemoteModel Name Last modified Size Commit bytes RemotePushDialog Push database Database na&me to push to Commit message <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Public Branch Force push Database will be public. Everyone has read access to it. Database will be private. Only you have access to it. Use with care. This can cause remote commits to be deleted. Unspecified SqlExecutionArea Form Find previous match [Shift+F3] Find previous match with mapping Shift+F3 The found pattern must be a whole word Whole Words Text pattern to find considering the checks in this frame Find in editor The found pattern must match in letter case Case Sensitive Find next match [Enter, F3] Find next match with wrapping F3 Interpret search pattern as a regular expression <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Regular Expression Close Find Bar <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements This field shows the results and status codes of the last executed statements. SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) ltrim(X) removes spaces from the left side of X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X) rtrim(X) removes spaces from the right side of X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. (X) trim(X) removes spaces from both ends of X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. SqliteTableModel reading rows loading... References %1(%2) Hold %3Shift and click to jump there Error changing data: %1 retrieving list of columns Fetching data... Cancel VacuumDialog Compact Database Warning: Compacting the database will commit all of your changes. Please select the databases to co&mpact: sqlitebrowser-3.11.2/src/translations/sqlb_es_ES.ts000066400000000000000000012257751345112435200224250ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite Acerca de «DB Browser for SQLite» Version Versión <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>«DB Browser for SQLite» es una herramienta visual, libre y de fuente abierta usada para crear, diseñar y editar archivos de bases de datos SQLite.</p><p>Está licenciada dualmente con la Mozilla Public License Versión 2, y con la GNU General Public License Versión 3 o posterior. Usted puede modificarla o redistribuirla bajo las condiciones de estas licencias.</p><p>Vea <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> y <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> para más detalles.</p><p>Para más información sobre este programa visite nuestra página web: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">Esta aplicación utiliza GPL/LGPL Qt Toolkit de </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Vea </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> para los términos de licencia e información.</span></p><p><span style=" font-size:small;">Además utiliza el conjunto de iconos Silk de Mark James licenciado bajo la licencia Creative Commons Attribution 2.5 y 3.0.<br/>Vea </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> para los detalles.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body> <p>DB Browser para SQLite es una herramienta gratuita y de código abierto usada para crear, diseñar y editar archivos de bases de datos de SQLite.</p> <p>Está doblemente licenciada con Mozilla Public License Version 2, y también con GNU General Public License Version 3 o posterior. Puede modificarla o redistribuirla bajo las condiciones de esas licencias.</p> <p>Vea <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> y <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> para los detalles.</p> <p>Para más información acerca de este programa visite, por favor, nuestra página web en: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p> <p><span style=" font-size:small;">Este software usa el GPL/LGPL Qt Toolkit de </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Vea </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> para más información y las condiciones de la licencia.</span> </p><p><span style=" font-size:small;">También usa el conjunto de iconos Silk de Mark James licenciado bajo Creative Commons Attribution 2.5 y 3.0.<br/>Vea </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> para los detalles.</span></p></body></html> (based on SQLite %1) (basado en SQLite %1) Version Versión Built for Compilado para Qt Version Versión de Qt SQLCipher Version Versión de SQLCipher SQLite Version Versión de SQLite AddRecordDialog Add New Record Añadir nuevo registro Enter values for the new record considering constraints. Fields in bold are mandatory. Introduzca valores para el nuevo registro teniendo en cuenta las restricciones. Los campos en negrita son obligatorios. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. En la columna Valor puede especificar el valor del campo identificado en la columna Nombre. La columna Tipo indica el tipo de campo. Los valores por defecto se muestran en la misma tipografía que los valores NULL. Name Nombre Type Tipo Value Valor Values to insert. Pre-filled default values are inserted automatically unless they are changed. Valores a insertar. Los valores mostrados por defecto son insertados automáticamente a menos que se cambien. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. Cuando se editan los valores en el cuadro superior, aquí se muestra la consulta SQL para insertar este nuevo registro. Puede editarla antes de guardar. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">Guardar</span> enviará a la base de datos la sentencia SQL mostrada para insertar el nuevo registro.</p><p><span style=" font-weight:600;">Restituir valores por Defecto</span> restituirá los valores iniciales en la columna <span style=" font-weight:600;">Valor</span></p><p><span style=" font-weight:600;">Cancelar</span> cierra este diálogo sin ejecutar la consulta.</p></body></html> Auto-increment Auto-incremento Unique constraint Restricción UNIQUE Check constraint: %1 Restricción CHECK: %1 Foreign key: %1 Clave foránea: %1 Default value: %1 Valor por defecto: %1 Error adding record. Message from database engine: %1 Error añadiendo registro. Mensaje de la base de datos: %1 Are you sure you want to restore all the entered values to their defaults? ¿Está seguro de que quiere restaurar todos los valores introducidos a sus valores por defecto? Application Usage: %1 [options] [db] Uso: %1 [opciones] [bd] Possible command line arguments: Argumentos de línea de comandos disponibles: -h, --help Show command line options -h, --help Muestra opciones de línea de comandos -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [archivo] Ejecuta este archivo de SQL tras abrir la base de datos -h, --help Show command line options -h, --help Mostrar opciones de línea de comandos -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [archivo] Ejecutar este archivo de SQL tras abrir la base de datos -t, --table [table] Browse this table after opening the DB -t, --table [tabla] Mostrar esta tabla en la hoja de datos tras abrir la base de datos -q, --quit Exit application after running scripts -q, --quit Salir de la aplicación tras ejecutar los scripts -R, --read-only Open database in read-only mode -R, --read-only Abrir base de datos en modo de solo-lectura -o, --option [group/setting=value] Run application with this setting temporarily set to value -o, --option [grupo/ajuste=valor] Ejecutar la aplicación con este ajuste establecido temporalmente a este valor -v, --version Display the current version -v, --version Mostrar la versión actual [file] Open this SQLite database [archivo] Abrir esta base de datos de SQLite This is DB Browser for SQLite version %1. Esto es «DB Browser for SQLite» versión %1. This is DB Browser for SQLite version %1%2. Esto es DB Browser para SQLite versión %1%2. The -s/--sql option requires an argument La opción -s/--sql necesita un argumento The file %1 does not exist El archivo %1 no existe The -t/--table option requires an argument La opción -t/--table necesita un argumento The -o/--option option requires an argument in the form group/setting=value La opción -o/--option requiere un argumento con la forma grupo/ajuste=valor Invalid option/non-existant file: %1 Opción inválida o archivo inexistente: %1 CipherDialog SQLCipher encryption Cifrado con SQLCipher &Password &Clave &Reenter password &Reintroducir clave Encr&yption settings Ajustes de &cifrado SQLCipher &3 defaults Predeterminados de SQLCipher &3 SQLCipher &4 defaults Predeterminados de SQLCipher &4 Custo&m &Personalizado Page si&ze &Tamaño de página &KDF iterations Iteraciones &KDF HMAC algorithm Algoritmo HMAC KDF algorithm Algoritmo KDF Passphrase Frase de contraseña Raw key Clave en bruto Page &size &Tamaño de página Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Por favor, elija una clave para cifrar la base de datos. Tenga en cuenta que: - Si modifica cualquiera de los otros ajustes opcionales necesitará reintroducirlos también cada vez que abra la base de datos. - Puede dejar los campos de clave en blanco para no usar cifrado. - El proceso de cifrado puede llevar algún tiempo. - ¡Debería hacer una copia de respaldo de la base de datos! - Los cambios no guardados son aplicados antes de modificar el cifrado. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. Por favor, introduzca la clave a usar en el cifrado de la base de datos. Si se modificaron cualquiera de los otros ajustes para este archivo de base de datos, también tendrá que proporcionar esta información. ColumnDisplayFormatDialog Choose display format Elija el formato de presentación Display format Formato de presentación Choose a display format for the column '%1' which is applied to each value prior to showing it. Elija el formato para la columna «%1» el cual se aplicará a cada valor antes de mostrarlo. Default Por defecto Decimal number Número decimal Exponent notation Notación exponencial Hex blob Secuencia hexadecimal Hex number Número hexadecimal Apple NSDate to date Fecha de Apple NSDate a fecha Java epoch (milliseconds) to date Tiempo Java (milisegundos) a fecha Julian day to date Fecha juliana a fecha Unix epoch to local time Tiempo Unix a hora local Date as dd/mm/yyyy Fecha dd/mm/aaaa Lower case Minúsculas Octal number Número octal Round number Número redondeado Unix epoch to date Tiempo Unix a fecha Upper case Mayúsculas Windows DATE to date Fecha Windows a fecha Custom A medida DBBrowserDB no error Sin errores Please specify the database name under which you want to access the attached database Por favor, especifique el nombre con el que acceder a la base de datos anexada Invalid file format Formato de archivo inválido Do you want to save the changes made to the database file %1? ¿Guardar los cambios hechos al archivo de base de datos «%1»? Exporting database to SQL file... Exportando base de datos a un archivo SQL... Cancel Cancelar Executing SQL... Ejecutando SQL... Action cancelled. Acción cancelada. Error in statement #%1: %2. Aborting execution. Error en la sentencia #%1: %2. Abortando ejecución. renameColumn: cannot find table %1. renameColumn: no se puede encontrar la tabla %1. This database has already been attached. Its schema name is '%1'. Esta base de datos ya ha sido anexada. Su nombre de esquema es «%1». Do you really want to close this temporary database? All data will be lost. ¿Está seguro de que quiere cerrar esta base de datos temporal? Todos los datos se perderán. The database is currently busy: La base de datos está actualmente ocupada: Do you want to abort that other operation? ¿Desea abortar la otra operación? No database file opened No hay una base de datos abierta Error in statement #%1: %2. Aborting execution%3. Error en la sentencia #%1: %2. Abortando ejecución%3. and rolling back y deshaciendo cambios didn't receive any output from %1 no se recibió ninguna salida de «%1» could not execute command: %1 no se pudo ejecutar el comando: «%1» Cannot delete this object No se puede borrar este objeto Cannot set data on this object No se pueden poner datos en este objeto A table with the name '%1' already exists in schema '%2'. Una tabla con el nombre «%1» ya existe en el esquema «%2». renameColumn: cannot find column %1. renameColumn: no se puede encontrar la columna «%1». renameColumn: creating savepoint failed. DB says: %1 renameColumn: creación del savepoint fallido. La base de datos dice: %1 renameColumn: creating new table failed. DB says: %1 renameColumn: creación de la nueva tabla fallida. La base de datos dice: %1 renameColumn: copying data to new table failed. DB says: %1 renameColumn: copia de datos a la nueva table fallida. La base de datos dice: %1 renameColumn: deleting old table failed. DB says: %1 renameColumn: borrado de tabla fallido. La base de datos dice: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: La restitución de algunos de los objetos asociados con esta tabla ha fallado. Lo más probable es que esto suceda porque los nombres de algunas columnas han cambiado. Esta es la sentencia SQL que puede que quiera corregir y ejecutar manualmente: renameColumn: releasing savepoint failed. DB says: %1 renameColumn: liberación del savepoint fallido. La base de datos dice: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Error renombrando la tabla «%1» a «%2». Mensaje de la base de datos: «%3» ... <string can not be logged, contains binary data> ... ... <la cadena no se puede registrar; contiene datos binarios> ... could not get list of databases: %1 no se pudo obtener lista de bases de datos: %1 Error loading extension: %1 Error cargando la extensión: %1 could not get column information No se pudo obtener información de la columna unknown object type %1 tipo de objeto desconocido %1 could not get list of db objects: %1, %2 No se pudo obtener la lista de objetos de la base de datos: %1, %2 could not get types No se pudieron obtener los tipos didn't receive any output from pragma %1 No se obtuvo ninguna salida del pragma %1 could not execute pragma command: %1, %2 No se pudo ejecutar el comando pragma: %1, %2 Error setting pragma %1 to %2: %3 Error definiendo pragma %1 como %2: %3 File not found. Archivo no encontrado. DbStructureModel Name Nombre Object Objeto Type Tipo Schema Esquema Browsables (%1) Navegables (%1) Database Base de datos Browsables Navegables All Todos Temporary Temporal Tables (%1) Tablas (%1) Indices (%1) Índices (%1) Views (%1) Vistas (%1) Triggers (%1) Disparadores (%1) EditDialog Edit database cell Editar celda de la base de datos Mode: Modo: This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Esta es la lista de modos admitidos en el editor de celdas. Elija un modo para visualizar o editar los datos de la celda actual. Image Imagen JSON JSON XML XML Automatically adjust the editor mode to the loaded data type Ajustar automáticamente el modo de edición al tipo de datos cargados This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Esta casilla activa o desactiva el cambio automático del modo de edición. Cuando se selecciona una nueva celda o se importan nuevos datos y la selección automática está activada, el modo de edición se ajusta al tipo de datos detectados. El modo de edición para la celda se puede cambiar manualmente. Si prefiere mantener el modo de edición seleccionado manualmente mientras se mueve por las celdas, desmarque la casilla. Auto-switch Auto-selección Auto-format: pretty print on loading, compact on saving. Auto-formato: dar formato al cargar, compactar al guardar. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Si se habilita, la opción de auto-formato da formato a los datos al cargarlos, rompiendo y sangrando las líneas de texto para una legibilidad máxima. Al guardar los datos, esta opción los compacta, eliminando fines de línea y espacio en blanco innecesario. Autoformat Auto-formato Import from file Importar desde archivo Opens a file dialog used to import any kind of data to this database cell. Abre un diálogo para elegir el archivo para importar cualquier tipo de datos a esta celda. Export to file Exportar a archivo Opens a file dialog used to export the contents of this database cell to a file. Abre un diálogo para elegir el archivo al que exportar el contenido de esta celda de la base de datos. Print... Imprimir... Open preview dialog for printing displayed image Abre un diálogo de previsualización para imprimir la imagen mostrada Ctrl+P Ctrl+P Open preview dialog for printing displayed text Abre un diálogo de previsualización para imprimir el texto mostrado Copy Hex and ASCII Copiar hex. y ASCII Copy selected hexadecimal and ASCII columns to the clipboard Copia las columnas seleccionadas en hexadecimal y ASCII al portapapeles Ctrl+Shift+C Ctrl+Shift+C Import text Importa texto Opens a file dialog used to import text to this database cell. Abre una ventana para importar texto a esta celda de la base de datos. &Import &Importar Export text Exporta texto Opens a file dialog used to export the contents of this database cell to a text file. Abre una ventana para exportar el contenido de esta celda a un archivo de texto. &Export E es el acelerador del menú editar E&xportar Set this cell to NULL Borra esta celda a NULL Set as &NULL Borrar a &NULL This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Este modo del editor le permite editar datos JSON o XML con resalte de sintaxis, formato automático y validación antes de guardar. Los errores se indican con un subrayado ondulado rojo. Apply data to cell [Ctrl+Return] Aplicar los datos a la celda [Ctrl+Return] This button saves the changes performed in the cell editor to the database cell. Este botón guarda los cambios realizados en el editor a la celda de la base de datos. Apply Aplicar Text Texto Binary Binario Clear cell data Borrar datos de la celda Erases the contents of the cell Borra el contenido de la celda &Clear &Borrar <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warning: Editing binary content in text mode may result in corrupted data!</span></p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#c00000;">¡Precaución: Editar contenido binario en modo texto puede dañar los datos!</span></p></body></html> This area displays information about the data present in this database cell Esta zona muestra información acerca de los datos presentes en esta celda de la base de datos Type of data currently in cell Tipo de datos actualmente en la celda Size of data currently in table Tamaño de los datos actualmente en la tabla Choose a file Seleccione un archivo Text files(*.txt);;Image files(%1);;All files(*) Archivos de texto(*.txt);;Archivos de imagen(%1);;Todos los archivos(*) Choose a filename to export data Seleccione un nombre de archivo para exportar los datos Text files(*.txt);;All files(*) Archivos de texto(*.txt);;Todos los archivos(*) Image data can't be viewed with the text editor Los datos de imagen no se pueden mostrar en el editor de texto Binary data can't be viewed with the text editor Los datos binarios no se pueden mostrar en el editor de texto Image data can't be viewed in this mode. Datos de imagen no se puede visualizar en este modo. Try switching to Image or Binary mode. Intente cambiando al modo «Imagen» o «Binario». Binary data can't be viewed in this mode. Datos binarios no se puede visualizar en este modo. Try switching to Binary mode. Intente cambiando al modo «Binario». Text files (*.txt) Archivos de texto (*.txt) JSON files (*.json) Archivos JSON (*.json) XML files (*.xml) Archivos XML (*.xml) Image files (%1) Archivos de imagen (%1) Binary files (*.bin) Archivos binarios (*.bin) All files (*) Todos los archivos (*) Choose a file to import Seleccione el archivo a importar %1 Image %1 Imagen SVG files (*.svg) Archivos SVG (*.svg) Hex dump files (*.txt) Archivos de volcado hex. (*.txt) Text files (*.txt);;Image files (%1);;JSON files (*.json);;XML files (*.xml);;Binary files (*.bin);;All files (*) Archivos de texto (*.txt);;Archivos de imagen (%1);;Archivos JSON (*.json);;Archivos XML (*.xml);;Archivos binarios (*.bin);;Todos los archivos (*) Binary files(*.bin);;All files(*) Archivos binarios (*.bin);;Todos los archivos (*) JSON files(*.json);;All files(*) Archivos JSON (*.json);;Todos los archivos (*) SVG files(*.svg);;All files(*) Archivos SVG(*.svg);;Todos los archivos (*) Invalid data for this mode Datos inválidos para este modo The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? La celda contiene datos de tipo %1 inválidos. Razón: «%2». ¿Realmente desea aplicarlos a la celda? Type of data currently in cell: %1 Image El tipo de datos en la celda es: Imagen %1 %1x%2 pixel(s) %1×%2 píxel(s) Type of data currently in cell: NULL El tipo de datos en la celda es: NULL Type of data currently in cell: Valid JSON Tipo de datos actualmente en la celda: JSON válido Type of data currently in cell: Null Tipo de datos actualmente en la celda: Null Type of data currently in cell: Text / Numeric Tipo de datos actualmente en la celda: Texto / Numérico %n char(s) %n carácter %n caracteres Type of data currently in cell: Image Tipo de datos actualmente en la celda: Imagen %1x%2 pixel %1x%2 píxel Type of data currently in cell: Binary Tipo de datos actualmente en la celda: Binario %n byte(s) %n byte %n bytes EditIndexDialog Create New Index Crear un Índice Nuevo &Name &Nombre &Columns &Columnas Column Columna Use in Index Usar como Índice Order Orden &Table &Tabla Edit Index Schema Editar índice del esquema &Unique &Único For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Para restringir el índice exclusivamente a una parte de la tabla hay que especificar aquí una cláusula WHERE que seleccione la parte de la tabla que será indexada Partial inde&x clause Cláusula para inde&xado parcial Colu&mns Colu&mnas Table column Columna de la tabla Type Tipo Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Añade una nueva columna computada al índice. Las columnas computadas contienen una expresión SQL en lugar de nombres de columna. Index column Columna de índice Deleting the old index failed: %1 Borrado del índice previo fallido: %1 Creating the index failed: %1 Creación de índice fallida: %1 EditTableDialog Edit table definition Editar la definición de la tabla Table Tabla Advanced Avanzado Database schema El contexto es claro, mejor omitir "de la base de datos" Esquema Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Hacer de esta una tabla «SIN rowid». Para activar este flag es necesario un campo de tipo ENTERO con la clave primaria activada y el indicador de autoincremento desactivado. Without Rowid Sin Rowid Set this to create a temporary table that is deleted when closing the database. Hacer de esta una tabla temporal que se borrará al cerrar la base de datos. Temporary table Tabla temporal Fields Campos Add field Añadir campo Remove field Eliminar campo Move field up Mover campo hacia arriba Move field down Mover campo hacia abajo Name Nombre Type Tipo NN NN Not null No nulo PK PK Primary key Clave primaria AI AI Autoincrement Autoincremento U U Unique Único Default Por defecto Default value Valor por defecto Check Check Check constraint Comprobar restricción Foreign Key Clave foránea <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Aviso: </span>algo ocurre con la definición de esta tabla que nuestro intérprete no entiende completamente. Modificar y guardar esta tabla podría traer problemas.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result it in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Cuidado: </span>Hay algo en la definición de esta tabla que nuestro intérprete no entiende del todo. Modificar y guardar esta tabla puede causar problemas.</p></body></html> Error creating table. Message from database engine: %1 Error creando la tabla. Mensaje de la base de datos: %1 There already is a field with that name. Please rename it first or choose a different name for this field. Ya hay un campo con este nombre. Por favor, renómbrelo antes o elija un nombre diferente para este campo. This column is referenced in a foreign key in table %1, column %2 and thus its name cannot be changed. Esta columna está referenciada en una foreign key en la tabla %1, columna %2 y por tanto no se le puede cambiar el nombre. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. Esta columna está referenciada en una clave foránea en la tabla %1 y por tanto no se le puede cambiar el nombre. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. Hay al menos una línea con este campo NULO. Esto hace imposible activar este flag. Por favor, modifique antes los datos de la tabla. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Hay al menos una línea con un valor no entero en este campo. Esto hace imposible activar el flag AI. Por favor, modifique antes los datos de la tabla. Column '%1' has duplicate data. La columna «%1» tiene datos duplicados. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Como en otros textos, pasamos los términos estándar de SQL a mayúsculas para evitar traducirlos, lo que podría ser más confuso para el usuario experto y no tener beneficio para el inexperto. Esto imposibilita la habilitación de la restricción UNIQUE. Por favor, elimine primero los datos duplicados, lo cual permitirá habilitar la restricción UNIQUE. Column '%1' has no unique data. La columna «%1» no tiene datos únicos. Setting the rowid column for the table failed. Error message: %1 El ajuste de la columna rowid para la tabla falló. Mensaje de error: %1 Changing the table schema failed. Error message: %1 Falló el cambio de esquema de la tabla. Mensaje de error: %1 Setting the temporary flag for the table failed. Error message: %1 Activación de la marca de tabla temporal fallida. Mensaje de error: %1 Column `%1` has no unique data. La columna '%1' no tiene datos únicos. This makes it impossible to set this flag. Please change the table data first. Esto hace imposible activar este flag. Por favor, modifique antes los datos de la tabla. Modifying this column failed. Error returned from database: %1 La modificación de esta columna falló. Error devuelto por la base de datos: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. ¿Está seguro de que quiere borrar este campo «%1»? Todos los datos actualmente almacenados en este campo se perderán. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Por favor añada un campo que cumpla las siguientes condiciones antes de activar el indicador «sin rowid»: - Indicador de clave primaria activado - Indicador de autoincremento desactivado ExportDataDialog Export data as CSV Exportar datos como CSV &Table(s) &Tablas(s) &Column names in first line Nombres de las &columnas en la primera línea Field &separator &Separador de campos Tab&le(s) Tab&la(s) Colu&mn names in first line Nombres de las &columnas en la primera línea Fie&ld separator &Separador de campos , , ; ; Tab Tab | | Other Otro &Quote character &Entrecomillado " " ' ' New line characters Caracteres de nueva línea Windows: CR+LF (\r\n) Windows: CR+LF (\r\n) Unix: LF (\n) Unix: LF (\n) Pretty print Impresión formateada Could not open output file: %1 No se puede abrir el archivo de salida: %1 Choose a filename to export data Seleccione un nombre de archivo para exportar los datos Text files(*.csv *.txt) Archivos de texto(*.csv *.txt) Export data as JSON Exportar datos como JSON exporting CSV exportando CSV exporting JSON exportando JSON Text files(*.json *.js *.txt) Archivos de texto(*.json *.js *.txt) Please select at least 1 table. Por favor, seleccione al menos 1 tabla. Choose a directory Seleccione una carpeta Export completed. Exportación completada. ExportSqlDialog Export SQL... Exportar SQL... &Table(s) &Tabla(s) Tab&le(s) Tab&la(s) Select All Seleccionar Todo Deselect All Deseleccionar Todo &Options &Opciones Keep column names in INSERT INTO Mantener el nombre de la columna en INSERT INTO Multiple rows (VALUES) per INSERT statement Múltiples líneas (VALUES) en cada sentencia INSERT Export everything Exportar todo Export data only Exportar solo los datos Keep old schema (CREATE TABLE IF NOT EXISTS) Mantener esquema previo (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Sobrescribir esquema previo (DROP TABLE, después CREATE TABLE) New INSERT INTO syntax (multiple rows in VALUES) Usa nueva sintáxis de INSERT INTO (múltiple 'rows' en VALUES) Export schema only Exportar solo el esquema Please select at least 1 table. Por favor, seleccione al menos 1 tabla. Please select at least one table. Por favor, seleccione al menos una tabla. Choose a filename to export Seleccione un nombre de archivo al que exportar Text files(*.sql *.txt) Archivos de texto(*.sql *.txt) Export completed. Exportación completada. Export cancelled or failed. Exportación cancelada o fallida. ExtendedScintilla Ctrl+H Ctrl+H Ctrl+P Ctrl+P Find and Replace... Buscar y reemplazar... Print... Imprimir... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? El contenido del portapapeles es mayor que el rango seleccionado. ¿Quiere insertarlo de todos modos? Use as Exact Filter Usar como filtro exacto Containing Conteniendo Not equal to No igual a Greater than Mayor que Less than Menor que Greater or equal Mayor o igual Less or equal Menor o igual Between this and... Entre esto y... Set to NULL Poner a NULL Copy Copiar Copy with Headers Copiar con cabeceras Copy as SQL Copiar como SQL Paste Pegar Print... Imprimir... Use in Filter Expression Usar en expresión de filtro Alt+Del Ctrl+Shift+C Ctrl+Shift+C Ctrl+Alt+C Ctrl+Alt+C Use as Filter Usar como filtro The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? El contenido del portapapeles es mayor que el rango seleccionado. ¿Quiere insertarlo de todos modos? FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Archivos de base de datos de SQLite (*.db *.sqlite *.sqlite3 *.db3);;Todos los archivos (*) FileExtensionManager File Extension Manager Gestor de extensiones de archivos &Up &Subir &Down &Bajar &Add &Añadir &Remove &Eliminar Description Descripción Extensions Extensiones *.extension *.extensión FilterLineEdit Filter Filtro These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Estos campos de texto permiten realizar filtros rápidos sobre la tabla actualmente seleccionada. Por defecto, las filas que contengan el texto introducido se muestran. Los siguientes operadores también se admiten: % Comodín > Mayor que < Menor que >= Igual o mayor que <= Igual o menor que = Igual a: correspondencia exacta <> Distinto: correspondencia inversa exacta x~y Rango: valores entre x e y Set Filter Expression Establecer expresión de filtro What's This? ¿Qué es esto? Is NULL Es nulo Is not NULL No es nulo Is empty Es vacío Is not empty No es vacío Equal to... Igual a... Not equal to... No igual a... Greater than... Mayor que... Less than... Menor que... Greater or equal... Mayor o igual... Less or equal... Menor o igual... In range... En el rango... FindReplaceDialog Find and Replace Buscar y reemplazar Fi&nd text: &Buscar texto: Re&place with: &Reemplazar con: Match &exact case Distinguir &mayús. y minús. Match &only whole words &Solo palabras completas When enabled, the search continues from the other end when it reaches one end of the page Si se habilita, la búsqueda continua desde el otro extremo cuando llega a un extremo de la página &Wrap around &Dar la vuelta When set, the search goes backwards from cursor position, otherwise it goes forward Si se establece, la búsqueda va hacia atrás desde la posición del cursor. De lo contrario va hacia adelante Search &backwards Buscar hacia &atrás <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>Si se establece, el patrón buscado se interpreta como una expresión regular UNIX. Véase <a href="https://es.wikipedia.org/wiki/Expresi%C3%B3n_regular">«Expresión regular» en Wikipedia</a>.</p></body></html> Use regular e&xpressions Usar e&xpresiones regulares Find the next occurrence from the cursor position and in the direction set by "Search backwards" Encontrar la siguiente ocurrencia desde la posición del cursor y en la dirección definida por «Buscar hacia atrás» &Find Next Buscar &siguiente &Replace R&eemplazar Highlight all the occurrences of the text in the page Resaltar todas las ocurrencias del texto en la página F&ind All Encontrar &todo Replace all the occurrences of the text in the page Reemplazar todas las ocurrencias del texto en la página Replace &All Reem&plazar todo The searched text was not found El texto buscado no fue encontrado The searched text was not found. El texto buscado no fue encontrado. The searched text was found one time. El texto buscado fue encontrado una vez. The searched text was found %1 times. El texto buscado fue encontrado %1 veces. The searched text was replaced one time. El texto buscado fue reemplazado una vez. The searched text was replaced %1 times. El texto buscado fue reemplazado %1 veces. ForeignKeyEditor &Reset &Reiniciar Foreign key clauses (ON UPDATE, ON DELETE etc.) Cláusulas de clave foránea (ON UPDATE, ON DELETE etc.) (foreign key clauses(ON UPDATE, ON DELETE etc.) claúsulas de clave foránea (ON UPDATE, ON DELETE etc.) ImportCsvDialog Import CSV file Importar archivo CSV &Table name Nombre de la &tabla Table na&me &Nombre de la tabla &Column names in first line Nombres de &columna en la primera línea Field &separator &Separador de campos , , ; ; Tab Tab | | Other Otro &Quote character &Entrecomillado " " ' ' &Encoding &Codificación UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? ¿Recortar campos? Separate tables Tablas separadas Advanced Avanzado When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Cuando se importe un valor vacío desde el archivo CSV a una tabla existente con un valor por defecto para la columna, ese valor por defecto es insertado. Active esta opción si, por el contrario, desea insertar un valor vacío para esta columna. Ignore default &values Ignorar &valores por defecto Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Active esta opción para para la importación cuando se intente importar un valor vacío a una columna NOT NULL sin un valor por defecto. Fail on missing values Fallar cuando falten valores Disable data type detection Deshabilitar detección de tipo Disable the automatic data type detection when creating a new table. Deshabilitar la detección automática de tipo cuando se esté creando una nueva tabla. Deselect All Deseleccionar Todo Match Similar Emparejar Similares Select All Seleccionar Todo Inserting data... Insertando datos... Cancel Cancelar There is already a table of that name and an import into an existing table is only possible if the number of columns match. Ya hay una tabla con ese nombre y la importación a una tabla existente sólo es posible si el número de columnas coincide. There is already a table of that name. Do you want to import the data into it? Ya hay una tabla con ese nombre. ¿Quiere importar los datos en ella? Import completed Importación completada There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. Ya existe una tabla con nombre «%1» y una importación a una tabla existente solo es posible si el número de columnas coincide. There is already a table named '%1'. Do you want to import the data into it? Ya existe una tabla con nombre «%1». ¿Desea importar los datos cargándolos en ella? Creating restore point failed: %1 Creación del punto de restauración fallido: %1 Creating the table failed: %1 Creación de la tabla fallido: %1 importing CSV importando CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Importar el archivo '%1' llevó %2ms. De ellos, %3ms se gastaron en la función fila. Missing field for record %1 Falta el campo para el registro %1 Inserting row failed: %1 Inserción de línea fallido: %1 MainWindow DB Browser for SQLite DB Browser for SQLite Database &Structure E&structura de la Base de Datos toolBar1 toolBar1 &Browse Data &Navegar Datos Table: Tabla: Select a table to browse data Seleccione una tabla para ver sus datos Use this list to select a table to be displayed in the database view Use esta lista para seleccionar la tabla a mostrar en la vista de la base de datos Refresh the data in the selected table. Refresca los datos de la tabla seleccionada. This button refreshes the data in the currently selected table. Este botón refresca los datos de la tabla actualmente seleccionada. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> <html><head/><body><p>Este botón crea un nuevo registro en la base de datos. Mantenga pulsado el botón del ratón para abrir un menú emergente con varias opciones:</p><ul><li><span style=" font-weight:600;">Nuevo Registro</span>: inserta en la base de datos un nuevo registro con valores por defecto.</li><li><span style=" font-weight:600;">Introduce Valores...</span>: abre un diálogo para introducir valores antes de insertarlos en la base de datos. Esto permite introducir valores que cumplan con las restricciones. Este diálogo también se abre si la opción de <span style=" font-weight:600;">Nuevo Registro</span> falla debido a esas restricciones.</li></ul></body></html> This button deletes the record or records currently selected in the table Este botón borra el registro seleccionado (o los registros seleccionados) actualmente en la base de datos This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Este es el visor de la tabla de la base de datos. Puede realizar lo siguiente: - Escribir y editar valores. - Doble-clic en cualquier registro para editar su contenido en la ventana del editor de celdas. - Alt+Supr para borrar el contenido de la celda a NULL. - Ctrl+" para duplicar el registro actual. - Ctrl+' para copiar el valor de la celda de arriba. - Las operaciones de copiar y pegar usuales. Scroll one page upwards Retroceder una página <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html><head/><body><p>Al pulsar este botón se retrocede una página de registros en la vista de tabla superior.</p></body></html> Scroll one page downwards Avanzar una página <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>Al pulsar este botón se avanza una página de registros en la vista de tabla superior.</p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index">Automatic Index</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index">Indexado automático</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys">Foreign Keys</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys">Claves foráneas</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints">Ignore Check Constraints</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints">Ignorar Check Constraints</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode">Journal Mode</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode">Modo journal</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit">Journal Size Limit</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit">Límite de tamaño del journal</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode">Locking Mode</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode">Modo de bloqueo</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count">Max Page Count</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count">Máx. número de páginas</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size">Page Size</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size">Tamaño de página</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers">Recursive Triggers</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers">Disparadores recursivos</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete">Secure Delete</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete">Borrado seguro</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous">Synchronous</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous">Síncrono</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store">Temp Store</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store">Almacenamiento temporal</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version">User Version</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version">Versión de usuario</a></p></body></html> This button clears the contents of the SQL logs Este botón limpia el contenido del historial SQL This panel lets you examine a log of all SQL commands issued by the application or by yourself Este panel le permite examinar el histórico de todos los comandos SQL ordenados por la aplicación o por usted mismo This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Esta es la estructura de la base de datos abierta. Usted puede arrastrar varios nombres de objetos desde la columna «Nombre» y soltarlos en el editor SQL. También puede arrastrar varias sentencias SQL desde la columna «Esquema» y soltarlos en el editor SQL o en otra aplicación. Project Toolbar Barra de herramientas de proyectos Extra DB toolbar Barra de herramientas extra Close the current database file Cierra el archivo de base de datos actual This button closes the connection to the currently open database file Este botón cierra la conexión con el archivo de base de datos actualmente abierto Compact &Database... Compactar base de &datos... &About &Acerca de This button opens a new tab for the SQL editor Este botón abre una nueva pestaña para el editor SQL Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] Ejecuta todo el SQL (o la selección) [F5, Ctrl+Intro, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. Este botón ejecuta las sentencias SQL actualmente seleccionadas. Si no hay ningún texto seleccionado, se ejecutan todas las sentencias. This button opens a file containing SQL statements and loads it in a new editor tab Este botón abre un archivo que contenga sentencias SQL y las carga en una pestaña nueva del editor &Load Extension... &Cargar extensión... This button executes the SQL statement present in the current editor line Este botón ejecuta la sentencia SQL presente en la línea actual del editor &Wiki &Wiki Bug &Report... &Informar de fallos... Feature Re&quest... Solicitud de &mejoras... Web&site &Sitio web &Donate on Patreon... &Donar en Patreon... Sa&ve Project... &Guardar proyecto... This button lets you save all the settings associated to the open DB to a DB4S project file Este botón le permite guardar todos los ajustes asociados a la base de datos abierta a un archivo de proyecto DB4S Open &Project... Abrir &proyecto... This button lets you open a DB4S project file Este botón le permite abrir un archivo de proyecto DB4S &Attach Database... Ane&xar base de datos... Add another database file to the current database connection Añade un archivo de base de datos adicional a la conexión actual This button lets you add another database file to the current database connection Este botón le permite añadir otro archivo de base de datos a la conexión de base de datos actual &Set Encryption... &Establecer cifrado... This button saves the content of the current SQL editor tab to a file Este botón guarda el contenido de la pestaña actual del editor SQL a un archivo SQLCipher &FAQ SQLCipher &FAQ Insert Values... Introducir valores... Open a dialog for inserting values in a new record Abre un diálogo para introducir valores en un nuevo registro Insert new record using default values in browsed table Inserta un nuevo registro usando valores por defecto en la tabla visualizada New In-&Memory Database Nueva base de datos en &memoria Drag && Drop Qualified Names Arrastrar y soltar nombres calificados Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Usa nombres calificados (p.ej. "Tabla"."Campo") al arrastrar los objetos y soltarlos en el editor Drag && Drop Enquoted Names Arrastrar y soltar nombres entrecomillados Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor Usa identificadores escapados (p.ej. "Tabla1") al arrastrar los objetos y soltarlos en el editor &Integrity Check Comprobar &integridad Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. Ejecuta el pragma integrity_check en la base de datos abierta y devuelve los resultados en la pestaña Ejecutar SQL. Este pragma realiza una comprobación de integridad de toda la base de datos. &Foreign-Key Check Comprobar clave &foránea Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab Ejecuta el pragma foreign_key_check con la base de datos abierta y devuelve los resultados en la pestaña Ejecutar SQL. &Quick Integrity Check Comprobar integridad &rápido Run a quick integrity check over the open DB Ejecuta una comprobación de integridad rápida en la base de datos abierta Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. Ejecuta el pragma quick_check en la base de datos abierta y devuelve los resultados en la pestaña Executar SQL. Este comando hace la mayoría de comprobaciones de PRAGMA integrity_check pero se ejecuta mucho más rápido. &Optimize &Optimizar Attempt to optimize the database Intenta optimizar la base de datos Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Ejecuta el pragma optimize en la base de datos abierta. Este pragma realiza optimizaciones que pueden mejorar el rendimiento de consultas futuras. Print Imprimir Print text from current SQL editor tab [Ctrl+P] Imprime el texto de la pestaña actual del editor SQL [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Abre un diálogo para imprimir el texto de la pestaña actual del editor SQL Print the structure of the opened database [Ctrl+P] Imprime la estructura de la base de datos abierta [Ctrl+P] Open a dialog for printing the structure of the opened database Abre un diálogo para imprimir la estructura de la base de datos abierta SQLCipher &FAQ... &FAQ de SQLCipher... Shows or hides the Project toolbar. Muestra u oculta la barra de herramientas de proyecto. Extra DB Toolbar Barra de herramientas extra Export the filtered data to CSV Exportar los datos filtrados a CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Este botón exporta los datos de la tabla mostrada tal como se presentan (después de filtros, formatos de presentación y columna de orden) como un archivo CSV. Save the current filter, sort column and display formats as a view Guardar el filtro actual, la columna de orden y los formatos de presentación como una vista This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Este botón guarda los ajustes actuales de la tabla visualizada (filtros, formatos de presentación y la columna de orden) como una vista SQL que más tarde puede visualizar o usar en sentencias SQL. Table(s) to JSON... Tabla(s) a JSON... Export one or more table(s) to a JSON file Exportar una o más tablas a un archivo JSON Open from Remote Abrir desde el Remoto Save to Remote Guardar al Remoto Refresh Refrescar F5 F5 Clear all filters Borra todos los filtros This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Esta es la estructura de la base de datos abierta. Usted puede arrastrar sentencias SQL desde una fila de objeto y soltarlas en otras aplicaciones o en otra instancia de «DB Browser for SQLite». &Table: &Tabla: Refresh the data in the selected table [F5, Ctrl+R] Refresca los datos en la tabla seleccionada [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. Este botón elimina todos los filtros establecidos en la cabecera para la tabla actualmente mostrada. Save the table as currently displayed Guarda la tabla tal como se presenta <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> <html><head/><body><p>Este menú contextual provee las siguientes opciones que se aplican a la tabla actualmente visualizada y filtrada:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Exportar a CSV: esta opción exporta los datas de la tabla tal cual se presentan actualmente (después de filtros, formatos de presentación y columna de orden) a un archivo CSV.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Guardar como vista: esta opción guarda la configuración actual de la tabla visualizada (filtros, formatos de presentación y columna de orden) como una vista SQL que usted luego puede visualizar o usar en sentencias SQL.</li></ul></body></html> ... ... Print currently browsed table data [Ctrl+P] Imprime los datos de la tabla mostrada actualmente [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. Imprime los datos de la tabla mostrada actualmente. Imprime la selección si se ha seleccionado más de una celda. Insert a new record in the current table Inserta un nuevo registro en la tabla actual This button creates a new, empty record in the database Este botón crea un nuevo registro vacío en la base de datos New Record Nuevo registro Delete the current record Borra el registro actual This button deletes the record currently selected in the database Este botón borra el registro actualmente seleccionado en la base de datos Delete Record Borrar registro This is the database view. You can double-click any record to edit its contents in the cell editor window. Esta es la vista de la base de datos. Puede hacer doble-clic sobre cualquier registro para editar su contenido en la ventana del editor de celdas. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Desplazarse hasta el principio</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Pulsando este botón se mueve hasta el principio en la vista de tabla de arriba.</p></body></html> |< |< Scroll 100 records upwards Desplazarse 100 registros hacia arriba <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>Pulsando este botón se desplaza 100 registros hacia arriba en la vista de tabla de arriba.</p></body></html> < < 0 - 0 of 0 0 - 0 de 0 <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>Desplazarse 100 registros hacia abajo</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>Pulsando este botón se desplaza 100 registros hacia abajo en la vista de tabla de arriba.</p></body></html> > > Scroll to the end Desplazarse hasta el final <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Pulsando este botón se mueve hasta el final en la vista de tabla de arriba.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> Pulse aquí para saltar al registro especificado <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>Este botón se usa para moverse al número de registro especificado en la casilla Ir a.</p></body></html> Go to: Ir a: Enter record number to browse Introduzca el número de registro al que navegar Type a record number in this area and click the Go to: button to display the record in the database view Escriba un número de registro en esta casilla y haga clic en el botón «Ir a:» para mostrar el registro en la vista de la base de datos 1 1 Edit &Pragmas Editar &Pragmas None Ninguno Full Completo Incremental Incremental <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Indexado Automático</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Claves foráneas</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignorar Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Modo Journal</span></a></p></body></html> Delete Borrar Truncate Truncar Persist Persistente Memory Memoria WAL WAL Off Apagado <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Límite de tamaño del Journal</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Modo de Bloqueo</span></a></p></body></html> Normal Normal Exclusive Exclusivo <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Máximo número de Páginas</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Tamaño de Página</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Disparadores Recursivos</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Borrado Seguro</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Síncrono</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Almacenamiento Temporal</span></a></p></body></html> Default Por defecto File Archivo <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">Versión de Usuario</span></a></p></body></html> Table(&s) to JSON... Tabla(&s) a JSON... Open Data&base Read Only... Abrir &base de datos como solo lectura... Save results Guardar resultados Save the results view Guarda la vista de resultados This button lets you save the results of the last executed query Este botón le permite guardar los resultados de la última consulta ejecutada Find text in SQL editor Buscar texto en el editor SQL Find text in SQL editor [Ctrl+F] Buscar texto en el editor SQL [Ctrl+F] This button opens the search bar of the editor Este botón abre la barra de búsqueda en el editor Ctrl+F Ctrl+F Find or replace text in SQL editor Buscar o reemplazar texto en el editor SQL Find or replace text in SQL editor [Ctrl+H] Buscar o reemplazar texto en el editor SQL [Ctrl+H] This button opens the find/replace dialog for the current editor tab Este botón abre el diálogo de buscar/reemplazar para la pestaña actual del editor Export to &CSV Exportar a &CSV Save as &view Guardar como &vista Save as view Guardar como vista Hide column(s) Ocultar columna(s) Hide selected column(s) Ocultar columna(s) seleccionada(s) Show all columns Mostrar todas las columnas Show all columns that were hidden Mostrar todas las columnas que están ocultas &Open Database Read Only... &Abrir Base de Datos como Sólo Lectura... Open an existing database file in read only mode Abre una base de datos existente en modo de solo lectura Unlock view editing Desbloquear edición de vistas This unlocks the current view for editing. However, you will need appropriate triggers for editing. Esto desbloquea la vista actual para edición. Aunque para la edición se necesitarán los disparadores adecuados. E&xecute SQL E&jecutar SQL &File &Archivo &Import &Importar &Export E&xportar Remote Remoto &Edit &Editar &View &Ver &Help Ay&uda &Tools &Herramientas DB Toolbar DB Toolbar Edit Database &Cell Editar &celda DB Sche&ma Esque&ma This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Esta es la estructura de la base de datos abierta. Puede arrastrar múltiples objetos de la columna Nombre, soltarlos en el editor SQL y ajustar sus propiedades usando el menú contextual. Esto le ayudará a componer sentencias SQL. Puede arrastrar sentencias SQL desde la columna Esquema y soltarlas en el editor SQL o en otras aplicaciones. &Remote &Remoto Execute SQL [F5, Ctrl+Return, Ctrl+R] Ejecuta SQL [F5, Ctrl+Intro, Ctrl+R] &Load extension &Cargar extensión Execute current line [Shift+F5] Ejecuta la línea actual [May+F5] Shift+F5 Shift+F5 Sa&ve Project &Guardar proyecto Open &Project Abrir &proyecto &Set Encryption &Definir cifrado Edit display format Editar el formato de presentación Edit the display format of the data in this column Editar el formato de presentación de los datos en esta columna Show rowid column Mostrar la columna rowid Toggle the visibility of the rowid column Cambia la visibilidad de la columna rowid Set encoding Definir codificación Change the encoding of the text in the table cells Cambia la codificación del texto de las celdas de la tabla Set encoding for all tables Definir la codificación para todas las tablas Change the default encoding assumed for all tables in the database Cambia la codificación por defecto para todas las tablas en la base de datos Duplicate record Duplicar registro SQL Log SQL Log &Show SQL submitted by &Mostrar SQL enviado por User Usuario Application Aplicación &Clear &Limpiar Plot Gráfica Columns Columnas X X Y Y _ _ Line type: Tipo de línea: Line Línea StepLeft EscalónIzquierda StepRight EscalónDerecha StepCenter EscalónCentrado Impulse Impulso Point shape: Forma del punto: Cross Cruz Plus Más Circle Circunferencia Disc Disco Square Cuadrado Diamond Diamante Star Estrella Triangle Triángulo TriangleInverted TriánguloInvertido CrossSquare CruzCuadrado PlusSquare MasCuadrado CrossCircle CruzCircunferencia PlusCircle MásCircunferencia Peace Paz <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Guarda la gráfica actual...</p><p>El formato del archivo es elegido por la extensión (png, jpg, pdf, bmp)</p></body></html> Save current plot... Guardar la gráfica actual... Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Carga todos los datos. Es efectivo sólo si no se han leído ya todos los datos de la tabla porque el mecanismo de lectura ha hecho una lectura parcial. DB Schema Esquema de la base de datos &New Database... &Nueva base de datos... Create a new database file Crea un nuevo archivo de base de datos This option is used to create a new database file. Esta opción se usa para crear un nuevo archivo de base de datos. Ctrl+N Ctrl+N &Open Database... &Abrir base de datos... Open an existing database file Abre un archivo de base de datos This option is used to open an existing database file. Esta opción se usa para abrir un archivo de base de datos. Ctrl+O Ctrl+O &Close Database &Cerrar base de datos Ctrl+W Ctrl+W SQLCipher FAQ... FAQ de SQLCipher... Opens the SQLCipher FAQ in a browser window Abre la FAQ de SQLCipher en una ventana del navegador Revert Changes Deshacer cambios Revert database to last saved state Deshace los cambios al último estado guardado This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Esta opción se usa para deshacer los cambios en la base de datos actual al último estado guardado. Todos los cambios hechos desde la última vez que se guardó se perderán. Write Changes Escribir cambios Write changes to the database file Escribe los cambios al archivo de la base de datos This option is used to save changes to the database file. Esta opción se usa para guardar los cambios en el archivo de la base de datos. Ctrl+S Ctrl+S Compact Database Compactar base de datos Compact the database file, removing space wasted by deleted records Compacta el archivo de la base de datos eliminando el espacio malgastado por los registros borrados Compact the database file, removing space wasted by deleted records. Compacta el archivo de la base de datos, eliminando el espacio malgastado por los registros borrados. E&xit &Salir Ctrl+Q Ctrl+Q Database from SQL file... Base de datos en un archivo SQL... Import data from an .sql dump text file into a new or existing database. Importa datos de un archivo de texto con un volcado .sql en una base de datos nueva o existente. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Esta opción se usa para importar datos de un archivo de texto con un volcado .sql en una base de datos nueva o existente. Los archivos de volcado SQL se pueden crear en la mayoría de los motores de base de datos, incluyendo MySQL y PostgreSQL. Table from CSV file... Tabla de un archivo CSV... Open a wizard that lets you import data from a comma separated text file into a database table. Abre un asistente que le permite importar datos desde un archivo de texto con valores separado por comas a una tabla de una base de datos. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Abre un asistente que le permite importar datos desde un archivo de texto con valores separado por comas a una tabla de una base de datos. Los archivos CSV se pueden crear en la mayoría de las aplicaciones de bases de datos y hojas de cálculo. Database to SQL file... Base de datos a archivo SQL... Export a database to a .sql dump text file. Exporta la base de datos como un volcado .sql a un archivo de texto. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Esta opción le permite exportar la base de datos como un volcado .sql a un archivo de texto. Los archivos de volcado SQL contienen todos los datos necesarios para recrear la base de datos en la mayoría de los motores de base de datos, incluyendo MySQL y PostgreSQL. Table(s) as CSV file... Tabla(s) como un archivo CSV... Export a database table as a comma separated text file. Exporta la base de datos como un archivo de texto con valores separados por comas. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Exporta la base de datos como un archivo de texto con valores separados por comas, listo para ser importado en otra base de datos o aplicaciones de hoja de cálculo. Create Table... Crear Tabla... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Abre el asistente para Crear una Tabla, donde se puede definir el nombre y los campos de una nueva tabla en la base de datos Delete Table... Borrar Tabla... Delete Table Borrar tabla Open the Delete Table wizard, where you can select a database table to be dropped. Abre el asistente para «Borrar tabla», donde se puede seleccionar una tabla de la base de datos para borrar. Modify Table... Modificar Tabla... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Abre el asistente «Modificar tabla», donde se puede renombrar una tabla existente de la base de datos. También se pueden añadir o borrar campos de la tabla, así como modificar los nombres de los campos y sus tipos. Create Index... Crear Índice... Open the Create Index wizard, where it is possible to define a new index on an existing database table. Abre el asistente «Crear índice», donde se puede definir un nuevo índice de una tabla existente de la base de datos. &Preferences... &Preferencias... Open the preferences window. Abrir la ventana de preferencias. &DB Toolbar &Barra de herramientas Shows or hides the Database toolbar. Muestra u oculta la barra de herramientas de la base de datos. What's This? ¿Qué es esto? Shift+F1 Shift+F1 &About... &Acerca de... &Recently opened Archivos &recientes Open &tab Abrir &pestaña Ctrl+T Ctrl+T Database Structure Estructura Browse Data Hoja de datos Edit Pragmas Editar pragmas <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Like sensible a mayúsculas</a></p></body></html> Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Aviso: este pragma no es legible y este valor se ha supuesto. Escribir el pragma puede sobreescribir un LIKE redefinido que proporcione una extensión de SQLite. Execute SQL Ejecutar SQL Edit Database Cell Editar Celda de la Base de datos SQL &Log Historial de &SQL Show S&QL submitted by Mostrar S&QL ejecutado por &Plot &Gráfica &Revert Changes &Deshacer cambios &Write Changes &Guardar cambios Compact &Database Compactar base de &datos &Database from SQL file... Base de datos de &archivo SQL... &Table from CSV file... &Tabla de archivo CSV... &Database to SQL file... &Base de datos a archivo SQL... &Table(s) as CSV file... &Tabla(s) a archivo CSV... &Create Table... &Crear tabla... &Delete Table... &Borrar tabla... &Modify Table... &Modificar tabla... Create &Index... Crear &índice... W&hat's This? ¿&Qué es esto? &Execute SQL &Ejecutar SQL Execute SQL [F5, Ctrl+Return] Ejecuta SQL [F5, Ctrl+Return] Open SQL file Abrir archivo SQL Save SQL file Guardar archivo SQL Load extension Cargar extensión Execute current line Ejecutar la línea actual Execute current line [Ctrl+E] Ejecuta la línea actual [Ctrl+E] Ctrl+E Ctrl+E Export as CSV file Exportar como archivo CSV Export table as comma separated values file Exportar tabla como archivo de valores separados por comas &Wiki... Wi&ki... Bug &report... Informe de &fallos... Web&site... Sitio &web... Save Project Guardar Proyecto Save the current session to a file Guarda la sesión actual en un archivo Open Project Abrir Proyecto Load a working session from a file Carga una sesión de trabajo de un archivo &Attach Database Ane&xar base de datos Set Encryption Definir Cifrado Save SQL file as Guardar archivo SQL como &Browse Table &Mostrar datos Copy Create statement Copiar sentencia CREATE Copy the CREATE statement of the item to the clipboard Copia la sentencia CREATE del ítem al portapapeles Ctrl+Return Ctrl+Return Ctrl+L Ctrl+L Ctrl+P Ctrl+P Ctrl+D Ctrl+D Ctrl+I Ctrl+I Encrypted Cifrado Read only Solo lectura Database file is read only. Editing the database is disabled. El archivo de la base de datos es de solo lectura. La edición de la base de datos está desactivada. Database encoding Codificación de la base de datos Database is encrypted using SQLCipher La base de datos está cifrada usando SQLCipher Choose a database file Seleccione un archivo de base de datos SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Archivos de base de datos de SQLite (*.db *.sqlite *.sqlite3 *.db3);;Todos los archivos (*) Invalid file format. Formato de archivo inválido. Choose a filename to save under Seleccione un nombre de archivo en el que guardar Error adding record: Error añadiendo registro: Error deleting record: %1 Error borrando registro: %1 Please select a record first Por favor, antes seleccione un registro %1 - %2 of %3 %1 - %2 de %3 There is no database opened. Please open or create a new database file. No hay una base de datos abierta. Por favor, abra o cree un nuevo archivo de base de datos. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. This is a bad case for translation. %1 is not translatable and if it would be, the genus would produce inconsistencies in some languages ¿Está seguro de que quiere borrar el objeto «%2» de tipo: %1? Se perderán todos los datos asociados con «%2». Error: could not delete the %1. Message from database engine: %2 This is a bad case for translation. %1 is not translatable and if it would be, the genus would produce inconsistencies in some languages Error: no se pudo borrar el objeto de tipo: %1. Mensaje de la base de datos: «%2» There is no database opened. No hay una base de datos abierta. %1 Rows returned from: %3 (took %2ms) %1 líneas devueltas de: %3 (tardó %2ms) Error executing query: %1 Error ejecutando la consulta: %1 Query executed successfully: %1 (took %2ms) Consulta ejecutada con éxito: %1 (tardó %2ms) %1 rows returned in %2ms from: %3 %1 líneas devueltas en %2ms de: %3 , %1 rows affected , %1 líneas afectadas Query executed successfully: %1 (took %2ms%3) Consulta ejecutada con éxito: %1 (tardó %2ms%3) Choose a text file Seleccione un archivo de texto Text files(*.csv *.txt);;All files(*) Archivos de texto(*.csv *.txt);;Todos los archivos(*) Import completed Importación completada Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Error mientras se guardaba el archivo de la base de datos. Esto significa que no todos lo cambios hechos a la base de datos se han guardado. Antes tiene que solucionar el siguiente error. %1 Are you sure you want to undo all changes made to the database file '%1' since the last save? ¿Está seguro de que quiere deshacer todos los cambios hechos al archivo de la base de datos «%1» desde la última vez que se guardó? Choose a file to import Seleccione el archivo a importar Text files(*.sql *.txt);;All files(*) Archivos de texto(*.sql *.txt);;Todos los archivos(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. ¿Quiere crear un nuevo archivo de base de datos donde poner los datos importados? Si responde no se intentarán importar los datos del archivo SQL en la base de datos actual. File %1 already exists. Please choose a different name. El archivo %1 ya existe. Por favor elija un nombre diferente. Error importing data: %1 Error importando datos: %1 Import completed. Importación completada. Delete View Borrar vista Modify View Modificar vista Delete Trigger Borrar disparador Modify Trigger Modificar disparador Delete Index Borrar índice Modify Index Modificar índice Modify Table Modificar tabla &%1 %2 &%1 %2 Extensions(*.so *.dylib *.dll);;All files(*) Extensiones (*.so *.dylib *.dll);;Todos los archivos (*) Choose a project file to open Seleccione un archivo de proyecto para abrir This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Este archivo de proyecto está usando un formato antiguo porque fue creado usando una versión 3.10 o inferior de «DB Browser for SQLite». La carga de este archivo aún está completamente soportada pero le recomendamos convertir todos sus archivos de proyecto al nuevo formato porque el soporte de formatos antiguos podría ser descartado en algún momento futuro. Usted puede convertir sus archivos simplemente abriéndolos y guardándolos de nuevo. Duplicate records Duplicar registros Ctrl+" Ctrl+" Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Introduzca una clave pseudo-primaria para activar la edición en esta vista. Esta debería ser el nombre de una columna única en la vista. Collation needed! Proceed? ¡Es necesaria una función de comparación! ¿Proceder? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Una tabla en esta base de datos necesita una función de comparación especial «%1» que esta aplicación no puede proporcionar sin más información. Si decide continuar, está avisado de que la base de datos se puede dañar. ¡Cree una copia de respaldo! Setting PRAGMA values will commit your current transaction. Are you sure? Al definir los valores de PRAGMA se consolidará la transacción actual. ¿Está seguro? Could not open database file. Reason: %1 No se pudo abrir el archivo de base de datos. Razón: %1 In-Memory database Base de datos en memoria determining row count... determinando nº de filas... %1 - %2 of >= %3 %1 - %2 de >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. ¿Está seguro de que quiere borrar la tabla «%1»? Se perderán todos los datos asociados con la tabla. Are you sure you want to delete the view '%1'? ¿Está seguro de que quiere borrar la vista «%1»? Are you sure you want to delete the trigger '%1'? ¿Está seguro de que quiere borrar el disparador «%1»? Are you sure you want to delete the index '%1'? ¿Está seguro de que quiere borrar el índice «%1»? Error: could not delete the table. Error: no se pudo borrar la tabla. Error: could not delete the view. Error: no se pudo borrar la vista. Error: could not delete the trigger. Error: no se pudo borrar el disparador. Error: could not delete the index. Error: no se pudo borrar el índice. Message from database engine: %1 Mensaje de la base de datos: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? Para editar la tabla es necesario guardar antes todos los cambios pendientes. ¿Está seguro de que quiere guardar la base de datos? -- EXECUTING SELECTION IN '%1' -- -- EJECUTANDO SELECCIÓN DE «%1» -- -- EXECUTING LINE IN '%1' -- -- EJECUTANDO LÍNEA DE «%1» -- -- EXECUTING ALL IN '%1' -- -- EJECUTANDO TODO «%1» -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Establecer valores PRAGMA o realizar una limpieza consolidará la transacción actual. ¿Está seguro? Execution aborted by user Ejecución abortada por el usuario executing query ejecutando consulta %1 rows returned in %2ms %1 filas devueltas en %2ms query executed successfully. Took %1ms%2 consulta ejecutada con éxito. Llevó %1ms%2 -- At line %1: %4 -- Result: %3 -- En la línea %1: %4 -- Resultado: %3 Choose text files Elija archivos de texto Import completed. Some foreign key constraints are violated. Please fix them before saving. Importación completada. Algunas restricciones de las claves foráneas se han infringido. Por favor arréglelas antes de guardar. Select SQL file to open Seleccione el archivo SQL a abrir Couldn't read file: %1. No se pudo leer el archivo: %1. Couldn't save file: %1. No se pudo guardar el archivo: %1. Select file name Seleccione el nombre del archivo Select extension file Seleccione el archivo de extensión Extensions(*.so *.dll);;All files(*) Extensiones(*.so *.dll);;Todos los archivos(*) Extension successfully loaded. Extensiones cargadas con éxito. Error loading extension: %1 Error cargando la extensión: %1 Don't show again No volver a mostrar New version available. Hay una nueva versión disponible. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Hay disponible una nueva versión de «DB Browser for SQLite» (%1.%2.%3).<br/><br/>Por favor, descárguela de <a href='%4'>%4</a>. creating collation creando comparación Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Establezca el nuevo nombre para la pestaña SQL. Use el carácter «&&» para permitir usar el carácter siguiente como un atajo de teclado. Please specify the view name Por favor, especifique el nombre de la vista There is already an object with that name. Please choose a different name. Ya hay un objeto con ese nombre. Por favor, elija un nombre diferente. View successfully created. Vista creada con éxito. Error creating view: %1 Error creando la vista: %1 There is no filter set for this table. View will not be created. No existe un filtro para esta tabla. La vista no será creada. Delete Records Borrar registros This action will open a new SQL tab for running: Esta acción abrirá una nueva pestaña SQL para ejecutar: Press Help for opening the corresponding SQLite reference page. Pulse Ayuda para abrir la página correspondiente de la referencia de SQLite. Row # Línea # Choose a axis color Seleccione un eje de color PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Todos los Archivos(*) Please enter the URL of the database file to open. Por favor introduzca la URL del archivo de la base de datos a abrir. Please enter the URL of the database file to save. Por favor introduzca la URL del archivo de la base de datos a guardar. Choose a file to open Seleccione un archivo para abrir DB Browser for SQLite project file (*.sqbpro) Archivo de proyecto de «DB Browser for SQLite» (*.sqbpro) Please choose a new encoding for this table. Por favor, elija una nueva codificación para esta tabla. Please choose a new encoding for all tables. Por favor, elija una nueva codificación para todas las tablas. Error checking foreign keys after table modification. The changes will be reverted. Error comprobando las claves foráneas tras la modificación de la tabla. Los cambios se desharán. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. Esta tabla no ha pasado la comprobación de claves foráneas.<br/>Debería ejecutar 'Herramientas | Comprobar Claves foráneas' y arreglar los problemas mostrados. At line %1: En la línea %1: Result: %2 Resultado: %2 %1 Leave the field empty for using the database encoding. %1 Deje este campo vacío para usar la codificación de la base de datos. This encoding is either not valid or not supported. Esta codificación no es válida o no está soportada. Fetching all data... Trayendo todos los datos... Cancel Cancelar NullLineEdit Set to NULL Poner a NULL Alt+Del PlotDock Plot Gráfica <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> <html><head/><body><p>Esta tabla muestra la lista de columnas de la tabla actualmente visualizada o de la consulta recién ejecutada. Puede seleccionar las columnas que desea usar como ejes X o Y en el gráfico del panel inferior. La tabla muestra el tipo de eje detectado, el cual afectará al gráfico resultante. Para los ejes Y solo se pueden seleccionar columnas numéricas, pero para el eje X se pueden seleccionar :</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Fecha/Hora</span>: texto con formato &quot;aaaa-MM-dd hh:mm:ss&quot; o &quot;aaaa-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Fecha</span>: texto con formato &quot;aaaa-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: texto con formato &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Etiqueta</span>: texto con otros formatos. Seleccionado esta columna como eje X se dibuja un gráfico de barras con los valores de la columna usados como etiquetas de las barras.</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numérico</span>: valores reales o enteros</li></ul><p>Haciendo doble clic sobre las celdas Y se puede cambiar el color usado para la gráfica correspondiente.</p></body></html> Columns Columnas X X Y Y _ _ Axis Type Tipo de eje Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Aquí se dibuja un gráfico cuando se seleccionan los valores de X e Y en la parte superior. Con un clic sobre los puntos se seleccionan en el gráfico y en la tabla. Con Ctrl+Clic se pueden seleccionar rangos de puntos. Use la rueda del ratón para aumentar y disminuir el gráfico y arrastre con el ratón para cambiar el rango del eje. Seleccione los ejes o sus etiquetas para arrastrar y aumentar/disminuir solo en esa orientación. Line type: Tipo de línea: None Ninguno Line Línea StepLeft EscalónIzquierda StepRight EscalónDerecha StepCenter EscalónCentrado Impulse Impulso Point shape: Forma de punto: Cross Aspa es más específico que cruz. El signo más también es una cruz (una cruz griega). Aspa Plus Más Circle Circunferencia Disc Círculo Square Cuadrado Diamond Diamante Star Estrella Triangle Triángulo TriangleInverted TriánguloInvertido CrossSquare AspaCuadrado PlusSquare MásCuadrado CrossCircle AspaCircunferencia PlusCircle MásCircunferencia Peace Paz <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Guarda la gráfica actual...</p><p>El formato del archivo es elegido por la extensión (png, jpg, pdf, bmp)</p></body></html> Save current plot... Guarda la gráfica actual... Load all data and redraw plot Cargar todos los datos y redibujar el gráfico Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Cargar todos los datos. Es efectivo sólo si no se han leído ya todos los datos de la tabla porque el mecanismo de lectura ha hecho una lectura parcial. Row # Nº de línea Choose a axis color Seleccione el color de la curva Copy Copiar Print... Imprimir... Show legend Mostrar leyenda Stacked bars Barras apiladas Date/Time Fecha/hora Date Fecha Time Tiempo Numeric Numérico Label Etiqueta Invalid Inválido Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Cargar todos los datos y redibujar el gráfico. Aviso: aún no se han cargado todos los datos desde la tabla debido al mecanismo de lectura parcial. Choose an axis color Elija un color para el eje Choose a filename to save under Seleccione un nombre de archivo en el que guardar PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Todos los archivos(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. Existen lazos en este gráfico y el estilo de línea seleccionado solo se puede aplicar a gráficos ordenados por X. Debe ordenar la tabla o consulta por X para eliminar los lazos o seleccionar uno de los estilos soportados por los lazos: Ninguno o Línea. Fetching all data... Trayendo todos los datos... Cancel Cancelar PreferencesDialog Preferences Preferencias &General &General Remember last location Recordar la última posición Always use this location Usar siempre esta posición Remember last location for session only Recordar la última posición solamente para esta sesión ... ... Default &location &Posición por defecto Lan&guage &Idioma Automatic &updates &Actualizaciones automáticas enabled activado Show remote options Mostrar opciones del remoto &Database &Base de datos Database &encoding Co&dificación de la base de datos Open databases with foreign keys enabled. Abrir base de datos con claves foráneas activadas. &Foreign keys Claves &foráneas Remove line breaks in schema view Eliminar los salos de línea en la vista del esquema &Prefetch block size Tamaño del bloque de &precarga Data &Browser &Hoja de datos NULL fields Campos NULL Text &colour &Color del texto &Text &Texto Bac&kground colour Color de &fondo Remove line breaks in schema &view Elimina los saltos de línea en la &vista del esquema Prefetch block si&ze &Tamaño del bloque de precarga Advanced Avanzado SQL to execute after opening database SQL a ejecutar tras abrir la base de datos SQ&L to execute after opening database SQ&L a ejecutar tras abrir la base de datos Default field type Tipo de campo por defecto Font Tipo de letra &Font &Tipo de letra Font si&ze: &Tamaño del texto Content Contenido Symbol limit in cell Límite de símbolos en la celda Field colors Color de los campos NULL NULL Regular Normal Text Texto Binary Binario Background Fondo Filters Filtros Toolbar style Estilo de barra de herramientas Only display the icon Solo mostrar el icono Only display the text Solo mostrar el texto The text appears beside the icon El texto aparece junto al icono The text appears under the icon El texto aparece bajo el icono Follow the style Seguir el estilo predefinido DB file extensions Extensiones de archivos de BB.DD. Manage Gestionar When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Cuando está activado, se omiten los saltos de línea en la columna Esquema, tanto en la pestaña Estructura en pantalla, como al imprimir. Font si&ze &Tamaño de fuente This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Este el el número máximo de filas en una tabla para activar el autocompletado basado en los valores actuales en la columna. Se puede poner a 0 para desactivar el autocompletado. Row count threshold for completion Umbral del conteo de filas para autocompletar Field display Estilo de las celdas Displayed &text &Texto presentado Text color Color del texto Background color Color del fondo Preview only (N/A) Solo vista previa (N/A) Escape character Carácter de escape Delay time (&ms) Tiempo de retardo (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. Define el tiempo de espera antes de que se aplique un nuevo valor de filtro. Se puede poner a 0 para desactivar la espera. &SQL &SQL Settings name Nombre de los ajustes Context Contexto Colour Color Bold Negrita Italic Cursiva Underline Subrayado Keyword Palabra clave function función Function Función Table Tabla Comment Comentario Identifier Identificador String Cadena currentline currentline Current line Línea actual SQL &editor font size Tamaño de letra del &editor SQL SQL &log font size Tamaño de letra del &historial SQL Tab size Tamaño del tabulador &Wrap lines Ajuste de líneas Never Nunca At word boundaries En los límites de palabra At character boundaries En los límites de caracteres At whitespace boundaries En los límites de espacios en blanco &Quotes for identifiers &Comillas para identificadores Choose the quoting mechanism used by the application for identifiers in SQL code. Elija el mecanismo de entrecomillado usado por la aplicación para los identificadores en el código SQL. "Double quotes" - Standard SQL (recommended) "Dobles comillas" - SQL estándar (recomendado) `Grave accents` - Traditional MySQL quotes `Acentos graves` - Entrecomillado tradicional de MySQL [Square brackets] - Traditional MS SQL Server quotes [Corchetes] - Entrecomillado tradicional de MS SQL Server Keywords in &UPPER CASE Palabras claves en &MAYÚSCULAS When set, the SQL keywords are completed in UPPER CASE letters. Si se activa, las palabras claves de SQL se completan en letras MAYÚSCULAS. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background Si se activa, las líneas de código SQL que causaron errores durante la última ejecución se destacan y el marco de resultados indica el error mediante el color del fondo <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> <html><head/><body><p>SQLite proporciona una función SQL para cargar extensiones desde un archivo de biblioteca compartida. Active esta opción si desea usar la función <span style=" font-style:italic;">load_extension()</span> desde código SQL.</p><p>Por razónes de seguridad, la carga de extensiones está desactivada por defecto y debe ser habilitada usando esta configuración. Siempre puede cargar extensiones a través de la interfaz de usuario, incluso aunque esta opción esté deshabilitada.</p></body></html> Allow loading extensions from SQL code Permitir cargar extensiones desde código SQL Remote Remoto CA certificates Certificados CA Subject CN Sujeto CN Common Name Nombre Común Subject O Sujeto O Organization Organización Valid from Válido desde Valid to Válido hasta Serial number Número de serie Your certificates Sus certificados File Archivo Subject Common Name Nombre Común del Sujeto Issuer CN Emisor CN Issuer Common Name Nombre Común del Emisor Clone databases into Clonar las bases de datos en Tab size: Tamaño del tabulador: SQL editor &font &Tipo de letra del editor SQL Error indicators Indicadores de error Enabling error indicators highlights the SQL code lines that caused errors during the last execution Activando los indicadores de error se resaltan las líneas del código SQL que han causado errores durante la última ejecución Hori&zontal tiling Mosaico hori&zontal If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Si se activa, el editor de código SQL y la vista de la tabla de resultados se muestran de lado a lado en lugar de una sobre la otra. Code co&mpletion Co&mpletar código Foreground Texto SQL &results font size Tamaño de letra de resultados &Extensions E&xtensiones Select extensions to load for every database: Seleccione extensiones a cargar para cada base de datos: Add extension Añadir extensión Remove extension Eliminar extensión <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p> Aunque SQLite admite el operador REGEXP, no implementa en sí ningún algoritmo de expresiones<br/> regulares sino que llama a los de la aplicación en ejecución. «DB Browser for SQLite» implementa este<br/> método para permitirle usar REGEXP de fábrica. Sin embargo, como hay múltiples posibles<br/> implementaciones y puede querer usar otra, puede desactivar este método y cargar el suyo propio<br/> usando una extensión. Necesitará reiniciar la aplicación.</p> </body></html> Disable Regular Expression extension Desactivar extensión de Expresiones Regulares Choose a directory Seleccione una carpeta The language will change after you restart the application. El idioma cambiará al reiniciar la aplicación. Select extension file Seleccione archivo de extensión Extensions(*.so *.dll);;All files(*) Extensiones(*.so *.dll);;Todos los archivos(*) Extensions(*.so *.dylib *.dll);;All files(*) Extensiones (*.so *.dll);;Todos los archivos (*) Import certificate file Importar archivo de certificado No certificates found in this file. No hay certificados en este archivo. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! ¿Está seguro de que quiere eliminar este certificado? ¡Todos los datos del certificado se borrarán de los ajustes de la aplicación! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. ¿Está seguro de que desea borrar todos los ajustes guardadas? Todas sus preferencias se perderán y se usarán valores predeterminados. QObject Error importing data Error importando datos from record number %1 del registro número %1 . %1 . %1 Importing CSV file... Importando archivo CSV... Decoding CSV file... Descodificando archivo CSV... Cancel Cancelar Collation needed! Proceed? ¡Es necesaria una función de comparación! ¿Proceder? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Una tabla en esta base de datos necesita una función de comparación especial '%1' que esta aplicación no puede proporcionar sin más información. Si decide continuar, está avisado de que la base de datos se puede dañar. ¡Cree un backup! SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Archivos de base de datos de SQLite (*.db *.sqlite *.sqlite3 *.db3);;Todos los archivos (*) All files (*) Todos los archivos (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) Archivos de BB.DD. SQLite (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error opening remote database file from %1. %2 Error abriendo el archivo de base de datos remoto de %1. %2 Error when connecting to %1. %2 Error conectando a %1. %2 Error opening remote file at %1. %2 Error abriendo el archivo remoto en %1. %2 Error: Invalid client certificate specified. Error: El certificado del cliente es inválido. Please enter the passphrase for this client certificate in order to authenticate. Por favor, introduzca la clave de este certificado de cliente para autenticarse. Cancel Cancelar Uploading remote database to %1 Subiendo base de datos remota a %1 Downloading remote database from %1 Descargando base de datos remota desde %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. La base de datos remota ha cambiado desde la última sincronización. ¿Desea actualizar la base de datos local a la versión más reciente? ¡Tenga en cuenta que esto descartará cualquier cambio que haya hecho localmente! Si no desea perder cambios locales, pulse «No» para abrir la versión local. Uploading remote database to %1. Subiendo base de datos remota a %1. Downloading remote database from %1. Descargando base de datos remota desde %1. Error: The network is not accessible. Error: La red no es accesible. Error: Cannot open the file for sending. Error: No se puede abrir el archivo para enviar. Error opening local databases list. %1 Error abriendo la lista de bases de datos locales. %1 Error creating local databases list. %1 Error creando la lista de bases de datos locales. %1 RemoteDock Remote Remoto B&rowse Navega&r Local Local Identity Identidad Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Conectar al servidor remoto usando la identidad actualmente seleccionada. El servidor correcto se selecciona también con la entidad. Go Ir Push currently opened database to server Volcar la base de datos actualmente abierta al servidor <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> <html><head/><body><p>En este panel, las BB.DD. remotas del sitio web dbhub.io se pueden añadir a DB4S. En primer lugar usted necesita una identidad:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ingrese en el sitio web dbhub.io (use sus credenciales de GitHub o las que desee)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Haga clic en el botón de crear un certificado de DB4S (esa es su identidad). Eso le proporcionará un archivo de certificado (guárdelo en su disco local).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Vaya a la pestaña «Remoto» de las preferencias de DB4S. Haga clic en el botón para añadir el nuevo certificado a DB4S y elija el archivo de certificado recién descargado.</li></ol><p>Ahora el panel «Remoto» le mostrará su identidad y podrá añadir BB.DD. remotas.</p></body></html> RemoteModel Name Nombre Version Versión Last modified Última modificación Size Tamaño Commit Consolidación bytes bytes RemotePushDialog Push database Remitir base de datos Database na&me to push to No&mbre de la base de datos de destino Commit message Mensaje de consolidación <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Licencia de la base de datos Public Pública Branch Rama Force push Forzar remisión Database will be public. Everyone has read access to it. La base de datos será pública. Todo el mundo podrá leerla. Database will be private. Only you have access to it. La base de datos será privada. Solo usted tendrá acceso. Use with care. This can cause remote commits to be deleted. Usar con cuidado. Esto puede provocar borrados de consolidaciones remotas. Unspecified No especificada SqlExecutionArea Form Formulario Find previous match [Shift+F3] Buscar la siguiente ocurrencia [May+F3] Find previous match with mapping Buscar la siguiente ocurrencia Shift+F3 Shift+F3 The found pattern must be a whole word El patrón buscado debe ser una palabra completa Whole Words Palabras completas Text pattern to find considering the checks in this frame El patrón de texto buscado considerando las opciones de este marco Find in editor Buscar en el editor The found pattern must match in letter case El patrón busca debe coincidir en mayúsculas y minúsculas Case Sensitive Distinguir mayús./minús. Find next match [Enter, F3] Buscar la siguiente ocurrencia [Enter, F3] Find next match with wrapping Encontrar la siguiente ocurrencia volviendo al principio si es necesario F3 F3 Interpret search pattern as a regular expression Interpretar el patrón buscado como una expresión regular <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>Si se activa, el patrón buscado se interpreta como una expresión regular UNIX. Véase <a href="https://es.wikipedia.org/wiki/Expresi%C3%B3n_regular">«Expresión regular» en Wikipedia</a>.</p></body></html> Regular Expression Expresión regular Close Find Bar Cerrar la barra de búsqueda <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> <html><head/><body><p>Resultados de las últimas sentencias ejecutadas.</p><p>Usted podría preferir colapsar este panel y en su lugar usar el panel lateral <span style=" font-style:italic;">Historial de SQL</span> con la selección <span style=" font-style:italic;">Usuario</span>.</p></body></html> Results of the last executed statements Resultados de las últimas sentencias ejecutadas This field shows the results and status codes of the last executed statements. Este campo muestra los resultados y códigos de estado de las últimas sentencias ejecutadas. Export to &CSV Exportar a &CSV Save as &view Guardar como &vista Save as view Guardar como vista Please specify the view name Por favor, especifique el nombre de la vista There is already an object with that name. Please choose a different name. Ya hay un objeto con ese nombre. Por favor, elija un nombre diferente. View successfully created. Vista creada con éxito. Error creating view: %1 Error creando la vista: %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. (X) La función abs(X) devuelve el valor absoluto del argumento numérico X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. () La función changes() devuelve el número de líneas de la base de datos que se modificaron, insertaron o borraron por la consulta INSERT, DELETE, o UPDATE más reciente. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1,X2,...) La función char(X1,X2,...,XN) devuelve una cadena compuesta por caracteres que tienen el valor numérico del código de punto unicode los enteros X1 hasta XN, respectivamente. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y,...) La función coalesce() devuelve una copia de su primer argumento no nulo, o NULL si todos los argumentos son NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) La función glob(X,Y) es equivalente a la expresión "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) La función ifnull() devuelve una copia de su primer argumento no nulo, o NULL si ambos argumentos son NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X,Y) La función instr(X,Y) busca la primera coincidencia de la cadena Y en la cadena X y devuelve el número de caracteres precedentes más 1, ó 0 si Y no se encuentra en X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) La función hex() interpreta su argumento como un BLOB y devuelve una cadena que es el equivalente codificado en hexadecimal en mayúsculas del contenido del BLOB. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. () La función last_insert_rowid() devuelve el ROWID del la última línea insertada desde la conexión de la base de datos que invocó la función. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X) La función length(X) devuelve el número de caracteres (no bytes) en X anteriores al primer carácter NUL. (X,Y) The like() function is used to implement the "Y LIKE X" expression. X,Y) La función like() se usa para implementar la expresión "Y LIKE X". (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X,Y,Z) La función like() se usa para implementar la expresión "Y LIKE X ESCAPE Z". (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. (X) La función load_extension(X) carga extensiones SQLite del archivo de la biblioteca compartida llamada X. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. (X) La función load_extension(X) carga extensiones SQLite del archivo de la biblioteca compartida llamada X usando el punto de entrada Y. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X) La función load_extension(X) carga extensiones SQLite del archivo de la biblioteca compartida llamada X usando el punto de entrada Y. El uso de esta función tiene que ser autorizado desde las Preferencias. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X,Y) La función load_extension(X,Y) carga extensiones SQLite del archivo de la biblioteca compartida llamado X usando el punto de entrada Y. El uso de esta función tiene que ser autorizado desde las Preferencias. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) La función lower(X) devuelve una copia de la cadena X con todos los caracteres ASCII convertidos a minúsculas. (X) ltrim(X) removes spaces from the left side of X. (X) La función ltrim(X) quita los espacios a la izquierda de X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y) La función ltrim(X,Y) devuelve una cadena formada quitando todos los caracteres que aparecen en Y de la izquierda de X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) La función multi-argumento max() devuelve el argumento con el valor máximo, o NULL si cualquier argumento es NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) La función multi-argumento max() devuelve el argumento con el valor mínimo. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (X,Y) La función nullif(X,Y) devuelve su primer argumento si los argumentos son diferentes y NULL si los argumentos son el mismo. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (FORMAT,...) La función SQL printf(FORMAT,...) funciona como la función de lenguaje C sqlite3_mprintf() y la función printf() de la biblioteca C estándar. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. (X) La función quote(X) devuelve el texto de un literal SQL, que es el valor de su argumento, apropiado para la inclusión en una sentencia SQL. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. () La función random() devuelve un entero pseudo-aleatorio entre -9223372036854775808 y +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (N) La función randomblob(N) devuelve un BLOB de N bytes que contiene bytes pseudo-aleatorios. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X,Y,Z) La función replace(X,Y,Z) devuelve una cadena formada substituyendo en la cadena Z cada coincidencia con la subcadena Y por la subcadena X. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X) La función round(X) devuelve un valor en coma flotante X redondeado a cero dígitos a la derecha de la coma decimal. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X,Y) La función round(X,Y) devuelve un valor en coma flotante X redondeado a Y dígitos a la derecha de la coma decimal. (X) rtrim(X) removes spaces from the right side of X. (X) La función rtrim(X) quita los espacios a la derecha de X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X,Y) La función rtrim(X,Y) devuelve una cadena formada quitando todos los caracteres que aparecen en Y de la derecha de X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X) La función soundex(X) devuelve una cadena que es la codificación soundex de la cadena X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y) La función substr(X,Y) devuelve una subcadena con todos los caracteres de la cadena X desde el Y-ésimo hasta el último. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. (X,Y) La función substr(X,Y) devuelve una subcadena de la cadena X desde el Y-ésimo y que es Z caracteres de largo. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. () La función total_changes() devuelve el número de cambios en las líneas causadas por sentencias INSERT, UPDATE o DELETE desde que la conexión con la base de datos actual se abrió. (X) trim(X) removes spaces from both ends of X. (X) La función trim(X) quita los espacios de ambos lados de X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X,Y) La función trim(X,Y) devuelve una cadena formada quitando todos los caracteres que aparecen en Y de ambos lados de X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) La función typeof(X) devuelve una cadena que indica el tipo de datos de la expresión X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) La función unicode(X) devuelve el valor numérico del código de punto unicode correspondiente al primer carácter de la cadena X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (X) La función upper(X) devuelve una copia de la cadena X con todos los caracteres ASCII convertidos a mayúsculas. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (N) La función zeroblob(N) devuelve un BLOB consistente en N bytes de 0x00. (timestring,modifier,modifier,...) (timestring,modificador,modificador,...) (format,timestring,modifier,modifier,...) (formato,timestring,modificador,modificador,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) La función avg() devuelve el valor medio de todos los valores no nulos del grupo X. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) La función count(X) devuelve el conteo del número de veces que X no es nulo en un grupo. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X) La función group_concat() devuelve una cadena que es la concatenación de todos los valores no nulos X. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X,Y) La función group_concat() devuelve una cadena que es la concatenación de todos los valores no nulos X, usando el parámetro Y como separador entre las instancias de X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) La función agregada max() devuelve el máximo valor de entre todos los valores en el grupo. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) La función agregada min() devuelve el mínimo valor no NULO de entre todos los valores en el grupo. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) Las funciones agregadas sum() y total() devuelven la suma de todos los valores no NULOS en el grupo. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () El número de fila dentro de la partición actual. Las filas se numeran empezando por 1 en el orden definido por la cláusula ORDER BY en la ventana de definición, o sino en un orden arbitrario. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () El row_number() del primer par (igual) en cada grupo - el rango de la fila actual con huecos. Si no hay una cláusula ORDER BY, entonces todas las filas son consideradas pares y esta función siempre devuelve 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () El número del grupo de pares de la fila actual dentro de su partición - el rango de la fila actual sin huecos. Las particiones se numeran empezando por 1 en el orden definido por la cláusula ORDER BY en la ventana de definición. Si no hay una cláusula ORDER BY, entonces todas las filas son consideradas pares y esta función siempre devuelve 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () A pesar del nombre, esta función siempre devuelve un valor entre 0.0 y 1.0 igual a (rank - 1)/(partition-rows - 1), donde rank es el valor devuelto por la función de ventana incorporada rank() y partition-rows es el número total de filas en la partición. Si la partición contiene sólo una fila, esta función devuelve 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. () La distribución acumulada. Calculada como row-number/partition-rows, donde row-number es el valor devuelto por row_number() para el último par (igual) en el grupo y partition-rows el número de filas en la partición. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (N) El argumento N es tratado como un entero. Esta función divide la partición en N grupos tan equitativamente como sea posible y asigna un entero entre 1 y N a cada grupo, en el orden definido por la cláusula ORDER BY, o sino en un orden arbitrario. Si es necesario, los grupos mayores aparecen primero. Esta función devuelve un valor entero asignado al grupo del que la fila actual es parte. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr) Devuelve el resultado de evaluar la expresión expr con la fila anterior en la partición. Si no hay fila anterior (porque la fila actual es la primera) devuelve NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset) Si se proporciona un offset, éste debe ser un entero no negativo. En este caso el valor devuelto es el resultado de evaluar expr con la fila offset veces anterior a la fila actual dentro de la partición. Si offset es 0, entonces expr se evalua con la fila actual. Si no hay fila offset veces anterior devuelve NULL. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr,offset,default) Si también se proporciona un default, entonces éste es devuelto en lugar de NULL si no existe la fila identificada por offet. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr) Devuelve el resultado de evaluar la expresión expr con la siguiente fila en la partición. Si no hay fila siguiente (porque la fila actual es la última) devuelve NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr,offset) Si se proporciona un offset, éste debe ser un entero no negativo. En este caso el valor devuelto es el resultado de evaluar expr con la fila offset veces posterior a la fila actual dentro de la partición. Si offset es 0, entonces expr se evalua con la fila actual. Si no hay fila offset veces siguiente devuelve NULL. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) Esta función de ventana incorporada calcula el marco de la ventana para cada fila de la misma forma que una función agregada de ventana. Devuelve el valor de expr evaluada con la primera fila en el marco de la ventana para cada fila. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr) Esta función de ventana incorporada calcula el marco de la ventana para cada fila de la misma forma que una función agregada de ventana. Devuelve el valor de expr evaluada con la última fila en el marco de la ventana para cada fila. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. (expr,N) Esta función de ventana incorporada calcula el marco de la ventana para cada fila de la misma forma que una función agregada de ventana. Devuelve el valor de expr evaluada con la fila N del marco de la ventana. Las columnas se numeran dentro del marco de la ventana empezando por 1 en el orden definico por la cláusula ORDER BY, o sino en orden arbitrario. Si no hay fila N-ava en la partición, entonces devuelve NULL. SqliteTableModel reading rows leyendo filas loading... cargando... References %1(%2) Hold Ctrl+Shift and click to jump there Referencia %1(%2) Mantenga pulsado Ctrl+May y haga clic para ir ahí References %1(%2) Hold %3Shift and click to jump there Referencia %1(%2) Mantenga pulsado %3May y haga clic para ir ahí Error changing data: %1 Error modificando datos: %1 retrieving list of columns obteniendo lista de columnas Fetching data... Obteniendo datos... Cancel Cancelar VacuumDialog Compact Database Compactar base de datos Warning: Compacting the database will commit all of your changes. Aviso: compactar la base de datos provocará la consolidación de todos sus cambios. Please select the databases to co&mpact: Seleccione las bases de datos que desea co&mpactar: Warning: Compacting the database will commit all changes you made. Cuidado: Al compactar la base de datos se confirmarán todos los cambios hechos. Please select the objects to compact: Por favor, seleccione los objetos a compactar: sqlitebrowser-3.11.2/src/translations/sqlb_fr.ts000066400000000000000000013077551345112435200220350ustar00rootroot00000000000000 AboutDialog About SqliteBrowser A propos de SQLiteBrowser About DB Browser for SQLite À propos de DB-Browser pour SQLite Version Version <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser pour SQLite est un logiciel libre, open-source utilisé pour créer, concevoir et modifier des Bases de Données SQLite.</p><p>Ce programme vous est proposé sous une double licence : Mozilla Public License Version 2 et GNU General Public License Version 3 ou suivante. Vous pouvez le modifier ou le redistribuer en respectant les conditions de ces licences.</p><p>Voir : <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> et <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> pour plus de détails</p><p>Pour plus d'information concernant ce programme, visitez notre site Internet : <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">Ce logiciel utilise le GPL/LGPL Qt Toolkit fourni par </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Voir : </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> pour les conditions de licence et toute autre information.</span></p><p><span style=" font-size:small;">Il utilise le jeu d&apos;icones Silk créé par Mark James disponible selon la licence Creative Commons Attribution 2.5 and 3.0.<br/>Voir </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> pour plus de details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> DB Browser for SQLite est un logiciel libre, open-source utilisé pour créer, concevoir et modifier des bases de données SQLite. <html><head/><body><p>DB Browser pour SQLite est un logiciel libre, open-source utilisé pour créer, concevoir et modifier des Bases de Données SQLite.</p><p>Ce programme est proposé sous une double licence : Mozilla Public License Version 2 et GNU General Public License Version 3 ou suivante. Vous pouvez le modifier ou le redistribuer en respectant les conditions de ces licences.</p><p>Voir <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> et <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> pour plus de détails.</p><p>Pour plus d'information concernant ce programme, visitez notre site Internet sur : <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">Ce logiciel utilise le GPL/LGPL Qt Toolkit fourni par </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Voir </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> pour les conditions de licence et toute autre information.</span></p><p><span style=" font-size:small;">Il utilise le jeu d'icones Silk créé par Mark James disponible selon la licence Creative Commons Attribution 2.5 and 3.0.<br/>Voir </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> pour plus de détails.</span></p></body></html> Qt Version Version de Qt SQLite Version Version de SQLite &lt;html><head/><body><p>SQLite Database Browser is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> &lt;head/><meta charset="UTF-8"><body><p>SQLite Database Browser est un outil visuel, libre et open-source, pour créer, définir et éditer des bases de données SQLite.</p><p>Il est fourni sous une double licence, la licence Mozilla Public License Version 2 et la licence GNU General Public License Version 3 ou ultérieure. Vous pouvez modifier ou redistribuer de programme dans les mêmes conditions de licence.</p><p>Pour plus de détails, voir : <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> et <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a>.</p><p>Pour plus d'information à propos de ce programme, merci de visiter notre site Internet à l'adresse suivante : <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a>.</p><p><span style=" font-size:small;">Ce logiciel utilise le boite à outils GPL/LGPL Qt Toolkit de </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a>.<span style=" font-size:small;"><br/>Pour toute information et licences, voir : </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a>.</p><p><span style=" font-size:small;">Il utilise aussi le jeu d'icônes Silk créé par Mark James, qui est sous licence Creative Commons Attribution 2.5 et 3.0.<br/>Pour plus de détails, voir : </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a>.</p></body></html> (based on SQLite %1) (basé sur SQLite %1) Version Version Built for Qt Version Version de Qt SQLCipher Version Version de SQLCipher SQLite Version Version de SQLite AddRecordDialog Add New Record Ajouter un nouvel enregistrement Enter values for the new record considering constraints. Fields in bold are mandatory. Saisissez les valeurs en tenant compte des contraintes. Les champs en gras sont obligatoires. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. Dans la colonne Valeur, vous pouvez spécifier la valeur du champ identifié dans la colonne Nom. La colonne Type indique le type du champ. Les valeurs par défaut sont affichées dans le même style que les valeurs NULL. Name Nom Type Type Value Valeur Values to insert. Pre-filled default values are inserted automatically unless they are changed. Valeurs à insérer. Les valeurs par défaut pré-remplies sont insérées automatiquement à moins qu'elles ne soient modifiées. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. Lorsque vous éditez les valeurs dans le cadre supérieur, la requête SQL d'insersion du nouvel enregistrement est affichée ici. Vous pouvez l'éditer manuellement avant de l'enregistrer. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">Enregistrer</span> soumettra l'instruction SQL affichée à la base de données pour créer le nouvel enregistrement..</p><p><span style=" font-weight:600;">Restaurer les valeurs par défaut</span> restaurera les valeurs par défaut dans la <span style=" font-weight:600;">colonne</span> Valeur.</p><p><span style=" font-weight:600;">Annuler</span> fermera cette boîte de dialogue sans exécuter la requête.</p></body></html> Auto-increment Incrément automatique Unique constraint Contrainte unique Check constraint: %1 Vérifier les contraintes : %1 Foreign key: %1 Clé étrangère : %1 Default value: %1 Valeur par défaut : %1 Error adding record. Message from database engine: %1 Erreur lors de l'ajout d'un enregistrement. Message du moteur de base de données : %1 Are you sure you want to restore all the entered values to their defaults? Êtes-vous sûr de vouloir restaurer toutes les valeurs saisies à leurs valeurs par défaut ? Application Usage: %1 [options] [db] Usage: %1 [options] [db]> Possible command line arguments: Arguments utilisables en ligne de commande : -h, --help Show command line options -h, --help Affiche les options en mode ligne de commande -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [fichier] Exécute ce fichier de commande SQL après l'ouverture de la base de données -s, --sql [file] Execute this SQL file after opening the DB Il est possible de remplacer "ce fichier de commande SQL" par "ce fichier SQL" et "base de données" par BdD -s, --sql [fichier], Exécute ce fichier de commande SQL après l'ouverture de la base de données -t, --table [table] Browse this table after opening the DB Il est possible de remplacer "base de données" par BdD -t, --table [table] Parcourir cette table après l'ouverture de la base de données -q, --quit Exit application after running scripts -q, --quit Quitte l'application après l'exécution du script -R, --read-only Open database in read-only mode -R, --read-only Ouvre la base de données en lecture seule -o, --option [group/setting=value] Run application with this setting temporarily set to value -v, --version Display the current version -v, --version Affiche la version en cours [file] Open this SQLite database [fichier] Ouvre cette base de données SQLite This is DB Browser for SQLite version %1. Voici DB Browser pour SQLite version %1. This is DB Browser for SQLite version %1%2. Voici DB Browser pour SQLite version %1%2. The -s/--sql option requires an argument L'option -s/--sql nécessite un argument The file %1 does not exist Le fichier %1 n'existe pas The -t/--table option requires an argument L'option -t/--table nécessite un argument The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 Option invalide ou fichier %1 inexistant CipherDialog SQLCipher encryption Chiffrement par SQLCipher &Password Mot de &Passe &Reenter password &Retaper le mot de passe Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze &Taille de page &KDF iterations HMAC algorithm KDF algorithm Passphrase The button size is not large enought to handle the whole "french text", if #Passphrase must be translate Phrase Secrète Raw key Same comment as for Passphrase Clé de Chiffrement Page &size &Taille de la page Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Veuillez définir une clé pour chiffrer la Base de Données. Notez que si vous modifiez les autres paramètres, optionnels, vous devrez les ressaisir chaque fois que vous ouvrirez la Base de Données. Laisser les champs Mot de passe à blanc pour désactiver le chiffrement. Le processus de chiffrement peut prendre un certain temps. Vous devriez avoir une copie de sauvegarde de votre Base de Données ! Les modifications non enregistrées seront appliquées avant la modification du chiffrement. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. Veuillez entrer la clé utilisée pour le chiffrement de la Base de Données. Si d'autres paramètres ont été modifiés pour cette Base de Données, vous devrez aussi fournir ces informations. ColumnDisplayFormatDialog Choose display format Choisir un format d'affichage Display format Format d'affichage Choose a display format for the column '%1' which is applied to each value prior to showing it. Choisissez le format d'affichage pour la colonne '%1'. Il sera appliqué à chaque valeur avant son affichage. Default Défaut Decimal number Nombre décimal Exponent notation Notation scientifique Hex blob Blob Hexadécimal Hex number Nombre Hexadécimal Apple NSDate to date Apple NSDate vers date Java epoch (milliseconds) to date Java epoch (milliseconds) en date Julian day to date Date jullienne vers Date Unix epoch to local time Heure Unix epoch vers heure locale Date as dd/mm/yyyy Date au format DD/MM/AAAA Lower case Minuscule Octal number Nombre en Octal Round number Nombre arrondi Unix epoch to date Date Unix epoch en Date Upper case Majuscule Windows DATE to date Date Windows en Date Custom Personnalisé DBBrowserDB Please specify the database name under which you want to access the attached database Veuillez spécifier le nom de la Base de Données sous laquelle vous voulez accéder à la Base de Données attachée Invalid file format Format de fichier invalide Do you want to save the changes made to the database file %1? Voulez-vous enregistrer les changements effectués dans la Base de Données %1 ? Exporting database to SQL file... Exporter la base de données dans un fichier SQL... Cancel Annuler Executing SQL... Exécution du SQL... Action cancelled. Action annulée. Error in statement #%1: %2. Aborting execution. Erreur dans le traitement #%1 : %2. L'exécution est abandonnée. renameColumn: cannot find table %1. Renommer les Colonnes : La table %1 n'a pas été trouvée. This database has already been attached. Its schema name is '%1'. Cette base de données a déjà été attachée. Son nom de schéma est '%1'. Do you really want to close this temporary database? All data will be lost. Voulez-vous vraiment fermer cette base de données temporaire ? Toutes les données seront perdues. The database is currently busy: La base de données est actuellement occupée : Do you want to abort that other operation? Voulez-vous annuler cette autre opération ? No database file opened Aucun fichier de base de données ouvert Error in statement #%1: %2. Aborting execution%3. Erreur dans le traitement #%1 : %2. Exécution de %3 abandonnée. and rolling back et annulation des changements didn't receive any output from %1 could not execute command: %1 Cannot delete this object Impossible de supprimer cet objet Cannot set data on this object 170726 MVT Has to be checked in real context Définition des données impossible pour cet objet A table with the name '%1' already exists in schema '%2'. Une table portant le nom " %1 " existe déjà dans le schéma " %2 ". renameColumn: cannot find column %1. Renommer les Colonnes : La colonne %1 n'a pas été trouvée. renameColumn: creating savepoint failed. DB says: %1 Renommer les Colonnes : La création d'un point de sauvegarde a échoué. Message du moteur de base de données : %1 renameColumn: creating new table failed. DB says: %1 Renommer les Colonnes : La création de la table a échoué. Message du moteur de base de données : %1 renameColumn: copying data to new table failed. DB says: %1 Renommer les Colonnes : La copie des données dans une nouvelle table a échoué. Message du moteur de base de données : %1 renameColumn: deleting old table failed. DB says: %1 Renommer les Colonnes : La suppression de l'ancienne table a échoué. Message du moteur de base de données : %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: La restauration de certains des objets associés à cette table a échoué. Cela est le plus souvent dû au changement du nom de certaines colonnes. Voici l'instruction SQL que vous pourrez corriger et exécuter manuellement : renameColumn: releasing savepoint failed. DB says: %1 Renommer les Colonnes : La libération d'un point de sauvegarde a échoué. Message du moteur de base de données : %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Erreur lors du changement de nom de la table %1 vers %2. Message du moteur de base de données : %3 ... <string can not be logged, contains binary data> ... ... <la Chaîne de caractère ne peut être journalisée. Elle contient des données binaires> ... could not get list of databases: %1 n'a pas pu obtenir la liste des bases de données : %1 Error loading extension: %1 Erreur lors du chargement de l'extension %1 could not get column information 170726 MVT Has to be checked in real context ne peut obtenir les informations sur la colonne unknown object type %1 Type d'objet %1 inconnu could not get list of db objects: %1, %2 la liste des objets de la base de données ne peut être obtenue : %1, %2 could not get types la liste des types ne peut être obtenue didn't receive any output from pragma %1 n'a pas reçu toutes les sorties du pragma %1 could not execute pragma command: %1, %2 ne peut pas exécuter les commandes du pragma : %1, %2 Error setting pragma %1 to %2: %3 Erreur dans les paramètres des pragma %1 à %2 : %3 File not found. Fichier non trouvé. DbStructureModel Name Nom Object Objet Type Type Schema Schéma Browsables (%1) Consultables (%1) Database Base de Données Browsables Consultables All Tout Temporary Temporaire Tables (%1) Tables (%1) Indices (%1) Index (%1) Views (%1) Vues (%1) Triggers (%1) Déclencheurs (%1) EditDialog Edit database cell Éditer le contenu d'une cellule Mode: Mode : This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Voici la liste des modes pris en charge par l'éditeur de cellules. Choisissez un mode d'affichage ou d'édition des données de la cellule courante. Image Image JSON JSON XML XML Automatically adjust the editor mode to the loaded data type Ajuster automatiquement le mode éditeur au type de données chargé This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Ce bouton à cocher active ou désactive le changement automatique du mode éditeur. Lorsqu'une nouvelle cellule est sélectionnée ou de nouvelles données sont importées et que la commutation automatique est activée, le mode s'adapte au type de données détecté. Vous pouvez ensuite changer le mode éditeur manuellement. Si vous souhaitez conserver ce mode de commutation manuelle pendant que vous vous déplacez dans les cellules, éteignez le bouton. Auto-switch Auto-switch Auto-format: pretty print on loading, compact on saving. Auto-format : formater au chargement, compacter à l'enregistrement. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Lorsqu'elle est activée, la fonction de formatage automatique met en forme les données lors du chargement, tranforme le texte en lignes et ajoute des retraits pour une lisibilité maximale. Lors de la sauvegarde des données, la fonction de formatage automatique compacte les données en supprimant les fins des lignes et les espaces inutiles. Autoformat Format Automatique Import from file Importer depuis un fichier Opens a file dialog used to import any kind of data to this database cell. Ouvre une boîte de dialogue pour importer n'importe quel type de données dans cette cellule de base de données. Export to file Exporter vers un fichier Opens a file dialog used to export the contents of this database cell to a file. Ouvrir la boîte de dialogue pour exporter le contenu de cette cellule de la base de données vers un fichier. Print... Imprimer... Open preview dialog for printing displayed image Ouvrir un apperçu de l'image pour son impression Ctrl+P Ctrl+P Open preview dialog for printing displayed text Ouvrir un apperçu du texte avant son impression Copy Hex and ASCII Copier l'Hex et l'ASCII Copy selected hexadecimal and ASCII columns to the clipboard Copier les colonnes hexadécimales et ASCII sélectionnées dans le presse-papiers Ctrl+Shift+C Ctrl+Shift+C Import text Importer du texte Opens a file dialog used to import text to this database cell. Ouvrir la boîte de dialogue permettant d'importer du texte dans cette cellule. &Import &Importer Export text Exporter du texte Opens a file dialog used to export the contents of this database cell to a text file. Ouvrir la boîte de dialogue permettant d'exporter le contenu de la cellule de la base de données vers un fichier texte. &Export &Exporter Set this cell to NULL Définir cette cellule comme NULL Set as &NULL Définir comme &NULL This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Ce mode éditeur vous permet d'éditer des données JSON ou XML avec la coloration syntaxique, la formatage automatique et la validation avant sauvegarde. Les erreurs sont signalées par un tilde rouge souligné. Apply data to cell [Ctrl+Return] Appliquer les données à la cellule [Ctrl+Retour] This button saves the changes performed in the cell editor to the database cell. Ce bouton permet de sauvegarder les modifications effectuées dans l'éditeur de cellule dans la cellule de base de données. Apply Appliquer Text Texte Binary Binaire Clear cell data Effacer les données de la cellule Erases the contents of the cell Effacer le contenu de la cellule &Clear &Effacer <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warning: Editing binary content in text mode may result in corrupted data!</span></p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Attention : Éditer un contenu binaire en mode texte peut corrompre les données!</span></p></body></html> This area displays information about the data present in this database cell Cette zone affiche des informations à propos des données contenues dans la cellule de la base de données Type of data currently in cell Type actuel des données dans la cellule Size of data currently in table Taille actuelle des données dans la table Choose a file Choisir un fichier Text files(*.txt);;Image files(%1);;All files(*) Fichiers Texte (*.txt);;Fichiers Image(%1);;Tous les fichiers(*) Choose a filename to export data Choisir un nom de fichier pour exporter les données Text files(*.txt);;All files(*) Fichiers Texte (*.txt);;Tous les fichiers(*) Image data can't be viewed with the text editor Les données d'une image ne peuvent être affichées dans l'éditeur de texte Binary data can't be viewed with the text editor Les données binaires ne peuvent être affichées dans l'éditeur de texte Type of data currently in cell: %1 Image Type actuel des données de la cellule. Image %1 %1x%2 pixel(s) %1x%2 pixel(s) Type of data currently in cell: NULL Type actuel des données de la cellule : NULL Type of data currently in cell: Text / Numeric Type actuel des données de la cellule : Texte / Numérique Image data can't be viewed in this mode. L'image ne peut être affichée dans ce mode. Try switching to Image or Binary mode. Essayez de basculer vers le mode Image ou le mode Binaire. Binary data can't be viewed in this mode. Les données Binaires ne peuvent être affichées dans ce mode. Try switching to Binary mode. Essayez de basculer vers le mode Binaire. Text files (*.txt) Fichiers Texte (*.txt) JSON files (*.json) Fichiers JSON (*.json) XML files (*.xml) Fichiers XML (*.xml) Image files (%1) Fichiers image (%1) Binary files (*.bin) Fichiers Binaires (*.bin) All files (*) Tous les fichiers (*) Choose a file to import Choisir un fichier à importer %1 Image %1 Image SVG files (*.svg) Fichiers SVG (*.svg) Hex dump files (*.txt) Fichiers Dump Hexadécimal (*.txt) Invalid data for this mode Les données sont invalides pour ce mode The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? La cellule contient des données %1 invalides. Raison : %2. Vouslez-vous vraiment l'appliquer à la cellule ? %n char(s) %n caractère %n caractères Type of data currently in cell: Valid JSON Type de données actuellement dans la cellule : JSON valide Type of data currently in cell: Image Type des données actuellement dans la cellule : Image %1x%2 pixel %1x%2 pixel Type of data currently in cell: Binary Type actuel des données de la cellule : Binaire %n byte(s) %n octet %n octets EditIndexDialog Create New Index Créer un Nouvel Index &Name &Nom &Columns &Colonnes Column Colonne Use in Index Utiliser dans l'index Order Ordre &Table &Table Edit Index Schema Éditer le schéma d'index &Unique &Unique For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Pour restreindre l'index à un sous-ensemble de la table, vous pouvez spécifier une clause WHERE ici. Elle sélectionnera le sous-ensemble de la table qui sera indexé Partial inde&x clause Clause d'inde&x partiel Colu&mns &Colonnes Table column Colonne de table Type Type Add a new expression column to the index. Expression columns contain SQL expression rather than column names. 170726 MVT Has to be checked in real context Ajouter une nouvelle expression de colonne à l'index. Les expressions de colonnes contiennent des expressions SQL plutôt que des noms de colonnes. Index column Colonne d'Index Deleting the old index failed: %1 La suppression de l'ancien index a échoué : %1 Creating the index failed: %1 La création de l'index a échoué : %1 EditTableDialog Edit table definition Éditer la définition de la table Table Table Advanced Avancé Database schema Schéma de la base de Données Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Faire cette table "SANS RowId". Positionner cette option nécessite un champ de type INTEGER défini comme clé primaire ET pour lequel l'incrément automatique a été désactivé. Without Rowid Sans RowId Set this to create a temporary table that is deleted when closing the database. Cochez cette case pour créer une table temporaire qui sera supprimée lors de la fermeture de la base de données. Temporary table Table Temporaire Fields Champs Add field Ajouter un champ Remove field Supprimer un champ Move field up Remonter le champ Move field down Descendre le champ Name Nom Type Type NN NN Not null Non-Null PK CP Primary key Clé primaire AI IA Autoincrement Incrément automatique U U Unique Unique Default Défaut Default value Valeur par défaut Check Vérifier Check constraint Vérifier les contraintes Foreign Key Clé étrangère <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Attention : </span>Il y a quelque chose dans la définition de cette table que notre analyseur syntaxique n'a pas complètement compris. La modification et la sauvegarde de cette table peuvent créer des problèmes.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result it in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Attention : </span>Il y a quelque chose dans la définition de cette table que notre analyseur syntaxique n'a pas complètement compris. La modification et la sauvegarde de cette table peut créer des problèmes.</p></body></html> Error creating table. Message from database engine: %1 Erreur lors de la création de la table. Message du moteur de la base de données : %1 There already is a field with that name. Please rename it first or choose a different name for this field. Il existe déjà un champ avec ce nom. Veuillez le renommer avant ou choisir un autre nom pour ce champ. This column is referenced in a foreign key in table %1, column %2 and thus its name cannot be changed. Cette colonne est référencée dans une clé étrangère dans la table %1, colonne %2. Son nom ne peut être changé. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. Cette colonne est référencée dans une clé étrangère dans la table %1. Son nom ne peut être changé. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. Il existe au moins un enregistrement avec ce champ autorisant des valeurs nulles (NULL). Il est donc impossible de définir cet indicateur. Veuillez modifier les données de la table au préalable. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Il existe au moins un enregistrement avec une valeur qui n'est pas un nombre entier dans ce champ. Il est donc impossible de définir l'indicateur AI (Incrément automatique) sur ce champ. Veuillez modifier les données de la table au préalable. Column '%1' has no unique data. La colonne %1 n'a pas de valeurs uniques. This makes it impossible to set this flag. Please change the table data first. Cela rend le choix de cette option impossible. Veuillez au préalable modifier les données de la table. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Modifying this column failed. Error returned from database: %1 La modification de cette colonne a échoué. Erreur retournée par la base de données : %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Êtes-vous sûr de vouloir supprimer le champ "%1" ? Toutes les données contenues dans ce champ seront perdues. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Veuillez ajouter un champ ayant les caractéristiques suivant avant de positionner l'option Sans RowId : - Défini comme clé primaire ; - Incrément automatique désactivé Setting the rowid column for the table failed. Error message: %1 Le paramétrage de la colonne RowId pour la table a échoué. Message d'erreur : %1 Changing the table schema failed. Error message: %1 Le changement du schéma de la Base de Données a echoué. Message d'erreur : %1 Setting the temporary flag for the table failed. Error message: %1 Activer l'option "table temporaire" pour cette table a échoué. Message d'erreur : %1 ExportDataDialog Export data as CSV Exporter au format CSV &Table &Table &Table(s) &Table(s) &Column names in first line Nom des &Col. en 1ère ligne Field &separator &Séparateur de champ Tab&le(s) &Table(s) Colu&mn names in first line Nom des &Col. en 1ère ligne Fie&ld separator &Séparateur de champ , , ; ; Tab Tabulation | | Other Autre &Quote character T&ype de guillemet " " ' ' New line characters Saut de ligne Windows: CR+LF (\r\n) Windows: CR+LF (\r\n) Unix: LF (\n) Unix: LF (\n) Pretty print Formatter Could not open output file: %1 Le fichier de destination %1 ne peut être ouvert Choose a filename to export data Choisir un nom de fichier pour exporter les données Text files(*.csv *.txt) Fichiers Texte (*.csv *.txt) Export data as JSON Exporter au format JSON exporting CSV Exporter au format CSV exporting JSON Exporter au format JSON Text files(*.json *.js *.txt) Fichiers Texte (*.json *.js *.txt) Please select at least 1 table. Veuillez sélectionner au moins une table. Choose a directory Choisir un répertoire Export completed. Export terminé. Could not open output file. Le fichier de destination ne peut être ouvert. ExportSqlDialog Export SQL... Same as defined in English... But converted to uniformize with other dialog boxes. Exporter au format SQL... Tab&le(s) Tab&le(s) Select All Sélectionner tout Deselect All Déselectionner tout &Options &Options Keep column names in INSERT INTO Conserver les noms des colonnes dans INSERT INTO Multiple rows (VALUES) per INSERT statement Plusieurs enregistrements (VALUES) par INSERT Export everything Exporter tout Export schema only Exporter uniquement le schéma Export data only Exporter uniquement les données Keep old schema (CREATE TABLE IF NOT EXISTS) Conserver l'ancien schéma (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Écraser l'ancien schéma (DROP TABLE, puis CREATE TABLE) Please select at least 1 table. Veuillez sélectionner au moins une table. Please select at least one table. Veuillez sélectionner au moins une table. Choose a filename to export Choisir un nom de fichier pour l'export Text files(*.sql *.txt) Fichiers Texte (*.sql *.txt) Export completed. Export terminé. Export cancelled or failed. L'export a été annulé ou a échoué. ExtendedScintilla Ctrl+H Ctrl+H Ctrl+P Ctrl+P Find and Replace... Chercher et remplacer... Print... Imprimer... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? Le contenu du presse-papier est plus grand que la plage sélectionnée. Voulez-vous poursuivre l'insertion malgré tout ? Use as Exact Filter Utiliser comme filtre exact Containing Contenant Not equal to Différent de Greater than Plus grand que Less than Plus petit que Greater or equal Plus grand ou égal à Less or equal Plus petit ou égal à Between this and... Entre ceci et... Set to NULL Définir comme NULL Copy Copier Copy with Headers Copier avec les Entêtes Copy as SQL Copier comme du SQL Paste Coller Print... Imprimer... Use in Filter Expression Uriliser dans l'expression du Filtre Alt+Del Alt+Supp Ctrl+Shift+C Ctrl+Shift+C Ctrl+Alt+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? Le contenu du presse-papier est plus grand que la plage sélectionnée. Voulez-vous poursuivre l'insertion malgré tout ? FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Base de Données SQLite (*.db *.sqlite *.sqlite3 *.db3);;Tous les fichiers (*) FileExtensionManager File Extension Manager Gestionnaire d'extension de fichier &Up &Monter &Down &Descendre &Add &Ajouter &Remove &Supprimer Description Description Extensions Extensions *.extension *.extension FilterLineEdit Filter Filtre These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Ces champs de saisie vous permettent d'effectuer des filtres rapides dans la table actuellement sélectionnée. Par défaut, les lignes contenant le texte saisi sont filtrées. Les opérateurs suivants sont également pris en charge : Caractère de remplacement > Supérieur à < Inférieur à >= Supérieur ou Égal à <= Inférieur ou Égal à = Égal à : correspondance exacte <> Différent de : correspondance inverse exacte x~y Plage : valeurs comprises entre x et y Set Filter Expression Définir l'expression du filtre What's This? Qu'est-ce que c'est ? Is NULL Est NULL Is not NULL Est non NULL Is empty Est Vide Is not empty Est non Vide Equal to... Egal à... Not equal to... Différent de... Greater than... Plus grand que... Less than... Plus petit que... Greater or equal... Plus grand ou égal à... Less or equal... Plus petit ou égal à... In range... Peut être aussi traduit par "dans la plage..." ou "Entre..." Entre les valeurs... FilterTableHeader Filter Filtre FindReplaceDialog Find and Replace Chercher et remplacer Fi&nd text: &Rechercher : Re&place with: Re&mplacer avec : Match &exact case &Expression exacte Match &only whole words M&ots entiers uniquement When enabled, the search continues from the other end when it reaches one end of the page Lorsque la Recherche circulaire est activée, la recherche recommence au début une fois atteinte la fin de la page &Wrap around Recherche &Circulaire When set, the search goes backwards from cursor position, otherwise it goes forward Lorsqu'elle est activée, la recherche s'effectue en remontant à partir de la position du curseur, sinon elle se fait en descendant Search &backwards Rechercher vers le &haut <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> La version française de https://en.wikibooks.org/wiki/Regular_Expressions n'existe pas <html><head/><body><p>Lorsqu'elle est cochée, le motif à trouver est interprété comme une expression régulière UNIX. Voir <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Use regular e&xpressions Utiliser les e&xpressions régulières Find the next occurrence from the cursor position and in the direction set by "Search backwards" Trouver l'occurrence suivante à partir de la position du curseur et dans la direction définie par "Rechercher vers le haut" &Find Next &Suivant &Replace Rem&placer Highlight all the occurrences of the text in the page Surligner toutes les occurrences du texte dans la page F&ind All Rechercher &Tout Replace all the occurrences of the text in the page Remplace toutes les occurrences du texte dans la page Replace &All Remplacer To&ut The searched text was not found Le texte recherché n'a pas été trouvé The searched text was not found. Le texte recherché n'a pas été trouvé. The searched text was found one time. Le texte recherché a été trouvé une fois. The searched text was found %1 times. Le texte recherché a été trouvé %1 fois. The searched text was replaced one time. Le texte recherché a été remplacé une fois. The searched text was replaced %1 times. Le texte recherché a été remplacé %1 fois. ForeignKeyEditor &Reset &Réinitialiser Foreign key clauses (ON UPDATE, ON DELETE etc.) Clauses de clé étrangère (ON UPDATE, ON DELETE etc.) (foreign key clauses(ON UPDATE, ON DELETE etc.) (clauses de clé étrangère (ON UPDATE, ON DELETE etc.) ImportCsvDialog Import CSV file Importer un fichier CSV &Table name Nom de la &Table Table na&me No&m de la Table &Column names in first line Nom des &Col. en 1ère ligne Field &separator &Séparateur de champ , , ; ; Tab Tabulation | | Other Autre &Quote character T&ype de guillemet " " ' ' &Encoding &Encodage UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? Réduire les champs ? Separate tables Tables distinctes Advanced Avancé When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Lorsque vous importez une valeur vide du fichier CSV dans une table existante avec une valeur par défaut pour cette colonne, cette valeur par défaut est insérée. Activez cette option pour insérer une valeur vide à la place. Ignore default &values Ignorer les &valeurs par défaut Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Activez cette option pour arrêter l'importation lorsque vous essayez d'importer une valeur vide dans une colonne NON NULL sans valeur par défaut. Fail on missing values Erreur sur les valeurs manquantes Disable data type detection Désactiver la détection du type de données Disable the automatic data type detection when creating a new table. Désactive la détection automatique du type de données lors de la création d'une nouvelle table. Deselect All Déselectionner tout Match Similar 170726 MVT Has to be checked in real context or after explanation of this function. I suppose this function permits, with data names on the first line to "prefill a corresponding names" in an existing object ? Appairer Select All Sélectionner tout Inserting data... Ajout des données... Cancel Annuler There is already a table of that name and an import into an existing table is only possible if the number of columns match. Il existe déjà une table portant ce nom. Importer des données dans une table existante n'est possible que si le nombre de colonnes correspond. There is already a table of that name. Do you want to import the data into it? Il existe déjà une table portant ce nom. Voulez-vous y importer les données ? Import completed Import terminé There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. Il existe déjà une table nommée'%1' et une importation dans une table existante n'est possible que si le nombre de colonnes correspond. There is already a table named '%1'. Do you want to import the data into it? Il existe déjà une table appelée "%1". Voulez-vous y importer les données ? Creating restore point failed: %1 La création du point de restauration a échoué : %1 Creating the table failed: %1 La création de la table a échoué %1 importing CSV Importer au format CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. L'importation du fichier'%1' a pris %2ms. %3ms ont été dépensés dans la fonction enregistrement. Missing field for record %1 Champ manquant pour l'enregistrement %1 Inserting row failed: %1 L'insertion de l'enregistrement a échoué : %1 MainWindow SQLiteBrowser SQLiteBrowser Database &Structure &Structure de la base de données toolBar1 Barre d'outils1 &Browse Data &Parcourir les données Table: Table : Select a table to browse data Sélectionner une table pour parcourir son contenu Use this list to select a table to be displayed in the database view Utiliser cette liste pour sélectionner la table à afficher dans la vue Base de Données Refresh the data in the selected table. Rafraîchir les données de la table sélectionnée. This button refreshes the data in the currently selected table. Ce bouton permet de rafraîchir les données de la table actuellement sélectionnée. <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Attention : ce pragma n'est pas lisible et cette valeur a été déduite. Ecrire le pragma pourrait écraser un LIKE redéfini fourni par une extension SQLite. &Tools &Outils Edit Database &Cell Éditer le contenu d'une &Cellule SQLCipher &FAQ... SQLCipher &FAQ... Opens the SQLCipher FAQ in a browser window Ouvre la FAQ de SQLCipher dans la fenêtre d'un navigateur Table(s) to JSON... Table(s) vers JSON... Export one or more table(s) to a JSON file Exporter une ou plusieurs tables vers un fichier JSON Save to Remote Sauvegarder sur un serveur distant Refresh Rafraichir F5 F5 Clear all filters Effacer tous les filtres Insert a new record in the current table Insérer un nouvel enregistrement dans la table en cours This button creates a new, empty record in the database Ce bouton permet de créer un nouvel enregistrement, vide, dans la Base de Données New Record Nouvel Enregistrement Delete the current record Supprimer l'enregistrement courant This button deletes the record currently selected in the database Ce bouton permet de supprimer l'enregistrement sélectionné de la Base de Données Delete Record Supprimer l'enregistrement This is the database view. You can double-click any record to edit its contents in the cell editor window. Ceci est la vue Base de données. Vous pouvez, en double-cliquant sur un enregistrement, modifier son contenu dans la fenêtre Éditeur de cellule. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Aller au début</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Cliquer sur ce bouton permet d'aller au début de la table ci-dessus.</p></body></html> |< |< < < 0 - 0 of 0 0 - 0 de 0 > > Scroll 100 records upwards Remonter de 100 enregistrements DB Browser for SQLite DB Browser pour SQLite <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>Cliquer sur ce bouton permet de remonter de 100 enregistrements dans l'affichage de la table ci-dessus.</p></body></html> <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>Descendre de 100 enregistrements</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>Cliquer sur ce bouton permet de descendre de 100 enregistrements dans l'affichage de la table ci-dessus.</p></body></html> Scroll to the end Aller à la fin <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Cliquer sur ce bouton permet d'aller à la fin de la table ci-dessus.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>Cliquer ici pour vous déplacer sur l'enregistrement défini</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>Ce bouton est utilisé pour aller directement à l'enregistrement défini dans le champ Aller à.</p></body></html> Go to: Aller à : Enter record number to browse Entrez le nombre d'enregistrements à parcourir Type a record number in this area and click the Go to: button to display the record in the database view Entrez un numéro d'enregistrement dans ce champ et cliquez sur le bouton "Aller à" pour afficher l'enregistrement dans la vue Base de Données 1 1 Edit &Pragmas Éditer les &Pragmas <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum""><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum""><span style=" text-decoration: underline; color:#0000ff;">Vidage automatique</span></a></p></body></html> None Aucun Full Complet Incremental Incrémental <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index""><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index""><span style=" text-decoration: underline; color:#0000ff;">Index Automatique</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync""><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync""><span style=" text-decoration: underline; color:#0000ff;">Point de contrôle FSYNC intégral</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys""><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys""><span style=" text-decoration: underline; color:#0000ff;">Clés étrangères</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync""><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync""><span style=" text-decoration: underline; color:#0000ff;">FSYNC intégral</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints""><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints""><span style=" text-decoration: underline; color:#0000ff;">Ignorer le contrôle des contraintes</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode""><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode""><span style=" text-decoration: underline; color:#0000ff;">Mode de journalisation</span></a></p></body></html> Delete Supprimer Truncate Tronquer Persist Persistant Memory Mémoire WAL WAL Off Arrêté <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit""><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit""><span style=" text-decoration: underline; color:#0000ff;">Taille maximale du Journal</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode""><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode""><span style=" text-decoration: underline; color:#0000ff;">Mode de recherche</span></a></p></body></html> Normal Normal Exclusive Exclusif <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count""><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count""><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size""><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size""><span style=" text-decoration: underline; color:#0000ff;">Taille de la Page</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers""><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers""><span style=" text-decoration: underline; color:#0000ff;">Déclencheurs récursifs</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete""><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete""><span style=" text-decoration: underline; color:#0000ff;">Suppression sécurisée</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous""><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous""><span style=" text-decoration: underline; color:#0000ff;">Synchronisation</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store""><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store""><span style=" text-decoration: underline; color:#0000ff;">Stockage temporaire</span></a></p></body></html> Default Défaut File Fichier <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version""><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version""><span style=" text-decoration: underline; color:#0000ff;">Version utilisateur</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint""><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint""><span style=" text-decoration: underline; color:#0000ff;">Point de contrôle WAL automatique</span></a></p></body></html> E&xecute SQL E&xécuter le SQL &File &Fichier &Import &Importer &Export &Exporter &Edit É&dition &View &Vue &Help &Aide toolBar Barre d'outils SQL Log Journal SQL &Show SQL submitted by A&fficher le SQL soumis par User Utilisateur Application Application This button clears the contents of the SQL logs Ce bouton supprime le contenu des logs SQL &Clear &Effacer Plot Voir le contexte d'utilisation Graphique Columns Colonnes X X Y Y _ _ Save current plot... Voir le contexte d'utilisation Enregistrer le tracé actuel... DB Schema DB Schema &New Database... &Nouvelle base de données... Create a new database file Créer une nouvelle base de données This option is used to create a new database file. Cette option est utilisée pour créer un nouveau fichier de base de données. Ctrl+N Ctrl+N &Open Database... &Ouvrir une base de données... Open an existing database file Ouvrir une base de données existante This option is used to open an existing database file. Cette option est utilisée pour ouvrir une base de données existante. Ctrl+O Ctrl+O &Close Database &Fermer la base de données This button closes the connection to the currently open database file Ce bouton ferme la connexion à la base de données actuellement ouverte Ctrl+W Ctrl+W &Revert Changes &Annuler les modifications Revert database to last saved state Revenir à la dernière sauvegarde de la base de données This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Cette option permet de remettre la base de données dans l'état de sa dernière sauvegarde. Tous les changements effectués depuis cette dernière sauvegarde seront perdus. &Write Changes Enregistrer les &modifications Write changes to the database file Enregistrer les modifications dans la base de données This option is used to save changes to the database file. Cette option est utilisée pour enregistrer les modifications dans la base de données. Ctrl+S Ctrl+S Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] Exécuter soit Tout soit le SQL sélectionné [F5, Ctrl+Entrée, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. Ce bouton lance l'exécution des commandes SQL actuellement sélectionnées. Si aucun texte n'est sélectionné, toutes les commandes SQL seront écécutées. This button opens a file containing SQL statements and loads it in a new editor tab Ce bouton ouvre un fichier contenant des instructions SQL et le charge dans un nouvel onglet de l'éditeur &Wiki &Wiki Bug &Report... &Rapport d'erreur... Feature Re&quest... &Demande de fonctionnalités... Web&site &Site Internet &Donate on Patreon... Effectuer une &Donation sur Patreon... Sa&ve Project... Sau&vegarder le projet... This button lets you save all the settings associated to the open DB to a DB4S project file Ce bouton vous permet d'enregistrer tous les paramètres associés à la Base de Données ouverte dans un fichier projet DB4S Open &Project... Ouvrir un &Projet... This button lets you open a DB4S project file Ce bouton ouvre un fichier projet DB4S &Attach Database... Attac&her une Base de Données... Add another database file to the current database connection Ajouter un autre fichier de base de connées à la connexion à la base de données en cours This button lets you add another database file to the current database connection Ce bouton vous permet d'ajouter un autre fichier de base de données à la connexion de base de données en cours &Set Encryption... Chi&ffrer... SQLCipher &FAQ &Faq SQLCipher Table(&s) to JSON... Table(&s) vers JSON... Open Data&base Read Only... Ouvrir la base de données en &Lecture seule... Save results Sauvegarder les résultats Save the results view Sauvegarder la vue des résultats This button lets you save the results of the last executed query Ce bouton vous permet de sauvegarder les résultats de la dernière requête exécutée Find text in SQL editor Rechercher du texte dans l'éditeur SQL Find text in SQL editor [Ctrl+F] Rechercher du texte dans l'éditeur SQL [Ctrl+F] This button opens the search bar of the editor Ce bouton ouvre la barre de recherche dans l'éditeur Ctrl+F Ctrl+F Find or replace text in SQL editor Rechercher ou remplacer du texte dans l'éditeur SQL Find or replace text in SQL editor [Ctrl+H] Rechercher ou remplacer du texte dans l'éditeur SQL [Ctrl+F] This button opens the find/replace dialog for the current editor tab Ce bouton ouvre la boîte de dialogue Rechercher/Remplacer pour l'onglet de l'éditeur courant Export to &CSV Exporter au format &CSV Save as &view Enregistrer comme une &vue Save as view Enregistrer comme une vue Hide column(s) Masquer une/des colonnes Hide selected column(s) Maquer la/les colonnes sélectionnées Show all columns Afficher toutes les colonnes Show all columns that were hidden Permet d'afficher toutes les colonnes qui ont été masquées Shows or hides the Project toolbar. Afficher ou masquer la barre d'outil Projet. Extra DB Toolbar Extra DB Toolbar Export the filtered data to CSV Exporte les données filtrées au format CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Ce bouton exporte les données du tableau parcouru telles qu'elles sont actuellement affichées (après les filtres, les formats d'affichage et la colonne d'ordre) dans un fichier CSV. Save the current filter, sort column and display formats as a view Enregistrer le filtre, la colonne de tri et les formats d'affichage actuels sous forme de vue This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Ce bouton permet de sauvegarder les paramètres actuels de la table parcourue (filtres, formats d'affichage et colonne d'ordre) sous forme de vue SQL que vous pourrez ensuite parcourir ou utiliser dans les instructions SQL. Insert Values... Ajout de valeurs... Open a dialog for inserting values in a new record Ouvre une fenêtre de dialogue permettant l'insersion de valeurs dans un nouvel enregistrement Insert new record using default values in browsed table Insérer un nouvel enregistrement en utilisant les valeurs par défaut de la table parcourrue New In-&Memory Database Nouvelle base de données en &Mémoire Drag && Drop Qualified Names Glisser && Déposer les noms qualifiés Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Utilisez des noms qualifiés (par ex. "Table", "Champ") lorsque vous faites glisser les objets et pour les déposez dans l'éditeur Drag && Drop Enquoted Names Glisser && Déposer les noms cités Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor Utiliser les identificateurs par défaut (par ex. "Table1") lors du glisser-déposer des objets dans l'éditeur &Integrity Check Vérifier l'&Intégrité Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. Exécute le pragma integrity_check sur la base de données ouverte et retourne les résultats dans l'onglet Exécuter SQL. Ce pragma effectue un contrôle d'intégrité de l'ensemble de la base de données. &Foreign-Key Check Vérifier les clés &Etrangères Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab Exécute le pragma foreign_key_check_check sur la base de données ouverte et retourne les résultats dans l'onglet Exécuter SQL &Quick Integrity Check Vérification &rapide de l'intégrité Run a quick integrity check over the open DB Effectuer un rapide contrôle d'intégrité sur la base de données ouverte Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. Exécute le pragma quick_check sur la base de données ouverte et retourne les résultats dans l'onglet Exécuter SQL. Cette commande effectue la plupart des vérifications de PRAGMA integrity_check mais s'exécute beaucoup plus rapidement. &Optimize &Optimiser Attempt to optimize the database Tente d'optimiser la base de données Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Exécute le pragma d'optimisation sur la base de données ouverte. Ce pragma pourrait effectuer des optimisations qui amélioreront la performance des requêtes futures. Print Imprimer Print text from current SQL editor tab [Ctrl+P] Imprime le contenu de l'onglet en cours de l'éditeur SQL [Ctrp+P] Open a dialog for printing the text in the current SQL editor tab Ouvre une boite de dialogue pour imprimer le contenu de l'onglet en cours de l'éditeur SQL Print the structure of the opened database [Ctrl+P] Imprime la structure de la base de données ouverte [Ctrl+P] Open a dialog for printing the structure of the opened database Ouvre une boite de dialogue pour imprimer la structure de la base de données ouverte Compact Database Compacter la base de données Compact the database file, removing space wasted by deleted records Compacter la base de donnée, récupérer l'espace perdu par les enregistrements supprimés Compact the database file, removing space wasted by deleted records. Compacter la base de donnée, récupérer l'espace perdu par les enregistrements supprimés. E&xit &Quitter Ctrl+Q Ctrl+Q Database from SQL file... Base de données à partir du fichier SQL... Import data from an .sql dump text file into a new or existing database. Importer les données depuis un fichier sql résultant d'un vidage (sql dump) dans une nouvelle base de données ou une base existante. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Cette option vous permet d'importer un fichier sql de vidage d'une base de données (SQL dump) dans une nouvelle base de données ou une base existante. Ce fichier peut être créé par la plupart des moteurs de base de données, y compris MySQL et PostgreSQL. Table from CSV file... Table à partir d'un fichier CSV... Open a wizard that lets you import data from a comma separated text file into a database table. Ouvrir un Assistant vous permettant d'importer des données dans une table de la base de données à partir d'un fichier texte séparé par des virgules (csv). Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Ouvre un Assistant vous permettant d'importer des données dans une table de la base de données à partir d'un fichier texte séparé par des virgules (csv). Les fichiers CSV peuvent être créés par la plupart des outils de gestion de base de données et les tableurs. Database to SQL file... Base de données vers un fichier SQL... Export a database to a .sql dump text file. Exporter la base de données vers un fichier de vidage sql (SQL dump) au format texte. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Exporter la base de données vers un fichier de vidage sql (SQL dump) au format texte. Ce fichier (SQL dump) contient toutes les informations nécessaires pour recréer une base de données par la plupart des moteurs de base de données, y compris MySQL et PostgreSQL. Table as CSV file... Table vers un fichier CSV... Export a database table as a comma separated text file. Exporter la table vers un fichier texte séparé par des virgules (CSV). Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Exporter la table vers un fichier texte séparé par des virgules (CSV), prêt à être importé dans une autre base de données ou un tableur. &Create Table... &Créer une table... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Ouvrir l'assistant de création d'une table dans lequel il sera possible de définir les noms et les champs d'une nouvelle table dans la base de données &Delete Table... &Supprimer une table... Open the Delete Table wizard, where you can select a database table to be dropped. Ouvrir l'assistant de suppression d'une table dans lequel vous pourrez sélectionner la base de données dans laquelle cette table sera supprimée. &Modify Table... &Modifier une table... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Ouvrir l'assistant de modification d'une table dans lequel il sera possible de renommer une table existante. Il est aussi possible d'ajouter ou de supprimer des champs de la table, tout comme modifier le nom des champs et leur type. Create Index... Créer un index... Open the Create Index wizard, where it is possible to define a new index on an existing database table. Ouvrir l'assistant de création d'un index dans lequel il sera possible de définir un nouvel index dans une table préexistante de la base de données. &Preferences... &Préférences... Open the preferences window. Ouvrir la fenêtre des préférences. &DB Toolbar &Barre d'outils BdD Shows or hides the Database toolbar. Affiche ou masque la barre d'outils Base de données. What's This? Qu'est-ce que c'est ? Shift+F1 Maj+F1 &About... À &propos... &Recently opened Ouvert &récemment Open &tab vérifier le contexte Ouvrir un on&glet Ctrl+T Ctrl+T Print currently browsed table data [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Ceci est la structure de la base de données ouverte. Vous pouvez faire glisser plusieurs noms d'objets de la colonne Nom et les déposer dans l'éditeur SQL et vous pouvez ajuster les propriétés des noms déposés en utilisant le menu contextuel. Cela pourrait vous aider à composer des instructions SQL. Vous pouvez faire glisser les instructions SQL de la colonne Schéma et les déposer dans l'éditeur SQL ou dans d'autres applications. Project Toolbar Barre d'outil Projet Extra DB toolbar Extra DB Toolbar Close the current database file Fermer la base de données en cours Compact &Database... Compacter la Base de &Données... &About À &propos This button opens a new tab for the SQL editor Ce bouton ouvre un nouvel onglet dans l'éditeur SQL &Execute SQL &Exécuter le SQL Execute SQL [F5, Ctrl+Return] Exécuter le SQL [F5 ou Ctrl+Entrée] &Load extension Charger &l'Extension &Wiki... &Wiki... Bug &report... &Rapport d'anomalie... Web&site... &Site Internet... Save Project Sauvegarder le projet Save the current session to a file Sauvegarder la session courante dans un fichier Open Project Ouvrir un projet Load a working session from a file Charger une session de travail depuis un fichier Open SQL file Ouvrir un fichier SQL Database Structure Structure de la Base de Données This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Ceci est la structure de la base de données ouverte. Vous pouvez faire glisser les instructions SQL d'une ligne d'objet et les déposer dans d'autres applications ou dans une autre instance de'DB Browser for SQLite'. Browse Data Parcourir les données &Table: &Table : Refresh the data in the selected table [F5, Ctrl+R] Rafraîchir les données de la table sélectionnée [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. Ce bouton efface tous les filtres définis dans les champs de saisie de l'en-tête de la table actuellement parcourue. Save the table as currently displayed Sauvegarder la table comme affichée actuellement <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> <html><head/><body><p>Ce menu déroulant fournit les options suivantes s'appliquant à la table actuellement parcourue et filtrée:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Exporter au format CSV : cette option exporte les données de la table parcourue telles qu'elles sont actuellement affichées (après filtres, formats d'affichage et colonne d'ordre) vers un fichier CSV.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Enregistrer comme vue : cette option permet d'enregistrer les paramètres actuels de la table parcourue (filtres, formats d'affichage et colonne d'ordre) dans une vue SQL que vous pourrez ensuite parcourir ou utiliser dans les instructions SQL.</li></ul></body></html> ... ... Print currrently browsed table data [Ctrl+P] Imprimer le données de la table actuellement parcourues [Ctrl+P] Print currrently browsed table data. Print selection if more than one cell is selected. Imprimer le données de la table actuellement parcourues. Imprime la sélection su plus s'une ligne est sélectionnée. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> <html><head/><body><p>Ce bouton crée un nouvel enregistrement dans la base de données. Maintenez le bouton de la souris enfoncé pour ouvrir un menu contextuel de différentes options :</p><ul><li><span style=" font-weight:600;">Nouvel Enregistrement</span> : Insère un nouvel enregistrement avec les valeurs par défaut dans la base de données.</li><li><span style=" font-weight:600;">Insérer des valeurs...</span> : ouvre une boite de dialogue pour saisir des valeurs avant leur insersion dans la base de données. Ceci permet de saisir des valeurs correspondant aux différentes contraintes. Cette boîte de dialogue est également ouverte si l'option <span style=" font-weight:600;">Nouvel Enregistrement </span> est en erreur à cause de ces contraintes.</li></ul></body></html> This button deletes the record or records currently selected in the table Ce bouton permet de supprimer l'enregistrement sélectionné dans la table This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Ceci est la vue des tables de base de données. Vous pouvez effectuer les actions suivantes : - Commencez à écrire pour éditer en ligne la valeur. - Double-cliquez sur n'importe quel enregistrement pour éditer son contenu dans la fenêtre de l'éditeur de cellule. - Alt+Supp pour supprimer le contenu de la cellule et la met à NULL. - Ctrl+" pour dupliquer l'enregistrement en cours. - Ctrl+' pour copier la valeur de la cellule ci-dessus. - Sélection standard et opérations de copier/coller. Scroll one page upwards Remonter d'une page <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html><head/><body><p>Cliquer sur ce bouton permet d'afficher la page d'enregistrements précédente de la table ci dessus.</p></body></html> Scroll one page downwards Descendre d'une page <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>Cliquer sur ce bouton permet d'afficher la page d'enregistrements suivante de la table ci dessus.</p></body></html> Edit Pragmas Éditer les Pragmas <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Index Automatique</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Point de contrôle FSYNC intégral</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Clés étrangères</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignorer la vérification des contraintes</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Mode de journalisation</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Taille maximale du journal</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Mode de vérouillagee</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Taille de la Page</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Triggers récursifs</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Suppression sécuriséee</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronisation</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Stockage temporaire</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">Version utilisateur</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">Point de contrôle WAL automatique</span></a></p></body></html> Execute SQL Exécuter le SQL Remote Serveur distant DB Toolbar Barre d'outils BdD Edit Database Cell Éditer le contenu d'une cellule de la base de données SQL &Log &Journal SQL Show S&QL submitted by A&fficher le SQL soumis par This panel lets you examine a log of all SQL commands issued by the application or by yourself Ce panneau vous permet d'examiner un journal de toutes les commandes SQL émises par l'application ou par vous-même &Plot Gra&phique Line type: Type de ligne : Line Ligne StepLeft Voir la traduction. Peut aussi siugnifier qu'il s'agit de la dernière étape comme "maintenant vous n'avez plus qu'à"... A Gauche StepRight A Droite StepCenter Centré Impulse Traduction à modifier en fonction du contexte et du résultat Impulsion Point shape: Traduction à modifier en fonction du contexte et du résultat Type de pointe : Cross Croix Plus Plus Circle Cercle Disc Disque Square Carré Diamond Diamant Star Etoile Triangle Triangle TriangleInverted Triangle Inversé CrossSquare Carré et croix PlusSquare Carré et Plus CrossCircle Cercle et Croix PlusCircle Cercle et Plus Peace A voir en fonction du contexte et du résultat Paix <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Sauvegarder le graphique actuel...</p><p>Choisir le format de fichier parmi les extensions (png, jpg, pdf, bmp)</p></body></html> Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Charger toute les données : Cela a un effet uniquement si les données ont été parourues partiellement en raison du mécanisme de fetch partiel. DB Sche&ma DB Sche&ma &Remote Serveur &distant Compact &Database C&ompacter la Base de Données &Database from SQL file... &Base de Données à partir du fichier SQL... &Table from CSV file... &Table depuis un fichier CSV... &Database to SQL file... Base de &Données vers un fichier SQL... &Table(s) as CSV file... &Table vers un fichier CSV... Create &Index... Créer un &Index... W&hat's This? &Qu'est-ce que c'est ? Execute SQL [F5, Ctrl+Return, Ctrl+R] Exécuter le SQL [F5 ou Ctrl+Entrée; Ctrl+R] Save SQL file Sauvegarder le fichier SQL &Load Extension... Charger l'&Extension... Execute current line [Shift+F5] Exécuter la ligne courante (Maj+F5) This button executes the SQL statement present in the current editor line Ce bouton exécute l'instruction SQL présente dans la ligne courante de l'éditeur Shift+F5 Maj+F5 Sa&ve Project &Sauvegarder le projet Open &Project Ouvrir un &Projet &Attach Database Attac&her une Base de Données &Set Encryption &Chiffrer Save SQL file as Sauvegarder le fichier SQL comme This button saves the content of the current SQL editor tab to a file Ce bouton enregistre le contenu de l'onglet actuel de l'éditeur SQL dans un fichier &Browse Table &Parcourir la table Copy Create statement Copier l'instruction CREATE Copy the CREATE statement of the item to the clipboard Copie l'instruction CREATE de cet item dans le presse-papier Edit display format Modifier le format d'affichage Edit the display format of the data in this column Modifie le format d'affichage des données contenues dans cette colonne Show rowid column Afficher la colonne RowId Toggle the visibility of the rowid column Permet d'afficher ou non la colonne RowId Set encoding Définir l'encodage Change the encoding of the text in the table cells Change l'encodage du texte des cellules de la table Set encoding for all tables Définir l'encodage pour toutes les tables Change the default encoding assumed for all tables in the database Change l'encodage par défaut choisi pour l'ensemble des tables de la Base de Données &Open Database Read Only... Ouvrir en &Lecture seule... Open an existing database file in read only mode Ouvrir une base de données existante en mode Lecture seule Unlock view editing Dévérouiller l'éditeur de vues This unlocks the current view for editing. However, you will need appropriate triggers for editing. Permet de dévérouiller la vue courante l'éditer. Cependant, vous aurez besoin de déclencheurs appropriés pour faire cela. Duplicate record Dupliquer l'enregistrement Load extension Charger une extension Execute current line Exécuter la ligne courante Execute current line [Ctrl+E] Exécuter la ligne courante (Ctrl+E) Ctrl+E Ctrl+E Export as CSV file Exporter les données au format CSV Export table as comma separated values file Exporter la table vers un fichier texte séparé par des virgules (CSV) Ctrl+L Ctrl+L Ctrl+P Ctrl+P Database encoding Encodage de la base de données Choose a database file Choisir une base de données Ctrl+Return Ctrl+Entrée Ctrl+D Ctrl+D Ctrl+I Ctrl+I Encrypted Chiffré Database is encrypted using SQLCipher La Base de Données a été chiffrée avec SQLCipher Read only lecture seule Database file is read only. Editing the database is disabled. La Base de Données est en lecture seule. Il n'est pas possible de la modifier. Could not open database file. Reason: %1 La base de données ne peut être ouverte. Motif : %1 Choose a filename to save under Choisir un nom de fichier pour enregistrer sous Error adding record: Erreur dans l'ajout d'un enregistrement : Error deleting record: %1 Erreur dans la suppression d'un enregistrement : %1 Please select a record first Veuillez sélectionner au préalable un enregistrement %1 - %2 of %3 %1 - %2 de %3 There is no database opened. Please open or create a new database file. Il n'y a pas de base de données ouverte. Veuillez ouvrir ou créer une nouvelle base de données. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. Êtes-vous sûr de vouloir supprimer le %1 '%2'? Toutes les données associées à %1 seront perdues. Error: could not delete the %1. Message from database engine: %2 Erreur : Suppression impossible de %1. Message du moteur de base de données : %2 There is no database opened. Il n'y a pas de base de données ouverte. %1 rows returned in %2ms from: %3 %1 enregistrements ramenés en %2ms depuis : %3 , %1 rows affected , %1 enregistrements affectés Query executed successfully: %1 (took %2ms%3) Requête exécutée avec succès : %1 (en %2 ms%3) Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Erreur lors de la sauvegarde de la Base de Données. Cela sous-entend qu'aucun changement n'a été sauvegardé. Vous devez corriger au préalable l'erreur suivante : %1 A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Une nouvelle version de SQLiteBrowser est disponible (%1.%2.%3).<br/><br/>Vous pouvez la télécharger sur <a href='%4'>%4</a>. Please enter the URL of the database file to save. Veuillez saisir l'URL du fichier de base de données à enregistrer. DB Browser for SQLite project file (*.sqbpro) Projet DB Browser pour SQLite (*.sqbpro) Please choose a new encoding for this table. Veuillez choisir un nouvel encodage pour cette table. Please choose a new encoding for all tables. Veuillez choisir un nouvel encodage pour toutes les tables. Error checking foreign keys after table modification. The changes will be reverted. Erreur de vérification des clés étrangères après modification de la table. Les modifications seront annulées. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. Cette table n'a pas passé avec succès un contrôle de clé étrangère.<br/>Vous devez exécuter l'Outil | Contrôle des clés étrangères' et corriger les problèmes rapportés. At line %1: Result: %2 Extensions(*.so *.dylib *.dll);;All files(*) %1 Leave the field empty for using the database encoding. %1 Laissez le champ vide pour utiliser l'encodage de la Base de Données. This encoding is either not valid or not supported. Cet encodage est invalide ou non supporté. Cancel Annuler %1 Rows returned from: %2 (took %3ms) %1 enregistrements ramenés depuis %2 (en %3ms) Error executing query: %1 Erreur lors de l'exécution de la requête : %1 Query executed successfully: %1 (took %2ms) Requête exécutée avec succès : %1 (en %2 ms) Choose a text file Choisir un fichier texte Text files(*.csv *.txt);;All files(*) Fichiers Texte (*.txt);;Tous les fichiers(*) Import completed Import terminé Are you sure you want to undo all changes made to the database file '%1' since the last save? Êtes-vous sûr de vouloir annuler tous les changements effectués dans la base de données %1 depuis la dernière sauvegarde ? Choose a filename to export Choisir un nom de fichier pour l'export Text files(*.sql *.txt) Fichiers Texte (*.sql *.txt) Export cancelled or failed. l'export a été annulé ou a échoué. Export completed. Export terminé. Choose a file to import Choisir un fichier à importer Text files(*.sql *.txt);;All files(*) Fichiers Texte (*.sql *.txt);;Tous les fichiers(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. Voulez vous créer une nouvelle base de donnée pour gérer les données importées ? Si vous répondez non, nous essaierons d'importer les données du fichier SQL dans la base de données courante. File %1 already exists. Please choose a different name. Le fichier %1 existe déjà. Choisir un nom de fichier différent. Error importing data: %1 Erreur lors de l'import des données : %1 Import completed. Import terminé. Delete View Supprimer la Vue Delete Trigger Supprimer le Déclencheur Delete Index Supprimer l'Index Delete Table Supprimer la Table &%1 %2 &%1 %2 Setting PRAGMA values will commit your current transaction. Are you sure? Paramétrer les valeurs du PRAGMA enregistrera les actions de votre transaction courante. Êtes-vous sûr ? Execution aborted by user Exécution annulée par l'utilisateur In-Memory database Base de données en mémoire determining row count... Détermination du nombre d'enregistrements... %1 - %2 of >= %3 %1 - %2 de >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Êtes vous sûr de vouloir supprimer la table %1 ? Toutes les données associées à la table seront perdues. Are you sure you want to delete the view '%1'? Êtes vous sûr de voulolir supprimer la vue %1 ? Are you sure you want to delete the trigger '%1'? Êtes vous sûr de voulolir supprimer le déclencheur %1 ? Are you sure you want to delete the index '%1'? Êtes vous sûr de voulolir supprimer l'index %1 ? Error: could not delete the table. Erreur : suppression de la table impossible. Error: could not delete the view. Erreur : suppression de la vue impossible. Error: could not delete the trigger. Erreur : suppression du déclencheur impossible. Error: could not delete the index. Erreur : suppression d el'index impossible. Message from database engine: %1 Message depuis el moteur de la base de données : %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? La modification de la table nécessite de sauvegarder toutes les modifications en attente maintenant. Êtes-vous sûr de vouloir sauvegarder la base de données ? -- EXECUTING SELECTION IN '%1' -- -- EXECUTION DE LA SELECTION DANS '%1' -- -- EXECUTING LINE IN '%1' -- -- EXECUTION DE LA LIGNE DANS '%1' -- -- EXECUTING ALL IN '%1' -- -- EXECUTER TOUT DANS '%1' -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Le réglage des valeurs PRAGMA ou l" "vacuuming" validera votre transaction en cours. Êtes-vous sûr ? executing query Exécution de la requête %1 rows returned in %2ms %1 enregistrements ramenés en %2ms query executed successfully. Took %1ms%2 Requête exécutée avec succès. A pris %1 ms %2 -- At line %1: %4 -- Result: %3 -- A la ligne %1 : %4 -- Résultat : %3 Choose text files Choisir des fichiers texte Import completed. Some foreign key constraints are violated. Please fix them before saving. Importation terminée. Certaines contraintes clés étrangères sont violées. Veuillez les corriger avant de les sauvegarder. Modify View Modifier une Vue Modify Trigger Modifier un Déclencheur Modify Index Modifier un Index Modify Table Modifier une Table Select SQL file to open Sélectionner un fichier SQL à ouvrir Couldn't read file: %1. Le fichier %1 ne peut être lu. Couldn't save file: %1. Le fichier %1 ne peut être sauvegardé. Select file name Sélectionner un nom de fichier Select extension file Sélectionner une extension de fichier Extensions(*.so *.dll);;All files(*) Extensions (*.so *.dll);;Tous les fichiers (*) Extension successfully loaded. l'extension a été chargée avec succès. Error loading extension: %1 Erreur lors du chargement de l'extension %1 Don't show again Ne plus afficher New version available. Une nouvelle version est disponible. Choose a project file to open Coisir un fichier de projet à ouvrir This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Ce fichier de projet utilise un ancien format de fichier parce qu'il a été créé avec DB Browser pour SQLite version 3.10 ou inférieure. Le chargement de ce format de fichier est toujours entièrement pris en charge, mais nous vous conseillons de convertir tous vos fichiers de projet vers le nouveau format de fichier car la prise en charge des anciens formats pourrait être supprimée à un moment donné dans le futur. Vous pouvez convertir vos fichiers en les ouvrant et en les sauvegardant à nouveau. Duplicate records Enregistrement en double Ctrl+" Ctrl+" Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Veuillez entrer une pseudo clé primaire pour permettre l'édition de la vue. Ce devrait être le nom d'une colonne unique dans la vue. Collation needed! Proceed? Classement nécessaire ! Continuer ? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Une table de cette Base de Données nécessite la fonction spéciale de classement '%1' que cette application ne peut fournir sans connaissances complémentaires. Si vous choisissez de continuer, ayez à l'esprit que des choses non souhaitées peuvent survenir dans votre Base de Données. Faitez une sauvegarde ! creating collation Créer un classement Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Définissez un nouveau nom pour l'onglet SQL. Utilisez le caractère '&&' pour permettre d'utiliser le caractère suivant comme raccourci clavier. Please specify the view name Veuillez spécifier le nom de la vue There is already an object with that name. Please choose a different name. Il existe déjà un objet avec ce nom. Veuillez choisir un autre nom. View successfully created. La vue a été crée avec succès. Error creating view: %1 Erreur lors de la création de la vue : %1 There is no filter set for this table. View will not be created. Il n'existe pas de filtre pour cette table. La vue ne sera pas crée. Delete Records Supprimer les enregistrements This action will open a new SQL tab for running: Cette action ouvrira un nouvel onglet SQL pour son exécution : Press Help for opening the corresponding SQLite reference page. Cliquez sur Aide pour ouvrir la page de référence correspondante de SQLite. A new sqlitebrowser version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Une nouvelle version de SQLiteBrowser est disponible (%1.%2.%3).<br/><br/>Vous pouvez la télécharger sur <a href='%4'>%4</a>. Choose a axis color Choisir la couleur de l'axe PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) Choose a file to open Choisir un fichier à ouvrir SQLiteBrowser project(*.sqbpro) Projet SQLiteBrowser (*.sqbpro) Invalid file format. Format de fichier invalide. NullLineEdit Set to NULL Définir comme NULL Alt+Del Alt+Supp PlotDock Plot Graphique <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> <html><head/><body><p>Ce volet affiche la liste des colonnes de la table actuellement parcourue ou de la requête qui vient d'être exécutée. Vous pouvez sélectionner les colonnes que vous voulez utiliser comme axe X ou Y pour le volet de tracé ci-dessous. Le tableau montre le type d'axe détecté qui affectera le tracé résultant. Pour l'axe Y, vous ne pouvez sélectionner que des colonnes numériques, mais pour l'axe X, vous pourrez sélectionner :</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Heure</span> : chaînes au format &quot;aaaa-MM-jj hh:mm:ss&quot; ou &quot;aaaa-MM-jjThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span> : chaînes au format &quot;aaaa-MM-jj&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heures</span> : chaînes au format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span> : autres formats de chaînes. Sélectionner cette colonne comme axe X produira un diagramme en barres avec les valeurs de la colonne comme étiquettes pour les barres</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numerique</span> : Nombres entiers ou Réels</li></ul><p>Avec Double-clic sur une cellule Y, vous pouvez changer le couleur utilisée dans le graphique.</p></body></html> Columns Colonnes X X Y Y _ _ Axis Type Type d'axe Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Voici le graphique qui sera dessiné lorsque vous sélectionnerez les valeurs x et y ci-dessus. Cliquez sur les points pour les sélectionner dans le graphique et dans le tableau. Ctrl+Clic pour sélectionner une plage de points. Utilisez la molette de la souris pour zoomer et faites glisser la souris pour modifier la plage des axes. Sélectionnez les axes ou les étiquettes d'axes à faire glisser et à zoomer uniquement dans cette orientation. Line type: Type de ligne : None Aucun Line Ligne StepLeft A Gauche StepRight A Droite StepCenter Centré Impulse Impulsion Point shape: Forme du point : Cross Croix Plus Plus Circle Cercle Disc Disque Square Carré Diamond Diamant Star Étoile Triangle Triangle TriangleInverted Triangle Inversé CrossSquare Carré et croix PlusSquare Carré et Plus CrossCircle Cercle et Croix PlusCircle Cercle et Plus Peace Paix <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Sauvegarder le graphique actuel...</p><p>Choisir le format de fichier parmi ces extensions (png, jpg, pdf, bmp)</p></body></html> Save current plot... Enregistrer le tracé actuel... Load all data and redraw plot Charger toutes les données et redessiner le graphique Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Charger toute les données : Cela a un effet uniquement si les données ont été parourues partiellement en raison du mécanisme de fetch partiel. Row # # Ligne Choose a axis color Choisir la couleur de l'axe Copy Copier Print... Imprimer... Show legend Afficher la légende Stacked bars Diagramme à barres empilées Date/Time Date/Heure Date Date Time Heure Numeric Numérique Label Label Invalid Invalide Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Charger toutes les données et redessiner le tracé. Attention : toutes les données n'ont pas encore été extraites du tableau en raison du mécanisme d'extraction partielle. Choose an axis color Choisir une couleur d'axe Choose a filename to save under Choisir un nom de fichier pour enregistrer sous PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. Il y a des courbes dans ce graphique et le style de ligne sélectionné ne peut être appliqué qu'aux graphiques triés par X. Triez la table ou la requête par X pour supprimer les courbes ou sélectionnez un des styles pris en charge par les courbes : Aucun ou Ligne. Fetching all data... Récupérer toutes les données... Cancel Annuler PreferencesDialog Preferences Préférences &General &Général Remember last location Se souvenir du dernier emplacement Always use this location Toujours utiliser cet emplacement Remember last location for session only Dernier emplac. pour cette session uniquement Lan&guage Lan&gue Show remote options Afficher options Serv. Distant Automatic &updates Mises à jour A&utomatiques &Database Base de &Données Database &encoding &Encodage de la base de données Open databases with foreign keys enabled. Ouvrir une base de données en autorisant les clés étrangères. &Foreign keys &Clés étrangères enabled Autoriser Default &location Emp&lacement par défaut ... ... &Prefetch block size Taille du bloc &Prefetch Remove line breaks in schema &view Suppr. les sauts de ligne dans la &vue du schéma Prefetch block si&ze &Taille du bloc de préfetch Advanced Avancé SQL to execute after opening database Fichier SQL à éxécuter à l'ouverture de la Base de Données SQ&L to execute after opening database Fichier SQ&L à exécuter à l'ouverture de la Base de Données Default field type Type de champ par défaut Data &Browser &Navigateur des données Font Police &Font &Police Font si&ze: T&aille de police : Content Contenu Symbol limit in cell Texte : Nb max. de caractères NULL fields Champs NULL &Text &Texte Field colors Couleur des champs NULL NULL Regular Standard Text Texte Binary Binaire Background Arrière plan Filters Filtres Escape character Caractère d'échappement Delay time (&ms) Délai (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. Défini le temps d'attente avant qu'une nouvelle valeur de filtre est appliquee. Peut être renseigné à 0 pour supprimer le temps d'attente. &SQL &SQL Settings name Définir le nom Context Contexte Colour Couleur Bold Gras Italic Italique Underline Souligné Keyword Mot Clé function fonction Function Fonction Table Table Comment Commentaire Identifier Identifiant String Chaîne de caractère currentline Ligne courante Current line Ligne courante SQL &editor font size &Taille de la police : Éditeur SQL SQL &log font size Taille de la police : &Journal SQL Tab size Largeur de tabulation SQL editor &font &Police de l'éditeur SQL Error indicators Indicateur d'erreur Enabling error indicators highlights the SQL code lines that caused errors during the last execution Activer l'indicateur d'erreur met en évidence la ligne de code SQL ayant causé une ou des erreurs pendant son exécution Hori&zontal tiling Division hori&zontale If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Si elle est activée, l'éditeur de code SQL et l'affichage du tableau de résultats sont présentés côte à côte au lieu d'être l'un sur l'autre. Code co&mpletion Co&mplétion de code Toolbar style Style de la barre d'outil Only display the icon Afficher uniquement les icones Only display the text Afficher uniquement le texte The text appears beside the icon Le texte sera affiché à côté des icones The text appears under the icon Le texte sera affiché sous les icones Follow the style Suivre le style DB file extensions Extensions de fichiers DB Manage Gestion When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Lorsque cette option est activée, les sauts de ligne de la colonne Schéma de l'onglet Structure de la Base de Données, du dock et de la sortie imprimée sont supprimés. Font si&ze T&aille de police This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Il s'agit du nombre maximum de lignes dans une table pour permettre la complétion de la valeur en fonction des valeurs actuelles dans la colonne. Peut être mis à 0 pour désactiver la complétion. Row count threshold for completion Seuil de comptage des enregistrements pour la complétion Field display Affichage des champs Displayed &text &Texte affiché Text color Couleur de texte Background color Couleur d'arrière plan Preview only (N/A) Préaffichage uniquement (N/A) Foreground Avant Plan SQL &results font size Taille police &résultats SQL &Wrap lines &Retour à la ligne Never Jamais At word boundaries Aux limites des mots At character boundaries Aux limites des caractères At whitespace boundaries Aux limites des espaces &Quotes for identifiers &Guillemets pour les identifiants Choose the quoting mechanism used by the application for identifiers in SQL code. Choisissez le système de guillemets utilisés par l'application pour les identificateurs dans le code SQL. "Double quotes" - Standard SQL (recommended) "Double guillemet" - Standard SQL (recommandé) `Grave accents` - Traditional MySQL quotes `Accent Grave` - Guillemets standards MySQL [Square brackets] - Traditional MS SQL Server quotes [Crochets] - Guillemets traditionels de MS SQL Server Keywords in &UPPER CASE Mots clé en &MAJUSCULES When set, the SQL keywords are completed in UPPER CASE letters. Quand cette case est cochée, les mots clé SQL sont transformés en MAJUSCULES. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background Lorsque cette option est activée, les lignes de code SQL qui ont causé des erreurs lors de la dernière exécution sont mises en surbrillance et le cadre des résultats indique l'erreur en arrière-plan &Extensions E&xtensions Select extensions to load for every database: Sélectionner une extension à charger pour toutes les bases de données : Add extension Ajouter une extension Remove extension Enlever une extension <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>Bien que SQLite supporte l'opérateur REGEXP, aucun algorithme<br>d'expression régulière est implémenté, mais il rappelle l'application en cours d'exécution. DB Browser pour SQLite implémente<br/>cet algorithme pour vous permettre d'utiliser REGEXP. Cependant, comme il existe plusieurs implémentations possibles<br/>et que vous souhaitez peut-être utiliser autre chose, vous êtes libre de désactiver cette implémentation dans l'application<br/>pour utiliser la votre en utilisant une extention. Cela nécessite le redémarrage de l'application.</p></body></html> Disable Regular Expression extension Désactiver l'extention "Expression Régulière" <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> <html><head/><body><p>SQLite fournit une fonction SQL pour charger des extensions à partir d'un fichier de bibliothèque partagé. Activez cette option si vous souhaitez utiliser la fonction <span style=" font-style:italic;">load_extension()</span> depuis el code SQL.</p><p>Pour des raisons de sécurité, le chargement des extensions est désactivé par défaut et doit être activé par ce paramètre. Vous pouvez toujours charger des extensions via l'interface graphique, même si cette option est désactivée.</p></body></html> Allow loading extensions from SQL code Autoriser le chargement des extensions depuis le code SQL Remote Serveur distant CA certificates Certificats CA Subject CN Sujet CN Common Name Nom Commun - CN Subject O Sujet O Organization Organisation Valid from Valide de Valid to Valide jusqu'à Serial number Numéro de série Your certificates Vos certificats File Fichier Subject Common Name Sujet Common Name Issuer CN Émetteur CN Issuer Common Name Clone databases into Cloner la base de données dans Choose a directory Choisir un répertoire The language will change after you restart the application. La langue ne changera qu'après le redémarrage de l'application. Select extension file Sélectionner un fichier d'extension Extensions(*.so *.dll);;All files(*) Extensions (*.so *.dll);;Tous les fichiers (*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file Importer un fichier de certificat No certificates found in this file. Aucun certificat n'a été trouvé dans ce fichier. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Êtes-vous sûr de vouloir supprimer ce certificat ? Toutes les données de ce certificat seront supprimées des paramètres de l'application! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. Êtes-vous sûr de vouloir effacer tous les réglages sauvegardés ? Toutes vos préférences seront perdues et les valeurs par défaut seront utilisées. QObject Error importing data. Message from database engine: %1 Erreur lors de l'import des données. Message du moteur de base de données : %1 File is not a SQLite 3 database Ce fichier n'est pas une base de données SQLite3 File could not be read Le fichier ne peut être lu no error pas d'erreur Do you want to save the changes made to the database file %1? Voulez-vous enregistrer les changements effectués dans la base de données %1 ? Exporting database to SQL file... Exporter la base de données dans un fichier SQL... Error importing data Erreur lors de l'import des données from record number %1 pour l'enregistrement numéro %1 . %1 . %1 Importing CSV file... Import du fichier CSV... Cancel Annuler Executing SQL... Exécution du SQL... Action cancelled. Action annulée. Error in statement #%1: %2. Aborting execution. Erreur dans le traitement #%1 : %2. l'exécution est abandonnée. renameColumn: cannot find table %1. Renommer les Colonnes : La table %1 ne peut être trouvée. renameColumn: cannot find column %1. Renommer les Colonnes : La colonne %1 ne peut être trouvée. renameColumn: creating savepoint failed. DB says: %1 Renommer les Colonnes : La création d'un point de sauvegarde a échoué. Message du moteur de base de données : %1 renameColumn: creating new table failed. DB says: %1 Renommer les Colonnes : La création de la table a échoué. Message du moteur de base de données : %1 renameColumn: copying data to new table failed. DB says: %1 Renommer les Colonnes : La copie des données dans une nouvelle table a échoué. Message du moteur de base de données : %1 renameColumn: deleting old table failed. DB says: %1 Renommer les Colonnes : La suppression de l'ancienne table a échoué. Message du moteur de base de données : %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: La restauration de certains des objets associés à cette table a échoué. Cela est le plus souvent dû au changement du nom de certaines colonnes. Voici l'instruction SQL que vous pourrez corriger et exécuter manuellement : renameColumn: releasing savepoint failed. DB says: %1 Renommer les Colonnes : La libération d'un point de sauvegarde a échoué. Message du moteur de base de données : %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Erreur lors du changement de nom de la table %1 vers %2. Message du moteur de base de données : %3 ... <string can not be logged, contains binary data> ... ... <la Chaîne de caractère ne peut être journalisée. Elle contient des données binaires> ... unknown object type %1 Type d'objet %1 inconnu could not get list of db objects: %1, %2 la liste des objets de la base de données ne peut être obtenue : %1, %2 could not get types la liste des types ne peut être obtenue Decoding CSV file... Décodage du fichier CSV... didn't receive any output from pragma %1 n'a pas reçu toutes les sorties du pragma %1 could not execute pragma command: %1, %2 ne peut pas exécuter les commandes du pragme : %1, %2 Error setting pragma %1 to %2: %3 Erreur dans les paramètres du pragma %1 à %2 : %3 File not found. Fichier non trouvé. Collation needed! Proceed? Classement nécessaire ! Continuer ? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Une table de cette Base de Données nécessite la fonction spéciale de classement '%1' que cette application ne peut fournir sans connaissances complémentaires. Si vous choisissez de continuer, ayez à l'esprit que des choses non souhaitées peuvent survenir dans votre Base de Données. Faitez une sauvegarde ! SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Base de Données SQLite (*.db *.sqlite *.sqlite3 *.db3);;Tous les fichiers (*) All files (*) Tous les fichiers (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) Base de Données SQLite (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 Erreur lors de la connexion à %1. %2 Error opening remote file at %1. %2 Erreur lors de l'ouverture du fichier distant %1. %2 Error: Invalid client certificate specified. Erreur : Le certificat du client spécifié est invalide. Please enter the passphrase for this client certificate in order to authenticate. Veuillez entrer la phrase secrète pour ce certificat client de façon à vous authentifier. Cancel Annuler Uploading remote database to %1 Téléchargement de la base distante dans %1 Downloading remote database from %1 Télécharger une base de données distante depuis %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. La base de données distante a été mise à jour depuis la dernière commande. Voulez-vous mettre à jour la base de données locale vers la dernière version ? Notez que ceci annule toutes les modifications que vous avez faites localement ! Si vous ne voulez pas perdre les modifications locales, cliquez sur Non pour ouvrir la version locale. Uploading remote database to %1. Téléchargement de la base distante dans %1. Downloading remote database from %1. Télécharger une base de données distante depuis %1. Error: The network is not accessible. Erreur : le réseau n'est pas accessible. Error: Cannot open the file for sending. Erreur : Ne peut ouvrir le fichier à envoyer. Error opening local databases list. %1 Erreur lors de l'ouverture de la liste des bases de données locales. %1 Error creating local databases list. %1 Erreur lors de la création de la liste des bases de données locales. %1 RemoteDock Remote Serveur Distant B&rowse &Parcourir Local Local Identity Identité Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Connectez-vous au serveur distant en utilisant l'identité actuellement sélectionnée. Le serveur correct est également extrait de l'identité. Go Go Push currently opened database to server Déplacer la Base de Données en cours sur le serveur <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> <html><head/><body><p>Dans ce volet, les bases de données distantes du site Web dbhub.io peuvent être ajoutées à DB4S. Il vous faut d'abord une identité :</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Connectez-vous sur le site dbhub.io (utilisez vos identifiants GitHub ou ce que vous voulez)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Cliquez sur le bouton pour créer un certificat DB4S (c'est votre identité). Cela vous donnera un fichier de certificat (enregistrez-le sur votre disque local).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Allez dans l'onglet Serveur Distant des Préférences DB4S. Cliquez sur le bouton pour ajouter un nouveau certificat à DB4S et choisissez le fichier de certificat que vous venez de télécharger.</li></ol><p>Maintenant, le panneau Serveur distant affiche votre identité et vous pouvez ajouter des bases de données distantes..</p></body></html> Please enter the database name to push to. Veuillez saisir le nom de la Base de Données à déplacer. RemoteModel Name Nom Version Version Last modified Dernière modification Size Taille Commit Commit bytes octets RemotePushDialog Push database Je ne pense pas que Push soir le bon terme. Est-ce que cela fonction comme un serveur de version ? Pousser une basse de données Database na&me to push to &Nom de la base de données à pousser vers Commit message Message de Commit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Licence de la base de données Public Publique Branch Branche Force push Forcer le "push" Database will be public. Everyone has read access to it. La Base de DOnnée sera publique. Tout le monde a un accès en lecture. Database will be private. Only you have access to it. La base de données est privée. Vous seul y avez accès. Use with care. This can cause remote commits to be deleted. A utiliser avec précaution. Cela peut entraîner la suppression des commit distants. Unspecified Non spécifié SqlExecutionArea Form Formulaire Find previous match [Shift+F3] Trouver la correspondance précédente [Maj+F3] Find previous match with mapping Trouver la correspondance précédente avec le modèle Shift+F3 Maj+F3 The found pattern must be a whole word Le motif trouvé doit être un mot entier Whole Words Mots entiers Text pattern to find considering the checks in this frame Modèle de texte à trouver en tenant compte des contrôles de ce cadre Find in editor Chercher dans l'éditeur The found pattern must match in letter case Le motif recherché doit respecter la casse des lettres Case Sensitive Sensible à la casse Find next match [Enter, F3] Trouver la correspondance suivante [Entrée, F3] Find next match with wrapping Trouver la correspondance suivante avec le modèle F3 F3 F3 Interpret search pattern as a regular expression Interpréter le modèle de recherche comme une expression régulière <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>Lorsqu'elle est cochée, le motif à trouver est interprété comme une expression régulière UNIX. Voir <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Regular Expression Expression régulière Close Find Bar Fremer la barre de recherche <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements Résultats du dernier traitement exécuté This field shows the results and status codes of the last executed statements. Ce champ affiche les résultats et les codes de statut du dernier traitement exécuté. Export to &CSV Exporter au format &CSV Save as &view Enregistrer comme une &vue Save as view Enregistrer comme une vue Please specify the view name Veuillez spécifier le nom de la vue There is already an object with that name. Please choose a different name. Il existe déjà un objet avec ce nom. Veuillez choisir un autre nom. View successfully created. La vue a été crée avec succès. Error creating view: %1 Erreur lors de la création de la vue : %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. (X) La fonction abs(X) renvoie la valeur absolue de l'argument numérique X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. () La fonction changes() renvoie le nombre de lignes de la Base de Données qui ont été modifiées, insérées ou supprimées par les instructions UPDATE, INSERT ou DELETE terminées dernièrement. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1, X2,...) La fonction char(X1,X2,...,XN) renvoie une chaîne composée des caractères ayant les valeurs des points de code unicode des entiers allant de X1 à XN, respectivement. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X, Y, ...) La fonction coalesce () renvoie une copie de son premier argument non-NULL, ou NULL si tous les arguments sont NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X, Y) La fonction glob (X, Y) est équivalente à l'expression « Y GLOB X ». (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X, Y) La fonction ifnull () renvoie une copie de son premier argument non-NULL, ou NULL si les deux arguments sont NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X, Y) La fonction instr (X, Y) trouve la première occurrence de la chaîne Y dans la chaîne X. Elle renvoie le nombre de caractères précédents plus 1 ou 0 si Y n'est pas dans X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) La fonction hex () interprète son argument comme un BLOB et renvoie une chaîne qui est le rendu hexadécimal en majuscules du contenu de ce blob. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. () La fonction last_insert_rowid () renvoie le ROWID de la dernière ligne insérée par la connexion de la Base de Données qui a invoqué la fonction. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X) Pour une valeur de chaîne X, la fonction length(X) renvoie le nombre de caractères (pas d'octets) dans X avant le premier caractère NULL. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X, Y) La fonction like() est utilisée pour mettre en œuvre de l’expression « Y LIKE X ». (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X, Y, Z) La fonction like() est utilisée pour mettre en œuvre de l’expression « Y LIKE X ESCAPE Z ». (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. (X) La fonction load_extension(X) charge les extensions SQLite situées en dehors du fichier de bibliothèque partagée nommée X. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. (X, Y) La fonction load_extension(X) charge les extensions SQLite situées en dehors du fichier de bibliothèque partagée nommée X en utilisant le point d'entrée Y. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X) La fonction load_extension(X) charge les extensions SQLite à partir du fichier de bibliothèque partagé nommé X. L'utilisation de cette fonction doit être autorisée à partir des Préférences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X,Y) La fonction load_extension(X) charge les extensions SQLite à partir du fichier de bibliothèque partagée nommé X en utilisant le point d'entrée Y. L'utilisation de cette fonction doit être autorisée à partir des Préférences. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) La fonction lower(X) renvoie une copie de la chaîne X avec tous ses caractères ASCII convertis en minuscules. (X) ltrim(X) removes spaces from the left side of X. (X) ltrim(X) supprime les espaces gauche de X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X, Y) La fonction ltrim(X,Y) renvoie une chaîne résultant de la suppression de tous les caractères qui apparaissent en Y à gauche de X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) La fonction à arguments multiples max() renvoie l'argument ayant la plus grande valeur ou renvoie NULL si tous les arguments sont NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) La fonction à arguments multiples min() renvoie l'argument ayant la plus petite valeur. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (X, Y) La fonction nullif(X,Y) renvoie le premier argument, si les arguments sont différents et NULL si les X et Y sont les mêmes. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (FORMAT,...) La fonction SQL printf(FORMAT,...) fonctionne comme la fonction de sqlite3_mprintf() en langage C et la fonction printf() de la bibliothèque C standard. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. (X) La fonction quote(X) renvoie le texte d’un litéral SQL qui est la valeur appropriée de l’argument pour son inclusion dans une requête SQL. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. () La fonction random() renvoie un nombre entier pseudo-aléatoire entre -9223372036854775808 et + 9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (N) La fonction randomblob(N) renvoie un blob de N octets contenant des octets pseudo-aléatoires. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X, Y, Z) La fonction replace(X,Y,Z) renvoie une chaîne formée en substituant par la chaîne Z chaque occurrence de la chaîne Y présente dans la chaîne X. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X) La fonction round(X) renvoie une valeur à virgule flottante X arrondie à zéro chiffres à droite de la virgule décimale. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X, Y) La fonction round(X,Y) renvoie une valeur à virgule flottante X arrondie à Y chiffres à droite de la virgule décimale. (X) rtrim(X) removes spaces from the right side of X. X) rtrim(X) supprime les espaces droite de X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X, Y) La fonction rtrim(X,Y) renvoie une chaîne formée en supprimant tous les caractères qui apparaissent en Y, à droite de X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X) La fonction soundex(X) renvoie une chaîne qui est l'encodage soundex de la chaîne X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X, Y) substr(X,Y) renvoie tous les caractères à partir du n-ième Y jusqu'à la fin de la chaîne X. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. (X, Y, Z) La fonction substr(X,Y,Z) renvoie une sous-chaîne de la chaîne X à partie du n-ième caractère Y, de longueur Z. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. () La fonction total_changes() renvoie le nombre d'enregistrements altérés par les instructions INSERT, UPDATE ou DELETE depuis l’ouverture de la connexion de base de données courante. (X) trim(X) removes spaces from both ends of X. (X) trim(X) supprime les espaces aux deux extrémités de X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X, Y) La fonction trim(X,Y) renvoie une chaîne formée en supprimant tous les caractères de Y présents aux deux extrémités de X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) La fonction typeof(X) renvoie une chaîne qui indique le type de données de l’expression X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) La fonction unicode(X) renvoie le point de code unicode numérique correspondant au premier caractère de la chaîne X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (X) La fonction upper(X) renvoie une copie de la chaîne X dans laquel tous les caractères ASCII en minuscules sont convertis en leurs équivalents en majuscules. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (N) La fonction zeroblob(N) renvoie un BLOB composé de N octets de valeur 0x00. (timestring,modifier,modifier,...) (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) La fonction avg() renvoie la valeur moyenne de tous les X non-NULL dans d’un groupe. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) La fonction count(X) renvoie le nombre de fois où X n’est pas NULL dans un groupe. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X) la fonction group_concat() renvoie une chaîne qui est la concaténation de toutes les valeurs non-NULL de X. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X, Y) La fonction group_concat() renvoie une chaîne qui est la concaténation de toutes les valeurs non-NULL de X. Si le paramètre Y est présent, il est utilisé comme séparateur entre chaque instances de X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) La fonction d’agrégat max() renvoie la valeur maximale de toutes les valeurs du groupe. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) La fonction d’agrégation min() renvoie la valeur non-NULL minimale de toutes les valeurs du groupe. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) Les fonctions d'agrégation sum() et total() renvoient la somme de toutes les valeurs non-NULL du groupe. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () Le numéro del'enregistrement dans la partition courante. Les lignes sont numérotées à partir de 1 dans l'ordre défini par la clause ORDER BY dans la définition de la fenêtre, ou, sinon, dans un ordre arbitraire. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Le row_number() enregistrement homologue de chaque groupe - le rang de l'enregistrement courant avec les écarts. S'il n'y a pas de clause ORDER BY, alors tous les enregistrements sont considérées comme homologues et cette fonction renvoie toujours 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Le numéro du groupe d'enregistrements homologues de la rangée courante dans sa partition - le rang de la rangée courante sans espaces. Les partitions sont numérotées à partir de 1 dans l'ordre défini par la clause ORDER BY dans la définition de la fenêtre. S'il n'y a pas de clause ORDER BY, alors toutes les lignes sont considérées comme homologues et cette fonction renvoie toujours 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () Malgré le nom, cette fonction retourne toujours une valeur comprise entre 0.0 et 1.0 égale à (rang - 1)/(rangées de partitions - 1), où rang est la valeur retournée par la fonction de fenêtre intégrée rank() et rangées de partitions est le nombre total de rangées dans la partition. Si la partition ne contient qu'une seule ligne, cette fonction renvoie 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. () Répartition cumulée. Calculée en tant que ligne-numéro/rangées-partition, où ligne-numéro est la valeur retournée par row_number() pour le dernier homologue dans le groupe et ligne-partition le nombre de lignes dans la partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (N) L'argument N est traité comme un entier. Cette fonction divise la partition en N groupes le plus uniformément possible et attribue un entier compris entre 1 et N à chaque groupe, dans l'ordre défini par la clause ORDER BY, ou, sinon, dans un ordre arbitraire. Si nécessaire, les plus grands groupes se forment en premier. Cette fonction retourne la valeur entière assignée au groupe dont la ligne courante fait partie. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr) Retourne le résultat de l'évaluation de l'expression expr par rapport à la ligne précédente de la partition. Ou NULL s'il n'y a pas de ligne précédente (parce que la ligne courante est la première). (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset) Si l'argument offset est fourni, alors il doit être un entier non négatif. Dans ce cas, la valeur retournée est le résultat de l'évaluation de expr par rapport au décalage des lignes avant la ligne courante dans la partition. Si l'offset est égal à 0, alors expr est évalué par rapport à la ligne courante. S'il n'y a pas de lignes de décalage de ligne avant la ligne courante, NULL est retourné. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr,offset,default) Si la valeur par défaut est aussi renseignée, cette valeur sera retournée au lieu de NULL si la ligne identifiée par offset n'existe pas. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr) Retourne le résultat de l'évaluation de l'expression expr par rapport à la ligne suivante de la partition. Ou NULL s'il n'y a pas de ligne suivante (parce que la ligne courante est la dernière). (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr,offset) Si l'argument offset est fourni, alors il doit être un entier non négatif. Dans ce cas, la valeur retournée est le résultat de l'évaluation de expr par rapport par rapport au décalage des lignes après la ligne courante dans la partition. Si l'offset est égal à 0, alors expr est évalué par rapport à la ligne courante. S'il n'y a pas de lignes de décalage de ligne après la ligne courante, NULL est retourné. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) Cette fonction de fenêtrage intégrée calcule le cadre de la fenêtre pour chaque rangée de la même manière qu'une fonction de fenêtrage agrégée. Elle retourne la valeur de expr évaluée par rapport à la première ligne du cadre de la fenêtre pour chaque ligne. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr) Cette fonction de fenêtrage intégrée calcule le cadre de la fenêtre pour chaque rangée de la même manière qu'une fonction de fenêtrage agrégée. Elle retourne la valeur de expr évaluée par rapport à la dernière ligne du cadre de la fenêtre pour chaque ligne. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. (expr,N) Cette fonction de fenêtrage intégrée calcule le cadre de la fenêtre pour chaque rangée de la même manière qu'une fonction de fenêtrage agrégée. Elle retourne la valeur de expr évaluée par rapport à la ligne N du cadre de la fenêtre. Les rangées sont numérotées à l'intérieur du cadre de la fenêtre à partir de 1 dans l'ordre défini par la clause ORDER BY si elle est présente, ou dans un ordre arbitraire sinon. S'il n'y a pas de Nième ligne dans la partition, alors NULL est retourné. SqliteTableModel References %1(%2) Hold Ctrl+Shift and click to jump there Références %1(%2) Appuyez simultanément sur Ctrl+Maj et cliquez pour arriver ici reading rows Lecture des enregistrements loading... chargement... References %1(%2) Hold %3Shift and click to jump there Références %1(%2) Appuyez simultanément sur %3+Maj et cliquez pour arriver ici Error changing data: %1 Erreur lors du changement des données : %1 retrieving list of columns récupération de la liste des colonnes Fetching data... Récupération des données... Cancel Annuler VacuumDialog Compact Database Compacter la base de données Warning: Compacting the database will commit all of your changes. Attention : compacter la base de donnée entraînera l'enregistrement de tous les changements effectués. Please select the databases to co&mpact: Veuillez saisir le nom de la Base de Données à co&mpacter : Warning: Compacting the database will commit all changes you made. Attention : compacter la base de donnée entraînera l'enregistrement de tous les changements effectués. Please select the objects to compact: Veuillez sélectionner les objets à compacter : sqlitebrowser-3.11.2/src/translations/sqlb_it.ts000066400000000000000000010372121345112435200220260ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite Informazioni su DB Browser for SQLite Version Versione <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB-Browser for SQLite è uno strumento grafico opensource e freeware usato per creare, struttutturare e modificare file database di SQLite</p><p>È rilasciato sotto la licenza Mozilla Public License Version 2, così come sotto la licenza GNU General Public License Version 3 o successive. È possibile modificarlo e redistribuirlo sotto le condizioni specificate da queste licenze.</p><p>Si veda <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> e <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> per ulteriori dettagli.</p><p>Per ulteriori dettagli riguardo questo programma visitate il nostro sito web a: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">Questo software usa GPL/LGPL QT Toolkit da </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Si veda </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> per termini di licenza e informazioni.</span></p><p><span style=" font-size:small;">Utilizza inoltre Silk-Iconset di Mark James, rilasciato sotto licenza Creative Commons Attribution 2.5 e 3.0.<br/>Si veda </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> per ulteriori dettagli.</span></p></body></html> SQLite Version Versione SQLite SQLCipher Version Versione SQLCipher (based on SQLite %1) (basato su SQLite %1) Version Versione Built for Qt Version Versione Qt AddRecordDialog Add New Record Aggiungi un nuovo record Enter values for the new record considering constraints. Fields in bold are mandatory. Inserisci i valori per il nuovo record considerando i vincoli. I campi in grassetto sono obbligatori. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. Nella colonna Valore puoi specificare il valore per il campo identificato dalla colonna Nome. La colonna Tipo indica il tipo del campo. I valori di default sono mostrati nello stesso stile come valori NULL. Name Nome Type Tipo Value Valore Values to insert. Pre-filled default values are inserted automatically unless they are changed. Valori da inserire. Sono preinseriti dei valori di default automaticamente a meno che essi non vengano cambiati. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. Quando modifichi i valori nel riquadro superiore, la query SQL per inserire questo nuovo record è mostrata qui. Puoi modificare manualmente la query prima di salvare. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">Salva</span> invia la richiesta SQL mostrata al database per inserire un nuovo record.</p><p><span style=" font-weight:600;">Ripristina Defaults</span> ripristinerà i valori iniziali della colonna <span style=" font-weight:600;">Valore</span>.</p><p><span style=" font-weight:600;">Annulla</span> chiuderà questa finestra di dialogo senza eseguire la query.</p></body></html> Auto-increment Auto-incrementale Unique constraint Restrizione univoco Check constraint: %1 Controlla restrizioni: %1 Foreign key: %1 Chiave esterna: %1 Default value: %1 Valore di default: %1 Error adding record. Message from database engine: %1 Errore nell'aggiungere il record. Messaggio dal database engine: %1 Are you sure you want to restore all the entered values to their defaults? Sei sicuro di voler ripristinare tutti i valori inseriti ai loro valori di default? Application Usage: %1 [options] [db] Utilizzo: %1 [opzioni] [db] Possible command line arguments: Possibili argomenti da linea di comando: -h, --help Show command line options -h, --help Mostra opzioni della linea di comando -q, --quit Exit application after running scripts -q, --quit Esci dall'applicazione dopo aver eseguito gli script -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [file] Esegui questo file SQL dopo aver aperto il DB -t, --table [table] Browse this table after opening the DB -t, --table [table] Esplora questa tabella dopo aver aperto il DB -R, --read-only Open database in read-only mode -R, --read-only Apri il database in modalità sola lettura -o, --option [group/setting=value] Run application with this setting temporarily set to value -o, --option [group/setting=valore] Esegue l'applicazione con queste impostazioni temporaneamente modificate al valore -v, --version Display the current version -v, --version Mostra la versione corrente [file] Open this SQLite database [file] Apri questo database SQLite This is DB Browser for SQLite version %1. Questo è DB Browser for SQLite versione %1. The -s/--sql option requires an argument L'opzione -s/--sql richiede un argomento The file %1 does not exist Il file %1 non esiste The -t/--table option requires an argument L'opzione -t/--table richiede un argomento The -o/--option option requires an argument in the form group/setting=value L'opzione -o/--option richiede un argomento nella forma group/setting=valore Invalid option/non-existant file: %1 Opzione non valida/file inesistente: %1 CipherDialog SQLCipher encryption Criptatura SQLCipher &Password &Password &Reenter password &Reinserire password Encr&yption settings I&mpostazioni cifratura SQLCipher &3 defaults Predefiniti SQLCipher &3 SQLCipher &4 defaults Predefiniti SQLCipher &4 Custo&m Personalizzat&i Page si&ze Di&mensioni pagina &KDF iterations Integrazione &KDF HMAC algorithm Algoritmo HMAC KDF algorithm Algoritmo KDF Passphrase Chiave testuale Raw key Chiave grezza Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Perfavore inserisci una chiave per criptare il database. Nota che se cambi una qualsiasi delle altre impostazioni opzionali, dovrai reinserirle ogni volta che apri il file del database. Lascia i campi password vuoti per disabilitare la crittografia. Il processo di crittazione può richiedere del tempo e dovresti avere una copia di backup del database! Modifiche non salvate sono applicate prima di modificare la crittografia. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. Si prega d'inserire la chiave utilizzata per criptare il database. Se una qualunque altra impostazione è stata modificata per l'inserimento della criptazione si prega d'impostarla in modo adeguato. ColumnDisplayFormatDialog Choose display format Seleziona il formato di visualizzazione Display format Formato di visualizzazione Choose a display format for the column '%1' which is applied to each value prior to showing it. Seleziona un formato di visualizzazione per la colonna '%1' che è applicato a ciascun valore prima di mostrarlo. Default Default Decimal number Numero decimale Exponent notation Notazione esponenziale Hex blob Blob esadecimale Hex number Numero esadecimale Octal number Numero ottale Round number Numero arrotondato Apple NSDate to date Apple NSDate ad oggi Java epoch (milliseconds) to date Java epoch (millisecondi) ad oggi Julian day to date Giorno giuliano ad oggi Unix epoch to date Unix epoch ad oggi Unix epoch to local time Unix epoch a ora locale Windows DATE to date Windows DATE ad oggi Date as dd/mm/yyyy Data come gg/mm/aaaa Lower case Minuscolo Upper case Maiuscolo Custom Personalizzato DBBrowserDB This database has already been attached. Its schema name is '%1'. Questo database è già stato collegato. Il nome del suo schema è '%1'. Please specify the database name under which you want to access the attached database Si prega di specificare il nome del database con cui si vuol accedere al database collegato Invalid file format Formato file non valido Do you really want to close this temporary database? All data will be lost. Vuoi davvero chiudere questo database temporaneo? Tutti i dati andranno persi. Do you want to save the changes made to the database file %1? Vuoi salvare le modifiche effettuate al database %1? The database is currently busy: Il database è attualmente in uso: Do you want to abort that other operation? Vuoi annullare l'altra operazione? Exporting database to SQL file... Esportando il database in file SQL... Cancel Annulla No database file opened Nessun database aperto Executing SQL... Eseguendo SQL... Action cancelled. Azione annullata. Error in statement #%1: %2. Aborting execution%3. Errore nello statement #%1: %2. Annullo l'esecuzione %3. and rolling back e ripristino il db didn't receive any output from %1 non ho ricevuto alcun ouput da %1 could not execute command: %1 impossibile eseguire il comando: %1 Cannot delete this object Non posso cancellare questo oggetto Cannot set data on this object Non posso impostare i dati in questo oggetto A table with the name '%1' already exists in schema '%2'. Una tabella con il nome '%1' esiste già nello schema '%2'. renameColumn: cannot find column %1. renameColumn: Impossibile trovare la colonna %1. renameColumn: creating savepoint failed. DB says: %1 renameColumn: creazione salvataggio fallita. Messaggio DB : %1 renameColumn: releasing savepoint failed. DB says: %1 renameColumn: rilascio punto di salvataggio fallito. Messaggio DB: %1 renameColumn: creating new table failed. DB says: %1 renameColumn: creazione nuova tabella fallita. Messaggio DB: %1 renameColumn: copying data to new table failed. DB says: %1 renameColumn: copia dei dati a nuova tabella fallito. Messaggio DB: %1 renameColumn: deleting old table failed. DB says: %1 renameColumn: eliminazione vecchia tabella falita. Messaggio DB: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: Ripristino di alcuni oggetti associati a questa tabella fallito. Questo è probabilmente dovuto al fatto che i nomi di alcune colonne sono cambiati . Qui c'è la richiesta SQL che potresti voler sistemare ed eseguire manualmente: Error renaming table '%1' to '%2'.Message from database engine: %3 Errore nel rinominare la tabella '%1' in '%2'.Messaggio dal database engine: %3 ... <string can not be logged, contains binary data> ... ... <la stringa non può essere loggata, contiene dati binari> ... could not get list of db objects: %1, %2 non è possibile ricavare la lista degli oggetti db: %1, %2 could not get list of databases: %1 non è possibile ricavare la lista dei database: %1 didn't receive any output from pragma %1 non ho ricevuto nessun output da pragma %1 could not execute pragma command: %1, %2 non è possibile eseguire il comando pragma: %1, %2 Error setting pragma %1 to %2: %3 Errore nell'impostare pragma %1 in %2: %3 File not found. File non trovato. Error loading extension: %1 Errore nel caricamento dell'estensione: %1 could not get column information non è possibile ricavare informazioni sulla colonna DbStructureModel Name Nome Object Oggetto Type Tipo Schema Schema Database Database Browsables Navigabili All Tutti Temporary Temporaneo Tables (%1) Tabelle (%1) Indices (%1) Indici (%1) Views (%1) Viste (%1) Triggers (%1) Triggers (%1) EditDialog Edit database cell Modifica la cella del database Mode: Modalità: This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Questa è la lista delle modalità supportate dall'editor della cella. Scegli una modalità per vedere o modificare i dati della cella corrente. Text Testo Binary Binario Image Immagine JSON JSON XML XML Automatically adjust the editor mode to the loaded data type Seleziona automaticamente la modalità dell'editor in base al tipo di dato caricato This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Questo bottone spuntabile permette di abilitare o disabilitare l'adattamento automatico della modalità dell'editor. Quando una nuova cella è selezionata o sono importati nuovi dati e la modalità di adattamento automaitco è abilitata, la modalità si aggiusta al tipo di dato rilevato. Puoi cambiare in seguito la modalità dell'editor in modo manuale. Se vuoi mantenere la modalità selezionata manualmente mentre ti muovi tre le celle, togli la spunta a questo bottone. Auto-switch Auto-switch Auto-format: pretty print on loading, compact on saving. Auto-formato: migliore stampa al caricamento, compatta in salvataggio. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Quando abilitato, la feature dell'auto-formato formatta i dati al caricamento, rompe il testo in righe e lo indenta per una maggiore leggibilità. Al salvataggio dei dati, la feature dell'auto-formato compatta i dati rimuovendo i fine riga, e spazi bianchi non necessari. Autoformat Autoformato Import from file Importa da file Opens a file dialog used to import any kind of data to this database cell. Apri una finestra di dialogo per importare qualsiasi tipo di dato in questa cella del database. &Import &Importa Export to file Esporta in un file Opens a file dialog used to export the contents of this database cell to a file. Apri una finestra di dialogo utilizzata per esportare i contenuti di questa cella del database in un file. &Export &Esporta Set this cell to NULL Imposta questa cella a NULL Erases the contents of the cell Cancella i contenuti di questa cella Set as &NULL Imposta come &NULL This area displays information about the data present in this database cell Quest'area mostra informazioni riguardo i dati presenti in questa cella del database This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Questa modalità editor permette di modificare dati JSON o XML con evidenziazione della sintassi, formattazione e validazione autmoatica prima del salvataggio. Gli errori sono indicati con una sottolineatura rossa ondulata. Type of data currently in cell Tipo di dato attualmente nella cella Size of data currently in table Dimensione dei dati attualmente in tabella Apply data to cell [Ctrl+Return] Applica i dati alla cella [Ctrl+Invio] This button saves the changes performed in the cell editor to the database cell. Questo bottone salva le modifiche fatte alla cella dell'editor alla cella del database. Apply Applica Print... Stampa... Open preview dialog for printing displayed image Apri la finestra di anteprima per stampare l'immagine mostrata Ctrl+P Ctrl+P Open preview dialog for printing displayed text Apri la finestra di anteprima per stampare il testo mostrato Copy Hex and ASCII Copia HEX e ASCII Copy selected hexadecimal and ASCII columns to the clipboard Copia le colonne esadecimali e ASCII selezionate negli appunti Ctrl+Shift+C Ctrl+Shift+C Image data can't be viewed in this mode. I dati immagine non possono essere visualizzati in questa modalità. Try switching to Image or Binary mode. Prova a passare alla modalità Immagine o Binario. Binary data can't be viewed in this mode. I dati binari non possono essere visualizzati in questa modalità. Try switching to Binary mode. Prova a passare alla modalità Binario. Text files (*.txt) File di testo (*.txt) JSON files (*.json) File JSON (*.json) XML files (*.xml) File XML (*.xml) Image files (%1) File immagine (%1) Binary files (*.bin) File binario (*.bin) All files (*) Tutti i files (*) Choose a file to import Scegli un file da importare %1 Image %1 Immagine SVG files (*.svg) File SVG (*.svg) Hex dump files (*.txt) File esadecimale di dump (*.txt) Choose a filename to export data Scegli un nome del file per esportare i dati Invalid data for this mode Dati non validi per questa modalità The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? La cella continete dati %1 non validi. Ragione: %2. Sei davvero sicuro di applicare quello alla cella? Type of data currently in cell: Text / Numeric Tipo di dato attualmente nella cella: Testo / Numerico %n char(s) %n carattere %n caratteri Type of data currently in cell: %1 Image Tipo di dato attualmente nella cella: %1 Immagine %1x%2 pixel(s) %1x%2 pixel(s) Type of data currently in cell: NULL Tipo di dato attualmente nella cella: NULL %n byte(s) %n byte %n bytes Type of data currently in cell: Valid JSON Tipo di dato attualmente nella cella: Valid JSON Type of data currently in cell: Binary Tipo di dato attualmente nella cella: Binario EditIndexDialog Edit Index Schema Modifica Indice Schema &Name &Nome &Table &Tabella &Unique &Univoco For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Per restringere l'indice a solo una parte della tabella puoi specificare una clausula WHERE qui che selezioni la parte della tabella che dovrà essere indicizzata Partial inde&x clause Clausola di &indice parziale Colu&mns &Colonne Table column Colonna della tabella Type Tipo Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Aggiungi una nuova espressione colonna all'indice. Le espressioni colonna contengono espressioni SQL piuttosto che i nomi delle colonne. Index column Indice di colonna Order Ordine Deleting the old index failed: %1 Cancellazione del vecchio indice fallita: %1 Creating the index failed: %1 Creazione del vecchio indice fallita: %1 EditTableDialog Edit table definition Modifica la definizione della tabella Table Tabella Advanced Avanzate Database schema Schema database Without Rowid Senza id riga Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Fai una tabella 'WITHOUT rowid'. Impostare questa spunta richiede un campo di tipo INTEGER con la chiave primaria impostata e l'auto incremento non impostato. Fields Campi Add field Aggiungi campo Remove field Rimuovi campo Move field up Muovi campo in sù Move field down Muovi campo in giù Name Nome Type Tipo NN NN Not null Non null PK CP Primary key Chiave Primaria AI AI Autoincrement Autoincremento U U Unique Univoco Default Default Default value Valore di default Check Controlla Check constraint Controlla le restrizioni Foreign Key Chiave esterna <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Attenzione: </span>C'è qualcosa in questa definizione di tabella che il nostro parser non comprende. Modificare e salvare questa tabella potrebbe creare dei problemi.</p></body></html> Error creating table. Message from database engine: %1 Error nella creazione della tabella. Messaggio dal database engine: %1 There already is a field with that name. Please rename it first or choose a different name for this field. Esiste già un campo con quel nome. Si prega di rinominarlo prima o scegliere un nome differente per questo campo. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. Questa colonna è referenziata in una chiave esterna nella tabella %1 e quindi il nome non può essere modificato. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. Esiste almeno una riga con questo campo impostato a NULL. Questo rende impossibile impostare questa opzione. Si prega prima di modificare quel dato. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Esiste almeno un riga con un valore non intero in questo campo. Questo rende impossibile impostare l'AI. Si prega prima di cambiare il dato. Column '%1' has duplicate data. La colonna '%1' ha dei dati duplicati. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Questo rende impossibile abilitare l'opzionie 'Univoco'. Perfavore rimuovi i dati duplicati, il che permetterà l'abilitazione dell'opzione 'Univoco'. Modifying this column failed. Error returned from database: %1 La modifica di questa colonna è fallita. Errore restituito dal database: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Sei sicuro di voler eliminare il campo '%1'? Tutti i dati che sono attualmente memorizzati in questo campo andranno persi. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Perfavore agginugi un campo che rispetti i seguenti criteri prima di impostare l'opzione senza id di riga: - Opzione Chiave Primaria impostata - Autoincremento disabilitato Setting the rowid column for the table failed. Error message: %1 Impostazione della colonna rowid per la tabella fallita. Messaggo di errore: %1 Changing the table schema failed. Error message: %1 Cambio dello schema della tabella fallito. Messaggio di errore: %1 ExportDataDialog Export data as CSV Esporta i dati come CSV Tab&le(s) Tabe&lla(e) Colu&mn names in first line Nomi delle &Colonne sulla prima riga Fie&ld separator Separatore di ca&mpo , , ; ; Tab Tab | | Other Altro &Quote character &Carattere citazione " " ' ' New line characters Carattere di nuova riga Windows: CR+LF (\r\n) Windows: CR+LF (\r\n) Unix: LF (\n) Unix: LF (\n) Pretty print Visualizzazione piacevole Export data as JSON Esporta i dati come JSON exporting CSV esportando in CSV Could not open output file: %1 Impossibile aprire il file di output: %1 exporting JSON esportando in JSON Text files(*.csv *.txt) File di testo(*.csv *.txt) Text files(*.json *.js *.txt) File di testo(*.json *.js *.txt) Choose a filename to export data Scegliere un nome file per esportare i dati Please select at least 1 table. Perfavore seleziona almeno una tabella. Choose a directory Scegliere una cartella Export completed. Esportazione completata. ExportSqlDialog Export SQL... Esporta SQL... Tab&le(s) Tabe&lla(e) Select All Seleziona tutto Deselect All Deseleziona tutto &Options &Opzioni Keep column names in INSERT INTO Tieni i nomi delle colonne in INSERT INTO Multiple rows (VALUES) per INSERT statement Righe multiple (VALUES) per lo statement INSERT Export everything Esporta tutto Export schema only Esporta solo lo schema Export data only Esporta solo i dati Keep old schema (CREATE TABLE IF NOT EXISTS) Mantieni lo schema esistente (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Sovrascrivi schema precedente (DROP TABLE, poi CREATE TABLE) Please select at least one table. Perfavore seleziona almeno una tabella. Choose a filename to export Scegli un nome del file per esportare Text files(*.sql *.txt) File di testo(*.sql *.txt) Export completed. Esportazione completata. Export cancelled or failed. Esportazione annullata o fallita. ExtendedScintilla Ctrl+H Ctrl+H Ctrl+P Ctrl+P Find and Replace... Trova e Sostituisci... Print... Stampa... ExtendedTableWidget Use as Exact Filter Usa come filtro esatto Containing Che contiene Not equal to Non uguale a Greater than Maggiore di Less than Minore di Greater or equal Maggiore o uguale Less or equal Minore o uguale Between this and... Tra questo e... Set to NULL Imposta a NULL Copy Copia Copy with Headers Copia con gli Headers Copy as SQL Copia come SQL Paste Incolla Print... Stampa... Use in Filter Expression Usa nell'espressione del filtro Alt+Del Alt+Canc Ctrl+Shift+C Ctrl+Shift+C Ctrl+Alt+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? Il contenuto degli appunti è più grande del range selezionato. Vuoi inserirlo comunque? FileExtensionManager File Extension Manager Gestore delle estensioni dei files &Up Porta &su &Down Porta &giù &Add &Aggiungi &Remove &Rimuovi Description Descrizione Extensions Estensioni *.extension *.estensione FilterLineEdit Filter Filtro Set Filter Expression Imposta l'espressione del filtro What's This? Cos'è questo? Is NULL È NULL Is not NULL Non è NULL Is empty È vuoto Is not empty Non è vuoto These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Questi campi di input permettono di effettuare filtri rapidi nella tabella correntemente selezionata. er impostazione predefinita, le righe che contengono il testo immesso sono escluse. Sono inoltre supportati i seguenti operatori: % Wildcard > Maggiore di < Minore di >= Maggiore o uguale <= Minore o uguale = Uguale a: corrispondenza esatta <> Diverso: corrispondenza esatta invertita x~y Intervallo: valori tra x e y Equal to... Uguale a... Not equal to... Non uguale a... Greater than... Maggiore di... Less than... Minore di... Greater or equal... Maggiore o uguale... Less or equal... Minore o uguale... In range... Nell'intervallo... FindReplaceDialog Find and Replace Trova e sostituisci Fi&nd text: Tr&ova testo: Re&place with: So&stituisci con: Match &exact case Corrispondenza &esatta Match &only whole words Trova solo &parole complete When enabled, the search continues from the other end when it reaches one end of the page Quando abilitato, la ricerca contninua dall'altro capo del documento quando si raggiunge una fine del documento &Wrap around Senza &limiti When set, the search goes backwards from cursor position, otherwise it goes forward Quando abilitato, la ricerca va all'indietro dalla corrente posizione del cursore, altrimenti va in avanti Search &backwards Cerca &indietro <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>Quando selezionato, la stringa del testo viene interpretata come una espressione regolare Unix. Vedi <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Espressioni regolari su Wikibooks (in inglese)</a>.</p></body></html> Use regular e&xpressions Usa &espressioni regolari Find the next occurrence from the cursor position and in the direction set by "Search backwards" Trova la prossima occorrenza dalla corrente posizione del cursore nella direzione impostata da "Cerca indietro" &Find Next &Trova successivo &Replace &Sostituisci Highlight all the occurrences of the text in the page Evidenzia tutte le occorrenze del testo nella pagina F&ind All T&rova tutti Replace all the occurrences of the text in the page Sostituisce tutte le occorrenze del testo nella pagina Replace &All Sostituisci &Tutti The searched text was not found Il testo cercato non è stato trovato The searched text was not found. Il testo cercato non è stato trovato. The searched text was found one time. Il testo cercato è stato trovato una volta. The searched text was found %1 times. Il testo cercato è stato trovato %1 volte. The searched text was replaced one time. Il testo cercato è stato sostituito una volta. The searched text was replaced %1 times. Il testo cercato è stato sostituito %1 volte. ForeignKeyEditor &Reset &Reimposta Foreign key clauses (ON UPDATE, ON DELETE etc.) Clausule per chiave esterna (ON UPDATE, ON DELETE etc.) ImportCsvDialog Import CSV file Imoprta file CSV Table na&me No&me tabella &Column names in first line Nomi &colonna nella prima riga Field &separator &Separatore di campo , , ; ; Tab Tab | | Other Altro &Quote character &Carattere citazione " " ' ' &Encoding Codific&a UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? Pulizia campi? Separate tables Separa tabelle Advanced Avanzate When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Quando importo un campo vuoto dal file CSV dentro una tabella con un valore predefinito per quella colonna, quel valore viene inserito. Attivare quest'opzione per inserire invece un valore vuoto. Ignore default &values Ignora valori &predefiniti Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Attivare quest'opzione per fermare l'importazione quando si prova ad importare un valore vuoto in una colonna "NOT NULL" senza valore predefinito. Fail on missing values Fallisci su valori mancanti Disable data type detection Disabilita rilevamento tipo dati Disable the automatic data type detection when creating a new table. Disabilita il riconoscimento automatico della tipologia di dato quando crea una nuova tabella. Deselect All Deseleziona tutte Match Similar Seleziona simili Import completed Importazione completata Select All Seleziona tutte There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. Esiste già una tabella col nome '%1' e l'importazione in una tabella esistente non è possibile se il numero di colonne non corrisponde. There is already a table named '%1'. Do you want to import the data into it? Esiste già una tabella col nome '%1'. Vuoi importare i dati al suo interno? Creating restore point failed: %1 Creazione del punto di ripristino fallita: %1 Creating the table failed: %1 Creazione della tabella fallita: %1 importing CSV importo il CSV Inserting row failed: %1 Inserimento della riga fallito: %1 Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Importare il file '%1' ha richiesto %2ms. Di questi %3ms sono stati spesi in funzioni di riga. MainWindow DB Browser for SQLite DB Browser for SQLite Database Structure Struttura database This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Questa è la struttura del database aperto. Puoi trascinare SQL da una riga oggetto e rilasciarli dentro altri applicativi o in altre istanze di àDB Browser for SQLite'. Browse Data Naviga nei dati &Table: &Tabella: Select a table to browse data Seleziona una tabella per navigare tra i dati Use this list to select a table to be displayed in the database view Usa questa lista per selezionare una tabella da visualizzare nella vista del database Refresh the data in the selected table [F5, Ctrl+R] Aggiorna i dati della tabella selezionata [F5, Ctrl+R] This button refreshes the data in the currently selected table. Questo pulsante aggiorna i dati della tabella selezionata. Clear all filters Cancella tutti i filtri This button clears all the filters set in the header input fields for the currently browsed table. Questo pulsante pulisce tutti i filtri impostati nella riga d'intestazione per la tabella corrente. Save the table as currently displayed Salva la tabella così come visualizzata <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> <html><head/><body><p>Questo menù fornisce le seguenti opzioni applicabili alla tabella filtrata e visualizzata correntemente:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Esporta in CSV: questa opzione esporta i dati della tabella così come visualizzati (con filtri, riordine delle colonne e formati) in un file CSV.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Salva come vista: questa opzione salva le impostazioni correnti della tabella visualizzata (filtri, riordine delle colonne e formati) come vista SQL che puoi successivamente visualizzare o utilizzare come statement.</li></ul></body></html> ... ... Print currently browsed table data [Ctrl+P] Stampa i dati visualizzati [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. Stampa i dati visualizzati. Stampa la selezione se più di una cella è selezionata. Insert a new record in the current table Inserisci un nuovo valore nella tabella corrente <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> <html><head/><body><p>Questo pulsante crea una nuova riga nel database. Mantieni premuto il tasto del mouse per ottenere più opzioni:</p><ul><li><span style=" font-weight:600;">Nuova Riga</span>: inserisce una nuova riga con i valori predefiniti.</li><li><span style=" font-weight:600;">Inserisci Valori...</span>: apre una finestra per inserire i valori prima che vengano immessi nel database. Questo permette che l'immissione dei valori rispetti diversi limiti (constraints). Questa finestra si apre anche se l'opzione <span style=" font-weight:600;">Nuova Riga</span> fallisce a causa di questi limiti (constraints).</li></ul></body></html> New Record Nuova Riga Delete the current record Elimina il valore corrente This button deletes the record or records currently selected in the table Questo pulsante elimina la/e righe selezionate nella tabella Delete Record Elimina Riga This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Questa è la vista della tabella del database. Puoi eseguire le seguenti operazioni: - Inizia a scrivere per modificare i valori. - Doppio-click su qualsiasi valore per modificarne il contenuto nella finestra di editor della cella. - Alt+Del per eliminare il contenuto della cella e portarlo a NULL. - Ctrl+" per duplicare il valore corrente. - Ctrl+' per copiare il valore dalla cella soprastante. - Operazioni di selezione e copia/incolla. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Scorri all'ìinizio</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Cliccare questo pulsante scorre la vista all'inizio della tabella.</p></body></html> |< |< Scroll one page upwards Scorri di una pagina in su <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html><head/><body><p>Cliccando questo pulsante la vista scorre le righe di una pagina verso l'inizio della tabella.</p></body></html> < < 0 - 0 of 0 0 - 0 di 0 Scroll one page downwards Scorri di una pagina in giù <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>Cliccando questo pulsante la vista scorre le righe di una pagina verso il fondo della tabella.</p></body></html> > > Scroll to the end Scorri alla fine <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Cliccando questo pulsante la vista scorre al fondo della tabella.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>Clicca qui per saltare alla riga specificata</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>Questo pulsante è utilizzato per navigare alla riga impostata nell'area "Vai a".</p></body></html> Go to: Vai a: Enter record number to browse Inserisci il numero di riga a cui scorrere Type a record number in this area and click the Go to: button to display the record in the database view Inserisci un numero in quest'area e clicca sul pul pulsante "Vai a" per visualizzare la riga selezionata 1 1 Edit Pragmas Modifica Pragmas Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Attenzione: questo pragma non è leggibile e questo valore è stato dedotto. Scrivere i pragma può sovrascrivere un LIKE ridefinito provvisto da un'estensione di SQLite. Execute SQL Esegui SQL toolBar1 &File &File &Import &Importa &Export &Esporta &Edit &Modifica &View &Visualizza &Help &Aiuto &Tools &Strumenti DB Toolbar Barra degli strumenti del DB Edit Database &Cell Modifica &cella SQL &Log &Log SQL Show S&QL submitted by Mostra l'S&QL inviato da User Utente Application Applicazione This button clears the contents of the SQL logs Questo pulsante cancella il contenuto del log SQL &Clear &Pulisci This panel lets you examine a log of all SQL commands issued by the application or by yourself Questo pannello ti permette di esaminare il log di tutti i comandi SQL inviati dall'applicazione o da te stesso &Plot &Grafica DB Sche&ma Sche&ma DB This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Questa è la struttura del database aperto. Puoi trascinare nomi d'oggetto multipli dalla colonna "Nome" e rilasciarli all'interno dell'editor SQL e puoi modificare le proprietà dei nomi rilasciati utilizzando il menù contestuale. Questo può aiutarti nel comporre statement SQL. Puoi trascinare statement SQL dalla colonna Schema e rilasciarli dentro l'editor SQL o all'interno di altre applicazioni. &Remote &Remoto Project Toolbar Barra degli strumenti di progetto Extra DB toolbar Barra degli strumenti extra DB Close the current database file Chiudi il file di database corrente &New Database... &Nuovo Database... Create a new database file Crea un nuovo file di database This option is used to create a new database file. Questa opzione è utilizzata per creare un nuovo file di database. Ctrl+N Ctrl+N &Open Database... &Apri Database... Open an existing database file Apre un file di database esistente This option is used to open an existing database file. Questa opzione è utilizzata per aprire un file esistente di database. Ctrl+O Ctrl+A &Close Database &Chiudi Database This button closes the connection to the currently open database file Questo pulsnate chiude la connessione al file di database attualmente aperto Ctrl+W Ctrl+S &Revert Changes &Ripristina le modifiche Revert database to last saved state Ripristina il database all'ultimo stato salvato This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Questa opzione è utilizzata per ripristinare il file di database al suo ultimo stato salvato. Tutte le modifiche fatte dall'ultima opzione di salvataggio sono perse. &Write Changes &Salva le modifiche Write changes to the database file Scrive le modifiche sul file di database This option is used to save changes to the database file. Questa opzione è utilizzata per salvare le modifiche sul file di database. Ctrl+S Ctrl+C Compact &Database... &Compatta Database... Compact the database file, removing space wasted by deleted records Compatta il file di database, rimuovendo lo spazio sprecato dalle righe eliminate Compact the database file, removing space wasted by deleted records. Compatta il file di database rimuovendo lo spazio sprecato dalle righe eliminate. E&xit &Esci Ctrl+Q Ctrl+E &Database from SQL file... &Database dal file SQL... Import data from an .sql dump text file into a new or existing database. Importa i dati da un file di testo di dump .sql all'interno di un database nuovo o esistente. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Questa opzione ti permette d'importare i dati da un file di testo di dump .sql all'interno di un database nuovo o esistente. I file di dump SQL possono essere creati dalla maggiorparte dei motori SQL, inclusi MySQL e PostgreSQL. &Table from CSV file... &Tabella da file CSV... Open a wizard that lets you import data from a comma separated text file into a database table. Apre un wizard che ti permette d'importare dati da un file CSV all'interno di una tabella del database. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Apre un wizard che ti permette d'importare dati da un file CSV all'interno di una tabella del database. I file CSV possono essere creati dalla maggiorparte delle applicazioni database o foglio di calcolo. &Database to SQL file... &Database in file SQL... Export a database to a .sql dump text file. Esporta un database in un file di testo di dump .sql. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Questa opzione ti permette di esportare un database in un file di testo di dump .sql. Il file di dump SQL contiene tutti i dati necessari per ricreare il database sulla maggiorparte di motori di database, inclusi MySQL e PostgreSQL. &Table(s) as CSV file... &Tabella(e) come file CSV... Export a database table as a comma separated text file. Esporta la tabella del database come un file di testo CSV. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Esporta la tabella del database come un file di testo CSV, pronto per essere importato in un altro database o foglio di calcolo. &Create Table... &Crea tabella... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Apre un wizard per la creazione di una tabella, dov'è possibile definire il nome e i campi di una nuova tabella del database &Delete Table... &Elimina tabella... Delete Table Elimina Tabella Open the Delete Table wizard, where you can select a database table to be dropped. Apre un wizard per la cancellazione della tabella, da qui puoi selezionare la tabella del database da eliminare. &Modify Table... &Modifica Tabella... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Apre un wizard per la modifica di una tabella, da qui è possibile rinominare una tabella esistente. Si può anche aggiungere o rimuovere campi da una tabella così come modificarne il nome o il tipo. Create &Index... Crea &Indice... Open the Create Index wizard, where it is possible to define a new index on an existing database table. Apre un wizard per la crazione di un indice, da qui è possibile definire un nuovo indice s'una tabella di database pre-esistente. &Preferences... &Preferenze... Open the preferences window. Apre la finestra delle preferenze. &DB Toolbar &Barra degli strumenti Shows or hides the Database toolbar. Mostra o nasconde la barra degli strumenti del database. Ctrl+T Ctrl+T W&hat's This? Cos'è &questo? Shift+F1 Shift+F1 &About &Informazioni &Recently opened &Aperti di recente Open &tab Apri &scheda This button opens a new tab for the SQL editor Questo pulsante apre una nuova schede dell'editor SQL &Execute SQL &Esegui SQL Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] Esegue tutti/selezionati SQL [F5, Ctrl+Invio, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. Questo pulsante esegue gli statement SQL evidenziati. Se nessun testo è selezionato, tutti gli statement SQL vengono eseguiti. Open SQL file Apri file SQL This button opens a file containing SQL statements and loads it in a new editor tab Questo pulsante apre un file contenente statement SQL e lo carica in una nuova scheda dell'editor Save SQL file Salva file SQL &Load Extension... &Carica Estensioni... Execute current line Esegue la riga corrente Execute current line [Shift+F5] Esegue la riga corrente [Shift+F5] This button executes the SQL statement present in the current editor line Questo pulsante esegue lo statement SQL presente nella riga corrente dell'editor Shift+F5 Shift+F5 Export as CSV file Esporta come file CSV Export table as comma separated values file Esporta la tabella come file CSV &Wiki &Wiki Bug &Report... Bug &Report... Feature Re&quest... Richiesta &Funzionalità... Web&site Sito &Web &Donate on Patreon... &Dona su Patreon... Sa&ve Project... Sal&va Progetto... Save the current session to a file Salva la sessione correte in un file This button lets you save all the settings associated to the open DB to a DB4S project file Questo pulsante ti permette di salvare tutte le impostazioni associate al DB aperto in un file di progetto di DB4S Open &Project... Apri &Progetto... Load a working session from a file Carica una sessione di lavoro da file This button lets you open a DB4S project file Questo pulsante ti permette di aprire un file di progetto DB4S &Attach Database... &Collega Database... Add another database file to the current database connection Aggiunge un altro file di database alla connessione corrente This button lets you add another database file to the current database connection Questo pulsante ti permette di aggiungere un altro file alla connessione corrente &Set Encryption... &Imposta cifratura... Save SQL file as Salva file SQL come This button saves the content of the current SQL editor tab to a file Questo pulsante salva il contenuto della scheda di editor SQL in un file &Browse Table &Naviga Tabella Copy Create statement Copia statement CREATE Copy the CREATE statement of the item to the clipboard Copia lo statement CREATE negli appunti Edit display format Modifica formato di visualizzazione Edit the display format of the data in this column Modifica il formato di visualizzazione dei dati in questa colonna Show rowid column Mostra colonna rowid Toggle the visibility of the rowid column Mostra/nasconde la colonna rowid Set encoding Imposta codifica Change the encoding of the text in the table cells Modifica la codifica dle testo nelle celle della tabella Set encoding for all tables Imposta la codifica per tutte le tabelle Change the default encoding assumed for all tables in the database Modifica il valore predefinito di codifica per tutte le tabelle del database SQLCipher &FAQ SLQCipher &FAQ Opens the SQLCipher FAQ in a browser window Apre le SQLCipher FAQ in una finestra del browser Table(&s) to JSON... Tabella(&e) in JSON... Export one or more table(s) to a JSON file Esporta una o più tabelle in un file JSON Refresh Aggiorna F5 Open Data&base Read Only... Apri un Data&base in Sola Lettura... Open an existing database file in read only mode Apre un file databse esistente in modalità sola lettura Unlock view editing Sblocca la modifica della vista This unlocks the current view for editing. However, you will need appropriate triggers for editing. Sblocca la vista corrente per modificarla. Per poterla modificare avrai comunque bisogno degli appropriati trigger. Save results Salva risultati Save the results view Salva i risultati della vista This button lets you save the results of the last executed query Questo pulsante ti permette di salvare i risultati dell'ultima query eseguita Find text in SQL editor Trova testo nell'editor SQL Find text in SQL editor [Ctrl+F] Trova testo nell'editor SQL [Ctrl+F] This button opens the search bar of the editor Questo pulsante apre la barra di ricerca dell'editor Ctrl+F Ctrl+F Find or replace text in SQL editor Trova e/o sostituisci testo nell'editor SQL Find or replace text in SQL editor [Ctrl+H] Trova e/o sostituisce il testo nell'editor SQL [Ctrl+H] This button opens the find/replace dialog for the current editor tab Questo pulsante apre la finestra di ricerca/sostituzione testo per la scheda corrente dell'editor Export to &CSV Esporta in &CSV Save as &view Salva come &vista Save as view Salva come vista Hide column(s) Nascondi colonna(e) Hide selected column(s) Nasconde la(e) colonna(e) selezionata(e) Show all columns Mostra tutte le colonne Show all columns that were hidden Mostra tutte le colonne nascoste Shows or hides the Project toolbar. Mostra o nasconde la barra degli strumenti di progetto. Extra DB Toolbar Barra degli strumenti DB estesa Export the filtered data to CSV Esporta i dati filtrati in CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Questo pulsante esporta i dati della tabella così come visualizzati (applicando filtri, formati e ordine delle colonne) in un file CSV. Save the current filter, sort column and display formats as a view Salva il filtro corrente, ordine colonne e formati dati come vista This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Questo pulsante salva le impostazioni della tabella visualizzata (filtri, formati e ordine colonne) in una vista SQL che puoi successivamente navigare o utilizzare in statement SQL. Insert Values... Inserisci Valori... Open a dialog for inserting values in a new record Apre una finestra per l'inermento di valori all'interno di un nuovo record Insert new record using default values in browsed table Inserisce un nuovo record utilizzando i valori di default della tabella New In-&Memory Database Nuovo Database In &Memoria Drag && Drop Qualified Names Trascina && Rilascia Nomi Qualificati Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Usa nomi qualificati (es. "Table"."Campo") quando trascini gli oggetti e li rilasci all'interno dell'editor Drag && Drop Enquoted Names Trascina && Rilascia Nomi Quotati Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor Usa gl'identificatori di citazione (es. "Tabella1") quando trascini e rilasci gli oggetti nell'editor &Integrity Check Controllo &Integrità Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. Avvia il controllo integrità (integrity check pragma) sul database aperto e riporta il risultato nella scheda "Esegui SQL". Questa operazione esegue un controllo d'integrità sull'intero database. &Foreign-Key Check Controlla Chiave &Esterna Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab Avvia il controllo chiavi esterne (foreign_key_check pragma) nel database aperto e riporta il risultato nella scheda "Esegui SQL" &Quick Integrity Check Controllo Integrità &Veloce Run a quick integrity check over the open DB Avvia un controllo veloce d'integrità sul DB aperto Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. Avvia un controllo veloce d'integrità (quick_check pragma) sul database e riporta il risultato nella scheda "Esegui SQL". Quest comando esegue la maggiorparte dei controlli d'integrità del controllo completo, ma in modo molto più veloce. &Optimize &Ottimizza Attempt to optimize the database Prova ad ottimizzare il database Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Avvia l'ottimizzazione del database aperto. Questa operazione potrebbe eseguire delle ottimizzazione che miglioreranno le performance delle query future. Print Stampa Print text from current SQL editor tab [Ctrl+P] Stampa il testo della scheda editor SQL [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Apre una finetra per la stampa del testo nella scheda dell'editor SQL Print the structure of the opened database [Ctrl+P] Stampa la struttura del database aperto [Ctrl+P] Open a dialog for printing the structure of the opened database Apre una finestra per la stampa della struttura del database aperto Ctrl+P Ctrl+P Ctrl+Return Ctrl+Invio Ctrl+L Ctrl+L Ctrl+D Ctrl+I Ctrl+E Encrypted Criptato Database is encrypted using SQLCipher Il database è stato criptato utilizzando SQLCipher Read only Sola lettura Database file is read only. Editing the database is disabled. Il file di database è in sola lettura. Le modifiche al database sono disabilitate. Database encoding Codifica Database Choose a database file Seleziona un file di database Could not open database file. Reason: %1 Impossibile aprire il file di database. Motivo: %1 Choose a filename to save under Seleziona un nome file per il salvataggio In-Memory database Database In-Memoria Error deleting record: %1 Errore eliminando le righe: %1 Please select a record first Si prega di selezionare prima un record determining row count... determino il numero di righe... %1 - %2 of >= %3 %1 - %2 di >= %3 %1 - %2 of %3 %1 - %2 di %3 There is no database opened. Please open or create a new database file. Non c'è un database aperto. Si prega di aprire o creare un nuovo file di database. Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Sei sicuro di voler eliminare la tabella '%1'? Tutti i dati associati alla tabella andranno perduti. Are you sure you want to delete the view '%1'? Sei sicuro di voler eliminare la vista '%1'? Are you sure you want to delete the trigger '%1'? Sei sicuro di voler eliminare il trigger '%1'? Are you sure you want to delete the index '%1'? Sei sicuro di voler eliminare l'indice '%1'? Error: could not delete the table. Errore: impssibile eliminare la tabella. Error: could not delete the view. Errore: impossibile eliminare la vista. Error: could not delete the trigger. Errore: impossibile eliminare il trigger. Error: could not delete the index. Errore: impossibile eliminare l'indice. Message from database engine: %1 Messaggio dal database: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? Per modificare la tabella bisogna salvare tutte le modifiche pendenti. Sei sicuro di voler salvare il database? Error checking foreign keys after table modification. The changes will be reverted. Errore nel controllo delle chiavi esterne dopo le modifiche alla tabella. Le modifiche saranno eliminate. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. Questa tabella non ha passato il controllo sulle chiavi esterne.<br/>Dovresti avviare 'Strumenti | Controllo Chiavi Esterne' e correggere i problemi riportati. -- EXECUTING SELECTION IN '%1' -- -- ESEGUO LA SELEZIONE IN '%1' -- -- EXECUTING LINE IN '%1' -- -- ESEGUO LINEA IN '%1' -- -- EXECUTING ALL IN '%1' -- -- ESEGUO TUTTO IN '%1' -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Impostare i valori PRAGMA o pulizia chiuderanno la transazione corrente. Sei sicuro? At line %1: Alla riga %1: Result: %2 Risultato: %2 Extensions(*.so *.dylib *.dll);;All files(*) Estensioni(*.so *.dylib *.dll);;Tutti i files(*) Execution aborted by user Esecuzione terminata dall'utente executing query query in esecuzione %1 rows returned in %2ms %1 righe ritornate in %2ms , %1 rows affected , %1 righe modificate query executed successfully. Took %1ms%2 query eseguita con successo. Impiegati %1ms%2 -- At line %1: %4 -- Result: %3 -- Alla riga %1: %4 -- Risultato: %3 Choose text files Seleziona i file di testo Text files(*.csv *.txt);;All files(*) File di testo(*.csv *.txt);;Tutti i files(*) Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Errore nel salvataggio del database. Questo significa che non tutte le modifiche del database sono state salvate. Avrai bisogno di risolvere prima il seguente errore. %1 Are you sure you want to undo all changes made to the database file '%1' since the last save? Sei sicuro di voler annullare tutte le modifiche effettuate al database '%1' dall'ultimo salvataggio? Choose a file to import Seleziona un file da importare Text files(*.sql *.txt);;All files(*) File di testo(*.sql *.txt);;Tutti i files(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. Vuoi creare un nuovo file di database per mantenere i dati importati? Se rispondi di no proveremo ad importare i dati del file SQL all'interno del database corrente. File %1 already exists. Please choose a different name. Il file %1 esiste già. Si prega di scegliere un nome differente. Error importing data: %1 Errore nell'importazione: %1 Import completed. Some foreign key constraints are violated. Please fix them before saving. Importaizone completata. Alcuni vincoli per le chiavi esterne non sono rispettati. Si prega di correggerli prima di salvare. Import completed. Import completato. Delete View Elimina Vista Modify View Modifica Vista Delete Trigger Elimina Trigger Modify Trigger Modifica Trigger Delete Index Elimina Indice Modify Index Modifica Indice Modify Table Modifica Tabella &%1 %2 &%1 %2 Setting PRAGMA values will commit your current transaction. Are you sure? Impostare i valori di PRAGMA chiuderà la transaione corrente. Sei sicuro? Select SQL file to open Selezionare il file SQL da aprire Couldn't read file: %1. Impossibile leggere il file: %1. Couldn't save file: %1. Impossibile salvare il file: %1. Select file name Seleziona il nome del file Select extension file Seleziona l'estensione del file Extension successfully loaded. Estensione caricata con successo. Error loading extension: %1 Errore nel caricamento dell'estensione: %1 Don't show again Non mostrare di nuovo New version available. Nuova versione disponibile. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Una nuova versione di DB Browser for SQLite è disponibile (%1.%2.%3).<br/><br/>Si prega di scaricarla da <a href='%4'>%4</a>. Choose a project file to open Seleziona un file di progetto da aprire DB Browser for SQLite project file (*.sqbpro) File di progetto DB Browser for SQLite (*.sqbpro) This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Questo file di progetto utilizza un vecchio formato poiché è stato creato con la versione 3.10 o antecedente. Il caricamento di questo formato è ancora supportato, ma ti suggeriamo di convertire tutti i tuoi files di progetto al nuovo formato poiché il supporto ai formati precedenti potrebbe essere eliminato in futuro. Puoi convertire i tuoi file semplicemente aprendoli e salvandoli nuovamente. Duplicate records Duplica i records Duplicate record Duplica il record Ctrl+" Please choose a new encoding for all tables. Si prega di scegliere una nuova codifica per tutte le tabelle. Please choose a new encoding for this table. Si prega di scegliere una nuova codifica per questa tabella. %1 Leave the field empty for using the database encoding. %1 Lasciare il campo vuoto per utilizzare la codifica del database. This encoding is either not valid or not supported. Questa codifica non è valida o non è supportata. Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Si prega d'inserire una pseudo-chiave primaria in modo da abilitare le modifiche su questa vista. Deve corrispondere al nome di una colonna univoca nella vista. Collation needed! Proceed? Necessario confronto! Procedo? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Una tabella di questo database richiede una funzione di confronto speciale '%1' che questa applicazione non può fornire senza ulteriori informazioni. Se scegli di proseguire, sappi che potrebbero generarsi problemi nel tuo database. Crea un backup! creating collation creo confronto Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Imposta un nuovo nome per la scheda SQL. Usa il carattere '&&' per utilizzare il carattere succesivo come scorciatoia da tastiera. Please specify the view name Si prega di specificare il nome della vista There is already an object with that name. Please choose a different name. Esiste già un oggetto con quel nome. Si prega di scegliere un nome diverso. View successfully created. Vista creata con successo. Error creating view: %1 Errore nella creazione della vista: %1 There is no filter set for this table. View will not be created. Non c'è filtro impostato per questa tabella. La vista non sarà creata. Delete Records Elimina i Records This action will open a new SQL tab for running: Questa azione aprirà una nuova scheda SQL per eseguire: Press Help for opening the corresponding SQLite reference page. Premi Aiuto per aprire la pagina di riferimento SQLite corrispondente. NullLineEdit Set to NULL Imposta a NULL Alt+Del Alt+Canc PlotDock Plot Grafico <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> <html><head/><body><p>Questo pannello mostra la lista delle colonne della tabella corrente o della query eseguita. Puoi selezionare la colonna che vuoi utilizzare come asse X o Y per il grafico sottostante. La tabella mostra i tipi d'asse rilevati. Per l'asse Y puoi selezionare solo colonne numeriche, ma per l'asse X potrai selezionare:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Data/Ora</span>: stringhe col formato &quot;aaaa-MM-gg hh:mm:ss&quot; o &quot;aaaa-MM-ggThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Data</span>: stringhe col formato &quot;aaaa-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Orario</span>: stringhe col formato &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Etichette</span>: altri formati di stringa. Selezionando queste colonne come X verrà visualizzato un grafico a barre</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeri</span>: interi or valori reali</li></ul><p>Cliccando due volte sulle celle Y potrai cambiare il colore utilizzato per il grafico.</p></body></html> Columns Colonne X Y Axis Type Tipo asse Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Qui compare il grafico quando vengono selezionati i valori x e y. Clicca s'un punto per selezionarl sul grafico e nella tabella. Ctrl+Click per selezionare un intervallo di punti. Usa la rotella del mouse per ingrandire e trascina col mouse per cambiare l'intervallo degli assi. Seleziona le etichette dell'asse o degli assi per trascinare o ingrandire solo in quella direzione. Line type: Tipo linea: None Nessuna Line Linea StepLeft Salto sinistro StepRight Salto destro StepCenter Salto centrato Impulse Impulso Point shape: Tipo punta: Cross Croce Plus Più Circle Cerchio Disc Disco Square Quadrato Diamond Rombo Star Stella Triangle Triangolo TriangleInverted Triangolo inverso CrossSquare Croce quadrato PlusSquare Più quadrato CrossCircle Croce cerchio PlusCircle Più cerchio Peace Pace <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Salva il grafico corrente...</p><p>Formato file selezionato dall'estensione (png, jpg, pdf, bmp)</p></body></html> Save current plot... Salva il grafico corrente... Load all data and redraw plot Carica tutti i dati e ridisegna grafico Copy Copia Print... Stampa... Show legend Mostra legenda Stacked bars Barre impilate Date/Time Data/Ora Date Data Time Ora Numeric Numerico Label Etichetta Invalid Invalido Row # Riga # Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Carica tutti i dati e ridisegna grafico. Attenzione: non sono ancora stati recuperati tutti i dati dalla tabella a causa del meccanismo di recupero. Choose an axis color Scegli il colore per l'asse Choose a filename to save under Scegli il nome di salvataggio PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. Ci sono delle curve in questo grafico e lo stile di line selezionato può essere applicato solo a grafici ordinati per X. Riordina la tabella o seleziona per X per rimuovere le curve o seleziona uno degli stili supportati dalle curve: Nessuno o Linea. PreferencesDialog Preferences Preferenze &General &Generale Default &location &Posizione di default Remember last location Ricorda l'ultima posizione Always use this location Usa sempre questa posizione Remember last location for session only Ricorda l'ultima posizione solo per questa sessione ... Lan&guage Lin&gua Toolbar style Stile barra degli strumenti Only display the icon Mostra solo le icone Only display the text Mostra solo il testo The text appears beside the icon Mostra il testo a lato delle icone The text appears under the icon Mostra il testo sotto le icone Follow the style Segui lo stile Show remote options Mostra opzioni remote enabled abilitato Automatic &updates Aggiornamenti a&utomatici DB file extensions Estensioni file DB Manage Gestisci &Database Database &encoding &Codifica Database Open databases with foreign keys enabled. Apri database contenenti chiavi esterne. &Foreign keys Chiavi &Esterne Remove line breaks in schema &view Rimuovi a-capo nella &vista dello schema When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Quando abilitato, vengono rimossi gli a-capo nella colonna dello Schema del tab "Struttura DB", dock e stampa. Prefetch block si&ze &Dimensione blocco di prefetch Advanced Avanzate SQ&L to execute after opening database SQ&L da eseguire dopo aver aperto il database Default field type Tipo di campo di default Data &Browser Font &Font Font si&ze Dimensione te&sto Content Contenuto Symbol limit in cell Limite simboli nella cella This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Questo è il numero massimo di righe in una tabella per abilitare il completamento dei valori basandosi su quelli attualmente nella colonna. Può essere impostato a 0 per disabilitare il completamento. Row count threshold for completion Numero massimo di righe per l'autocompletamento Field display Visualizzazione campi Displayed &text &Testo visualizzato Binary Binario NULL Regular Normale Text color Colore del testo Background color Colore dello sfondo Preview only (N/A) Solo anteprima (N/A) Filters Filtri Escape character Carattere di escape Delay time (&ms) Ritardo (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. Imposta il tempo d'attesa prima che un nuovo filtro venga applicato. Può essere impostato a 0 per disabilitare l'attesa. &SQL &SQL Settings name Nome impostazioni Context Contesto Colour Colore Bold Grassetto Italic Corsivo Underline Sottolinea Keyword Parola chiave Function Funzione Table Tabella Comment Commento Identifier Identificatore String Stringa Current line Linea corrente Background Sfondo Foreground Primo piano SQL editor &font &Font editor SQL SQL &editor font size Dimensione font &editor SQL SQL &results font size Dimensione font &risultati SQL Tab size Dimensione tabulazione &Wrap lines &A-capo automatico Never Mai At word boundaries Al limite della parola At character boundaries Al limite del carattere At whitespace boundaries Al limite del carattere vuoto &Quotes for identifiers Identificatori per &citazioni Choose the quoting mechanism used by the application for identifiers in SQL code. Scegli il tipo meccanismo di citazione utilizzato per il codice SQL. "Double quotes" - Standard SQL (recommended) "Doppie virgolette" - Standard SQL (raccomandato) `Grave accents` - Traditional MySQL quotes `Apice inverso` - Citazione tradizionale MySQL [Square brackets] - Traditional MS SQL Server quotes [Parentesi quadre] - Citazione tradizionale MS SQL Server Code co&mpletion Auto co&mpletamento Keywords in &UPPER CASE Parole chiave &MAIUSCOLE When set, the SQL keywords are completed in UPPER CASE letters. Quando impostato, le parole chiave vengono completate in MAIUSCOLO. Error indicators Indicatori d'errore When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background Quando impostato, le righe di codice SQL che causano errori durante l'ultima esecuzione sono evidenziate e il campo del risultato indica l'errore sullo sfondo Hori&zontal tiling Affianca &orizzontalmente If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Se abilitato l'editor di codice SQL e la tabella del risultato sono mostrate una accanto all'altra anzichè una sopra l'altra. &Extensions &Estensioni Select extensions to load for every database: Seleziona le estensioni da caricare per ogni database: Add extension Aggiungi estensione Remove extension Rimuovi estensione <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>Anche se SQLite supporta l'operatore REGEXP non implementa alcun algoritmo<br/>di espressione regolare, ma richiama l'applicativo in esecuzione. DB Browser for SQLite implementa questo<br/>algoritmo per te per permetterti di usare le REGEXP immediatamente. Ci sono però multiple implementazioni<br/>possibili e potresti voler utilizzare una o l'altra, sei libero di disabilitare l'implementazione<br/>dell'applicativo e caricare la tua utilizzando un'estensione. Richiede il riavvio dell'applicativo.</p></body></html> Disable Regular Expression extension Disabilita l'estensione per l'Espressione regolare <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> <html><head/><body><p>SQLite fornisce una funzione SQL per il cariamento di estensioni da una libreria dinamica condivisa. Attiva questa opzione se vuoi utilizzare la funzione<span style=" font-style:italic;">load_extension()</span> dal codice SQL.</p><p>Per motivi di sicurezza, il caricamento delle estensioni è disabilitato di default e dev'essere abilitato tramite questa impostazione. Puoi sempre caricare le estensioni attraverso l'interfaccia grafica, anche se quest'opzione è disabilitata.</p></body></html> Allow loading extensions from SQL code Permetti il caricamento di estensioni dal codice SQL Remote Remoto CA certificates Certificati CA Subject CN Soggetto CN Common Name Nome comune Subject O Soggetto O Organization Organizzazione Valid from Valido dal Valid to Valido al Serial number Numero di serie Your certificates Tuo certificato File File Subject Common Name Nome comune del soggetto Issuer CN CN emittente Issuer Common Name Nome comune emittente Clone databases into Clona il database in Choose a directory Seleziona una cartella The language will change after you restart the application. La lingua verrà modificata dopo il riavvio dell'applicativo. Select extension file Seleziona il file d'estensione Extensions(*.so *.dylib *.dll);;All files(*) Estensioni(*.so *.dylib *.dll);;Tutti i files(*) Import certificate file Importa il file di certificato No certificates found in this file. Nessun certificato trovato in questo file. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Sei sicuro di voler rimuovere questo certificato? Tutti i dati del certificato saranno eliminati dalle impostazioni dell'applicativo! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. Sei sicuro di voler pulire tutte le impostazioni salvate? Tutte le tue preferenze andranno perse e verranno utilizzati i valori predefiniti. QObject All files (*) Tutti i files (*) Error importing data Errore nell'import dei dati from record number %1 dalla riga numero %1 . %1 . %1 Importing CSV file... Importa file CSV... Cancel Annulla SQLite database files (*.db *.sqlite *.sqlite3 *.db3) File database SQLite (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 Errore nella connessione a %1. %2 Error opening remote file at %1. %2 Errore aprendo il file remoto a %1. %2 Error: Invalid client certificate specified. Errore: specificato certificato invalido per il client. Please enter the passphrase for this client certificate in order to authenticate. Si prega d'inserire la passphrase per questo certificato di client in modo da permetterne l'autenticazione. Cancel Annulla Uploading remote database to %1 Carico il database remoto in %1 Downloading remote database from %1 Scarico il database remoto da %1 Error: The network is not accessible. Errore: Rete non disponibile. Error: Cannot open the file for sending. Errore:Impossibile aprire il file per l'invio. Error opening local databases list. %1 Errore nell'apertura della lista di database locale. %1 Error creating local databases list. %1 Errore nella creazione della lista di database locale. %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. Il database remoto è stato aggiornato dall'ultima verifica. Vuoi aggiornare la copia locale del database alla versione più recente? Nota che questo eliminerà tutte le modifiche che puoi aver effettuato localmente! Se non vuoi perdere le modifiche locali, clicca su "No" per aprire la versione locale. RemoteDock Remote Remoto Identity Identità Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Collega al server remoto utilizzando l'identità selezionata. Il server corretto è scelto anch'esso dall'identità. Go Vai Push currently opened database to server Invia il database corrente al server <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> <html><head/><body><p>In questo pannello si possono aggiungere a DB4S i database remoti del sitoi dbhub.io.Prima hai bisogno di un'identità:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Accedi al sito dbhub.io (usa le tue credenziali GitHub o quelle che preferisci)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Clicca il pulsante per creare un certificato DB4S (sarà la tua identità). Questo ti creerà un file di certificato (salvandolo sul tuo disco locale).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Vai al tab "Remoto" nelle preferenze di DB4S. Clicca il pulsante per aggiungere un nuovo certificato a DB4S e scegli il file di certificato appena scaricato.</li></ol><p>Ora il pannello "Remoto" mostra la tua identità e puoi aggiungere dei database remoti.</p></body></html> RemoteModel Name Nome Commit Commit Last modified Ultima modifca Size Dimensione bytes bytes RemotePushDialog Push database Invia database Database na&me to push to No&me del database a cui inviare Commit message Messaggio di commit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Licenza database Public Pubblico Branch Branch Force push Forza invio Database will be public. Everyone has read access to it. Il database sarà pubblico. Chiunque potrà accedere in lettura. Database will be private. Only you have access to it. Il database sarà privato. Solo tu potrai accedervi. Use with care. This can cause remote commits to be deleted. Usa con cautela. Questo può eliminare dei commit remoti. Unspecified Non specificato SqlExecutionArea Form Find previous match [Shift+F3] Trova corrispondenza precedente [Shift+F3] Find previous match with mapping Trova la corrispondenza precedente con reinizio Shift+F3 The found pattern must be a whole word Il pattern trovato deve essere una parola intera Whole Words Parole intere Text pattern to find considering the checks in this frame Il pattern da cercare considerando le spunte in quest'area Find in editor Trova nell'editor The found pattern must match in letter case Il patter trovato deve corrispondere esattamente (maiuscole/minuscole) incluse Case Sensitive Case Sensitive Find next match [Enter, F3] Trova la prossima corrispondenza [Invio, F3] Find next match with wrapping Trova la prossima corrispondenza con reinizio F3 Interpret search pattern as a regular expression Interpreta il pattern di ricerca come un'espressione regolare <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>Quando selezionato, la stringa del testo viene interpretata come una RegExp Unix. Vedi <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Espressioni regolari su Wikibooks (in inglese)</a>.</p></body></html> Regular Expression Espressione regolare Close Find Bar Chiudi la barra di ricerca <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> <html><head/><body><p>Risultati degli ultimi statements eseguiti.</p><p>Potresti voler rimpicciolire questo pannello e usare la casella <span style=" font-style:italic;">SQL Log</span> con la selezione dell'<span style=" font-style:italic;">Utente</span>.</p></body></html> Results of the last executed statements Risultato degli 'ultimi statement eseguiti This field shows the results and status codes of the last executed statements. Questo campo mostra i risultati e i codici di stato degli ultimi statements eseguiti. SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. (X) La funzione abs(X) ritorna il valore assoluto dell'argomento numerico X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. () La funzione changes() ritorna il numero delle righe di database che sono state modificate o inserite o eliminate dallo statement INSERT, DELETE o UPDATE più recente. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1, X2,...) La funzione char(X1,X2,...,XN) ritorna una stringa composta dai caratteri unicode rappresentati dai valori interi da X1 a XN. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y,...) La funzione coalesce(X,Y,...) ritorna una copia del suo primo argomento non NULL oppure NULL se tutti gli argomenti sono NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) La funzione glob(X,Y) è equivalente all'espressione "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) La funzione ifnull(X,Y) ritorno una copia del suo primo argomento non NULL o NULL se entrambi gli argomenti sono NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X,Y) La funzione intstr(X,Y) trova la prima occorrenza della stringa Y all'interno della stringa X e ritorna il numero dei caratteri precedenti più 1 o 0 se Y non si trova all'interno di X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) La funzione hex() interpreta i suoi argomenti come un BLOB e ritorna una stringa corrispondente al rendering esadecimale maiuscolo del contenuto di quel blob. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. () La funzione last_insert_rowid() ritorna il ROWID dell'ultima riga inserita nella connessione database che ha invocato la funzione. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X) La funzione lenght(X) ritorna per una stringa X, il numero di caratteri (non bytes) di X prima del primo carattere NUL. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y) La funzione like(X,Y) è utilizzata per implementare l'espressione "Y LIKE X". (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X,Y,Z) La funzione like(X,Y,Z) è utilizzata per implementare l'espressione "Y LIKE X ESCAPE Z". (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X) La funzione load_extension(X) carica l'estensione SQLite da un file di libreria condivisa di nome X. L'utilizzo di questa funzione dev'essere permesso tramite le Preferenze. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X,Y) La funzione load_extension(X,Y) carica un'estensione SQLite da un file di libreria condivisa di nome X utilizzando il punto d'ingresso Y. L'utilizzo di questa funzione dev'essere permesso tramite le Preferenze. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) La funzione lower(X) ritorna una copia della stringa X con tutti i caratteri ASCII convertiti in minuscolo. (X) ltrim(X) removes spaces from the left side of X. (X) La funzione ltrim(X) rimuove gli spazi dal lato sinistro di X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y) La funzione ltrim(X,Y) ritorna una stringa formata rimuovendo tutti i caratteri che compaiono in Y dal lato sinistro di X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) La funzione multi-argomento max(X,Y,...) ritorna l'argomento con valore massimo o ritorna NULL se tutti gli argomenti sono NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) La funzione multi-argomento min(X,Y,...) ritorna l'argomento con valore minore o NULL se tutti gli argomenti sono NULL. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (X,Y) La funzione nullif(X,Y) ritorna il primo argomento se gli argomenti sono diversi e NULL se gli argomenti sono uguali. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (FORMAT,...) La funzione SQL printf(FORMAT,...) si comporta come la funzione del linguaggio C sqlite3_mprintf() e la funzione printf() della libreria standard C. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. (X) La funzione quote(X) ritorna il testo di un literale SQL il cui valore può essere incluso in uno statement SQL. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. () La funzione random() ritorna un numero intero pseudo-casuale tra -9223372036854775808 e +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (N) La funzione randomblob(N) ritorna un blob di N-bytes contenenti dati pseudo-casuali. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X,Y,Z) La funzione replace(X,Y,Z) ritorna una striga formata sostituendo la stringa Z in ogni occorrenza della stringa Y nella stringa X. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X) La funzione round(X) ritorna un valore in virgola mobile X arrotondato a 0 cifre decimali. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X,Y) La funzione round(X,Y) ritorna un numero in virgola mobile X arrotondato a Y cifre decimali. (X) rtrim(X) removes spaces from the right side of X. (X) La funzione rtrim(X) rimuove gli spazi dalla destra di X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X,Y) La funzione rtrim(X,Y) ritorna una stringa formata rimuovendo tutti i caratteri che compaiono in Y dal lato destro di X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X) La funzione soundex(X) ritorna una stringa che rappresenta la codifica soundex della stringa X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y) La funzione substr(X,Y) ritorna tutti i caratteri dalla fine della stringa X iniziando dall'Y-esimo. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. (X,Y,Z) La funzione substr(X,Y,Z) ritorna una sotto-stringa di X che inizia dal carattere Y-esimo e lunga Z caratteri. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. () La funzione total_changes() ritorna il numero di righe modificate da INSERT, UPDATE o DELETE dall'apertura della connessione al database. (X) trim(X) removes spaces from both ends of X. (X) La funzione trim(X) rimuove gli spazi da entrambi i lati di X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X,Y) La funzione trim(X,Y) ritorna una stringa formata rimuovendo tutti i caratteri che compaiono in Y da entrambi i termini di X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) La funzione typeof(X) ritorna una stringa che indica il tipo di dato dell'espressione X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) La funzione unicode(X) ritorna il valore numerico in unicode corrispondente al primo carattere della stringa X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (X) La funzione upper(X) ritorna una copia della stringa X in cui tutti i caratteri minuscoli ASCII sono stati converiti in maiuscolo. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (N) La funizione zeroblob(N) ritorna un BLOB di N byte di 0x00. (timestring,modifier,modifier,...) (stringa data,modificatore,modificatore,...) (format,timestring,modifier,modifier,...) (formato,stringa data-ora,modificatore,modificatore,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) La funzione avg(X) ritorna il valore medio di tutti gli X non-NULL in un gruppo. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) La funzione count(X) ritorna il numero di volte che X non è NULL in un gruppo. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X) La funzione group_concat(X) ritorna una stringa rappresentante la concatenazione di tutti i valori di X non-NULL. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X,Y) La funzione group_concat(X,Y) ritorna una stringa rappresentate la concatenazione di tutti i valori di X non-NULL. Se il parametro Y è presente allora è utilizzato come separatore tra le istanze di X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) La funzione aggregata max(X) ritorna il valore massimo di tutti i valori nel gruppo. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) La funzione aggregata min(X) ritorna il minore non-NULL tra tutti i valori del gruppo. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) Le funzioni aggregate sum(X) e total(X) ritornano la somma di tutti i valori non-NULL nel gruppo. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () Il numero di righe all'interno della partizione corrente. Le righe sono numerate partendo da 1 nell'ordine definito dalla clausula ORDER BY nella finestra definizione, o altrimenti in ordine arbitrario. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Il row_number() del primo peer in ogni gruppo - il rango della riga corrente con intervalli. Se non ci sono clausule ORDER BY, allora tutte le righe sono considerate peer e questa funzione ritorna 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Il numero di peer nel gruppo della riga corrente all'interno della sua partizione - il rango della riga corrente senza intervalli. Le partizioni sono numerate a partire da 1 nell'ordine definito dalla clausula ORDER BY nella finestra definizione. Se non ci sono clausule ORDER BY allora tutte le righe sono considerate peer e questa funzione ritorna 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () A dispetto del nome, questa funzione ritorna sempre un valore tra 0.0 e 1.0 uguale a (rango - 1)/(righe della partizione - 1), dove rango è il valore ritornato dalla funzione interna rank() e le "righe della partizione" sono il numero di righe nella partizione. Se la partizione contiene solo una riga, questa funzione ritorna 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. () La distribuzione cumulativa. Calcolata come "numero di righe"/"righe della partizione", dove "numero di righe" è il valore ritornato dalla funzione row_number() per l'utimo peer nel gruppo. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (N) L'argomento N è gestito come valore intero. Questa funzione divide la partizione in N gruppi il più uniformemente possibile e assegna un'intero tra 1 e N ad ogni gruppo, nell'ordine definito dalla clausula ORDER BY o altrimenti in ordine arbitrario. Se necessario i gruppi più grandi compariranno per primi. Questa funzione ritorna il valore intero assegnato al gruppo di cui fa parte la riga corrente. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr) Ritorna il risultato della valutazione dell'espressione expr sulla riga precedente della partizione o, se non esiste una riga precedente (perché la riga è la prima), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr, offset) Se l'argomento offset viene fornito, allora dev'essere un intero non negativo. In questo caso il valore ritornato è il risultato della valutazione dell'espressione expr sulla riga "offset" posizioni antecedente nella partizione. Se offset è 0 allora expr viene valutata sulla riga corrente. Se non ci sono offset righe antecedenti viene ritornato NULL. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr,offset,default) Se viene fornito anche default, allora viene ritornato al posto di NULL se la riga identificata da offset non esiste. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr) Ritorna il risultato della valutazione dell'espressione expr con la riga successiva nella partizione o, se non c'è una riga successiva (perché la riga corrente è l'utlima) NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr,offset) Se viene fornito l'argomento offset, dev'essere un intero non negativo. In questo caso il valore ritornato è il risultato della valutazione dell'espressione expr sulla riga "offset" posizioni successiva a quella corrente nella partizione. Se offset è 0, allora expr viene valutata sulla riga corrente. Se non c'è una riga "offset" posizioni successive, NULL viene restituito. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) Questa funzione interna calcola la cornice della finestra di ciascuna riga allo stesso modo di una funzione finestra aggregata. Ritorna il valore della valutazione di expr sulla prima riga nella cornice della finestra per ciascuna riga. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr) Questa funzione interna calcola la cornice della finestra per ciascuna riga allo stesso modo della funzione finestra aggregata. Ritorna il valore dell'espressione expr valutata sull'ultima riga della cornice della finestra per ciascuna riga. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. (expr,N) Questa funzione interna calcola la cornice della finestra per ciascuna riga allo stesso modo della funzione aggregata finestra. Ritorna il valore della valutazione dell'espressione expr sulla riga N della cornice della finestra. Le righe sono numerate dalla cornice della finestra partendo da 1 nell'ordine definito dalla clausula ORDER BY se presente o in modo arbitrario. Se non esiste la riga Nesima nella partizione, viene ritornato NULL. SqliteTableModel reading rows leggo le righe loading... caricamento... References %1(%2) Hold %3Shift and click to jump there Riferimenti %1(%2) Tieni premuto %3Shift e clicca per saltare lì Error changing data: %1 Errore nella modifica dei dati: %1 retrieving list of columns recupero la lista delle colonne Fetching data... Recupero dati... Cancel Annulla VacuumDialog Compact Database Compatta Database Warning: Compacting the database will commit all of your changes. Attenzione: Compattare il database salverà tutte le tue modifiche. Please select the databases to co&mpact: Si prega di selezionare il database da co&mpattare: sqlitebrowser-3.11.2/src/translations/sqlb_ko_KR.qph000066400000000000000000000206211345112435200225540ustar00rootroot00000000000000 file 파일 version 버전 invalid 잘못된 option 옵션 argument 매개변수 filter 필터 import 가져오기 export 내보내기 column 필드 first 최초, 처음 line field 필드 separator 구분자 tab encoding 인코딩 trim 앞뒤 공백제거 insert 추가하기 data 데이터 cancel 취소 already 이미 table 테이블 record 레코드 row execute 실행하다 browse 보다 view index 인덱스 indice 인덱스 application 애플리케이션 order 정렬순서 unique 유니크 name 이름 create 생성하기 error 에러 pragma pragma executing 실행중 unknown 알 수 없는 object 객체 type 타입 SQL SQL action 실행 database 데이터베이스 warning 주의 compact 용량 줄이기 preferences 환경설정 enable 사용하기 language 언어 automatic 자동 update 업데이트 default 기본 default 기본값 location 위치 foreign key 외래키 colour 색깔 general 일반 open 열다 setting 설정 bold 볼드 italic 이탤릭 underline 밑줄 enabled 사용하기 setting 설정 tables 테이블 updates 업데이트 update 업데이트 browser 보기 log 로그 logs 로그 editor 편집기 font 폰트 size 크기 string 문자열 comment 주석 current 현재 identifier 식별자 function 함수 function 기능 keyword 키워드 extension 확장기능 select 선택하다 choice 고르다 disable 사용하지않기 directory 디렉토리 all files 모든 파일 information 정보 view show 보기 user 사용자 clear 지우기 edit 편집 help 도움말 columns 필드 DB Browser for SQLite DB Browser for SQLite usage 사용법 db 데이터베이스 command line 커맨드라인 arguments 옵션 argument 옵션 page 페이지 encryption 암호화 SQLCipher SQLCipher process 작업 savepoint 세이브포인트 failed 실패했습니다 aborting 취소 attache 합치다 associated 연관된 cell 데이터 값 name 필드명 sqlitebrowser-3.11.2/src/translations/sqlb_ko_KR.ts000066400000000000000000011661151345112435200224240ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite ~에 대하여.. 보다는 ~~ 정보 라는 표현을 요즘에 많이 사용함. DB Browser for SQLite 정보 Version 버전 <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite(줄여서 DB4S)는 오픈소스, 프리웨어로 SQLite 데이터베이스 파일들을 생성, 설계하고 수정을 하기위한 비주얼 툴입니다.</p><p>이 프로그램은 이중 라이센스로 Mozilla Public License Version 2과 GNU General Public License Version 3 또는 그 이후 버전을 따릅니다. 따라서 이 프로그램은 이 라이센스를 충족하는 범위 내에서 수정하고 재배포 할 수 있습니다.</p><p>자세한 사항은 <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a>과 <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a>를 참고하기 바랍니다. </p><p>이 프로그램에 대한 좀 더 자세한 정보는 우리 웹사이트에서 확인할 수 있습니다: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">이 소프트웨어는 GPL/LGPL Qt Toolkit을 사용합니다.</span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>라이센스 사항과 정보는 </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;">를 참고하기 바랍니다.</span></p><p><span style=" font-size:small;">또한 이 프로그램은 Mark James의 Silk icon set을 Creative Commons Attribution 2.5와 3.0 라이센스 아래에서 사용하고 있습니다.<br/> 자세한 정보는 </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;">를 참고하기 바랍니다.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite는 오픈소스, 프리웨어 시각화 툴로 SQLite 데이터베이스 파일을 생성하고, 설계하고 수정할 수 있습니다.</p><p>이 프로그램은 두 가지 라이센스를 따르는데 Mozilla Public License Version 2와 GNU General Public License Version 3 또는 그 이후 버전의 라이센스를 따릅니다. 여러분은 이 라이센스 하에서 수정하거나 재배포 할 수 있습니다.</p><p>자세한 내용은 <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> 과 <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> 를 참고하시기 바랍니다.</p><p>이 프로그램에 대한 추가 정보를 알고 싶으시면 우리 웹사이트에 방문하세요: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">이 소프트웨어는 </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;">의 GPL/LGPL Qt Toolkit을 사용합니다.</span><span style=" font-size:small;"><br/>라이센스 조건과 정보는 </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> 에서 보실 수 있습니다.</span></p><p><span style=" font-size:small;">또한 이 프로그램은 Mark James가 제작한 실크 아이콘 세트를 Creative Commons Attribution 2.5와 3.0 버전 라이센스 하에서 사용하고 있습니다.<br/>자세한 것은 </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> 를 참고하세요.</span></p></body></html> (based on SQLite %1) (SQLite %1 버전에 기반) Version 버전 Built for Qt Version Qt 버전 SQLCipher Version SQLCipher 버전 SQLite Version SQLite 버전 AddRecordDialog Add New Record 새 레코드 추가 Enter values for the new record considering constraints. Fields in bold are mandatory. 제약 조건을 고려하여 새 레코드를 위한 값을 입력하세요. 볼드 처리된 필드는 반드시 입력해야 합니다. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. 값 필드에는 이름 필드에 대응하는 값을 입력 할 수 있습니다. 타입 필드는 필드의 타입을 의미합니다. 기본 값은 NULL값과 같은 스타일로 표시됩니다. Name 이름 Type 타입 Value Values to insert. Pre-filled default values are inserted automatically unless they are changed. 추가할 값들입니다. 기본 값들이 미리 입력되어있어 수정하지 않는다면 자동적으로 들어갑니다. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. 위 프레임의 값을 수정하면, 수정사항이 반영된 레코드 추가 SQL쿼리가 여기에 나타납니다. 저장하기 전이라면 직접 쿼리를 수정할 수도 있습니다. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">저장하기</span>은 새 레코드를 데이터베이스에 추가하기 위해 작성되어 나타나 있는 SQL 구문을 반영(submit) 합니다.</p><p><span style=" font-weight:600;">초기값 복원하기</span>는 <span style=" font-weight:600;">값</span> 필드를 초기 값으로 복원합니다.</p><p><span style=" font-weight:600;">취소하기</span>는 쿼리의 실행 없이 이 창을 닫습니다.</p></body></html> Auto-increment 자동 증가(Auti-increment) Unique constraint 유니크 제약 Check constraint: %1 제약 조건: %1 Foreign key: %1 외래키: %1 Default value: %1 기본 값: %1 Error adding record. Message from database engine: %1 레코드 추가에 에러가 발생했습니다. 데이터베이스 엔진 메시지: %1 Are you sure you want to restore all the entered values to their defaults? 정말로 모든 입력한 값들을 초기 값으로 복원합니까? Application Usage: %1 [options] [db] 사용법: %1 [옵션] [데이터베이스] Possible command line arguments: 사용할 수 있는 커맨드라인 매개변수: -h, --help Show command line options -h, --help 커맨드라인 옵션을 보여줍니다 -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [file] 데이터베이스 파일을 연 후에 SQL 파일 내용을 실행합니다 -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [file] 데이터베이스 파일을 연 후 이 SQL 파일을 실행합니다 -t, --table [table] Browse this table after opening the DB -t, --table [table] 데이터베이스 파일을 연 후 이 테이블을 봅니다 -q, --quit Exit application after running scripts -q, --quit 스크립트를 실행한 후에 애플리케이션을 종료합니다 -R, --read-only Open database in read-only mode -R, --read-only 데이터베이스를 읽기전용 모드로 엽니다. -o, --option [group/setting=value] Run application with this setting temporarily set to value -v, --version Display the current version -v, --version 현재 버전을 표시합니다 [file] Open this SQLite database [파일] 지정한 SQLite 데이터베이스 파일을 엽니다 This is DB Browser for SQLite version %1. DB Browser for SQLite 버전 %1%2. {1.?} This is DB Browser for SQLite version %1%2. DB Browser for SQLite 버전 %1%2. The -s/--sql option requires an argument -s/--sql 옵션은 실행할 SQL 파일명을 같이 지정해주어야 합니다 The file %1 does not exist %1 파일이 존재하지 않습니다 The -t/--table option requires an argument -t/--table 옵션의 대상이되는 테이블 명을 써주세요 The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 잘못된 옵션을 사용하였거나/파일이 존재하지 않습니다: %1 CipherDialog SQLCipher encryption SQLCipher 암호화 &Password 암호(&P) &Reenter password 암호 재입력(&R) Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze 페이지 크기(&Z) &KDF iterations HMAC algorithm KDF algorithm Passphrase 암호 Raw key Raw key Page &size 페이지 크기(&S) Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. 데이터베이스를 암호화할 때 사용할 키를 지정해주세요. [주의] 여러분이 추가적인 세팅을 변경한다면, 데이터베이스 파일을 열 때마다 암호를 매번 입력해야합니다. 그러한 불편함을 피하기 위해 암호화를 하지 않으려면 암호 필드를 비워두세요 암호화 작업은 시간이 좀 걸릴 수 있습니다. 그리고 꼭 여러분의 데이터베이스 백업본을 반드시 만들어두세요! 암호화 작업 이전에 한 저장되지 않은 변경 사항도 반영되니 주의하세요. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. 데이터베이스를 암호화기 위해 사용할 키를 다시 입력해주세요. 데이터베이스 파일을 변경하기 위해서는 이 정보를 다시 입력해야만 합니다. ColumnDisplayFormatDialog Choose display format 표시 형식을 선택하세요 Display format 표시 형식 Choose a display format for the column '%1' which is applied to each value prior to showing it. '%1' 컬럼의 표시 형식을 선택하세요 Default 일반 Decimal number 숫자 Exponent notation 지수 Hex blob 이진 데이터 Hex number 16진수 Apple NSDate to date 애플 NSDate 날짜 Java epoch (milliseconds) to date 자바 시간(밀리초)를 날짜로 Julian day to date 날짜 Unix epoch to local time 유닉스 시간(타임스탬프)을 지역 시간으로 Date as dd/mm/yyyy 날짜를 dd/mm/yyyy 형태로 Lower case 소문자 Octal number 8진수 Round number 라운드 수 Unix epoch to date 유닉스 시간(타임스탬프)을 날짜로 Upper case 대문자 Windows DATE to date 윈도우 날짜 Custom 사용자 지정 DBBrowserDB no error 에러 없음 Please specify the database name under which you want to access the attached database 데이터베이스 연결(attach)을 위해 불러올 데이터베이스의 별명을 지정해주세요 Invalid file format 잘못된 파일 포맷입니다 Do you want to save the changes made to the database file %1? %1 데이터베이스 파일을 생성하기 위해 변경사항을 저장하겠습니까? Exporting database to SQL file... 데이터베이스를 SQL 파일로 내보내기 중... Cancel 취소 Executing SQL... SQL 실행중... Action cancelled. 실행 취소되었습니다. Error in statement #%1: %2. Aborting execution. 구문 에러 #%1: %2. 실행이 취소되었습니다. renameColumn: cannot find table %1. 필드이름 변경: %1 테이블을 발견할 수 없습니다. This database has already been attached. Its schema name is '%1'. 이 데이터베이스는 이미 연결되어 있습니다. 스미카 이름은 '%1' 입니다. Do you really want to close this temporary database? All data will be lost. 이 임시 데이터베이스를 닫을까요? 모든 데이터가 사라집니다. The database is currently busy: 이 데이터베이스는 현재 사용중입니다: Do you want to abort that other operation? 이 명령을 취소할까요? No database file opened 열린 데이터베이스 파일이 없습니다. Error in statement #%1: %2. Aborting execution%3. #%1: %2 구문에 에러가 있어 실행을 중단했습니다%3. and rolling back 그리고 롤백 합니다 didn't receive any output from %1 could not execute command: %1 Cannot delete this object 이 객체를 삭제할 수 없습니다. Cannot set data on this object 이 객체에는 데이터를 저장할 수 없습니다 A table with the name '%1' already exists in schema '%2'. '%1' 이름의 테이블이 이미 스키나 '%2'에 존재합니다. renameColumn: cannot find column %1. 필드이름 변경: %1 필드를 발견할 수 없습니다. renameColumn: creating savepoint failed. DB says: %1 필드이름 변경: 세이브포인트를 생성하는데 실패했습니다. 데이터베이스 메시지: %1 renameColumn: creating new table failed. DB says: %1 필드이름 변경: 새 테이블을 생성하는데 실패했습니다. 데이터베이스 메시지: %1 renameColumn: copying data to new table failed. DB says: %1 필드이름 변경: 새 테이블로 데이터를 복사하는데 실패했습니다. 데이터베이스 메시지: %1 renameColumn: deleting old table failed. DB says: %1 필드이름 변경: 이전 테이블을 삭제하는데 실패했습니다. 데이터베이스 메시지: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: 이 테이블에 관련된 몇 개의 객체를 복원하는데 실패했습니다. 이러한 경우는 대부분 몇 개의 필드명이 변경되서 일어났을 가능성이 큽니다. 아래 SQL 구문을 참고하면 직접 수동으로 고쳐서 실행할 수 있을 것입니다: renameColumn: releasing savepoint failed. DB says: %1 필드이름 변경: 세이브포인트를 해제하는데 실패했습니다. 데이터베이스 메시지: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 테이블명을 '%1'에서 '%2'로 변경하는데 에러가 발생했습니다. 데이베이스 메시지: %3 ... <string can not be logged, contains binary data> ... ... <문자열이 바이너리 데이터를 포함하여 로깅될 수 없습니다.> ... could not get list of databases: %1 데이터베이스 목록을 가져올 수 없습니다: %1 Error loading extension: %1 확장기능을 불러오기 에러: %1 could not get column information 컬럼(열) 정보를 가져올 수 없습니다 unknown object type %1 %1 은(는) 알 수 없는 객체 타입입니다 could not get list of db objects: %1, %2 데이터베이스 객체 목록을 가져올 수 없습니다: %1, %2 could not get types 타입을 얻어올 수 없습니다 didn't receive any output from pragma %1 pragma %1 에서 출력결과를 받아올 수 없습니다 could not execute pragma command: %1, %2 pragma 명령을 실행할 수 없습니다: %1, %2 Error setting pragma %1 to %2: %3 pragma 세팅을 %1에서 %2로 변경하는데 에러: %3 File not found. 파일이 없습니다. DbStructureModel Name 이름 Object 객체 Type 타입 Schema 스키마 Browsables (%1) 찾아보기 (%1) Database 데이터베이스 Browsables 열기 All 모두선택 Temporary 임시 Tables (%1) 테이블 (%1) Indices (%1) 인덱스 (%1) Views (%1) 뷰 (%1) Triggers (%1) 트리거 (%1) EditDialog Edit database cell 데이터베이스 데이터 값을 수정하기 Mode: 모드: This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. 셀 에디터에서 지원되는 모델들 목록입니다. 현재 셀의 데이터를 보거나 수정기 위한 모드를 선택하세요. Image 이미지 JSON JSON XML XML Automatically adjust the editor mode to the loaded data type 불러온 데이터 타입을 에디터 모드에 자동 적용 This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. 이 체크 버튼은 에디터 모드를 자동으로 변경한하는 기능 키거나 끕니다. 새 셀이 선택되거나 새로운 데이터가 가져와지면 자동 변경 기능이 켜져서 데이터 타입을 인식하여 적절한 모드를 적용합니다. 그 후에 여러분은 모드를 수동으로 변경할 수 있습니다. 만약 셀들을 이동할 때 모드를 직접 변경하고자 한다면, 이 버튼을 off로 변경하세요. Auto-switch 자동변경 Auto-format: pretty print on loading, compact on saving. 자동포맷: 불러올 때 예쁘게 프린트되고, 저장할 때 용량을 줄입니다. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. 활성화되면, 자동포맷 기능이 데이터를 불러올 때 포맷을 지정하여 긴 문장을 여러 행으로 만들고 들여쓰기를 해서 가독성을 올려줍니다. 데이터를 저장할 때는 자동포맷 기능은 개행 문자를 제거하여 데이터를 줄이고 필요없는 공백을 삭제합니다. Autoformat 자동포맷 Import from file 파일로 불러오기 Opens a file dialog used to import any kind of data to this database cell. 이 데이터베이스 셀로 데이터를 가져오기 위하여 파일창을 엽니다. Export to file 파일로 내보내기 Opens a file dialog used to export the contents of this database cell to a file. 파일로 이 데이터베이스 셀의 내용을 내보내기 위한 파일창을 엽니다. Print... Open preview dialog for printing displayed image 이미지를 프린트하기 위한 인쇄 미리보기창을 엽니다. Ctrl+P Ctrl+P Open preview dialog for printing displayed text 텍스트를 프린트하기 위한 인쇄 미리보기창을 엽니다. Copy Hex and ASCII Hex와 ASCII를 복사합니다. Copy selected hexadecimal and ASCII columns to the clipboard 선택된 16진수와 ASCII 필드를 클립보드로 복사합니다. Ctrl+Shift+C Ctrl+Shift+C Import text 문자열 가져오기 Opens a file dialog used to import text to this database cell. 이 데이터베이스 데이터 값으로 문자열을 가져오기 위하여 파일 대화상자를 엽니다. &Import 가져오기(&I) Export text 문자열 내보내기 Opens a file dialog used to export the contents of this database cell to a text file. 이 데이터베이스 데이터 값을 문자열 파일로 내보내기 위하여 대화상자를 엽니다. &Export 내보내기(&E) Set this cell to NULL 셀을 NULL 만들기 Set as &NULL &NULL로 만들기 This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. 이 데이터 모드는 저장하기 전에 여러분이 JSON 또는 XML 데이터를 문법강조, 자동포맷팅, 검증을 할 수 있습니다. 에러는 빨간 밑줄로 표시됩니다. Apply data to cell [Ctrl+Return] 데이터를 셀에 적용하기 [컨트롤+엔터] This button saves the changes performed in the cell editor to the database cell. 이 버튼은 데이터 셀에 셀 에디터의 변경 사항을 적용하여 저장하기 위한 버튼입니다. Apply 적용 Text 문자열 Binary 바이너리 Clear cell data 데이터 값 지우기 Erases the contents of the cell 데이터 값을 삭제합니다 &Clear 지우기(&C) <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warning: Editing binary content in text mode may result in corrupted data!</span></p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#c00000;">주의: 텍스트 모드에서 바이너리 콘텐츠를 수정하면 데이터가 깨질 수 있습니다!</span></p></body></html> This area displays information about the data present in this database cell 이 영역은 이 데이터베이스 데이터 값에 대한 정보를 보여줍니다 Type of data currently in cell 데이터 값 크기 Size of data currently in table 테이블에서 현재 데이터 크기 Choose a file 파일을 선택하세요 Text files(*.txt);;Image files(%1);;All files(*) 문자열 파일(*.txt);;이미지 파일(%1);;모든 파일(*) Choose a filename to export data 내보내기 할 데이터의 파일이름을 선택하세요 Text files(*.txt);;All files(*) 문자열 파일(*.txt);;모든 파일(*) Image data can't be viewed with the text editor 텍스트 편집기에서는 이미지 데이터를 볼 수 없습니다 Binary data can't be viewed with the text editor 텍스트 편집기에서는 바이너리 데이터를 볼 수 없습니다 Image data can't be viewed in this mode. 이미지 데이터는 이 모드에서는 볼 수 없습니다. Try switching to Image or Binary mode. 이미지나 바이너리 모드로 바꿔보세요. Binary data can't be viewed in this mode. 바이너리 데이터는 이 모드에서 볼 수 없습니다. Try switching to Binary mode. 바이너리 모드로 바꿔보세요. Text files (*.txt) 텍스트 파일(*.txt) JSON files (*.json) JSON 파일(*.json) XML files (*.xml) XML 파일들(*.xml) Image files (%1) 이미지 파일 (%1) Binary files (*.bin) 바이너리 파일 (*.bin) All files (*) 모든 파일 (*) Choose a file to import 가져올 파일을 고르세요 %1 Image %1 이미지 SVG files (*.svg) SVG 파일 (*.svg) Hex dump files (*.txt) Hex 덤프 파일 (*.txt) Invalid data for this mode 이 모드에 맞지않은 데이터 The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? 이 셀에는 올바르지 않은 %1 데이터를 포함하고 있습니다. 이유: %2. 이 셀을 정말로 적용할까요? Type of data currently in cell: %1 Image 현재 데이터 타입: %1 이미지 %1x%2 pixel(s) %1x%2 픽셀 Type of data currently in cell: NULL 현재 데이터 타입: 널 Type of data currently in cell: Valid JSON 현재 데이터 타입: 유효한(valid) JSON Type of data currently in cell: Null 현재 데이터 타입: 널 Type of data currently in cell: Text / Numeric 현재 데이터 타입: 문자열 / 숫자 %n char(s) %n 문자 Type of data currently in cell: Image 현재 데이터 타입: 이미지 %1x%2 pixel %1x%2 픽셀 Type of data currently in cell: Binary 현재 데이터 타입: 바이너리 %n byte(s) %n 바이트 EditIndexDialog Create New Index 새 인덱스 생성하기 &Name 이름(&N) &Columns 필드(&C) Column 필드 Use in Index 인덱스 사용 Order 정렬순서 &Table 테이블(&T) Edit Index Schema 인덱스 스키마 수정 &Unique 유니크(&U) For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed 인덱스를 테이블의 일부로만 제한하기 위해서 인덱싱 해야하는 테이블의 일부를 지정하는 WHERE 절을 지정할 수 있습니다. Partial inde&x clause 부분(Partial) 인덱스(&x) 절 Colu&mns 컬럼(&m) Table column 테이블 컬럼 Type 타입 Add a new expression column to the index. Expression columns contain SQL expression rather than column names. 인덱스에 새 표현식 컬럼을 추가하세요. 표현식 컬럼은 컬럼 이름 대신 SQL?표현식이 들어갑니다. Index column 인덱스 컬럼 Deleting the old index failed: %1 이전 인덱스를 삭제하는데 실패했습니다: %1 Creating the index failed: %1 인덱스 생성에 실패했습니다: %1 EditTableDialog Edit table definition 테이블 정의 변경 Table 테이블 Advanced 고급 Database schema 데이터베이스 스키마 Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. 이 테이블을 'rowid가 없는' 테이블로 생성합니다. 이 설정을 사용하려면 주 키(Primary Key)로 설정되고 자동 증가(Auto Increment)가 해제된 INTEGER 타입의 필드 하나가 필요합니다. Without Rowid Rowid 필드 없음 Set this to create a temporary table that is deleted when closing the database. 데이터베이스를 닫을 때 삭제되는 임시 테이블을 만들기위해서는 이 값을 설정하세요. Temporary table 임시 테이블 Fields 필드 Add field 필드 추가 Remove field 필드 삭제 Move field up 필드를 위로 올리기 Move field down 필드를 아래로 내리기 Name 필드명 Type 타입 NN NN Not null Not null PK PK Primary key 주 키(Primary key) AI AI Autoincrement 자동증가(Autoincrement) U U Unique 유니크(Unique) Default 기본값 Default value 기본값 Check 제약 Check constraint 제약조건(Check constraint) Foreign Key 외래키 <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>이 테이블 정의 중에 파서가 이해할 수 없는 부분이 있습니다. 이 테이블을 수정하거나 저장하면 문제가 생길 수 있습니다.</p></body></html> Error creating table. Message from database engine: %1 테이블 생성 에러. 데이터베이스 메시지: %1 There already is a field with that name. Please rename it first or choose a different name for this field. 이미 다른 필드에서 사용중인 이름입니다. 다른 이름을 사용하거나 사용중인 필드 이름을 바꾸세요 This column is referenced in a foreign key in table %1, column %2 and thus its name cannot be changed. 이 컬럼은 %1 테이블에서 외래키로 사용중이므로 이름을 변경할 수 없습니다. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. 이 필드는 테이블 %1 에 있는 외래키에 참조되어 있기 때문에 이름을 변경할 수 없습니다. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. 이 필드 값이 NULL로 되어있는는 레코드가 최소한 하나 이상 존재합니다. 이러한 상태에서는 변경이 불가능하니 테이블의 데이터를 먼저 수정해서 NULL 값을 삭제주세요. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. 이 필드 값이 숫자가 아닌 값으로 되어있는는 레코드가 최소한 하나 이상 존재합니다. 이러한 상태에서는 변경이 불가능하니 테이블의 데이터 값을 먼저 변경해주세요. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Column '%1' has no unique data. 컬럼 '%1'은(는) 유니크 데이터가 없습니다. Setting the rowid column for the table failed. Error message: %1 테이블의 rowid 필드를 지정하는데 실패했습니다. 에러 메시지: Changing the table schema failed. Error message: %1 테이블 스키마 변경에 실패했습니다. 에러 메시지: %1 Setting the temporary flag for the table failed. Error message: %1 테이블에 임시 플래그를 지정하는데 실패했습니다. 에러 메시지: Column `%1` has no unique data. 필드 '%1'이(가) 중복되는 값을 가지고 있어 유니크로 변경할 수 없습니다. This makes it impossible to set this flag. Please change the table data first. 이러한 상태에서는 변경이 불가능하니 테이블의 데이터 값을 먼저 변경해주세요. Modifying this column failed. Error returned from database: %1 이 필드를 수정하는데 실패했습니다. 데이터베이스가 반환된 에러: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. 정말로 '%1' 필드를 삭제하시려는 건가요? 이 필드에 저장된 모든 데이터가 같이 삭제됩니다. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled 'rowid 사용하지 않음'을 사용하기 위해서는 아래 두 가지 사항을 만족시키는 필드를 추가해주세요: - 주 키(Primary Key) 사용 - 자동증가(Auto Increment) 사용하지 않음 ExportDataDialog Export data as CSV 데이터를 CSV 파일로 내보내기 &Table(s) 테이블(&T) &Column names in first line 첫 행에 필드명 포함(&C) Field &separator 필드 구분자(&S) Tab&le(s) 테이블(&l) Colu&mn names in first line 첫 행이 필드이름입니다.(&m) Fie&ld separator 필드 구분자(&l) , , ; ; Tab | | Other 기타 &Quote character 문자열 묶음 기호(&Q) " " ' ' New line characters 개행문자 Windows: CR+LF (\r\n) 윈도우: CR+LF (\r\n) Unix: LF (\n) 유닉스: LF (\n) Pretty print 프린트하기 좋은 스타일 Could not open output file: %1 내보낸 파일을 열 수 없습니다: %1 Choose a filename to export data 데이터를 내보낼 파일 이름을 정하세요 Text files(*.csv *.txt) 문자열 파일(*.csv *.txt) Export data as JSON JSON으로 내보내기 exporting CSV CSV로 내보내기 exporting JSON JSON으로 내보내기 Text files(*.json *.js *.txt) 텍스트 파일(*.json *.js *.txt) Please select at least 1 table. 최소한 테이블 1개는 선택하세요. Choose a directory 디렉토리를 선택하세요 Export completed. 내보내기가 완료되었습니다. ExportSqlDialog Export SQL... SQL로 내보내기... &Table(s) 테이블(&T) Tab&le(s) 테이블(&l) Select All 모두 선택 Deselect All 모두 선택 해제 &Options 옵션(&O) Keep column names in INSERT INTO INSERT INTO문에 필드명 넣기 Multiple rows (VALUES) per INSERT statement 하나의 INSERT문에 여러줄 (VALUES) 사용하기 Export everything 모두 내보내기 Export data only 데이터만 내보내기 Keep old schema (CREATE TABLE IF NOT EXISTS) 이전 스키마 유지하기 (CREATE TABLE IF NOT EXISTS)) Overwrite old schema (DROP TABLE, then CREATE TABLE) 이전 스키마 덮어쓰기 (DROP TABLE, then CREATE TABLE) New INSERT INTO syntax (multiple rows in VALUES) 새 INSERT INTO 문법 사용(VALUES에서 다중 행 사용) Export schema only 스키마만 내보내기 Please select at least 1 table. 최소한 1 개의 테이블을 . Please select at least one table. 최소한 한 개의 테이블을 선택해주세요. Choose a filename to export 내보내기 할 파일명을 고르세요 Text files(*.sql *.txt) 텍스트 파일(*.sql *.txt) Export completed. 내보내기가 완료되었습니다. Export cancelled or failed. 내보내기가 취소되었거나 실패했습니다. ExtendedScintilla Ctrl+H 컨트롤 + H Ctrl+P 컨트롤 + P Find and Replace... 검색과 바꾸기... Print... 인쇄하기... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? 클립보드의 내용이 선택범위보다 큽니다. 그래도 추가하시겠습니까? Use as Exact Filter 정확한 필터로 적용하기 Containing 포함하는 Not equal to 같지 않은 Greater than 초과 Less than 미만 Greater or equal 이상 Less or equal 이하 Between this and... 이 값과 사이에(between)... Set to NULL NULL로 변경하기 Copy 복사하기 Copy with Headers 헤더 포함 복사하기 Copy as SQL SQL로 복사하기 Paste 붙여넣기 Print... 인쇄하기... Use in Filter Expression 필터 표현식 적용하기 Alt+Del Alt + Del Ctrl+Shift+C Ctrl+Shift+C Ctrl+Alt+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? 클립보드의 내용이 선택한 범위보다 큽니다. 어쨌든 추가할까요? FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite 데이터베이스 파일(*.db *.sqlite *.sqlite3 *.db3);;모든 파일 (*) FileExtensionManager File Extension Manager 파일 확장자 관리자 &Up 위로(&U) &Down 아래로(&D) &Add 추가하기(&A) &Remove 삭제하기(&R) Description 설명 Extensions 확장자 *.extension *.확장자 FilterLineEdit Filter 필터 These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y 이 입력 필드는 현재 선택된 테이블에 빠르게 필터를 적용할 수 있게 해줍니다. 기본적으로 입력 박스에 들어가있는 조건에 맞는 행들이 표시됩니다. 아래와 같은 연산자들을 사용할 수 있습니다: % 와일드카드 > 초과 < 미만 >= 이상 <= 이하 = 같음: 정확히 일치 <> 같지않음: 정확히 불일치 x~y 범위: x와 y값 사이 값 Set Filter Expression 필터 표현식 설정하기 What's This? 이 프로그램은? Is NULL NULL임 Is not NULL NULL이 아님 Is empty 비어있음 Is not empty 비어있지 않음 Equal to... 같은... Not equal to... 같지 않은... Greater than... 초과... Less than... 미만... Greater or equal... 이상... Less or equal... 이하... In range... 범위... FindReplaceDialog Find and Replace Fi&nd text: Re&place with: Match &exact case Match &only whole words When enabled, the search continues from the other end when it reaches one end of the page &Wrap around When set, the search goes backwards from cursor position, otherwise it goes forward Search &backwards <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Use regular e&xpressions Find the next occurrence from the cursor position and in the direction set by "Search backwards" &Find Next &Replace Highlight all the occurrences of the text in the page F&ind All Replace all the occurrences of the text in the page Replace &All The searched text was not found The searched text was not found. The searched text was found one time. The searched text was found %1 times. The searched text was replaced one time. The searched text was replaced %1 times. ForeignKeyEditor &Reset 초기화(&R) Foreign key clauses (ON UPDATE, ON DELETE etc.) 외부 키(ON UPDATE, ON DELETE 등.) ImportCsvDialog Import CSV file CSV 파일 가져오기 &Table name 테이블 이름(&T) Table na&me 테이블 이름(&m) &Column names in first line 첫 행에 필드명 포함(&C) Field &separator 필드 구분자(&S) , , ; ; Tab | | Other 기타 &Quote character 문자열 묶음 기호(&Q) " " ' ' &Encoding 인코딩(&E) UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? 필드 앞뒤 공백 제거(트림)? Separate tables 테이블 나누기 Advanced 고급 When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. 필드에 기본 값이 지정되어 있는 기존에 존재하는 테이블에 CSV 파일에서 빈 값을 가져온다면 기본 값이 대신 들어갑니다. 빈 값 대신에 기본 값을 집어넣으려면 이 옵션을 활성화하세요. Ignore default &values 기본 값(&v)을 무시 Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. 빈 값을 기본 값이 없는 NOT NLL 필드로 가져오기를 할 때 이 옵션을 활성화하세요. Fail on missing values 값 누락 시 실패 Disable data type detection 데이터 타입 인식 끄기 Disable the automatic data type detection when creating a new table. 새 테이블을 생성할 때 자동 데이터 타입 인식 기능을 끕니다. Deselect All 모두선택 해제 Match Similar 비슷한거 찾기 Select All 모두 선택 Inserting data... 데이터 추가하는 중... Cancel 취소 There is already a table of that name and an import into an existing table is only possible if the number of columns match. 가져오려는 테이블의 이름이 같고 필드의 수가 같은 경우에만 가능합니다. There is already a table of that name. Do you want to import the data into it? 같은 이름의 테이블이 이미 존재합니다. 데이터만이라도 가져올까요? Import completed 가져오기가 완료되었습니다 There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. 이미 '%1'이라는 이름을 가진 테이블이 존재하며 기존 테이블로 데이터를 가져오는 것은 필드의 수가 같을 때만 가능합니다. There is already a table named '%1'. Do you want to import the data into it? 이미 '%1'라는 이름의 테이블이 존재합니다. 데이터를 이 테이블로 가져올까요/ Creating restore point failed: %1 복원 포인트를 생성하는데 실패했습니다: %1 Creating the table failed: %1 테이블 생성에 실패했습니다: %1 importing CSV CSV 가져오기 Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. 파일 '%1' 가져오는데 %2ms가 걸렸습니다. 이 중에서 행 기능을 적용하는데 %3ms가 걸렸습니다. Missing field for record %1 레코드에 %1 필드가 빠져있습니다 Inserting row failed: %1 행 추가에 실패했습니다: %1 MainWindow DB Browser for SQLite DB Browser for SQLite Database &Structure 데이터베이스 구조(&S) toolBar1 toolBar1 &Browse Data 데이터 보기(&B) Table: 테이블: Select a table to browse data 보려는 데이터가 있는 테이블을 선택하세요 Use this list to select a table to be displayed in the database view 리스트에서 테이블을 선택하면 데이터베이스 뷰에서 볼 수 있습니다 Refresh the data in the selected table. 선택된 테이블의 데이터를 다시 불러옵니다. This button refreshes the data in the currently selected table. 이 버튼은 현재 선택된 테이블의 데이터를 다시 불러옵니다. Scroll one page upwards 한 페이지 위로 스크롤합니다. <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html><head/><body><p>위 테이블 뷰에서 레코드를 한 페이지 앞으로 가려면 이 버튼을 클릭하세요.</p></body></html> Scroll one page downwards 한 페이지 아래로 스크롤합니다. <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>위 테이블 뷰에서 레코드를 한 페이지 뒤로 가려면 이 버튼을 클릭하세요.</p></body></html> SQLCipher &FAQ... SQLCipher &FAQ... Opens the SQLCipher FAQ in a browser window SQLCipher FAQ를 봅니다 Table(s) to JSON... 테이블을 JSON으로 내보내기... Export one or more table(s) to a JSON file 테이블을 JSON 파일로 내보냅니다 Save to Remote 원격 저장하기 Refresh 새로고침 F5 F5 Clear all filters 모든 필터 지우기 &Table: 테이블(&T): Insert a new record in the current table 현재 테이블에 새 레코드를 추가합니다 This button creates a new, empty record in the database 이 버튼은 새로운 비어있는 레코드를 데이터베이스에 생성합니다 New Record 새 레코드 Delete the current record 현재 레코드 삭제하기 This button deletes the record currently selected in the database 이 버튼은 데이터베이스에서 현재 선택되어있는 레코드를 삭제합니다 Delete Record 레코드 삭제 This is the database view. You can double-click any record to edit its contents in the cell editor window. 여기는 데이터베이스 뷰입니다. 레코드를 더블클릭하면 편집기창에서 값을 수정할 수 있습니다. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>첫 페이지로 갑니다.</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>테이블 뷰 맨 위로 가기 위해서는 버튼을 클릭하세요.</p></body></html> |< |< Scroll 100 records upwards <html><head/><body><p>100 레코드 스크롤 올리기</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>테이블 뷰에서 100 레코드 위로 스크롤하려면 이 버튼을 클릭하세요.</p></body></html> < < 0 - 0 of 0 0 - 0 of 0 <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>100 레코드 스크롤 내리기</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>테이블뷰에서 100 레코드 아래로 스크롤하려면 이 버튼을 클릭하세요.</p></body></html> > > Scroll to the end <html><head/><body><p>마지막 페이지로 갑니다.</p></body></html> <html><head/><body><p>Clicking this button navigates up to the end in the table view above.</p></body></html> <html><head/><body><p>테이블 뷰 맨 아래로 가기 위해서는 이 버튼을 클릭하세요.</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>특정 레코드로 점프하려면 여기를 클릭하세요</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>이 버튼은 특정 위치의 레코드 넘버로 가기 위해서 사용합니다.</p></body></html> Go to: 특정 레코드 행으로 가기: Enter record number to browse 레코드 행 번호를 입력하세요 Type a record number in this area and click the Go to: button to display the record in the database view 레코드 행번호를 입력하고 '특정 레코드 행으로 가기:' 버튼을 클릭하면 데이터베이스 뷰에 레코드가 표시됩니다 1 1 Edit &Pragmas 프라그마 수정(&P) <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">자동 정리(Auto Vacuum)</span></a></p></body></html> None 사용하지 않음 Full 모두(Vacuum Full) Incremental 증분(Incremental) <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">자동 인덱스</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">체크포인트 Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">외래키</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">제약조건 무시</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">저널 모드</span></a></p></body></html> Delete 삭제 Truncate 비우기 Persist Persist Memory 메모리 WAL WAL Off 사용안함 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">저널 크기 제한</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">잠금(Locking) 모드</span></a></p></body></html> Normal 일반 Exclusive 독점(Exclusive) <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">최대 페이지 수</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">페이지 크기</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">재귀 트리거</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">보안(Secure) 삭제</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">동기화(Synchronous)</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">임시 저장소(Temp Store)</span></a></p></body></html> Default 기본 File 파일 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">사용자 버전</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL 자동 체크포인트</span></a></p></body></html> &Open Database Read Only... 읽기 전용으로 데이터베이스 열기(&O)... Open an existing database file in read only mode 읽기 전용 모드로 존재하는 데이터베이스 파일을 엽니다 Unlock view editing 뷰 수정 락 해제하기 This unlocks the current view for editing. However, you will need appropriate triggers for editing. 수정을 위하여 현재 뷰의 락을 해제합니다. 하지만 수정을 위해서는 적절한 트리거가 필요할 것입니다. E&xecute SQL SQL 실행하기(&X) &File 파일(&F) &Import 가져오기(&I) &Export 내보내기(&E) Remote 원격 &Edit 편집(&E) &View 뷰(&V) &Help 도움말(&H) &Tools DB Toolbar DB 툴바 Edit Database &Cell 데이터베이스 셀 수정하기(&C) This button clears the contents of the SQL logs This panel lets you examine a log of all SQL commands issued by the application or by yourself DB Sche&ma DB 스키마 This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. &Remote 원격 Execute SQL [F5, Ctrl+Return, Ctrl+R] SQL 실행하기 [F5, Ctrl+Return, Ctrl+R] &Load extension 확장기능 불러오기(&L) Execute current line [Shift+F5] 현재 행 실행하기 [Shift+F5] This button executes the SQL statement present in the current editor line Shift+F5 Shift+F5 Sa&ve Project 프로젝트 저장하기(&V) Open &Project 프로젝트 열기(&P) &Set Encryption 암호화하기(&S) Edit display format 표시 형식 변경하기 Edit the display format of the data in this column 이 컬럼에 있는 데이터의 표시 형식을 수정합니다 Show rowid column 컬럼의 rowid 표시하기 Toggle the visibility of the rowid column rowid 컬럼을 표시하거나 감춥니다 Set encoding 인코딩 지정하기 Change the encoding of the text in the table cells 테이블 셀 안의 텍스트 인코딩을 변경합니다 Set encoding for all tables 모든 테이블의 인코딩 지정하기 Change the default encoding assumed for all tables in the database 데이터베이스 안에 있는 모든 테이블의 기본 인코딩을 변경합니다 Duplicate record 레코드 복제하기 SQL Log SQL 로그 &Show SQL submitted by SQL 보기(&S) by User 사용자 Application 애플리케이션 &Clear 지우기(&C) Plot 플롯 Columns 필드 X X Y Y _ _ Line type: 행 타입: Line StepLeft 왼쪽으로 StepRight 오른쪽으로 StepCenter 중앙으로 Impulse 임펄스 Point shape: 포인트 모양: Cross 십자가 Plus 더하기 Circle Disc 디스크 Square 정사각형 Diamond 마름모 Star Triangle 삼각형 TriangleInverted 역삼각형 CrossSquare 크로스스퀘어 PlusSquare 플러스스퀘어 CrossCircle 크로스써클 PlusCircle 플러스써클 Peace 피스 <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>현재 플롯 저장하기...</p><p>파일 포맷 확장자를 고르세요 (png, jpg, pdf, bmp)</p></body></html> Save current plot... 현재 플롯 저장하기... Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. 모든 데이터를 불러옵니다. 이 기능은 부분만 가져오는 메카니즘으로 인하여 테이블에서 모든 데이터가 가져오지 않았을 때에만 작동합니다. DB Schema DB 스키마 &New Database... 새 데이터베이스(&N)... Create a new database file 새 데이터베이스 파일을 생성합니다 This option is used to create a new database file. 이 옵션은 새 데이터베이스 파일을 생성하려고 할 때 사용합니다. Ctrl+N Ctrl+N &Open Database... 데이터베이스 열기(&O)... Open an existing database file 기존 데이터베이스 파일을 엽니다 This option is used to open an existing database file. 이 옵션은 기존 데이터베이스 파일을 열 때 사용합니다. Ctrl+O Ctrl+O &Close Database 데이터베이스 닫기(&C) This button closes the connection to the currently open database file Ctrl+W Ctrl+W Revert Changes 변경사항 되돌리기 Revert database to last saved state 마지막 저장된 상태로 데이터베이스를 되돌립니다 This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. 이 옵션은 현재 데이터베이스를 마지막 저장된 상태로 되돌릴 때 사용합니다. 저장 이후에 이루어진 모든 변경 사항을 되돌립니다. Write Changes 변경사항 반영하기 Write changes to the database file 변경 사항을 데이터베이스 파일에 반영합니다 This option is used to save changes to the database file. 이 옵션은 데이터베이스 파일에 변경 사항을 저장하기 위해 사용됩니다. Ctrl+S Ctrl+S Compact Database 데이터베이스 크기 줄이기 Compact the database file, removing space wasted by deleted records 삭제된 레코드 등 낭비된 공간을 삭제하여 데이터베이스 파일 크기를 줄입니다 Compact the database file, removing space wasted by deleted records. 삭제된 레코드 등 낭비된 공간을 삭제하여 데이터베이스 파일 크기를 줄입니다. E&xit 종료(&X) Ctrl+Q Ctrl+Q Database from SQL file... SQL 파일에서 데이터베이스 가져오기... Import data from an .sql dump text file into a new or existing database. .sql 덤프 문자열 파일에서 데이터를 새 데이터베이스나 기존 데이터베이스로 가져옵니다. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. 이 옵션은 .sql 덤프 문자열 파일에서 데이터를 새 데이터베이스나 기존 데이터베이스로 가져옵니다. SQL 덤프 파일은 MySQL이나 PostgreSQL 등 대부분의 데이터베이스 엔진에서 생성할 수 있습니다. Table from CSV file... 테이블을 CSV 파일로 저장하기... Open a wizard that lets you import data from a comma separated text file into a database table. 마법사를 사용하여 CSV 파일(콤마로 필드가 나누어진 문자열 파일)에서 데이터베이스 테이블로 데이터를 가져올 수 있습니다. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. 마법사를 사용하여 CSV 파일(콤마로 필드가 나누어진 문자열 파일)에서 데이터베이스 테이블로 데이터를 가져올 수 있습니다. CSV 파일은 대부분의 데이터베이스와 스프래드시트 애플리케이션(엑셀 등)에서 생성할 수 있습니다. Database to SQL file... 데이터베이스를 SQL 파일로 저장하기... Export a database to a .sql dump text file. 데이터베이스를 .sql 덤프 문자열 파일로 내보내기. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. 이 옵션은 데이터베이스를 .sql 덤프 문자열 파일로 내부낼 수 있습니다. SQL 덤프 파일은 MySQL과 PostgreSQL 등 대부분의 데이터베이스 엔진에서 데이터베이스를 재생성하기 위한 모든 필요한 데이터를 포함하고 있습니다. Table(s) as CSV file... 테이블을 CSV 파일로 저장하기... Export a database table as a comma separated text file. 데이터베이스 테이블을 CSV(콤마로 분리된 문자열 파일)로 내보내기. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. 데이터베이스 테이블을 CSV(콤마로 분리된 문자열 파일)로 내보내기. 다른 데이터베이스나 스프래드시트 애플리케이션(엑셀 등)에서 가져와서 사용할 수 있습니다. Create Table... 테이블 생성... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database 테이블 생성 마법사를 사용하여 데이터베이스에서 새 테이블을 위한 이름과 필드를 정의할 수 있습니다 Delete Table... 테이블을 삭제... Delete Table 테이블 삭제하기 Open the Delete Table wizard, where you can select a database table to be dropped. 테이블 삭제 마법사를 사용하여 선택한 데이터베이스 테이블을 삭제할 수 있습니다. Modify Table... 테이블을 수정... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. 테이블 편집 마법사를 사용하여 기존 테이블의 이름을 변경하거나 테이블의 필드를 추가, 삭제, 필드명 변경 및 타입 변경을 할 수 있습니다. Create Index... 인덱스 생성하기... Open the Create Index wizard, where it is possible to define a new index on an existing database table. 인덱스 생성 마법사를 사용하여 기존 데이터베이스 테이블에 새 인덱스를 정의할 수 있습니다. &Preferences... 환경설정(&P)... Open the preferences window. 환경설정창을 엽니다. &DB Toolbar DB 툴바 Shows or hides the Database toolbar. 데이터베이스 툴바를 보이거나 숨깁니다. What's This? 이 프로그램은? Shift+F1 Shift+F1 &About... 정보(&A)... &Recently opened 최근 열었던 파일들(&R) Open &tab 탭 열기(&T) Ctrl+T Ctrl+T Database Structure 데이터베이스 구조 This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Browse Data 데이터 보기 Refresh the data in the selected table [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. Save the table as currently displayed <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> ... ... Print currently browsed table data [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> This button deletes the record or records currently selected in the table This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;테이블 뷰의 끝으로 갈려면 버튼을 클릭하세요.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> Edit Pragmas Pragma 수정 Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. 경고: 이 프라그마는 읽기전용이 아니며 이 값은 추측된 값입니다. pragma를 작성하면 SQLite에서 제공하는 재정의 된 LIKE를 덮어 쓸 수 있습니다 Execute SQL SQL 실행 Compact &Database... Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. &Load Extension... &Wiki 위키(&W) Bug &Report... Feature Re&quest... Web&site 웹사이트(&S) &Donate on Patreon... Sa&ve Project... This button lets you save all the settings associated to the open DB to a DB4S project file Open &Project... This button lets you open a DB4S project file &Attach Database... Add another database file to the current database connection This button lets you add another database file to the current database connection &Set Encryption... SQLCipher &FAQ Table(&s) to JSON... Open Data&base Read Only... Save results Save the results view This button lets you save the results of the last executed query Find text in SQL editor Find text in SQL editor [Ctrl+F] This button opens the search bar of the editor Ctrl+F Find or replace text in SQL editor Find or replace text in SQL editor [Ctrl+H] This button opens the find/replace dialog for the current editor tab Export to &CSV CSV로 내보내기(&C) Save as &view 뷰로 저장하기(&V) Save as view 뷰로 저장하기 Hide column(s) Hide selected column(s) Show all columns Show all columns that were hidden Shows or hides the Project toolbar. Extra DB Toolbar Export the filtered data to CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Save the current filter, sort column and display formats as a view This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Insert Values... Open a dialog for inserting values in a new record Insert new record using default values in browsed table New In-&Memory Database Drag && Drop Qualified Names Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Drag && Drop Enquoted Names Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor &Integrity Check Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. &Foreign-Key Check Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab &Quick Integrity Check Run a quick integrity check over the open DB Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. &Optimize Attempt to optimize the database Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Print Print text from current SQL editor tab [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Print the structure of the opened database [Ctrl+P] Open a dialog for printing the structure of the opened database Edit Database Cell 데이터베이스 셀 수정 SQL &Log SQL 로그 Show S&QL submitted by 실행된 SQL 보기(&) by &Plot 플롯 Project Toolbar Extra DB toolbar Close the current database file &Revert Changes 변경사항 취소하기(&R) &Write Changes 변경사항 저장하기(&W) Compact &Database 데이터베이스 용량 줄이기(&D) &Database from SQL file... SQL 파일로부터 데이터베이스 가져오기(&D)... &Table from CSV file... CSV 파일에서 테이블 가져오기(&T)... &Database to SQL file... 데이터베이스를 SQL로 내보내기(&D)... &Table(s) as CSV file... 테이블을 CSV 파일로 내보내기(&T)... &Create Table... 테이블 생성하기(&C)... &Delete Table... 테이블 삭제하기(&D)... &Modify Table... 테이블 수정하기(&M)... Create &Index... 인덱스 생성하기(&I) W&hat's This? 이건 무엇인가요? &About This button opens a new tab for the SQL editor &Execute SQL SQL 실행하기(&E) Execute SQL [F5, Ctrl+Return] SQL 실행하기 [F5, Ctrl+엔터] Open SQL file SQL 파일 열기 This button opens a file containing SQL statements and loads it in a new editor tab Save SQL file SQL 파일 저장하기 Load extension 확장기능 불러오기 Execute current line 현재 행 실행하기 Execute current line [Ctrl+E] 현재 행 실행하기 [Ctrl+E] Ctrl+E Ctrl+E Export as CSV file CSV 파일로 내보내기 Export table as comma separated values file 테이블을 CSV 파일로 내보내기 &Wiki... 위키(&W)... Bug &report... 버그 신고(&R)... Web&site... 웹사이트(&S)... Save Project 프로젝트 저장하기 Save the current session to a file 현재 세션을 파일로 저장하기 Open Project 프로젝트 열기 Load a working session from a file 파일에서 작업 세션 불러오기 &Attach Database 데이터베이스 연결하기(&Attach) Set Encryption 암호화 Save SQL file as SQL 파일 다름이름으로 저장하기 This button saves the content of the current SQL editor tab to a file &Browse Table 테이블 보기(&B) Copy Create statement 생성 구문 복사하기 Copy the CREATE statement of the item to the clipboard 항목의 생성 구문을 클립보드에 복사합니다 Ctrl+Return Ctrl+리턴 Ctrl+L Ctrl+L Ctrl+P Ctrl+P Ctrl+D Ctrl+D Ctrl+I Ctrl+I Encrypted 암호화됨 Read only 읽기전용 Database file is read only. Editing the database is disabled. 데이터베이스 파일이 읽기 전용입니다. 데이터베이스 수정기능을 사용할 수 없습니다. Database encoding 데이터베이스 인코딩 Database is encrypted using SQLCipher 데이터베이스는 SQLCipher를 사용해서 암호화됩니다 Choose a database file 데이터베이스 파일을 선택하세요 SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite 데이터베이스 파일(*.db *.sqlite *.sqlite3 *.db3);;모든 파일 (*) Invalid file format. 올바르지 않은 파일 포맷입니다. Choose a filename to save under 저장하려는 파일명을 고르세요 Error adding record: 레코드 추가 에러: Error deleting record: %1 레코드 추가 에러: %1 Please select a record first 레코드를 먼저 선택하세요 %1 - %2 of %3 %1 - %2 of %3 There is no database opened. Please open or create a new database file. 데이터베이스가 열려있지 않습니다. 데이터베이스를 열던가 새 데이터베이스 파일을 생성하세요. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. %1 '%2'를 정말로 삭제하나요? %1와 관련된 모든 데이터가 삭제됩니다. Error: could not delete the %1. Message from database engine: %2 에러: %1을(를) 삭제할 수 없습니다. 메시지: %2 There is no database opened. 열려있는 데이터베이스가 없습니다. %1 Rows returned from: %3 (took %2ms) %3에서 %1 행이 리턴되었습니다.(%2ms 걸림) Error executing query: %1 쿼리 실행 에러: %1 Query executed successfully: %1 (took %2ms) 쿼리가 성공적으로 실행되었습니다: %1 (%2ms 걸림) %1 rows returned in %2ms from: %3 %3에서 %2ms의 시간이 걸려서 %1 행이 리턴되었습니다 , %1 rows affected , %1 행이 영향받았습니다 Query executed successfully: %1 (took %2ms%3) 질의가 성공적으로 실행되었습니다: %1 (%2ms%3 걸렸습니다.) Choose a text file 문자열 파일을 고르세요 Text files(*.csv *.txt);;All files(*) 문자열 파일(*.csv *.txt);;모든 파일(*) Import completed 가져오기가 완료되었습니다 Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 데이터베이스 파일을 저장할 때 에러가 발생했습니다. 이 말은 모든 변경사항들이 데이터베이스에 저장되지 못했음을 의미합니다. 다음에 나오는 에러를 먼저 해결하기 바랍니다. %1 Are you sure you want to undo all changes made to the database file '%1' since the last save? 정말로 데이터베이스 파일 '%1'의 모든 변경 사항을 마지막 저장된 상태로 되돌립니까? Choose a file to import 가져올 파일을 고르세요 Text files(*.sql *.txt);;All files(*) 문자열 파일(*.sql *.txt);;모든 파일(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. 데이터를 가져와서 새 데이터베이스 파일을 생성하고 싶은가요? 아니라면 SQL 파일의 데이터를 현재 데이터베이스로 가져오기를 할 것입니다. File %1 already exists. Please choose a different name. 파일 %1이 이미 존재합니다. 다른 파일명을 고르세요. Error importing data: %1 데이터 가져오기 에러: %1 Import completed. 가져오기가 완료되었습니다. Delete View 뷰 삭제하기 Modify View 뷰 수정하기 Delete Trigger 트리거 삭제하기 Modify Trigger 트리거 수정하기 Delete Index 인덱스 삭제하기 Modify Index 인덱스 수정하기 Modify Table 테이블 수정하기 &%1 %2 &%1 %2 Extensions(*.so *.dylib *.dll);;All files(*) Choose a project file to open This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Duplicate records Ctrl+" Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. 이 뷰에서 수정을 활성화하기 위하여 pseudo-primary key를 입력하시기 바랍니다. 이것은 뷰에서 유일한 이름이어야 합니다. Setting PRAGMA values will commit your current transaction. Are you sure? PRAGMA 설정을 변경하려면 여러분의 현재 트랜잭션을 커밋해야합니다. 동의하십니까? Could not open database file. Reason: %1 데이터베이스 파일을 열 수 없습니다. 원인: %1 In-Memory database determining row count... %1 - %2 of >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Are you sure you want to delete the view '%1'? Are you sure you want to delete the trigger '%1'? Are you sure you want to delete the index '%1'? Error: could not delete the table. Error: could not delete the view. Error: could not delete the trigger. Error: could not delete the index. Message from database engine: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? -- EXECUTING SELECTION IN '%1' -- -- EXECUTING LINE IN '%1' -- -- EXECUTING ALL IN '%1' -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? PRAGMA 값을 지정하지 않으면 현재 트랜잭션에 DB파일 축소작업(Vacuum)이 커밋됩니다. 진행할까요? Execution aborted by user 사용자에 의해서 실행이 취소되었습니다 executing query %1 rows returned in %2ms query executed successfully. Took %1ms%2 Choose text files 텍스트 파일 선택 Import completed. Some foreign key constraints are violated. Please fix them before saving. Select SQL file to open 열 SQL 파일을 선택하세요 Couldn't read file: %1. 파일을 읽을 수 없습니다: %1. Couldn't save file: %1. 파일을 저장할 수 없습니다: %1. Select file name 파일 이름을 선택하세요 Select extension file 파일 확장자를 선택하세요 Extensions(*.so *.dll);;All files(*) 확장기능 파일들(*.so *.dll);;모든 파일(*) Extension successfully loaded. 확장기능을 성공적으로 불러왔습니다. Error loading extension: %1 확장기능을 불러오기 에러: %1 Don't show again 다시 보지 않기 New version available. 이용 가능한 새 버전이 있습니다. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. 이용 가능한 새 버전이 있습니다 (%1.%2.%3).<br/><br/><a href='%4'>%4</a>에서 다운로드하세요. Collation needed! Proceed? 콜레이션이 필요합니다! 진행할까요? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! 이 데이터베이스의 테이블은 이 애플리케이션에서 잘 알지못하는 특별한 함수 '%1'가 필요합니다. 이대로 계속 진행할 수는 있습니다만 여러분의 데이터베이스에 나쁜 영향이 갈 수도 있습니다. 백업을 생성하세요! creating collation Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Please specify the view name 뷰 이름을 지정해주세요 There is already an object with that name. Please choose a different name. 이지 같은 이름의 객체가 존재합니다. 다른 이름을 고르세요. View successfully created. 뷰가 성공적으로 생성되었습니다. Error creating view: %1 뷰 생성 에러: %1 There is no filter set for this table. View will not be created. Delete Records This action will open a new SQL tab for running: Press Help for opening the corresponding SQLite reference page. Choose a axis color 축의 색깔을 고르세요 PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;모든 파일(*) Please enter the URL of the database file to save. 데이터베이스 파일을 저장하기 위한 URL을 입력해주세요. Choose a file to open 불러올 파일을 선택하세요 DB Browser for SQLite project file (*.sqbpro) DB Browser for SQLite 프로젝트 파일 (*.sqbpro) Please choose a new encoding for this table. 이 테이블에 적용할 새 인코딩을 선택하세요 Please choose a new encoding for all tables. 모든 테이블에 설정 할 새 인코딩을 선택하세요 Error checking foreign keys after table modification. The changes will be reverted. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. At line %1: Result: %2 %1 Leave the field empty for using the database encoding. 데이터베이스 인코딩을 사용하기위해 필드를 비워둡니다 This encoding is either not valid or not supported. 이 인코딩은 올바르지 않거나 지원되지 않습니다. Cancel 취소 NullLineEdit Set to NULL NULL로 변경하기 Alt+Del 알트+델 PlotDock Plot 플롯 <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> <html><head/><body><p>이 화면은 현재 보고 있는 테이블 또는 방금 실행한 쿼리의 필드 목록을 보여줍니다. 아래 플롯 화면에 X축 또는 Y축으로 사용할 필드를 선택할 수 있습니다. 이 표는 결과 플롯에 영향을 줄 수 있다고 인식된 축의 종류를 보여줍니다. Y축은 숫자 타입 필드만 선택할 수 있지만 X 축은 다음과 같은 필드 타입을 선택할 수 있습니다:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">날짜</span>: 문자열 포맷 &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">시간</span>: 문자열 포맷 &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">라벨</span>: 이 필드를 X 축으로 선택하면 필드 값이 막대의 레이블로 표시된 막대 그래프가 생성됩니다.</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">숫자</span>: 정수 도는 실수</li></ul><p>Y 셀을 더블-클릭하면 그래프에 사용된 색을 변경할 수 있습니다.</p></body></html> Columns 필드 X X Y Y _ _ Axis Type 축 타입 Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. 위에서 x와 y 값을 선택하면 여기에 플롯이 그려집니다. 플롯과 테이블에서 항목을 클릭하면 선택됩니다.여러 범위의 항목을 선택하려면 컨트롤+클릭을 하세요. 확대축소를 하려면 마우스 휠을 이용하고 축 범위를 바꾸려면 마우스를 드래그하세요. 한 방향으로만 드래그 또는 확대축소를 하고 싶다면 축 또는 축 라벨을 선택하세요. Line type: 행 타입: None 사용하지 않음 Line StepLeft 왼쪽으로 StepRight 오른쪽으로 StepCenter 중앙으로 Impulse 임펄스 Point shape: 포인트 모양: Cross 십자가 Plus 더하기 Circle Disc 디스크 Square 정사각형 Diamond 마름모 Star Triangle 삼각형 TriangleInverted 역삼각형 CrossSquare CrossSquare PlusSquare PlusSquare CrossCircle CrossCircle PlusCircle PlusCircle Peace Peace <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>현재 플롯 저장하기...</p><p>파일 포맷 확장자를 고르세요 (png, jpg, pdf, bmp)</p></body></html> Save current plot... 현재 플롯 저장하기... Load all data and redraw plot 모든 데이터를 불러와서 플롯을 다시 그립니다. Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. 모든 데이터를 불러옵니다. 이 기능은 부분만 가져오는 메카니즘으로 인하여 테이블에서 모든 데이터가 가져오지 않았을 때에만 작동합니다. Row # 행 # Choose a axis color 축의 색깔을 고르세요 Copy 복사 Print... 인쇄하기... Show legend 범례 표시 Stacked bars 누적 막대 Date/Time 날짜/시간 Date 날짜 Time 시간 Numeric 숫자 Label 레이블 Invalid 올바르지 않음 Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. 모든 데이터를 불러와서 플롯을 다시 그립니다. 주의: 이 기능은 부분만 가져오는 메카니즘으로 인하여 테이블에서 모든 데이터가 가져와지지는 않습니다. Choose an axis color 축 색깔을 고르세요 Choose a filename to save under 저장하려는 파일명을 고르세요 PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;모든 파일(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. 플롯에 있는 곡선들 중에 X축으로 정렬된 그래프만 선택한 선의 스타일을 변경할 수 있습니다. X로 표 또는 쿼리를 정렬하여 곡선을 제거하려면 None을, 곡선이 지원하는 스타일 중 하나를 선택하려면 Line을 선택하세요. Fetching all data... 모든 데이터 가져오는 중... Cancel 취소 PreferencesDialog Preferences 환경설정 &General 일반(&G) Remember last location 마지막 위치를 기억 Always use this location 항상 이 위치를 사용 Remember last location for session only 같은 세션에서만 마지막 위치를 기억 ... ... Default &location 기본 위치(&L) Lan&guage 언어(&G) Automatic &updates 자동 업데이트(&U) enabled 사용하기 Show remote options 원격 옵션 보기 &Database 데이터베이스(&D) Database &encoding 데이터베이스 인코딩(&E) Open databases with foreign keys enabled. 외래키 기능을 사용하며 데이터베이스를 엽니다. &Foreign keys 외래키(&F) Remove line breaks in schema view 스키마 뷰에서 행 나눔 삭제하기 &Prefetch block size 프리패치(&Prefetch) 블록 사이즈 Data &Browser 데이터 보기(&B) NULL fields NULL 필드 Text &colour 글자색(&C) &Text 문자열(&T) Bac&kground colour 배경색(&K) Remove line breaks in schema &view 스키마 뷰에서 개행을 제거합니다(&V) Prefetch block si&ze 프리패치 할 블럭 크기(&Z) Advanced 고급 SQL to execute after opening database 데이터베이스 파일을 연 후에 실행 할 SQL SQ&L to execute after opening database 데이터베이스를 연 후 SQL을 실행(&L) Default field type 기본 필드 타입 Font 폰트 &Font 폰트(&F) Font si&ze: 폰트 크기(&Z) Content 내용 Symbol limit in cell 셀 안 심볼 한계 Field colors 폰트 색깔 NULL NULL Regular 보통 Text 문자열 Binary 바이너리 Background 배경색 Filters 필터 Toolbar style Only display the icon Only display the text The text appears beside the icon The text appears under the icon Follow the style DB file extensions Manage When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Font si&ze This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Row count threshold for completion Field display Displayed &text Text color Background color Preview only (N/A) Escape character 이스케이프 문자 Delay time (&ms) 대기 시간 Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. 새로운 필터 값을 적용하기 전에 대기할 시간을 설정하세요. 대기 시간을 0으로 하면 대기하지 않습니다. &SQL &SQL Settings name 설정 이름 Context 내용 Colour 색깔 Bold 볼드 Italic 이탤릭 Underline 밑줄 Keyword 키워드 function 기능 Function 함수 Table 테이블 Comment 주석 Identifier 식별자 String 문자열 currentline 현재행 Current line 현재 행 SQL &editor font size SQL 에디터 폰트 크기(&E) SQL &log font size SQL 로그 폰트 크기(&E) Tab size 탭 크기 &Wrap lines Never At word boundaries At character boundaries At whitespace boundaries &Quotes for identifiers Choose the quoting mechanism used by the application for identifiers in SQL code. "Double quotes" - Standard SQL (recommended) `Grave accents` - Traditional MySQL quotes [Square brackets] - Traditional MS SQL Server quotes Keywords in &UPPER CASE When set, the SQL keywords are completed in UPPER CASE letters. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Remote 원격 CA certificates CA 증명서 Subject CN 제목 CN Common Name 일반 이름 Subject O 제목 O Organization 기관 Valid from 유효날짜(시작) Valid to 유효날짜(끝) Serial number 시리얼 넘버 Your certificates 당신의 증명서 File 파일 Subject Common Name 주제 일반 이름 Issuer CN 이슈 등록자 CN Issuer Common Name 이슈 등록자 일반 이름 Clone databases into 데이터베이스 복제하기 Tab size: 탭 크기: SQL editor &font SQL 편집기 폰트(&F) Error indicators 에러 표시 Enabling error indicators highlights the SQL code lines that caused errors during the last execution 에러 표시를 사용하면 가장 최근에 실행하여 에러가 난 SQL 코드 행을 하이라이트 해줍니다 Hori&zontal tiling 화면 수평 나누기(&Z) If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. SQL 코드 에디터와 결과 테이블 뷰가 나란히 표시됩니다. Code co&mpletion 코드 완성(&M) Foreground SQL &results font size &Extensions 확장기능(&E) Select extensions to load for every database: 불러올 확장기능을 선택하세요(확장기능은 모든 데이터베이스에 반영됩니다): Add extension 확장기능 추가 Remove extension 확장기능 제거 <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>SQLite에서는 기본적으로 정규표현식 기능을 제공하지 않습니다만 애플리케이션을 실행하여 호출하는 것은 가능합니다. DB Browser for SQLite에서는 이 알고리즘을 박스 밖에서도 정규표현식을 사용할 수 있도록 이 알고리즘을 구현해줍니다. 하지만 확장기능을 사용하여 외부에서 만든 알고리즘 구현을 사용하고자 한다면 DB Browser for SQLite에서 제공하는 구현 사용을 자유롭게 끌 수 있습니다. 이 기능은 애플리케이션을 재시작해야 합니다.</p></body></html> Disable Regular Expression extension 정규식표현식 확장기능 끄기 Choose a directory 디렉토리를 정하세요 The language will change after you restart the application. 언어 변경은 애플리케이션을 재시작해야 반영됩니다. Select extension file 확장기능 파일을 선택하세요 Extensions(*.so *.dll);;All files(*) 확장기능파일(*.so *.dll);;모든 파일(*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file 인증서 파일 가져오기 No certificates found in this file. 이 파일에는 인증서가 없습니다. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! 정말로 이 인증서를 삭제하겠습니까? 애플리케이션 설정에서 모든 증명 데이터가 삭제될 것입니다! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. QObject Error importing data 데이터 가져오기 에러 from record number %1 레코드 넘버: %1 . %1 . %1 Importing CSV file... CSV 파일 가져오기... Decoding CSV file... CSV 파일 디코딩중... Cancel 취소 Collation needed! Proceed? 콜레이션이 필요합니다! 진행할까요? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! 이 데이터베이스의 테이블은 이 애플리케이션에서 잘 알지못하는 특별한 함수 '%1'가 필요합니다. 이대로 계속 진행할 수는 있습니다만 여러분의 데이터베이스에 나쁜 영향이 갈 수도 있습니다. 백업을 생성하세요! SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite 데이터베이스 파일(*.db *.sqlite *.sqlite3 *.db3);;모든 파일 (*) All files (*) 모든 파일(*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) SQLite 데이터베이스 파일(*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 %1 에 연결할 때 에러가 발생했습니다. Error opening remote file at %1. %2 %1 에 있는 원격 파일을 열 때 에러가 발생했습니다. Error: Invalid client certificate specified. 에러: 올바르지 않은 클라이언트 인증서입니다. Please enter the passphrase for this client certificate in order to authenticate. 인증을 위한 클라이언트 인증서 암호를 입력해주세요. Cancel 취소 Uploading remote database to %1 %2 로 원격 데이터베이스를 업로드 중입니다 Downloading remote database from %1 %1 에서 원격 데이터베이스를 다운로드 중입니다. {1?} The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. 이 원격 데이터베이스는 마지막 체크아웃 한 때를 기준으로 업데이트 되었습니다. 지역 데이터베이스를 최신 버전으로 업데이트 할까요? 그럴 경우 원격에 반영하지 않은 변경 사항들을 모두 사라질 수 있으니 주의하세요! 만약 어떠한 지역 변경 사항을 잃고싶지 않다면 지역 버전을 열지 마세요. Uploading remote database to %1. %2 로 원격 데이터베이스 업로드 중입니다. Downloading remote database from %1. %1 에서 원격 데이터베이스 다운로드 중입니다. Error: The network is not accessible. 에러: 네트워크가 접근할 수 없습니다. Error: Cannot open the file for sending. 에러: 보낼 파일을 열 수 없습니다. Error opening local databases list. %1 지역 데이터베이스 목록을 열 때 에러가 발생했습니다. %1 Error creating local databases list. %1 지역 데이터베이스 목록을 생성할 때 에러가 발생했습니다. %1 RemoteDock Remote 원격 B&rowse 찾아보기(&r) Local 지역 Identity 아이디 Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. 현재 선택한 아이디를 사용해서해당 아이디로 연결된 원격 서버에 접속합니다. Go 접속하기 Push currently opened database to server 현재 열린 데이베이스를 서버로 반영(Push)합니다 <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> <html><head/><body><p>이 화면에서는 dbhub.io 웹사이트의 원격 데이터베이스를 DB4S에 추가할 수 있습니다. 그러기 위해서는 먼저 아이디를 추가해야 합니다.:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">여러분의 깃허브, 구글 계정 등 소셜 로그인 등을 사용해서 dbhub.io 웹사이트에 로그인한 후</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DB4S 인증서 생성 버튼을 누르세요. (네, 이게 바로 여러분의 아이디입니다.) 거기서 여러분의 인증서 파일을 받을 수 있습니다.(사용하려는 컴퓨터 하드에 저장하세요).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DB4S 환경설정의 원격 탭으로 가셔서 DB4S를 위한 새 인증서 추가하기 버튼을 눌러 방금 다운받은 인증서 파일을 추가하세요.</li></ol><p>이제 원격 화면에서 여러분의 아이디를 볼 수 있고 원격 데이터베이스를 추가할 수 있습니다..</p></body></html> RemoteModel Name 이름 Version 버전 Last modified 마지막 수정 Size 크기 Commit 커밋 bytes 바이트 RemotePushDialog Push database 데이터베이스 푸시(Push) Database na&me to push to 푸시할 데이터베이스 이름 Commit message 커밋 메시지 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence 데이터베이스 라이센스 Public 공개 Branch 브랜치 Force push 강제 푸쉬 Database will be public. Everyone has read access to it. 공개 데이터베이스로 지정합니다. 누구나 읽기 접근이 가능합니다. Database will be private. Only you have access to it. 비공개 데이터베이스로 지정합니다. 당신만 접근할 수 있습니다. Use with care. This can cause remote commits to be deleted. 주의해서 사용하세요. 원격 커밋을 삭제하는 결과를 초래할 수 있습니다. Unspecified 미지정 SqlExecutionArea Form Find previous match [Shift+F3] 이전 찾기 [쉬프트+F3] Find previous match with mapping 맵핑된 이전 일치내역 검색하기 Shift+F3 쉬프트+F3 The found pattern must be a whole word 온전한 낱말 일치 검색패턴 Whole Words 온전한 낱말 일치 Text pattern to find considering the checks in this frame 이 프레임 안에서 확인하기 위해 검색하고자 하는 문자열 패턴 Find in editor 편집기 내에서 찾기 The found pattern must match in letter case 대소문자 일치 검색패턴 Case Sensitive 대소문자 일치 Find next match [Enter, F3] 다음 찾기 [엔터,F3] Find next match with wrapping 랩핑으로 다음 찾기 F3 F3 Interpret search pattern as a regular expression 검색패턴 정규식 사용 <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>체크하면패턴을 UNIX 정규표현식으로 처리합니다. 정규표현식에 대해서는 <a href="https://en.wikibooks.org/wiki/Regular_Expressions">위키북스의 정규표현식(영문)</a>을 참고하세요.</p></body></html> Regular Expression 정규표현식 Close Find Bar 검색바 닫기 <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements 가장 최근 실행 구문 결과 This field shows the results and status codes of the last executed statements. 이 필드는 가장 최근이 실행된 구문의 결과와 상태 코드를 보여줍니다. Export to &CSV CSV로 내보내기(&C) Save as &view 뷰로 저장하기(&V) Save as view 뷰로 저장하기 Please specify the view name 뷰 이름을 지정해주세요 There is already an object with that name. Please choose a different name. 이지 같은 이름의 객체가 존재합니다. 다른 이름을 고르세요. View successfully created. 뷰 생성 성공. Error creating view: %1 뷰 생성 에러: %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. (X) abs(X) 함수는 숫자 매개변수 X의 절대값을 리턴합니다. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. () changes() 함수는 가장 최근에 실행된 INSERT, DELETE, UPDATE 구문에서 데이터베이스에서 변경되거나 추가되거나 삭제된 행 수를 리턴합니다. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1,X2,...) char(X1,X2,...,XN) 함수는 각각의 X1에서 XN 숫자 값의 유니코드 포인트 값을 가진 문자들로 구성된 문자열을 리턴합니다. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y,...) coalesce() 함수는 첫번째 NULL이 아닌 인자값의 사본을 리턴합니다. 만약 인자값이 모두 NULL이라면 NULL을 리턴합니다 (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) glob(X,Y) 함수는 "Y GLOB X" 표현식과 같습니다. (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) ifnull() 함수는 첫번째 NULL이 아닌 인자값의 사본을 리턴합니다. 만약 인자값 둘 다 NULL이라면 NULL을 리턴합니다. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X,Y) instr(X,Y) 함수는 문자열 X에서 문자열 Y가 있다면 첫 글자 위치 + 1 값을 리턴합니다. 만약 문자열 X에서 문자열 Y가 발견되지 않는다면 0을 리턴합니다. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) hex() 함수는 매개변수를 BLOB으로 변환한 후 blob의 내용을 대문자 16진수 문자열로 변환하여 리턴합니다. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. () last_insert_rowid() 함수는 함수가 호출된 데이터베이스 연결에서 가장 최근이 추가된 행의 ROWID를 리턴합니다. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X) 문자열 변수 X를 위한 것으로 length(X) 함수는 첫 번째 NUL 문자를 만날 때 까지의 (바이트 수가 아닌)문자 수를 리턴합니다. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y) like() 함수는 "Y LIKE X" 표현식을 구현하기위해 사용합니다. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X,Y,Z) like() 함수는 "Y LIKE X ESCAPE Z" 표현식을 구현하기위해 사용합니다. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. (X) load_extention(X) 함수는 SQLite 확장기능을 사용하기 위하여 X라 이름지어진 공유라이브러리 파일을 외부에서 불러올 때 사용합니다. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. (X, Y) load_extention(X) 함수는 SQLite 확장기능을 사용하기 위하여 X라 이름지어진 공유라이브러리 파일을 엔트리 포인트 Y를 사용하여 외부에서 불러올 때 사용합니다. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) lower(X) 함수는 문자열 X에서 모든 ASCII 문자를 소문자로 변경한 문자열 사본을 리턴합니다. (X) ltrim(X) removes spaces from the left side of X. (X) ltrim(X) 함수는 X의 좌측의 공백여백을 제거합니다. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y) ltrim(X,Y) 함수는 X의 좌측에서 Y에 있는 모든 문자를 제거한 문자열을 리턴합니다. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) 다중 인자를 제공하는 max() 함수는 주어진 인자값 중에서 가장 큰 값을 리턴합니다. 만약 주어진 인자 중에 NULL이 하나라도 있으면 NULL을 리턴합니다. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) 다중 인자를 제공하는 min() 함수는 주어진 인자값 중에서 가장 작은 값을 리턴합니다. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. Y) nullif(X,Y) 함수는 두 인자값이 서로 다르면 X를 리턴하고 두 인자값이 같으면 NULL을 리턴합니다. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (FORMAT,...) printf(FORMAT,...) SQL 함수는 sqlite3_mprintf() C-언어 함수와 표준 C 라이브러리에서의 printf() 함수처럼 동작합니다. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. (X) quote(X) 함수는 X를 SQL문 안에 포함되기에 적절하도록 SQL 리터럴 문자열로 리턴합니다. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. () random() 함수는 -9223372036854775808와 +9223372036854775807 사이의 pseudo-랜덤 정수를 리턴합니다. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (N) randomblob(N) 함수는 psedo-랜덤 바이트를 포함한 N-바이트 blob을 리턴합니다. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X,Y,Z) replace(X,Y,Z) 함수는 문자열 X에 있는 모든 문자열 Y를 Z로 치환한 문자열을 리턴합니다. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X) round(X) 함수는 부동소수점 값 X를 0의 자리에서 반올림한 값을 리턴합니다. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X,Y) round(X,Y) 함수는 부동소수점 값 X를 소수점 우측에서 Y자리에서 반올림한 값을 리턴합니다. (X) rtrim(X) removes spaces from the right side of X. (X) rtrim(X)은 X의 우측 공백을 제거합니다. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X,Y) rtrim(X,Y) 함수는 X의 우측에서 Y에 있는 모든 문자를 삭제한 문자열을 리턴합니다. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X) soundex(X) 함수는 문자열 X의 사운덱스 인코딩 문자열을 리턴합니다. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y) substr(X,Y) 함수는 문자열 X에서 Y번째부터 끝까지 모든 문자열을 리턴합니다. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. (X,Y,Z) substr(X,Y,Z) 함수는 문자열 X에서 Y번째 문자부터 Z문자 수만큼 리턴합니다. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. () total_changes() 함수는 현재 데이터베이스 연결이 열린 후 INSERT, UPDATE, DELETE 구문에 의해서 변경된 레코드 행 수를 리턴합니다. (X) trim(X) removes spaces from both ends of X. (X) trim(X) 함수는 X의 양쪽 공백을 제거합니다. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X,Y) trim(X,Y) 함수는 X의 양끝에서 Y에 해당하는 문자들을 삭제한 문자열을 리턴합니다. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) typeof(X) 함수는 표현식 X의 데이터타입을 나타내는 문자열을 리턴합니다. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) unicode(X) 함수는 문자열 X의 첫 글자에 해당하는 숫자 유니코드 포인트를 리턴합니다. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (X) upper(X) 함수는 입력 문자열 X에서 ASCII 문자에 해당하는 글자를 대문자로 변경한 문자열 사본을 리턴합니다. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (N) zeroblob(N) 함수는 N 바이트의 0x00으로 이루어진 BLOB을 구성하여 리턴합니다. (timestring,modifier,modifier,...) (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) avg() 함수는 그룹에서 모든 NULL이 아닌 X의 값의 평균을 리턴합니다. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) count(X) 함수는 그룹에서 NULL이 아닌 개수를 세어 리턴합니다. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X) group_concat() 함수는 X의 모든 NULL이 아닌 값들의 문자열로 합쳐서 리턴합니다. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X,Y) group_concat() 함수는 X의 모든 NULL이 아닌 값들의 문자열로 합쳐서 리턴합니다. 만약 매개변수 Y가 있다면 값들을 문자열로 합칠 때 구분자로 사용합니다. (X) The max() aggregate function returns the maximum value of all values in the group. (X) max() 집계 함수는 그룹에서 모든 값들 중 가장 큰 값을 리턴합니다. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) min() 집계 함수는 그룹에서 NULL이 아 닌모든 값들 중 가장 작은 값을 리턴합니다. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) sum(x)과 total() 집계 함수는 그룹의 모든 NULL이 아닌 값들의 합을 리턴합니다. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (N) 인자 N은 정수로 취급됩니다. 이 함수는 ORDER BY 구문이 있다면 그 순서대로, 없다면 임의의 순서로 가능하면 균등하게 N개의 그룹으로 나누고 각 그룹에 1부터 N 사이의 정수를 할당합니다. 필요한 경우 큰 그룹이 먼저 나옵니다. 이 함수는 현재 행이 속해있는 그룹이 할당된 정수를 리턴합니다. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. SqliteTableModel References %1(%2) Hold Ctrl+Shift and click to jump there 참조 %1(%2) Ctrl+Shift를 누른 상태에서 점프하고자 하는 곳을 클릭하세요 reading rows 행을 읽는 중 loading... 로딩 중... References %1(%2) Hold %3Shift and click to jump there 참조 %1(%2) %3Shift를 누른 상태에서 점프하고자 하는 곳을 클릭하세요 Error changing data: %1 데이터 수정 에러: %1 retrieving list of columns 컬럼은 필드로 표현합니다. 필드들의 모든 가져오기 Fetching data... 데이터를 가져오는 중입니다... Cancel 취소 VacuumDialog Compact Database 데이터베이스 크기 줄이기(Vacuum) Warning: Compacting the database will commit all of your changes. 주의: 데이터베이스 크기 줄이기를 하면 저장되지 않은 모든 수정사항이 반영됩니다. Please select the databases to co&mpact: 크기를 줄일 데이터베이스를 선택하세요(&m): Warning: Compacting the database will commit all changes you made. 주의: 데이터베이스 크기 줄이기를 하면 저장되지 않은 모든 수정사항이 반영됩니다. Please select the objects to compact: 크기를 줄일 객체를 선택하세요: sqlitebrowser-3.11.2/src/translations/sqlb_pl.ts000066400000000000000000007531331345112435200220330ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite O Przeglądarce baz danych dla SQLite Version Wersja <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>Preglądarka Bazy Danych dla SQLite jest darmowym otwartym oprogramowaniem przeznaczonym do wizualnej edycji i kreacji plików bazy danych SQLite.</p><p>Program podlega podwójnej licencji użytkowania: Publiczna licencja Mozilli Wersja 2 jak również Powszechna Licencja Publiczna GNU wersja 3 i poźniejsza. Możesz modyfikować i rozpowszechniać program pod warunkami zawartymi w tych licencjach.</p><p>Zobacz <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> i <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> dla szczegołów.</p><p>Odwiedź naszą stronę internetową aby zapoznać się z informacją na temat diałania tego programu: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">To oprogramowanie używa GPL/LGPL Qt Toolkit z: </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Zobacz </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> na temat licancji i użytkowania.</span></p><p><span style=" font-size:small;">Używany również jest zestaw ikon Silk stworzony przez Mark James pod licencjią Creative Commons Attribution 2.5 i 3.0.<br/>Zobacz </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> dla dalszej informacji.</span></p></body></html> (based on SQLite %1) Version Wersja Built for Qt Version Wersja Qt SQLCipher Version Wersja SQLCipher SQLite Version Wersja SQLite AddRecordDialog Add New Record Nowy rekord Enter values for the new record considering constraints. Fields in bold are mandatory. Podaj wartości dla nowego rekordu zwracając uwagę na ograniczenia.Pola wytłusczone są obowiązkowe. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. W kolumnie Wartość możesz podać wartość dla pola identyfikowanego w kolumnie Nazwa. Kolumna Rodzaj wskazuje rodzaj pola. Wartości domyślne są wyświetlane w tym samym stylu, co wartości NULL. Name Nazwa Type Rodzaj Value Wartość Values to insert. Pre-filled default values are inserted automatically unless they are changed. Wartości do wstawienia. Pola wypełnione są automatycznie domyślnymi wartościami wtedy tylko gdy te wartości nie są ręcznie zmienione. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. Tutaj pokazana jest kwerenda SQL dla dodania nowego rekordu zawierającego wartości wprowadzone w górnej ramce. Możesz ją ręcznie zmienić przed zapisem rekordu. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">Zapisz</span> przekarze wyświetlone zapytanie SQL do bazy danych w celu zapisania nowego rekordu</p><p><span style=" font-weight:600;">Przywróć domyślne</span> przywróci wstępne wartości domyślne w kolumnie<span style=" font-weight:600;">Wartość</span></p><p><span style=" font-weight:600;">Anuluj</span> zamyka to okno bez robienia zmian.</p></body></html> Auto-increment Unique constraint Unikat Check constraint: %1 Weryfikator: %1 Foreign key: %1 Klucz obcy: %1 Default value: %1 Wartość domyślna: %1 Error adding record. Message from database engine: %1 Wystąpił błąd podczas dodawania rekordu. Baza danych podała następujący komunikat: %1 Are you sure you want to restore all the entered values to their defaults? Jesteś pewien że chcesz przywrócić domyślne wartości dla wszystich wpisów? Application Usage: %1 [options] [db] Użycie: %1 [opcje] [baza danych] Possible command line arguments: Dozwolone agrumenty wiersza poleceń: -h, --help Show command line options -h, --help Wyświetla opcje wiersza poleceń -q, --quit Exit application after running scripts -q, --quit Zamyka aplikację po wykonaniu skryptów -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [plik] Wykonuje plik SQL po otworzeniu bazy danych -t, --table [table] Browse this table after opening the DB -t, --table [tabela] Wyświetla tę tabelę po otworzeniu bazy danych -R, --read-only Open database in read-only mode -R, --read-only Otwiera bazę danych w trybie tylko do odczytu -o, --option [group/setting=value] Run application with this setting temporarily set to value -v, --version Display the current version -v, --version Wyświetla obecną wersję [file] Open this SQLite database [plik] Otwiera bazę danych SQLite This is DB Browser for SQLite version %1. Oto Przeglądarka baz danych dla SQLite w wersji %1. The -s/--sql option requires an argument Opcja -s/--sql wymaga argumentu The file %1 does not exist Plik %1 nie istnieje The -t/--table option requires an argument Opcja -t/--table wymaga argumentu The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 Nieprawidłowa opcja lub nieistniejący plik: %1 CipherDialog SQLCipher encryption Szyfrowanie SQLCipher &Password &Hasło &Reenter password Powtó&rz hasło Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze Ro&zmiar strony &KDF iterations HMAC algorithm KDF algorithm Passphrase Hasło Raw key Klucz Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Proszę podaj klucz do zaszyfrowania bazy danych. Zwróć uwagę na to że wszelkie zmiany wprowadzone tutaj do opcjonalnych ustawień bedą wymagane przy każdym otwarciu pliku. W celu deaktywacji szyfrowania pozostaw pola klucza puste. Proces szyfrowania może zabrać dużo czasu w zależności od wielkości bazy danych. Zaleca się aby przed rozpoczęciem tego procesu zrobić kopię zapasową pliku. Wszelkie nie zapisane zmiany będą wprowadzone do bazy danych zanim szyfrowanie się rozpocznie. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. Proszę podać hasło do zaszyfrowania bazy danych. Jeśli zostały zmienione jakiekolwiek dodatkowe ustawienia dla pliku tej bazy danych będziesz musiał również podać tą informację. ColumnDisplayFormatDialog Choose display format Wybierz format wyświetlania Display format Format wyświetlania Choose a display format for the column '%1' which is applied to each value prior to showing it. Wybierz domyślny format wyświetlania dla kolumny '%1', który jest zastosowany dla każdej wartości zanim ona zostanie pokazana. Default Domyślny Decimal number Zapis dziesiętny Exponent notation Postać wykładnika Hex blob Blob szestnastkowy Hex number Numer szestnastkowy Octal number Numer ósemkowy Round number Liczba zaokrąglona Apple NSDate to date Apple NSDate do daty Java epoch (milliseconds) to date Java epoch (milisekundy) do daty Julian day to date Data Juliańska do daty Unix epoch to date Unix epoch do daty Unix epoch to local time Unix epoch do czasu lokalnego Windows DATE to date Windows DATE do daty Date as dd/mm/yyyy Data w formacie dd/mm/rrrr Lower case Małe litery Upper case Duże litery Custom Niestandardowy DBBrowserDB This database has already been attached. Its schema name is '%1'. Baza danych została już załączona. Nazwa jej schematu to '%1'. Please specify the database name under which you want to access the attached database Proszę podaj nazwę bazy danych za pomocą której chcesz uzyskać dostęp do załączonej bazy Invalid file format Nieprawidłowy format pliku Do you really want to close this temporary database? All data will be lost. Czy na pewno chcesz zamknąć tę tymczasową bazę danych? Wszelkie zmiany bedą zapomniane. Do you want to save the changes made to the database file %1? Czy na pewno chcesz zapisać zmiany dokonane w pliku bazy danych %1? The database is currently busy: Baza danych jest obecnie zajęta: Do you want to abort that other operation? Czy na pewno chcesz przerwać tą inną operację? Exporting database to SQL file... Eksportowanie bazy danych do pliku SQL… Cancel Anuluj No database file opened Plik z bazą danych nie jest obecnie otwarty Executing SQL... Wykonywanie SQL… Action cancelled. Anulowano akcję. Error in statement #%1: %2. Aborting execution%3. Błąd w poleceniu #%1: %2. Przerywam wykonywanie%3. and rolling back i przywracam didn't receive any output from %1 could not execute command: %1 Cannot delete this object Nie można usunąć tego obiektu Cannot set data on this object Nie można ustawić danych na tym objekcie A table with the name '%1' already exists in schema '%2'. Tabela o nazwie '%1' już istnieje w schemacie '%2'. renameColumn: cannot find column %1. renameColumn(zmiana nazwy kolumny): nie można odnaleźć kolumny %1. renameColumn: creating savepoint failed. DB says: %1 renameColumn(zmiana nazwy kolumny): błąd przy zapisie. Baza Danych zwraca: %1 renameColumn: creating new table failed. DB says: %1 renameColumn(zmiana nazwy kolumny): tworzenie nowej tabeli nie powiodło się. Baza danych zwróciła: %1 renameColumn: copying data to new table failed. DB says: %1 renameColumn(zmiana nazwy kolumny): kopiowanie danych do nowej tabeli nie powiodło się. Baza danych zwróciła: %1 renameColumn: deleting old table failed. DB says: %1 renameColumn(zmiana nazwy kolumny): usuwanie starej tabeli nie powiodło się. Baza danych zwróciła: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: Wystąpił błąd przy odtworzeniu niektórych obiektów powiązanych z tą bazą danych. Błędy tego rodzaju występują za zwyczaj w przypadku zmiany nazw niektórych kolumn. Sprawdź dokładnie następującą kwerendę SQL. Po dokonaniu zmian możesz ją ręcznie uruchomić: renameColumn: releasing savepoint failed. DB says: %1 renameColumn(zmiana nazwy kolumny): Wystąpił błąd podczas odłączenia punktu zapisu. Baza danych podała następujący komunikat: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Błąd podczas zmiany nazwy tabeli '%1' na '%2'. Wiadomość z silnika bazy danych: %3 ... <string can not be logged, contains binary data> ... ... <string nie można zalogować zawiera dane w postaci binarnej> ... could not get list of db objects: %1, %2 nie mogę pobrać listy obiektów bazy danych: %1, %2 could not get list of databases: %1 nie mogę odczytać listy baz danych: %1 didn't receive any output from pragma %1 nie otrzymałem żadnego wyniku od pragmy %1 could not execute pragma command: %1, %2 nie mogłem wykonać polecenia pragmy: %1, %2 Error setting pragma %1 to %2: %3 Błąd przy ustawianiu pragmy %1 do %2: %3 File not found. Nie znaleziono pliku. Error loading extension: %1 Wystąpił błąd przy ładownaniu rozszerzenia: %1 could not get column information nie można uzyskać informacji o kolumnie DbStructureModel Name Nazwa Object Obiekt Type Typ Schema Schemat Database Baza danych Browsables Obiekty do przeglądania All Wszystkie Temporary Tymczasowa Tables (%1) Tabele (%1) Indices (%1) Indeksy (%1) Views (%1) Wyświetlenia (%1) Triggers (%1) Uruchomienia (%1) EditDialog Edit database cell Edytuj komórkę bazy danych Mode: Tryb: This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. To jest lista dostępnych trybów dla edytora komórek. Wybierz tryb do wyświetlania lub edycji danych dla tej komórki. Text Tekst Binary Wartość binarna Image Obraz JSON JSON XML XML Automatically adjust the editor mode to the loaded data type Automatycznie dostosuj tryb edytora w zależności od załadowanych danych This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Auto-switch Automatyczny przełącznik Auto-format: pretty print on loading, compact on saving. Auto-formatowanie: upiększa tekst przy ładowaniu i kompaktuje przy zapisywaniu. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Autoformat Automatyczne formatowanie Import from file Importuj z pliku Opens a file dialog used to import any kind of data to this database cell. Otwiera okno wyboru pliku z danymi do zaimportowania w tej komórce. &Import &Importuj Export to file Eksportuj do pliku Opens a file dialog used to export the contents of this database cell to a file. Otwiera okno pozwalające na wyeksportowanie zawartości komórki do pliku. &Export &Eksportuj Set this cell to NULL Ustaw zawartość tej komórki jako NULL Erases the contents of the cell Czyści zawartość komórki Set as &NULL Ustaw jako &NULL This area displays information about the data present in this database cell Tutaj wyświetlane są informacje o danych obecnych w tej komórce This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Type of data currently in cell Rodzaj danych obecnie znajdujących się w komórce Size of data currently in table Rozmiar danych znajdujących się obecnie w tabeli Apply data to cell [Ctrl+Return] Zapisz dane w komórce [Ctrl+Return] This button saves the changes performed in the cell editor to the database cell. Ten przycisk zapisuje zmiany wykonane w edytorze komórki w komórce bazy danych. Apply Zastosuj Print... Drukuj... Open preview dialog for printing displayed image Otwórz podgląd wydruku dla aktualnie wyświetlonego obrazu Ctrl+P Ctrl+P Open preview dialog for printing displayed text Copy Hex and ASCII Kopiuj Hex i ASCII Copy selected hexadecimal and ASCII columns to the clipboard Ctrl+Shift+C Ctrl+Shift+C Image data can't be viewed in this mode. Obrazy nie mogą zostać wyświetlone w tym trybie. Try switching to Image or Binary mode. Przejdź do trybu obrazu lub wartości binarnej. Binary data can't be viewed in this mode. Wartość binarna nie może być wyświetlona w tym trybie. Try switching to Binary mode. Przejdź do trybu wartości binarnej. Text files (*.txt) Pliki Tekstowe (*.txt) JSON files (*.json) Pliki JSON (*.json) XML files (*.xml) Pliki XML (*.xml) Image files (%1) Piki graficzne (%1) Binary files (*.bin) Pliki Binarne (*.bin) All files (*) Wszystkie pliki (*) Choose a file to import Wybierz plik do zaimportowania %1 Image %1 Grafika SVG files (*.svg) Pliki SVG (*.svg) Hex dump files (*.txt) Plik szesnastkowy (*.txt) Text files (*.txt);;Image files (%1);;JSON files (*.json);;XML files (*.xml);;Binary files (*.bin);;All files (*) Pliki tekstowe (*.txt);;Pliki obrazów (%1);;Pliki JSON (*.json);;Pliki XML (*.xml);;Pliki binarne (*.bin);;Wszystkie pliki (*) Binary files(*.bin);;All files(*) Pliki binarne(*.bin);;Wszystkie pliki(*) Text files(*.txt);;All files(*) Pliki tekstowe(*.txt);;Wszystkie pliki(*) JSON files(*.json);;All files(*) Pliki JSON(*.json);;Wszystkie pliki(*) SVG files(*.svg);;All files(*) Pliki SVG(*.svg);;Wszystkie pliki(*) Choose a filename to export data Wybierz nazwę pliku dla wyeksportowanych danych Invalid data for this mode Nieprawidłowe dane w tym trybie The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? Type of data currently in cell: Text / Numeric Rodzaj danych obecnie znajdujących się w komórce: Tekst/Liczba %n char(s) %n znak %n znaki %n znaków Type of data currently in cell: %1 Image Rodzaj danych obecnie znajdujących się w komórce: Obraz %1 %1x%2 pixel(s) %1x%2 piksel(e) Type of data currently in cell: NULL Rodzaj danych obecnie znajdujących się w komórce: NULL %n byte(s) %n bajt %n bajty %n bajtów Type of data currently in cell: Valid JSON Rodzaj danych obecnie znajdujących się w komórce: Prawidłowy JSON Type of data currently in cell: Binary Rodzaj danych obecnie znajdujących się w komórce: Wartość binarna EditIndexDialog Edit Index Schema Edytuj Schemat Indeksu &Name &Nazwa &Table &Tabela &Unique &Unikalny For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Partial inde&x clause Colu&mns Kolu&mny Table column Kolumna tabeli Type Rodzaj Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Index column Kolumna indeksu Order Porządek Deleting the old index failed: %1 Usuwanie starego indeksu nie powiodło się: %1 Creating the index failed: %1 Tworzenie indeksu nie powiodło się: %1 EditTableDialog Edit table definition Edytuj definicję tabeli Table Tabela Advanced Zaawansowane Database schema Schemat bazy danych Without Rowid Bez ID rzędu Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Fields Pola Add field Dodaj pole Remove field Usuń pole Move field up Przesuń pole w górę Move field down Przesuń pole w dół Name Nazwa Type Rodzaj NN NN Not null Nie pusty PK PK Primary key AI AI Autoincrement U U Unique Unikatowy Default Domyślny Default value Domyślna wartość Check Sprawdź Check constraint Foreign Key <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> Error creating table. Message from database engine: %1 There already is a field with that name. Please rename it first or choose a different name for this field. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Column '%1' has no unique data. Kolumna '%1' nie zawiera unikatowych danych. Modifying this column failed. Error returned from database: %1 Modyfikowanie kolumny nie powiodło się. Otrzymany błąd: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Setting the rowid column for the table failed. Error message: %1 Changing the table schema failed. Error message: %1 Zmiana schematu tabeli nie powiodła się. Wiadomość o błędzie: %1 ExportDataDialog Export data as CSV Eksportuj dane jako CSV Tab&le(s) Tabe&la/e Colu&mn names in first line Nazwy kolu&mn w pierwszym wierszu Fie&ld separator Znak oddzie&lający pola , , ; ; Tab Tab | | Other Inny &Quote character &Znak cytatu " " ' ' New line characters Znak nowej linii Windows: CR+LF (\r\n) Windows: CR+LF (\r\n) Unix: LF (\n) Unix: LF (\n) Pretty print Upiększ wydruk Export data as JSON Eksportuj dane jako JSON exporting CSV eksportowanie CSV Could not open output file: %1 Nie można otworzyć pliku wyjściowego: %1 exporting JSON eksportowanie JSON Text files(*.csv *.txt) Pliki tekstowe(*.csv *.txt) Text files(*.json *.js *.txt) Pliki tekstowe(*.json *.js *.txt) Choose a filename to export data Wybierz nazwę pliku dla eksportowanych danych Please select at least 1 table. Wybierz przynajmniej jedną tabelę. Choose a directory Wybierz położenie Export completed. Eksportowanie zakończone. ExportSqlDialog Export SQL... Eksportuj SQL… Tab&le(s) Tabel&a/e Select All Zaznacz wszystkie Deselect All Odznacz wszystkie &Options &Opcje Keep column names in INSERT INTO Pozostaw nazwy kolumn w INSERT INTO Multiple rows (VALUES) per INSERT statement Wiele rzędów (Wartości) dla polecenia INSERT Export everything Eksportuj wszystko Export schema only Eksportuj tylko schemat Export data only Eksportuj tylko dane Keep old schema (CREATE TABLE IF NOT EXISTS) Zachowaj poprzedni schemat (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Zastąp poprzedni schemat (DROP TABLE, then CREATE TABLE) Please select at least one table. Wybierz przynajmniej jedną tabelę. Choose a filename to export Wybierz nazwę eksportowanego pliku Text files(*.sql *.txt) Pliki tekstowe(*.sql *.txt) Export completed. Eksportowanie zakończono. Export cancelled or failed. Eksportowanie nie powiodło się lub zostało anulowane. ExtendedScintilla Ctrl+H Ctrl+H Ctrl+P Ctrl+P Find and Replace... Znajdź i zamień… Print... Drukuj... ExtendedTableWidget Use as Exact Filter Containing Not equal to Greater than Less than Greater or equal Less or equal Between this and... Set to NULL Ustaw jako NULL Copy Kopiuj Copy with Headers Copy as SQL Paste Wklej Print... Drukuj... Use in Filter Expression Use as Filter Użyj jako filtru Alt+Del Alt+Del Ctrl+Shift+C Ctrl+Shift+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? FileExtensionManager Dialog Okno dialogowe File Extension Manager Menadżer Rozszerzeń Plików &Up &W górę &Down W &dół &Add Dod&aj &Remove &Usuń Description Opis Extensions Rozszerzenia *.extension *.extension FilterLineEdit Filter Filtr These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Set Filter Expression What's This? Is NULL Is not NULL Is empty Is not empty Equal to... Not equal to... Greater than... Less than... Greater or equal... Less or equal... In range... FindReplaceDialog Find and Replace Znajdź i zastąp Fi&nd text: Z&najdź tekst: Re&place with: Zamień &z: Match &exact case Match &only whole words When enabled, the search continues from the other end when it reaches one end of the page &Wrap around When set, the search goes backwards from cursor position, otherwise it goes forward Search &backwards Szukaj &na odwrót <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Use regular e&xpressions Find the next occurrence from the cursor position and in the direction set by "Search backwards" &Find Next Z&najdź następne &Replace &Zastąp Highlight all the occurrences of the text in the page Podświetl wszystkie wystąpienia tekstu na stronie F&ind All Znajdź wszystk&ie Replace all the occurrences of the text in the page Zastąp wszystkie wystąpienia w tekście na stronie Replace &All Z&amień wszystkie The searched text was not found Nie znaleziono szukanego tekstu The searched text was not found. Nie znaleziono szukanego tekstu. The searched text was found one time. Szukany tekst został znaleziony raz. The searched text was found %1 times. Szukany tekst został znaleziony %1 razy. The searched text was replaced one time. Szukany tekst został zamieniony raz. The searched text was replaced %1 times. Szukany tekst został zamieniony %1 razy. ForeignKeyEditor &Reset &Resetuj Foreign key clauses (ON UPDATE, ON DELETE etc.) ImportCsvDialog Import CSV file Importuj plik CSV Table na&me &Nazwa tabeli &Column names in first line &Nazwy kolumn w pierwszej linii Field &separator &Znak oddzielający pola , , ; ; Tab Tab | | Other Inny &Quote character Znak &cytatów " " ' ' &Encoding Kodowani&e UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? Przycinać pola? Separate tables Oddzielaj tabele Advanced Zaawansowane When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Ignore default &values Ignoruj domyślne &wartości Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Fail on missing values Disable data type detection Wyłącz wykrywanie rodzajów danych Disable the automatic data type detection when creating a new table. Wyłącz automatyczne wykrywanie rodzaju danych przy tworzeniu nowej tabeli. Deselect All Odznacz wszystkie Match Similar Import completed Zakończono importowanie Select All Zaznacz wszystkie There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. Tabela o nazwie '%1' już istnieje i importowanie do istniejącej tabeli jest możliwe tylko gdy liczba kolumn zgadza się. There is already a table named '%1'. Do you want to import the data into it? Tabela o nazwie '%1' już istnieje. Czy chcesz zaimportować dane do niej? Creating restore point failed: %1 Creating the table failed: %1 Tworzenie tabeli nie powiodło się: %1 importing CSV importowanie CSV Inserting row failed: %1 Wstawianie rzędu nie powiodło się: %1 Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. MainWindow DB Browser for SQLite Przeglądarka baz danych dla SQLite Database Structure Struktura bazy danych <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. toolBar1 toolBar1 This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Browse Data Przeglądaj dane &Table: &Tabela: Select a table to browse data Wybierz tabelę aby przeglądać dane Use this list to select a table to be displayed in the database view Użyj tej listy aby zaznaczyć tabelę wyświetlaną w widoku bazy danych Refresh the data in the selected table [F5, Ctrl+R] Odśwież dane w zaznaczonej tabeli [F5, Ctrl+R] This button refreshes the data in the currently selected table. Ten przycisk odświeża dane w obecnie zaznaczonej tabeli. Clear all filters Wyczyść wszystkie filtry This button clears all the filters set in the header input fields for the currently browsed table. Save the table as currently displayed Zapisz tabelę tak, jak jest widoczna <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> ... Insert a new record in the current table Umieść nowy rekord w obecnej tabeli This button creates a new, empty record in the database Ten przycisk tworzy nowy, pusty rekord w bazie danych New Record Nowy rekord Delete the current record Usuń obecny rekord This button deletes the record or records currently selected in the table Ten przycisk usuwa obecnie zazanczony rekord lub rekordy z tabeli Delete Record Usuń rekord This is the database view. You can double-click any record to edit its contents in the cell editor window. To jest widok bazy danych. Możesz nacisnąć dwukrotnie na rekord, aby zedytować jego zawartość w oknie edytora komórek. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Przewiń na początek</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Naciśnięcie tego przycisku kieruje na początek powyższego widoku tabeli.</p></body></html> |< |< Scroll one page upwards Przewiń jedną stronę w górę <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html><head/><body><p>Naciśnięcie tego przycisku przenosi o jedną stronę wyżej w powyższym widoku tabeli.</p></body></html> < < 0 - 0 of 0 0 - 0 z 0 Scroll one page downwards Przewiń jedną stronę w dół <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>Naciśnięcie tego przycisku przenosi o jedną stronę niżej w powyższym widoku tabeli.</p></body></html> > > Scroll to the end Przewiń na koniec <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Naciśnięcie tego przycisku przenosi na koniec powyższego widoku tabeli.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>Naciśnij tutaj aby przejść do określonego rekordu</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> Go to: Przejdź do: Enter record number to browse Wprowadź numer rekordu do przeglądania Type a record number in this area and click the Go to: button to display the record in the database view 1 1 Edit Pragmas None Brak Delete Usuń Normal Normalne Default Domyślnie File Plik <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version">User Version</a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version">Wersja użytkownika</a></p></body></html> Execute SQL Wykonaj SQL &File &Plik &Import &Importuj &Export &Eksportuj &Edit &Edytuj &View &Widok &Help Po&moc &Tools DB Toolbar Pasek zadań bazy danych Edit Database &Cell Edytuj &komórkę bazy danych SQL &Log Dziennik SQ&L Show S&QL submitted by User Użytkownika Application Aplikację This button clears the contents of the SQL logs Ten przycisk czyści zawartość logów SQL &Clear Wy&czyść This panel lets you examine a log of all SQL commands issued by the application or by yourself &Plot DB Sche&ma Sche&mat bazy danych &Remote Project Toolbar Pasek zadań projektu Extra DB toolbar Dodatkowy pasek zadań bazy danych Close the current database file Zamknij obecny plik bazy danych &New Database... &Nowa baza danych… Create a new database file Utwórz nowy plik bazy danych This option is used to create a new database file. Ta opcja jest wykorzystywana do tworzenia nowego pliku bazy danych. Ctrl+N Ctrl+N &Open Database... &Otwórz bazę danych… Open an existing database file Otwórz istniejącą bazę danych This option is used to open an existing database file. Ta opcja otwiera istniejący plik bazy danych. Ctrl+O Ctrl+O &Close Database Zamknij bazę dany&ch This button closes the connection to the currently open database file Ten przycisk kończy połączenie z obecnie otwartym plikiem bazy danych Ctrl+W Ctrl+W &Revert Changes Odw&róć zmiany Revert database to last saved state Przywróć bazę danych do ostatniego zapisanego stanu This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. &Write Changes &Zapisz zmiany Write changes to the database file Zapisz zmiany w pliku bazy danych This option is used to save changes to the database file. Ta opcja zapisuje zmiany w pliku bazy danych. Ctrl+S Ctrl+S This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Print currently browsed table data [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. Compact &Database... Compact the database file, removing space wasted by deleted records Compact the database file, removing space wasted by deleted records. E&xit &Wyjdź Ctrl+Q Ctrl+Q &Database from SQL file... Baza &danych z pliku SQL… Import data from an .sql dump text file into a new or existing database. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. &Table from CSV file... &Tabela z pliku CSV… Open a wizard that lets you import data from a comma separated text file into a database table. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. &Database to SQL file... Baza &danych fo pliku SQL… Export a database to a .sql dump text file. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. &Table(s) as CSV file... &Tabela/e jako plik CSV… Export a database table as a comma separated text file. Eksportuje tabelę bazy danych jako plik tekstowy, oddzielając wartości przecinkami. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Eksportuje tabelę bazy danych jako plik tekstowym który można zaimportować w innych aplikacjach bazodanowych lub arkuszach kalkulacyjnych; oddzielając wartości przecinkami. &Create Table... &Utwórz tabelę… Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Otwiera okno tworzenia tabel, gdzie można zdefiniować nazwę i pola w nowej tabeli w bazie danych &Delete Table... U&suń tabelę… Delete Table Usuń tabelę Open the Delete Table wizard, where you can select a database table to be dropped. &Modify Table... &Modyfikuj tabelę… Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Create &Index... Utwórz &indeks… Open the Create Index wizard, where it is possible to define a new index on an existing database table. &Preferences... &Preferencje… Open the preferences window. Otwiera okno preferencji. &DB Toolbar Pasek narzędzi bazy &danych Shows or hides the Database toolbar. Pokazuje lub ukrywa pasek narzędzi Baza danych Ctrl+T Ctrl+T W&hat's This? &Co to jest? Shift+F1 Shift+F1 &About &Load Extension... &Wiki Bug &Report... Feature Re&quest... Web&site &Donate on Patreon... Sa&ve Project... Open &Project... &Attach Database... &Set Encryption... This button saves the content of the current SQL editor tab to a file SQLCipher &FAQ Insert Values... Open a dialog for inserting values in a new record Insert new record using default values in browsed table New In-&Memory Database Drag && Drop Qualified Names Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Drag && Drop Enquoted Names Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor &Integrity Check Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. &Foreign-Key Check Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab &Quick Integrity Check Run a quick integrity check over the open DB Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. &Optimize Attempt to optimize the database Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Print Print text from current SQL editor tab [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Print the structure of the opened database [Ctrl+P] Open a dialog for printing the structure of the opened database &About... O progr&amie… &Recently opened Ostatnio otwie&rane Open &tab Otwórz kar&tę This button opens a new tab for the SQL editor Ten przycisk otwiera nową tabelę w edytorze SQL &Execute SQL &Wykonaj SQL Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] Wykonaj wszystkie/zaznaczone SQL [F5, Ctrl+Return, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. Open SQL file Otwórz plik SQL This button opens a file containing SQL statements and loads it in a new editor tab Save SQL file Zapisz plik SQL &Load extension &Załaduj rozszerzenie Execute current line Wykonaj obecny wiersz Execute current line [Shift+F5] Wykonaj obecny wiersz [Shift+F5] This button executes the SQL statement present in the current editor line Ten przycisk wykonuje polecenie SQL z obecnego wiersza edytora Shift+F5 Shift+F5 Export as CSV file Eksportuj jako plik CSV Export table as comma separated values file Eksportuj tabelę jako plik z wartościami oddzielonymi przecinkami &Wiki... &Wiki… Bug &report... &Zgłoś błędy… Web&site... &Strona internetowa… Sa&ve Project &Zapisz projekt Save the current session to a file Zapisz obecną sesję do pliku This button lets you save all the settings associated to the open DB to a DB4S project file Open &Project Otwórz &projekt Load a working session from a file This button lets you open a DB4S project file &Attach Database Z&ałącz bazę danych Add another database file to the current database connection This button lets you add another database file to the current database connection &Set Encryption U&staw szyfrowanie Save SQL file as Zapisz plik SQL jako &Browse Table &Przeglądaj tabelę Copy Create statement Copy the CREATE statement of the item to the clipboard Edit display format Edytuj format wyświetlania Edit the display format of the data in this column Show rowid column Toggle the visibility of the rowid column Set encoding Ustaw kodowanie Change the encoding of the text in the table cells Set encoding for all tables Change the default encoding assumed for all tables in the database SQLCipher &FAQ... &FAQ SQLCipher… Opens the SQLCipher FAQ in a browser window Otwiera FAQ SQLCipher w oknie przeglądarki Table(&s) to JSON... Tabela/e do J&SON… Export one or more table(s) to a JSON file Eksportuj jedną lub więcej tabel do pliku JSON Refresh Odśwież F5 F5 Open Data&base Read Only... Otwórz &bazę danych tylko do odczytu… Open an existing database file in read only mode Otwórz istniejący plik bazy danych w trybie tylko do odczytu Unlock view editing This unlocks the current view for editing. However, you will need appropriate triggers for editing. Save results Zapisz wyniki Save the results view This button lets you save the results of the last executed query Find text in SQL editor Znajdź tekst w edytorze SQL Find text in SQL editor [Ctrl+F] Znajdź tekst w edytorze SQL [Ctrl+F] This button opens the search bar of the editor Ctrl+F Ctrl+F Find or replace text in SQL editor Znajdź lub zastąp tekst w edytorze SQL Find or replace text in SQL editor [Ctrl+H] Znajdź lub zastąp tekst w edytorze SQL [Ctrl+H] This button opens the find/replace dialog for the current editor tab Export to &CSV Eksportuj do &CSV Save as &view Zapisz jako &widok Save as view Zapisz jako widok Hide column(s) Ukryj kolumnę/y Hide selected column(s) Ukryj zaznaczoną/e kolumnę/y Show all columns Pokaż wszystkie kolumny Show all columns that were hidden Pokaż wszystkie ukryte kolumny Shows or hides the Project toolbar. Pokazuje lub ukrywa pasek narzędzi Projekt. Extra DB Toolbar Dodatkowy pasek narzędzi bazy danych Export the filtered data to CSV Eksportuj przefiltrowane dane do CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Save the current filter, sort column and display formats as a view This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Ctrl+Return Ctrl+Return Ctrl+L Ctrl+L Ctrl+P Ctrl+P Ctrl+D Ctrl+D Ctrl+I Ctrl+I Ctrl+E Ctrl+E Encrypted Szyfrowana Database is encrypted using SQLCipher Baza danych jest zaszyfrowana z użyciem SQLCipher Read only Tylko do odczytu Database file is read only. Editing the database is disabled. Plik bazy danych jest tylko do odczytu. Edytowanie bazy danych jest wyłączone. Database encoding Kodowanie bazy danych Choose a database file Wybierz plik bazy danych Could not open database file. Reason: %1 Nie można otworzyć pliku bazy danych. Powód: %1 Choose a filename to save under Wybierz nazwę pliku do zapisu Error adding record: Błąd podczas dodawania rekordu: Error deleting record: %1 Błąd podczas usuwania rekordu: %1 Please select a record first Najpierw wybierz rekord determining row count... określanie liczby rzędów… %1 - %2 of >= %3 %1 - %2 z >= %3 %1 - %2 of %3 %1 - %2 z %3 There is no database opened. Please open or create a new database file. Brak otwartych baz danych. Otwórz lub utwórz nowy plik bazy danych. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. Czy na pewno chcesz usunąć %1 '%2'? Wszystkie dane powiązane z %1 zostaną utracone. Error: could not delete the %1. Message from database engine: %2 Błąd: nie można usunąć %1. Wiadomość z silnika bazy danych: %2 Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Execution aborted by user Wykonywanie przerwane przez użytkownika executing query , %1 rows affected In-Memory database Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Are you sure you want to delete the view '%1'? Are you sure you want to delete the trigger '%1'? Are you sure you want to delete the index '%1'? Error: could not delete the table. Error: could not delete the view. Error: could not delete the trigger. Error: could not delete the index. Message from database engine: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? Error checking foreign keys after table modification. The changes will be reverted. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. -- EXECUTING SELECTION IN '%1' -- -- EXECUTING LINE IN '%1' -- -- EXECUTING ALL IN '%1' -- %1 rows returned in %2ms query executed successfully. Took %1ms%2 Choose text files Wybierz pliki tekstowe Text files(*.csv *.txt);;All files(*) Pliki tekstowe(*.csv *.txt);;Wszystkie pliki(*) Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Are you sure you want to undo all changes made to the database file '%1' since the last save? Choose a file to import Wybierz pliki do zaimportowania Text files(*.sql *.txt);;All files(*) Pliki tekstowe(*.sql *.txt);;Wszystkie pliki(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. File %1 already exists. Please choose a different name. Plik %1 już istnieje. Wybierz inną nazwę. Error importing data: %1 Błąd importowania danych: %1 Import completed. Some foreign key constraints are violated. Please fix them before saving. Import completed. Importowanie zakończone. Delete View Usuń widok Modify View Modyfikuj widok Delete Trigger Modify Trigger Delete Index Usuń indeks Modify Index Modyfikuj indeks Modify Table Modyfikuj tabelę &%1 %2 &%1 %2 Setting PRAGMA values will commit your current transaction. Are you sure? Select SQL file to open Wybierz plik SQL do otworzenia Couldn't read file: %1. Nie można odczytać pliku: %1. Couldn't save file: %1. Nie można zapisać pliku: %1. Select file name Wybierz nazwę pliku Select extension file Wybierz plik rozszerzenia Extensions(*.so *.dylib *.dll);;All files(*) Extensions(*.so *.dll);;All files(*) Rozszerzenia(*.so *.dll);;Wszystkie pliki(*) At line %1: Result: %2 Extension successfully loaded. Pomyślnie załadowano rozszerzenie. Error loading extension: %1 Błąd ładowania rozszerzenia: %1 Don't show again Nie pokazuj ponownie New version available. Nowa wersja jest dostępna. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Choose a project file to open Wybierz plik projektu do otworzenia DB Browser for SQLite project file (*.sqbpro) Plik projektu Przeglądarki baz danych SQLite (*.sqbpro) This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Duplicate records Duplicate record Ctrl+" Ctrl+" Please choose a new encoding for all tables. Wybierz nowe kodowanie dla wszystkich tabel. Please choose a new encoding for this table. Wybierz kodowanie dla tej tabeli %1 Leave the field empty for using the database encoding. This encoding is either not valid or not supported. To kodowanie jest nieprawidłowe lub nieobsługiwane Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Collation needed! Proceed? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! creating collation Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Please specify the view name Określ nazwę widoku There is already an object with that name. Please choose a different name. View successfully created. Pomyślnie utworzono widok. Error creating view: %1 Błąd tworzenia widoku: %1 There is no filter set for this table. View will not be created. Nie ustawiono filtru dla tej tabeli. Widok nie zostanie utworzony. Delete Records Usuń rekordy This action will open a new SQL tab for running: Press Help for opening the corresponding SQLite reference page. NullLineEdit Set to NULL Ustaw jako NULL Alt+Del Alt+Del PlotDock Plot Wykres <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> Columns Kolumny X Y Y Axis Type Rodzaj osi Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Line type: Rodzaj linii: None Brak Line Linia StepLeft StepRight StepCenter Impulse Impuls Point shape: Kształt punktu: Cross Krzyż Plus Plus Circle Kółko Disc Dysk Square Kwadrat Diamond Diament Star Gwiazda Triangle Trójkąt TriangleInverted CrossSquare PlusSquare CrossCircle PlusCircle Peace <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> Save current plot... Zapisz obecny wykres… Load all data and redraw plot Copy Kopiuj Print... Drukuj... Show legend Stacked bars Date/Time Data/Czas Date Data Time Czas Numeric Label Podpis Invalid Nieprawidłowy Row # Rząd # Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Choose an axis color Wybierz kolor osi Choose a filename to save under Wybierz nazwę pliku do zapisu PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Wszystkie pliki(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. PreferencesDialog Preferences Preferencje &General &Ogólne Default &location Domyś&lne położenie Remember last location Pamiętaj ostatnie położenie Always use this location Zawsze używaj tego położenia Remember last location for session only Pamiętaj ostatnie położenie tylko przez jedną sesję ... Lan&guage &Język Toolbar style Styl paska narzędzi Only display the icon Wyświetlaj tylko ikonę Only display the text Wyświetlaj tylko tekst The text appears beside the icon Tekst obok ikony The text appears under the icon Tekst pod ikoną Follow the style Zgodnie ze stylem Show remote options enabled Automatic &updates A&utomatyczne aktualizacje DB file extensions Rozszerzenia plików bazy danych Manage Zarządzaj &Database Baza &danych Database &encoding Kodowani&e bazy danych Open databases with foreign keys enabled. &Foreign keys Remove line breaks in schema &view When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Prefetch block si&ze Advanced Zaawansowane SQ&L to execute after opening database SQ&L do wykonania po otworzeniu bazy danych Default field type Domyślny rodzaj typu Data &Browser &Przeglądarka danych Font Czcionka &Font &Czcionka Font si&ze Ro&zmiar czcionki Content Zawartość Symbol limit in cell Limit znaków w komórce This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Row count threshold for completion Field display Wyświetlanie pola Displayed &text Wyświetlany &tekst Binary Wartość binarna NULL NULL Regular Text color Kolor tekstu Background color Kolor tła Preview only (N/A) Filters Filtry Escape character Znak wyjścia Delay time (&ms) Czas odstępu (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. &SQL &SQL Settings name Nazwa ustawienia Context Kontekst Colour Bold Pogrubienie Italic Pochylenie Underline Podkreślenie Keyword Słowo kluczowe Function Funkcja Table Tabela Comment Komentarz Identifier Identyfikator String Ciąg znaków Current line Obecny wiersz Background Tło Foreground Pierwszy plan SQL &editor font size Rozmiar czcionki &edytora SQL SQL &results font size &Rozmiar czcionki wyników SQL Tab size Rozmiar tabulatora SQL editor &font &Czcionka edytora SQL &Wrap lines &Quotes for identifiers Choose the quoting mechanism used by the application for identifiers in SQL code. "Double quotes" - Standard SQL (recommended) `Grave accents` - Traditional MySQL quotes [Square brackets] - Traditional MS SQL Server quotes Code co&mpletion Uzupełnianie &kodu Keywords in &UPPER CASE When set, the SQL keywords are completed in UPPER CASE letters. Error indicators Wskaźniki błędów When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background Hori&zontal tiling If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Never Nigdy At word boundaries At character boundaries At whitespace boundaries Wrap lines Zawijaj wiersze &Extensions Rozsz&erzenia Select extensions to load for every database: Wybierz rozszerzenia ładowane w każdej bazie danych: Add extension Dodaj rozszerzenie Remove extension Usuń rozszerzenie <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> Disable Regular Expression extension Wyłącz rozszerzenie wyrażeń regularnych <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Remote Zdalne działania CA certificates Certyfikaty CA Subject CN Temat CN Common Name Subject O Organization Organizacja Valid from Ważny od Valid to Ważny do Serial number Numer seryjny Your certificates Twoje certyfikaty File Plik Subject Common Name Issuer CN Issuer Common Name Clone databases into Klonuj bazy danych do Choose a directory Wybierz katalog The language will change after you restart the application. Język zmieni się po ponownym uruchomieniu aplikacji. Select extension file Wybierz plik rozszerzenia Extensions(*.so *.dll);;All files(*) Rozszerzenia(*.so *.dll);;Wszystkie pliki(*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file Importuj plik certyfikatu No certificates found in this file. Nie znaleziono certyfikatów w tym pliku. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. QObject All files (*) Wszystkie pliki (*) Error importing data Błąd importowania danych from record number %1 z rekordu o numerze %1 . %1 . %1 Importing CSV file... Importowanie pliku CSV… Cancel Anuluj SQLite database files (*.db *.sqlite *.sqlite3 *.db3) Pliki bazy danych SQLite (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 Wystąpił błąd podczas łączenia z %1. %2 Error opening remote file at %1. %2 Wystąpił błąd podczas otwierania zdalnego pliku w %1. %2 Error: Invalid client certificate specified. Please enter the passphrase for this client certificate in order to authenticate. Cancel Anuluj Uploading remote database to %1 Downloading remote database from %1 Error: The network is not accessible. Error: Cannot open the file for sending. Error opening local databases list. %1 Error creating local databases list. %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. RemoteDock Remote Zdalne działania Identity Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Go Przejdź Push currently opened database to server <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> RemoteModel Name Nazwa Commit Last modified Ostatnia modyfikacja Size Rozmiar bytes bajty RemotePushDialog Push database Database na&me to push to Commit message <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Licencja bazy danych Public Publiczna Branch Gałąź Force push Database will be public. Everyone has read access to it. Baza danych będzie publiczna. Każdy będzie mógł uzyskać do niej dostęp. Database will be private. Only you have access to it. Baza danych będzie prywatna. Tylko Ty będziesz mieć do niej dostęp. Use with care. This can cause remote commits to be deleted. Unspecified Nieokreślona SqlExecutionArea Form Formularz Find previous match [Shift+F3] Znajdź poprzednie trafienie [Shift+F3] Find previous match with mapping Shift+F3 Shift+F3 The found pattern must be a whole word Whole Words Całe słowa Text pattern to find considering the checks in this frame Find in editor Znajdź w edytorze The found pattern must match in letter case Case Sensitive Rozróżniaj wielkość znaków Find next match [Enter, F3] Znajdź następne trafienie [Enter, F3] Find next match with wrapping F3 F3 Interpret search pattern as a regular expression <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Regular Expression Wyrażenie regularne Close Find Bar <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements This field shows the results and status codes of the last executed statements. SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) ltrim(X) removes spaces from the left side of X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X) rtrim(X) removes spaces from the right side of X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. (X) trim(X) removes spaces from both ends of X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. SqliteTableModel reading rows loading... ładowanie… References %1(%2) Hold %3Shift and click to jump there Error changing data: %1 Wystąpił błąd podczas zmiany danych: %1 retrieving list of columns uzyskiwanie listy kolumn Fetching data... Uzyskiwanie danych… Cancel Anuluj VacuumDialog Compact Database Warning: Compacting the database will commit all of your changes. Please select the databases to co&mpact: sqlitebrowser-3.11.2/src/translations/sqlb_pt_BR.ts000066400000000000000000011663221345112435200224250ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite Sobre DB Browser para SQLite Version Versão <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser para SQLite é uma ferramenta visual gratuita utilizada para criar, desenhar e editar bancos de dados SQLite.</p><p>É bilicenciada sob a Mozilla Public License Version 2 e a GNU General Public License Version 3 ou posterior. Você pode modificar ou redistribuí-la sob as condições dessas licenças.</p><p>Veja <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> e <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> para mais detalhes.</p><p>Para mais informação sobre esse programa visite nosso website: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">Esse software utiliza o GPL/LGPL Qt Toolkit de </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Veja </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> para termos de licença e informação.</span></p><p><span style=" font-size:small;">Também utiliza o Silk icon set de Mark James licenciado sob uma licença Creative Commons Attribution 2.5 e 3.0.<br/>Veja </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> para mais detalhes.</span></p></body></html> Version Versão Built for Compilado para Qt Version Versão do Qt SQLCipher Version Versão do SQLCipher SQLite Version Versão do SQLite <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser para SQLite é uma ferramenta de código livre gratuita usada para criar, projetar e editar bancos de dados SQLite.</p><p>Ela é bi-licensiada sob a Mozilla Public License Version 2 e sob a GNU General Public License Version 3 ou posterior. Você pode modificar ou redistribuir ela sob as condições de qualquer uma dessas licenças.</p><p>Veja <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> e <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> para mais detalhes.</p><p>Para mais informações sobre esse programa visite nosso site em: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">Esse software usa o GPL/LGPL Qt Toolkit de </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Veja </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> para termos de licença e informação.</span></p><p><span style=" font-size:small;">Ele também usa o conjunto de ícones Silk por Mark James licenciado sob a Creative Commons Attribution 2.5 e 3.0.<br/>Veja </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> para detalhes.</span></p></body></html> (based on SQLite %1) (baseado no SQLite %1) AddRecordDialog Add New Record Adicionar novo registro Enter values for the new record considering constraints. Fields in bold are mandatory. Entre valores para o novo registro considerando as restriões. Campos em negrito são obrigatórios. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. Na coluna Valor você pode especificar o valor para o campo identificado na coluna Nome. A coluna Tipo indica qual o tipo do campo. Valores padrão são exibidos no mesmo estilo que valores nulos. Name Nome Type Tipo Value Valor Values to insert. Pre-filled default values are inserted automatically unless they are changed. Valores para inserir. Valores padrão pré-preenchidos são inseridos automaticamente a não ser que sejam alterados. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. Quando você edita os valores no frame acima, a consulta SQL para inserir esse novo registro é exibida aqui. Você pode editar manualmente a consulta antes de salvar. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">Salvar</span> irá enviar o comando SQL exibido para o banco de dados para a inserção do novo registro.</p><p><span style=" font-weight:600;">Restaurar Padrões</span> irá restaurar os valores iniciais na coluna <span style=" font-weight:600;">Valor</span>.</p><p><span style=" font-weight:600;">Cancelar</span> irá fechar esse diálogo sem executar a consulta.</p></body></html> Auto-increment Auto-incremento Unique constraint Restrição de unicidade Check constraint: %1 Restrição de condição %1 Foreign key: %1 Chave estrangeira: %1 Default value: %1 Valor padrão: %1 Error adding record. Message from database engine: %1 Erro adicionando registro. Mensagem do banco de dados: %1 Are you sure you want to restore all the entered values to their defaults? Você tem certeza que deseja restaurar todos os valores inseridos para os seus valores padrão? Application Usage: %1 [options] [db] Uso: %1 [opções] [bd] Possible command line arguments: Possíveis argumentos da linha de comando: -h, --help Show command line options -h, --help Mostrar opções da linha de comando -s, --sql [file] Execute this SQL file after opening the DB -s, -sql [arquivo] Executar esse arquivo de SQL após abrir o BD -q, --quit Exit application after running scripts -q, --quit Sair do programa após executar os scripts [file] Open this SQLite database [arquivo] Abrir esse banco de dados SQLite The -s/--sql option requires an argument A opção -s/--sql requer um argumento The file %1 does not exist O arquivo %1 não existe Invalid option/non-existant file: %1 Opção inválida/arquivo inexistente: %1 -s, --sql [file] Execute this SQL file after opening the DB -s, -sql [arquivo] Executar esse arquivo de SQL após abrir o banco de dados -t, --table [table] Browse this table after opening the DB -t, --table [tabela] Navegar essa tabela após abrir o banco de dados The -t/--table option requires an argument A opção -t/--table requer um argumento -v, --version Display the current version -v, -versão Exibir a versão atual -R, --read-only Open database in read-only mode -R, --somente-leitura Abrir o banco de dados em modo somente leitura This is DB Browser for SQLite version %1. Este é o DB Browser para SQLite versão %1. -o, --option [group/setting=value] Run application with this setting temporarily set to value -o, --option [grupo/configuração=valor] Roda a aplicação com essa configuração temporariamente usando esse valor The -o/--option option requires an argument in the form group/setting=value A opção -o/--option requer um argumento na forma grupo/configuração=valor CipherDialog SQLCipher encryption Encriptação SQLCipher &Password &Senha &Reenter password &Entre a senha novamente Page &size &Tamanho da página Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encrpytion process might take some time and you should have a backup copy of you database! Unsaved changes are applied before modifying the encryption. Por favor, selecione uma chave para encriptar o banco de dados. Note que se você alterar quaisquer configurações opcionais você terá de entrá-las todas as vezes que você abrir o arquivo do banco de dados. Deixe os campos de senha em branco para desativar a encriptação. O processo de encriptação pode demorar alguns minutos e você deve ter um backup do seu banco de dados! Alterações não salvas são aplicadas antes de se modificar a encriptação. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. Por favor, entre a chave usada para encriptar o banco de dados. Se quaisquer das outras configurações foram alteradas você terá de prover essas informações também. Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Por favor, selecione uma chave para encriptar o banco de dados. Note que se você alterar quaisquer configurações opcionais você terá de entrá-las todas as vezes que você abrir o arquivo do banco de dados. Deixe os campos de senha em branco para desativar a encriptação. O processo de encriptação pode demorar alguns minutos e você deve ter um backup do seu banco de dados! Alterações não salvas são aplicadas antes de se modificar a encriptação. Page si&ze &Tamanho da página Passphrase Palavra chave Raw key Chave desencriptada Encr&yption settings Conf&igurações de encriptação SQLCipher &3 defaults Padrões do SQLCipher &3 SQLCipher &4 defaults Padrões do SQLCipher &4 Custo&m &Personalizado &KDF iterations Iterações de &KDF HMAC algorithm Algoritmo HMAC KDF algorithm Algoritmo KDF ColumnDisplayFormatDialog Choose display format Escolha um formato de exibição Display format Formato de exibição Choose a display format for the column '%1' which is applied to each value prior to showing it. Escolha um formato de exibição para a coluna '%1' que será aplicado a cada valor antes de exibí-lo. Default Padrão Decimal number Número decimal Exponent notation Notação exponencial Hex blob BLOB hexadecimal Hex number Número hexadecimal Julian day to date Dia juliano para data Lower case Caixa baixa Octal number Octal Round number Número arredondado Unix epoch to date Era unix para data Upper case Caixa alta Windows DATE to date DATE do Windows para data Custom Personalizado Apple NSDate to date NSDate da Apple para date Java epoch (milliseconds) to date Época Java (ms) para data Unix epoch to local time Época Unix para tempo local Date as dd/mm/yyyy Data como dd/mm/yyyy DBBrowserDB no error Nenhum erro Please specify the database name under which you want to access the attached database Por favor, especifique o nome do banco de dados sob o qual você quer acessar o banco de dados anexado Do you want to save the changes made to the database file %1? Você quer salvar as alterações feitas ao arquivo de banco de dados %1? Exporting database to SQL file... Exportando banco de dados para arquivo SQL... Cancel Cancelar Executing SQL... Executando SQL... Action cancelled. Ação cancelada. Error in statement #%1: %2. Aborting execution. Erro na consulta #%1: %2. Abortando execução. renameColumn: cannot find table %1. renameColumn: não consegue encontrar a tabela %1. renameColumn: cannot find column %1. renameColumn: não consegue encontrar a coluna %1. renameColumn: creating savepoint failed. DB says: %1 renameColumn: criação de savepoint falhou. Banco de dados diz: %1 renameColumn: creating new table failed. DB says: %1 renameColumn: criação de nova tabela falhou. Banco de dados diz: %1 renameColumn: copying data to new table failed. DB says: %1 renameColumn: cópia de dados para nova tabela falhou. Banco de dados diz: %1 renameColumn: deleting old table failed. DB says: %1 renameColumn: deleção de tabela falhou. Banco de dados diz: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: A restauração de alguns dos objetos associados com essa tabela falhou. Provavelmente porque os nomes de algumas colunas mudaram. Aqui está a consulta que você pode querer corrigir e executar manualmente: renameColumn: releasing savepoint failed. DB says: %1 renameColumn: liberar savepoint falhou. Banco de dados diz: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Erro renomeando tabela '%1' para '%2'. Mensagem do banco de dados: %3 ... <string can not be logged, contains binary data> ... ... <string não pode ser logada, contém dados binários> ... unknown object type %1 Tipo de objeto desconhecido %1 could not get list of db objects: %1, %2 Não pôde obter lista de objetos de banco de dados: %1, %2 could not get types Não pôde obter tipos didn't receive any output from pragma %1 Não recebeu qualquer saída do pragma %1 could not execute pragma command: %1, %2 Não conseguiu executar comando pragma: %1, %2 Error setting pragma %1 to %2: %3 Erro definindo pragma %1 para %2: %3 File not found. Arquivo não encontrado. Invalid file format Formato de arquivo inválido Error in statement #%1: %2. Aborting execution%3. Erro no comando #%1: %2. Aborting execution%3. and rolling back e revertendo Cannot set data on this object Não se pode definir dados nesse objeto could not get column information não pôde obter informação sobre a coluna This database has already been attached. Its schema name is '%1'. Esse banco de dados já foi anexado. O seu nome de esquema e '%1'. Do you really want to close this temporary database? All data will be lost. Você realmente quer fechar esse banco de dados temporário? Todos os dados serão perdidos. The database is currently busy: O banco de dados está ocupado: Do you want to abort that other operation? Você quer abortar a outra operação? No database file opened Não há um arquivo de banco de dados aberto didn't receive any output from %1 não recebeu saídas de %1 could not execute command: %1 não pôde executar comando: %1 Cannot delete this object Não pode deletar esse objeto A table with the name '%1' already exists in schema '%2'. Uma tabela com o nome '%1' já existe no esquema '%2'. could not get list of databases: %1 não pôde obter a lista de bancos de dados: %1 Error loading extension: %1 Erro carregado extensão: %1 DbStructureModel Name Nome Object Objeto Type Tipo Schema Esquema Tables (%1) Tabelas (%1) Indices (%1) Índices (%1) Views (%1) Vistas (%1) Triggers (%1) Gatilhos (%1) Browsables (%1) Navegáveis (%1) All Todos Database Banco de dados Browsables Navegáveis Temporary Temporário EditDialog Edit database cell Editar célula Import text Importar texto Opens a file dialog used to import text to this database cell. Abre uma janela usada para importar texto para essa célula de banco de dados. &Import &Importar Export text Exportar texto Opens a file dialog used to export the contents of this database cell to a text file. Abre um diálogo de arquivo usado para exportar os conteúdos dessa célula para um arquivo de texto. &Export &Exportar Text Texto Binary Binário Clear cell data Limpar dados de célula Erases the contents of the cell Apaga os conteúdos da célula &Clear &Limpar <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warning: Editing binary content in text mode may result in corrupted data!</span></p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Aviso: editar conteúdo binário em modo de texto pode corromper dados!</span></p></body></html> This area displays information about the data present in this database cell Essa área exibe informação sobre os dados presentes nessa célula Type of data currently in cell Tipo de dados atualmente na célula Size of data currently in table Tamanho dos dados atualmente na célula Choose a file Escolha um arquivo Text files(*.txt);;Image files(%1);;All files(*) Arquivos de texto(*.txt);;Imagens(%1);;Todos os arquivos(*) Choose a filename to export data Escolha um arquivo para exportar dados Text files(*.txt);;All files(*) Arquivos de texto(*.txt);;Todos os arquivos(*) Type of data currently in cell: Null Tipo de dados atualmente na célula: Null Type of data currently in cell: Text / Numeric Tipo de dados atualmente na célula: Texto / Numérico %n char(s) %n char %n chars Type of data currently in cell: Image Tipo de dados atualmente na célula: Imagem %1x%2 pixel %1x%2 pixel Type of data currently in cell: Binary Tipo de dados atualmente na célula: Binário %n byte(s) %n byte %n bytes Mode: Modo: Image Imagem Set this cell to NULL Definir esta célula como NULL Set as &NULL Definir como &NULL Apply Aplicar Type of data currently in cell: %1 Image Tipo de dado atualmente na célula: %1 Imagem %1x%2 pixel(s) %1x%2 pixel(s) Type of data currently in cell: NULL Tipo de dado atualmente na célula: NULL Image data can't be viewed with the text editor Dados de imagem não podem ser exibidos pelo editor de texto Binary data can't be viewed with the text editor Dados binários não podem ser exibidos pelo editor de texto This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Essa é a lista de modos suportados pelo editor de célula. Escolha um modo para visualizar ou editar os dados da célula atual. JSON JSON XML XML Automatically adjust the editor mode to the loaded data type Automaticamente ajustar o modo do editor para o tipo de dado carregado This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Esse botão assinalável ativa ou desativa a troca automática do modo do editor. Quando uma nova célula é selecionado ou novos dados são importados e a troca automática está habilitada, o modo ajusta para o tipo detectado. Você pode então mudar o modo do editor manualmente. Se você quer manter o modo manualmente escolhido enquanto movendo pelas células, desmarque essa opção. Auto-switch Auto-trocar Auto-format: pretty print on loading, compact on saving. Auto-formatar: exibir formatado ao carregar, compactar ao salvar. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Quando ativado, a funcionalidade de auto-formatar formata os dados ao carregar, quebrando o texto em linhas e indentando ele para melhor legibilidade. Ao salvar os dados, o auto-formatador compacta os dados removendo espaços em branco desnecessários. Autoformat Autoformatar Import from file Importar do arquivo Opens a file dialog used to import any kind of data to this database cell. Abre um seletor de arquivos usado para importar qualquer tipo de dado para essa célula. Export to file Exportar para arquivo Opens a file dialog used to export the contents of this database cell to a file. Abre um seletor de arquivo para exportar os conteúdos dessa célula para um arquivo. This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Esse modo de editor deixa você editar JSON ou XML com realce de sintaxe, formatação automática e validação antes de salvar. Erros são indicados com um ondulado vermelho. Apply data to cell [Ctrl+Return] Aplicar dados à célula [Ctrl+Enter] This button saves the changes performed in the cell editor to the database cell. Esse botão salva as modificações realizadas no editor da célula para a célula do banco de dados. Image data can't be viewed in this mode. Dados de imagem não podem ser visualizados nesse modo. Try switching to Image or Binary mode. Tente mudar para modo de Imagem ou Binário. Binary data can't be viewed in this mode. Dados binários não podem ser visualizados nesse modo. Try switching to Binary mode. Tente mudar para modo binário. Text files (*.txt) Arquivos texto (*.txt) JSON files (*.json) Arquivos JSON (*.json) XML files (*.xml) Arquivos XML (*.xml) Image files (%1) Arquivos de imagem (%1) Binary files (*.bin) Arquivos binários (*.bin) All files (*) Todos arquivos (*) Choose a file to import Escolha um arquivo para importar %1 Image %1 Imagem SVG files (*.svg) Arquivos SVG (*.svg) Invalid data for this mode Dados inválidos para esse modo The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? A célula contém dados inválidos %1. Motivo: %2. Você realmente quer aplicar isso? Type of data currently in cell: Valid JSON Tipo de dados atualmente na célula: JSON válido Print... Imprimir... Open preview dialog for printing displayed image Abrir diálogo de prévia para imprimir imagem exibida Ctrl+P Ctrl+P Open preview dialog for printing displayed text Abrir diálogo de prévia para imprimir texto exibido Copy Hex and ASCII Copiar Hex e ASCII Copy selected hexadecimal and ASCII columns to the clipboard Copiar colunas hexadecimal e ASCII selecionadas para a área de transferência Ctrl+Shift+C Ctrl+Shift+C Hex dump files (*.txt) Arquivos de dump hexadecimal (*.txt) EditIndexDialog Create New Index Criar novo índice &Name &Nome &Columns &Colunas Column Coluna Use in Index Usar no Índice Order Ordem &Table &Tabela &Unique &Único Creating the index failed: %1 Criação de índice falhou: %1 Edit Index Schema Editar esquema do índice For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Para restringir o índice para somente uma parte da tabela você pode especificar uma cláusula WHERE aqui que seleciona a parte da tabela que deveria ser indexada Partial inde&x clause Cláusula de índi&ce parcial Colu&mns Colu&nas Table column Coluna da tabela Type Tipo Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Adicionar uma nova coluna de expressão para o índice. Colunas de expressão contêm expressões SQL em vez de nomes de coluna. Index column Indexar coluna Deleting the old index failed: %1 Deletar o índice antigo falhou: %1 EditTableDialog Edit table definition Editar definição da tabela Table Tabela Advanced Avançado Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Fazer dessa uma tabela 'SEM rowid'. Definir essa flag requer um campo do tipo INTEGER com a primary key flag definida e a auto increment flag não. Without Rowid Sem Rowid Fields Campos Add field Adicionar campo Remove field Remover campo Move field up Mover campo para cima Move field down Mover campo para baixo Name Nome Type Tipo Not null Não null PK PK Primary key Primary key AI AI Autoincrement Autoincrement U U Unique Unique Default Default Default value Default value Check Check Check constraint Check constraint Foreign Key Foreign Key Error creating table. Message from database engine: %1 Erro criando tabela. Mensagem da engine do banco de dados: %1 There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. Há pelo menos uma linha com esse campo definido NULL. Logo, é impossível definir essa flag. Por favor, mude os dados da tabela primeiro. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Há pelo menos uma linha com um valor não-inteiro nesse campo. Logo, é impossível definir essa flag. Por favor, mude os dados da tabela primeiro. Column `%1` has no unique data. Coluna `%1` não possui dados únicos. This makes it impossible to set this flag. Please change the table data first. Logo, é impossível definir essa flag. Por favor, mude os dados da tabela primeiro. Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Você tem certeza de que deseja deletar o campo '%1? Todos os dados atualmente armazenados nesse campo serão perdidos. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto incremenct disabled Por favor adicione um campo que cumpre os seguintes requerimentos antes de definir a flag without rowid: - Primare key flag definida - Auto increment desativado There already is a field with that name. Please rename it first or choose a different name for this field. Já existe um campo com este nome. Por favor, renomeie-o primeiro ou escolha um nome diferente para esse campo. This column is referenced in a foreign key in table %1, column %2 and thus its name cannot be changed. Essa coluna é referenciada em uma chave estrangeira na tabela %1, coluna %2 e portanto não pode ter seu nome alterado. Column '%1' has no unique data. Coluna '%1' não possui dados únicos. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Por favor, adicione um campo que atende aos seguintes critérios antes de definir a flag "without rowid": - Flag "primary key" definida - Incremento automático desativado <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result it in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Aviso: </span>Há algo com essa definição de tabela que nosso parser não entende. Modificar e salvar essa tabela pode resultar em problemas.</p></body></html> This column is referenced in a foreign key in table %1 and thus its name cannot be changed. Essa coluna é referenciada em uma chave estrangeira na tabela %1 e portanto seu nome não pode ser alterado. Modifying this column failed. Error returned from database: %1 Modificar essa coluna falhou: Erro retornado do banco de dados: %1 Setting the rowid column for the table failed. Error message: %1 Editar a coluna rowid para a tabela falhou. Mensagem de erro: %1 Set this to create a temporary table that is deleted when closing the database. Marque isso para criar uma tabela temporária que será deletada quando o banco de dados for fechado. Temporary table Tabela temporária Setting the temporary flag for the table failed. Error message: %1 Definindo a flag temporária para a tabela falhou. Mensagem de erro: %1 <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Alerta: </span>Nosso parser não entende algo dessa definição de tabela. Modificar e salvar essa tabela pode causar problemas.</p></body></html> Database schema Esquema do banco de dados NN NN Changing the table schema failed. Error message: %1 Modificar o esquema falhou. Erro: %1 Column '%1' has duplicate data. Coluna '%1' tem dados duplicados. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Isso torna impossível a habilitação da opção 'Unique'. Por favor, remova os dados duplicados, o que irá permitir a opção 'Unique' a ser habilitada. ExportDataDialog Export data as CSV Exportar dados como CSV &Table(s) &Tabela(s) &Column names in first line Nomes das &colunas na primeira linha Field &separator &Separador de campos , , ; ; Tab Tab | | Other Outro &Quote character &Áspas " " ' ' Could not open output file: %1 Não pôde abrir arquivo de saída: %1 Choose a filename to export data Escolha um arquivo para exportar dados Text files(*.csv *.txt) Arquivos de texto(*.csv *.txt) Please select at least 1 table. Por favor, selecione pelo menos uma tabela. Choose a directory Escolha um diretório Export completed. Exportação completa. New line characters Caracteres de nova linha Windows: CR+LF (\r\n) Windows: CR+LF (\r\n) Unix: LF (\n) Unix: LF (\n) Tab&le(s) Tabe&las(s) Colu&mn names in first line &Nomes das colunas na primeira linha Fie&ld separator Se&parador de campo Pretty print Otimizar para leitura humana Text files(*.json *.js *.txt) Arquivos de texto (*.json *.js *.txt) Export data as JSON Exportar dados como JSON exporting CSV exportando CSV exporting JSON exportando JSON ExportSqlDialog Export SQL... Exportar SQL... &Table(s) &Tabela(s) &Options &Opções Keep column names in INSERT INTO Manter nomes de colunas em INSERT INTO New INSERT INTO syntax (multiple rows in VALUES) Nova sintaxe de INSERT INTO (múltiplas linhas em VALUES) Export schema only Exportar somente esquema Please select at least 1 table. Por favor, selecione pelo menos uma tabela. Choose a filename to export Escolha um arquivo para exportar Text files(*.sql *.txt) Arquivos de texto(*.sql *.txt) Export completed. Exportação completa. Export cancelled or failed. Exportação falhou ou foi cancelada. Tab&le(s) Tabe&las(s) Select All Selecionar tudo Deselect All Limpar seleção Multiple rows (VALUES) per INSERT statement Múltiplas linhas (VALUES) por INSERT Export everything Exportar tudo Export data only Exportar somente dados Keep old schema (CREATE TABLE IF NOT EXISTS) Manter esquema antigo (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Sobrescrever esquema antigo (DROP TABLE, then CREATE TABLE) Please select at least one table. Por favor selecione pelo menos uma tabela. ExtendedScintilla Ctrl+H Ctrl+H Ctrl+P Ctrl+P Find and Replace... Encontrar e substituir... Print... Imprimir... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? O conteúdo da área de transferência é maior do que a seleção. Deseja inserir mesmo assim? Set to NULL Definir como NULL Copy Copiar Paste Colar The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? O conteúdo da área de transferência é maior do que o intervalo selecionado. Deseja inserir mesmo assim? Use as Exact Filter Usar como filtro exato Containing Contendo Not equal to Diferente de Greater than Maior que Less than Menor que Greater or equal Maior ou igual a Less or equal Menor ou igual a Between this and... Entre isso e... Copy with Headers Copiar com cabeçalhos Copy as SQL Copiar como SQL Print... Imprimir... Use in Filter Expression Usar na expressão de filtro Alt+Del Alt+Del Ctrl+Shift+C Ctrl+Shift+C Ctrl+Alt+C Ctrl+Alt+C FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Arquivos de banco de dados SQL (*.db *.sqlite *.sqlite3 *.db3);;Todos os arquivos (*) FileExtensionManager File Extension Manager Gerenciador de extensão de arquivo &Up &Subir &Down &Descer &Add &Adicionar &Remove &Remover Description Descrição Extensions Extensões *.extension *.extensão FilterLineEdit Filter Filtro These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Esses campos de entrada permitem você realizar filtros rápidos na tabela atualmente selecionada. Por padrão, as linhas contendo o texto de entrada são filtradas. Os seguintes operadores também são suportados: % Curinga > Maior que < Menor que >= Igual a ou maior que <= Igual a ou menor que = Igual a <> Diferente x~y Intervalo: valores entre x e y Set Filter Expression Definir expressão de filtro What's This? O que é isso? Is NULL É NULL Is not NULL Não é NULL Is empty É vazio Is not empty Não é vazio Equal to... Igual a... Not equal to... Diferente de... Greater than... Maior que... Less than... Menor que... Greater or equal... Maior ou igual... Less or equal... Menor ou igual... In range... No intervalo... FindReplaceDialog Find and Replace Encontrar e substituir Fi&nd text: E&ncontrar texto: Re&place with: Su&bstituir com: Match &exact case Casar caixa &exata Match &only whole words Casar s&omente palavras inteiras When enabled, the search continues from the other end when it reaches one end of the page Quando ativado, a busca continua do outro fim quando ela atinge um fim da página &Wrap around &Envolver em torno When set, the search goes backwards from cursor position, otherwise it goes forward Quando ativado, a busca retrocede a partir do cursor em vez de ir para frente Search &backwards Buscar para &trás <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>Quando selecionado, o padrão a ser encontrado é interpretado como uma expressão regular UNIX. Veja <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression nos Wikibooks</a>.</p></body></html> Use regular e&xpressions Usar e&xpressões regulares Find the next occurrence from the cursor position and in the direction set by "Search backwards" Encontrar a próxima ocorrência a partir da posição do cursor na direção selecionada por "Buscar para trás" &Find Next &Encontrar próximo &Replace &Substituir Highlight all the occurrences of the text in the page Realçar todas as ocorrências do texto na página F&ind All Encontrar &todos Replace all the occurrences of the text in the page Substituir todas as ocorrências do texto na página Replace &All Substituir &todos The searched text was not found O texto procurado não foi encontrado The searched text was not found. O texto procurado não foi encontrado. The searched text was found one time. O texto procurado foi encontrado uma vez. The searched text was found %1 times. O texto procurado foi encontrado %1 vezes. The searched text was replaced one time. O texto procurado foi substituído uma vez. The searched text was replaced %1 times. O texto procurado foi substituído %1 vezes. ForeignKeyEditor &Reset &Resetar (foreign key clauses(ON UPDATE, ON DELETE etc.) (cláusulas de chave estrangeira (ON UPDATE, ON DELETE etc.) Foreign key clauses (ON UPDATE, ON DELETE etc.) Cláusulas de chave estrangeira (ON UPDATE, ON DELETE etc.) ImportCsvDialog Import CSV file Importar arquivo CSV &Table name &Nome da tabela &Column names in first line Nomes das &colunas na primeira linha Field &separator &Separador de campos , , ; ; Tab Tab | | Other Outro &Quote character &Áspas " " ' ' &Encoding &Encoding UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? Trim fields? Inserting data... Inserindo dados... Cancel Cancelar There is already a table of that name and an import into an existing table is only possible if the number of columns match. Já existe uma tabela com esse nome e importar em uma tabela existente apenas é possível se o número de colunas for o mesmo. There is already a table of that name. Do you want to import the data into it? Já existe uma tabela com esse nome. Você quer importar os dados nela? Creating restore point failed: %1 Criação de ponto de restauração falhou: %1 Creating the table failed: %1 Criação de tabela falhou: %1 Missing field for record %1 Campo ou registro faltando %1 Inserting row failed: %1 Inserir linha falhou: %1 Separate tables Tabelas separadas Deselect All Limpar seleção Match Similar Detectar similares Select All Selecionar tudo Table na&me No&me da tabela Advanced Avançado When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Quando importando um valor em branco do arquivo CSV em uma tabela existente com um valor padrão para essa coluna, aquele valor padrão é inserido. Ative essa opção para inserir um valor em branco em vez. Ignore default &values Ignorar &valores padrão Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Ative essa opção para parar a importação quando tentando importar um valor em branco em uma coluna NOT NULL sem um valor padrão. Fail on missing values Falhar em valores faltando Disable data type detection Desativar detecção de tipo de dados Disable the automatic data type detection when creating a new table. Desativa a detecção automática de tipo de dados quando criando uma nova tabela. Import completed Importação completa There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. Já existe uma tabela chamada '%1' e uma importação em uma tabela existente só é possível se o número de colunas bate. There is already a table named '%1'. Do you want to import the data into it? Já existe uma tabela chamada '%1'. Você quer importar os dados nela? importing CSV Importando CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Importando o arquivo '%1' levou %2 ms. Desses, %3 ms foram gastos na função da linha. MainWindow DB Browser for SQLite DB Browser para SQLite Database &Structure &Estrutura do banco de dados toolBar1 toolBar1 &Browse Data &Navegar dados Table: Tabela: Select a table to browse data Selecione uma tabela para navegar Use this list to select a table to be displayed in the database view Use esta lista para selecionar uma tabela para ser exibida na vista do banco de dados Refresh the data in the selected table. Atualiza os dados na tabela selecionada. This button refreshes the data in the currently selected table. Este botão atualiza os dados na tabela atualmente selecionada. F5 F5 Clear all filters Limpar todos os filtros Insert a new record in the current table Inserir um novo registro na tabela atual This button creates a new, empty record in the database Este botão cria um novo registro em branco no banco de dados New Record Novo registro Delete the current record Deletar o registro atual This button deletes the record currently selected in the database Este botão deleta o registro atualmente selecionado no banco de dados Delete Record Deletar registro This is the database view. You can double-click any record to edit its contents in the cell editor window. Esta é a vista do banco de dados. Você pode clicar duas vezes em qualquer registro para editar seus conteúdos na janela de edição de célula. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Rolar para o começo</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Clicar nesse botão navega até o começo da vista de tabela acima.</p></body></html> |< |< Scroll 100 records upwards Rolar 100 registros para baixo <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>Clicar nesse botão navega 100 registros para cima na vista de tabela acima.</p></body></html> < < 0 - 0 of 0 0 - 0 de 0 <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>Rolar 100 registros para baixo</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>Clicar nesse botão navega 100 registros para baixo na vista de tabela acima.</p></body></html> > > Scroll to the end Rolar para o fim <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicar nesse botão navega até o fim da vista de tabela acima.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>Clique aqui para pular para o registro especificado</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>Esse botão navega para o registro especificado na área Ir para.</p></body></html> Go to: Ir para: Enter record number to browse Entre o número do registro para navegar Type a record number in this area and click the Go to: button to display the record in the database view Digite o número de um registro nessa área e clique no botão Ir para: para exibir o registro na vista do banco de dados 1 1 Edit &Pragmas Editar &Pragmas None None Full Full Incremental Incremental <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> Delete Delete Truncate Truncate Persist Persist Memory Memory WAL WAL Off Off <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> Normal Normal Exclusive Exclusive <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> Default Default File File <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> E&xecute SQL &Executar SQL &File &Arquivo &Import &Importar &Export E&xportar &Edit &Editar &View &Exibir &Help A&juda DB Toolbar Barra de ferramentas do banco de dados SQL Log Log do SQL &Show SQL submitted by E&xibir SQL enviado por User Usuário Application Aplicativo &Clear &Limpar Plot Plot Columns Colunas X X Y Y _ _ <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> Save current plot... Save current plot... DB Schema Esquema do banco de dados &New Database... &Novo banco de dados... Create a new database file Criar um novo arquivo de banco de dados This option is used to create a new database file. Essa opção e utilizada para criar um novo arquivo de banco de dados. Ctrl+N Ctrl+N &Open Database... &Abrir banco de dados... Open an existing database file Abre um arquivo de banco de dados existente This option is used to open an existing database file. Esta opção abre um arquivo de banco de dados existente. Ctrl+O Ctrl+O &Close Database &Fechar banco de dados Ctrl+W Ctrl+W Revert Changes Reverter mudanças Revert database to last saved state Reverter banco de dados para o último estado salvo This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Essa opção é usada para reverter o atual arquivo de banco de dados para seu último estado salvo. Todas as modificações feitas desde a última operação de salvamento são perdidas. Write Changes Escrever Alterações Write changes to the database file Salva modificações para o arquivo de banco de dados This option is used to save changes to the database file. Essa opção é usada para salvar modificações para o arquivo de banco de dados. Ctrl+S Ctrl+S Compact Database Compactar Banco de Dados Compact the database file, removing space wasted by deleted records Compactar o arquivo do banco de dados, removendo espaço desperdiçado por registros deletados Compact the database file, removing space wasted by deleted records. Compactar o arquivo do banco de dados, removendo espaço desperdiçado por registros deletados. E&xit &Sair Ctrl+Q Ctrl+Q Database from SQL file... Banco de dados a partir de um arquivo SQL... Import data from an .sql dump text file into a new or existing database. Importar dados de um arquivo de texto .sql em um banco de dados. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Essa opção deixa você importar dados de um arquivo SQL em um banco de dados. Arquivos de SQL podem ser criados na maioria dos bancos de dados, como MySQL e PostgreSQL. Table from CSV file... Tabela a partir de um arquivo CSV... Open a wizard that lets you import data from a comma separated text file into a database table. Abre um assistente que permite você importar dados de um arquivo CSV em uma tabela de banco de dados. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Abre um assistente que permite você importar dados de um arquivo CSV em uma tabela de banco de dados. Arquivos CSV podem ser criados pela maioria dos programas de banco de dados e planilhas. Database to SQL file... Banco de dados para arquivo SQL... Export a database to a .sql dump text file. Exportar o banco de dados para um arquivo de texto .sql. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Essa opção permite você exportar um banco de dados para um arquivo de texto .sql. Arquivos de despejo SQL contêm todos os dados necessários para recriar o banco de dados na maioria dos motores de banco de dados, incluindo MySQL e PostgreSQL. Table(s) as CSV file... Tabela(s) como arquivo CSV... Export a database table as a comma separated text file. Exportar uma tabela de banco de dados como um arquivo CSV. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Exportar uma tabela de banco de dados como um arquivo CSV, pronto para ser importado por outro banco de dados ou planilhas. Create Table... Criar Tabela... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Abre o assistente de criação de tabelas, em que é possível definir o nome e os campos para uma nova tabela no banco de dados Delete Table... Deletar Tabela... Delete Table Deletar tabela Open the Delete Table wizard, where you can select a database table to be dropped. Abre o assistente de deleção de tabelas, em que você pode selecionar uma tabela para ser eliminada. Modify Table... Modificar Tabela... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Abre o assistente de modificação de tabelas, em que você pode renomear uma tabela existente. Também é possível adicionar ou deletar campos de uma tabela, assim como modificar nomes e tipos de campos. Create Index... Criar Índice... Open the Create Index wizard, where it is possible to define a new index on an existing database table. Abre o assistente de criação de índice, em que é possível definir um novo índice em um tabela de banco de dados já existente. &Preferences... &Configurações... Open the preferences window. Abre a janela de configurações. &DB Toolbar Barra de ferramentas do banco de &dados Shows or hides the Database toolbar. Exibe ou oculta a barra de ferramentas do banco de dados. What's This? O que é isso? Shift+F1 Shift+F1 &About... &Sobre... &Recently opened &Recentemente aberto Open &tab Abrir &aba Ctrl+T Ctrl+T &Execute SQL &Executar SQL Execute SQL [F5, Ctrl+Return] Executar SQL [F5, Ctrl+Return] Open SQL file Abrir arquivo SQL Save SQL file Salvar arquivo SQL Load extension Carregar extensão Execute current line Executar linha atual Execute current line [Ctrl+E] Executar linha atual [Ctrl+E] Ctrl+E Ctrl+E Export as CSV file Exportar como arquivo CSV Export table as comma separated values file Exportar tabela como CSV &Wiki... &Wiki... Bug &report... &Reportar bug... Web&site... Web&site... Save Project Salvar Projeto Save the current session to a file Salvar a atual sessão para um arquivo Open Project Abrir Projeto Load a working session from a file Carregar uma sessão de um arquivo &Attach Database Microsoft uses "anexar", thought it was good enough a translation. &Anexar banco de dados Set Encryption Definir encriptação Save SQL file as Salvar arquivo SQL como &Browse Table &Navegar tabela Copy Create statement Copiar comando Create Copy the CREATE statement of the item to the clipboard Copia o comando CREATE do item para a área de transferência Ctrl+Return Ctrl+ENTER Ctrl+L Ctrl+L Ctrl+P Ctrl+P Ctrl+D Ctrl+D Ctrl+I Ctrl+I Database encoding Codificação do banco de dados Database is encrypted using SQLCipher Banco de dados encriptado usando SQLCipher Choose a database file Escolha um arquivo de banco de dados SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Arquivos de banco de dados SQL (*.db *.sqlite *.sqlite3 *.db3);;Todos os arquivos (*) Invalid file format. Formato de arquivo inválido. Choose a filename to save under Escolha um nome de arquivo para salvar Error adding record: Erro adicionando registro: Error deleting record: %1 Erro adicionando registro: %1 Please select a record first Por favor, selecione um registro primeiro %1 - %2 of %3 %1 - %2 de %3 There is no database opened. Please open or create a new database file. Não há banco de dados aberta. Por favor, abra ou crie um novo arquivo de banco de dados. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. Você tem certeza de que deseja deletar %1 '%2'? Todos os dados associados com %1 serão perdidos. Error: could not delete the %1. Message from database engine: %2 Erro: não pôde deletar %1. Mensagem do banco de dados: %2 There is no database opened. Não há banco de dados aberto. %1 Rows returned from: %3 (took %2ms) %1 Entradas retornadas de %3 (levou %2 ms) Error executing query: %1 Erro executando requisição: %1 Query executed successfully: %1 (took %2ms) Requisição executada com sucesso: %1 (levou %2ms) Choose a text file Escolha um arquivo de texto Text files(*.csv *.txt);;All files(*) Arquivos de texto(*.csv *.txt);;Todos os arquivos(*) Import completed Importação completa Are you sure you want to undo all changes made to the database file '%1' since the last save? Você tem certeza de que deseja desfazer todas as modificações feitas no arquivo de banco de dados '%1' desde o último salvamento? Choose a file to import Escolha um arquivo para importar Text files(*.sql *.txt);;All files(*) Arquivos de texto(*.sql *.txt);;Todos os arquivos(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. Você deseja criar um novo arquivo de banco de dados para armazenar os dados importados? Se você disser que não, tentaremos importar os dados do arquivo SQL para o banco de dados atual. File %1 already exists. Please choose a different name. Arquivo %1 já existe. Por favor, escolha um nome diferente. Error importing data: %1 Erro importando dados: %1 Import completed. Importação completa. Delete View Deletar vista Delete Trigger Deletar gatilho Delete Index Deletar índice &%1 %2 &%1 %2 Setting PRAGMA values will commit your current transaction. Are you sure? Definir valores de PRAGMA vai cometer sua transação atual. Você tem certeza? Select SQL file to open Selecione arquivo SQL para abrir Select file name Selecione o nome do arquivo Select extension file Selecione o arquivo de extensão Extensions(*.so *.dll);;All files(*) Extensões(*.so *.dll);;Todos os arquivos(*) Extension successfully loaded. Extensão carregada com sucesso. Error loading extension: %1 Erro carregado extensão: %1 Don't show again Não mostrar novamente New version available. Nova versão disponível. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Uma nova vesão do DB Browser para SQLite está disponível (%1.%2.%3)<br/><br/>Por favor, baixe em <a href='%4'>%4</a>. Choose a axis color Escolha uma cor para o eixo PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Todos os arquivos(*) Choose a file to open Escolha um arquivo para abrir DB Browser for SQLite project file (*.sqbpro) Arquivo de projeto DB Browser para SQLite (*.sqbpro) Edit Database Cell Editar célula do banco de dados SQL &Log &Log do SQL Show S&QL submitted by Exibir S&QL enviado por &Plot &Plotar Line type: Tipo da linha: Line Linha StepLeft StepLeft StepRight StepRight StepCenter StepCenter Impulse Impulso Point shape: Ponto: Cross Cruz Plus Mais Circle Círculo Disc Disco Square Quadrado Diamond Diamante Star Estrela Triangle Triângulo TriangleInverted TriânguloInvertido CrossSquare CruzQuadrado PlusSquare MaisQuadrado CrossCircle CruzCírculo PlusCircle MaisCírculo Peace Paz Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Carregar todos os dados. Isso somente tem efeito se nem todos os dados já foram obtidos da tabela devido ao mecanismo de carregamento parcial. &Revert Changes &Reverter modificações &Write Changes &Escrever modificações Compact &Database &Compactar banco de dados &Database from SQL file... &Banco de dados a partir de arquivo SQL... &Table from CSV file... &Tabela a partir de arquivo CSV... &Database to SQL file... &Banco de dados para arquivo SQL... &Table(s) as CSV file... &Tabela para arquivo CSV... &Create Table... &Criar tabela... &Delete Table... &Deletar tabela... &Modify Table... &Modificar tabela... Create &Index... &Criar índice... W&hat's This? O &que é isso? &Load extension &Carregar extensão Sa&ve Project &Salvar projeto Open &Project Abrir &projeto &Set Encryption &Configurar encriptação Edit display format Editar formato de exibição Edit the display format of the data in this column Editar o formato de exibição dos dados nessa coluna Show rowid column Mostrar coluna rowid Toggle the visibility of the rowid column Alternar a visibilidade da coluna rowid Set encoding Definir codificação Change the encoding of the text in the table cells Modificar a codificação do texto nas células da tabela Set encoding for all tables Modificar codificação para todas as tabelas Change the default encoding assumed for all tables in the database Modificar a codificação padrão assumida para todas as tabelas no banco de dados Duplicate record Duplicar registro Encrypted Encriptado Read only Somente leitura Database file is read only. Editing the database is disabled. Arquivo de banco de dados é somente leitura. Edição do banco de dados está desativada. %1 rows returned in %2ms from: %3 %1 linhas retornadas em %2ms de: %3 , %1 rows affected , %1 linhas afetadas Query executed successfully: %1 (took %2ms%3) Consulta executada com sucesso: %1 (durou %2ms%3) Please choose a new encoding for this table. Por favor, escolha uma nova codificação para essa tabela. Please choose a new encoding for all tables. Por favor, escolha uma nova codificação para todas tabelas. %1 Leave the field empty for using the database encoding. %1 Deixe o campo em branco para usar a codificação do banco de dados. This encoding is either not valid or not supported. Essa codificação é inválida ou não é suportada. Database Structure Estrutura do banco de dados Browse Data Navegar dados Edit Pragmas Editar pragmas Execute SQL Executar SQL &Table: &Tabela: Remote Remoto Edit Database &Cell Editar &célula do banco de dados DB Sche&ma Esque&ma do banco de dados Execute SQL [F5, Ctrl+Return, Ctrl+R] Executar SQL [F5, Ctrl+Return, Ctrl+R] Execute current line [Shift+F5] Executar linha atual [Shift+F5] Shift+F5 Shift+F5 SQLCipher &FAQ... SQLCipher &FAQ... Opens the SQLCipher FAQ in a browser window Abre o FAQ do SQLCipher em uma janela do navegador Table(s) to JSON... Tabela(s) para JSON... Export one or more table(s) to a JSON file Exporta uma ou mais tabela(s) para um arquivo JSON Save to Remote Salvar para remoto Refresh Atualizar Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Erro enquanto salvava o banco de dados. Isso indica que nem todas as mudanças foram salvas. Você precisa resolver o seguinte erro primeiro. %1 Please enter the URL of the database file to save. Por favor, entre a URL do arquivo de banco de dados para salvar. Cancel Cancelar &Remote &Remoto &Open Database Read Only... &Abrir banco de dados somente leitura... Open an existing database file in read only mode Abre um banco de dados existente em modo somente leitura Unlock view editing Liberar edição da vista This unlocks the current view for editing. However, you will need appropriate triggers for editing. Isso libera a vista atual para edição. Todavia, você vai precisar dos gatilhos apropriados para editar. Could not open database file. Reason: %1 Não pôde abrir arquivo do banco de dados. Motivo: %1 Execution aborted by user Execução abortada pelo usuário At line %1: Na linha %1: Result: %2 Resultado: %2 Choose text files Escolha arquivos de texto Modify View Modificar vista Modify Trigger Modificar gatilho Modify Index Modificar índice Modify Table Modificar tabela Couldn't read file: %1. Não pôde ler arquivo: %1. Couldn't save file: %1. Não pôde salvar arquivo: %1. Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Por favor, entre uma pseudo-chave primária para habilitar edição nessa vista. Isso deveria ser o nome de uma coluna única na vista. Scroll one page upwards Rolar uma página para cima <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html><head/><body><p>Clicando nesse botão navega uma página de registros para cima.</p></body></html> Scroll one page downwards Rolar uma página para baixo <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>Clicando nesse botão navega uma página de registros para baixo.</p></body></html> Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Definir valores de PRAGMA ou fazer vacuum irá commitar sua transação atual. Deseja continuar? This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Essa é a estrutura do banco de dados aberto. Você pode arrastar comandos SQL de uma linha e soltá-los em outras aplicações ou em outra instância do DB Browser para SQLite. Refresh the data in the selected table [F5, Ctrl+R] Atualizar os dados na tabela selecionada [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. Esse botão limpa todos os filtros definidos no cabeçalho para a tabela atualmente navegada. Save the table as currently displayed Salva a tabela como atualmente exibida <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> <html><head/><body><p>Esse Menu provê as seguintes opções para a tabela atual:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Exportar para CSV: essa opção exporta os dados como estão exibidos para um arquivo CSV.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Salvar como vista: essa opção salva a configuração atual da tabela como uma vista SQL que você depois pode consultar em comandos SQL.</li></ul></body></html> ... ... <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> <html><head/><body><p>Esse botão cria um novo registro no banco de dados. Segure o botão do mouse para abrir um menu de opções diferentes:</p><ul><li><span style=" font-weight:600;">Novo Registro</span>: insere um novo registro com valores padrão no banco de dados.</li><li><span style=" font-weight:600;">Inserir Valores...</span>: abre um diálogo para novos valores antes de serem inseridos no banco de dados. Isso permite a entrada de valores de acordo com as restrições. Esse diálogo também é abaerto se a opção<span style=" font-weight:600;">Novo Registro</span> falha devido a essas restrições.</li></ul></body></html> This button deletes the record or records currently selected in the table Esse botão deleta o registro ou registros selecionados This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Essa é a vista de tabela do banco de dados. Você pode fazer as seguintes ações: - Começar a escrever para editar o valor. - Clicar duas vezes em qualquer registro para editar seus conteúdos no editor de célula. - Alt+Del para deletar o conteúdo da célula para NULL. - Ctrl+" para duplicar o registro atual. - Ctrl+' para copiar o valor da célula de cima. - Seleção normal para copiar e colar. <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Alerta: esse pragma não é legível e esse valor foi inferido. Escrever o pragma pode sobrescrever um LIKE redefinido provido por uma extensão SQL. &Tools Ferramen&tas This button clears the contents of the SQL logs Esse botão limpa os logs do SQL This panel lets you examine a log of all SQL commands issued by the application or by yourself Esse painel deixa você examinar um log de todos os comandos SQL dados pela aplicação ou por você This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Essa é a estrutura do banco de dados aberto. Você pode arrastar múltiplos nomes de objetos da coluna Nome e largá-los no editor SQL e você pode ajustar as propriedades dos nomes largados usando o menu de contexto. Isso ajudaria você a compor comandos SQL. Você pode arrastar comandos SQL da coluna Esquema e largá-los no editor SQL ou em outras aplicações. Project Toolbar Barra de ferramentas do projeto Extra DB toolbar Barra de ferramentas do banco de dados extra Close the current database file Fechar o arquivo de banco de dados aberto This button closes the connection to the currently open database file Esse botão fecha a conexão com o arquivo aberto Compact &Database... Compactar banco de &dados... &About &Sobre This button opens a new tab for the SQL editor Esse botão abre uma nova aba para o editor SQL Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] Executar todo/selecionado SQL [F5, Ctrl+Enter, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. Esse botão executa o SQL selecionado. Se não existe SQL selecionado, todo o SQL é executado. This button opens a file containing SQL statements and loads it in a new editor tab Esse botão abre um arquivo contendo SQL e carrega ele numa nova aba do editor &Load Extension... &Carregar extensão... This button executes the SQL statement present in the current editor line Esse botão executa o comando SQL presente na linha atual do editor &Wiki &Wiki Bug &Report... &Reportar bug... Feature Re&quest... Re&quisitar feature... Web&site &Site &Donate on Patreon... &Doar no Patreon... Sa&ve Project... Sal&var projeto... This button lets you save all the settings associated to the open DB to a DB4S project file Esse botão deixa você salvar todas as configurações associadas ao banco de dados aberto a um projeto do DB4S Open &Project... Abrir &projeto... This button lets you open a DB4S project file Esse botão deixa você abrir um projeto do DB4S &Attach Database... &Anexar banco de dados... Add another database file to the current database connection Adiciona outro arquivo de banco de dados para a conexão atual This button lets you add another database file to the current database connection Esse botão deixa você adicionar outro banco de dados para a conexão atual com o banco de dados &Set Encryption... Definir en&criptação... This button saves the content of the current SQL editor tab to a file Esse botão salva o conteúdo do editor SQL para um arquivo SQLCipher &FAQ &FAQ do SQLCipher Table(&s) to JSON... Tabela(&s) para JSON... Open Data&base Read Only... Abrir &banco de dados somente leitura... Save results Salvar resultados Save the results view Salvar a vista de resultados This button lets you save the results of the last executed query Esse botão deixa você salvar os resultados da última consulta executada Find text in SQL editor Encontrar texto no editor SQL Find text in SQL editor [Ctrl+F] Encontrar texto no editor SQL [Ctrl+F] This button opens the search bar of the editor Esse botão abre a barra de busca do editor Ctrl+F Ctrl+F Find or replace text in SQL editor Encontrar ou substituir texto no editor SQL Find or replace text in SQL editor [Ctrl+H] Encontrar ou substituir texto no editor SQL [Ctrl+H] This button opens the find/replace dialog for the current editor tab Esse botão abre o diálogo de encontrar/substituir para a aba atual do editor Export to &CSV Exportar para &CSV Save as &view Salvar como &vista Save as view Salvar como vista Hide column(s) Ocultar coluna(s) Hide selected column(s) Ocultar coluna(s) selecionada(s) Show all columns Mostrar todas as colunas Show all columns that were hidden Mostrar todas as colunas ocultas Shows or hides the Project toolbar. Mostra ou oculta a barra de ferramentos do Projeto. Extra DB Toolbar Barra de ferramentas do banco de dados extra Export the filtered data to CSV Exportar dados filtrados para CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Esse botão exporta os dados da tabela como atualmente exibidos como um arquivo CSV. Save the current filter, sort column and display formats as a view Salva o filtro, ordenação e formato como uma vista This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Esse botão salva as configurações da tabela exibida como uma vista SQL que você pode utilizar em comandos SQL depois. Insert Values... Inserir Valores... Open a dialog for inserting values in a new record Abre um diálogo para inserir valores em um novo registro Insert new record using default values in browsed table Inserir novo registro usando valores padrão na tabela New In-&Memory Database Nova tabela em &memória Drag && Drop Qualified Names Arrastar e soltar nomes qualificados Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Use nomes qualificados (p.e. "Tabela"."Campo") quando arrastando objetos e soltando eles no editor Drag && Drop Enquoted Names Arrastar e soltar nomes entre áspas Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor Use identificadores escapados (p.e. "Tabela1") quando arrastando e soltando objetos no editor &Integrity Check Teste de &integridade Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. Roda o teste de integridade sobre o banco de dados aberto e retorna os resultados na aba Executar SQL. &Foreign-Key Check Teste de chave &estrangeira Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab Roda o teste de chave estrangeira sobre o banco de dados aberto e retorna os resultados na aba Executar SQL &Quick Integrity Check Teste de integridade &rápido Run a quick integrity check over the open DB Roda um teste de integridade rápido sobre o banco de dados aberto Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. Roda um outro pragma para a verificação de integridade do banco de dados. Faz quase tantos testes quando o outro PRAGMA mas executa muito mais rápido. &Optimize &Otimizar Attempt to optimize the database Tenta otimizar o banco de dados Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Roda o pragma de otimização sobre o banco de dados aberto. Esse pragma pode realizar otimizações que vão melhorar a performance de consultas futuras. Print Imprimir Print text from current SQL editor tab [Ctrl+P] Imprimir texto do editor SQL [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Abre um diálogo para imprimir o texto na aba atual do editor SQL Print the structure of the opened database [Ctrl+P] Imprime a estrutura do banco de dados aberto [Ctrl+P] Open a dialog for printing the structure of the opened database Abre um diálogo para imprimir a estrutura do banco de dados aberto In-Memory database Banco de dados em memória determining row count... determinando número de linhas... %1 - %2 of >= %3 %1 - %2 de >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Você tem certeza de que deseja deletar a tabela '%1'? Todos os dados associados com a tabela serão perdidos. Are you sure you want to delete the view '%1'? Você tem certeza que deseja deletar a vista '%1'? Are you sure you want to delete the trigger '%1'? Você tem certeza que deseja deletar o gatilho '%1'? Are you sure you want to delete the index '%1'? Você tem certeza que deseja deletar o índice '%1'? Error: could not delete the table. Erro: não pôde deletar a tabela. Error: could not delete the view. Erro: não pôde deletar a vista. Error: could not delete the trigger. Erro: não pôde deletar o gatilho. Error: could not delete the index. Erro: não pôde deletar o índice. Message from database engine: %1 Mensagem do banco de dados: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? Editar a tabela requer salvar todas as mudanças pendentes agora. Você tem certeza que quer salvar o banco de dados? -- EXECUTING SELECTION IN '%1' -- -- EXECUTANDO SELEÇÃO EM '%1' -- -- EXECUTING LINE IN '%1' -- -- EXECUTANDO LINHA EM '%1' -- -- EXECUTING ALL IN '%1' -- -- EXECUTANDO TUDO EM '%1' -- executing query executando consulta %1 rows returned in %2ms %1 linhas retornadas em %2 ms query executed successfully. Took %1ms%2 consulta executada com sucesso. Levou %1 ms%2 -- At line %1: %4 -- Result: %3 -- Na linha %1: %4 -- Resultado: %3 Import completed. Some foreign key constraints are violated. Please fix them before saving. Importação completa. Algumas chaves estrangeiras são violadas. Por favor corrija-as antes de salvar. Choose a project file to open Escolha um arquivo de projeto para abrir This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Esse arquivo de projeto está usando um formato de arquivo mais velho porque ele foi criado usando DB Browser para SQLite versão 3.10 ou menor. Esse arquivo é suportado mas nós aconselhamos converter todos os projetos para o novo formato de arquivos porque o suporte para arquivos antigos pode ser abandonado no futuro. Você pode converter seus arquivos simplesmente abrindo e salvando eles. Duplicate records Duplicar registros Ctrl+" Ctrl+" Collation needed! Proceed? Função de comparação necessária! Proceder? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Uma tabela nesse banco de dados requer uma função de comparação especial '%1' que esse aplicativo não pode prover. So você optar por proceder, esteja avisado de que coisas ruins podem acontecer para o seu banco de dados. Faça um backup! creating collation criando função de comparação Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Defina um novo nome para a aba de SQL. Use o caractere '&&' para poder usar o seguinte caractere como um atalho de teclado. Please specify the view name Por favor, especifique o nome da vista There is already an object with that name. Please choose a different name. Já existe um objeto com esse nome. Por favor, escolha um nome diferente. View successfully created. Vista criada com sucesso. Error creating view: %1 Erro criando vista: %1 There is no filter set for this table. View will not be created. Não há filtro para essa tabela. Vista não será criada. Delete Records Deletar Registros This action will open a new SQL tab for running: Essa ação irá abrir uma nova aba SQL para rodar: Press Help for opening the corresponding SQLite reference page. Pressione Help para abrir a página de referência SQL correspondente. Print currently browsed table data [Ctrl+P] Imprimir dados da tabela atual [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. Imprimir dados da tabela atual. Imprime a seleção se mais de uma célula está selecionada. Error checking foreign keys after table modification. The changes will be reverted. Erro verificando as chaves estrangeiras após modificação. Mudanças serão revertidas. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. Essa tabela não passou um teste de chave estrangeira.<br/>Você deveria rodar 'Ferramentas | Teste de Chave Estrangeira| e corrigir os problemas reportados. Extensions(*.so *.dylib *.dll);;All files(*) Extensões(*.so *.dylib *.dll);;Todo os arquivos(*) NullLineEdit Set to NULL Definir como NULL Alt+Del Alt+Del PlotDock Plot Plotar Columns Colunas X X Y Y _ _ Line type: Tipo da linha: None Nenhum Line Linha StepLeft Passo à esquerda StepRight Passo à direita StepCenter Passo centralizado Impulse Impulso Point shape: Ponto: Cross Cruz Plus Mais Circle Círculo Disc Disco Square Quadrado Diamond Diamante Star Estrela Triangle Triângulo TriangleInverted Triângulo Invertido CrossSquare Cruz Quadrado PlusSquare Mais Quadrado CrossCircle Cruz Círculo PlusCircle Mais Círculo Peace Paz <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Salvar plotagem atual...</p><p>Formato de arquivo definido pela extensão (png, jpg, pdf, bmp)</p></body></html> Save current plot... Salvar plotagem atual... Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Carregar todos os dados. Isso somente tem efeito se nem todos os dados já foram obtidos da tabela devido ao mecanismo de carregamento parcial. Row # Coluna # Choose a axis color Escolha uma cor para o eixo Choose a filename to save under Escolha um nome de arquivo para salvar PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Todos os arquivos(*) Fetching all data... Obtendo todos os dados... Cancel Cancelar <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> <html><head/><body><p>Esse painel mostra a lista de colunas da tabela atualmente exibida ou a consulta recém executada. Você pode selecionar as colunas que você quer que sejam utilizadas como os eixos X e Y para o painel de plotagem abaixo. A tabela mostra o tipo detectado de exio que será utilizado na plotagem. For o eixo Y você só pode selecionar colunas numéricas, mas para o eixo X você pode selecionar:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Data/Hora</span>: strings com o formato &quot;yyyy-MM-dd hh:mm:ss&quot; ou &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Data</span>: strings com o formato &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Hora</span>: strings com o formato &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Rótulo</span>: outros formatos de string. Selecionando essa coluna como X vai produzir um gráfico de barras com as colunas como rótulos para as barras</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numérico</span>: valores inteiros ou reais</li></ul><p>Clicando duas vezes nas células Y você pode mudar a cor usada para aquele gráfico.</p></body></html> Axis Type Tipo do eixo Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Aqui está um gráfico feito quando você seleciona os valores X e Y acima. Clique nos pontos para selecioná-los no gráfico e na tabela. Ctrl+Clique para selecionar um intervalo de pontos. Use o scroll do mouse para dar zoom e arraste o mouse para alterar o intervalo dos eixos. Selecione os eixos ou rótulos dos eixos para arrastar e dar zoom somente naquela orientação. Load all data and redraw plot Carregar todos os dados e plotar de novo Copy Copiar Show legend Mostrar legenda Stacked bars Barras empilhadas Date/Time Data/Hora Date Data Time Hora Numeric Numérico Label Rótulo Invalid Inválido Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Carregar todos os dados e plotar de novo. Aviso: nem todos os dados foram obtidos da tabela ainda devido ao mecanismo de obtenção parcial. Choose an axis color Escolher a cor do eixo There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. Existem curvas nesse gráfico e o estilo de linha selecionado só pode ser aplicado para gráficos ordenados por X. Ou ordene a tabela ou consulte por X para remover curvas ou selecione um dos estilos suportados por curvas: Nenhum ou Linha. Print... Imprimir... PreferencesDialog Preferences Configurações &General &Geral Remember last location Lembrar do último diretório Always use this location Sempre usar esse diretório Remember last location for session only Lembrar do último diretório somente nessa sessão ... ... Default &location Diretório &padrão Lan&guage &Idioma Automatic &updates &Atualizações automáticas enabled ativado &Database &Banco de dados Database &encoding &Codificação do banco de dados Open databases with foreign keys enabled. Abrir bancos de dados com chaves estrangeiras ativado. &Foreign keys &Chaves estrangeiras Remove line breaks in schema view Remove line breaks in schema view &Prefetch block size &Prefetch block size Data &Browser Navegador de &dados NULL fields Campos nulos Text &colour &Cor do texto &Text &Texto Bac&kground colour Cor de &fundo &SQL &SQL Settings name Settings name Context Context Colour Cor Bold Negrito Italic Itálico Underline Underline Keyword Palavra-chave function função Function Função Table Tabela Comment Comentário Identifier Identificador String String currentline currentline Current line Linha atual SQL &editor font size Tamanho da fonte do &editor de SQL SQL &log font size Tamanho da fonte do &log de SQL Tab size: Tab size: SQL editor &font &Fonte do editor de SQL &Extensions &Extensões Select extensions to load for every database: Selecione extensões para carregar para todos os bancos de dados: Add extension Adicionar extensão Remove extension Remover extensão <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>Embora suporte o operador REGEXP, SQLite não implementa expressões regulares mas recorre ao aplicativo em execução.<br/>DB Browser para SQLite implementa esse algoritmo para você poder utilizar REGEXP.<br/>Todavia, como existem múltiplas implementações possíveis desse algoritmo e você pode querer usar outra, você pode desativar a implementação do aplicativo e carregar a sua própria implementação através de uma extensão.<br/>Requer que o programa seja reiniciado.</p></body></html> Disable Regular Expression extension Desativar extensão de expressões regulares Choose a directory Escolha um diretório The language will change after you restart the application. A linguagem mudará após reiniciar o programa. Select extension file Selecione arquivo de extensão Extensions(*.so *.dll);;All files(*) Extensões(*.so *.dll);;Todos os arquivos(*) Remove line breaks in schema &view Remover quebras de linhas em &vista de esquema Prefetch block si&ze &Tamanho de bloco de prefetch Advanced Avançado SQL to execute after opening database SQL para executar após abrir o banco de dados Default field type Tipo padrão de campo Font Fonte &Font &Fonte Font si&ze: &Tamanho da fonte: Field colors Cores do campo NULL NULL Regular Regular Text Texto Binary Binário Background Fundo Filters Filtros Escape character Caractere de escape Delay time (&ms) Tempo de delay (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. Definir o tempo de espera antes de aplicar um novo filtro de valor. Pode ser definido para zero para desativar espera. Tab size Tamanho de tabulação Error indicators Indicadores de erro Enabling error indicators highlights the SQL code lines that caused errors during the last execution Ativar indicadores de erro destaca as linhas de SQL que causaram erros durante a última execução Hori&zontal tiling Disposição &horizontal If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Se ativados, o editor de SQL e a tabela de resultados são exibidos lado a lado em vez de um sobre o outro. Code co&mpletion Co&mpletação de código Show remote options Mostrar opções remotas SQ&L to execute after opening database SQ&L para executar após abrir o banco de dados Content Conteúdo Symbol limit in cell Limite de símbolos na célula Remote Remoto CA certificates Certificados CA Subject CN Nome comum do sujeito Common Name Nome comum Subject O O do sujeito Organization Organização Valid from Válido de Valid to Válido para Serial number Número serial Your certificates Seus certificados File Arquivo Subject Common Name Nome comum do sujeito Issuer CN CN do emissor Issuer Common Name Nome Comum do emissor Import certificate file Importar certificado No certificates found in this file. Nem um certificado encontrado nesse arquivo. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Você tem certeza de que deseja remover esse certificado? Todos os dados do certificado serão deletados das configurações da aplicação! Clone databases into Clonar bancos de dados em Toolbar style Estilo da barra de ferramentas Only display the icon Exibir apenas o ícone Only display the text Exibir apenas o texto The text appears beside the icon O texto aparece ao lado do ícone The text appears under the icon O texto aparece sob o ícone Follow the style Seguir o estilo DB file extensions Extensões de arquivo de bancos de dados Manage Gerenciar Font si&ze &Tamanho da fonte This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Esse é o número máximo de linhas na tabela para preencher baseado nos valores atualmente na coluna. Pode ser 0 para desabilitar preenchimento. Row count threshold for completion Limite de contagem de linhas para preencher Field display Exibição do campo Displayed &text &Texto exibido Text color Cor do texto Background color Cor do plano de fundo Preview only (N/A) Somente prévia (N/D) Foreground Plano de frente SQL &results font size Tamanho da fonte dos &resultados do SQL &Wrap lines &Quebra de linhas Never Nunca At word boundaries Nos limites de palavras At character boundaries Nos limites de caractere At whitespace boundaries Nos limites de espaço em branco &Quotes for identifiers Áspas &para identificadores Choose the quoting mechanism used by the application for identifiers in SQL code. Escolha as áspas utilizadas pela aplicação para identificadores no código SQL. "Double quotes" - Standard SQL (recommended) "Áspas duplas" - SQL Padrão (recomendado) `Grave accents` - Traditional MySQL quotes `Crases`- MySQL tradicional [Square brackets] - Traditional MS SQL Server quotes [Colchetes] - MS SQL Server tradicional Keywords in &UPPER CASE Palavras-chave em &CAIXA ALTA When set, the SQL keywords are completed in UPPER CASE letters. Quando definido, as palavras-chave SQL serão completadas em CAIXA ALTA. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background Quando definido, as linhas de código SQL que causaram erros durante a última execução são destacadas e os resultados indicam os erros no fundo Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. Você tem certeza que deseja limpar as configurações salvas? Todas as suas preferências serão perdidas e os valores padrão serão utilizados. When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Quando ativado, as quebras de linha na coluna Esquema da aba Estrutura do banco de dados e nas saídas impressas são removidas. <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> <html><head/><body><p>SQLite provê uma função SQL para carregar extensões de uma biblioteca compartilhada. Ative isso se você quer usar a função <span style=" font-style:italic;">load_extension()</span> do código SQL.</p><p>Por motivos de segurança, o carregamento de extensões é desligado por padrão e precisa ser habilitado por essa opção. Você sempre pode carregar extensões através da GUI, mesmo se essa opção estiver desabilitada.</p></body></html> Allow loading extensions from SQL code Permitir o carregamento de extensões a partir do código SQL Extensions(*.so *.dylib *.dll);;All files(*) Extensões(*.so *.dylib *.dll);;Todos os arquivos(*) QObject Error importing data Erro importando dados from record number %1 a partir de registro número %1 . %1 . %1 Decoding CSV file... Decodificando arquivo CSV... Cancel Cancelar Collation needed! Proceed? Função de comparação necessária! Proceder? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Uma tabela nesse banco de dados requer uma função de comparação especial '%1' que esse aplicativo não pode prover. So você optar por proceder, esteja avisado de que coisas ruins podem acontecer para o seu banco de dados. Faça um backup! SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Arquivos de banco de dados SQL (*.db *.sqlite *.sqlite3 *.db3);;Todos os arquivos (*) All files (*) Todos arquivos (*) Importing CSV file... Importando arquivo CSV... SQLite database files (*.db *.sqlite *.sqlite3 *.db3) Bancos de dados SQLite (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error: Invalid client certificate specified. Erro: Certificado de cliente inválido especificado. Please enter the passphrase for this client certificate in order to authenticate. Por favor entre a frase chave para esse certificado de cliente para se autenticar. Cancel Cancelar Uploading remote database to %1. Enviando banco de dados remoto para %1. Downloading remote database from %1. Baixando banco de dados remoto de %1. Error: The network is not accessible. Erro: A rede não é acessível. Error: Cannot open the file for sending. Erro: Não pôde abrir o arquivo para envio. Error when connecting to %1. %2 Erro quando conectando com %1. %2 Error opening remote file at %1. %2 Erro abrindo arquivo remoto em %1. %2 Error opening local databases list. %1 Erro abrindo lista local de bancos de dados. %1 Error creating local databases list. %1 Erro criando lista local de bancos de dados. %1 Uploading remote database to %1 Enviando banco de dados remoto para %1 Downloading remote database from %1 Baixando banco de dados remoto de %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. O banco de dados remoto foi atualizado desde o último checkout. Você deseja atualizar o banco de dados local para a versão mais nova? Note que isso descarta quaisquer mudanças que você fez localmente! Se você não quer perder essas alterações, clique Não para abrir a versão local. RemoteDock Remote Remoto B&rowse &Navegar Local Local Identity Identidade Go Ir Push currently opened database to server Enviar o banco de dados aberto para o servidor Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Conectar com o servidor remoto usando a identidade atualmente selecionada. O servidor correto é obtido a partir da identidade também. <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> <html><head/><body><p>Nesse painel, bancos de dados remotos do dbhub.io podem ser adicionados ao DB4S. Primeiro você precisa de uma identidade:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Entre no dbhub.io</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Clique no botão para criar um certificado do DB4S (a sua identidade). Isso irá dar um arquivo de certificado que você deve salvar para o disco local</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Vá para a aba Remoto nas preferências do DB4S. Clique o botão para adicionar um novo certificado ao DB4S e escolha o arquivo recém baixado.</li></ol><p>Agora o painel Remoto mostra a sua identidade e você pode adicionar bancos de dados remotos.</p></body></html> RemoteModel Name Nome Version Versão Last modified Última modificação Size Tamanho bytes bytes Commit Commit RemotePushDialog Push database Enviar banco de dados Database na&me to push to No&me do banco de dados para enviar Commit message Mensagem de commit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Licença do banco de dados Public Público Database will be public. Everyone has read access to it. Banco de dados será público. Todos poderão lê-lo. Database will be private. Only you have access to it. Banco de dados será privado. Somente você terá acesso a ele. Unspecified Não especificado Branch Ramo Force push Forçar envio Use with care. This can cause remote commits to be deleted. Use com cuidado. Isso pode causar a perda de commits remotos. SqlExecutionArea Form Formulário <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> <html><head/><body><p>Resultados dos últimos comandos executados.</p><p>Você pode querer colapsar esse painel e usar o <span style=" font-style:italic;">Log do SQL</span> com seleção de <span style=" font-style:italic;">Usuário</span> em vez disso.</p></body></html> Results of the last executed statements Resultados dos últimos comandos executados This field shows the results and status codes of the last executed statements. Esse campo mostra os resultados e códigos de status dos últimos comandos executados. Export to &CSV Exportar para &CSV Save as &view Salvar como &vista Save as view Salvar como vista Please specify the view name Por favor, especifique o nome da vista There is already an object with that name. Please choose a different name. Já existe um objeto com esse nome. Por favor, escolha um nome diferente. View successfully created. Vista criada com sucesso. Error creating view: %1 Erro criando vista: %1 Find previous match [Shift+F3] Encontrar resultado anterior [Shift+F3] Find previous match with mapping Encontrar resultado anterior com mapeamento Shift+F3 Shift+F3 The found pattern must be a whole word O padrão encontrado precisa ser uma palavra inteira Whole Words Palavras inteiras Text pattern to find considering the checks in this frame Padrão de texto para encontrar considerando os testes nesse frame Find in editor Encontrar no editor The found pattern must match in letter case O padrão encontrado precisa casar em capitalização Case Sensitive Sensível à capitalização Find next match [Enter, F3] Encontrar próxima correspondência [Enter, F3] Find next match with wrapping Encontrar próxima correspondência no arquivo inteiro F3 F3 Interpret search pattern as a regular expression Interpretar padrão de busca como expressão regular <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>Quando assinalado, o padrão a ser buscado é interpretado como uma expressão regular UNIX. Veja <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression nos Wikibooks</a>.</p></body></html> Regular Expression Expressão Regular Close Find Bar Fechar barra de busca SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) ltrim(X) removes spaces from the left side of X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X) rtrim(X) removes spaces from the right side of X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. (X) trim(X) removes spaces from both ends of X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () O número de linhas dentro da partição atual. Linhas são numeradas de 1 na ordem definida pela cláusula ORDER BY na definição da janela, ou de forma arbitrária. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () O row_number() do primeiro elemento de cada grupo - o rank da linha atual com gaps. Se não há uma cláusula ORDER BY, então todas as linhas são consideradas elementos e essa função sempre retorna 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () O número do grupo de colegas da linha atual dentro da sua partição - o rank da linha atual sem intervalos. Partições são numeradas a partir de 1 na ordem definida pela cláusula ORDER BY na definição. Se não há ORDER BY, então todas as linhas são consideradas colegas e essa função sempre retorna 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () Apesar do nome, essa função sempre retorna um valor entre 0.0 e 1.0 igual a (rank - 1)/(linhas-na-partição - 1), onde rank é o valor retornado pela built-in rank() e linhas-na-partição é o número total de linhas na partição. Se a partição contém somente uma linha, essa função retorna 0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. () A distribuição cumulativa. Calculada como número-da-linha/linhas-na-partição em que número-da-linha é o valor retornado por row_number() para o último elemento do grupo e linhas-na-partição é o número de linhas na partição. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (N) Argumento N é interpretado como um inteiro. Essa função divide a partição em N grupos tão igualmente como possível e atribui um inteiro entre 1 e N para cada grupo, na ordem definida pela cláusula ORDER BY, ou em ordem arbitrária. Se necessário, grupos maiores ocorrem primeiro. Essa função retorna o valor inteiro atribuido ao grupo que a linha atual é parte de. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr) Retorna o resultado de avaliar expressão expr contra a linha anterior na partição. Ou, se não há linha anterior, NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset) Se o offset é fornecido, então ele precisa ser um inteiro não-negativo. Nesse caso, o valor retornado é o resultado de avaliar expr contra a linha offset linhas antes da linha atual dentro da partição. Se offset é 0, então expr é avaliada contra a linha atual. Se não há linha offset linhas antes da linha atual, NULL é retornado. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr,offset,default) Se default também é fornecido, ele é retornado em vez de NULL se a linha identificada por offset não existe. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr) Retorna o resultado de avaliar a expressão expr contra a próxima linha na partição. Ou, se não há próxima linha, NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr,offset) Se o offset é fornecido, então ele precisa ser um inteiro não-negativo. Nesse caso, o valor retornado é o resultado de avaliar expr contra a linha offset linhas após a linha atual dentro da partição. Se offset é 0, então expr é avaliada contra a linha atual. Se não há linha offset linhas após a linha atual, NULL é retornado. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) Essa função de janela built-in calcula o frame da janela para cada linha na mesma forma que uma função de janela agregada. Ela retorna o valor de expr avaliada contra a primeira linha do frame da janela para cada linha. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr) Essa função de janela built-in calcula o frame da janela para cada linha na mesma forma que uma função de janela agregada. Ela retorna o valor de expr avaliada contra a última linha do frame da janela para cada linha. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. (expr) Essa função de janela built-in calcula o frame da janela para cada linha na mesma forma que uma função de janela agregada. Ela retorna o valor de expr avaliada contra a linha N do frame da janela para cada linha.Linhas são numeradas dentro do frame da janela começando em 1 na ordem definida pela cláusula ORDER BY se uma está presente, ou em ordem arbitrária, caso contrário. Se não há uma N-ésima linha na partição, NULL é retornado. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X) A função load_extension(X) carrega extensões do SQLite da biblioteca compartilhada chamada X. Uso dessa função precisa ser habilitado em Preferências. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X,Y) A função load_extension(X) carrega extensões do SQLite da biblioteca compartilhada chamada X usando o ponto de entrada Y. Uso dessa função precisa ser habilitado em Preferências. SqliteTableModel Error changing data: %1 Erro modificando dados: %1 References %1(%2) Hold Ctrl+Shift and click to jump there Referencia %1(%2) Pressione Ctrl+Shift e clique para ir até lá reading rows lendo linhas loading... carregando... References %1(%2) Hold %3Shift and click to jump there Referencia %1(%2) Segure %3Shift e clique para ir para lá retrieving list of columns obtendo lista de colunas Fetching data... Obtendo dados... Cancel Cancelar VacuumDialog Compact Database Compactar banco de dados Warning: Compacting the database will commit all changes you made. Alerta: compactar o banco de dados confirmará todas as alterações feitas. Please select the objects to compact: Por favor, selecione os objetos que deseja compactar: Warning: Compacting the database will commit all of your changes. Alerta: compactando o banco de dados irá confirmar todas as suas modificações. Please select the databases to co&mpact: Por favor selecione o banco de dados para co&mpactar: sqlitebrowser-3.11.2/src/translations/sqlb_ru.ts000066400000000000000000012612211345112435200220370ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite О программе Обозреватель для SQLite Version Версия <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>Обозреватель для SQLite - это бесплатная программа, с открытым исходным кодом, предназначенная для создания и редактирования баз данных SQLite.</p><p>Программа лицензирована по двум лицензиям: Mozilla Public License Version 2 и GNU General Public License Version 3 or later. Можно изменять или распространять её на условиях этих лицензий.</p><p>Лицензии можно просмотреть по ссылкам <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> и <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a>.</p><p>Дополнительную информацию о программе можно узнать на веб-сайте:<br/><a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">Это программное обеспечение использует GPL/LGPL Qt Toolkit </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Условия лицензии на Qt Toolkit </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;">.</span></p><p><span style=" font-size:small;">Эта программа также использует набор иконок Silk от Марка Джеймса (Mark James), лицензированный под лицензией Creative Commons Attribution 2.5 and 3.0.<br/>Подробная информация по адресу </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;">.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>Обозреватель для SQLite - это бесплатная программа, с открытым исходным кодом, предназначенная для создания и редактирования баз данных SQLite.</p><p>Программа лицензирована по двум лицензиям: Mozilla Public License Version 2 и GNU General Public License Version 3 or later. Можно изменять или распространять её на условиях этих лицензий.</p><p>Лицензии можно просмотреть по ссылкам <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> и <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a>.</p><p>Дополнительную информацию о программе можно узнать на веб-сайте:<br/><a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">Это программное обеспечение использует GPL/LGPL Qt Toolkit </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Условия лицензии на Qt Toolkit </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;">.</span></p><p><span style=" font-size:small;">Эта программа также использует набор иконок Silk от Марка Джеймса (Mark James), лицензированный под лицензией Creative Commons Attribution 2.5 and 3.0.<br/>Подробная информация по адресу </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;">.</span></p></body></html> (based on SQLite %1) (базируется на SQLite %1) Version Версия Built for Qt Version Версия Qt SQLCipher Version Версия SQLCipher SQLite Version Версия SQLite AddRecordDialog Add New Record Добавить Новую Запись Enter values for the new record considering constraints. Fields in bold are mandatory. Введите значения для новой записи с учетом ограничений. Поля, выделенные жирным шрифтом, являются обязательными. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. В столбце "Значение" вы можете указать значение для поля, указанного в столбце "Имя". В столбце "Тип" указывается тип поля. Значения по умолчанию отображаются в том же стиле, что и значения NULL. Name Имя Type Тип Value Значение Values to insert. Pre-filled default values are inserted automatically unless they are changed. Значения для вставки. Предварительно заполненные значения по умолчанию вставляются автоматически, если они не изменены. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. Когда вы редактируете значения в верхнем фрейме, здесь отображается запрос SQL для вставки этой новой записи. Вы можете вручную отредактировать запрос перед сохранением. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">Сохранение</span> отправит показанный оператор SQL в БД для вставки новой записи.</p><p><span style=" font-weight:600;">Восстановить значения по умолчанию</span> восстановит исходные значения в колонке <span style=" font-weight:600;">Значение</span>.</p><p><span style=" font-weight:600;">Отмена</span> закрывает этот диалог без выполнения запросов.</p></body></html> Auto-increment Авто-увеличение Unique constraint Уникальнось Check constraint: %1 Проверка: %1 Foreign key: %1 Внешний ключ: %1 Default value: %1 Значение по умолчанию: %1 Error adding record. Message from database engine: %1 Ошибка добавления записи. Сообщение из базы данных: %1 Are you sure you want to restore all the entered values to their defaults? Вы действительно хотите восстановить все введенные значения по умолчанию? Application Usage: %1 [options] [db] Possible command line arguments: -h, --help Show command line options -s, --sql [file] Execute this SQL file after opening the DB -t, --table [table] Browse this table after opening the DB This is DB Browser for SQLite version %1. -q, --quit Exit application after running scripts -R, --read-only Open database in read-only mode -o, --option [group/setting=value] Run application with this setting temporarily set to value -v, --version Display the current version [file] Open this SQLite database The -s/--sql option requires an argument The file %1 does not exist The -t/--table option requires an argument The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 CipherDialog SQLCipher encryption Шифрование SQLCipher &Password &Пароль &Reenter password Пароль &ещё раз Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze Размер &страницы &KDF iterations HMAC algorithm KDF algorithm Passphrase Фраза Raw key Ключ Page &size Размер &страницы Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Пожалуйста укажите ключ шифрования. Если вы измените какую-либо опциональную настройку, то ее нужно будет вводить при каждом открытии этого файла базы данных. Оставьте пароль пустым если шифрование не требуется. Процесс может занять некоторое время и настоятельно рекомендуем создать резервную копию перед продолжением! Не сохраненные изменения автоматически будут сохранены. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. Пожалуйста введите ключ для шифрования базы данных. Если любые другие настройки были изменены для данной базы данный то нужно так же предоставить данную информацию. ColumnDisplayFormatDialog Choose display format Выберите формат отображения Display format Формат отображения Choose a display format for the column '%1' which is applied to each value prior to showing it. Выберите формат отображения для колонки '%1', который будет применен к каждому ее значению. Default По умолчанию Decimal number Десятичное число Exponent notation Экспоненциальная запись Hex blob Бинарные данные Hex number Шестнадцатеричное число Apple NSDate to date Apple NSDate дата Java epoch (milliseconds) to date Java epoch дата Julian day to date Юлианская дата Unix epoch to local time Unix-время Date as dd/mm/yyyy Дата в формате дд/мм/гггг Lower case Нижний регистр Octal number Восьмеричное число Round number Округленное число Unix epoch to date Unix-дата Upper case Верхний регистр Windows DATE to date Windows дата Custom Мой формат DBBrowserDB Please specify the database name under which you want to access the attached database Invalid file format Ошибочный формат файла Do you want to save the changes made to the database file %1? Сохранить сделанные изменения в файле базы данных %1? Exporting database to SQL file... Экспорт базы данных в файл SQL... Cancel Отменить Executing SQL... Выполнить код SQL... Action cancelled. Действие отменено. Error in statement #%1: %2. Aborting execution. Ошибка в операторе #%1: %2. Прерывание выполнения. renameColumn: cannot find table %1. переименованиеСтолбца: невозможно найти таблицу %1. This database has already been attached. Its schema name is '%1'. Эта БД уже присоединена. Имя ее схемы - '%1'. Do you really want to close this temporary database? All data will be lost. Вы действительно хотите закрыть эту временную БД? Все данные будут потеряны. The database is currently busy: БД занята: Do you want to abort that other operation? Вы хотите отменить эту операцию? No database file opened Файл БД не открыт Error in statement #%1: %2. Aborting execution%3. Ошибка в выражении #%1: %2. Прерываем выполнение%3. and rolling back и отменяем didn't receive any output from %1 could not execute command: %1 Cannot delete this object Не удается удалить этот объект Cannot set data on this object Невозможно назначить данные для этого объекта A table with the name '%1' already exists in schema '%2'. Таблица с именем '%1' уже существует в схеме '%2'. renameColumn: cannot find column %1. переименованиеСтолбца: невозможно найти столбец %1. renameColumn: creating savepoint failed. DB says: %1 переименованиеСтолбца: ошибка создания точки сохранения. БД говорит: %1 renameColumn: creating new table failed. DB says: %1 переименованиеСтолбца: ошибка создания новой таблицы. БД говорит: %1 renameColumn: copying data to new table failed. DB says: %1 переименованиеСтолбца: ошибка копирования данных в новую таблицу. БД говорит: %1 renameColumn: deleting old table failed. DB says: %1 переименованиеСтолбца: ошибка удаления старой таблицы. БД говорит: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: Ошибка восстановления некоторых объектов, ассоциированных с этой таблицей. Наиболее вероятная причина этого - изменение имён некоторых столбцов таблицы. Вот SQL оператор, который нужно исправить и выполнить вручную: renameColumn: releasing savepoint failed. DB says: %1 переименованиеСтолбца: ошибока освобождения точки сохранения. БД говорит: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Ошибка переименования программы '%1' в '%2'.Сообщение от движка БД: %3 ... <string can not be logged, contains binary data> ... ... <строка не может быть залогирована, содержит двоичные данные> ... could not get list of databases: %1 не могу получить список БД: %1 Error loading extension: %1 Ошибка загрузки расширения: %1 could not get column information не могу полчить информацию о колонке unknown object type %1 неизвестный тип объекта %1 could not get list of db objects: %1, %2 невозможно получить список объекто БД: %1, %2 could not get types невозможно получить типы didn't receive any output from pragma %1 не принято ни одного выхода из прагмы %1 could not execute pragma command: %1, %2 невозможно выполнить комманду-прагму: %1, %2 Error setting pragma %1 to %2: %3 Ошибка установки прагмы %1 в %2: %3 File not found. Файл не найден. DbStructureModel Name Имя Object Объект Type Тип Schema Схема Browsables (%1) Просматриваемые (%1) Database База данных Browsables Просматриваемые All Все Temporary Временный Tables (%1) Таблицы (%1) Indices (%1) Индексы (%1) Views (%1) Представления (%1) Triggers (%1) Триггеры (%1) EditDialog Edit database cell Редактирование ячейки базы данных Mode: Режим: Image Изображение Import text Импортировать текст Opens a file dialog used to import text to this database cell. Открывается файловый диалог, чтобы импортировать текств эту ячейку базы данных. &Import &Импортировать Export text Экспортировать текст Opens a file dialog used to export the contents of this database cell to a text file. Открывается файловый диалог, чтобы экспоритровать содержимое этой ячейки базы данных в текстовый файл. &Export &Экспортировать Set this cell to NULL Присвоить данной ячейке NULL значение Set as &NULL Присвоить &NULL Apply data to cell [Ctrl+Return] Применить данные к ячейке [Ctrl+Enter] This button saves the changes performed in the cell editor to the database cell. Нажав эту кнопку, вы сохраните изменения произведенные в этом редакторе, в соответствующую ячейку БД. Apply Применить Text Текст This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Это список поддерживаемых режимов. Выбирете режим для просмотра или редактирования данных текущей ячейки. Binary Двоичные данные JSON XML Automatically adjust the editor mode to the loaded data type Автоматически подбор режима редактора на основе данных This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Эта кнопка позволяет включать или отключать автоматическое переключение режима редактора. Когда выбрана новая ячейка или импортированы новые данные, а автоматическое переключение включено, режим настраивается на обнаруженный тип данных. Вы можете вручную изменить режим редактора. Если вы хотите сохранить этот режим ручного переключения при перемещении по ячейкам, выключите кнопку. Auto-switch Автопереключение Auto-format: pretty print on loading, compact on saving. Автоматическое форматирование: стилистическое форматирование при загрузке, компактность - при сохранении. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Когда включено, функция автоматического форматирования форматирует данные по загрузке, разбивая текст в строках и отступы для максимальной читаемости. При сохранении данных функция автоматического форматирования объединяет данные, удаляющие конец строк, и ненужные пробелы. Autoformat Автоформатирование Import from file Импортировать из файла Opens a file dialog used to import any kind of data to this database cell. Открывает диалоговое окно файла, используемое для импорта любых данных в эту ячейку базы данных. Export to file Экспортировать в файл Opens a file dialog used to export the contents of this database cell to a file. Открывает диалоговое окно файла, используемое для экспорта содержимого этой ячейки базы данных в файл. Erases the contents of the cell Очищается содержимое ячейки This area displays information about the data present in this database cell Эта область отображает информацию о данных, находящихся в этой ячейке базы данных This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Этот режим редактора позволяет редактировать данные JSON или XML с подсветкой синтаксиса, автоматическим форматированием и проверкой перед сохранением. Ошибки обозначаются красным подчеркиванием. Type of data currently in cell Тип данных в ячейке Size of data currently in table Размер данных в таблице Print... Печать... Open preview dialog for printing displayed image Открыть диалоговое окно предварительного просмотра для печати отображаемого изображения Ctrl+P Ctrl+P Open preview dialog for printing displayed text Открыть диалоговое окно предварительного просмотра для печати отображаемого текста Copy Hex and ASCII Копировать HEX и ASCII Copy selected hexadecimal and ASCII columns to the clipboard Копировать выбранные HEX и ASCII столбцы в буфер обмена Ctrl+Shift+C Choose a file Выбрать файл Text files(*.txt);;Image files(%1);;All files(*) Текстовые файлы(*.txt);;Файлы изображений(%1);;Все файлы(*) Choose a filename to export data Выбрать имя файла для экспорта данных Text files(*.txt);;All files(*) Текстовые файлы(*.txt);;Все файлы(*) Image data can't be viewed with the text editor Изображение не может быть отображено в текстовом редакторе Binary data can't be viewed with the text editor Бинарные данные не могут быть отображены в текстовом редакторе Type of data currently in cell: %1 Image Тип данных в ячейке: %1 Изображение %1x%2 pixel(s) %1x%2 пикселей Type of data currently in cell: NULL Тип данных в ячейке: NULL Type of data currently in cell: Text / Numeric Тип данных в ячейке: Текст / Числовое Image data can't be viewed in this mode. Изображение не может быть отображено в этом режиме. Try switching to Image or Binary mode. Попробуйте переключиться в Бинарный режим или режим Изображения. Binary data can't be viewed in this mode. Бинарные данные не могут быть отображены в этом режиме. Try switching to Binary mode. Попробуйте переключиться в Бинарный режим. Text files (*.txt) Текстовые файлы (*.txt) JSON files (*.json) JSON файлы (*.json) XML files (*.xml) XML файлы (*.xml) Image files (%1) Файлы изображений (%1) Binary files (*.bin) Бинарные файлы (*.bin) All files (*) Все файлы (*) Choose a file to import Выбрать файл для импорта %1 Image %1 Изображение SVG files (*.svg) SVG файлы (*.svg) Hex dump files (*.txt) Файлы дампов (*.txt) Invalid data for this mode Ошибочные данные для этого режима The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? Ячейка содержит ошибочные %1 данные. Причина: %2. Вы действительно хотите применить их? %n char(s) %n символ %n символа %n символов Type of data currently in cell: Valid JSON Тип данных в ячейке: JSON Type of data currently in cell: Binary Тип данных в ячейке: Двоичные данные %n byte(s) %n байт %n байта %n байтов EditIndexDialog Create New Index Создание нового индекса &Name &Имя &Columns &Столбцы Column Столбец Use in Index Использовать в индексе Order Сортировка &Table &Таблица Edit Index Schema Редактирование Индекса &Unique &Уникальный For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Для ограничения индекса только частью таблицы вы можете указать здесь выражение WHERE, которое выбирает часть таблицы, которая должна быть проиндексирована Partial inde&x clause &Частичный индекс Colu&mns &Колонки Table column Колонка таблицы Type Тип Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Добавить новое колоночное-выражение в индекс. Колоночное выражение может содержкать SQL выражения вместо имен колонок. Index column Колонка индекса Deleting the old index failed: %1 Удаление старого индекса завершилось с ошибкой: %1 Creating the index failed: %1 Ошибка создания индекса: %1 EditTableDialog Edit table definition Редактирование определения таблицы Table Таблица Advanced Дополнительно Database schema Схема БД Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Чтобы создать таблицу 'без rowid', нужно чтобы в ней был INTEGER первичный ключ с отключенным автоинкрементом. Without Rowid Без rowid Fields Поля Add field Добавить поле Remove field Удалить поле Move field up Переместить поле вверх Move field down Переместить поле вниз Name Имя Type Тип NN НП Not null Не пустое (null) PK ПК Primary key Первичный ключ AI АИ Autoincrement Автоинкремент U У Unique Уникальное Default По умолчанию Default value Значение по умолчанию Check Проверить Check constraint Проверить ограничение Foreign Key Внешний ключ <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Внимание: </span>В описании этой таблицы есть что-то, что наш парсер не понимает. Модификация и сохрание этой таблицы может породить проблемы.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result it in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Внимание: </span>Определение данной таблицы наш парсер не смог понять. Eё модификация и сохранение может привести к последующим проблемам.</p></body></html> Error creating table. Message from database engine: %1 Ошибка создания таблицы. Сообщение от движка базы данных: %1 There already is a field with that name. Please rename it first or choose a different name for this field. Поле с таким именем уже существует. Пожалуйста переименуйте его, либо выберите другое имя для данного поля. This column is referenced in a foreign key in table %1, column %2 and thus its name cannot be changed. На данную колонку ссылкается внешний ключ в таблице %1, поле %2 поэтому ее имя не может быть изменено. This column is referenced in a foreign key in table %1 and thus its name cannot be changed. На данную колонку ссылкается внешний ключ в таблице %1, поэтому ее имя не может быть изменено. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. Существует по крайней мере одна строка, где это поле установлено в NULL. Установить этот флаг нельзя. Сначала измените данные таблицы. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Существует по крайней мере одна строка, где это поле содержит нечисловое значение. Установить флаг АИ нельзя. Сначала измените данные таблицы. Column '%1' has no unique data. Колонка '%1' не содержит уникальных данных. This makes it impossible to set this flag. Please change the table data first. Невозможно. Для начала, измените данные таблицы. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Modifying this column failed. Error returned from database: %1 Модификация этой колонки завершилась с ошибкой: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Удалить поле '%1'? Все данные, которые в настоящий момент сохранены в этом поле, будут потеряны. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Перед тем как применять флаг без rowid, пожалуйста убедитесь, что существует столбец, который: - является первичный ключом - для него отключен автоинкремент Setting the rowid column for the table failed. Error message: %1 Назначение rowid колонки завершилось с ошибкой: %1 Changing the table schema failed. Error message: %1 Изменение схемы таблицы завершилось с ошибкой: %1 ExportDataDialog Export data as CSV Экспортировать данные в формате CSV &Table(s) &Таблицы &Column names in first line &Имена столбцов в первой строке Field &separator &Разделитель полей Tab&le(s) &Таблицы Colu&mn names in first line &Имена столбцов в первой строке Fie&ld separator &Разделитель полей , , ; ; Tab Табуляция | | Other Другой &Quote character &Символ кавычки " " ' ' New line characters Разделитель строк Windows: CR+LF (\r\n) Unix: LF (\n) Pretty print Красивый вывод Could not open output file: %1 Не удалось открыть выходной файл: %1 Choose a filename to export data Выберите имя файла для экспорта данных Text files(*.csv *.txt) Текстовые файлы(*.csv *.txt) Export data as JSON Экспортировать данные как JSON exporting CSV экспортирование CSV exporting JSON экспортирование JSON Text files(*.json *.js *.txt) Текстовые файлы (*.json *.js *.txt) Please select at least 1 table. Пожалуйста, выберите хотя бы одну таблицу. Choose a directory Выберать каталог Export completed. Экспорт завершён. ExportSqlDialog Export SQL... Экспорт SQL.... Tab&le(s) &Таблицы Select All Выбрать все Deselect All Отменить выбор &Options &Опции Keep column names in INSERT INTO Имя столбцов в выражении INSERT INTO Multiple rows (VALUES) per INSERT statement Несколько строк (VALUES) на INSERT выражение Export everything Экспортировать все Export data only Экспортировать только данные Keep old schema (CREATE TABLE IF NOT EXISTS) Проверять существоватние таблицы (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Удалять старую таблицу перед созданием (DROP TABLE, затем CREATE TABLE) Export schema only Экспортировать только схему данных Please select at least 1 table. Пожалуйста, выберите хотя бы одну таблицу. Please select at least one table. Пожалуйста, выберите хотя бы одну таблицу. Choose a filename to export Выберите имя файла для экспорта Text files(*.sql *.txt) Текстовые файлы(*.sql *.txt) Export completed. Экспорт завершён. Export cancelled or failed. Экспорт отменён или возникли ошибки. ExtendedScintilla Ctrl+H Ctrl+P Ctrl+P Find and Replace... Найти и Заменить... Print... Печать... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? Содержимое буфера обмена больше чем выбранный диапазон. Все равно вставить? Use as Exact Filter Использовать как Точный Фильтр Containing Содержит Not equal to Не равно Greater than Больше чем Less than Меньше чем Greater or equal Больше или равно Less or equal Меньше или равно Between this and... Между этим и... Set to NULL Сбросить в NULL Copy Копировать Copy with Headers Копировать с заголовками Copy as SQL Копировать как SQL Paste Вставить Print... Печать... Use in Filter Expression Использовать в Выражении Фильтра Alt+Del Ctrl+Shift+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? Содержимое буфера обмена больше чем выделенный диапозон. Все равно вставить? FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Файлы SQLite баз данных (*.db *.sqlite *.sqlite3 *.db3);;Все файлы (*) FileExtensionManager File Extension Manager Менеджер расширения файлов &Up &Выше &Down &Ниже &Add &Добавить &Remove &Удалить Description Описание Extensions Расширения *.extension FilterLineEdit Filter Фильтр These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Эти поля ввода позволяют назначить фильтры для текущей таблице. По умолчанию строки, содержащие входной текст, отфильтровываются. Поддерживаются также следующие операторы: % Символ подстановки > Больше, чем < Меньше, чем >= Равно или больше <= Равно или меньше = Равно: точное совпадение <> Неравномерно: точное обратное совпадение x~y Диапазон: значения между x и y Set Filter Expression Установить Выражение Фильтра What's This? Что Это? Is NULL NULL Is not NULL не NULL Is empty пусто Is not empty не пусто Equal to... Равно... Not equal to... Не равно... Greater than... Больше чем... Less than... Меньше чем... Greater or equal... Больше или равно... Less or equal... Меньше или равно... In range... В диапазоне... FindReplaceDialog Find and Replace Поиск и Замена Fi&nd text: &Текст для поиска: Re&place with: Текст для &замены: Match &exact case Учитывать &регистр Match &only whole words Слова &целиком When enabled, the search continues from the other end when it reaches one end of the page Когда отмечено, поиск продолжается с другого конца, когда он достигает противоположного конца страницы &Wrap around &Закольцевать When set, the search goes backwards from cursor position, otherwise it goes forward Когда отмечено, поиск возвращается назад из положения курсора, в противном случае он идет вперед Search &backwards Искать в &обратном порядке <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>При проверке шаблон для поиска интерпретируется как регулярное выражение UNIX. <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Узнать больше о Регулярных выражениях на Wikibooks.org</a>.</p></body></html> Use regular e&xpressions &Регулярные выражения Find the next occurrence from the cursor position and in the direction set by "Search backwards" Найдите следующее вхождение из позиции курсора и в направлении, заданном "Искать назад" &Find Next Искать &дальше &Replace &Замена Highlight all the occurrences of the text in the page Выделить все вхождения текста на странице F&ind All Найти &все Replace all the occurrences of the text in the page Заменить все вхождения текста на странице Replace &All За&менить все The searched text was not found Искомый текст не найден The searched text was not found. Искомый текст не найден. The searched text was found one time. Искомый текст найден один раз. The searched text was found %1 times. Искомый текст найден %1 раз. The searched text was replaced one time. Искомый текст заменен один раз. The searched text was replaced %1 times. Искомый текст заменен %1 раз. ForeignKeyEditor &Reset &Сброс Foreign key clauses (ON UPDATE, ON DELETE etc.) Условия (ON UPDATE, ON DELETE и т.д.) ImportCsvDialog Import CSV file Импортировать файл в формате CSV &Table name &Имя таблицы Table na&me &Имя таблицы &Column names in first line И&мена столбцов в первой строке Field &separator &Разделитель полей , ; Tab Табуляция | Other Другой &Quote character &Символ кавычки " ' &Encoding &Кодировка UTF-8 UTF-16 ISO-8859-1 Trim fields? Обрезать поля? Separate tables Отдельные таблицы Advanced Дополнительно When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. При импорте пустого значения из файла CSV в существующую таблицу для столбца с указанным значением по умолчанию оно будет вставлено. Активируйте эту опцию, чтобы вместо этого вставить пустое значение. Ignore default &values Игнорировать значение &по-умолчанию Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Активируйте эту опцию чтобы прекратить импорт при попытке импорта пустого значения в NOT NULL колонку без значения по-умолчанию. Fail on missing values Ошибка при отсутствии значений Disable data type detection Отключить определение типа данных Disable the automatic data type detection when creating a new table. Отключить автоматическое определение типа при создании новой таблицы. Deselect All Отменить Выбор Match Similar Найти Совпадения Select All Выбрать Все Inserting data... Вставка данных... Cancel Отменить There is already a table of that name and an import into an existing table is only possible if the number of columns match. Уже существует таблица с таким же именем, и импорт в существующую таблицу возможен, только если число столбцов совпадает. There is already a table of that name. Do you want to import the data into it? Уже существует таблица с таким именем. Импортировать данные в неё? Import completed Импорт завершён There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. Уже существует таблица с именем '%1' и импорт в существующую таблицу возможен, только если число столбцов совпадает. There is already a table named '%1'. Do you want to import the data into it? Уже существует таблица с именем '%1'. Вы хотите импортировать данные в нее? Creating restore point failed: %1 Ошибка сознания точки восстановления: %1 Creating the table failed: %1 Ошибка создания таблицы: %1 importing CSV импортирование CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Импорт файла '%1' занял %2мс. Из них %3мс было потрачено в функции строки. Missing field for record %1 Пропущен столбец для записи %1 Inserting row failed: %1 Ошибка вставки строки: %1 MainWindow DB Browser for SQLite Обозреватель для SQLite toolBar1 панельИнструментов1 Table: Таблица: Select a table to browse data Выберите таблицу для просмотра данных Use this list to select a table to be displayed in the database view Используйте этот список, чтобы выбрать таблицу, которая должна быть отображена в представлении базы данных Refresh the data in the selected table. Обновить данные в выбранной таблице. This button refreshes the data in the currently selected table. Эта кнопка отновляет данные выбранной в данный момент таблицы. This button clears all the filters set in the header input fields for the currently browsed table. Эта кнопка очищает все фильтры, установленные в полях ввода заголовка для текущей просматриваемой таблицы. Save the table as currently displayed Сохранить таблицу так как сейчас отображается <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> <html><head/><body><p>Это всплывающее меню предоставляет следующие параметры, применяемые к текущей просматриваемой и отфильтрованной таблице:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Экспортировать ввиде CSV: данные просматриваемой таблицы сохраняется так как отображается (после применения фильтров, форматов отображения и порядка колонок) в CSV файл.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Сохранить как вид: эта опция сохраняет настройки текущей отображаемой таблицы (фильтры, форматы отображения и порядок колонок) как SQL вид, который вы позже можете просматривать или использовать в SQL выражениях.</li></ul></body></html> ... ... Print currently browsed table data [Ctrl+P] Печатать отображаемую таблицу [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. Распечатывайте текущие данные таблицы. Выбор печати, если выбрано несколько ячеек. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> <html><head/><body><p>Эта кнопка создает новую запись в базе данных. Удерживайте кнопку мыши, чтобы открыть всплывающее меню различных параметров:</p><ul><li><span style=" font-weight:600;">Новая Запись</span>: вставляет новую запись со значениями по умолчанию.</li><li><span style=" font-weight:600;">Вставить Значения...</span>: открывает диалог для ввода значений перед тем, как они будут вставленны в БД. Это позволяет вводить значения, назначая различные ограничения. Этот диалог также открывается, если <span style=" font-weight:600;">Новая Запись</span> опция не срабатывает из-за этих ограничений.</li></ul></body></html> This button deletes the record or records currently selected in the table Эта кнопка удаляет запись или записи, выбранные в настоящее время в таблице This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Это представление таблицы БД. Вы можете выполнить следующие действия: - Начните писать для редактирования, введя значение. - Дважды щелкните любую запись, чтобы отредактировать ее содержимое в окне редактора ячеек. - Alt + Del для обнуления содержимого ячейки в NULL. - Ctrl + " для дублирования текущей записи. - Ctrl + ' для копирования значения из ячейки выше. - Стандартные операции выбора и копирования/вставки. Scroll one page upwards Страница вверх <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html><head/><body><p>Нажатие этой кнопки перемещает одну страницу записей вверх в виде таблицы выше.</p></body></html> Scroll one page downwards Страница вниз <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>Нажатие этой кнопки перемещает одну страницу записей вниз в виде таблицы выше.</p></body></html> Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Предупреждение: эта прагма не читается, и это значение было выведено. Применение прагмы может перезаписать переопределенный LIKE, предоставляемый расширением SQLite. &Tools &Инструменты This button clears the contents of the SQL logs Эта кнопка очищает содержимое журналов SQL This panel lets you examine a log of all SQL commands issued by the application or by yourself Эта панель позволяет вам просматривать журнал всех SQL-команд, выданных приложением или вами This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Это структура открытой БД. Вы можете перетащить несколько имен объектов из столбца "Имя" и отбросить их в редактор SQL, и вы можете настроить свойства сброшенных имен с помощью контекстного меню. Это поможет вам при составлении SQL-инструкций. Вы можете перетаскивать операторы SQL из столбца "Схема" и переносить их в редактор SQL или в другие приложения. Project Toolbar Панель Инструментов Проекта Extra DB toolbar Дополнительная Панель Инструментов БД Close the current database file Закрыть файл текущей БД &About О &программе This button opens a new tab for the SQL editor Эта кнопка открывает новую вкладку для редактора SQL Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] Выполнить все/выбранный SQL [F5, Ctrl+Enter, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. Эта кнопка выполняет текущие выбранные операторы SQL. Если в текстовом редакторе ничего не выбрано , все инструкции SQL выполняются. This button opens a file containing SQL statements and loads it in a new editor tab Эта кнопка открывает файл, содержащий инструкции SQL, и загружает его в новой вкладке редактора &Load Extension... &Загрузить расширение... This button executes the SQL statement present in the current editor line Эта кнопка выполняет оператор SQL, присутствующий в текущей строке редактора &Wiki &Вики Bug &Report... Баг &репорт... Feature Re&quest... Запросить &функцию... Web&site &Веб-сайт &Donate on Patreon... Сделать &пожертвование в Patreon... Sa&ve Project... &Сохранить проект... This button lets you save all the settings associated to the open DB to a DB4S project file Эта кнопка позволяет сохранить все настройки, связанные с открытой БД, в файл проекта DB4S Open &Project... Открыть &проект... This button lets you open a DB4S project file Эта кнопка позволяет открыть файл проекта DB4S &Attach Database... &Прикрепить БД... Add another database file to the current database connection Добавить другой файл БД в текущее соединение This button lets you add another database file to the current database connection Эта кнопка позволяет добавить другой файл БД в текущее соединение с БД &Set Encryption... Назначитть &шифрование... This button saves the content of the current SQL editor tab to a file Эта кнопка сохраняет содержимое текущей вкладки редактора SQL в файл SQLCipher &FAQ Table(&s) to JSON... Таблицы в файл &JSON... Refresh Обновить F5 F5 Open Data&base Read Only... Открыть БД &только для чтения... Save results Сохранить результаты Save the results view Сохранить результаты This button lets you save the results of the last executed query Эта кнопка позволяет сохранить результаты последнего выполненного запроса Find text in SQL editor Найти текст в редакторе SQL Find text in SQL editor [Ctrl+F] Найти текст в редакторе SQL [Ctrl+F] This button opens the search bar of the editor Эта кнопка открывает панель поиска редактора Ctrl+F Find or replace text in SQL editor Найти или заменить текст в редакторе SQL Find or replace text in SQL editor [Ctrl+H] Найти или заменить текст в редакторе SQL Ctrl+H] This button opens the find/replace dialog for the current editor tab Эта кнопка открывает диалог поиска/замены для текущей вкладки редактора Export to &CSV Экспортировать в &CSV Save as &view Сохранить как &представление Save as view Сохранить как представление Hide column(s) Скрыть колонки Hide selected column(s) Скрыть выбранные колонки Show all columns Показать все колонки Show all columns that were hidden Показать все колонки, которые были скрыты Shows or hides the Project toolbar. Показывает или скрывает панель инструментов Проекта. Extra DB Toolbar Дополнительная Панель Инструментов БД Export the filtered data to CSV Экспортировать отфильтрованные данные в CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Эта кнопка экспортирует данные просматриваемой таблицы так как отображается (после обработки фильтрами, форматами отображения и т.д.) в виде файла CSV. Save the current filter, sort column and display formats as a view Сохранить текущие фильтры, столбецы сортировки и форматы отображания в виде представления This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Эта кнопка сохраняет текущие настройки просматриваемой таблицы (фильтры, форматы отображения и столбец сортировки) в виде представления SQL, которое вы можете впоследствии просмотреть или использовать в операторах SQL. Insert Values... Вставить Значения... Open a dialog for inserting values in a new record Открывает диалоговое окно для вставки значений в новую запись Insert new record using default values in browsed table Вставляет новую запись, используя значения по умолчанию в просматриваемой таблице New In-&Memory Database Новая БД в &Памяти Drag && Drop Qualified Names Квалифицированные имена при перетакскивании Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Квалифицированные имена (например, "Table"."Field") при перетаскивании объектов в редактор Drag && Drop Enquoted Names Экранированные имена при перетаскивании Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor Экранировать имена идентификаторов (например, "Table1"), когда перетаскиваются объекты в редактор &Integrity Check Проверка &Целостности Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. Выполняет прагму integrity_check для открытой БД и возвращает результаты во вкладке "SQL". Эта прагма выполняет проверку целостности всей базы данных. &Foreign-Key Check Проверка &Внешних ключей Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab Запускает прагму foreign_key_check для открытой БД и возвращает результаты во вкладке "SQL" &Quick Integrity Check &Быстрая Проверка Целостности Run a quick integrity check over the open DB Запуск быстрой проверки целостности для открытый БД Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. Запускает прагму quick_check для открытой БД и возвращает результаты во вкладке "SQL". Эта команда выполняет большую часть проверки PRAGMA integrity_check, но работает намного быстрее. &Optimize &Оптимизация Attempt to optimize the database Попытка оптимизации БД Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Выполняет прагму optimize для открытой БД. Эта прагма может выполнять оптимизацию, которая улучшит производительность будущих запросов. Print Печать Print text from current SQL editor tab [Ctrl+P] Печать текста изтекущей вкладки редактора SQL [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Открывает диалоговое окно для печати текста из текущей вкладки редактора SQL Print the structure of the opened database [Ctrl+P] Печать структуры открытой БД [Ctrl+P] Open a dialog for printing the structure of the opened database Открывает диалоговое окно для печати структуры текущей БД Insert a new record in the current table Добавить новую запись в текущую таблицу &Table: &Таблица: This button creates a new, empty record in the database Эта кнопка создаёт новую, пустую запись в таблице New Record Добавить запись Delete the current record Удалить текущую запись This button deletes the record currently selected in the database Эта кнопка удаляет выбранную запись Delete Record Удалить запись This is the database view. You can double-click any record to edit its contents in the cell editor window. Это представление базы данных. Сделайте двойной щелчок по любой записи, чтобы отредактировать её содержимое. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Прокрутить к началу</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Нажатие этой кнопки переводит к началу в таблице выше.</p></body></html> |< Scroll 100 records upwards Прокрутить на 100 записей вверх <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>Нажатие этой кнопки к перемещению на 100 записей вверх в табличном представлении выше</p></body></html> < < 0 - 0 of 0 0 - 0 из 0 <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>Прокрутить на 100 записей вниз</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>Нажатие этой кнопки к перемещению на 100 записей вниз в табличном представлении выше</p></body></html> > > Scroll to the end Прокрутить к концу <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Нажатие этой кнопки перемещает в конец таблицы выше.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>Нажмите здесь, чтобы перейти к указанной записи</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>Эта кнопка используется, чтобы переместиться к записи, номер которой указан в области Перейти к</p></body></html> Go to: Перейти к: Enter record number to browse Введите номер записи для просмотра Type a record number in this area and click the Go to: button to display the record in the database view Напечатайте номер записи в этой области и нажмите кнопку Перейти к:, чтобы отобразить запись в представлении базы данных 1 1 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> None Нет Full Полный, целый Full Incremental Incremental <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> Delete Delete Truncate Truncate Persist Persist Memory Memory WAL WAL Off Off <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> Normal Normal Exclusive Exclusive <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> Default Default File File <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> &File &Файл &Import &Импорт &Export &Экспорт Remote Удаленный сервер &Edit &Редактирование &View &Вид &Help &Справка DB Toolbar Панель инструментов БД Edit Database &Cell Редактирование &ячейки БД DB Sche&ma Схе&ма БД &Remote &Удаленный сервер &Load extension Загрузить &расширение Execute current line [Shift+F5] Выполнить текущую строку [Shift+F5] Shift+F5 Shift+F5 Sa&ve Project &Сохранить проект Open &Project Открыть &проект Edit display format Формат отображения Edit the display format of the data in this column Редактирование формата отображения для данных из этой колонки Show rowid column Отображать колонку rowid Toggle the visibility of the rowid column Set encoding Кодировка Change the encoding of the text in the table cells Изменение кодировки текста в данной таблице Set encoding for all tables Установить кодировку для всех таблиц Change the default encoding assumed for all tables in the database Изменить кодировку по умолчанию для всех таблиц в базе данных Open an existing database file in read only mode Открыть существующий файл базы данных в режиме только для чтения Unlock view editing Разблокировать возможность редактирования This unlocks the current view for editing. However, you will need appropriate triggers for editing. Разблокировать текущий вид для редактирования. Однако для редактирования вам понадобятся соответствующие триггеры. Duplicate record Дубликат записи Opens the SQLCipher FAQ in a browser window Открыть SQLCiphier FAQ в браузере Table(s) to JSON... Таблицы в файл JSON... Export one or more table(s) to a JSON file Экспортировать таблицы в JSON файл Open from Remote Загрузить из облака Save to Remote Сохранить в облако &Attach Database &Прикрепить базу данных Save SQL file as Сохранить файл SQL как &Browse Table Пр&осмотр данных Clear all filters Очистить все фильтры User Пользователем Application Приложением &Clear О&чистить Columns Столбцы X X Y Y _ _ Line type: Линия: Line Обычная StepLeft Ступенчатая, слева StepRight Ступенчатая, справа StepCenter Ступенчатая, по центру Impulse Импульс Point shape: Отрисовка точек: Cross Крест Plus Плюс Circle Круг Disc Диск Square Квадрат Diamond Ромб Star Звезда Triangle Треугольник TriangleInverted Треугольник перевернутый CrossSquare Крест в квадрате PlusSquare Плюс в квадрате CrossCircle Крест в круге PlusCircle Плюс в круге Peace Мир <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Сохранить текущий график...</p><p>Формат файла выбирается расширением (png, jpg, pdf, bmp)</p></body></html> Save current plot... Сохранить текущий график... Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Загружать все данные. Имеет эффект лишь если не все данные подгружены. DB Schema Схема БД &New Database... &Новая база данных... Create a new database file Создать новый файл базы данных This option is used to create a new database file. Эта опция используется, чтобы создать новый файл базы данных. Ctrl+N Ctrl+N &Open Database... &Открыть базу данных... Open an existing database file Открыть существующий файл базы данных This option is used to open an existing database file. Эта опция используется, чтобы открыть существующий файл базы данных. Ctrl+O Ctrl+O &Close Database &Закрыть базу данных This button closes the connection to the currently open database file Эта кнопка закрывает соединение с текущим файлом БД Ctrl+W Ctrl+W Revert database to last saved state Вернуть базу данных в последнее сохранённое состояние This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Эта опция используется, чтобы вернуть текущий файл базы данных в его последнее сохранённое состояние. Все изменения, сделаные с последней операции сохранения теряются. Write changes to the database file Записать изменения в файл базы данных This option is used to save changes to the database file. Эта опция используется, чтобы сохранить изменения в файле базы данных. Ctrl+S Ctrl+S Compact &Database... &Уплотнить базу данных... Compact the database file, removing space wasted by deleted records Уплотнить базу данных, удаляя пространство, занимаемое удалёнными записями Compact the database file, removing space wasted by deleted records. Уплотнить базу данных, удаляя пространство, занимаемое удалёнными записями. E&xit &Выход Ctrl+Q Ctrl+Q Import data from an .sql dump text file into a new or existing database. Импортировать данные из текстового файла sql в новую или существующую базу данных. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Эта опция позволяет импортировать данные из текстового файла sql в новую или существующую базу данных. Файл SQL может быть создан на большинстве движков баз данных, включая MySQL и PostgreSQL. Open a wizard that lets you import data from a comma separated text file into a database table. Открыть мастер, который позволяет импортировать данные из файла CSV в таблицу базы данных. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Открыть мастер, который позволяет импортировать данные из файла CSV в таблицу базы данных. Файлы CSV могут быть созданы в большинстве приложений баз данных и электронных таблиц. Export a database to a .sql dump text file. Экспортировать базу данных в текстовый файл .sql. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Эта опция позволяет экспортировать базу данных в текстовый файл .sql. Файлы SQL содержат все данные, необходимые для создания базы данных в большистве движков баз данных, включая MySQL и PostgreSQL. Export a database table as a comma separated text file. Экспортировать таблицу базы данных как CSV текстовый файл. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Экспортировать таблицу базы данных как CSV текстовый файл, готовый для импортирования в другие базы данных или приложения электронных таблиц. Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Открыть мастер создания таблиц, где возможно определить имя и поля для новой таблиы в базе данных Open the Delete Table wizard, where you can select a database table to be dropped. Открыть мастер удаления таблицы, где можно выбрать таблицу базы данных для удаления. Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Открыть мастер изменения таблицы, где возможно переименовать существующую таблиц. Можно добавить или удалить поля таблицы, так же изменять имена полей и типы. Open the Create Index wizard, where it is possible to define a new index on an existing database table. Открыть мастер создания интекса, в котором можно определить новый индекс для существующей таблиц базы данных. &Preferences... &Настройки... Open the preferences window. Открыть окно настроек. &DB Toolbar &Панель инструментов БД Shows or hides the Database toolbar. Показать или скрыть панель инструментов База данных. Shift+F1 Shift+F1 &About... О &программе... &Recently opened &Недавно открываемые Open &tab Открыть &вкладку Ctrl+T Ctrl+T Database Structure Структура БД This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Это структура открытой БД. Вы можете перетаскивать операторы SQL из строки "объект" и переносить их в другие приложения или в другой экземпляр "Обозреватель для SQLite". Browse Data Данные Refresh the data in the selected table [F5, Ctrl+R] Обновить данные в выбранной таблице [F5, Ctrl+R] Edit Pragmas Прагмы Execute SQL SQL Edit Database Cell Редактирование ячейки БД SQL &Log &Журнал SQL Show S&QL submitted by По&казывать SQL, выполненный &Plot &График &Revert Changes &Отменить изменения &Write Changes &Записать изменения Compact &Database &Уплотнить базу данных &Database from SQL file... &База данных из файла SQL... &Table from CSV file... &Таблицы из файла CSV... &Database to SQL file... Базу &данных в файл SQL... &Table(s) as CSV file... &Таблицы в файл CSV... &Create Table... &Создать таблицу... &Delete Table... &Удалить таблицу... &Modify Table... &Изменить таблицу... Create &Index... Создать и&ндекс... W&hat's This? Что &это такое? &Execute SQL В&ыполнить код SQL Execute SQL [F5, Ctrl+Return] Выполнить код SQL [F5, Ctrl+Return] Open SQL file Открыть файл SQL Save SQL file Сохранить файл SQL Execute current line Выполнить текущую строку Execute current line [Ctrl+E] Выполнить текущую строку [Ctrl+E] Ctrl+E Ctrl+E Export as CSV file Экспортировать в файл CSV Export table as comma separated values file Экспортировать таблицу как CSV файл &Wiki... В&ики... Bug &report... &Отчёт об ошибке... Web&site... &Веб-сайт... Save the current session to a file Сохранить текущее состояние в файл Load a working session from a file Загрузить рабочее состояние из файла &Set Encryption Ши&фрование Copy Create statement Копировать CREATE выражение Copy the CREATE statement of the item to the clipboard Копировать CREATE выражение элемента в буффер обмена Ctrl+Return Ctrl+Return Ctrl+L Ctrl+L Ctrl+P Ctrl+P Ctrl+D Ctrl+I Encrypted Зашифровано Read only Только для чтения Database file is read only. Editing the database is disabled. База данных только для чтения. Редактирование запрещено. Database encoding Кодировка базы данных Database is encrypted using SQLCipher База данных зашифрована с использованием SQLCipher Choose a database file Выбрать файл базы данных Could not open database file. Reason: %1 Не удалось открыть файл базы данных. Причина:%1 Choose a filename to save under Выбрать имя, под которым сохранить данные Error adding record: Ошибка добавления записи: Error deleting record: %1 Ошибка удаления записи: %1 Please select a record first Сначала выберите запись %1 - %2 of %3 %1 - %2 из %3 There is no database opened. Please open or create a new database file. Нет открытой базы данных. Откройте или создайте файл новой базы данных. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. Хотите удалить %1 '%2'? Все данные, связанные с %1, будут потеряны. Error: could not delete the %1. Message from database engine: %2 Ошибка: невозмножно удалить %1. Сообщение из движка базы данных: %2 There is no database opened. Нет открытой базы данных. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Вышла новая версия Обозревателя для SQLite (%1.%2.%3).<br/><br/>Она доступна для скачивания по адресу <a href='%4'>%4</a>. DB Browser for SQLite project file (*.sqbpro) Файл проекта Обозревателя для SQLite (*.sqbpro) Error executing query: %1 Ошибка выполнения запроса: %1 %1 rows returned in %2ms from: %3 %1 строки возвращены за %2мс из: %3 , %1 rows affected , %1 строк изменено Query executed successfully: %1 (took %2ms%3) Запрос успешно выполнен: %1 (заняло %2мс%3) Choose a text file Выбрать текстовый файл Text files(*.csv *.txt);;All files(*) Текстовые файлы(*.csv *.txt);;Все файлы(*) Import completed Импорт завершён Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Ошибка при сохранении файла базы данных. Это означает, что не все изменения в базе данных были сохранены. Сначала вам необходимо разрешить следующую ошибку. %1 Are you sure you want to undo all changes made to the database file '%1' since the last save? Отменить все изменения, сделанные в файле базы данных '%1' после последнего сохранения? Choose a file to import Выберать файл для импорта Text files(*.sql *.txt);;All files(*) Текстовые файлы(*.sql *.txt);;Все файлы(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. Создать новый файл базы данных, чтобы сохранить импортированные данные? Если ответить Нет, будет выполнена попытка импортировать данные файла SQL в текущую базу данных. File %1 already exists. Please choose a different name. Файл %1 уже существует. Выберите другое имя. Error importing data: %1 Ошибка импортирования данных: %1 Import completed. Импорт завершён. Delete View Удалить представление Modify View Модифицировать представление Delete Trigger Удалить триггер Modify Trigger Модифицировать триггер Delete Index Удалить индекс Extensions(*.so *.dylib *.dll);;All files(*) Choose a project file to open Выберите файл проекта для открытия This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Этот файл проекта использует старый формат файла, потому что он был создан с использованием DB Browser для SQLite версии 3.10 или ниже. Загрузка этого формата по-прежнему полностью поддерживается, но мы советуем вам преобразовать все ваши файлы проекта в новый формат файла, поскольку поддержка более старых форматов может быть удалена в какой-то момент в будущем. Вы можете конвертировать ваши файлы, просто открывая и повторно сохраняя их. Duplicate records Дублированные записи Ctrl+" Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Пожалуйста, введите псевдо-первичный ключ, чтобы разрешить редактирование в этом представлении. Это должно быть имя уникального столбца в представлении. Please choose a new encoding for this table. Пожалуйста выбирите новую кодировку для данной таблицы. Error checking foreign keys after table modification. The changes will be reverted. Ошибка проверки внешних ключей после изменения таблицы. Изменения будут отменены. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. Эта таблица не прошла проверку внешнего ключа. <br/> Вы должны запустить "Инструменты | Проверка внешнего ключа"и исправить сообщенные проблемы. At line %1: Result: %2 Please choose a new encoding for all tables. Пожалуйста выбирите новую кодировку для всех таблиц. %1 Leave the field empty for using the database encoding. %1 Оставьте это поле пустым если хотите чтобы использовалась кодировка по умолчанию. This encoding is either not valid or not supported. Неверная кодировка либо она не поддерживается. Cancel Отменить Delete Table Удалить таблицу &%1 %2 &%1 %2 Setting PRAGMA values will commit your current transaction. Are you sure? Установка значений PRAGMA завершит текущую транзакцию. Установить значения? Execution aborted by user Выполнение прервано пользователем In-Memory database БД в памяти determining row count... определяем количество строк... %1 - %2 of >= %3 %1 - %2 из >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Вы действительно хотите удалить таблицу '%1'? Все данные, связанные с таблицей, будут потеряны. Are you sure you want to delete the view '%1'? Вы действительно хотите удалить представление '%1'? Are you sure you want to delete the trigger '%1'? Вы действительно хотите удалить триггер '%1'? Are you sure you want to delete the index '%1'? Вы действительно хотите удалить индекс '%1'? Error: could not delete the table. Ошибка: не удалось удалить таблицу. Error: could not delete the view. Ошибка: не удалось удалить представление. Error: could not delete the trigger. Ошибка: не удалось удалить триггер. Error: could not delete the index. Ошибка: не удалось удалить индекс. Message from database engine: %1 Сообщение от СУБД: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? Для редактирования таблицы необходимо сохранить все ожидающие изменения сейчас. Вы действительно хотите сохранить БД? -- EXECUTING SELECTION IN '%1' -- -- ВЫПОЛНЕНИЕ ВЫБОРКИ В '%1' -- -- EXECUTING LINE IN '%1' -- -- ВЫПОЛНЕНИЕ СТРОКИ В '%1' -- -- EXECUTING ALL IN '%1' -- -- ВЫПОЛНЕНИЕ ВСЕ В '%1' -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Установка значений PRAGMA или вакуумирования приведет к фиксации текущей транзакции. Уверены ли вы? executing query %1 rows returned in %2ms %1 строк возвращено за %2мс query executed successfully. Took %1ms%2 запрос успешно выполнен. Заняло %1мс%2 -- At line %1: %4 -- Result: %3 -- Строка %1: %4 -- Результат: %3 Choose text files Выберите текстовые файлы Import completed. Some foreign key constraints are violated. Please fix them before saving. Импорт завершен. Нарушены некоторые ограничения внешних ключей. Пожалуйста, исправьте их перед сохранением. Modify Index Модифицировать Индекс Modify Table Модифицировать Таблицу Select SQL file to open Выбрать файл SQL для октрытия Couldn't read file: %1. Не удалось прочитать файл:%1. Couldn't save file: %1. Не удалось сохранить файл:%1. Select file name Выбрать имя файла Select extension file Выбрать расширение файла Extensions(*.so *.dll);;All files(*) Расширения(*.so *.dll);;Все файлы(*) Extension successfully loaded. Расширение успешно загружено. Error loading extension: %1 Ошибка загрузки расширения: %1 Don't show again Не показывать снова New version available. Доступна новая версия. Collation needed! Proceed? Нужно выполнить сопоставление! Продолжить? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Таблица в базе данных требует выполнения специальной функции сопоставления '%1'. Если вы продолжите, то возможна порча вашей базы данных. Создайте резервную копию! creating collation Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Задайте новое имя для вкладки SQL. Используйте символ '&&', чтобы разрешить использование следующего символа в качестве сочетания клавиш. Please specify the view name Укажите имя представления There is already an object with that name. Please choose a different name. Объект с указанным именем уже существует. Выберите другое имя. View successfully created. Представление успешно создано. Error creating view: %1 Ошибка создания представления: %1 There is no filter set for this table. View will not be created. Для этой таблицы не установлен фильтр. Представление не будет создано. Delete Records Удалить Записи This action will open a new SQL tab for running: Это действие откроет новую вкладку SQL для запуска: Press Help for opening the corresponding SQLite reference page. Нажмите "Справка" для открытия соответствующей справочной страницы SQLite. Choose a axis color Выбрать цвет осей PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Все файлы(*) Choose a file to open Выбрать файл для открытия Invalid file format. Ошибочный формат файла. NullLineEdit Set to NULL Установить в NULL Alt+Del PlotDock Plot График <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> <html><head/><body><p>На этой панели отображается список столбцов текущей просматриваемой таблицы или только что выполненного запроса. Вы можете выбрать столбцы, которые вы хотите использовать в качестве оси X или Y для графика ниже. В таблице показан тип обнаруженной оси, который повлияет на итоговый график. Для оси Y вы можете выбирать только числовые столбцы, но для оси X вы можете выбрать:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Дата/Время</span>: строки с форматом &quot;гггг-ММ-дд чч:мм:сс&quot; или &quot;гггг-ММ-ддTчч:мм:сс&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Дата</span>: строки с форматом &quot;гггг-ММ-дд&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Время</span>: строки с форматом &quot;чч:мм:сс&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Текст</span>: строки лубого формата. Выбор этого столбца по оси X приведет к созданию графика Баров, со значениями столбцов в качестве меток для баров</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Числа</span>: целочисленные или вещественные значения</li></ul><p>Дважды щелкните по ячейкам Y, вы можете изменить используемый цвет для этого графика.</p></body></html> Columns Столбцы X X Y Y _ _ Axis Type Ось Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Вот график, нарисованный, когда вы выбираете значения x и y выше. Нажмите на пункты, чтобы выбрать их на графике и в таблице. Ctrl + Click для выбора диапазона точек. Используйте колесико мыши для масштабирования и перетаскивания мышью для изменения диапазона осей. Выберите метки осей или осей для перетаскивания и масштабирования только в этой ориентации. Line type: Линия: None Нет Line Обычная StepLeft Ступенчатая, слева StepRight Ступенчатая, справа StepCenter Ступенчатая, по центру Impulse Импульс Point shape: Отрисовка точек: Cross Крест Plus Плюс Circle Круг Disc Диск Square Квадрат Diamond Ромб Star Звезда Triangle Треугольник TriangleInverted Треугольник перевернутый CrossSquare Крест в квадрате PlusSquare Плюс в квадрате CrossCircle Крест в круге PlusCircle Плюс в круге Peace Мир <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Сохранить текущий график...</p><p>Формат файла выбирается расширением (png, jpg, pdf, bmp)</p></body></html> Save current plot... Сохранить текущий график... Load all data and redraw plot Загрузить все данные и перерисовать Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Загружать все данные. Имеет эффект лишь если не все данные подгружены. Row # Строка # Choose a axis color Выбрать цвет осей Copy Копировать Print... Печать... Show legend Легенда Stacked bars Date/Time Дата/Время Date Дата Time Время Numeric Число Label Текст Invalid Ошибка Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Загружает все данные и перерисовыет график. Предупреждение: не все данные были получены из таблицы из-за механизма частичной выборки. Choose an axis color Выберите цвет оси Choose a filename to save under Выбрать имя файла, под которым сохранить данные PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Все файлы(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. На этом графике есть кривые, и выбранный стиль линии может применяться только к графикам, отсортированным по X. Либо сортируйте таблицу или запрос по X, чтобы удалить кривые, либо выберите один из стилей, поддерживаемых кривыми: None или Line. Cancel Отменить PreferencesDialog Preferences Настройки &Database &База данных Database &encoding &Кодировка базы данных Open databases with foreign keys enabled. Открывать базы данных с включенными внешними ключами. &Foreign keys &Внешние ключи enabled включены Default &location &Расположение по умолчанию ... ... &General &Общие Remember last location Запоминать последнюю директорию Always use this location Всегда открывать указанную Remember last location for session only Запоминать последнюю директорию только для сессий Lan&guage &Язык Automatic &updates &Следить за обновлениями SQ&L to execute after opening database Data &Browser Обозреватель &данных NULL fields NULL поля &Text &Текст Remove line breaks in schema &view Удалить переводы строки в &схеме данных Show remote options Опции "облака" Remote server Сервер Prefetch block si&ze Размер блока &упреждающей выборки Advanced Дополнительно SQL to execute after opening database SQL, который нужно выполнить после открытия БД Default field type Тип данных по умолчанию Font Шрифт &Font &Шрифт Font si&ze: Ра&змер шрифта: Content Содержимое Symbol limit in cell Количество символов в ячейке Field colors Цветовое оформление полей NULL Regular Обычные Text Текст Binary Двоичные данные Background Фон Filters Фильтры Escape character Символ экранирования Delay time (&ms) Время задержки (&мс) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. Время задержки перед применением нового фильтра. Нулевое значение отключает ожидание. &SQL Р&едактор SQL Settings name Имя настроек Context Контекст Colour Цвет Bold Жирный Italic Курсив Underline Подчёркивание Keyword Ключевое слово function функция Function Функция Table Таблица Comment Комментарий Identifier Идентификатор String Строка currentline текущаястрока Current line Текущая строка SQL &editor font size Размер шрифта в &редакторе SQL SQL &log font size Размер шрифта в &журнале SQL Tab size Размер табуляции SQL editor &font &Шрифт в редакторе SQL Error indicators Индикаторы ошибок Enabling error indicators highlights the SQL code lines that caused errors during the last execution Подсветка в SQL коде строк, выполнение которых привело к ошибкам Hori&zontal tiling Гори&зонтальное распределение If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Если данная опция включена, то SQL редактор и результат запроса будут расположены рядом по горизонтали. Code co&mpletion Авто&дополнение кода Toolbar style Стиль тулбара Only display the icon Только иконки Only display the text Только текст The text appears beside the icon Текст над иконкой The text appears under the icon Текст под иконкой Follow the style Указано в стиле DB file extensions Расширения файлов БД Manage Настроить When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Когда отмечено, переносы строк в столбце 'Схема' во вкладке 'Структура базы данных', 'док' и 'печатный результат' удаляются. Font si&ze Ра&змер шрифта This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Максимальное количество строк в таблице для включения завершения значения на основе текущих значений в столбце. Может быть установлено в 0 для отключения завершения. Row count threshold for completion Порог количества строк для начала работы дополнения Field display Отображение поля Displayed &text Отображаемый &текст Text color Цвет текста Background color Цвет фона Preview only (N/A) Предв. просмотр Foreground Передний план SQL &results font size &Размер шрифта &Wrap lines &Перенос строк Never Никогда At word boundaries На границах слов At character boundaries На границах символов At whitespace boundaries На границах пробелов &Quotes for identifiers Обравмление &идентификаторов Choose the quoting mechanism used by the application for identifiers in SQL code. Выберите механизм обрамления, используемый приложением для идентификаторов в коде SQL. "Double quotes" - Standard SQL (recommended) "Двойные кавычки" - Cтандартный SQL (рекомендуется) `Grave accents` - Traditional MySQL quotes `Гравис` - Традиционные кавычки MySQL [Square brackets] - Traditional MS SQL Server quotes [Квадратные скобки] - традиционные кавычки для MS SQL Server Keywords in &UPPER CASE Ключевые слова в &ВЕРХНЕМ РЕГИСТРЕ When set, the SQL keywords are completed in UPPER CASE letters. Когда отмечено, ключевые слова SQL будут в ВЕРХНЕМ РЕГИСТРЕ. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background Когда установлено, строки кода SQL, вызвавшие ошибки во время последнего выполнения, подсвечиваются, а виджет результатов указывает на ошибку в фоновом режиме &Extensions Р&асширения Select extensions to load for every database: Выберите расширения, чтобы загружать их для каждой базы данных: Add extension Добавить расширение Remove extension Удалить расширение <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>Обозреватель для SQLite позволяет использовать оператор REGEXP 'из коробки'. Но тем <br/>не менее, возможны несколько различных вариантов реализаций данного оператора и вы свободны <br/>в выборе какую именно использовать. Можно отключить нашу реализацию и использовать другую - <br/>путем загрузки соответсвующего расширения. В этом случае требуется перезагрузка приложения.</p></body></html> Disable Regular Expression extension Отключить расширение Регулярных Выражений <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Remote Удаленный сервер CA certificates СА сертификаты Subject CN Common Name Subject O Organization Valid from Valid to Serial number Your certificates Ваши сертификаты File Файл Subject Common Name Issuer CN Issuer Common Name Clone databases into Путь для клонируемых БД Choose a directory Выберать каталог The language will change after you restart the application. Язык будет применен после перезапуска приложения. Select extension file Выберать файл расширения Extensions(*.so *.dll);;All files(*) Расширения(*.so *.dll);;Все файлы(*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file Импорт файла сертификата No certificates found in this file. В данном файле не найден сертификат. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Вы действительно хотите удалить этот сертификат? Все данные сертификата будут удалены из настроек приложения! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. Вы действительно хотите удалить все сохраненные настройки? Все ваши предпочтения будут потеряны, и будут использоваться значения по умолчанию. QObject Error importing data Ошибка импортирования данных from record number %1 с записи номер %1 . %1 Importing CSV file... Импортирование CSV файла... Cancel Отменить Decoding CSV file... Расшифровка CSV файла... Collation needed! Proceed? Нужно выполнить сопоставление! Продолжить? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Таблица в базе данных требует выполнения специальной функции сопоставления '%1'. Если вы продолжите, то возможна порча вашей базы данных. Создайте резервную копию! SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Файлы SQLite баз данных (*.db *.sqlite *.sqlite3 *.db3);;Все файлы (*) All files (*) Все файлы (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) Файлы SQLite баз данных (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 Ошибка во время подключения к %1. %2 Error opening remote file at %1. %2 Ошибка открытия файла %1. %2 Error: Invalid client certificate specified. Ошибка: Указан неверный сертификат клиента. Please enter the passphrase for this client certificate in order to authenticate. Пожалуйста введите ключевую фразу для этого сертификата клиента. Cancel Отменить Uploading remote database to %1 Загружается удаленная БД в %1 Downloading remote database from %1 Скачивается удаленная БД из %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. Удаленная БД была обновлена со времени последней загрузки. Вы хотите обновить локальную базу данных до последней версии? Обратите внимание, что это отменяет любые изменения, внесенные вами локально! Если вы не хотите потерять локальные изменения, нажмите «Нет», чтобы открыть локальную версию. Error: The network is not accessible. Ошибка: сеть недоступна. Error: Cannot open the file for sending. Ошибка: не удается открыть файл для отправки. Error opening local databases list. %1 Ошибка при открытии списка локальных БД. %1 Error creating local databases list. %1 Ошибка при создании списка локальных БД. %1 RemoteDock Remote Удаленный сервер Identity ID Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Подключение к удаленному серверу, используя выбранный ID. Go Поехали Push currently opened database to server Отправить текущую БД на сервер <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> <html><head/><body><p>БД с сайта dbhub.io могут быть добавлены в DB4S. Для начала вам нужен ID:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Войдите на сайт dbhub.io (можно использовать аккаунт GitHub или что хотите)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Нажмите кнопку создать DB4S сертификат (это и есть ваш ID). Будет создан файл сертификата (сохраните его на локальном диске).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"Перейдите во вкладку Remote в настройках DB4S. Нажмите кнопку, чтобы добавить новый сертификат в DB4S, и выберите только что загруженный файл сертификата.</li></ol><p>Теперь во вкладке Remote должна отображаться ваш ID, и вы можете добавлять удаленные базы данных.</p></body></html> RemoteModel Name Имя Version Версия Last modified Изменен Size Размер Commit Коммит bytes байт RemotePushDialog Push database Отправить БД Database na&me to push to &Имя БД Commit message Сообщение <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Лицензия Public Публичный Branch Ветка Force push Принудительно Database will be public. Everyone has read access to it. БД будет публичной. У каждого будет доступ на чтение к ней. Database will be private. Only you have access to it. БД будет конфиденциальной. Только у вас будет доступ к ней. Use with care. This can cause remote commits to be deleted. Используйте с осторожностью. Это может привести к удалению существующих коммитов. Unspecified Неуказано SqlExecutionArea Form Форма Find previous match [Shift+F3] Найти предыдущее совпадение [Shift+F3] Find previous match with mapping Найти предыдущее совпадение, закольцевав поиск Shift+F3 Shift+F3 The found pattern must be a whole word Найденный шаблон должен быть целым словом Whole Words Слова Полностью Text pattern to find considering the checks in this frame Шаблон для поиска, учитывая все проверки Find in editor Найти в редакторе The found pattern must match in letter case У найденного шаблона должен совпадать регистр Case Sensitive Учитывать Регистр Find next match [Enter, F3] Найти следующее совпдение [Enter, F3] Find next match with wrapping Найти следующее совпадение, закольцевав поиск F3 F3 Interpret search pattern as a regular expression Интерпретировать шаблон поиска как регулярное выражение <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>При проверке шаблон для поиска интерпретируется как регулярное выражение UNIX. <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Узнать больше о Регулярных выражениях на Wikibooks.org</a>.</p></body></html> Regular Expression Регулярное выражение Close Find Bar Закрыть Поисковую Панель <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements Результаты последних выполненных операторов This field shows the results and status codes of the last executed statements. Это поле показывает результаты и коды статусов последних выполненных операторов. Export to &CSV Экспортировать в &CSV Save as &view Сохранить как &представление Save as view Сохранить как представление Please specify the view name Укажите имя представления There is already an object with that name. Please choose a different name. Объект с указанным именем уже существует. Выберите другое имя. View successfully created. Представление успешно создано. Error creating view: %1 Ошибка создания представления: %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. (X) Функция abs(X) возвращает модуль числа аргумента X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. () Функция changes() возвращает количество строк в базе данных, которые были изменены, вставлены или удалены после удачного выполнения INSERT, DELETE или UPDATE. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1,X2,...) Функция char(X1,X2,...,XN) возвращает строку составленную из символов, переданных в качестве аргументов. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y,...) Функция coalesce() возвращает копию первого аргумента не равного NULL иначе если такого нет то возвращается NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) Функция glob(X,Y) эквивалент выражению "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) Функция ifnull() возвращает копию первого аргумента не равного NULL иначе если оба аргумента равны NULL то возвращает NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X,Y) Функция instr(X,Y) возвращает количество символов, начиная с которого в строке X найденна подстрока Y или 0 если таковая не обнаружена. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) Функция hex() интерпретирует аргумент как BLOB и возвращает строку в 16-ричной системе счисления с содержимым аргумента. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. () Функция last_insert_rowid() возвращает ROWID последней вставленной строки. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X) Для строкового значения X, функция length(X) возвращает количество символов (не байт) от начала строки до первого символа '\0'. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y) Фукнция like() эквивалент выражению "Y LIKE X". (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X,Y,Z) Функция like() эквивалент выражения "Y LIKE X ESCAPE Z". (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. (X) Функция load_extension(X) загружает расширение SQLite из файла библиотеки динамической компоновки X. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. (X,Y) Функция load_extension(X,Y) загружает расширение SQLite из файла библиотеки динамической компоновки X, используя точку входа Y. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) Функция lower(X) возвращает копию строки X, в которой все ACSII символы переведены в нижний регистр. (X) ltrim(X) removes spaces from the left side of X. (X) ltrim(X) удаляет символы пробелов слева для строки X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y) Функция ltrim(X,Y) возвращает новую строку путем удаления из строки X слева любого символа из Y. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) Функция max() возвращает аргумент с максимальным значением, либо NULL если хотябы один аргумент равен NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) Функция min() возвращает аргумент с минимальным значением. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (X,Y) Функция nullif(X,Y) возвращает первый аргумент если аргументы различны либо NULL если они одинаковы. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (FORMAT,...) Функция printf(FORMAT,...) работает так же как printf() из стандартной библиотеки языка программирования Си. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. (X) Функция quote(X) возвращает измененную строку X, которую можно использовать в SQL выражениях. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. () Функция random() возвращает псевдо случайное целочисленное значение из диапозона от-9223372036854775808 до +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (N) Функция randomblob(N) возвращает N-байтный BLOB, содержащий псевдо случайные байты. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X,Y,Z) Функция replace(X,Y,Z) возвращает новую строку на основе строки X, заменой всех подстрок Y на Z. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X) Функция round(X) округляет X до целого значения. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X,Y) Функция round(X,Y) округляет X до Y чисел после запятой справа. (X) rtrim(X) removes spaces from the right side of X. (X) rtrim(X) удаляет символы пробела справа строки X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X,Y) Функция rtrim(X,Y) возвращает новую строку путем удаления из строки X справа любого символа из строки Y. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X) Функция soundex(X) возвращает копию строки X, кодированную в формате soundex. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y) substr(X,Y) возвращает подстроку из строки X, начиная с Y-го символа. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. (X,Y,Z) Функция substr(X,Y,Z) возвращает подстроку из строки X, начиная с Y-го символа, длинной Z-символов. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. () Функция total_changes() возвращает количество строк измененных с помощью INSERT, UPDATE или DELETE, начиная с того момента как текущее подключение к базе данных было открыто. (X) trim(X) removes spaces from both ends of X. (X) trim(X) удаляет пробелы с обоих сторон строки X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X,Y) Функция trim(X,Y) создает новую строку из X, путем удаления с обоих концов символов, которые присутсвуют в строке Y. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) Функция typeof(X) возвращает строку с типом данных выражения X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) Функция unicode(X) возвращает числовое значение UNICODE кода символа. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (X) Функция upper(X) возвращает копию строки X, в которой для каждого ASCII символа регистр будет перобразован из нижнего в верхний. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (N) Функция zeroblob(N) возвращает BLOB размером N байт со значениями 0x00. (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) Функция avg() возвращает среднее значение для всех не равных NULL значений группы. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) Функция count(X) возвращает количество строк, в которых X не равно NULL в группе. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X) Функция group_concat() возвращает строку из всех значений X не равных NULL. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X,Y) Функция group_concat() возвращает строку из всех значений X не равных NULL. Y - разделитель между значениями X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) Аггрегатная функция max() возвращает максимальное значение для X. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) Аггрегатная функция min() возвращает минимальное значение для X. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) Аггрегатные функции sum() и total() возвращают сумму всех не NULL значений для X. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () Число строк в текущем разделе. Строки нумеруются начиная с 1 в порядке, определенном выражением ORDER BY, или иначе в произвольном порядке. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Функция row_number() возвращает номер первой строки в каждой группе - ранг текущей строки с разрывами. Если не существует выражения ORDER BY, все строки считаются одноранговыми, и эта функция всегда возвращает 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Число одноранговой группы текущей строки в своем разделе - ранг текущей строки без пробелов. Разделы нумеруются, начиная с 1 в порядке, определенном выражением ORDER BY в определении окна. Если не существует предложения ORDER BY, все строки считаются одноранговыми, и эта функция всегда возвращает 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () Несмотря на имя, эта функция всегда возвращает значение между 0.0 и 1.0, равное (rank-1) / (partition-rows-1), где rank - это значение, возвращаемое встроенной функцией window rank () rows - это общее количество строк в разделе. Если раздел содержит только одну строку, эта функция возвращает 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. () Кумулятивное распределение. Рассчитывается как номер-строки / строки-раздела, где номер-строки - это значение, возвращаемое row_number() для последнего однорангового узла в группе, а строки-раздела- количество строк в разделе. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (N) Аргумент N обрабатывается как целое число. Эта функция делит раздел на N групп как можно более равномерно и назначает целое число от 1 до N каждой группе в порядке, определенном выражением ORDER BY, или в произвольном порядке, при его отсутствии. При необходимости сначала появляются большие группы. Эта функция возвращает целочисленное значение, присвоенное группе, в которой находится текущая строка. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr) Возвращает результат вычисления выражения expr в предыдущей строке раздела. Или, если нет предыдущей строки (поскольку текущая строка является первой), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr, offset) Если аргумент offset укзан, то он должен быть неотрицательным целым числом. В этом случае возвращаемое значение является результатом вычисления expr в строках смещения строк до текущей строки в разделе. Если смещение равно 0, то expr вычисляется относительно текущей строки. Если перед текущей строкой нет строк смещения строк, возвращается NULL. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr, offset, default) Если задано значение по умолчанию, оно возвращается вместо NULL, если строка, идентифицированная с помощью смещения, не существует. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr) Возвращает результат вычисления выражения expr в следующей строке раздела. Или, если нет следующей строки (поскольку последняя строка является последней), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr, offset) Если аргумент offset указан, то он должен быть неотрицательным целым числом. В этом случае возвращаемое значение является результатом вычисления expr в строках смещения строк после текущей строки в разделе. Если смещение равно 0, то expr вычисляется относительно текущей строки. Если после текущей строки нет строк смещения строки, возвращается NULL. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) Эта встроенная Оконная Функция вычисляет Оконный Кадр для каждой строки так же, как Функция Окна агрегата. Она возвращает значение выполнения выражения expr, оцениваемое по отношению к первой строке в оконном фрейме для каждой строки. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr) Эта встроенная Оконная Функция вычисляет Оконный Кадр для каждой строки так же, как Функция Окна агрегата. Она возвращает значение выполнения выражения expr, оцениваемое по отношению к последней строке в оконном фрейме для каждой строки. (expr) Эта встроенная функция окна вычисляет оконный кадр для каждой строки так же, как функция окна агрегата. Он возвращает значение expr, оцениваемое по последней строке в оконном фрейме для каждой строки. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. (expr, N) Эта встроенная функция окна вычисляет оконный фрейм для каждой строки так же, как функция окна агрегата. Она возвращает значение выполнения выражения expr, оцениваемое по строке N оконного фрейма. Строки нумеруются в рамке окна, начиная с 1 в порядке, определенном выражением ORDER BY, если оно присутствует, или в произвольном порядке в противном случае. Если в разделе нет N-й строки, возвращается NULL. SqliteTableModel References %1(%2) Hold Ctrl+Shift and click to jump there Ссылается на %1(%2) Нажмите Ctrl+Shift и клик чтобы переместиться туда reading rows читаем строки loading... загрузка... References %1(%2) Hold %3Shift and click to jump there Ссылается на %1(%2) Нажмите %3Shift и клик чтобы переместиться туда Error changing data: %1 Ошибка изменения данных: %1 retrieving list of columns получаем список колонок Fetching data... Подгружаем данные... Cancel Отменить VacuumDialog Compact Database Не понятно, что лучше "уплотнение" или "сжатие"? Уплотнение базы данных Warning: Compacting the database will commit all of your changes. Предупреждение: Уплотнение базы данных зафиксирует все изменения, которые были сделаны. Please select the databases to co&mpact: Выберите объекты для &уплотнения: Warning: Compacting the database will commit all changes you made. Предупреждение: Уплотнение базы данных зафиксирует все изменения, которые были сделаны. Please select the objects to compact: Выберите объекты для уплотнения: sqlitebrowser-3.11.2/src/translations/sqlb_tr.ts000066400000000000000000010751721345112435200220460ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite SQLite DB Browser Hakkında Version Versiyon <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>SQLite DB Browser, SQLite veritabanlarını tasarlamak ve düzenlemek için kullanılan, açık kaynak kodlu, ücretsiz bir görsel araçtır.</p><p>Bu program 'Mozilla Ortak Lisans Versiyon 2' altında lisanslanmasının yanı sıra 'GNU Genel Ortak Lisansı Versiyon 3 veya üzeri' lisansa sahiptir. Bu programı, lisans koşulları çerçevesinde değiştirebilir ve yeniden dağıtabilirsiniz.</p><p>Detaylı bilgiler için <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> ve <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> adreslerine bakabilirsiniz.</p><p>Program üzerine daha fazla bilgiye ulaşmak için web sitemizi ziyaret edebilirsiniz: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">Bu program belirtilen adresteki GPL/LGPL Qt Toolkit kullanmaktadır: </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Lisans koşulları için şurayı ziyaret edin: </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"></span></p><p><span style=" font-size:small;">Ayrıca bu program, Mark James tarafından sağlanan Creative Commons Attribution 2.5 ve 3.0 lisansına sahip Silk ikon setini kullanmaktadır.<br/>Detaylar için: </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"></span></p></body></html> (based on SQLite %1) Version Versiyon Built for Qt Version Qt Versiyonu SQLCipher Version SQLCipher Versiyonu SQLite Version SQLite Versiyonu AddRecordDialog Add New Record Enter values for the new record considering constraints. Fields in bold are mandatory. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. Name İsim Type Tip Value Values to insert. Pre-filled default values are inserted automatically unless they are changed. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> Auto-increment Unique constraint Check constraint: %1 Foreign key: %1 Default value: %1 Error adding record. Message from database engine: %1 Are you sure you want to restore all the entered values to their defaults? Application Usage: %1 [options] [db] Kullanım: %1 [options] [db] Possible command line arguments: Muhtemel komut satırı argümanları: -h, --help Show command line options -h, --help Komut satırı seçeneklerini göster -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [file] veritabanını açtıktan sonra SQL dosyasını yürüt -s, --sql [file] Execute this SQL file after opening the DB -t, --table [table] Browse this table after opening the DB -q, --quit Exit application after running scripts -q, --quit Scriptleri çalıştırdıktan sonra programı kapat -R, --read-only Open database in read-only mode -o, --option [group/setting=value] Run application with this setting temporarily set to value -v, --version Display the current version [file] Open this SQLite database [file] SQLite veritabanını aç This is DB Browser for SQLite version %1. The -s/--sql option requires an argument -s/--sql opsiyonu argüman gerektirir The file %1 does not exist %1 dosyası mevcut değil The -t/--table option requires an argument The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 Geçersiz seçenek veya mevcut olmayan dosya: %1 CipherDialog SQLCipher encryption SQLCipher şifreleme &Password &Parola &Reenter password &Parolayı tekrar girin Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze &KDF iterations HMAC algorithm KDF algorithm Passphrase Raw key Page &size &Sayfa boyutu Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Lütfen veritabanını şifrelemek için anahtar ayarlayın. Unutmayın, bunun dışında isteğe bağlı yapacağınız herhangi değişikliklerde, veritabanı dosyasını her açtığınızda şifrenizi yeniden girmeniz gerekecektir. Şifrelemeyi devre dışı bırakmak için parola alanını boş bırakınız. Şifreleme işlemi biraz zaman alabilir ve bu işlemi yapmadan önce veritabanınızın yedeğini almalısınız! Kaydedilmemiş değişiklikler şifreniz değiştirilmeden önce kaydedilir. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. Lütfen veritabanınızı şifrelemek için kullandığınız anahtarı giriniz. Bu veritabanı için herhangi bir başka ayar daha yapılmışsa, bu bilgileri de sağlamalısınız. ColumnDisplayFormatDialog Choose display format Display format Choose a display format for the column '%1' which is applied to each value prior to showing it. Default Decimal number Exponent notation Hex blob Hex number Apple NSDate to date Java epoch (milliseconds) to date Julian day to date Unix epoch to local time Date as dd/mm/yyyy Lower case Octal number Round number Unix epoch to date Upper case Windows DATE to date Custom DBBrowserDB no error hata yok Please specify the database name under which you want to access the attached database Lütfen veritabanının ismini erişmek istediğiniz bağlı veritabanının altında belirtin Invalid file format Do you want to save the changes made to the database file %1? %1 veritabanı dosyasında yaptığınız değişiklikleri kaydetmek istiyor musunuz? Exporting database to SQL file... veritabanı SQL dosyası olarak dışa aktarılıyor... Cancel İptal Executing SQL... SQL yürütülüyor... Action cancelled. İşlem iptal edildi. Error in statement #%1: %2. Aborting execution. Belirtilen ifadelerde hata var: #%1: %2. Yürütme işlemi iptal edildi. renameColumn: cannot find table %1. Sütunu Yeniden Adlandırma: %1 tablosu bulunamadı. This database has already been attached. Its schema name is '%1'. Do you really want to close this temporary database? All data will be lost. The database is currently busy: Do you want to abort that other operation? No database file opened Error in statement #%1: %2. Aborting execution%3. and rolling back didn't receive any output from %1 could not execute command: %1 Cannot delete this object Cannot set data on this object A table with the name '%1' already exists in schema '%2'. renameColumn: cannot find column %1. Sütunu Yeniden Adlandırma: %1 sütunu bulunamadı. renameColumn: creating savepoint failed. DB says: %1 Sütunu Yeniden Adlandırma: Kayıt noktası oluşturma başarısız. veritabanı mesajı: %1 renameColumn: creating new table failed. DB says: %1 Sütunu Yeniden Adlandırma: Yeni tablo oluşturma başarısız. veritabanı mesajı: %1 renameColumn: copying data to new table failed. DB says: %1 Sütunu Yeniden Adlandırma: Verileri yeni veritabanına kopyalama başarısız. veritabanı mesajı: %1 renameColumn: deleting old table failed. DB says: %1 Sütunu Yeniden Adlandırma: Eski veritabanı silme işlemi başarısız. veritabanı mesajı: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: Bu tabloyla ilişkili bazı objelerin restore işlemi başarısız. Bu hata büyük olasılıkla sütunların isminin değişimden kaynaklanıyor. SQL sorgusunu elle düzeltmek ve yürütmek isterseniz: renameColumn: releasing savepoint failed. DB says: %1 Sütun Yeniden Adlandırma: Kayıt noktası işlemi sonlandırılırken hata oluştu. veritabanı mesajı: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 Tablo '%1' isminden '%2' ismine yeniden adlandırılırken hata oluştu. veritabanı motorunun mesajı: %3 ... <string can not be logged, contains binary data> ... ... <dize ikili veri içeriyor, günlüğe yazılamadı> ... could not get list of databases: %1 Error loading extension: %1 Eklenti yüklenirken hata oluştu: %1 could not get column information unknown object type %1 bilinmeyen nesne tipi %1 could not get list of db objects: %1, %2 veritabanı nesnelerinin listesi alınamadı: %1, %2 could not get types tipler alınamadı didn't receive any output from pragma %1 %1 pragmasından herhangi bir çıktı alınamadı could not execute pragma command: %1, %2 pragma komutu yürütülemedi: %1, %2 Error setting pragma %1 to %2: %3 Belirtilen pragma ayarlanırken hata oluştu: %1 > %2: %3 File not found. Dosya bulunamadı. DbStructureModel Name İsim Object Nesne Type Tip Schema Şema Database Browsables All Temporary Tables (%1) Tablolar (%1) Indices (%1) İndeksler (%1) Views (%1) Görünümler (%1) Triggers (%1) Tetikleyiciler (%1) EditDialog Edit database cell veritabanı hücresini düzenle Mode: This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Image JSON XML Automatically adjust the editor mode to the loaded data type This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Auto-switch Auto-format: pretty print on loading, compact on saving. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Autoformat Import from file Opens a file dialog used to import any kind of data to this database cell. Export to file Opens a file dialog used to export the contents of this database cell to a file. Print... Open preview dialog for printing displayed image Ctrl+P Ctrl+P Open preview dialog for printing displayed text Copy Hex and ASCII Copy selected hexadecimal and ASCII columns to the clipboard Ctrl+Shift+C Import text Metin aktar Opens a file dialog used to import text to this database cell. veritabanı hücresine metin aktarmak için dosya diyaloğunu açar. &Import &İçe Aktar Export text Metni dışa aktar Opens a file dialog used to export the contents of this database cell to a text file. veritabanı hücresindeki metni metin dosyası olarak dışa aktarmak için dosya diyaloğunu açar. &Export &Dışa Aktar Set this cell to NULL Set as &NULL This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Apply data to cell [Ctrl+Return] This button saves the changes performed in the cell editor to the database cell. Apply Text Metin Binary İkili Clear cell data Hücredeki veriyi temizle Erases the contents of the cell Hücre içeriğini siler &Clear &Temizle <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warning: Editing binary content in text mode may result in corrupted data!</span></p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Uyarı: İkili veriyi metin modunda düzenlemek verinin bozulmasına neden olabilir!</span></p></body></html> This area displays information about the data present in this database cell Bu alan veritabanı hücresinin içindeki içerik hakkında bilgileri görüntüler Type of data currently in cell Şuan da hücrenin içinde bulunan verinin tipi Size of data currently in table Şuan da tablonun içinde bulunan verinin boyutu Choose a file Dosya seçiniz Text files(*.txt);;Image files(%1);;All files(*) Metin dosyaları(*.txt);;Resim dosyaları(%1);;Tüm dosyalar(*) Choose a filename to export data Veriyi dışa aktarmak için dosya ismi seçiniz Text files(*.txt);;All files(*) Metin dosyaları(*.txt);;Tüm dosyalar(*) Image data can't be viewed in this mode. Try switching to Image or Binary mode. Binary data can't be viewed in this mode. Try switching to Binary mode. Text files (*.txt) JSON files (*.json) XML files (*.xml) Image files (%1) Binary files (*.bin) All files (*) Choose a file to import İçe aktarmak için dosya seçiniz %1 Image SVG files (*.svg) Hex dump files (*.txt) Invalid data for this mode The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? Type of data currently in cell: %1 Image %1x%2 pixel(s) Type of data currently in cell: NULL Type of data currently in cell: Valid JSON Type of data currently in cell: Null Şuan da hücresinin içinde bulunan verinin tipi: Boş Type of data currently in cell: Text / Numeric Şuan da hücresinin içinde bulunan verinin tipi: Metin / Nümerik %n char(s) %n karakter Type of data currently in cell: Image Şuan da hücresinin içinde bulunan verinin tipi: Resim %1x%2 pixel %1x%2 piksel Type of data currently in cell: Binary Şuan da hücresinin içinde bulunan verinin tipi: İkili Veri %n byte(s) %n bayt EditIndexDialog Create New Index Yeni İndeks Oluştur &Name &İsim &Columns &Sütunlar Column Sütun Use in Index İndeksin içinde Kullan Order Sırala &Table &Tablo Edit Index Schema &Unique Benzersi&z For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Partial inde&x clause Colu&mns Table column Type Tip Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Index column Deleting the old index failed: %1 Creating the index failed: %1 İndeks oluşturma hatası: %1 EditTableDialog Edit table definition Tablo tanımını düzenle Table Tablo Advanced Gelişmiş Database schema Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Tabloyu satır ID'si olmadan ayarlayın. Bu ayar için, Tamsayı(Integer) tipinde otomatik arttır özelliği olmayan ve birincil anahtar olarak ayarlanmış bir alan gerekli. Without Rowid Satır ID(Rowid) Kullanma Fields Alanlar Add field Alan Ekle Remove field Alanı kaldır Move field up Alanı yukarı taşı Move field down Alanı aşağı taşı Name İsim Type Tip NN Not null NULL Olamaz PK Birincil Anahtar Primary key Birincil Anahtar AI Otomatik Arttırma Autoincrement Otomatik Arttırma U Benzersiz Unique Benzersiz Default Varsayılan Default value Varsayılan değer Check Kontrol Check constraint Kısıtlama Kontrol Foreign Key Yabancı Anahtar <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> Error creating table. Message from database engine: %1 Tablo oluşturma hatası. veritabanı motorunun mesajı: %1 There already is a field with that name. Please rename it first or choose a different name for this field. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. Tablonuzun en az bir satırında boş bırakılmış alan var. Bu sebeple bu özelliği etkinleştirmek imkansız. Lütfen ilk önce tablonuzdaki veriyi değiştirin. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Tablonuzun en az bir satırında tamsayı dışında değer içeren alan var. Bu sebeğle otomatik arttır özelliğini etkinleştirmek imkansız. Lütfen ilk önce tablonuzdaki veriyi değiştirin. Column `%1` has no unique data. `%1` sütununda benzersiz veri yok This column is referenced in a foreign key in table %1 and thus its name cannot be changed. This makes it impossible to set this flag. Please change the table data first. Bu sebeple bu özelliği etkinleştirmek imkansız. Lütfen ilk önce tablonuzdaki veriyi değiştirin. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Modifying this column failed. Error returned from database: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Gerçekten '%1' alanını silmek istediğinize emin misiniz? Bu alanda mevcut bütün verilerinizi kaybedeceksiniz. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Lütfen 'Satır ID(Rowid) Kullanma' özelliğini etkinleştirmek için öncelikle aşağıdaki ölçütleri karşılayan alan ekleyin: - Birincil anahtar ayarlayın - Otomatik arttır ayarını devre dışı bırakın Setting the rowid column for the table failed. Error message: %1 Changing the table schema failed. Error message: %1 ExportDataDialog Export data as CSV Veriyi CSV olarak dışa aktar &Table(s) &Tablo(lar) &Column names in first line &Sütun isimleri ilk satırda Field &separator Alan &ayracı Tab&le(s) Colu&mn names in first line Fie&ld separator , , ; ; Tab Tab karakteri | | Other Diğer... &Quote character & Tırnak karakteri " " ' ' New line characters Windows: CR+LF (\r\n) Unix: LF (\n) Pretty print Could not open output file: %1 Oluşturulan dosya açılamadı: %1 Choose a filename to export data Verileri dışarı aktarmak için dosya ismi seçiniz Text files(*.csv *.txt) Metin dosyaları(*.csv *.txt) Export data as JSON exporting CSV exporting JSON Text files(*.json *.js *.txt) Please select at least 1 table. Lütfen en az 1 tablo seçiniz. Choose a directory Dizin seçiniz Export completed. Dışa aktarma tamamlandı. ExportSqlDialog Export SQL... SQL dosyasını dışa aktar... &Table(s) &Tablo(lar) Tab&le(s) Select All Deselect All &Options &Seçenekler Keep column names in INSERT INTO INSERT ve INTO komutlarında sütun isimlerini tut Multiple rows (VALUES) per INSERT statement Export everything Export data only Keep old schema (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) New INSERT INTO syntax (multiple rows in VALUES) Çok satırlı veri girişi için yeni 'INSERT INTO' söz dizimini ekle Export schema only Sadece şemayı dışa aktar Please select at least 1 table. En az 1 tane tablo seçiniz. Please select at least one table. Choose a filename to export Dışa aktarmak için dosya ismi seçiniz Text files(*.sql *.txt) Metin dosyaları(*.sql *.txt) Export completed. Dışa aktarma tamamlandı. Export cancelled or failed. Dışa aktarma iptal edildi veya başarısız. ExtendedScintilla Ctrl+H Ctrl+P Ctrl+P Find and Replace... Print... ExtendedTableWidget Use as Exact Filter Containing Not equal to Greater than Less than Greater or equal Less or equal Between this and... Set to NULL Copy Copy with Headers Copy as SQL Paste Print... Use in Filter Expression Alt+Del Ctrl+Shift+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite veritabanı dosyaları (*.db *.sqlite *.sqlite3 *.db3);;Tüm dosyalar (*) FileExtensionManager File Extension Manager &Up &Down &Add &Remove Description Extensions *.extension FilterLineEdit Filter Filtre These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Set Filter Expression What's This? Bu nedir? Is NULL Is not NULL Is empty Is not empty Equal to... Not equal to... Greater than... Less than... Greater or equal... Less or equal... In range... FindReplaceDialog Find and Replace Fi&nd text: Re&place with: Match &exact case Match &only whole words When enabled, the search continues from the other end when it reaches one end of the page &Wrap around When set, the search goes backwards from cursor position, otherwise it goes forward Search &backwards <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Use regular e&xpressions Find the next occurrence from the cursor position and in the direction set by "Search backwards" &Find Next &Replace Highlight all the occurrences of the text in the page F&ind All Replace all the occurrences of the text in the page Replace &All The searched text was not found The searched text was not found. The searched text was found one time. The searched text was found %1 times. The searched text was replaced one time. The searched text was replaced %1 times. ForeignKeyEditor &Reset Foreign key clauses (ON UPDATE, ON DELETE etc.) ImportCsvDialog Import CSV file CSV dosyasını içe aktar &Table name &Tablo ismi Table na&me &Column names in first line &Sütun isimleri ilk satırda Field &separator Alan &ayracı , , ; ; Tab Tab karakteri | | Other Diğer... &Quote character &Tırnak karakteri " " ' ' &Encoding &Kodlama UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? Alanlar biçimlendirilsin mi? Separate tables Advanced Gelişmiş When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Ignore default &values Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Fail on missing values Disable data type detection Disable the automatic data type detection when creating a new table. Deselect All Match Similar Select All Inserting data... Veri ekleniyor... Cancel İptal There is already a table of that name and an import into an existing table is only possible if the number of columns match. Zaten aynı isimde tablo mevcut. Varolan tablonun üstüne yazmak ancak sütunların sayısı eşitse mümkün olabilir. There is already a table of that name. Do you want to import the data into it? Zaten aynı isimde tablo mevcut. Verileri bu tablonun içine aktarmak istiyor musunuz? Import completed İçe aktarma tamamlandı There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. There is already a table named '%1'. Do you want to import the data into it? Creating restore point failed: %1 Geri yükleme noktası oluşturma başarısız: %1 Creating the table failed: %1 Tablo oluşturma başarısız: %1 importing CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Missing field for record %1 %1 kayıtı için eksik alan Inserting row failed: %1 Satır ekleme başarısız: %1 MainWindow DB Browser for SQLite SQLite DB Browser Database &Structure Veritabanı &Yapısı toolBar1 toolBar1 &Browse Data &Verileri Görüntüle Table: Tablo: Select a table to browse data Verileri görüntülemek için tablo seçiniz Use this list to select a table to be displayed in the database view Veritabanı görünümünde gösterilecek tabloyu seçmek için bu listeyi kullanın Refresh the data in the selected table. Seçilen tablodaki verileri yenileyin. This button refreshes the data in the currently selected table. Bu buton, seçilen tablodaki verileri yeniler. Opens the SQLCipher FAQ in a browser window Export one or more table(s) to a JSON file Refresh F5 F5 Clear all filters Tüm filtreleri temizle &Table: Insert a new record in the current table Geçerli tabloya yeni kayıt ekle This button creates a new, empty record in the database Bu buton, veritabanında yeni bir boş kayıt oluşturur. New Record Yeni Kayıt Delete the current record Geçerli kaydı sil This button deletes the record currently selected in the database Bu buton, veritabanında seçilen geçerli kayıtları siler Delete Record Kaydı Sil This is the database view. You can double-click any record to edit its contents in the cell editor window. Bu veritabanı görünümüdür. Herhangi kayda çift tıklayarak hücre içeriğini hücre editör penceresinde düzenleyebilirsiniz. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Başa sürükle</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Bu butona basıldığında üstteki tablo görünümünün başlangıcına kaydırılır.</p></body></html> |< |< Scroll 100 records upwards 100 kayıt kadar yukarı kaydır <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>Bu butona basıldığında üstteki tablo görünümünün 100 kayıt kadar yukarısına kaydırılır.</p></body></html> < < 0 - 0 of 0 0 - 0 / 0 <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>100 kayıt kadar aşağı kaydır</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>Bu butona basıldığında üstteki tablo görünümünün 100 kayıt kadar aşağısına kaydırılır.</p></body></html> > > Scroll to the end Sona sürükle <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Bu butona basıldığında üstteki tablo görünümünün en sonuna kaydırılır.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>İstediğiniz kayda atlamak için buraya tıklayın</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>Bu buton belirtilen kayıt numarasına gitmek için kullanılır.</p></body></html> Go to: Bu kayda gidin: Enter record number to browse Görüntülemek için kayıt numarasını giriniz Type a record number in this area and click the Go to: button to display the record in the database view Bu alana veritabanı görünümünde görüntülemek istediğiniz kayıt numarasını giriniz ve Bu kayda gidin: butonuna tıklayınız 1 1 Edit &Pragmas &Pragmaları Düzenleyin <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> None None Full Full Incremental Incremental <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> Delete Delete Truncate Truncate Persist Persist Memory Memory WAL WAL Off Off <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> Normal Normal Exclusive Exclusive <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> Default Default File File <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> Open an existing database file in read only mode Unlock view editing This unlocks the current view for editing. However, you will need appropriate triggers for editing. E&xecute SQL SQL Kodunu &Çalıştır &File &Dosya &Import &İçe Aktar &Export &Dışa Aktar &Edit Düz&enle &View &Görünüm &Help &Yardım DB Toolbar Veritabanı Araç Çubuğu Edit Database &Cell DB Sche&ma &Remote Execute current line [Shift+F5] This button executes the SQL statement present in the current editor line Shift+F5 Shift+F5 Edit display format Edit the display format of the data in this column Show rowid column Toggle the visibility of the rowid column Set encoding Change the encoding of the text in the table cells Set encoding for all tables Change the default encoding assumed for all tables in the database SQL Log SQL Günlüğü &Show SQL submitted by &Şunun tarafından gönderilen SQL kodunu göster: User Kullanıcı Application Uygulama &Clear &Temizle Plot Plan Columns Sütun X X Y Y _ _ Line type: Çizgi Tipi: Line Çizgi StepLeft Sola Basamakla StepRight Sağa Basamakla StepCenter Merkeze Basamakla Impulse Kaydırmalı Point shape: Nokta Şekli: Cross Çarpı Plus Artı Circle Daire Disc Disk Square Kare Diamond Elmas Star Yıldız Triangle Üçgen TriangleInverted Ters Üçgen CrossSquare Çapraz Kare PlusSquare Kare İçinde Artı CrossCircle Daire İçinde Çarpı PlusCircle Daire İçinde Artı Peace Barış Simgesi <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Geçerli planı kaydedin...</p><p>Dosya formatı eklenti tarafından seçilmiş (png, jpg, pdf, bmp)</p></body></html> Save current plot... Geçerli planı kaydet... DB Schema Veritabanı Şeması &New Database... Ye&ni Veritabanı... Create a new database file Yeni bir veritabanı dosyası oluştur This option is used to create a new database file. Bu seçenek yeni bir veritabanı dosyası oluşturmak için kullanılır. Ctrl+N Ctrl+N &Open Database... &Veritabanı Aç... Open an existing database file Mevcut veritabanı dosyasını aç This option is used to open an existing database file. Bu seçenek mevcut veritabanı dosyasını açmak için kullanılır. Ctrl+O Ctrl+O &Close Database Veritabanı &Kapat Ctrl+W Ctrl+W Revert Changes Değişiklikleri Geri Al Revert database to last saved state Veritabanını en son kaydedilen duruma döndür This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Bu seçenek veritabanını en son kaydedilen durumuna döndürür. Geçerli kayıttan sonra yaptığınız tüm değişiklikler kaybolacaktır. Write Changes Değişiklikleri Kaydet Write changes to the database file Değişiklikleri veritabanı dosyasına kaydet This option is used to save changes to the database file. Bu seçenek değişiklikleri veritabanı dosyasına kaydetmenizi sağlar. Ctrl+S Ctrl+S Compact Database Veritabanını Genişlet Compact the database file, removing space wasted by deleted records Veritabanı dosyasını genişletmek, silinen kayıtlardan dolayı meydana gelen boşlukları temizler Compact the database file, removing space wasted by deleted records. Veritabanı dosyasını genişletmek, silinen kayıtlardan dolayı meydana gelen boşlukları temizler. E&xit &Çıkış Ctrl+Q Ctrl+Q Database from SQL file... SQL dosyasından veritabanı... Import data from an .sql dump text file into a new or existing database. Verileri .sql uzantılı döküm dosyasından varolan veya yeni veritabanına aktarın. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Bu seçenek verileri .sql döküm dosyasından varolan veya yeni veritabanına aktarmanıza olanak sağlar. SQL dosyaları MySQL ve PostgreSQL dahil olmak üzere birçok veritabanı motorları tarafından oluştururlar. Table from CSV file... CSV dosyasından tablo... Open a wizard that lets you import data from a comma separated text file into a database table. Virgülle ayrılmış metin dosyalarını veritabanınızın içine aktarmanızı sağlayan sihirbazı açar. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Virgülle ayrılmış metin dosyalarını veritabanınızın içine aktarmanızı sağlayan sihirbazı açar. CSV dosyaları çoğu veritabanı motorları ve elektronik tablo uygulamaları tarafından oluştururlar. Database to SQL file... Veritabanından SQL dosyası... Export a database to a .sql dump text file. Veritabanını .sql döküm dosyası olarak dışa aktar. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Bu seçenek veritabanını .sql döküm dosyası olarak dışa aktarmanızı sağlar. SQL döküm dosyaları veritabanını, MySQL ve PostgreSQL dahil birçok veritabanı motorunda yeniden oluşturmak için gereken verilerin tümünü içerir. Table(s) as CSV file... Tablo(lar)dan CSV dosyası... Export a database table as a comma separated text file. Veritabanı tablosunu virgülle ayrılmış metin dosyası olarak dışa aktar. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Veritabanını virgülle ayrılmış metin dosyası olarak diğer veritabanı veya elektronik tablo uygulamalarına aktarmaya hazır olacak şekilde dışa aktarın. Create Table... Tablo Oluşturun... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Tablo Oluşturma sihirbazı, veritabanı için alanlarını ve ismini ayarlayabileceğiniz, yeni bir tablo oluşturmanızı sağlar. Delete Table... Tabloyu Sil... Delete Table Tabloyu Sil Open the Delete Table wizard, where you can select a database table to be dropped. Tablo Silme sihirbazı, seçtiğiniz tabloları silmenizi sağlar. Modify Table... Tabloyu Düzenle... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Tablo Düzenleme sihirbazı, varolan tablonuzu yeniden adlandırmanıza olanak sağlar. Ayrıca yeni alan ekleyebilir, silebilir hatta alanların ismini ve tipini de düzenleyebilirsiniz. Create Index... İndeks Oluştur... Open the Create Index wizard, where it is possible to define a new index on an existing database table. İndeks Oluşturma sihirbazı, varolan veritabanı tablosuna yeni indeks tanımlamanıza olanak sağlar. &Preferences... &Tercihler... Open the preferences window. Tercihler penceresini açar. &DB Toolbar &Veritabanı Araç Çubuğu Shows or hides the Database toolbar. Veritabanı araç çubuğunu gösterir veya gizler. What's This? Bu nedir? Shift+F1 Shift+F1 &About... &Hakkında... &Recently opened En son açılanla&r Open &tab Se&kme Aç Ctrl+T Ctrl+T Database Structure This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Browse Data Refresh the data in the selected table [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. Save the table as currently displayed <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> ... ... Print currently browsed table data [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> This button deletes the record or records currently selected in the table This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Scroll one page upwards <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> Scroll one page downwards <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> Edit Pragmas Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Execute SQL &Tools SQL &Log Show S&QL submitted by This button clears the contents of the SQL logs This panel lets you examine a log of all SQL commands issued by the application or by yourself &Plot This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Project Toolbar Extra DB toolbar Close the current database file This button closes the connection to the currently open database file &Revert Changes &Write Changes Compact &Database... Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. &Load Extension... &Wiki Bug &Report... Feature Re&quest... Web&site &Donate on Patreon... Sa&ve Project... This button lets you save all the settings associated to the open DB to a DB4S project file Open &Project... This button lets you open a DB4S project file &Attach Database... Add another database file to the current database connection This button lets you add another database file to the current database connection &Set Encryption... SQLCipher &FAQ Table(&s) to JSON... Open Data&base Read Only... Save results Save the results view This button lets you save the results of the last executed query Find text in SQL editor Find text in SQL editor [Ctrl+F] This button opens the search bar of the editor Ctrl+F Find or replace text in SQL editor Find or replace text in SQL editor [Ctrl+H] This button opens the find/replace dialog for the current editor tab Export to &CSV &CSV dosyası olarak dışa aktar Save as &view &Görünümü kaydet Save as view Görünümü kaydet Hide column(s) Hide selected column(s) Show all columns Show all columns that were hidden Shows or hides the Project toolbar. Extra DB Toolbar Export the filtered data to CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Save the current filter, sort column and display formats as a view This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Insert Values... Open a dialog for inserting values in a new record Insert new record using default values in browsed table New In-&Memory Database Drag && Drop Qualified Names Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Drag && Drop Enquoted Names Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor &Integrity Check Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. &Foreign-Key Check Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab &Quick Integrity Check Run a quick integrity check over the open DB Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. &Optimize Attempt to optimize the database Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Print Print text from current SQL editor tab [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Print the structure of the opened database [Ctrl+P] Open a dialog for printing the structure of the opened database &Database from SQL file... &Table from CSV file... &Database to SQL file... &Table(s) as CSV file... &Create Table... &Delete Table... &Modify Table... Create &Index... W&hat's This? &About This button opens a new tab for the SQL editor &Execute SQL &SQL kodunu yürüt Execute SQL [F5, Ctrl+Return] SQL kodunu yürüt [F5, Ctrl+Enter] Open SQL file SQL dosyası aç This button opens a file containing SQL statements and loads it in a new editor tab Save SQL file SQL dosyasını kaydet Load extension Eklenti yükle Execute current line Geçerli satırı yürüt Execute current line [Ctrl+E] Geçerli satırı yürüt [Ctrl+E] Ctrl+E Ctrl+E Export as CSV file CSV dosyası olarak dışa aktar Export table as comma separated values file Tabloyu virgülle ayrılmış girdiler dosyası olarak dışa aktar &Wiki... &Döküman... Bug &report... Hata Bildi&r... Web&site... Web &Sitesi... Save Project Projeyi Kaydet Save the current session to a file Geçerli oturumu dosyaya kaydet Open Project Proeje Aç Load a working session from a file Dosyadan çalışma oturumunu yükle &Attach Database Verit&abanını İliştir Set Encryption Şifre Ayarla Save SQL file as SQL dosyasını bu şekilde kaydet This button saves the content of the current SQL editor tab to a file &Browse Table &Tabloyu Görüntüle Copy Create statement 'Create' ifadesini kopyala Copy the CREATE statement of the item to the clipboard Objenin 'Create' ifadesini panoya kopyala Ctrl+Return Ctrl+Return Ctrl+L Ctrl+L Ctrl+P Ctrl+P Ctrl+D Ctrl+D Ctrl+I Ctrl+I Encrypted Read only Database file is read only. Editing the database is disabled. Database encoding Veritabanı kodlaması Database is encrypted using SQLCipher Veritabanı SQLCipher kullanılırak şifrelendi Choose a database file Veritabanı dosyasını seçiniz SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite veritabanı dosyaları (*.db *.sqlite *.sqlite3 *.db3);;Tüm dosyalar (*) Invalid file format. Geçersiz dosya formatı Choose a filename to save under Kaydetmek için dosya ismi seçiniz Error adding record: Kayıt ekleme hatası: Error deleting record: %1 Kayıt silme hatası: Please select a record first Lütfen öncelikle kaydı seçiniz %1 - %2 of %3 %1 - %2 / %3 There is no database opened. Please open or create a new database file. Açılmış veritabanı bulunamadı. Lütfen veritabanı açın veya yeni bir veritabanı oluşturun. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. Gerçekten '%1' türüne ait '%2' nesnesini silmek istediğinize emin misiniz? '%1' ile ilişkili bütün verileri kaybedeceksiniz. Error: could not delete the %1. Message from database engine: %2 Hata: '%1' silinemedi. Veritabanı motorunun mesajı: %2 There is no database opened. Açılmış veritabanı bulunamadı. %1 Rows returned from: %3 (took %2ms) %1 tane satır döndürüldü: %3 (yaklaşık %2ms) Error executing query: %1 Sorgu yürütme hatası: %1 Query executed successfully: %1 (took %2ms) Sorgu başarıyla yürütüldü: %1 (yaklaşık %2ms) , %1 rows affected Choose a text file Metin dosyası seçiniz Text files(*.csv *.txt);;All files(*) Metin dosyaları(*.csv *.txt);;Tüm dosyalar(*) Import completed İçe aktarma tamamlandı Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Are you sure you want to undo all changes made to the database file '%1' since the last save? Son kayıttan itibaren '%1' dosyasına yaptığınız değişiklikleri geri almak istediğinize emin misiniz? Choose a file to import İçe aktarmak için dosya seçiniz Text files(*.sql *.txt);;All files(*) Metin dosyaları(*.sql *.txt);;Tüm dosyalar(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. İçeri aktarılan verileri tutmak için yeni bir veritabanı dosyası oluşturmak istiyor musunuz? Eğer cevabınız hayır ise biz SQL dosyasındaki verileri geçerli veritabanına aktarmaya başlayacağız. File %1 already exists. Please choose a different name. %1 dosyası zaten mevcut. Lütfen farklı bir isim seçiniz. Error importing data: %1 Dosya içeri aktarılırken hata oluştu: %1 Import completed. İçeri aktarma tamamlandı. Delete View Görünümü Sil Modify View Delete Trigger Tetikleyiciyi Sil Modify Trigger Delete Index İndeksi Sil Modify Index Modify Table &%1 %2 &%1 %2 Extensions(*.so *.dylib *.dll);;All files(*) Choose a project file to open This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Duplicate records Duplicate record Ctrl+" Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Setting PRAGMA values will commit your current transaction. Are you sure? PRAGMA değerlerini ayarlamak geçerli işleminizi yürütmeye alacaktır. Bunu yapmak istediğinize emin misiniz? Could not open database file. Reason: %1 In-Memory database determining row count... %1 - %2 of >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Are you sure you want to delete the view '%1'? Are you sure you want to delete the trigger '%1'? Are you sure you want to delete the index '%1'? Error: could not delete the table. Error: could not delete the view. Error: could not delete the trigger. Error: could not delete the index. Message from database engine: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? -- EXECUTING SELECTION IN '%1' -- -- EXECUTING LINE IN '%1' -- -- EXECUTING ALL IN '%1' -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Execution aborted by user executing query %1 rows returned in %2ms query executed successfully. Took %1ms%2 Choose text files Import completed. Some foreign key constraints are violated. Please fix them before saving. Select SQL file to open Açmak için SQL dosyasını seçiniz Couldn't read file: %1. Couldn't save file: %1. Select file name Dosya ismi seçiniz Select extension file Eklenti dosyasını seçiniz Extensions(*.so *.dll);;All files(*) Eklenti dosyaları(*.so *.dll);;Tüm dosyalar(*) Extension successfully loaded. Eklenti başarıyla yüklendi. Error loading extension: %1 Eklenti yüklenirken hata oluştu: %1 Don't show again Bir daha gös'terme New version available. Yeni sürüm güncellemesi mevcut. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Yeni bir SQLite DB Browser sürümü mevcut (%1.%2.%3).<br/><br/>Lütfen buradan indiriniz: <a href='%4'>%4</a> Collation needed! Proceed? Harmanlama gerekli! Devam edilsin mi? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Bu veritabanınındaki bir tablo özel '%1' koleksiyon fonksiyonu gerektirmektedir. Daha fazla bilgi olmadan program bunu sağlayamaz. Eğer bu şekilde devam edecekseniz, veritabanınıza kötü şeyler olabileceğinin farkında olun ve yedek oluşturun. creating collation Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Please specify the view name Lütfen görünümünün ismini belirtin There is already an object with that name. Please choose a different name. Bu isme sahip obje zaten mevcut. Lütfen farklı bir isim seçiniz. View successfully created. Görünüm başarıyla oluşturuldu. Error creating view: %1 Görünüm oluşturma hatası: %1 There is no filter set for this table. View will not be created. Delete Records This action will open a new SQL tab for running: Press Help for opening the corresponding SQLite reference page. Choose a axis color Renk eksenini seçiniz PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Tüm dosyalar(*) Choose a file to open Açmak için dosya seçiniz DB Browser for SQLite project file (*.sqbpro) SQLite DB Browser proje dosyası (*.sqbpro) Please choose a new encoding for this table. Please choose a new encoding for all tables. Error checking foreign keys after table modification. The changes will be reverted. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. At line %1: Result: %2 %1 Leave the field empty for using the database encoding. This encoding is either not valid or not supported. Cancel İptal NullLineEdit Set to NULL Alt+Del PlotDock Plot Plan <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> Columns Sütun X X Y Y _ _ Axis Type Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Line type: Çizgi Tipi: None None Line Çizgi StepLeft Sola Basamakla StepRight Sağa Basamakla StepCenter Merkeze Basamakla Impulse Kaydırmalı Point shape: Nokta Şekli: Cross Çarpı Plus Artı Circle Daire Disc Disk Square Kare Diamond Elmas Star Yıldız Triangle Üçgen TriangleInverted Ters Üçgen CrossSquare Çapraz Kare PlusSquare Kare İçinde Artı CrossCircle Daire İçinde Çarpı PlusCircle Daire İçinde Artı Peace Barış Simgesi <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Geçerli planı kaydedin...</p><p>Dosya formatı eklenti tarafından seçilmiş (png, jpg, pdf, bmp)</p></body></html> Save current plot... Geçerli planı kaydet... Load all data and redraw plot Row # Choose a axis color Renk eksenini seçiniz Copy Print... Show legend Stacked bars Date/Time Date Time Numeric Label Invalid Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Choose an axis color Choose a filename to save under Kaydetmek için dosya ismi seçiniz PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Tüm dosyalar(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. Cancel İptal PreferencesDialog Preferences Tercihler &General &Genel Remember last location Son dizini hatırla Always use this location Her zaman bu dizini kullan Remember last location for session only Aynı oturum için son dizini hatırla ... ... Default &location Varsayılan Lan&guage Di&l Automatic &updates Otomatik enabled etkin Show remote options &Database &Veritabanı Database &encoding &Veritabanı kodlaması Open databases with foreign keys enabled. Veritabanlarını Yabancı Anahtarlar etkin olacak şekilde aç. &Foreign keys &Yabancı Anahtarlar Remove line breaks in schema view Şema görünümünde satır sonlarını kaldır &Prefetch block size &Önceden getirilecek blok boyutu Data &Browser Veri &Görüntüleyici NULL fields Geçersiz alanlar Text &colour Yazı &rengi &Text &Yazı Bac&kground colour Ar&kaplan rengi Remove line breaks in schema &view Prefetch block si&ze Advanced Gelişmiş SQ&L to execute after opening database Default field type Font &Font Content Symbol limit in cell NULL Regular Text Metin Binary İkili Background Filters Toolbar style Only display the icon Only display the text The text appears beside the icon The text appears under the icon Follow the style DB file extensions Manage When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Font si&ze This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Row count threshold for completion Field display Displayed &text Text color Background color Preview only (N/A) Escape character Delay time (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. &SQL &SQL Settings name Ayarlar ismi Context Özellik Colour Renk Bold Kalın Italic İtalik Underline Altı çizili Keyword Anahtar Kelime function fonksiyon Function Fonksiyon Table Tablo Comment Yorum Identifier Kimlik String String currentline currentline Current line Geçerli satır SQL &editor font size SQL &Editör yazı boyutu SQL &log font size SQL &günlüğü yazı boyutu Tab size &Wrap lines Never At word boundaries At character boundaries At whitespace boundaries &Quotes for identifiers Choose the quoting mechanism used by the application for identifiers in SQL code. "Double quotes" - Standard SQL (recommended) `Grave accents` - Traditional MySQL quotes [Square brackets] - Traditional MS SQL Server quotes Keywords in &UPPER CASE When set, the SQL keywords are completed in UPPER CASE letters. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Remote CA certificates Subject CN Common Name Subject O Organization Valid from Valid to Serial number Your certificates File File Subject Common Name Issuer CN Issuer Common Name Clone databases into Tab size: Tab boşluğu: SQL editor &font SQL Editör &yazı boyutu Error indicators Hori&zontal tiling If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Code co&mpletion Foreground SQL &results font size &Extensions &Eklentiler Select extensions to load for every database: Her veritabanında kullanmak için eklenti seçiniz: Add extension Eklenti Ekle Remove extension Eklenti Sil <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>Kurallı ifade(REGEXP) operatörü aktif edildiğinde SQLite, herhangi bir kurallı ifade uygulamaz ama şuan da çalışan uygulamayı geri çağırır. <br/>SQLite DB Browser kurallı ifadeyi kutunun dışında kullanmanıza izin vermek için bu algoritmayı uygular. <br/>Birden çok muhtemel uygulama olduğu gibi sizde farklı birini kullanabilirsiniz.<br/>Programın uygulamalarını devre dışı bırakmakta ve kendi eklentinizle kendi uygulamanızı yüklemekte özgürsünüz.<br/>Ayrıca uygulamayı yeniden başlatmak gerekir.</p></body></html> Disable Regular Expression extension Kurallı İfade eklentisini devre dışı bırak Choose a directory Dizin seçiniz The language will change after you restart the application. Seçilen dil uygulama yeniden başlatıldıktan sonra uygulanacaktır. Select extension file Eklenti dosyası seçiniz Extensions(*.so *.dll);;All files(*) Eklentiler(*.so *.dll);;Tüm dosyalar(*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file No certificates found in this file. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. QObject Error importing data Veriyi içe aktarılırken hata oluştu from record number %1 kayıt numarasından: %1 . %1 . %1 Importing CSV file... Decoding CSV file... CSV dosyasının şifresi çözülüyor... Cancel İptal Collation needed! Proceed? Harmanlama gerekli! Devam edilsin mi? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Bu veritabanınındaki bir tablo özel '%1' koleksiyon fonksiyonu gerektirmektedir. Daha fazla bilgi olmadan program bunu sağlayamaz. Eğer bu şekilde devam edecekseniz, veritabanınıza kötü şeyler olabileceğinin farkında olun ve yedek oluşturun. SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite veritabanı dosyaları (*.db *.sqlite *.sqlite3 *.db3);;Tüm dosyalar (*) All files (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 Error opening remote file at %1. %2 Error: Invalid client certificate specified. Please enter the passphrase for this client certificate in order to authenticate. Cancel İptal Uploading remote database to %1 Downloading remote database from %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. Error: The network is not accessible. Error: Cannot open the file for sending. Error opening local databases list. %1 Error creating local databases list. %1 RemoteDock Remote Identity Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Go Push currently opened database to server <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> RemoteModel Name İsim Version Versiyon Last modified Size Commit bytes RemotePushDialog Push database Database na&me to push to Commit message <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Public Branch Force push Database will be public. Everyone has read access to it. Database will be private. Only you have access to it. Use with care. This can cause remote commits to be deleted. Unspecified SqlExecutionArea Form Form Find previous match [Shift+F3] Find previous match with mapping Shift+F3 Shift+F3 The found pattern must be a whole word Whole Words Text pattern to find considering the checks in this frame Find in editor The found pattern must match in letter case Case Sensitive Find next match [Enter, F3] Find next match with wrapping F3 F3 Interpret search pattern as a regular expression <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Regular Expression Close Find Bar <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements Son yürütülen ifadenin sonucu This field shows the results and status codes of the last executed statements. Bu alan son yürütülen ifadenin durum kodlarını ve sonuçlarını gösterir. Export to &CSV &CSV dosyası olarak dışa aktar Save as &view &Görünümü kaydet Save as view Görünümü kaydet Please specify the view name Lütfen görünümünün ismini belirtin There is already an object with that name. Please choose a different name. Bu isme sahip obje zaten mevcut. Lütfen farklı bir isim seçiniz. View successfully created. Görünüm başarıyla oluşturuldu. Error creating view: %1 Görünüm oluşturma hatası: %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. (X) abs(X) fonksiyonu X sayısal argümanının mutlak değerini döndürür. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. () changes() fonksiyonu en son yürütülen INSERT, DELETE veya UPDATE ifadesinden etkilenen veritabanı satırlarının sayısını döndürür. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1,X2,...) char(X1,X2,...,XN) fonksiyonu sırasıyla X1'den XN'e kadar olan tamsayıların unicode karakter karşılıklarından oluşan dizeyi döndürür. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y,...) coalesce() fonksiyonu NULL olmayan ilk argümanı döndürür. Eğer tüm argümanlar NULL ise NULL değerini döndürür. (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) glob(X,Y) fonksiyonu "Y GLOB X" ifadesinin eşdeğerini döndürür. (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) ifnull() fonksiyonu NULL olmayan ilk argümanı döndürür. Eğer her iki argüman da NULL ise NULL değerini döndürür. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X,Y) instr(X,Y) fonksiyonu ilk önce X dizesinin içinde Y dizesinin içeriğini arar ve eşleşen yerden önceki karakterlerin sayısının 1 fazlasını döndürür. Eğer Y, X içerisinde bulunmazsa 0 değerini döndürür. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) hex() fonksiyonu argümanı BLOB olarak yorumlar ve BLOB içeriğinin büyük harf onaltılık kısmını dize olarak döndürür. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. () last_insert_rowid() fonksiyonu çağrılan veritabanı bağlantısından en son eklenen satırın ROWID değerini döndürür. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X) length() fonksiyonu X dize değeri için NULL ifadesine kadar olan karakter sayısını döndürür (bayt olarak değil). (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y) like() fonksiyonu "Y LIKE X" ifadesini uygulamak için kullanılır. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X,Y,Z) like() fonksiyonu "Y LIKE X ESCAPE Z" ifadesini uygulamak için kullanılır. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. (X) load_extension(X) fonksiyonu SQLite eklentilerini paylaşılan kitaplık dışına X ismiyle yükler. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. (X,Y) load_extension(X) fonksiyonu Y başlangıç noktasını kullanarak SQLite eklentilerini paylaşılan kitaplık dışına X ismiyle yükler. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) lower(X) fonksiyonu tüm X dizesinin tüm ASCII karakterlerinin küçük harfe dönüştürülmüş karşılığını döndürür. (X) ltrim(X) removes spaces from the left side of X. (X) ltrim(X) fonksiyonu X'in sol tarafındaki boşlukları siler. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y) ltrim(X,Y) fonksiyonu X'in sol tarafındaki Y'de bulunan tüm karakterlerin silinmiş halini dize halinde döndürür. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) Çok argümanlı max() fonksiyonu en büyük değere sahip argümanı döndürür. Eğer herhangi bir argüman NULL ise NULL değerini döndürür. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) Çok argümanlı min() fonksiyonu en küçük değere sahip argümanı döndürür. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (X,Y) nullif(X,Y) fonksiyonu eğer argümanlar farklı ise ilk argümanı, eğer argümanlar aynı ise NULL döndürür. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (FORMAT,...) printf(FORMAT,...) SQL fonksiyonu C dilindeki sqlite3_mprintf() fonksiyonu ve standard C kütüphanesindeki printf() fonksiyonu ile aynı mantıkta çalışır. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. (X) quote(X) fonksiyonu girilen argümanlardan SQL ifadesi olarak tam anlamıyla dahil edilmeye uygun olanları döndürür. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. () random() fonksiyonu -9223372036854775808 ve +9223372036854775807 tamsayı değerli arasında rastgele değer döndürür. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (N) randomblob(N) fonksiyonu rastgele bayt içeren N-byte türünde blob döndürür. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X,Y,Z) replace(X,Y,Z) fonksiyonu X içindeki her Y argümanını, Z argümanıyla değiştirmesiyle oluşan dizeyi döndürür. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X) round(X) fonksiyonu X ondalıklı sayısının ondalıklı kısmın sıfıra yuvarlanmasıyla oluşan değeri döndürür. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X,Y) round(X,Y) fonksiyonu X ondalıklı sayısının Y kadar sağındaki ondalıklı kısmı sıfıra yuvarlanmasıyla oluşan değeri döndürür. (X) rtrim(X) removes spaces from the right side of X. (X) rtrim(X) fonksiyonu X'in sağ tarafındaki boşlukları siler. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X,Y) rtrim(X,Y) fonksiyonu X'in sağ tarafındaki Y'de bulunan tüm karakterlerin silinmiş halini dize halinde döndürür. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X) soundex(X) fonksiyonu X dizesinin soundex kodlamasını string olarak döndürür. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y) substr(X,Y) fonksiyonu X dizesinin başlangıcından Y. indekse kadar olan string bölümünü döndürür. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. (X,Y,Z) substr(X,Y,Z) fonksiyonu X dizesinin Y. indeksinden başlayarak Z uzunluğu kadar olan string bölümünü döndürür. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. () total_changes() fonksiyonu geçerli veritabanı bağlantısı açıldığından itibaren INSERT, UPDATE veya DELETE ifadelerinden etkilenen toplam satır sayısını döndürür. (X) trim(X) removes spaces from both ends of X. (X) trim(X) fonksiyonu X'in içinde bulunan boşlukları siler. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X,Y) trim(X,Y) fonksiyonu X'in içindeki Y'de bulunan tüm karakterlerin silinmiş halini dize halinde döndürür. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) typeof(X) fonksiyonu X ifadesinin veri tipini gösteren dizeyi döndürür. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) unicode(X) fonksiyonu X'in ilk karakterine karşılık gelen unicode kod noktasını döndürür. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (X) upper(X) fonksiyonu tüm X dizesinin tüm küçük ASCII karakterlerinin büyük harf karşılığına çevrilmiş kopyasını döndürür. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (N) zeroblob(N) fonksiyonu 0x00'ın N bayt kadar meydana gelmiş halini BLOB olarak döndürür. (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) avg() fonksiyonu bir gruptaki NULL olmayan tüm X değerlerinin ortalama değerini döndürür. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) count(X) fonksiyonu bir gruptaki X'in kaç kere NULL olmadığının sayısını döndürür. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X) group_concat() fonksiyonu X'in NULL olmayan tüm değerlerle birleşimini dize olarak döndürür. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X,Y) group_concat() fonksiyonu X'in NULL olmayan tüm değerlerle birleşimini dize olarak döndürür. Eğer Y parametresi mevcutsa X'in örnekleri arasında ayraç olarak kullanılır. (X) The max() aggregate function returns the maximum value of all values in the group. (X) max() küme fonksiyonu gruptaki tüm değerler arasından en büyük değeri döndürür. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) min() küme fonksiyonu gruptaki NULL olmayan tüm değerler arasından en küçük değeri döndürür. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) sum() ve total() küme fonksiyonları gruptaki NULL olmayan tüm değerlerin toplamını döndürür. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. SqliteTableModel reading rows loading... References %1(%2) Hold %3Shift and click to jump there Error changing data: %1 Veri değiştirme hatası: %1 retrieving list of columns Fetching data... Cancel İptal VacuumDialog Compact Database Veritabanını Genişlet Warning: Compacting the database will commit all of your changes. Please select the databases to co&mpact: Warning: Compacting the database will commit all changes you made. Uyarı: Veritabanını genişletmek bütün yaptığınız değişiklikleri işleyecektir. Please select the objects to compact: Lütfen genişletilecek objeyi seçiniz: sqlitebrowser-3.11.2/src/translations/sqlb_uk_UA.ts000066400000000000000000012201311345112435200224100ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite Про Оглядач БД для SQLite Version Версія <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>Оглядач БД для SQLite - це безкоштовна програма з відкритим вихідним кодом, призначена для створення і редагування баз даних SQLite.</p><p>Програма має дозволи за двома ліцензіями: Mozilla Public License Version 2 та GNU General Public License Version 3 або пізніші. Можна змінювати або розповсюджувати її за умовами цих ліцензій.</p><p>Посилання <a href="http://www.gnu.org/licenses/gpl.html"><span style="text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> та <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> для детальної інформації.</p><p>Більше інформації про програму можна отримати на веб-сайті: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">Це програмне забезпечення використовує GPL/LGPL Qt Toolkit </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>Посилання </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> для перегляду інформації про умови ліцензії.</span></p><p><span style=" font-size:small;">Ця програма також використовує набір значків Silk від Марка Джеймса (Mark James) з ліцензіями Creative Commons Attribution 2.5 та 3.0.<br />Посилання </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> для детальної інформації.</span></p> <p><span style="font-size: small;">Переклад українською здійснив Андрій Кондратьєв <a href="mailto:inbox@kondratyev.dp.ua">inbox@kondratyev.dp.ua</a><br /> Зв'язок з автором: </span><a href="https://www.facebook.com/a.s.kondratyev"><span style="font-size: small; text-decoration: underline; color: #0000ff;">https://www.facebook.com/a.s.kondratyev</span></a><span style="font-size:small;">. </p><p> Редактор - Genyk <a href="mailto:Genyk95@gmail.com">Genyk95@gmail.com</a><br/> </span></p> </body></html> Qt Version Версія Qt SQLCipher Version Версія SQLCipher SQLite Version Версія SQLite (based on SQLite %1) Version Версія Built for Qt Version Версія Qt SQLCipher Version Версія SQLCipher SQLite Version Версія SQLite AddRecordDialog Add New Record Enter values for the new record considering constraints. Fields in bold are mandatory. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. Name Ім'я Type Тип Value Values to insert. Pre-filled default values are inserted automatically unless they are changed. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> Auto-increment Unique constraint Check constraint: %1 Foreign key: %1 Default value: %1 Error adding record. Message from database engine: %1 Are you sure you want to restore all the entered values to their defaults? Application Usage: %1 [options] [db] Використання: %1 [options] [db] Possible command line arguments: Доступні ключі командного рядку: -h, --help Show command line options -h, --help Показати довідку -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [file] Виконати цей SQL-файл після відкриття БД -t, --table [table] Browse this table after opening the DB -t, --table [table] Переглянути цю таблицю після відкриття БД This is DB Browser for SQLite version %1. -q, --quit Exit application after running scripts -q, --quit Вийти з програми після виконання скриптів -R, --read-only Open database in read-only mode -o, --option [group/setting=value] Run application with this setting temporarily set to value -v, --version Display the current version [file] Open this SQLite database [file] Відкрити SQLite БД The -s/--sql option requires an argument -s/--sql опція вимагає аргумент The -t/--table option requires an argument -t/--table параметр таблиці вимагає аргумент The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 Невірна опція/файл не існує: %1 -h, --help Show command line options -h, --help Показати довідку -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [file] Виконати цей SQL-файл після відкриття БД -t, --table [table] Browse this table after opening the DB -t, --table [table] Переглянути цю таблицю після відкриття БД -q, --quit Exit application after running scripts -q, --quit Вийти з програми після виконання сценарію [file] Open this SQLite database [file] Відкрити SQLite БД The file %1 does not exist Файл %1 не існує Invalid option /non-existant file: %1 Невірна опція /non-existant file: %1 CipherDialog SQLCipher encryption Шифрування SQLCipher &Password &Пароль &Reenter password &Пароль ще раз Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze &Розмір сторінки &KDF iterations HMAC algorithm KDF algorithm Passphrase Парольна фраза Raw key Необроблений ключ Page &size Розмір &сторінки Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Будь ласка, вкажіть ключ шифрування. Якщо Ви зміните будь-яке опційне налаштування, то його доведеться вводити під час кожного відкриття цього файлу бази даних. Залиште поля паролю порожніми, щоб відімкнути шифрування. Процес може тривати деякий час. Рекомендується створити резервну копію перед продовженням! Всі незбережені зміни збережуться автоматично. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. Будь ласка, введіть ключ для шифрування бази даних. Якщо будь-які інші налаштування були змінені для цієї бази даних, то потрібно надати цю інформацію також. ColumnDisplayFormatDialog Choose display format Оберіть формат показу Display format Формат показу Choose a display format for the column '%1' which is applied to each value prior to showing it. Оберіть формат показу для колонки '%1'. Формат застосується до кожного її значенням. Default За замовчуванням Decimal number Десяткове число Exponent notation Експоненціальний запис Hex blob Бінарні дані Hex number Шістнадцяткове число Apple NSDate to date Дата Apple NSDate Java epoch (milliseconds) to date Julian day to date Дата за Юліанським календарем Unix epoch to local time Date as dd/mm/yyyy Lower case Нижній регістр Octal number Вісімкове число Round number Округлене число Unix epoch to date Unix-час Upper case Верхній регістр Windows DATE to date Windows дата Custom Мій формат DBBrowserDB This database has already been attached. Its schema name is '%1'. Please specify the database name under which you want to access the attached database Будь ласка, вкажіть ім'я бази даних, під яким Ви хочете отримати доступ до під'єднаних баз даних Invalid file format Неправильний формат файлу Do you really want to close this temporary database? All data will be lost. Do you want to save the changes made to the database file %1? Зберегти зроблені зміни у файлі бази даних %1? The database is currently busy: Do you want to abort that other operation? Exporting database to SQL file... Експорт бази даних у файл SQL... Cancel Скасувати No database file opened Executing SQL... Виконати код SQL... Action cancelled. Дію скасовано. Error in statement #%1: %2. Aborting execution%3. Помилка в операторі #%1: %2. Виконання скасовано%3. and rolling back і відкочено didn't receive any output from %1 could not execute command: %1 Cannot delete this object Cannot set data on this object Не вдається встановити дані в цей об'єкт A table with the name '%1' already exists in schema '%2'. renameColumn: cannot find column %1. renameColumn: не вдається знайти стовпець %1. Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: Не вдалося скасувати видалення деяких об'єктів, асоційованих із цією таблицею. Найімовірніша причина цього - зміна імен деяких стовпців таблиці. Ось SQL оператор, який потрібно виправити і виконати вручну: Error renaming table '%1' to '%2'.Message from database engine: %3 Помилка перейменування таблиці '%1' в '%2'. Повідомлення від ядра БД: %3 ... <string can not be logged, contains binary data> ... ... <рядок не можна записати в лог-файл, який містить двійкові дані> ... could not get list of databases: %1 Error loading extension: %1 Помилка завантаження розширення: %1 could not get column information неможливо отримати інформацію про стовпець Error in statement #%1: %2. Aborting execution. Помилка в операторі #%1: %2. Виконання зупинено. renameColumn: can not find table %1. renameColumn: неможливо знайти таблицю %1. renameColumn: can not find column %1. renameColumn: неможливо знайти стовпець %1. renameColumn: creating savepoint failed. DB says: %1 renameColumn: помилка створення точки збереження. БД говорить: %1 renameColumn: creating new table failed. DB says: %1 renameColumn: помилка створення нової таблиці. БД говорить: %1 renameColumn: copying data to new table failed. DB says: %1 renameColumn: помилка копіювання даних у нову таблицю. БД говорить: %1 renameColumn: deleting old table failed. DB says: %1 renameColumn: помилка видалення старої таблиці. БД говорить: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: Не вдалося скасувати видалення деяких об'єктів, асоційованих із цією таблицею. Найбільш імовірна причина цього - зміна імен деяких стовпців таблиці. Ось SQL оператор, який потрібно виправити і виконати вручну: renameColumn: releasing savepoint failed. DB says: %1 renameColumn: помилка звільнення точки збереження. БД говорить: %1 Error renaming table '%1' to '%2'.message from database engine: %3 Помилка перейменування таблиці '%1' в '%2'. Повідомлення від ядра БД: %3 ... <string can not be logged, contains binary data > ... ... <рядок не може бути записаний у лог-файл, оскільки містить двійкові дані >... unknown object type %1 невідомий тип об'єкту %1 could not get list of db objects: %1, %2 неможливо отримати список об'єктів БД: %1, %2 could not get types неможливо отримати типи didn't receive any output from pragma %1 не отримано жодного виходу з Прагма %1 could not execute pragma command: %1, %2 неможливо виконати комманду-прагму: %1, %2 Error setting pragma %1 to %2: %3 Помилка встановлення Прагми %1 в %2: %3 File not found. Файл не знайдено. DbStructureModel Name Ім'я Object Об'єкт Type Тип Schema Схема Browsables (%1) Можна переглянути (%1) Database Browsables All Все Temporary Tables (%1) Таблиці (%1) Indices (%1) Індекси (%1) Views (%1) Перегляди (%1) Triggers (%1) Тригери (%1) EditDialog Edit database cell Редагування комірки бази даних Mode: Режим: This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Image Зображення JSON XML Automatically adjust the editor mode to the loaded data type This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Auto-switch Auto-format: pretty print on loading, compact on saving. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Autoformat Import from file Opens a file dialog used to import any kind of data to this database cell. Export to file Opens a file dialog used to export the contents of this database cell to a file. Print... Open preview dialog for printing displayed image Ctrl+P Ctrl+P Open preview dialog for printing displayed text Copy Hex and ASCII Copy selected hexadecimal and ASCII columns to the clipboard Ctrl+Shift+C Import text Імпортувати текст Opens a file dialog used to import text to this database cell. Відкривається файловий діалог, щоб імпортувати текст у цю комірку бази даних. &Import &Імпортувати Export text Експортувати текст Opens a file dialog used to export the contents of this database cell to a text file . Відкриває файловий діалог, щоб експортувати вміст цієї комірки бази даних у текстовий файл. &Export &Експортувати Set this cell to NULL Присвоїти цій комірці значення NULL Set as &NULL Присвоїти &NULL This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Apply data to cell [Ctrl+Return] This button saves the changes performed in the cell editor to the database cell. Apply Застосувати Text Текст Binary Двійкові дані Opens a file dialog used to export the contents of this database cell to a text file. Відкриває файловий діалог, щоб експортувати вміст цієї комірки бази даних у текстовий файл Erases the contents of the cell Очищення вмісту комірки This area displays information about the data present in this database cell Ця зона показує інформацію про дані, що є в цій комірці бази даних Type of data currently in cell Тип даних у комірці Size of data currently in table Розмір даних у таблиці Choose a file Обрати файл Text files(*.txt);;Image files(%1);;All files(*) Текстові файли(*.txt);;Файли зображень(%1);;Всі файли(*) Choose a filename to export data Вибрати ім'я файлу для експорту даних Text files(*.txt);;All files(*) Текстові файли(*.txt);;Всі файли(*) Image data can't be viewed with the text editor Зображення не можна показати в текстовому редакторі Binary data can't be viewed with the text editor Бінарні дані не можна показати в текстовому редакторі Type of data currently in cell: %1 Image Тип даних у комірці: %1 Зображення %1x%2 pixel(s) %1x%2 пікселів Type of data currently in cell: NULL Тип даних у комірці: NULL Type of data currently in cell: Text / Numeric Тип даних у комірці: Текст / Числове Image data can't be viewed in this mode. Try switching to Image or Binary mode. Binary data can't be viewed in this mode. Try switching to Binary mode. Text files (*.txt) JSON files (*.json) XML files (*.xml) Image files (%1) Binary files (*.bin) All files (*) Choose a file to import Оберіть файл для імпорту %1 Image SVG files (*.svg) Hex dump files (*.txt) Invalid data for this mode The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? %n char(s) %n символ %n символу %n символів Type of data currently in cell: Valid JSON Type of data currently in cell: Binary Тип даних у комірці: Двійкові дані %n byte(s) %n байт %n байта %n байтів EditIndexDialog Create New Index Створення нового індексу &Name &Ім'я &Columns &Стовпці Column Стовпець Use in Index Використовувати в індексі Order Сортування &Table &Таблиця Edit Index Schema Редагування індексу схеми &Unique &Унікальний For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Для обмеження індексу частиною таблиці оберіть пункт WHERE, який обере частину таблиці для індексації Partial inde&x clause Частковий клас інде&кса Colu&mns Стов&пці Table column Стовпець таблиці Type Тип Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Додати новий стовпець виразу до індекса. Стовпці виразів містять SQL вирази, а не імена стовпців Index column Стовпець індексу Creating the index failed: %1 Невдале створення індексу: %1 Deleting the old index failed: %1 Невдале видалення старого індексу: %1 Creating the index failed: %1 Невдале створення індексу EditTableDialog Edit table definition Редагування визначення таблиці Table Таблиця Advanced Додатково Database schema Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Щоб створити таблицю 'WITHOUT rowid', потрібно, щоб у ній був первинний ключ INTEGER з відімкненим автоінкрементом. Without Rowid Без ідентифікатора Set this to create a temporary table that is deleted when closing the database. Встановіть це, щоб створити тимчасову таблицю, яка видалиться після закриття бази даних. Temporary table Тимчасова таблиця Fields Поля Add field Додати поле Remove field Видалити поле Move field up Перемістити поле вгору Move field down Перемістити поле вниз Name Ім'я Type Тип NN Not null Не (null) PK ПК Primary key Первинний ключ AI АІ Autoincrement Автоінкремент U У Unique Унікальне Default За замовчуванням Default value Значення за замовчуванням Check Перевірити Check constraint Перевірити обмеження Foreign Key Зовнішній ключ <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result it in problems.</p></body></html> <html><head/><body><p><span style=" font-weight: 600; color:#ff0000;">Увага: </span>Парсер не зміг зрозуміти визначення цієї таблиці. Її модифікація та збереження може призвести до подальших проблем.</p></body></html> Error creating table. message from database engine: %1 Помилка створення таблиці. Повідомлення від ядра бази даних: %1 There already is a field with that name. Please rename it first or choose a different name for this field. Поле з таким ім'ям уже існує. Будь ласка, переіменуйте його або виберіть інше ім'я для цього поля. This column is referenced in a foreign key in table %1, column %2 and thus its name can not be changed. На цей стовпець посилається зовнішній ключ у таблиці %1, стовпці %2, тому її ім'я неможливо змінити. This column is referenced in a foreign key in table %1 and thus its name can not be changed. На цей стовпець посилається зовнішній ключ у таблиці %1, тому її ім'я неможливо змінити. Error creating table. Message from database engine: %1 Помилка створення таблиці. Повідомлення від ядра бази даних: %1 This column is referenced in a foreign key in table %1 and thus its name cannot be changed. На цей стовпець посилається зовнішній ключ у таблиці %1, тому її ім'я неможливо змінити. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. Існує принаймні один рядок, де це поле встановлено в NULL. Встановити цей прапорець неможливо. Спочатку змініть дані таблиці. There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. Існує принаймні один рядок, де це поле містить нечислове значення. Встановити прапорець АІ неможливо. Спочатку змініть дані таблиці. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Column '%1' has no unique data. Стовпець '%1" не містить унікальних даних. This makes it impossible to set this flag. Please change the table data first. Неможливо поставити цей прапорець. Спочатку змініть табличні дані. Modifying this column failed. Error returned from database: %1 Неможливо змінити цей рядок. Повідомлення про помилку від БД: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. Ви впевнені, що хочете видалити поле '%1'? Всі дані, які містяться в цьому полі, будуть втрачені. Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Будь ласка, перед встановленням прапорця без rowid додайте поле, яке має такі критерії: - встановлено прапорець первинного ключа - відімкнений автоінкремент Changing the table schema failed. Error message: %1 Setting the temporary flag for the table failed. Error message: %1 Не вдалося встановити тимчасовий прапорець. Повідомлення помилки: Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Будь ласка, додайте поле, яке відповідає насупним критеріям перед встановлення прапорцю без rowid: - встановлено прапорець первинного ключа - відімкнений автоінкремент Setting the rowid column for the table failed. Error message: %1 Не вдалося встановити rowid стовпець для таблиці. Повідомлення помилки: ExportDataDialog Export data as CSV Експортувати дані у форматі CSV &Table(s) &Таблиці &Column names in first line &Імена стовпців у першому рядку Field &separator &Роздільник полів Tab&le(s) &Таблиці Colu&mn names in first line &Імена стовпців у першому рядку Fie&ld separator &Роздільник полів , , ; ; Tab Табуляція | | Other Інший &Quote character &Символ лапок " " ' ' New line characters Новий роздільник рядків Windows: CR+LF (\r\n) Windows: CR+LF (\r\n) Unix: LF (\n) Unix: LF (\n) Pretty print Гарний висновок Could not open output file: %1 Не вдалося відкрити вихідний файл: %1 Choose a filename to export data Виберіть ім'я файлу для експорту даних Text files(*.csv *.txt) Текстові файли(*.csv *.txt) Export data as JSON Експортувати дані у форматі JSON exporting CSV exporting JSON Text files(*.json *.js *.txt) Текстові файли(*.json *.js *.txt) Please select at least 1 table. Будь ласка, оберіть хоча б 1 таблицю. Choose a directory Оберіть каталог Export completed. Експорт завершено. ExportSqlDialog Export SQL... Експорт SQL... Tab&le(s) &Таблиці Select All Обрати все Deselect All Скасувати вибір &Options &Опції Keep column names in INSERT INTO Імена стовпців у виразі INSERT INTO Multiple rows (VALUES) per INSERT statement Кілька рядків (VALUES) на INSERT вираз Export everything Експортувати всі Export data only Експортувати тільки дані Keep old schema (CREATE TABLE IF NOT EXISTS) Стара схема (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Перезаписати стару схему (DROP TABLE, тоді CREATE TABLE) Export schema only Експортувати тільки схему даних Please select at least 1 table. Будь ласка, оберіть хоча б 1 таблицю. Please select at least one table. Choose a filename to export Оберіть ім'я файлу для експорту Text files(*.sql *.txt) Текстові файли(*.sql *.txt) Export completed. Експорт завершено. Export cancelled or failed. Експорт скасовано або виникла помилка. ExtendedScintilla Ctrl+H Ctrl+P Ctrl+P Find and Replace... Print... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? Вміст буфера обміну більше ніж обраний діапазон. Все одно вставити? Use as Exact Filter Containing Not equal to Greater than Less than Greater or equal Less or equal Between this and... Set to NULL Встановити в NULL Copy Копіювати Copy with Headers Copy as SQL Paste Вставити Print... Use in Filter Expression Alt+Del Ctrl+Shift+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? Вміст буфера обміну більше ніж обраний діапазон. Все одно вставити? FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Файли SQLite баз даних (*.db *.sqlite *.sqlite3 *.db3);;Всі файли (*) FileExtensionManager File Extension Manager &Up &Down &Add &Remove Description Extensions *.extension FilterLineEdit Filter Фільтр These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Set Filter Expression What's This? Is NULL Is not NULL Is empty Is not empty Equal to... Not equal to... Greater than... Less than... Greater or equal... Less or equal... In range... FindReplaceDialog Find and Replace Fi&nd text: Re&place with: Match &exact case Match &only whole words When enabled, the search continues from the other end when it reaches one end of the page &Wrap around When set, the search goes backwards from cursor position, otherwise it goes forward Search &backwards <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Use regular e&xpressions Find the next occurrence from the cursor position and in the direction set by "Search backwards" &Find Next &Replace Highlight all the occurrences of the text in the page F&ind All Replace all the occurrences of the text in the page Replace &All The searched text was not found The searched text was not found. The searched text was found one time. The searched text was found %1 times. The searched text was replaced one time. The searched text was replaced %1 times. ForeignKeyEditor &Reset &Скинути Foreign key clauses (ON UPDATE, ON DELETE etc.) (foreign key clauses(ON UPDATE, ON DELETE etc.) (типи зовнішніх ключів(ON UPDATE, ON DELETE тощо) ImportCsvDialog Import CSV file Імпортувати файл у форматі CSV &Table name &Ім'я таблиці Table na&me &Column names in first line І&мена стовпців у першому рядку Field &separator &Роздільник полів , , ; ; Tab Табуляція | | Other Інший &Quote character &Символ лапок " " ' ' &Encoding &Кодування UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? Обрізати поля? Separate tables Розділити таблиці Advanced Додатково When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Ignore default &values Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Fail on missing values Disable data type detection Disable the automatic data type detection when creating a new table. Deselect All Скасувати вибір Match Similar Співпадіння Select All Обрати все Inserting data... Вставлення даних... Cancel Скасувати There is already a table of that name and an import into an existing table is only possible if the number of columns match. Таблиця з таким ім'ям уже існує, імпорт в існуючу таблицю можливий тільки якщо число стовпців збігається. There is already a table of that name. Do you want to import the data into it? Таблиця з таким ім'ям уже існує. Імпортувати дані в неї? Import completed Імпорт завершено There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. There is already a table named '%1'. Do you want to import the data into it? Creating restore point failed: %1 Помилка створення точки відновлення: %1 Creating the table failed: %1 Помилка створення таблиці: %1 importing CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Missing field for record %1 Пропущено стовпець для запису %1 Inserting row failed: %1 Помилка вставки рядка: %1 MainWindow DB Browser for SQLite Оглядач для SQLite toolBar1 панельІнструментів1 Table: Таблиця: Select a table to browse data Оберіть таблицю для перегляду даних Use this list to select a table to be displayed in the database view Використовуйте цей список, щоб вибрати таблицю, яку буде показано в переглядачі баз даних Refresh the data in the selected table. Оновити дані в обраній таблиці. This button refreshes the data in the currently selected table. Ця кнопка оновлює дані обраної на цей момент таблиці. Scroll one page upwards <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> Scroll one page downwards <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>Натисніть тут, щоб перейти до зазначеного запису</p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Автовакум</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Автоматичний індекс</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Повна контрольна точка FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Зовнішні ключі</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Повний FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ігнорувати перевірку обмежень</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Режим журналу</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Обмеження розміру журналу</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Режим блокування</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Максимальна кількість сторінок</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Розміри сторінки</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Рекурсивні тригери</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Безпечне видалення</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Одночасно</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Тимчасове сховище</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">Користувацька версія</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL автоматична контрольна точка</span></a></p></body></html> &Remote &Віддалений Web&site... Веб-&сайт Refresh Оновити F5 F5 Insert a new record in the current table Додати новий запис у поточну таблицю &Table: &Таблиця: This button creates a new, empty record in the database Ця кнопка створює новий, порожній запис у таблиці New Record Додати запис Delete the current record Видалити поточний запис This button deletes the record currently selected in the database Ця кнопка видаляє обраний запис із БД Delete Record Видалити запис This is the database view. You can double-click any record to edit its contents in the cell editor window. Це переглядач баз даних. Зробіть подвійне клацання по будь-якому запису щоб відредагувати його вміст. <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Прокрутити на початок</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>Натискання цієї кнопки переміщує до початку таблиці.</p></body></html> |< |< Scroll 100 records upwards Прокрутити на 100 записів вгору <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>Натискання цієї кнопки переміщує на 100 записів вгору у таблиці</p></body></html> < < 0 - 0 of 0 0 - 0 з 0 <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>Прокрутити на 100 записів вниз</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>Натискання цієї кнопки переміщує на 100 записів вниз у таблиці</p></body></html> > > Scroll to the end Прокрутити до кінця <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Натискання цієї кнопки переміщує в кінець таблиці.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| >| <html><head/><body><p> Click here to jump to the specified record</p></body></html> <html><head/><body><p>Натисніть тут, щоб перейти до зазначеного запису</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>Ця кнопка використовується, щоб переміститися до запису, номер якого зазначений в зоні Перейти до </p></body></html> Go to: Перейти до: Enter record number to browse Введіть номер запису для перегляду Type a record number in this area and click the Go to: button to display the record in the database view Надрукуйте номер запису в цій зоні й натисніть кнопку Перейти до:, щоб показати запис у базі даних 1 1 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style="text-decoration: underline; color: #0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style="text-decoration: underline; color: #0000ff;">Auto Vacuum</span></a></p></body></html> None Ні Full Повний, цілий Full Incremental Incremental <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style="text-decoration: underline; color: #0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style="text-decoration: underline; color: #0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style="text-decoration: underline; color: #0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style="text-decoration: underline; color: #0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style="text-decoration: underline; color: #0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style="text-decoration: underline; color: #0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style="text-decoration: underline; color: #0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style="text-decoration: underline; color: #0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style="text-decoration: underline; color: #0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style="text-decoration: underline; color: #0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style="text-decoration: underline; color: #0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style="text-decoration: underline; color: #0000ff;">Journal Mode</span></a></p></body></html> Delete Видалити Truncate Усічення Persist Продовжити Memory Пам'ять WAL WAL Off Вимкнути <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style="text-decoration: underline; color: #0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style="text-decoration: underline; color: #0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style="text-decoration: underline; color: #0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style="text-decoration: underline; color: #0000ff;">Locking Mode</span></a></p></body></html> Normal Нормально Exclusive Вибірково <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style="text-decoration: underline; color: #0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style="text-decoration: underline; color: #0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style="text-decoration: underline; color: #0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style="text-decoration: underline; color: #0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style="text-decoration: underline; color: #0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style="text-decoration: underline; color: #0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style="text-decoration: underline; color: #0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style="text-decoration: underline; color: #0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style="text-decoration: underline; color: #0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style="text-decoration: underline; color: #0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style="text-decoration: underline; color: #0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style="text-decoration: underline; color: #0000ff;">Temp Store</span></a></p></body></html> Default За замовчуванням File Файл <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style="text-decoration: underline; color: #0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style="text-decoration: underline; color: #0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style="text-decoration: underline; color: #0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style="text-decoration: underline; color: #0000ff;">WAL Auto Checkpoint</span></a></p></body></html> &File &Файл &Import &Імпорт &Export &Експорт Remote Віддалений сервер &Edit &Редагування &View &Вид &Help &Довідка &Tools DB Toolbar Панель інструментів БД Edit Database &Cell Редагування &комірки БД This button clears the contents of the SQL logs This panel lets you examine a log of all SQL commands issued by the application or by yourself DB Sche&ma Схе&ма БД Execute SQL [F5, Ctrl+Return, Ctrl+R] Виконати SQL [F5, Ctrl+Return, Ctrl+R] &Load extension Завантажити &розширення Execute current line [Shift+F5] Виконати поточний рядок [Shift+F5] This button executes the SQL statement present in the current editor line Shift+F5 Shift+F5 Sa&ve Project &Зберегти проект Open &Project Відкрити &проект Edit display format Формат показу Edit the display format of the data in this column Редагування формату показу для даних у цьому стовпці Show rowid column Показати стовпець rowid Toggle the visibility of the rowid column Змінити видимість стовпця rowid Set encoding Кодування Change the encoding of the text in the table cells Змінити кодування тексту в цій комірці таблиці Set encoding for all tables Встановити кодування для всіх таблиць Change the default encoding assumed for all tables in the database Змінити кодування за замовчуванням для всіх таблиць у базі даних Duplicate record Дублікат запису SQLCipher &FAQ... SQLCipher & ЧаПи... Opens the SQLCipher FAQ in a browser window Відкрити SQLCiphier ЧаПи в браузері Table(s) to JSON... Таблиці в файл JSON... Export one or more table(s) to a JSON file Експортувати таблиці в JSON файл Open from Remote Відкрити віддалений файл Save to Remote Зберегти в хмару &Attach Database &Прикріпити базу даних Save SQL file as Зберегти файл SQL як This button saves the content of the current SQL editor tab to a file &Browse Table Пе&регляд таблиці Clear all filters Очистити всі фільтри User Користувачем Application Додатком &Clear О&чистити Columns Стовпці X X Y Y _ _ Line type: Лінія: Line Звичайна StepLeft Ступенева, зліва StepRight Ступенева, справа StepCenter Ступенева, по центру Impulse Імпульс Point shape: Форма точок: Cross Хрест Plus Плюс Circle Коло Disc Диск Square Квадрат Diamond Ромб Star Зірка Triangle Трикутник TriangleInverted Трикутник перевернутий CrossSquare Хрест у квадраті PlusSquare Плюс у квадраті CrossCircle Хрест у колі PlusCircle Плюс у колі Peace Світ <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Зберегти поточний графік...</p><p>Формат файлу вибирається розширенням (png, jpg, pdf, bmp)</p></body></html> Save current plot... Зберегти поточний графік... Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Отримати всі дані. Діє якщо не всі дані довантажено. DB Schema Схема БД &New Database... &Нова база даних... Create a new database file Створити новий файл бази даних This option is used to create a new database file. Ця опція використовується щоб створити новий файл бази даних. Ctrl+N Ctrl+N &Open Database... &Відкрити базу даних... Open an existing database file Відкрити існуючий файл бази даних This option is used to open an existing database file. Ця опція використовується, щоб відкрити існуючий файл бази даних. Ctrl+O Ctrl+O &Close Database &Закрити базу даних This button closes the connection to the currently open database file Ctrl+W Ctrl+W Revert database to last saved state Повернути базу даних до останнього збереженого стану This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. Ця опція використовується, щоб повернути поточний файл бази даних до його останнього збереженого стану. Всі зміни, зроблені з останньої операції збереження, буде втрачено. Write changes to the database file Записати зміни у файл бази даних This option is used to save changes to the database file. Ця опція використовується, щоб зберегти зміни у файлі бази даних. Ctrl+S Ctrl+S Compact &Database... Compact the database file, removing space wasted by deleted records Ущільнити базу даних, видаливши простір, зайнятий видаленими записами Compact the database file, removing space wasted by deleted records. Ущільнити базу даних, видаливши простір, зайнятий видаленими записами. E&xit &Вихід Ctrl+Q Ctrl+Q Import data from an .sql dump text file into a new or existing database. Імпортувати дані з текстового файлу .sql в нову або існуючу базу даних. This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. Ця опція дає змогу імпортувати дані з текстового файлу .sql у нову або існуючу базу даних. Файл SQL можна створити на більшості двигунів баз даних, включно з MySQL і PostgreSQL. Open a wizard that lets you import data from a comma separated text file into a database table. Відкрити майстер, який дає змогу імпортувати дані з файлу CSV у таблицю бази даних. Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. Відкрити майстер, який дає змогу імпортувати дані з файлу CSV у таблицю бази даних. Файли CSV можна створити в більшості програм баз даних і електронних таблиць. Export a database to a .sql dump text file. Експортувати базу даних у текстовий файл .sql. This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. Ця опція дає змогу експортувати базу даних у текстовий файл .sql. Файли SQL містять всі дані, необхідні для створення бази даних у більшості движків баз даних, включно з MySQL і PostgreSQL. &Table(s) as CSV file... Таблиці у файл CSV... Export a database table as a comma separated text file. Експортувати таблицю бази даних як CSV текстовий файл. Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. Експортувати таблицю бази даних як CSV текстовий файл, готовий для імпортування в інші бази даних або програми електронних таблиць. Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database Відкрити майстер створення таблиць, де можливо визначити ім'я і поля для нової таблиці в базі даних Open the Delete Table wizard, where you can select a database table to be dropped. Відкрити майстер видалення таблиці, де можна вибрати таблицю бази даних для видалення. Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. Відкрити майстер зміни таблиці, де можливо перейменувати існуючу таблиць. Можна додати або видалити поля таблиці, так само змінювати імена полів і типи. Open the Create Index wizard, where it is possible to define a new index on an existing database table. Відкрити майстер створення Індексу, в якому можна визначити новий індекс для існуючої таблиці бази даних. &Preferences... &Налаштування... Open the preferences window. Відкрити вікно налаштувань. &DB Toolbar &Панель інструментів БД Shows or hides the Database toolbar. Показати або приховати панель інструментів БД. Shift+F1 Shift+F1 Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. &Wiki Bug &Report... Feature Re&quest... Web&site &Donate on Patreon... Sa&ve Project... This button lets you open a DB4S project file &Attach Database... Add another database file to the current database connection This button lets you add another database file to the current database connection &Set Encryption... SQLCipher &FAQ Table(&s) to JSON... Open Data&base Read Only... Save results Save the results view This button lets you save the results of the last executed query Find text in SQL editor Find text in SQL editor [Ctrl+F] This button opens the search bar of the editor Ctrl+F Find or replace text in SQL editor Find or replace text in SQL editor [Ctrl+H] This button opens the find/replace dialog for the current editor tab Export to &CSV Експортувати в &CSV Save as &view Зберегти як &вигляд Save as view Зберегти як вигляд Hide column(s) Hide selected column(s) Show all columns Show all columns that were hidden Shows or hides the Project toolbar. Extra DB Toolbar Export the filtered data to CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Save the current filter, sort column and display formats as a view This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Insert Values... Open a dialog for inserting values in a new record Insert new record using default values in browsed table New In-&Memory Database Drag && Drop Qualified Names Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Drag && Drop Enquoted Names Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor &Integrity Check Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. &Foreign-Key Check Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab &Quick Integrity Check Run a quick integrity check over the open DB Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. &Optimize Attempt to optimize the database Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Print Print text from current SQL editor tab [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Print the structure of the opened database [Ctrl+P] Open a dialog for printing the structure of the opened database &About... Про &програму... &Recently opened &Недавно відкриті Open &tab Відкрити &вкладку &Open Database Read Only... &Відкрити БД тільки для читання... Open an existing database file in read only mode Відкрити існуючий файл БД у режимі тільки для читання Unlock view editing Розблокувати редагування вигляду This unlocks the current view for editing. However, you will need appropriate triggers for editing. Це розблоковує поточний вигляд для редагування. Проте вам необхідно виділити тригери для редагування Ctrl+T Ctrl+T Database Structure Структура БД This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Browse Data Переглянути дані Refresh the data in the selected table [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. Save the table as currently displayed <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> ... ... Print currently browsed table data [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> This button deletes the record or records currently selected in the table This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Edit Pragmas Редагувати прагму Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Execute SQL Виконати SQL Edit Database Cell Редагування комірки БД SQL &Log &Журнал SQL Show S&QL submitted by По&казати SQL, який виконано &Plot &Графік This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Project Toolbar Extra DB toolbar Close the current database file &Revert Changes &Скасувати зміни &Write Changes &Записати зміни Compact &Database &Ущільнити базу даних &Database from SQL file... &База даних з файлу SQL... &Table from CSV file... &Таблиці з файлу CSV... &Database to SQL file... Базу &даних в файл SQL... &Table (s) as CSV file... &Таблиці в файл CSV... &Create Table... &Створити таблицю... &Delete Table... &Видалити таблицю... &Modify Table... &Змінити таблицю... Create &Index... Створити і&ндекс... W&hat's This? Що &це таке? &About This button opens a new tab for the SQL editor &Execute SQL Ви&конати код SQL Execute SQL [F5, Ctrl+Return] Виконати код SQL [F5, Ctrl+Return] Open SQL file Відкрити файл SQL This button opens a file containing SQL statements and loads it in a new editor tab Save SQL file Зберегти файл SQL &Load Extension... Execute current line Виконати поточний рядок Execute current line [Ctrl+E] Виконати поточний рядок [Ctrl+E] Ctrl+E Ctrl+E Export as CSV file Експортувати у файл CSV Export table as comma separated values file Експортувати таблицю як CSV файл &Wiki... В&ікі... Bug &report... &Звіт про помилку... Web &site... &Веб-сайт... Save the current session to a file Зберегти поточний стан у файл This button lets you save all the settings associated to the open DB to a DB4S project file Open &Project... Load a working session from a file Завантажити робочий стан із файлу &Set Encryption Ши&фрування Copy Create statement Копіювати CREATE вираз Copy the CREATE statement of the item to the clipboard Копіювати CREATE вираз елемента в буффер обміну Ctrl+Return Ctrl+Return Ctrl+L Ctrl+L Ctrl+P Ctrl+P Ctrl+D Ctrl+D Ctrl+I Ctrl+I Encrypted Зашифрований Read only Тільки для читання Database file is read only. Editing the database is disabled. База даних тільки для читання. Редагування заборонене. Database encoding Кодування бази даних Database is encrypted using SQLCipher База даних зашифрована з використанням SQLCipher Choose a database file Вибрати файл бази даних Could not open database file. Reason: %1 Неможливо відкрити файл бази даних. Причина: %1 Choose a filename to save under Вибрати ім'я, під яким зберегти дані Error adding record: Помилка додавання запису: Error deleting record: %1 Помилка видалення запису: %1 Please select a record first Будь ласка, спочатку оберіть запис determining row count... %1 - %2 of >= %3 %1 - %2 of %3 %1 - %2 з %3 There is no database opened. Please open or create a new database file. Немає відкритої бази даних. Відкрийте або створіть файл нової бази даних. Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. Ви точно хочете видалити %1 '%2'? Всі дані, пов'язані з %1, будуть втрачені. Error: could not delete the %1. message from database engine: %2 Помилка: неможливо видалити %1. Повідомлення з движка бази даних: %2 There is no database opened. Немає відкритої бази даних. A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. Вийшла нова версія оглядача для SQLite (%1.%2.%3).<br/><br/>Вона доступна для скачування за посиланням <a href='%4'>%4</a>. DB Browser for SQLite project file (*.sqbpro) Файл проекту оглядача для SQLite (*.sqbpro) Error executing query: %1 Помилка виконання запиту: %1 %1 rows returned in %2ms from: %3 %1 рядків повернуто за %2мс з: %3 ,%1 rows affected ,%1 рядків змінено Query executed successfully: %1 (took %2ms %3) Запит успішно виконано: %1 (тривало %2мс %3) Choose a text file Вибрати текстовий файл Text files (*.csv *.txt);;All files (*) Текстові файли (*.csv *.txt);;Всі файли (*) Import completed Імпорт завершено Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Помилка під час збереження файлу бази даних. Це означає, що не всі зміни в базу даних було збережено. Спочатку Вам потрібно розв'язати наступну помилку. Are you sure you want to undo all changes made to the database file '%1' since the last save? Скасувати всі зміни, зроблені у файлі бази даних '%1' після останнього збереження? Choose a file to import Оберіть файл для імпорту Text files (*.sql *.txt);;All files (*) Текстові файли (*.sql *.txt);;Всі файли (*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. Створити новий файл бази даних для збереження імпортованих даних? Якщо відповідь Ні, то здійсниться спроба імпортувати дані файлу SQL в поточну базу даних. File %1 already exists. Please choose a different name. Файл %1 вже існує. Оберіть інше ім'я. Error importing data: %1 Помилка імпортування даних: %1 Import completed. Імпорт завершено. Delete View Видалити перегляд Delete Trigger Видалити тригер Delete Index Видалити індекс Please enter the URL of the database file to open. Введіть URL файлу БД для його відкриття. Please enter the URL of the database file to save. Введіть URL файлу БД для його збереження. Please choose a new encoding for this table. Оберіть нову систему кодування для цієї таблиці. Please choose a new encoding for all tables. Оберіть нову систему кодування для всіх таблиць. In-Memory database Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Are you sure you want to delete the view '%1'? Are you sure you want to delete the trigger '%1'? Are you sure you want to delete the index '%1'? Error: could not delete the table. Error: could not delete the view. Error: could not delete the trigger. Error: could not delete the index. Message from database engine: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? Error checking foreign keys after table modification. The changes will be reverted. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. -- EXECUTING SELECTION IN '%1' -- -- EXECUTING LINE IN '%1' -- -- EXECUTING ALL IN '%1' -- executing query %1 rows returned in %2ms query executed successfully. Took %1ms%2 At line %1: Result: %2 Import completed. Some foreign key constraints are violated. Please fix them before saving. Extensions(*.so *.dylib *.dll);;All files(*) Choose a project file to open This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Duplicate records Ctrl+" %1 Leave the field empty for using the database encoding. %1 Залиште це поле порожнім якщо хочете, щоб використовувалося кодування за замовчуванням. This encoding is either not valid or not supported. Кодування невірне або не підтримується. Collation needed! Proceed? Потрібно виконати зіставлення! Продовжити? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Таблиця в базі даних вимагає виконання спеціальної функції зіставлення '%1'. Якщо Ви продовжите, то можливе псування Вашої бази даних. Створіть резервну копію! creating collation Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Please specify the view name Вкажіть ім'я вигляду There is already an object with that name. Please choose a different name. Об'єкт із зазначеним ім'ям уже існує. Виберіть інше ім'я. View successfully created. Вигляд успішно створений. Error creating view: %1 Помилка створення вигляду: %1 There is no filter set for this table. View will not be created. Delete Records This action will open a new SQL tab for running: Press Help for opening the corresponding SQLite reference page. Cancel Скасувати Delete Table Видалити таблицю &%1 %2 &%1 %2 Setting PRAGMA values will commit your current transaction. Are you sure? Встановлення значень PRAGMA завершить поточну транзакцію. Встановити значення? Error: could not delete the %1. Message from database engine: %2 Помилка: неможливо видалити %1. Повідомлення від движка БД: %2 Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? Execution aborted by user Виконання скасовано користувачем , %1 rows affected , %1 рядків постраждало Query executed successfully: %1 (took %2ms%3) Запит виконано успішно: %1 (тривало %2мс%3) Choose text files Оберіть текстові файли Text files(*.csv *.txt);;All files(*) Текстові файли(*.csv *.txt);;Всі файли(*) Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Помилка під час збереження файлу бази даних. Це означає, що не всі зміни в базу даних було збережено. Спочатку Вам необхідно розв'язати таку помилку. %1 Text files(*.sql *.txt);;All files(*) Текстові файли(*.sql *.txt);;Всі файли(*) Modify View Змінити вид Modify Trigger Змінити тригер Modify Index Змінити індекс Modify Table Змінити таблицю Select SQL file to open Обрати файл SQL для відкривання Couldn't read file: %1. Неможливо прочитати файл: %1. Couldn't save file: %1. Неможливо зберегти файл: %1. Select file name Обрати ім'я файлу Select extension file Обрати розширення файлу Extensions(*.so *.dll);;All files(*) Розширення(*.so *.dll);;Всі файли(*) Extension successfully loaded. Розширення успішно завантажено. Error loading extension: %1 Помилка завантаження розширення: %1 Don't show again Не показувати наступного разу New version available. Доступна нова версія. Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Будь ласка, введіть псевдо-первинний ключ для можливості редагування у цьому виді. Це має бути і'мя унікального стовпця у виді Choose a axis color Вибрати колір осей PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Всі файли(*) Choose a file to open Вибрати файл для відкривання Invalid file format. Помилковий формат файлу. NullLineEdit Set to NULL Встановити в NULL Alt+Del PlotDock Plot Графік <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> Columns Стовпці X X Y Y _ _ Axis Type Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Line type: Тип лінії: None Ні Line Звичайна StepLeft Ступенева, зліва StepRight Ступенева, справа StepCenter Ступенева, по центру Impulse Імпульс Point shape: Форма точок: Cross Хрест Plus Плюс Circle Коло Disc Диск Square Квадрат Diamond Ромб Star Зірка Triangle Трикутник TriangleInverted Трикутник перевернутий CrossSquare Хрест у квадраті PlusSquare Плюс у квадраті CrossCircle Хрест у колі PlusCircle Плюс у колі Peace Світ <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>Зберегти поточний графік...</p><p>Формат файлу вибирається розширенням (png, jpg, pdf, bmp)</p></body></html> Save current plot... Зберегти поточний графік... Load all data and redraw plot Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. Отримати всі дані. Діє, якщо не всі дані довантажено. Row # Рядок # Choose a axis color Вибрати колір осей Copy Копіювати Print... Show legend Stacked bars Date/Time Date Time Numeric Label Invalid Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Choose an axis color Choose a filename to save under Вибрати ім'я, під яким зберегти дані PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;Всі файли(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. Fetching all data... Отримання всіх даних... Cancel Відмінити PreferencesDialog Preferences Налаштування &Database &База даних Database &encoding &Кодування бази даних Open databases with foreign keys enabled. Відкривати бази даних з увімкненими зовнішніми ключами. &Foreign keys &Зовнішні ключі enabled увімкнені Default &location &Розташування за замовчуванням ... ... &General &Загальні Remember last location Запам'ятовувати останню директорію Always use this location Завжди відкривати це розташування Remember last location for session only Запам'ятовувати останню директорію тільки для сесії Lan&guage &Мова Toolbar style Only display the icon Only display the text The text appears beside the icon The text appears under the icon Follow the style Automatic &updates &Стежити за оновленнями DB file extensions Manage SQ&L to execute after opening database SQ&L,який треба виконання після відкривання бази даних Data &Browser Оглядач &даних NULL fields NULL поля &Text &Текст Remove line breaks in schema &view Видалити розрив рядка в &схемі даних Show remote options Показати віддалені опції Remote server Сервер Prefetch block si&ze Розмір блоку &вибірки Advanced Додатково SQL to execute after opening database SQL, який потрібно виконати після відкриття БД Default field type Тип даних за замовчуванням Font Шрифт &Font &Шрифт Font si&ze: Ро&змір шрифту: Content Вміст Symbol limit in cell Кількість символів у осередку Field colors Кольорове оформлення полів NULL NULL Regular Звичайні Text Текст Binary Двійкові дані Background Фон Filters Фільтри Escape character Символ екранування Delay time (&ms) Час затримки (&мс) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. Час затримки перед застосуванням нового фільтра. Нульове значення припиняє очікування. &SQL Р&едактор SQL Settings name Ім'я налаштувань context Контекст Context Контекст Colour Колір Bold Жирний Italic Курсив Underline Підкреслення Keyword Ключове слово function функція Function Функція Table Таблиця Comment Коментар Identifier Ідентифікатор String Рядок currentline поточний рядок Current line Поточна рядок SQL &editor font size Розмір шрифту в &редакторі SQL SQL &log font size Розмір шрифту в &журналі SQL Tab size Розмір табуляції SQL editor &font &Шрифт у редакторі SQL Error indicators Індикатори помилок Enabling error indicators highlights the SQL code lines that caused errors during the last execution Підсвічування в SQL коді рядків, виконання яких призвело до помилок Hori&zontal tiling Гори&зонтальний розподіл If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Якщо ця опція увімкнена, то SQL редактор і результат запиту будуть розташовані поруч по горизонталі. Code co&mpletion Авто&доповнення коду When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Font si&ze This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Row count threshold for completion Field display Displayed &text Text color Background color Preview only (N/A) Foreground SQL &results font size &Wrap lines Never At word boundaries At character boundaries At whitespace boundaries &Quotes for identifiers Choose the quoting mechanism used by the application for identifiers in SQL code. "Double quotes" - Standard SQL (recommended) `Grave accents` - Traditional MySQL quotes [Square brackets] - Traditional MS SQL Server quotes Keywords in &UPPER CASE When set, the SQL keywords are completed in UPPER CASE letters. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background &Extensions Р&озширення Select extensions to load for every database: Оберіть розширення, щоб завантажувати їх для кожної бази даних: Add extension Додати розширення Remove extension Видалити розширення <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>Оглядач для SQLite дає змогу використовувати оператор REGEXP 'з коробки'. Але попри<br/>це, можливі кілька різних варіантів реалізацій цього оператора й Ви вільні<br/>у виборі, який саме використовувати. Можна відімкнути нашу реалізацію та використовувати іншу -<br/>шляхом завантаження відповідного розширення. В цьому випадку потрібно перезавантажити програму.</p></body></html> <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Clone databases into Клонувати бази даних до <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/> algorithm but calls back the running application. DB Browser for SQLite implements this <br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/> implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>Оглядач для SQLite дозволяє використовувати оператор REGEXP 'з коробки'. Але тим<br/>не менше, можливі кілька різних варіантів реалізацій даного оператора і Ви вільні<br/>у виборі яку саме використовувати. Можна відключити нашу реалізацію і використовувати іншу -<br/>шляхом завантаження відповідного розширення. В цьому випадку потрібно перезавантажити програму.</p></body></html> Disable Regular Expression extension Відімкнути розширення Регулярних Виразів Remote Віддалений сервер CA certificates СА-сертифікати Subject CN Об'єкт CN Common Name Звичайне ім'я Subject O Об'єкт O Organization Організація Valid from Дійсний з Valid to Дійсний до Serial number Серійний номер Your certificates Ваш сертифікат File Файл Subject Common Name Звичайне ім'я об'єкта Issuer CN Розповсюдник CN Issuer Common Name Звичайне ім'я розповсюдника Choose a directory Оберіть каталог The language will change after you restart the application. Мова зміниться після перезапуску програми. Select extension file Обираємо файл розширення Extensions(*.so *.dll);;All files(*) Розширення(*.so *.dll);;Всі файли(*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file Імпортувати файл сертифіката No certificates found in this file. Для цього файлу не знайдено сертифікатів. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Ви впевнені, що хочете видалити цей сертифікат? Всі дані сертифіката видаляться з налаштувань програми! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. QObject Error importing data Помилка імпортування даних from record number %1 з запису номер %1 Error importing data Помилка імпортування даних from record number %1 з запису номер %1 . %1 . %1 Importing CSV file... Cancel Скасувати Decoding CSV file... Розшифровка CSV файлу... Collation needed! Proceed? Потрібно виконати зіставлення! Продовжити? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! Таблиця в базі даних вимагає виконання спеціальної функції зіставлення '%1'. Якщо Ви продовжите, то можливе псування Вашої бази даних. Створіть резервну копію! SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) Файли SQLite баз даних (*.db *.sqlite *.sqlite3 *.db3);;Всі файли (*) All files (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 Помилка під час під'єднання до %1. %2 Error opening remote file at %1. %2 Помилка під час відкривання віддаленого файлу %1. %2 Error: Invalid client certificate specified. Помилка: Вказано неправильний сертифікат клієнта. Please enter the passphrase for this client certificate in order to authenticate. Будь ласка, введіть парольну фразу для цього сертифіката клієнта, для автентифікації Cancel Скасувати Uploading remote database to %1 Вивантаження віддаленої бази даних до %1. {1?} Downloading remote database from %1 Завантаження віддаленої бази даних із %1. {1?} The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. Uploading remote database to %1. Вивантаження віддаленої бази даних до %1. Downloading remote database from %1. Завантаження віддаленої бази даних із %1. Error: The network is not accessible. Помилка: Мережа не доступна. Error: Cannot open the file for sending. Помилка: Неможливо відкрити файл для відправлення. Error opening local databases list. %1 Помилка відкривання списку локальних баз даних. %1 Error creating local databases list. %1 Помилка створення списку локальних баз даних. %1 RemoteDock Remote Віддалений B&rowse В&ідкрити Local Локальний Identity Ідентичний Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Go Перейти Push currently opened database to server <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> RemoteModel Name Ім'я Version Версія Last modified Востаннє змінений Size Розмір Commit bytes байтів RemotePushDialog Push database Database na&me to push to Commit message <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Public Branch Force push Database will be public. Everyone has read access to it. Database will be private. Only you have access to it. Use with care. This can cause remote commits to be deleted. Unspecified SqlExecutionArea Form Форма Find previous match [Shift+F3] Find previous match with mapping Shift+F3 Shift+F3 The found pattern must be a whole word Whole Words Text pattern to find considering the checks in this frame Find in editor The found pattern must match in letter case Case Sensitive Find next match [Enter, F3] Find next match with wrapping F3 F3 Interpret search pattern as a regular expression <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Regular Expression Close Find Bar <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements Результати останніх виконаних операторів This field shows the results and status codes of the last executed statements. Це поле показує результати та коди статусів останніх виконаних операторів. Export to &CSV Експортувати в &CSV Save as &view Зберегти як &вигляд Save as view Зберегти як вигляд Please specify the view name Вкажіть ім'я вигляду There is already an object with that name. Please choose a different name. Об'єкт із зазначеним ім'ям уже існує. Виберіть інше ім'я. View successfully created. Вигляд успішно створений. Error creating view: %1 Помилка створення вигляду: %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. (X) Функція abs(X) повертає модуль числа аргументу X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. () Функція changes() повертає кількість рядків у базі даних, які було змінено, вставлено або видалено після вдалого виконання INSERT, DELETE або UPDATE. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1,X2,...) Функція char(X1,X2,...,XN) повертає рядок складений із символів, переданих в якості аргументів. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y,...) Функція coalesce() повертає копію першого аргументу не-NULL, якщо такого немає, то повертає NULL (X,Y) The glob (X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) Функція glob (X,Y) еквівалентна виразу "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) Функція ifnull() повертає копію першого аргументу не-NULL, або якщо обидва аргумента NULL, то повертає NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X,Y) Функція instr(X,Y) повертає кількість символів, починаючи з якого в рядку X знайдено підрядок Y, або 0, якщо такого не знайдено. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. (X) Функція hex() інтерпретує аргумент як BLOB і повертає рядок в 16-ричній системі числення із вмістом аргументу. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. () Функція last_insert_rowid() повертає ROWID останнього вставленого рядка. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X) Для строкового значення X, функція length(X) повертає кількість символів (НЕ байтів) від початку рядка до першого символу '\0'. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y) фукнція like() еквівалентна виразу "Y LIKE X". (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X,Y,Z) Функція like() еквівалент вираження "Y LIKE X ESCAPE Z". (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. (X) Функція load_extension(X) завантажує розширення SQLite з файлу бібліотеки динамічного компонування X. (X,Y) The load_extension(X,Y) function loads SQLite extensions out of the shared library file named X using the entry point Y. (X,Y) Функція load_extension (X,Y) завантажує розширення SQLite з файлу бібліотеки динамічного компонування X, використовуючи точку входу Y. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) Функція lower(X) повертає копію рядка X, в якій усі ACSII символи переведені в нижній регістр. (X) ltrim(X) removes spaces from the left side of X. (X) ltrim(X) видаляє символи пробілів зліва для рядка X. (X,Y) The ltrim (X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y) Функція ltrim (X,Y) повертає новий рядок шляхом видалення з рядка X зліва будь-якого символу з Y. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X1,X2,...) Функція char(X1,X2,...,XN) повертає рядок, складений із символів, переданих як аргументи. (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) функція glob(X,Y) еквівалент вираження "Y GLOB X". (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. (X,Y) функція load_extension(X) завантажує розширення SQLite з файлу бібліотеки динамічного компонування X використовуючи точку входу Y. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y) Функція ltrim (X,Y) повертає новий рядок шляхом видалення з рядка X зліва будь-якого символу з Y. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) Функція max() повертає аргумент з максимальним значенням, або NULL, якщо хоча б один аргумент дорівнює NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y,...) Функція min() повертає аргумент з мінімальним значенням. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (X,Y) Функція nullif(X,Y) повертає перший аргумент, якщо аргументи різні, або NULL, якщо вони однакові. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (FORMAT,...) Функція printf(FORMAT,...) працює так само, як printf() зі стандартної бібліотеки мови програмування Сі. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. (X) Функція quote(X) повертає змінений рядок X, який можна використовувати в SQL виразах. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. () Функція random() повертає псевдовипадкове цілочисельне значення з діапозона від -9223372036854775808 до +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (N) Функція randomblob(N) повертає N-байтний BLOB, що містить псевдовипадкові байти. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X,Y,Z) Функція replace(X,Y,Z) повертає новий рядок на основі рядка X, заміною всіх підрядків Y на Z. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X) Функція round(X) округлює X до цілого значення. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X,Y) Функція round(X,Y) округлює X до Y чисел після коми праворуч. (X) rtrim(X) removes spaces from the right side of X. (X) rtrim(X) видаляє символи пробілу праворуч від рядка X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X,Y) Функція rtrim(X,Y) повертає новий рядок шляхом видалення з рядка X праворуч будь-якого символу з рядка Y. (timestring,modifier,modifier,...) (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. (X,Y) The rtrim (X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X,Y) Функція rtrim(X,Y) повертає новий рядок шляхом видалення з рядка X праворуч будь-якого символу з рядка Y. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X) Функція soundex(X) повертає копію рядка X, кодовану в форматі soundex. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y) substr(X,Y) повертає підрядок з рядка X, починаючи з Y-го символу. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. (X,Y,Z) Функція substr(X,Y,Z) повертає підрядок з рядка X, починаючи з Y-го символу, завдовжки Z-символів. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. () Функція total_changes() повертає кількість рядків, змінених за допомогою INSERT, UPDATE або DELETE, починаючи з того моменту, коли під'єднання до бази даних було відкрито. (X) trim(X) removes spaces from both ends of X. (X) trim(X) видаляє пробіли з обох сторін рядка X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X,Y) Функція trim(X,Y) створює новий рядок з X шляхом видалення з обох кінців символів, які присутні в рядку Y. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) Функція typeof(X) повертає рядок із типом даних вираження X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) Функція unicode(X) повертає числове значення UNICODE коду символу. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (X) Функція upper(X) повертає копію рядка X, в якій для кожного ASCII символу регістр буде перетворений з нижнього у верхній. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (N) Функція zeroblob(N) повертає BLOB розміром N байт зі значеннями 0x00. (X) The avg() function returns the average value of all non-NULL X within a group. (X) Функція avg() повертає середнє значення для всіх не-NULL значень групи. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) Функція count(X) повертає кількість рядків, у яких X не-NULL у групі. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X) Функція group_concat() повертає рядок з усіх значень X не-NULL. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X,Y) Функція group_concat() повертає рядок з усіх значень X не-NULL. Y - роздільник між значеннями X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) Агрегатна функція max() повертає максимальне значення для X. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) Агрегатна функція min() повертає мінімальне не-NULL значення для X. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. (X) Агрегатні функції sum() і total() повертають суму всіх не-NULL значень для X. SqliteTableModel References %1 (%2) Hold Ctrl+Shift and click to jump there Налаштування %1 (%2) Натисніть Ctrl+Shift і клік щоб переміститися туди References %1(%2) Hold Ctrl+Shift and click to jump there Налаштування %1(%2) Затисніть Ctrl+Shift і клік, щоб переміститися туди reading rows loading... References %1(%2) Hold %3Shift and click to jump there Error changing data: %1 Помилка зміни даних: %1 retrieving list of columns Fetching data... Cancel VacuumDialog Compact Database Ущільнення БД Ущільнення бази даних Warning: Compacting the database will commit all of your changes. Please select the databases to co&mpact: Warning: Compacting the database will commit all changes you made. Попередження: Ущільнення бази даних зафіксує всі зміни, які було зроблено. Please select the objects to compact: Виберіть об'єкти для ущільнення: sqlitebrowser-3.11.2/src/translations/sqlb_zh.ts000066400000000000000000011155271345112435200220410ustar00rootroot00000000000000 AboutDialog About DB Browser for SQLite 关于 DB Browser for SQLite Version 版本 <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite 是一个开源的免费可视化工具,用于创建、设计和编辑 SQLite 数据库文件。</p><p>它以第 2 版 Mozilla 公共许可,以及第 3 版及之后版本的 GNU 通用许可方式授权。你可以在遵循这些许可的条件下修改或重新发布它。</p><p>参阅 <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>DB Browser for SQLite 是一个开源的免费可视化工具,用于创建、设计和编辑 SQLite 数据库文件。</p><p>它是以第 2 版 Mozilla 公共许可,以及第 3 版及之后版本的 GNU 通用许可方式授权。你可以在遵循这些许可的条件下修改或重新发布它。</p><p>参阅 <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> 和 <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> 了解细节。</p><p>要获得本程序的更多信息,请访问我们的网站: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">这个软件使用了 GPL/LGPL Qt Toolkit: </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>参阅 </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> 了解许可条款和信息。</span></p><p><span style=" font-size:small;">它还是用了由 Mark James 提供的 Silk 图标集,以第 2.5 和 3.0 版知识共享署名(CCA)许可方式授权。<br/>参阅 </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> 了解细节。</span></p></body></html> (based on SQLite %1) (基于 SQLite %1) Version 版本 Built for Qt Version Qt 版本 SQLCipher Version SQLCipher 版本 SQLite Version SQLite 版本 AddRecordDialog Add New Record 新增记录 Enter values for the new record considering constraints. Fields in bold are mandatory. 为新增的记录填写满足约束的值。加粗的字段必须填写。 In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. 在值列,你可以选择给对应名字列的值。类型列显示了字段的类型。默认值的显示样式和 NULL 值一样。 Name 名称 Type 类型 Value Values to insert. Pre-filled default values are inserted automatically unless they are changed. 要插入的值。如果没有修改,就会插入事先填好的默认值。 When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. 当你在上面编辑值时,这里会显示插入新记录所用的 SQL 语句。你可以在保存前手动修改这些语句。 <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> <html><head/><body><p><span style=" font-weight:600;">保存</span> 将会把显示的 SQL 语句提交到数据库以插入新记录。</p><p><span style=" font-weight:600;">恢复默认</span> 将会把 <span style=" font-weight:600;">值</span> 恢复成默认值。</p><p><span style=" font-weight:600;">取消</span> 将会关闭此界面,不执行 SQL 语句。</p></body></html> Auto-increment 自增 Unique constraint 唯一约束 Check constraint: %1 检查约束: %1 Foreign key: %1 外键: %1 Default value: %1 默认值: %1 Error adding record. Message from database engine: %1 添加记录失败。来自数据库引擎的消息: %1 Are you sure you want to restore all the entered values to their defaults? 你确定要把输入的所有值都恢复成默认值吗? Application Usage: %1 [options] [db] 用法: %1 [选项] [数据库] Possible command line arguments: 可用命令行参数: -h, --help Show command line options -h, --help 显示命令行选项 -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [文件] 在打开数据库后执行此 SQL 文件 -t, --table [table] Browse this table after opening the DB -t, --table [表] 在打开数据库后浏览此表 -o, --option [group/setting=value] Run application with this setting temporarily set to value This is DB Browser for SQLite version %1. 这是 DB Browser for SQLite 版本 %1%2. {1.?} -q, --quit Exit application after running scripts -q, --quit 在运行脚本后退出应用程序 -R, --read-only Open database in read-only mode -R, --read-only 用只读模式打开数据库 -v, --version Display the current version -v, --version 显示当前版本 [file] Open this SQLite database [文件] 打开这个 SQLite 数据库 This is DB Browser for SQLite version %1%2. 这是 DB Browser for SQLite 版本 %1%2. The -s/--sql option requires an argument -s/--sql 选项需要一个参数 The file %1 does not exist 文件 %1 不存在 The -t/--table option requires an argument -t/--table 选项需要一个参数 The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 无效选项/不存在的文件: %1 CipherDialog SQLCipher encryption SQLCipher 加密 &Password 密码(&P) &Reenter password 确认密码(&R) Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze 页大小(&z) &KDF iterations HMAC algorithm KDF algorithm Passphrase 口令 Raw key Page &size 页大小(&S) Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. 请设置密码以加密数据库。 注意如果修改了任何其他选项设置,以及每次打开数据库时,您都需要重新输入此密码。 不填密码表示禁用加密。 加密过程将花费一些时间,您应该在加密之前备份数据库!修改加密前,未保存的更改将会被应用。 Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. 请输入加密数据库的密码。 如果此数据库的任何其他设置发生变化,您也需要提供此信息。 ColumnDisplayFormatDialog Choose display format 选择显示格式 Display format 显示格式 Choose a display format for the column '%1' which is applied to each value prior to showing it. 为列 '%1' 选择显示格式,将在显示之前应用到值。 Default 默认 Decimal number 十进制数 Exponent notation 指数 Hex blob 十六进制大型对象 Hex number 十六进制数 Apple NSDate to date 苹果 NSDate 到日期 Java epoch (milliseconds) to date Java 时间戳(毫秒)到日期 Julian day to date 儒略日 (Julian day) 到日期 Unix epoch to local time Unix 时间戳到本地时间 Date as dd/mm/yyyy 日期,格式为 dd/mm/yyyy Lower case 小写 Octal number 八进制数 Round number 取整数 Unix epoch to date Unix 时间到日期 Upper case 大写 Windows DATE to date Windows 日期到日期 Custom 自定义 DBBrowserDB Please specify the database name under which you want to access the attached database 请指明想要附加的数据库名 Invalid file format 无效的文件格式 Do you want to save the changes made to the database file %1? 您是否想保存对数据库文件 %1 做出的更改? Exporting database to SQL file... 正在导出数据库到 SQL 文件... Cancel 取消 Executing SQL... 正在执行 SQL... Action cancelled. 操作已取消。 Error in statement #%1: %2. Aborting execution. 错误在语句 #%1: %2。 正在放弃执行。 renameColumn: cannot find table %1. 重命名列: 不能查找表 %1。 This database has already been attached. Its schema name is '%1'. 此数据库已被附加。它的架构名是 '%1'. Do you really want to close this temporary database? All data will be lost. 你确定要关闭此临时数据库吗?所有数据都会丢失。 The database is currently busy: 数据库正忙: Do you want to abort that other operation? 确定要放弃操作吗? No database file opened 没有打开数据库文件 Error in statement #%1: %2. Aborting execution%3. 错误在语句 #%1: %2. 正在放弃执行%3. and rolling back 并回滚 didn't receive any output from %1 could not execute command: %1 Cannot delete this object 无法删除此对象 Cannot set data on this object 不能为此数据设置对象 A table with the name '%1' already exists in schema '%2'. 一个与 '%1' 同名的表已经存在于架构 '%2' 中。 renameColumn: cannot find column %1. 重命名列: 不能查找列 %1。 renameColumn: creating savepoint failed. DB says: %1 重命名列: 创建保存点时失败。DB 说: %1 renameColumn: creating new table failed. DB says: %1 重命名列: 创建新表时失败。DB 说: %1 renameColumn: copying data to new table failed. DB says: %1 重命名列: 复制数据到新表时失败。DB 说: %1 renameColumn: deleting old table failed. DB says: %1 重命名列: 删除旧表失败。DB 说: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: 还原某些和这个表关联的对象失败。这个最可能是因为某些列的名称更改了。这里是您可能需要手动修复和执行的 SQL 语句: renameColumn: releasing savepoint failed. DB says: %1 重命名列: 释放保存点时失败。DB 说: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 重命名表 '%1' 为 '%2' 时失败。来自数据库引擎的消息: %3 ... <string can not be logged, contains binary data> ... ... <字符串不能记录,包含二进制数据> ... could not get list of databases: %1 无法获取数据库列表: %1 Error loading extension: %1 加载扩展时出错: %1 could not get column information 无法获取列信息 unknown object type %1 未知对象类型 %1 could not get list of db objects: %1, %2 不能获取数据库对象的列表: %1, %2 could not get types 不能获取类型 didn't receive any output from pragma %1 没有接收到来自杂注 %1 的任何输出 could not execute pragma command: %1, %2 不能执行杂注命令: %1, %2 Error setting pragma %1 to %2: %3 设置杂注 %1 为 %2 时出错: %3 File not found. 文件找不到。 DbStructureModel Name 名称 Object 对象 Type 类型 Schema 架构 Browsables (%1) 可浏览的 (%1) Database 数据库 Browsables 可浏览的 All 所有 Temporary 临时的 Tables (%1) 表 (%1) Indices (%1) 索引 (%1) Views (%1) 视图 (%1) Triggers (%1) 触发器 (%1) EditDialog Edit database cell 编辑数据库单元格 Mode: 模式: Image 图像 Import text 导入文本 Opens a file dialog used to import text to this database cell. 打开一个文件对话框用于导入文本到这个数据库单元格。 &Import 导入(&I) Export text 导出文本 Opens a file dialog used to export the contents of this database cell to a text file. 打开一个文件对话框用于导出这个数据库单元格的内容到一个文本文件。 &Export 导出(&E) Set this cell to NULL 设置此单元格为空 Set as &NULL 设为&空 Apply data to cell [Ctrl+Return] 将数据应用到单元格 [Ctrl+Return] This button saves the changes performed in the cell editor to the database cell. 此按钮把单元格编辑器中的修改应用到数据库单元格中。 Apply 应用 Text 文本 This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. 这是单元格编辑器支持的模式列表。选择一种模式以查看或编辑当前单元格的数据。 Binary 二进制 JSON XML Automatically adjust the editor mode to the loaded data type 自动调整编辑器模式为加载的数据的类型 This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. 此复选按钮可启用或禁用编辑器模式的自动切换。当新单元格被选中或新数据被导入时,如果启用了自动切换,模式会调整为检测到的数据类型。之后你也手动切换编辑器的模式。如果你希望浏览各单元格的时候都保持手动选择的模式,请把此按钮切到关闭状态。 Auto-switch 自动切换 Auto-format: pretty print on loading, compact on saving. 自动格式: 读取时格式化,存储时紧凑化。 When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. 当启用时,自动格式特性将在数据加载时格式化数据,增加换行并缩进以提高可读性。在保存数据时,自动格式特性会通过删除换行、不必要的空白字符的方式来紧凑化数据。 Autoformat 自动格式 Import from file 从文件导入 Opens a file dialog used to import any kind of data to this database cell. 打开文件选择对话框,导入任何类型的数据到此数据库单元格。 Export to file 导出到文件 Opens a file dialog used to export the contents of this database cell to a file. 打开文件选择对话框,导出此数据库单元格的内容到一个文件里。 Erases the contents of the cell 删除单元格的内容 This area displays information about the data present in this database cell 这个区域显示存在于这个数据库单元格中的数据的相关信息 This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. 此编辑器模式允许你在有语法高亮的情况下编辑 JSON 或 XML 数据,并在保存前自动格式化与验证。 错误会用红色波浪下划线标出。 Type of data currently in cell 当前在单元格中的数据的类型 Size of data currently in table 当前在表中的数据的大小 Print... 打印... Open preview dialog for printing displayed image 打开打印预览对话框,预览图像 Ctrl+P Ctrl+P Open preview dialog for printing displayed text 打开打印预览对话框,预览文本 Copy Hex and ASCII 拷贝十六进制和 ASCII Copy selected hexadecimal and ASCII columns to the clipboard 拷贝选中的十六进制和 ASCII 列到剪贴板中 Ctrl+Shift+C Choose a file 选择一个文件 Text files(*.txt);;Image files(%1);;All files(*) 文本文件(*.txt);;图像文件(%1);;所有文件(*) Choose a filename to export data 选择一个导出数据的文件名 Text files(*.txt);;All files(*) 文本文件(*.txt);;所有文件(*) Image data can't be viewed with the text editor 图像数据不能用文本编辑器查看 Binary data can't be viewed with the text editor 二进制数据不能用文本编辑器查看 Type of data currently in cell: %1 Image 当前在单元格中的数据的类型: %1 图像 %1x%2 pixel(s) %1x%2 像素 Type of data currently in cell: NULL 当前在单元格中的数据的类型: 空 Type of data currently in cell: Text / Numeric 当前在单元格中的数据的类型: 文本/ 数值 Image data can't be viewed in this mode. 此模式下无法查看图像数据。 Try switching to Image or Binary mode. 尝试切换到图像或二进制模式。 Binary data can't be viewed in this mode. 此模式下无法查看二进制数据。 Try switching to Binary mode. 尝试切换到二进制模式。 Text files (*.txt) 文本文件 (*.txt) JSON files (*.json) JSON 文件 (*.json) XML files (*.xml) XML 文件 (*.xml) Image files (%1) 图像文件 (%1) Binary files (*.bin) 二进制文件 (*.bin) All files (*) 所有文件 (*) Choose a file to import 选择一个要导入的文件 %1 Image %1 图像 SVG files (*.svg) SVG 文件 (*.svg) Hex dump files (*.txt) 十六进制转储文件 (*.txt) Invalid data for this mode 数据对此模式非法 The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? 单元格中包含非法的 %1 数据。原因: %2. 你确实想把它应用到单元格中吗? %n char(s) %n 个字符 Type of data currently in cell: Valid JSON 单元格中当前的数据: 合法的 JSON Type of data currently in cell: Binary 当前在单元格中的数据的类型: Binary 二进制 %n byte(s) %n 字节 EditIndexDialog Create New Index 创建新索引 &Name 名称(&N) &Columns 列(&C) Column Use in Index 在索引中使用 Order 顺序 &Table 表(&T) Edit Index Schema 编辑索引架构 &Unique 唯一(&U) For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed 为了将索引范围限制到表中的一部分,您可以在此指定 WHERE 子句来在表中选择需要索引的部分 Partial inde&x clause 部分索引子句(&x) Colu&mns 列(&m) Table column 表中的列 Type 类型 Add a new expression column to the index. Expression columns contain SQL expression rather than column names. 向索引中添加一个新的表达式列。表达式列包含 SQL 表达式而不是列名。 Index column 索引列 Deleting the old index failed: %1 删除旧索引失败: %1 Creating the index failed: %1 创建索引时失败: %1 EditTableDialog Edit table definition 编辑表定义 Table Advanced 高级 Database schema 数据库架构 Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. 让表'没有 rowid'。设置此标志需要有一个 INTEGER 类型并被设为主键、非自增的字段。 Without Rowid 无 Rowid Set this to create a temporary table that is deleted when closing the database. 设置以创建一个临时表,临时表在关闭数据库时会被删除。 Temporary table 临时表 Fields 字段 Add field 添加字段 Remove field 删除字段 Move field up 上移字段 Move field down 下移字段 Name 名称 Type 类型 NN Not null 非空 PK PK Primary key 主键 AI AI Autoincrement 自动增值 U U Unique 唯一 Default 默认 Default value 默认值 Check 检查 Check constraint 检查约束条件 Foreign Key 外键 <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">警告: </span>表中有一些无法解析的定义。编辑并保存表可能会带来问题。</p></body></html> Error creating table. Message from database engine: %1 创建表时出错。来自数据库引擎的消息: %1 There already is a field with that name. Please rename it first or choose a different name for this field. 已存在同名字段。请先重命名已有字段,或为此字段选一个不同的名字。 This column is referenced in a foreign key in table %1, column %2 and thus its name cannot be changed. 此列是表 %1, 列 %2 的外键,因此它的名字不能改变。 This column is referenced in a foreign key in table %1 and thus its name cannot be changed. 此列是表 %1 的外键,因此它的名字不能改变。 There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. 至少有一行带本字段的记录被设为空。这使得它不可能设置这个标志。请首先更改表数据。 There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. 在这个字段中至少有一行带有一个非整数的值。这使得它不可能设置自增标志。请首先更改表数据。 Column '%1' has no unique data. 列 '%1' 中存在不唯一的数据。 This makes it impossible to set this flag. Please change the table data first. 这导致无法设置此标志。请先修改表中数据。 Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Modifying this column failed. Error returned from database: %1 修改此列失败。数据库返回的错误: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. 您是否确认您想删除字段 '%1'? 当前存储在这个字段中的所有数据将会丢失。 Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled 在设置为无 rowid 前,请先添加一个满足以下准则的字段: - 设置为主键 - 禁止自增 Setting the rowid column for the table failed. Error message: %1 设置表的 rowid 列失败。错误信息: %1 Changing the table schema failed. Error message: %1 修改表格架构失败。错误信息: %1 Setting the temporary flag for the table failed. Error message: %1 将表标记为临时时失败。错误信息: %1 ExportDataDialog Export data as CSV 导出数据为 CSV &Table(s) 表(&T) &Column names in first line 列名在首行(&C) Field &separator 字段分隔符(&S) Tab&le(s) 表(&l) Colu&mn names in first line 第一行列名(&m) Fie&ld separator 字段分隔符(&l) , , ; ; Tab Tab | | Other 其它 &Quote character 引号(&Q) " " ' ' New line characters 换行符 Windows: CR+LF (\r\n) Windows: 回车+换行 (\r\n) Unix: LF (\n) Unix: 换行 (\n) Pretty print 美化输出 Could not open output file: %1 打不开输出文件: %1 Choose a filename to export data 选择导出数据的文件名 Text files(*.csv *.txt) 文本文件(*.csv *.txt) Export data as JSON 导出为 JSON exporting CSV 导出 CSV exporting JSON 导出 JSON Text files(*.json *.js *.txt) 文本文件(*.json *.js *.txt) Please select at least 1 table. 请至少选1个表 Choose a directory 选择一个目录 Export completed. 导出完成。 ExportSqlDialog Export SQL... 导出 SQL... Tab&le(s) 表(&L) Select All 全选 Deselect All 全不选 &Options 选项(&O) Keep column names in INSERT INTO 在 INSERT INTO 语句中保留列名 Multiple rows (VALUES) per INSERT statement 每条 INSERT 语句中包含多行 (VALUES) Export everything 导出所有 Export schema only 仅导出架构 Export data only 仅导出数据 Keep old schema (CREATE TABLE IF NOT EXISTS) 保持旧架构 (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) 覆盖旧架构 (DROP TABLE, 然后 CREATE TABLE) Please select at least 1 table. 请至少选1个表 Please select at least one table. 请至少选一个表。 Choose a filename to export 选择要导出的文件名 Text files(*.sql *.txt) 文本文件(*.sql *.txt) Export completed. 导出完成。 Export cancelled or failed. 导出被取消或失败。 ExtendedScintilla Ctrl+H Ctrl+P Ctrl+P Find and Replace... 查找并替换... Print... 打印... ExtendedTableWidget The content of clipboard is bigger than the range selected. Do you want to insert it anyway? 剪贴板中的内容比所选范围更大。 您是否依然要插入? Use as Exact Filter 用于精确过滤 Containing 包含 Not equal to 不等于 Greater than 大于 Less than 小于 Greater or equal 大于等于 Less or equal 小于等于 Between this and... 在此值和...之间 Set to NULL 设置为 NULL Copy 复制 Copy with Headers 带表头一起拷贝 Copy as SQL 拷贝为 SQL Paste 粘贴 Print... 打印... Use in Filter Expression 在过滤器表达式中使用 Alt+Del Ctrl+Shift+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? 剪贴板中的数据范围超过了选择的范围。 是否仍要插入? FileDialog SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite 数据库文件 (*.db *.sqlite *.sqlite3 *.db3);;所有文件 (*) FileExtensionManager File Extension Manager 文件扩展名管理器 &Up 上(&U) &Down 下(&D) &Add 添加(&A) &Remove 删除(&R) Description 描述 Extensions 扩展名 *.extension FilterLineEdit Filter 过滤 These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y 这些输入框能让你快速在当前所选表中进行过滤。 默认情况下,包含输入文本的行会被过滤出来。 以下操作也支持: % 通配符 > 大于 < 小于 >= 大于等于 <= 小于等于 = 等于: 精确匹配 <> 不等于: 精确反向匹配 x~y 范围: 值在 x 和 y 之间 Set Filter Expression 设置过滤表达式 What's This? 这是什么? Is NULL 为 NULL Is not NULL 非 NULL Is empty 为空 Is not empty 非空 Equal to... 等于... Not equal to... 不等于... Greater than... 大于... Less than... 小于... Greater or equal... 大于等于... Less or equal... 小于等于... In range... 在范围内... FindReplaceDialog Find and Replace 查找并替换 Fi&nd text: 查找文本(&N): Re&place with: 替换为(&{): Match &exact case 精确匹配(&E) Match &only whole words 全词匹配(&O) When enabled, the search continues from the other end when it reaches one end of the page 启用时,搜索到页结尾时,搜索会继续从另一边开始。 &Wrap around 循环查找(&W) When set, the search goes backwards from cursor position, otherwise it goes forward 设置时,搜索从当前位置往回进行。否则向前搜索。 Search &backwards 反向查找(&B) <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>选中时,要查找的模式被解释为 UNIX 正则表达式。参阅 <a href="https://en.wikibooks.org/wiki/Regular_Expressions"> Wikibooks 中的正则表达式</a>.</p></body></html> Use regular e&xpressions 使用正则表达式(&X) Find the next occurrence from the cursor position and in the direction set by "Search backwards" 从当前位置查找下一出现的位置,按 "反向查找" 处所选的方向进行查找。 &Find Next 查找下一个(&F) &Replace 替换(&R) Highlight all the occurrences of the text in the page 高亮本页中所有出现的文本 F&ind All 全部高亮(&I) Replace all the occurrences of the text in the page 替换本页中所有出现的文本 Replace &All 全部替换(&A) The searched text was not found 无法找到要搜索的文本 The searched text was not found. 无法找到要搜索的文本。 The searched text was found one time. 搜索的文本找到了一次。 The searched text was found %1 times. 搜索的文本找到了 %1 次。 The searched text was replaced one time. 搜索的文本被替换了一次。 The searched text was replaced %1 times. 搜索的文本被替换了 %1 次。 ForeignKeyEditor &Reset 重置(&R) Foreign key clauses (ON UPDATE, ON DELETE etc.) 外键子句 (ON UPDATE, ON DELETE 等等) ImportCsvDialog Import CSV file 导入 CSV 文件 &Table name 表名称(&T) Table na&me 表名称(&M) &Column names in first line 列名在首行(&C) Field &separator 字段分隔符(&S) , , ; ; Tab Tab | ; Other 其它 &Quote character 引号(&Q) " " ' ' &Encoding 编码(&E) UTF-8 UTF-8 UTF-16 UTF-16 ISO-8859-1 ISO-8859-1 Trim fields? 删除字段头尾空白? Separate tables 分离表 Advanced 高级 When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. 当从 CSV 文件导入空值到已有表中,并且该列有默认值时,默认值会被插入。选中此项以在这种情况下插入空值。 Ignore default &values 忽略默认值(&V) Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. 选中此项以在往没有默认值的非 NULL 列导入空值时终止导入。 Fail on missing values 缺值时失败 Disable data type detection 禁用类型检测 Disable the automatic data type detection when creating a new table. 禁止在创建新表时自动检测数据类型。 Deselect All 全不选 Match Similar 匹配相似 Select All 全选 Inserting data... 正在插入数据... Cancel 取消 There is already a table of that name and an import into an existing table is only possible if the number of columns match. 已有同名的表,并且导入只有在列数匹配的情况下才能导入到一个现有的表。 There is already a table of that name. Do you want to import the data into it? 已有同名的表。您是否想导入数据到其中? Import completed 导入完成 There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. 已经有一张叫做 '%1' 的表。只有列数匹配时,才能导入到已经存在的表中。 There is already a table named '%1'. Do you want to import the data into it? 已经有一张叫做 '%1' 的表。你想把数据导入到此表中吗? Creating restore point failed: %1 创建还原点失败: %1 Creating the table failed: %1 创建表失败: %1 importing CSV 导入 CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. 导入文件 '%1' 用时 %2ms. 其中 %3ms 用在行方程上。 Missing field for record %1 记录 %1 缺字段 Inserting row failed: %1 插入行失败: %1 MainWindow DB Browser for SQLite DB Browser for SQLite toolBar1 Table: 表: Select a table to browse data 选择一个表以浏览数据 Use this list to select a table to be displayed in the database view 使用这个列表选择一个要显示在数据库视图中的表 Refresh the data in the selected table. 刷新选择的表中的数据。 This button refreshes the data in the currently selected table. 这个按钮刷新在当前选择的表中的数据。 &Wiki Bug &Report... Bug 上报(&R)... Feature Re&quest... 特性请求(&Q)... Web&site 网站(&S) &Donate on Patreon... 在 Patreon 上捐赠(&D)... Sa&ve Project... 保存工程(&V)... This button lets you save all the settings associated to the open DB to a DB4S project file 此按钮能保存与打开的数据库有关的所有设置到一个 DB4S 工程文件中 Open &Project... 打开工程(&P)... This button lets you open a DB4S project file 此按钮能打开 DB4S 工程文件 &Attach Database... 附加数据库(&A)... Add another database file to the current database connection 添加另一个数据库到当前的数据库连接中 This button lets you add another database file to the current database connection 此按钮能添加另一个数据库到当前的数据库连接中 &Set Encryption... 设置加密(&S)... This button saves the content of the current SQL editor tab to a file 此按钮把当前 SQL 编辑器页的内容保存到一个文件 SQLCipher &FAQ SQLCipher 常见问题(&F)... Table(&s) to JSON... 表到 JSON (&S)... Export one or more table(s) to a JSON file 导出一个或多个表到 JSON 文件 Refresh 刷新 F5 F5 Insert a new record in the current table 在当前表中插入一条新记录 This button creates a new, empty record in the database 这个按钮在数据库中创建一条新的空白记录 New Record 新建记录 Delete the current record 删除当前记录 This button deletes the record currently selected in the database 这个按钮删除在数据库中当前选择的记录 Delete Record 删除记录 This is the database view. You can double-click any record to edit its contents in the cell editor window. 这是数据库视图。您可以双击任何记录,在单元格编辑器窗口中编辑记录内容。 < < 0 - 0 of 0 0 - 0 / 0 > > Scroll 100 records upwards 上滚 100 条记录 &Table: 表(&T): Clear all filters 清除所有过滤 <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>滚动到开始</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> <html><head/><body><p>点击这个按钮在上面的表视图中导航到最前。</p></body></html> |< |< <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>点击这个按钮在上面的表视图中向上导航 100 条记录。</p></body></html> <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>下滚 100 条记录</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>点击这个按钮在上面的表视图中向下导航 100 条记录。</p></body></html> Scroll to the end 滚动到结束 <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;点击这个按钮在上面的表视图中导航到最后。&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>点击这里跳到指定的记录</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>这个按钮用于导航到在“转到”区域中指定的记录号。</p></body></html> Go to: 转到: Enter record number to browse 输入要浏览的记录号 Type a record number in this area and click the Go to: button to display the record in the database view 在这个区域中输入一个记录号,并点击“转到:”按钮以在数据库视图中显示记录 1 1 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">自动真空</span></a></p></body></html> None Full 完整 Incremental 增加 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">自动化索引</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">检查点完全 FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">外键</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">完全 FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">忽略检查约束</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">日志模式</span></a></p></body></html> Delete 删除 Truncate 裁截 Persist 永久 Memory 内存 WAL WAL Off <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">日志大小限制</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">锁定模式</span></a></p></body></html> Normal 正常 Exclusive 独占 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">最大页数</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">页面大小</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">递归触发器</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">安全删除</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">同步</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">临时存储</span></a></p></body></html> Default 默认 File 文件 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">用户版本</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL 自动检查点</span></a></p></body></html> &File 文件(&F) &Import 导入(&I) &Export 导出(&E) Remote 远程 &Edit 编辑(&E) &View 查看(&V) &Help 帮助(&H) &Remote 远程(&R) Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] 执行所有/选中的 SQL [F5, Ctrl+Return, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. 此按钮执行当前选中的 SQL 语句。如果没有选中文本,就执行所有的 SQL 语句。 This button opens a file containing SQL statements and loads it in a new editor tab 此按钮打开一个包含 SQL 语句的文件,并加载到一个新的编辑器标签中 &Load Extension... 加载扩展(&L)... This button executes the SQL statement present in the current editor line 此按钮执行编辑器当前行中的 SQL 语句 Shift+F5 Shift+F5 Sa&ve Project 保存工程(&V) Open &Project 打开工程(&P) &Attach Database 附加数据库(&A) &Set Encryption 设置加密(&S) Save SQL file as SQL 文件另存为 &Browse Table 浏览表 Copy Create statement 复制 Create 语句 Copy the CREATE statement of the item to the clipboard 复制选中项的 CREATE 语句到剪贴板 Edit display format 编辑显示格式 Edit the display format of the data in this column 编辑列中数据的显示格式 Show rowid column 显示 rowid 列 Toggle the visibility of the rowid column 切换 rowid 列的可见性 Set encoding 设置编码 Change the encoding of the text in the table cells 更改表单元格中文本的编码 Set encoding for all tables 设置所有表的编码 Change the default encoding assumed for all tables in the database 修改数据库中所有表的默认编码 &Open Database Read Only... 只读方式打开数据库(&O)... Open an existing database file in read only mode 用只读方式打开一个已有的数据库文件 Unlock view editing 解锁视图编辑 This unlocks the current view for editing. However, you will need appropriate triggers for editing. 解锁当前视图以编辑。然而,你需要合适的触发器来编辑。 Duplicate record 重复的记录 SQLCipher FAQ... SQLCipher 常见问题... Opens the SQLCipher FAQ in a browser window 用浏览器窗口打开 SQLCipher 常见问题 Open from Remote 从远端打开 Save to Remote 保存到远端 User 用户 Application 应用程序 &Clear 清除(&C) Columns X X Y Y _ _ Line type: 线形: Line 折线 StepLeft 左阶梯 StepRight 右阶梯 StepCenter 中阶梯 Impulse 脉冲 Point shape: 点形: Cross Plus Circle Disc 实心点 Square 方形 Diamond 菱形 Star Triangle 三角 TriangleInverted 倒三角 CrossSquare 叉与方形 PlusSquare 加与方形 CrossCircle 叉与圈 PlusCircle 加与圈 Peace 和平符号 Save current plot... 保存当前图表... Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. 载入所有数据。仅在不是所有数据都已经从表中取出时有效果。 DB Schema 数据库架构 DB Sche&ma 数据库架构(&M) &New Database... 新建数据库(&N)... Create a new database file 创建一个新的数据库文件 This option is used to create a new database file. 这个选项用于创建一个新的数据库文件。 Ctrl+N Ctrl+N &Open Database... 打开数据库(&O)... Open an existing database file 打开一个现有的数据库文件 This option is used to open an existing database file. 这个选项用于打开一个现有的数据库文件。 Ctrl+O Ctrl+O &Close Database 关闭数据库(&C) Ctrl+W Ctrl+W Revert database to last saved state 把数据库会退到先前保存的状态 This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. 这个选项用于倒退当前的数据库文件为它最后的保存状态。从最后保存操作开始做出的所有更改将会丢失。 Write changes to the database file 把更改写入到数据库文件 This option is used to save changes to the database file. 这个选项用于保存更改到数据库文件。 Ctrl+S Ctrl+S Compact &Database... 压缩数据库(&D)... Compact the database file, removing space wasted by deleted records 压缩数据库文件,通过删除记录去掉浪费的空间 Compact the database file, removing space wasted by deleted records. 压缩数据库文件,通过删除记录去掉浪费的空间。 E&xit 退出(&X) Ctrl+Q Ctrl+Q Import data from an .sql dump text file into a new or existing database. 从一个 .sql 转储文本文件中导入数据到一个新的或已有的数据库。 This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. 这个选项让你从一个 .sql 转储文本文件中导入数据到一个新的或现有的数据库。SQL 转储文件可以在大多数数据库引擎上创建,包括 MySQL 和 PostgreSQL。 Open a wizard that lets you import data from a comma separated text file into a database table. 打开一个向导让您从一个逗号间隔的文本文件导入数据到一个数据库表中。 Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. 打开一个向导让您从一个逗号间隔的文本文件导入数据到一个数据库表中。CSV 文件可以在大多数数据库和电子表格应用程序上创建。 Export a database to a .sql dump text file. 导出一个数据库导一个 .sql 转储文本文件。 This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. 这个选项让你导出一个数据库导一个 .sql 转储文本文件。SQL 转储文件包含在大多数数据库引擎上(包括 MySQL 和 PostgreSQL)重新创建数据库所需的所有数据。 &Table(s) CSV file... 表为 CSV 文件(&T)... Export a database table as a comma separated text file. 导出一个数据库表为逗号间隔的文本文件。 Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. 导出一个数据库表为逗号间隔的文本文件,准备好被导入到其他数据库或电子表格应用程序。 Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database 打开“创建表”向导,在那里可以定义在数据库中的一个新表的名称和字段 Open the Delete Table wizard, where you can select a database table to be dropped. 打开“删除表”向导,在那里你可以选择要丢弃的一个数据库表。 Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. 打开“修改表”向导,在其中可以重命名一个现有的表。也可以从一个表中添加或删除字段,以及修改字段名称和类型。 Open the Create Index wizard, where it is possible to define a new index on an existing database table. 打开“创建索引”向导,在那里可以在一个现有的数据库表上定义一个新索引。 &Preferences... 首选项(&P)... Open the preferences window. 打开首选项窗口。 &DB Toolbar 数据库工具栏(&D) Shows or hides the Database toolbar. 显示或隐藏数据库工具栏。 Shift+F1 Shift+F1 &About... 关于(&A)... &Recently opened 最近打开(&R) Open &tab 打开标签页(&T) Ctrl+T Ctrl+T Database Structure 数据库结构 This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. 这是打开的数据库的结构。 你可以从一个对象行中拖动 SQL 语句,然后拖到其他应用中,或者拖到其他 'DB Browser for SQLite' 的实例中。 Browse Data 浏览数据 Refresh the data in the selected table [F5, Ctrl+R] 刷新选中表中的数据 [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. 此按钮将清除当前浏览表的所有在头部输入区的过滤器。 Save the table as currently displayed 按当前显示的样子保存表 <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> <html><head/><body><p>此菜单提供以下可应用到当前浏览、过滤的表的选项:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">导出到CSV: 导出当前浏览、过滤的表的数据 (过滤后,显示格式和列的顺序) 到一个CSV文件。</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">保存为视图: 此选项保存当前浏览表格的设置 (过滤,显示格式和列的顺序) 为SQL视图,之后可以再用SQL语句浏览。</li></ul></body></html> ... ... Print currently browsed table data [Ctrl+P] 打印当前浏览表中的数据 [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. 打印当前正在浏览的表中的数据。如果选中了多于一个的单元格,就打印选中区域。 <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> <html><head/><body><p>此按钮在数据库中创建新记录。按住鼠标按钮以打开菜单选择不同选项:</p><ul><li><span style=" font-weight:600;">新记录</span>: 用默认值插入一条新记录到数据库中。</li><li><span style=" font-weight:600;">插入值...</span>: 打开对话框编辑要插入的值。可以输入满足约束的值。如果 <span style=" font-weight:600;">新记录</span> 选项失败,对话框也会打开。</li></ul></body></html> This button deletes the record or records currently selected in the table 此按钮删除表里当前选中的记录 This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. 这是数据库表视图。你可以进行以下操作: - 直接打字以在这里直接编辑。 - 双击记录以打开单元格编辑窗口。 - Alt+Del 删除单元格内容,变成NULL。 - Ctrl+" 重复一份当前记录。 - Ctrl+' 从上面的单元格拷贝。 - 标准的复制/粘贴操作。 Scroll one page upwards 上翻一页 <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> <html><head/><body><p>点击按钮将表中显示的记录向上翻一页。</p></body></html> Scroll one page downwards 下翻一页 <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> <html><head/><body><p>点击按钮将表中显示的记录向下翻一页。</p></body></html> Edit Pragmas 编辑杂注 <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">Case Sensitive Like</a></p></body></html> <html><head/><body><p><a href="https://www.sqlite.org/pragma.html#pragma_case_sensitive_like">LIKE表达式的大小写敏感</a></p></body></html> Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. 警告: 此杂注无法读取,此值为推断得到。编辑杂注可能会覆盖由 SQLite 扩展重定义的 LIKE。 Execute SQL 执行 SQL &Tools 工具(&T) DB Toolbar 数据库工具栏 Edit Database &Cell 编辑数据库单元格(&C) SQL &Log SQL 日志(&L) Show S&QL submitted by 显示 SQL 提交自(&Q) This button clears the contents of the SQL logs 此按钮清除 SQL 日志的内容 This panel lets you examine a log of all SQL commands issued by the application or by yourself 此面板可以让你自行检查本应用程序执行的所有 SQL 命令的日志。 &Plot 图表(&P) This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. 这是当前打开的数据库的结构。 你可以从名字列拖拽多个对象名字到 SQL 编辑器中,可以用菜单调节拖拽名字的属性。这可以帮助你构建 SQL 语句。 你可以从架构列拖拽 SQL 语句到 SQL 编辑器或其他应用中。 Project Toolbar 工程工具栏 Extra DB toolbar 其他数据库工具栏 Close the current database file 关闭当前数据库文件 This button closes the connection to the currently open database file 此按钮关闭到当前打开的数据库文件的连接 &Revert Changes 倒退更改(&R) &Write Changes 写入更改(&W) Open Data&base Read Only... 只读打开数据库(&B)... Save results 保存结果 Save the results view 保存结果视图 This button lets you save the results of the last executed query 此按钮让你保存上次执行的查询的结果 Find text in SQL editor 在 SQL 编辑器中查找文本 Find text in SQL editor [Ctrl+F] 在 SQL 编辑器中查找文本 [Ctrl+F] This button opens the search bar of the editor 此按钮打开编辑器的搜索栏 Ctrl+F Find or replace text in SQL editor 在 SQL 编辑器中查找或替换文本 Find or replace text in SQL editor [Ctrl+H] 在 SQL 编辑器中查找或替换文本 [Ctrl+H] This button opens the find/replace dialog for the current editor tab 此按钮为当前的编辑器标签页打开查找/替换对话框 Export to &CSV 导出到 &CSV Save as &view 保存为视图(&V) Save as view 保存为视图 Hide column(s) 隐藏列 Hide selected column(s) 隐藏选中的列 Show all columns 显示所有列 Show all columns that were hidden 显示所有被隐藏的列 Shows or hides the Project toolbar. 显示或隐藏工程工具栏 Extra DB Toolbar 其他数据库工具栏 Export the filtered data to CSV 导出过滤的数据到 CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. 此按钮导出当前浏览、过滤的表的数据 (过滤后,显示格式和列的顺序) 到一个CSV文件。 Save the current filter, sort column and display formats as a view 保存当前过滤,列排序和显示格式为视图 This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. 此按钮保存当前浏览表格的设置 (过滤,显示格式和列的顺序) 为SQL视图,之后可以再用SQL语句浏览。 Insert Values... 插入值... Open a dialog for inserting values in a new record 打开对话框以插入值到新记录中 Insert new record using default values in browsed table 用默认值插入一条新记录到当前浏览的表中 New In-&Memory Database 新建内存数据库(&M) Drag && Drop Qualified Names 拖拽限定名称 Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor 当拖拽对象到编辑器中时,使用限定名称 (例如 "Table"."Field") Drag && Drop Enquoted Names 拖拽引用名字 Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor 当拖拽对象到编辑器中时,使用转移标识符 (例如 "Table1") &Integrity Check 完全性检查(&I) Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. 对打开的数据库运行 integrity_check 杂注并在执行 SQL 标签页返回结果。此杂注对整个数据库进行完全性检查。 &Foreign-Key Check 外键检查(&F) Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab 对打开的数据库运行 foreign_key_check 杂注并在执行 SQL 标签页返回结果。 &Quick Integrity Check 快速完全性检查(&Q) Run a quick integrity check over the open DB 对打开的数据库执行快速完全性检查 Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. 对打开的数据库运行 quick_check 杂注并在执行 SQL 标签页返回结果。此命令会执行 integrity_check 的多数检查,但是要快得多。 &Optimize 优化(&O) Attempt to optimize the database 尝试优化数据库 Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. 对打开的数据库运行 optimize 杂注。可能会执行对未来查询性能有帮助的优化。 Print 打印 Print text from current SQL editor tab [Ctrl+P] 从当前的 SQL 编辑器标签页打印文本 [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab 打开对话框以从当前的 SQL 编辑器标签页打印文 Print the structure of the opened database [Ctrl+P] 打印当前打开的数据库的结构 [Ctrl+P] Open a dialog for printing the structure of the opened database 打开对话框以打印当前打开的数据库的结构 Compact &Database 压缩数据库(&D) &Database from SQL file... 从 SQL 文件导入数据库(&D)... &Table from CSV file... 从 CSV 文件导入表(&T)... &Database to SQL file... 导出数据库到 SQL 文件(&D)... &Table(s) as CSV file... 导出表到 CSV 文件(&T)... SQLCipher &FAQ... SQLCipher &FAQ... Table(s) to JSON... 导出表到 JSON 文件(&T)... &Create Table... 创建表(&C)... &Delete Table... 删除表(&D)... &Modify Table... 修改表(&M)... Create &Index... 创建索引(&I)... W&hat's This? 这是什么(&W)? &About 关于(&A) This button opens a new tab for the SQL editor 此按钮打开一个 SQL 编辑器的新标签页 &Execute SQL 执行 SQL(&E) Execute SQL [F5, Ctrl+Return, Ctrl+R] 执行 SQL [F5, Ctrl+回车, Ctrl+R] &Load extension 加载扩展(&L) &Wiki... 维基(&W)... Bug &report... 错误报告(&R)... Web&site... 网站(&S)... Save the current session to a file 保存当前会话到一个文件 Load a working session from a file 从一个文件加载工作会话 Open SQL file 打开 SQL 文件 <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>保存当前图表...</p><p>文件格式按扩展名选择(png, jpg, pdf, bmp)</p></body></html> Save SQL file 保存 SQL 文件 Execute current line 执行当前行 Execute current line [Shift+F5] 执行当前行 [Shift+F5] Ctrl+E Ctrl+E Export as CSV file 导出为 CSV 文件 Export table as comma separated values file 导出表为逗号间隔值文件 Ctrl+L Ctrl+L Ctrl+P Ctrl+P Database encoding 数据库编码 Choose a database file 选择一个数据库文件 Ctrl+Return Ctrl+回车 Ctrl+D Ctrl+D Ctrl+I Ctrl+I Encrypted 加密的 Database is encrypted using SQLCipher 数据库使用 SQLCipher 进行了加密 Read only 只读 Database file is read only. Editing the database is disabled. 数据库是只读的。编辑被禁止。 Could not open database file. Reason: %1 无法打开数据库文件。 原因: %1 Choose a filename to save under 选择一个文件名保存 Error adding record: 添加记录时出错: Error deleting record: %1 删除记录时出错: %1 Please select a record first 请首先选择一条记录 %1 - %2 of %3 %1 - %2 / %3 There is no database opened. Please open or create a new database file. 没有打开数据库。请打开或创建一个新的数据库文件。 Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. 您是否确认您想删除 %1 '%2'? 所有和 %1 关联的数据将会丢失。 Error: could not delete the %1. Message from database engine: %2 错误: 不能删除 %1。消息来自数据库引擎: %2 Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? 设置或清除杂注值会提交你的当前事务。 你确定吗? Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. 请输入一个伪主键以在当前视图启用编辑。这需要是视图中的一个满足唯一性的列的名字。 There is no database opened. 没有数据库打开。 %1 rows returned in %2ms from: %3 %1 行数据在 %2ms 内返回自: %3 , %1 rows affected %1 行数据受影响 Query executed successfully: %1 (took %2ms%3) 查询执行成功: %1 (耗时 %2ms%3) Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 保存数据库文件时出错。这表明不是所有对数据库的更改都被保存了。你需要先解决以下错误。 %1 A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. 有新版本的 DB Browser for SQLite (%1.%2.%3)可用。<br/><br/>请从 <a href='%4'>%4</a> 下载。 Please enter the URL of the database file to save. 请输入要保存的数据库文件的 URL. DB Browser for SQLite project file (*.sqbpro) DB Browser for SQLite 工程文件 (*.sqbpro) Please choose a new encoding for this table. 请为此表选择新的编码 Please choose a new encoding for all tables. 请为所有表选择新的编码 Error checking foreign keys after table modification. The changes will be reverted. 修改表格后的外键检查错误。修改会被回退。 This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. 此表格没有通过外键检查。<br/>你需要执行 '工具 | 外键检查' 并修复发现的问题。 At line %1: Result: %2 Extensions(*.so *.dylib *.dll);;All files(*) Choose a project file to open 选择一个要打开的工程文件 This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. 此工程文件使用了旧的文件格式,因为它是由 DB Browser for SQLite version 3.10 或更低版本创建的。加载此文件格式依然完全支持,但我们建议你把工程转换到新的格式,因为旧格式支持将来可能会失效。你可以通过打开并重新保存的方式来转换。 Duplicate records 重复记录 Ctrl+" %1 Leave the field empty for using the database encoding. %1 留空此字段以使用数据库默认编码。 This encoding is either not valid or not supported. 这种编码非法或者不支持。 Cancel 取消 Error executing query: %1 执行查询时出错: %1 Choose a text file 选择一个文本文件 Text files(*.csv *.txt);;All files(*) 文本文件(*.csv *.txt);;所有文件(*) Import completed 导入完成 Are you sure you want to undo all changes made to the database file '%1' since the last save? 您是否确认您想撤销从上次保存以来对数据库文件‘%1’做出的所有更改。? Choose a file to import 选择要导入的一个文件 Text files(*.sql *.txt);;All files(*) 文本文件(*.sql *.txt);;所有文件(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. 您是否确认您想创建一个新的数据库文件用来存放导入的数据? 如果您会到“否”的话,我们将尝试导入 SQL 文件中的数据到当前数据库。 File %1 already exists. Please choose a different name. 文件 %1 已存在。请选择一个不同的名称。 Error importing data: %1 导入数据时出错: %1 Import completed. 导入完成。 Delete View 删除视图 Modify View 修改视图 Delete Trigger 删除触发器 Modify Trigger 修改触发器 Delete Index 删除索引 Delete Table 删除表 &%1 %2 &%1 %2 Setting PRAGMA values will commit your current transaction. Are you sure? 设置 PRAGMA 值将会提交您的当前事务。. 您确认吗? Execution aborted by user 操作被用户终止 In-Memory database 内存数据库 determining row count... 正在决定行数... %1 - %2 of >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. 你确定要删除表 '%1' 吗? 所有关联的数据都会丢失。 Are you sure you want to delete the view '%1'? 你确定要删除视图 '%1' 吗? Are you sure you want to delete the trigger '%1'? 你确定要删除触发器 '%1' 吗? Are you sure you want to delete the index '%1'? 你确定要删除索引 '%1' 吗? Error: could not delete the table. 错误: 无法删除表。 Error: could not delete the view. 错误: 无法删除视图。 Error: could not delete the trigger. 错误: 无法删除触发器。 Error: could not delete the index. 错误: 无法删除索引。 Message from database engine: %1 来自数据库引擎的消息: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? 编辑表格之前需要立刻保存所有修改。 你确定要保存数据库吗? -- EXECUTING SELECTION IN '%1' -- -- 执行 '%1' 中所选 -- -- EXECUTING LINE IN '%1' -- -- 执行 '%1' 中的行 -- -- EXECUTING ALL IN '%1' -- -- 执行 '%1' 中所有 -- executing query 执行查询 %1 rows returned in %2ms %1 行返回,耗时 %2ms query executed successfully. Took %1ms%2 查询执行成功。耗时 %1ms%2 -- At line %1: %4 -- Result: %3 -- 在行号 %1: %4 -- 结果: %3 Choose text files 选择文本文件 Import completed. Some foreign key constraints are violated. Please fix them before saving. 导入完成。一些外键约束被违反了。请在保存之前修复。 Modify Index 修改索引 Modify Table 修改表 Select SQL file to open 选择要打开的 SQL 文件 Couldn't read file: %1. 无法读取文件: %1 Couldn't save file: %1. 无法保存文件: %1 Select file name 选择文件名 Select extension file 选择扩展文件 Extensions(*.so *.dll);;All files(*) 扩展(*.so *.dll);;所有文件(*) Extension successfully loaded. 扩展成功加载。 Error loading extension: %1 加载扩展时出错: %1 Don't show again 不再显示 New version available. 新版本可用。 Collation needed! Proceed? 需要整理! 继续? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! 数据库中的一个表需要特定的整理方法 '%1' 但本应用程序不了解故无法提供。 如果您选择继续,小心可能会有不好的事情发生。 记得备份! creating collation 创建整理 Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. 为 SQL 标签页设置新名称。使用 '&&' 字符来允许它作为键盘快捷键。 Please specify the view name 请指定视图名称 There is already an object with that name. Please choose a different name. 已有同名的对象。请选择一个不同的名称。 View successfully created. 视图成功创建。 Error creating view: %1 创建视图时出错: %1 There is no filter set for this table. View will not be created. 此表没有过滤。视图不会被创建。 Delete Records 删除记录 This action will open a new SQL tab for running: 此动作会打开新的 SQL 标签页以运行: Press Help for opening the corresponding SQLite reference page. 按下帮助以打开对应的 SQLite 参考页。 Choose a axis color 选择一个轴的颜色 PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;所有文件(*) Choose a file to open 选择要打开的一个文件 Invalid file format. 无效文件格式。 NullLineEdit Set to NULL 设置为 NULL Alt+Del PlotDock Plot 绘图 <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> <html><head/><body><p>此面板显示当前表或者刚刚执行的查询的列。你可以选择列用做在下面画图时的 X 轴和 Y 轴。表中显示检测到的会影响绘图结果的轴类型。Y 轴只允许选择数值类型,但 X 轴可以选择:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">日期/时间</span>: 格式化的字符串 &quot;yyyy-MM-dd hh:mm:ss&quot; 或 &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">日期</span>: 格式化的字符串 &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">时间</span>: 格式化的字符串 &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">标签</span>: 其他格式的字符串。选这项作为x轴,会绘制条形图,并用值作为条形的标签</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">数值</span>: 整数或实数值</li></ul><p>双击 Y 单元格可以改变图中所用的颜色。</p></body></html> Columns X X Y Y _ _ Axis Type 轴类型 Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. 这是在你在上面选择 x 和 y 值后绘制出的图。 点击点可以在图和表格中选中它们。Ctrl+点击以选中一批点。 使用鼠标滚轮可以缩放,鼠标拖拽可以改变坐标轴的范围。 选择轴或者轴上的标签并拖拽可以缩放此方向。 Line type: 线形: None Line 折线 StepLeft 左阶梯 StepRight 右阶梯 StepCenter 中阶梯 Impulse 脉冲 Point shape: 点形: Cross Plus Circle Disc 实心点 Square 方形 Diamond 菱形 Star Triangle 三角 TriangleInverted 倒三角 CrossSquare 叉与方形 PlusSquare 加与方形 CrossCircle 叉与圈 PlusCircle 加与圈 Peace 和平符号 <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>保存当前图表...</p><p>文件格式按扩展名选择(png, jpg, pdf, bmp)</p></body></html> Save current plot... 保存当前图表... Load all data and redraw plot 载入所有数据并重新绘图 Load all data. This has only an effect if not all data has been fetched from the table yet due to the partial fetch mechanism. 载入所有数据。仅在不是所有数据都已经从表中取出时有效果。 Row # 行 # Choose a axis color 选择一个轴的颜色 Copy 复制 Print... 打印... Show legend 显示图例 Stacked bars 堆叠的条形 Date/Time 日期/时间 Date 日期 Time 时间 Numeric 数值 Label 标签 Invalid 无效的 Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. 载入所有数据并重新绘图。 警告:由于部分加载机制,现在并没有加载所有的数据。 Choose an axis color 选一个坐标轴颜色 Choose a filename to save under 选择一个文件名保存 PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;所有文件(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. 图中有曲线,选择的线形只能用到按 X 排列的图中。要么对表排序或者用 X 查询,要么选一种曲线支持的线形:无或者折线。 Fetching all data... 读取所有数据... Cancel 取消 PreferencesDialog Preferences 首选项 &General 通用(&G) Remember last location 记住上次的位置 Always use this location 总是使用此位置 Remember last location for session only 仅在会话中记住上次的位置 Lan&guage 语言(&G) Automatic &updates 自动更新(&A) &Database 数据库(&D) Database &encoding 数据库编码(&E) Open databases with foreign keys enabled. 打开启用了外键的数据库。 &Foreign keys 外键(&F) enabled 启用 Default &location 默认位置(&L) ... ... Remove line breaks in schema &view 删除架构视图中的换行(&V) Show remote options 显示远程选项 Remote server 远程服务器 Prefetch block si&ze 预取块尺寸(&Z) Advanced 高级 SQL to execute after opening database 打开数据库后执行的 SQL SQ&L to execute after opening database 打开数据库后执行的 SQL(&L) Default field type 默认字段类型 Data &Browser 数据浏览器(&B) Font 字体 &Font 字体(&F) Font si&ze: 字号(&Z) Content 内容 Symbol limit in cell 单元格符号数限制 NULL fields 空字段 &Text 文本(&T) Field colors 字段颜色 NULL Regular 常规 Text 文本 Binary 二进制 Background 背景 Filters 过滤 Escape character 转义字符 Delay time (&ms) 延时 (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. 设置应用新过滤值前的等待时间。设为0以禁用等待。 &SQL &SQL Settings name 设置名称 Context 上下文 Colour 颜色 Bold 粗体 Italic 斜体 Underline 下划线 Keyword 关键字 function 函数 Function 函数 Table Comment 注释 Identifier 识别符 String 字符串 currentline 当前行 Current line 当前行 SQL &editor font size SQL 编辑器字体大小(&E) SQL &log font size SQL 日志字体大小(&L) Tab size Tab 长度 SQL editor &font SQL 编辑器字体(&F) Error indicators 错误指示器 Enabling error indicators highlights the SQL code lines that caused errors during the last execution 启用错误指示器将高亮 SQL 代码中导致最近一次执行出错的行 Hori&zontal tiling 水平平铺(&Z) If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. 如果启用,SQL 编辑器和结果表视图将并排显示,而不是上下显示。 Code co&mpletion 代码完成(&M) Toolbar style 工具栏风格 Only display the icon 仅显示图标 Only display the text 仅显示文本 The text appears beside the icon 文本在图标旁 The text appears under the icon 文本在图标下 Follow the style 遵循风格 DB file extensions 数据库文件扩展 Manage 管理 When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. 当启用时,数据库结构标签页中的架构列里的换行,显示、打印时被移除。 Font si&ze 字体大小(amp;Z) This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. 这是表启用根据当前值的自动补完的最大的列数量。 设置成0以禁用补完。 Row count threshold for completion 自动补完的列数阈值 Field display 字段显示 Displayed &text 显示的文本(&T) Text color 文本颜色 Background color 背景颜色 Preview only (N/A) 仅预览 (N/A) Foreground 前景 SQL &results font size SQL 结果的字体大小(&R) &Wrap lines 换行(&W) Never 永不 At word boundaries 按照词边界 At character boundaries 按照字母边界 At whitespace boundaries 按照空白字符边界 &Quotes for identifiers 标识转义(&Q) Choose the quoting mechanism used by the application for identifiers in SQL code. 选择 SQL 代码中标识的转义方式。 "Double quotes" - Standard SQL (recommended) "双引号" - 标准 SQL (推荐) `Grave accents` - Traditional MySQL quotes `重音符` - 经典的 MySQL 转义 [Square brackets] - Traditional MS SQL Server quotes [方括号] - 经典的 MS SQL Server 转义 Keywords in &UPPER CASE 关键字大写(&U) When set, the SQL keywords are completed in UPPER CASE letters. 设置时,SQL 关键字被自动补全为大写字母。 When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background 设置时,导致上次执行出错的 SQL 代码行会被高亮。 &Extensions 扩展(&E) Select extensions to load for every database: 选择每个数据库要加载的扩展: Add extension 添加扩展 Remove extension 删除扩展 <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> <html><head/><body><p>虽然支持 REGEXP 运算符,但是 SQLite 并没有实现任何正则表达式算法,<br/>而是回调应用程序。DB Browser for SQLite 为您实现了算法,以便您可以<br/>打破常规使用 REGEXP。由于算法有多种可能的实现,您可能想用其他的,<br/>所以您可以禁用算法实现并通过扩展加载您的实现。需要重启应用程序。</p></body></html> Disable Regular Expression extension 禁用正则表达式扩展 <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Remote 远程 CA certificates CA 证书 Subject CN 主题 CN (Subject CN) Common Name 公用名称 (Common Name) Subject O 主题 O (Subject O) Organization 组织 (Organization) Valid from 有效期从 Valid to 有效期到 Serial number 序列号 Your certificates 您的证书 File 文件 Subject Common Name 主题公用名称 (Subject Common Name) Issuer CN 签发人 CN (Issuer CN) Issuer Common Name 签发人公用名称 (Issuer Common Name) Clone databases into 克隆数据库信息 Choose a directory 选择一个目录 The language will change after you restart the application. 语言将在重启应用程序后改变。 Select extension file 选择扩展文件 Extensions(*.so *.dll);;All files(*) 扩展(*.so *.dll);;所有文件(*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file 导入证书文件 No certificates found in this file. 在文件中找不到证书。 Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! 您确定要删除此证书吗?所有的证书数据都会被从应用设置中删除! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. 你确定要清除所有保存的设置吗? 所有你做的设置都会丢失,并使用默认值。 QObject Error importing data 导入数据时出错 from record number %1 自记录编号 %1 . %1 Importing CSV file... 导入CSV文件... Cancel 取消 Decoding CSV file... 正在解码 CSV 文件... Collation needed! Proceed? 需要整理! 继续? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! 数据库中的一个表需要特定的整理方法 '%1' 但本应用程序不了解故无法提供。 如果您选择继续,小心可能会有不好的事情发生。 记得备份! SQLite database files (*.db *.sqlite *.sqlite3 *.db3);;All files (*) SQLite 数据库文件 (*.db *.sqlite *.sqlite3 *.db3);;所有文件 (*) All files (*) 所有文件 (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) SQLite 数据库文件 (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 连接到 %1 时出错. %2 Error opening remote file at %1. %2 在 %1 打开远程文件时出错. %2 Error: Invalid client certificate specified. 错误: 指定了错误的客户端证书。 Please enter the passphrase for this client certificate in order to authenticate. 请输入客户端证书的口令以进行身份认证。 Cancel 取消 Uploading remote database to %1 正在上传远程数据库到 %1. {1?} Downloading remote database from %1 正在下载远程数据库于 %1. {1?} The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. 从上次检入以后,远程数据库已更新。你想把本地数据库更新到最新版本吗?注意这将会丢弃你在本地做的所有修改!如果你不希望丢掉本地修改,选择否以使用本地版本。 Uploading remote database to %1. 正在上传远程数据库到 %1. Downloading remote database from %1. 正在下载远程数据库于 %1. Error: The network is not accessible. 错误: 网络无法访问。 Error: Cannot open the file for sending. 错误: 无法打开文件用于发送。 Error opening local databases list. %1 打开本地数据库列表时出错。 %1 Error creating local databases list. %1 创建本地数据库列表时出错。 %1 RemoteDock Remote 远程 B&rowse 浏览(&r) Local 本地 Identity 身份 Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. 用当前所选身份连接远程服务器。正确的服务器也来自此身份。 Go Push currently opened database to server 推送当前打开的数据库到服务器 <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> <html><head/><body><p>在此面板,来自 dbhub.io 网站的远程数据库可以被添加到 DB4S。首先你需要一个身份:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">登录 dbhub.io 网站 (使用你的 GitHub 认证或其他什么)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">点击按钮创建 DB4S 证书 (那是你的身份)。 这会给你一个证书文件 (保存到你的本地硬盘里)。</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">前往 DB4S 的设置中的远程选项卡。点击添加证书,选择刚才下载的文件。</li></ol><p>这样,远程面板就会显示你的身份,之后可以添加远程数据库。</p></body></html> RemoteModel Name 名称 Version 版本 Last modified 上次修改 Size 大小 Commit 提交 bytes 字节 RemotePushDialog Push database 推送数据库 Database na&me to push to 推送的数据库名(&m) Commit message 提交信息 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence 数据库许可协议 Public 公有 Branch 分支 Force push 强制推送 Database will be public. Everyone has read access to it. 数据库将是公有的。所有人都可以读取它。 Database will be private. Only you have access to it. 数据库将是私有的。只有您可以访问它。 Use with care. This can cause remote commits to be deleted. 小心使用。这可能会导致远程提交被删除。 Unspecified 未指定的 SqlExecutionArea Form 表单 Find previous match [Shift+F3] 查找上一个 [Shift+F3] Find previous match with mapping 按顺序查找上一项 Shift+F3 Shift+F3 The found pattern must be a whole word 找到的必须是一个完整的词 Whole Words 全词 Text pattern to find considering the checks in this frame 搜索的文本符合这里的选择 Find in editor 在编辑器中搜索 The found pattern must match in letter case 搜索必须大小写匹配 Case Sensitive 大小写敏感 Find next match [Enter, F3] 查找下一个 [Enter, F3] Find next match with wrapping 循环查找下一个 F3 F3 Interpret search pattern as a regular expression 解析查找目标为正则表达式 <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> <html><head/><body><p>选中时,要查找的模式被解释为 UNIX 正则表达式。参阅 <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Wikibooks 中的正则表达式</a>.</p></body></html> Regular Expression 正则表达式 Close Find Bar 关闭查找栏 <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements 上次执行语句的结果 This field shows the results and status codes of the last executed statements. 这个字段显示最后执行的语句的结果和状态码。 Export to &CSV 导出到 &CSV Save as &view 保存为视图(&V) Save as view 保存为视图 Please specify the view name 请指定视图名称 There is already an object with that name. Please choose a different name. 已有同名的对象。请选择一个不同的名称。 View successfully created. 视图成功创建。 Error creating view: %1 创建视图时出错: %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) ltrim(X) removes spaces from the left side of X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X) rtrim(X) removes spaces from the right side of X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. (X) trim(X) removes spaces from both ends of X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. SqliteTableModel References %1(%2) Hold Ctrl+Shift and click to jump there 引用 %1(%2) 按住 Ctrl+Shift 并点击以跳转 reading rows 读取行 loading... 正在加载... References %1(%2) Hold %3Shift and click to jump there 引用 %1(%2) 按住 %3Shift 并点击以跳转 Error changing data: %1 更改数据库时出错: %1 retrieving list of columns 正在检索列的列表 Fetching data... 正在拉取数据... Cancel 取消 VacuumDialog Compact Database 压缩数据库 Warning: Compacting the database will commit all of your changes. 警告: 压缩数据库会提交你的所有修改。 Please select the databases to co&mpact: 请选择要压缩的数据库(&M) Warning: Compacting the database will commit all changes you made. 警告: 压缩数据库将会提交您做出的所有更改。 Please select the objects to compact: 请选择要压缩的对象: sqlitebrowser-3.11.2/src/translations/sqlb_zh_TW.ts000066400000000000000000010523131345112435200224440ustar00rootroot00000000000000 AboutDialog About SqliteBrowser 關於 SqliteBrowser About DB Browser for SQLite Version 版本 <html><head/><body><p>DB Browser for SQLite is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt">https://www.mozilla.org/MPL/2.0/index.txt</a> for details.</p><p>For more information on this program please visit our website at: <a href="http://sqlitebrowser.org">http://sqlitebrowser.org</a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> Qt Version Qt 版本 SQLite Version SQLite 版本 <html><head/><body><p>SQLite Database Browser is an open source, freeware visual tool used to create, design and edit SQLite database files.</p><p>It is bi-licensed under the Mozilla Public License Version 2, as well as the GNU General Public License Version 3 or later. You can modify or redistribute it under the conditions of these licenses.</p><p>See <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> and <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> for details.</p><p>For more information on this program please visit our website at: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">This software uses the GPL/LGPL Qt Toolkit from </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>See </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> for licensing terms and information.</span></p><p><span style=" font-size:small;">It also uses the Silk icon set by Mark James licensed under a Creative Commons Attribution 2.5 and 3.0 license.<br/>See </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> for details.</span></p></body></html> <html><head/><body><p>SQLite Database Browser 是一個開放原始碼的免費視覺化工具,用於建立、設計和編輯 SQLite 資料庫檔案。</p><p>它是以第 2 版 Mozilla 公共許可,以及第 3 版及之後版本的 GNU 通用許可方式授權。你可以在遵循這些許可的條件下修改或重新發佈它。</p><p>參閱 <a href="http://www.gnu.org/licenses/gpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/gpl.html</span></a> 和 <a href="https://www.mozilla.org/MPL/2.0/index.txt"><span style=" text-decoration: underline; color:#0000ff;">https://www.mozilla.org/MPL/2.0/index.txt</span></a> 瞭解細節。</p><p>要獲得本程式的更多資訊,請訪問我們的網站: <a href="https://sqlitebrowser.org"><span style=" text-decoration: underline; color:#0000ff;">https://sqlitebrowser.org</span></a></p><p><span style=" font-size:small;">這個軟體使用了 GPL/LGPL Qt Toolkit: </span><a href="http://qt-project.org/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/</span></a><span style=" font-size:small;"><br/>參閱 </span><a href="http://qt-project.org/doc/qt-5/licensing.html"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://qt-project.org/doc/qt-5/licensing.html</span></a><span style=" font-size:small;"> 瞭解許可條款和資訊。</span></p><p><span style=" font-size:small;">它還是用了由 Mark James 提供的 Silk 圖示集,以第 2.5 和 3.0 版知識共用署名(CCA)許可方式授權。<br/>參閱 </span><a href="http://www.famfamfam.com/lab/icons/silk/"><span style=" font-size:small; text-decoration: underline; color:#0000ff;">http://www.famfamfam.com/lab/icons/silk/</span></a><span style=" font-size:small;"> 瞭解細節。</span></p></body></html> (based on SQLite %1) Version Built for Qt Version SQLCipher Version SQLite Version AddRecordDialog Add New Record Enter values for the new record considering constraints. Fields in bold are mandatory. In the Value column you can specify the value for the field identified in the Name column. The Type column indicates the type of the field. Default values are displayed in the same style as NULL values. Name 名稱 Type 類型 Value Values to insert. Pre-filled default values are inserted automatically unless they are changed. When you edit the values in the upper frame, the SQL query for inserting this new record is shown here. You can edit manually the query before saving. <html><head/><body><p><span style=" font-weight:600;">Save</span> will submit the shown SQL statement to the database for inserting the new record.</p><p><span style=" font-weight:600;">Restore Defaults</span> will restore the initial values in the <span style=" font-weight:600;">Value</span> column.</p><p><span style=" font-weight:600;">Cancel</span> will close this dialog without executing the query.</p></body></html> Auto-increment Unique constraint Check constraint: %1 Foreign key: %1 Default value: %1 Error adding record. Message from database engine: %1 Are you sure you want to restore all the entered values to their defaults? Application Usage: %1 [options] [db] 用法: %1 [選項] [資料庫] Possible command line arguments: 可用命令列參數: -h, --help Show command line options -h, --help 顯示命令列選項 -s, --sql [file] Execute this SQL file after opening the DB -s, --sql [檔] 在打開資料庫後執行這個 SQL 檔案 -q, --quit Exit application after running scripts -q, --quit 在執行腳本後退出應用程式 [file] Open this SQLite database [檔] 打開這個 SQLite 資料庫 -h, --help Show command line options -s, --sql [file] Execute this SQL file after opening the DB -t, --table [table] Browse this table after opening the DB -q, --quit Exit application after running scripts -R, --read-only Open database in read-only mode -o, --option [group/setting=value] Run application with this setting temporarily set to value -v, --version Display the current version [file] Open this SQLite database This is DB Browser for SQLite version %1. The -s/--sql option requires an argument -s/--sql 選項需要一個參數 The file %1 does not exist 檔案 %1 不存在 The -t/--table option requires an argument The -o/--option option requires an argument in the form group/setting=value Invalid option/non-existant file: %1 無效選項/不存在的檔案: %1 CipherDialog SQLCipher encryption &Password &Reenter password Encr&yption settings SQLCipher &3 defaults SQLCipher &4 defaults Custo&m Page si&ze &KDF iterations HMAC algorithm KDF algorithm Passphrase Raw key Please set a key to encrypt the database. Note that if you change any of the other, optional, settings you'll need to re-enter them as well every time you open the database file. Leave the password fields empty to disable the encryption. The encryption process might take some time and you should have a backup copy of your database! Unsaved changes are applied before modifying the encryption. Please enter the key used to encrypt the database. If any of the other settings were altered for this database file you need to provide this information as well. ColumnDisplayFormatDialog Choose display format Display format Choose a display format for the column '%1' which is applied to each value prior to showing it. Default 預設 Decimal number Exponent notation Hex blob Hex number Apple NSDate to date Java epoch (milliseconds) to date Julian day to date Unix epoch to local time Date as dd/mm/yyyy Lower case Octal number Round number Unix epoch to date Upper case Windows DATE to date Custom DBBrowserDB Please specify the database name under which you want to access the attached database Invalid file format Do you want to save the changes made to the database file %1? 您是否想儲存對資料庫檔案 %1 做出的修改? Exporting database to SQL file... 正在匯出資料庫到 SQL 檔案... Cancel 取消 Executing SQL... 正在執行 SQL... Action cancelled. 操作已取消。 Error in statement #%1: %2. Aborting execution. 錯誤在語句 #%1: %2。 正在放棄執行。 renameColumn: cannot find table %1. renameColumn: 無法查閱資料資料表 %1。 This database has already been attached. Its schema name is '%1'. Do you really want to close this temporary database? All data will be lost. The database is currently busy: Do you want to abort that other operation? No database file opened Error in statement #%1: %2. Aborting execution%3. and rolling back didn't receive any output from %1 could not execute command: %1 Cannot delete this object Cannot set data on this object A table with the name '%1' already exists in schema '%2'. renameColumn: cannot find column %1. renameColumn: 無法查詢列 %1。 renameColumn: creating savepoint failed. DB says: %1 renameColumn: 建立保存點時失敗。DB 說: %1 renameColumn: creating new table failed. DB says: %1 renameColumn: 建立新資料表時失敗。DB 說: %1 renameColumn: copying data to new table failed. DB says: %1 renameColumn: 複製資料到新資料表時失敗。DB 說: %1 renameColumn: deleting old table failed. DB says: %1 renameColumn: 刪除舊資料表失敗。DB 說: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: 還原某些和這個資料表關聯的物件失敗。這個最可能是因為某些列的名稱修改了。這裡是您可能需要手動修復和執行的 SQL 語句: renameColumn: releasing savepoint failed. DB says: %1 renameColumn: 釋放保存點時失敗。DB 說: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 重命名資料表 '%1' 為 '%2'時失敗。消息來自資料庫引擎: %3 ... <string can not be logged, contains binary data> ... ... <字串無法記錄,包含二進位資料> ... could not get list of databases: %1 Error loading extension: %1 載入擴充套件時出現錯誤: %1 could not get column information unknown object type %1 未知對象類型 %1 could not get list of db objects: %1, %2 無法取得資料庫物件的列表: %1, %2 could not get types 無法取得類型 didn't receive any output from pragma %1 無法接受來自雜注 %1 的任何輸出 could not execute pragma command: %1, %2 無法執行雜注命令: %1, %2 Error setting pragma %1 to %2: %3 設定雜注 %1 為 %2 時出現錯誤: %3 File not found. 找不到檔案。 DbStructureModel Name 名稱 Object 對象 Type 類型 Schema 架構 Database Browsables All Temporary Tables (%1) 資料表 (%1) Indices (%1) 索引 (%1) Views (%1) 視圖 (%1) Triggers (%1) 觸發器 (%1) EditDialog Edit database cell 編輯資料庫儲存格 Mode: This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell. Image JSON XML Automatically adjust the editor mode to the loaded data type This checkable button enables or disables the automatic switching of the editor mode. When a new cell is selected or new data is imported and the automatic switching is enabled, the mode adjusts to the detected data type. You can then change the editor mode manually. If you want to keep this manually switched mode while moving through the cells, switch the button off. Auto-switch Auto-format: pretty print on loading, compact on saving. When enabled, the auto-format feature formats the data on loading, breaking the text in lines and indenting it for maximum readability. On data saving, the auto-format feature compacts the data removing end of lines, and unnecessary whitespace. Autoformat Import from file Opens a file dialog used to import any kind of data to this database cell. Export to file Opens a file dialog used to export the contents of this database cell to a file. Print... Open preview dialog for printing displayed image Ctrl+P Ctrl+P Open preview dialog for printing displayed text Copy Hex and ASCII Copy selected hexadecimal and ASCII columns to the clipboard Ctrl+Shift+C Import text 匯入純文字檔案 Opens a file dialog used to import text to this database cell. 打開一個檔對話方塊用於匯入純文字檔案到這個資料庫儲存格。 &Import 匯入(&I) Export text 匯出純文字檔案 Opens a file dialog used to export the contents of this database cell to a text file. 打開一個檔對話方塊用於匯出這個資料庫儲存格的內容到一個文字檔案。 &Export 匯出(&E) Set this cell to NULL Set as &NULL This editor mode lets you edit JSON or XML data with syntax highlighting, automatic formatting and validation before saving. Errors are indicated with a red squiggle underline. Apply data to cell [Ctrl+Return] This button saves the changes performed in the cell editor to the database cell. Apply Text 純文字檔案 Binary 二進位 Clear cell data 清除儲存格資料 Erases the contents of the cell 刪除儲存格的內容 &Clear 清除(&C) <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warning: Editing binary content in text mode may result in corrupted data!</span></p></body></html> <html><head/><body><p><span style=" font-weight:600; color:#c00000;">警告: 在文字模式中編輯二進位內容可能會導致資料損壞!</span></p></body></html> This area displays information about the data present in this database cell 這個區域顯示存在於這個資料庫儲存格中的資料的相關資訊 Type of data currently in cell 目前在儲存格中的資料的類型 Size of data currently in table 目前在資料表中的資料的大小 Choose a file 選擇一個檔案 Text files(*.txt);;Image files(%1);;All files(*) 文字檔案(*.txt);;影像檔案(%1);;所有擋檔案(*) Choose a filename to export data 選擇一個匯出資料的檔案名稱 Text files(*.txt);;All files(*) 文字檔案(*.txt);;所有擋檔案(*) Type of data currently in cell: %1 Image %1x%2 pixel(s) Type of data currently in cell: NULL Type of data currently in cell: Text / Numeric 目前在儲存格中的資料的類型: Text 純文字檔案/ Numeric 數值 Image data can't be viewed in this mode. Try switching to Image or Binary mode. Binary data can't be viewed in this mode. Try switching to Binary mode. Text files (*.txt) JSON files (*.json) XML files (*.xml) Image files (%1) Binary files (*.bin) All files (*) Choose a file to import 選擇要匯入的一個檔案 %1 Image SVG files (*.svg) Hex dump files (*.txt) Invalid data for this mode The cell contains invalid %1 data. Reason: %2. Do you really want to apply it to the cell? %n char(s) %n 個字元 Type of data currently in cell: Valid JSON Type of data currently in cell: Image 目前在儲存格中的資料的類型: Image 圖像 %1x%2 pixel %1x%2 圖元 Type of data currently in cell: Binary 目前在儲存格中的資料的類型: Binary 二進位 %n byte(s) %n 位元組 EditIndexDialog Create New Index 建立新索引 &Name 名稱(&N) &Columns 列(&C) Column Use in Index 在索引中使用 Order 順序 &Table 資料表(&T) Edit Index Schema &Unique 唯一(&U) For restricting the index to only a part of the table you can specify a WHERE clause here that selects the part of the table that should be indexed Partial inde&x clause Colu&mns Table column Type 類型 Add a new expression column to the index. Expression columns contain SQL expression rather than column names. Index column Deleting the old index failed: %1 Creating the index failed: %1 建立索引時失敗: %1 EditTableDialog Edit table definition 編輯資料表定義 Table 資料表 Advanced Database schema Make this a 'WITHOUT rowid' table. Setting this flag requires a field of type INTEGER with the primary key flag set and the auto increment flag unset. Without Rowid Fields 欄位 Add field 加入欄位 Remove field 刪除欄位 Move field up 上移欄位 Move field down 下移欄位 Name 名稱 Type 類型 NN Not null 非空 PK PK Primary key 主鍵 AI AI Autoincrement 自動增值 U Unique Default 預設 Default value 預設值 Check 檢查 Check constraint 檢查約束條件 Foreign Key <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">Warning: </span>There is something with this table definition that our parser doesn't fully understand. Modifying and saving this table might result in problems.</p></body></html> Error creating table. Message from database engine: %1 建立資料表時出現錯誤。來自資料庫引擎的消息: %1 There already is a field with that name. Please rename it first or choose a different name for this field. There is at least one row with this field set to NULL. This makes it impossible to set this flag. Please change the table data first. 至少有一行帶本欄位的記錄被設為空。這使得它不可能設定這個標誌。請首先修改資料表資料。 There is at least one row with a non-integer value in this field. This makes it impossible to set the AI flag. Please change the table data first. 在這個欄位中至少有一行帶有一個非整數的值。這使得它不可能設定 AI 標誌。請首先修改資料表資料。 This column is referenced in a foreign key in table %1 and thus its name cannot be changed. Column '%1' has duplicate data. This makes it impossible to enable the 'Unique' flag. Please remove the duplicate data, which will allow the 'Unique' flag to then be enabled. Modifying this column failed. Error returned from database: %1 Are you sure you want to delete the field '%1'? All data currently stored in this field will be lost. 您是否確認您想刪除欄位 '%1'? 目前存儲在這個欄位中的所有資料將會遺失。 Please add a field which meets the following criteria before setting the without rowid flag: - Primary key flag set - Auto increment disabled Setting the rowid column for the table failed. Error message: %1 Changing the table schema failed. Error message: %1 ExportDataDialog Export data as CSV 匯出資料為 CSV &Table 資料表(&T) &Column names in first line 列名在首行(&C) Field &separator 欄位分隔符號(&S) Tab&le(s) Colu&mn names in first line Fie&ld separator , , ; ; Tab Tab | | Other 其它 &Quote character 引號(&Q) " " ' ' New line characters Windows: CR+LF (\r\n) Unix: LF (\n) Pretty print Could not open output file: %1 Choose a filename to export data 選擇匯出資料的檔案名稱 Text files(*.csv *.txt) 文字檔案(*.csv *.txt) Export data as JSON exporting CSV exporting JSON Text files(*.json *.js *.txt) Please select at least 1 table. Choose a directory 選擇一個目錄 Export completed. 匯出完成。 Could not open output file. 無法打開輸出檔案。 ExportSqlDialog Export SQL... Tab&le(s) Select All Deselect All &Options Keep column names in INSERT INTO Multiple rows (VALUES) per INSERT statement Export everything Export schema only Export data only Keep old schema (CREATE TABLE IF NOT EXISTS) Overwrite old schema (DROP TABLE, then CREATE TABLE) Please select at least one table. Choose a filename to export 選擇要匯出的檔案名稱 Text files(*.sql *.txt) 文字檔案(*.sql *.txt) Export completed. 匯出完成。 Export cancelled or failed. 匯出取消或失敗。 ExtendedScintilla Ctrl+H Ctrl+P Ctrl+P Find and Replace... Print... ExtendedTableWidget Use as Exact Filter Containing Not equal to Greater than Less than Greater or equal Less or equal Between this and... Set to NULL Copy Copy with Headers Copy as SQL Paste Print... Use in Filter Expression Alt+Del Ctrl+Shift+C Ctrl+Alt+C The content of the clipboard is bigger than the range selected. Do you want to insert it anyway? FileExtensionManager File Extension Manager &Up &Down &Add &Remove Description Extensions *.extension FilterLineEdit Filter 過濾 These input fields allow you to perform quick filters in the currently selected table. By default, the rows containing the input text are filtered out. The following operators are also supported: % Wildcard > Greater than < Less than >= Equal to or greater <= Equal to or less = Equal to: exact match <> Unequal: exact inverse match x~y Range: values between x and y Set Filter Expression What's This? 這是什麼? Is NULL Is not NULL Is empty Is not empty Equal to... Not equal to... Greater than... Less than... Greater or equal... Less or equal... In range... FilterTableHeader Filter 過濾 FindReplaceDialog Find and Replace Fi&nd text: Re&place with: Match &exact case Match &only whole words When enabled, the search continues from the other end when it reaches one end of the page &Wrap around When set, the search goes backwards from cursor position, otherwise it goes forward Search &backwards <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Use regular e&xpressions Find the next occurrence from the cursor position and in the direction set by "Search backwards" &Find Next &Replace Highlight all the occurrences of the text in the page F&ind All Replace all the occurrences of the text in the page Replace &All The searched text was not found The searched text was not found. The searched text was found one time. The searched text was found %1 times. The searched text was replaced one time. The searched text was replaced %1 times. ForeignKeyEditor &Reset Foreign key clauses (ON UPDATE, ON DELETE etc.) ImportCsvDialog Import CSV file 匯入 CSV 檔案 &Table name 資料表名稱(&T) Table na&me &Column names in first line 列名在首行(&C) Field &separator 欄位分隔符號(&S) , , ; ; Tab Tab | ; Other 其它 &Quote character 引號(&Q) " ; ' ' &Encoding UTF-8 UTF-16 ISO-8859-1 Trim fields? Separate tables Advanced When importing an empty value from the CSV file into an existing table with a default value for this column, that default value is inserted. Activate this option to insert an empty value instead. Ignore default &values Activate this option to stop the import when trying to import an empty value into a NOT NULL column without a default value. Fail on missing values Disable data type detection Disable the automatic data type detection when creating a new table. Deselect All Match Similar Select All Inserting data... 正在插入資料... Cancel 取消 There is already a table of that name and an import into an existing table is only possible if the number of columns match. 已有同名的資料表,並且匯入只有在列數相符的情況下才能匯入到一個現有的資料表。 There is already a table of that name. Do you want to import the data into it? 已有同名的資料表。您是否想匯入資料到其中? Import completed 匯入完成 There is already a table named '%1' and an import into an existing table is only possible if the number of columns match. There is already a table named '%1'. Do you want to import the data into it? Creating restore point failed: %1 Creating the table failed: %1 importing CSV Importing the file '%1' took %2ms. Of this %3ms were spent in the row function. Inserting row failed: %1 MainWindow SQLiteBrowser SQLiteBrowser Database &Structure 資料庫結構(&S) toolBar1 &Browse Data 瀏覽資料(&B) Table: 資料表: Select a table to browse data 選擇一個資料表以瀏覽資料 Use this list to select a table to be displayed in the database view 使用這個清單選擇一個要顯示在資料庫視圖中的資料表 Refresh the data in the selected table. 更新選擇的資料表中的資料。 This button refreshes the data in the currently selected table. 這個按鈕更新在目前選擇的資料表中的資料。 Opens the SQLCipher FAQ in a browser window Export one or more table(s) to a JSON file Refresh F5 F5 Insert a new record in the current table 在目前資料表中插入一條新記錄 This button creates a new, empty record in the database 這個按鈕在資料庫中建立一條新的空白記錄 New Record 新建記錄 Delete the current record 刪除目前記錄 This button deletes the record currently selected in the database 這個按鈕刪除在資料庫中目前選擇的記錄 Delete Record 刪除記錄 This is the database view. You can double-click any record to edit its contents in the cell editor window. 這是資料庫視圖。您可以按兩下任何記錄,在儲存格編輯器視窗中編輯記錄內容。 < < 0 - 0 of 0 0 - 0 / 0 > > Scroll 100 records upwards 上滾 100 條記錄 DB Browser for SQLite &Table: Clear all filters <html><head/><body><p>Scroll to the beginning</p></body></html> <html><head/><body><p>Clicking this button navigates to the beginning in the table view above.</p></body></html> |< <html><head/><body><p>Clicking this button navigates 100 records upwards in the table view above.</p></body></html> <html><head/><body><p>點擊這個按鈕在上面的資料表視圖中向上導航 100 條記錄。</p></body></html> <html><head/><body><p>Scroll 100 records downwards</p></body></html> <html><head/><body><p>下滾 100 條記錄</p></body></html> <html><head/><body><p>Clicking this button navigates 100 records downwards in the table view above.</p></body></html> <html><head/><body><p>點擊這個按鈕在上面的資料表視圖中向下導航 100 條記錄。</p></body></html> Scroll to the end <html><head/><body><p>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Clicking this button navigates up to the end in the table view above.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</p></body></html> >| <html><head/><body><p>Click here to jump to the specified record</p></body></html> <html><head/><body><p>點擊這裡跳到指定的記錄</p></body></html> <html><head/><body><p>This button is used to navigate to the record number specified in the Go to area.</p></body></html> <html><head/><body><p>這個按鈕用於導航到在“轉到”區域中指定的記錄編號。</p></body></html> Go to: 轉到: Enter record number to browse 輸入要瀏覽的記錄編號 Type a record number in this area and click the Go to: button to display the record in the database view 在這個區域中輸入一個記錄編號,並點擊“轉到:”按鈕以在資料庫視圖中顯示記錄 1 1 Edit &Pragmas 編輯雜注(&P) <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">Auto Vacuum</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_auto_vacuum"><span style=" text-decoration: underline; color:#0000ff;">自動真空</span></a></p></body></html> None Full 完整 Incremental 增加 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">Automatic Index</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_automatic_index"><span style=" text-decoration: underline; color:#0000ff;">自動化索引</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Checkpoint Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_checkpoint_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">檢查點完全 FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">Foreign Keys</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_foreign_keys"><span style=" text-decoration: underline; color:#0000ff;">外鍵</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">Full FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_fullfsync"><span style=" text-decoration: underline; color:#0000ff;">完全 FSYNC</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">Ignore Check Constraints</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_ignore_check_constraints"><span style=" text-decoration: underline; color:#0000ff;">忽略檢查約束</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">Journal Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_mode"><span style=" text-decoration: underline; color:#0000ff;">日誌模式</span></a></p></body></html> Delete 刪除 Truncate 裁截 Persist 永久 Memory 記憶體 WAL WAL Off <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">Journal Size Limit</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_journal_size_limit"><span style=" text-decoration: underline; color:#0000ff;">日誌大小限制</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">Locking Mode</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_locking_mode"><span style=" text-decoration: underline; color:#0000ff;">鎖定模式</span></a></p></body></html> Normal 正常 Exclusive 獨佔 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">Max Page Count</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_max_page_count"><span style=" text-decoration: underline; color:#0000ff;">最大頁數</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">Page Size</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_page_size"><span style=" text-decoration: underline; color:#0000ff;">頁面大小</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">Recursive Triggers</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_recursive_triggers"><span style=" text-decoration: underline; color:#0000ff;">遞迴觸發器</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">Secure Delete</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_secure_delete"><span style=" text-decoration: underline; color:#0000ff;">安全刪除</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">Synchronous</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_synchronous"><span style=" text-decoration: underline; color:#0000ff;">同步</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">Temp Store</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_temp_store"><span style=" text-decoration: underline; color:#0000ff;">臨時存儲</span></a></p></body></html> Default 預設 File 檔案 <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">User Version</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_user_version"><span style=" text-decoration: underline; color:#0000ff;">用戶版本</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL Auto Checkpoint</span></a></p></body></html> <html><head/><body><p><a href="http://www.sqlite.org/pragma.html#pragma_wal_autocheckpoint"><span style=" text-decoration: underline; color:#0000ff;">WAL 自動檢查點</span></a></p></body></html> Open an existing database file in read only mode Unlock view editing This unlocks the current view for editing. However, you will need appropriate triggers for editing. E&xecute SQL 執行 SQL(&X) &File 檔案(&F) &Import 匯入(&I) &Export 匯出(&E) &Edit 編輯(&E) &View 查看(&V) &Help 幫助(&H) Edit Database &Cell DB Sche&ma &Remote Execute current line [Shift+F5] This button executes the SQL statement present in the current editor line Shift+F5 Shift+F5 Save SQL file as This button saves the content of the current SQL editor tab to a file &Browse Table Copy Create statement Copy the CREATE statement of the item to the clipboard Edit display format Edit the display format of the data in this column Show rowid column Toggle the visibility of the rowid column Set encoding Change the encoding of the text in the table cells Set encoding for all tables Change the default encoding assumed for all tables in the database toolBar toolBar SQL Log SQL 日誌 &Show SQL submitted by 顯示 SQL 提交自(&S) User 用戶 Application 應用程式 &Clear 清除(&C) Plot 圖表 Columns 列列 X X Y Y _ _ Save current plot... 儲存目前圖表... &New Database... 新建資料庫(&N)... Create a new database file 建立一個新的資料庫檔 This option is used to create a new database file. 這個選項用於建立一個新的資料庫檔案。 Ctrl+N Ctrl+N &Open Database... 打開資料庫(&O)... Open an existing database file 打開一個現有的資料庫檔 This option is used to open an existing database file. 這個選項用於打開一個現有的資料庫檔案。 Ctrl+O Ctrl+O &Close Database 關閉資料庫(&C) Ctrl+W Ctrl+W Revert Changes 復原修改 Revert database to last saved state 把資料庫退回到先前儲存的狀態 This option is used to revert the current database file to its last saved state. All changes made since the last save operation are lost. 這個選項用於倒退目前的資料庫檔為它最後的儲存狀態。從最後儲存操作開始做出的所有修改將會遺失。 Write Changes 寫入修改 Write changes to the database file 把修改寫入到資料庫檔 This option is used to save changes to the database file. 這個選項用於儲存修改到資料庫檔案。 Ctrl+S Ctrl+S Compact Database 壓縮資料庫 Compact the database file, removing space wasted by deleted records 壓縮資料庫檔,通過刪除記錄去掉浪費的空間 Compact the database file, removing space wasted by deleted records. 壓縮資料庫檔,通過刪除記錄去掉浪費的空間。 E&xit 退出(&X) Ctrl+Q Ctrl+Q Database from SQL file... 來自 SQL 檔案的資料庫... Import data from an .sql dump text file into a new or existing database. 從一個 .sql 轉儲文字檔中匯入資料到一個新的或已有的資料庫。 This option lets you import data from an .sql dump text file into a new or existing database. SQL dump files can be created on most database engines, including MySQL and PostgreSQL. 這個選項讓你從一個 .sql 轉儲文字檔中匯入資料到一個新的或現有的資料庫。SQL 轉儲檔可以在大多數資料庫引擎上建立,包括 MySQL 和 PostgreSQL。 Table from CSV file... 資料表來自 CSV 檔案... Open a wizard that lets you import data from a comma separated text file into a database table. 打開一個引導精靈讓您從一個逗號間隔的文字檔匯入資料到一個資料庫資料表中。 Open a wizard that lets you import data from a comma separated text file into a database table. CSV files can be created on most database and spreadsheet applications. 打開一個引導精靈讓您從一個逗號間隔的文字檔匯入資料到一個資料庫資料表中。CSV 檔可以在大多數資料庫和試算資料表應用程式上建立。 Database to SQL file... 資料庫到 SQL 檔案... Export a database to a .sql dump text file. 匯出一個資料庫導一個 .sql 轉儲文字檔案。 This option lets you export a database to a .sql dump text file. SQL dump files contain all data necessary to recreate the database on most database engines, including MySQL and PostgreSQL. 這個選項讓你匯出一個資料庫導一個 .sql 轉儲文字檔案。SQL 轉儲檔包含在大多數資料庫引擎上(包括 MySQL 和 PostgreSQL)重新建立資料庫所需的所有資料。 Table as CSV file... 資料表為 CSV 檔案... Export a database table as a comma separated text file. 匯出一個資料庫資料表為逗號間隔的文字檔案。 Export a database table as a comma separated text file, ready to be imported into other database or spreadsheet applications. 匯出一個資料庫資料表為逗號間隔的文字檔,準備好被匯入到其他資料庫或試算資料表應用程式。 Create Table... 建立資料表... Open the Create Table wizard, where it is possible to define the name and fields for a new table in the database 打開“建立資料表”引導精靈,在那裡可以定義在資料庫中的一個新資料表的名稱和欄位 Delete Table... 刪除資料表... Open the Delete Table wizard, where you can select a database table to be dropped. 打開“刪除資料表”引導精靈,在那裡你可以選擇要丟棄的一個資料庫資料表。 Modify Table... 修改資料表... Open the Modify Table wizard, where it is possible to rename an existing table. It is also possible to add or delete fields form a table, as well as modify field names and types. 打開“修改資料表”引導精靈,在其中可以重命名一個現有的資料表。也可以從一個資料表中加入或刪除欄位,以及修改欄位名稱和類型。 Create Index... 建立索引... Open the Create Index wizard, where it is possible to define a new index on an existing database table. 打開“建立索引”引導精靈,在那裡可以在一個現有的資料庫資料表上定義一個新索引。 &Preferences... 偏好選項(&P)... Open the preferences window. 打開首選項視窗。 &DB Toolbar 資料庫工具列(&D) Shows or hides the Database toolbar. 顯示或隱藏資料庫工具列。 What's This? 這是什麼? Shift+F1 Shift+F1 &About... 關於(&A)... &Recently opened 最近打開(&R) Open &tab 打開標籤頁(&T) Ctrl+T Ctrl+T Database Structure This is the structure of the opened database. You can drag SQL statements from an object row and drop them into other applications or into another instance of 'DB Browser for SQLite'. Browse Data Refresh the data in the selected table [F5, Ctrl+R] This button clears all the filters set in the header input fields for the currently browsed table. Save the table as currently displayed <html><head/><body><p>This popup menu provides the following options applying to the currently browsed and filtered table:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Export to CSV: this option exports the data of the browsed table as currently displayed (after filters, display formats and order column) to a CSV file.</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Save as view: this option saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</li></ul></body></html> ... ... Print currently browsed table data [Ctrl+P] Print currently browsed table data. Print selection if more than one cell is selected. <html><head/><body><p>This button creates a new record in the database. Hold the mouse button to open a pop-up menu of different options:</p><ul><li><span style=" font-weight:600;">New Record</span>: insert a new record with default values in the database.</li><li><span style=" font-weight:600;">Insert Values...</span>: open a dialog for entering values before they are inserted in the database. This allows to enter values acomplishing the different constraints. This dialog is also open if the <span style=" font-weight:600;">New Record</span> option fails due to these constraints.</li></ul></body></html> This button deletes the record or records currently selected in the table This is the database table view. You can do the following actions: - Start writing for editing inline the value. - Double-click any record to edit its contents in the cell editor window. - Alt+Del for deleting the cell content to NULL. - Ctrl+" for duplicating the current record. - Ctrl+' for copying the value from the cell above. - Standard selection and copy/paste operations. Scroll one page upwards <html><head/><body><p>Clicking this button navigates one page of records upwards in the table view above.</p></body></html> Scroll one page downwards <html><head/><body><p>Clicking this button navigates one page of records downwards in the table view above.</p></body></html> Edit Pragmas Warning: this pragma is not readable and this value has been inferred. Writing the pragma might overwrite a redefined LIKE provided by an SQLite extension. Execute SQL &Tools DB Toolbar SQL &Log Show S&QL submitted by This button clears the contents of the SQL logs This panel lets you examine a log of all SQL commands issued by the application or by yourself &Plot This is the structure of the opened database. You can drag multiple object names from the Name column and drop them into the SQL editor and you can adjust the properties of the dropped names using the context menu. This would help you in composing SQL statements. You can drag SQL statements from the Schema column and drop them into the SQL editor or into other applications. Project Toolbar Extra DB toolbar Close the current database file This button closes the connection to the currently open database file &Revert Changes &Write Changes Compact &Database... Execute all/selected SQL [F5, Ctrl+Return, Ctrl+R] This button executes the currently selected SQL statements. If no text is selected, all SQL statements are executed. This button opens a file containing SQL statements and loads it in a new editor tab &Load Extension... &Wiki Bug &Report... Feature Re&quest... Web&site &Donate on Patreon... Sa&ve Project... This button lets you save all the settings associated to the open DB to a DB4S project file Open &Project... This button lets you open a DB4S project file &Attach Database... Add another database file to the current database connection This button lets you add another database file to the current database connection &Set Encryption... SQLCipher &FAQ Table(&s) to JSON... Open Data&base Read Only... Save results Save the results view This button lets you save the results of the last executed query Find text in SQL editor Find text in SQL editor [Ctrl+F] This button opens the search bar of the editor Ctrl+F Find or replace text in SQL editor Find or replace text in SQL editor [Ctrl+H] This button opens the find/replace dialog for the current editor tab Export to &CSV 匯出到 &CSV Save as &view 儲存為視圖(&V) Save as view 儲存為視圖 Hide column(s) Hide selected column(s) Show all columns Show all columns that were hidden Shows or hides the Project toolbar. Extra DB Toolbar Export the filtered data to CSV This button exports the data of the browsed table as currently displayed (after filters, display formats and order column) as a CSV file. Save the current filter, sort column and display formats as a view This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements. Insert Values... Open a dialog for inserting values in a new record Insert new record using default values in browsed table New In-&Memory Database Drag && Drop Qualified Names Use qualified names (e.g. "Table"."Field") when dragging the objects and dropping them into the editor Drag && Drop Enquoted Names Use escaped identifiers (e.g. "Table1") when dragging the objects and dropping them into the editor &Integrity Check Runs the integrity_check pragma over the opened database and returns the results in the Execute SQL tab. This pragma does an integrity check of the entire database. &Foreign-Key Check Runs the foreign_key_check pragma over the opened database and returns the results in the Execute SQL tab &Quick Integrity Check Run a quick integrity check over the open DB Runs the quick_check pragma over the opened database and returns the results in the Execute SQL tab. This command does most of the checking of PRAGMA integrity_check but runs much faster. &Optimize Attempt to optimize the database Runs the optimize pragma over the opened database. This pragma might perform optimizations that will improve the performance of future queries. Print Print text from current SQL editor tab [Ctrl+P] Open a dialog for printing the text in the current SQL editor tab Print the structure of the opened database [Ctrl+P] Open a dialog for printing the structure of the opened database &Database from SQL file... &Table from CSV file... &Database to SQL file... &Table(s) as CSV file... &Create Table... &Delete Table... &Modify Table... Create &Index... W&hat's This? &About This button opens a new tab for the SQL editor &Execute SQL 執行 SQL(&E) Execute SQL [F5, Ctrl+Return] 執行 SQL [F5, Ctrl+ Enter] &Wiki... 維基百科(&W)... Bug &report... 錯誤報告(&R)... Web&site... 網站(&S)... Save Project 儲存專案 Save the current session to a file 儲存目前會話到一個檔案 Open Project 打開專案 Load a working session from a file 從一個檔載入工作會話 Open SQL file 打開 SQL 檔案 <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>儲存目前圖表...</p><p>檔案格式按副檔名選擇(png, jpg, pdf, bmp)</p></body></html> Save SQL file 儲存 SQL 檔案 Load extension 載入擴充套件 Execute current line 執行目前行 Execute current line [Ctrl+E] 執行目前行 [Ctrl+E] Ctrl+E Ctrl+E Export as CSV file 匯出為 CSV 檔案 Export table as comma separated values file 匯出資料表為逗號間隔值檔案 Ctrl+L Ctrl+L Ctrl+P Ctrl+P Database encoding 資料庫編碼 Choose a database file 選擇一個資料庫檔案 Ctrl+Return Ctrl+Return Ctrl+D Ctrl+I Encrypted Database is encrypted using SQLCipher Read only Database file is read only. Editing the database is disabled. Could not open database file. Reason: %1 Choose a filename to save under 選擇一個檔案名稱儲存 Error adding record: 加入記錄時出現錯誤: Error deleting record: %1 刪除記錄時出現錯誤: %1 Please select a record first 請首先選擇一條記錄 %1 - %2 of %3 %1 - %2 / %3 There is no database opened. Please open or create a new database file. 沒有打開資料庫。請打開或建立一個新的資料庫檔案。 Are you sure you want to delete the %1 '%2'? All data associated with the %1 will be lost. 您是否確認您想刪除 %1 '%2'? 所有和 %1 關聯的資料將會遺失。 Error: could not delete the %1. Message from database engine: %2 錯誤: 無法刪除 %1。消息來自資料庫引擎: %2 There is no database opened. 沒有資料庫打開。 , %1 rows affected At line %1: Result: %2 Error while saving the database file. This means that not all changes to the database were saved. You need to resolve the following error first. %1 Extensions(*.so *.dylib *.dll);;All files(*) A new DB Browser for SQLite version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. DB Browser for SQLite project file (*.sqbpro) Please choose a new encoding for this table. Please choose a new encoding for all tables. Error checking foreign keys after table modification. The changes will be reverted. This table did not pass a foreign-key check.<br/>You should run 'Tools | Foreign-Key Check' and fix the reported issues. %1 Leave the field empty for using the database encoding. This encoding is either not valid or not supported. Cancel 取消 %1 Rows returned from: %2 (took %3ms) %1 行返回自: %2 (耗時 %3毫秒) Error executing query: %1 執行查詢時出現錯誤: %1 Query executed successfully: %1 (took %2ms) 查詢執行成功: %1 (耗時 %2毫秒) Choose a text file 選擇一個文字檔 Text files(*.csv *.txt);;All files(*) 文字檔案(*.csv *.txt);;所有擋檔案(*) Import completed 匯入完成 Are you sure you want to undo all changes made to the database file '%1' since the last save? 您是否確認您想撤銷從上次儲存以來對資料庫檔‘%1’做出的所有修改。? Choose a filename to export 選擇要匯出的檔案名稱 Text files(*.sql *.txt) 文字檔案(*.sql *.txt) Export cancelled or failed. 匯出取消或失敗。 Export completed. 匯出完成。 Choose a file to import 選擇要匯入的一個檔案 Text files(*.sql *.txt);;All files(*) 文字檔案(*.sql *.txt);;所有擋檔案(*) Do you want to create a new database file to hold the imported data? If you answer no we will attempt to import the data in the SQL file to the current database. 您是否確認您想建立一個新的資料庫檔用來存放匯入的資料? 如果您會到“否”的話,我們將嘗試匯入 SQL 檔中的資料到目前資料庫。 File %1 already exists. Please choose a different name. 檔案 %1 已存在。請選擇一個不同的名稱。 Error importing data: %1 匯入資料時出現錯誤: %1 Import completed. 匯入完成。 Delete View 刪除視圖 Delete Trigger 刪除觸發器 Delete Index 刪除索引 Delete Table 刪除資料表 &%1 %2 &%1 %2 Setting PRAGMA values will commit your current transaction. Are you sure? 設定 PRAGMA 值將會提交您的目前事務。. 您確認嗎? Execution aborted by user In-Memory database determining row count... %1 - %2 of >= %3 Are you sure you want to delete the table '%1'? All data associated with the table will be lost. Are you sure you want to delete the view '%1'? Are you sure you want to delete the trigger '%1'? Are you sure you want to delete the index '%1'? Error: could not delete the table. Error: could not delete the view. Error: could not delete the trigger. Error: could not delete the index. Message from database engine: %1 Editing the table requires to save all pending changes now. Are you sure you want to save the database? -- EXECUTING SELECTION IN '%1' -- -- EXECUTING LINE IN '%1' -- -- EXECUTING ALL IN '%1' -- Setting PRAGMA values or vacuuming will commit your current transaction. Are you sure? executing query %1 rows returned in %2ms query executed successfully. Took %1ms%2 Choose text files Import completed. Some foreign key constraints are violated. Please fix them before saving. Modify View Modify Trigger Modify Index Modify Table Select SQL file to open 選擇要打開的 SQL 檔案 Couldn't read file: %1. Couldn't save file: %1. Select file name 選擇檔案名稱 Select extension file 選擇擴充套件檔 Extensions(*.so *.dll);;All files(*) 擴充套件(*.so *.dll);;所有擋檔案(*) Extension successfully loaded. 擴充套件成功載入。 Error loading extension: %1 載入擴充套件時出現錯誤: %1 Don't show again 不再顯示 New version available. 新版本可用。 Choose a project file to open This project file is using an old file format because it was created using DB Browser for SQLite version 3.10 or lower. Loading this file format is still fully supported but we advice you to convert all your project files to the new file format because support for older formats might be dropped at some point in the future. You can convert your files by simply opening and re-saving them. Duplicate records Duplicate record Ctrl+" Please enter a pseudo-primary key in order to enable editing on this view. This should be the name of a unique column in the view. Collation needed! Proceed? A table in this database requires a special collation function '%1' that this application can't provide without further knowledge. If you choose to proceed, be aware bad things can happen to your database. Create a backup! creating collation Set a new name for the SQL tab. Use the '&&' character to allow using the following character as a keyboard shortcut. Please specify the view name 請指定視圖名稱 There is already an object with that name. Please choose a different name. 已有相同名稱的對象。請選擇一個不同的名稱。 View successfully created. 成功建立視圖。 Error creating view: %1 建立視圖時出現錯誤: %1 There is no filter set for this table. View will not be created. Delete Records This action will open a new SQL tab for running: Press Help for opening the corresponding SQLite reference page. A new sqlitebrowser version is available (%1.%2.%3).<br/><br/>Please download at <a href='%4'>%4</a>. 有新版本的 sqlitebrowser (%1.%2.%3)可用。<br/><br/>請從 <a href='%4'>%4</a> 下載。 Choose a axis color 選擇一個軸的顏色 PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;所有擋檔案(*) Choose a file to open 選擇要打開的一個檔案 SQLiteBrowser project(*.sqbpro) SQLiteBrowser 工程(*.sqbpro) Invalid file format. 無效檔案格式。 NullLineEdit Set to NULL Alt+Del PlotDock Plot 圖表 <html><head/><body><p>This pane shows the list of columns of the currently browsed table or the just executed query. You can select the columns that you want to be used as X or Y axis for the plot pane below. The table shows detected axis type that will affect the resulting plot. For the Y axis you can only select numeric columns, but for the X axis you will be able to select:</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date/Time</span>: strings with format &quot;yyyy-MM-dd hh:mm:ss&quot; or &quot;yyyy-MM-ddThh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Date</span>: strings with format &quot;yyyy-MM-dd&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Time</span>: strings with format &quot;hh:mm:ss&quot;</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Label</span>: other string formats. Selecting this column as X axis will produce a Bars plot with the column values as labels for the bars</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Numeric</span>: integer or real values</li></ul><p>Double-clicking the Y cells you can change the used color for that graph.</p></body></html> Columns 列列 X X Y Y _ _ Axis Type Here is a plot drawn when you select the x and y values above. Click on points to select them in the plot and in the table. Ctrl+Click for selecting a range of points. Use mouse-wheel for zooming and mouse drag for changing the axis range. Select the axes or axes labels to drag and zoom only in that orientation. Line type: None Line StepLeft StepRight StepCenter Impulse Point shape: Cross Plus Circle Disc Square Diamond Star Triangle TriangleInverted CrossSquare PlusSquare CrossCircle PlusCircle Peace <html><head/><body><p>Save current plot...</p><p>File format chosen by extension (png, jpg, pdf, bmp)</p></body></html> <html><head/><body><p>儲存目前圖表...</p><p>檔案格式按副檔名選擇(png, jpg, pdf, bmp)</p></body></html> Save current plot... 儲存目前圖表... Load all data and redraw plot Row # Choose a axis color 選擇一個軸的顏色 Copy Print... Show legend Stacked bars Date/Time Date Time Numeric Label Invalid Load all data and redraw plot. Warning: not all data has been fetched from the table yet due to the partial fetch mechanism. Choose an axis color Choose a filename to save under 選擇一個檔案名稱儲存 PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;All Files(*) PNG(*.png);;JPG(*.jpg);;PDF(*.pdf);;BMP(*.bmp);;所有擋檔案(*) There are curves in this plot and the selected line style can only be applied to graphs sorted by X. Either sort the table or query by X to remove curves or select one of the styles supported by curves: None or Line. Cancel 取消 PreferencesDialog Preferences 首選項 &General Remember last location Always use this location Remember last location for session only Lan&guage Show remote options Automatic &updates &Database 資料庫(&D) Database &encoding 資料庫編碼(&E) Open databases with foreign keys enabled. 打開啟用了外鍵的資料庫。 &Foreign keys 外鍵(&F) enabled 啟用 Default &location 預設位置(&L) ... ... &Prefetch block size 預取塊尺寸(&P) Remove line breaks in schema &view Prefetch block si&ze Advanced SQ&L to execute after opening database Default field type Data &Browser Font &Font Content Symbol limit in cell NULL Regular Text 純文字檔案 Binary 二進位 Background Filters Escape character Delay time (&ms) Set the waiting time before a new filter value is applied. Can be set to 0 for disabling waiting. &SQL &SQL Settings name 設定名稱 Context 上下文 Colour 顏色 Bold 粗體 Italic 斜體 Underline 底線 Keyword 關鍵字 function 函數 Function 函數 Table 資料表 Comment 注釋 Identifier 識別符 String 字串 currentline 目前行 Current line 目前行 SQL &editor font size SQL 編輯器字體大小(&E) SQL &log font size SQL 日誌字體大小(&L) Tab size SQL editor &font Error indicators Hori&zontal tiling If enabled the SQL code editor and the result table view are shown side by side instead of one over the other. Code co&mpletion Toolbar style Only display the icon Only display the text The text appears beside the icon The text appears under the icon Follow the style DB file extensions Manage When enabled, the line breaks in the Schema column of the DB Structure tab, dock and printed output are removed. Font si&ze This is the maximum number of rows in a table for enabling the value completion based on current values in the column. Can be set to 0 for disabling completion. Row count threshold for completion Field display Displayed &text Text color Background color Preview only (N/A) Foreground SQL &results font size &Wrap lines Never At word boundaries At character boundaries At whitespace boundaries &Quotes for identifiers Choose the quoting mechanism used by the application for identifiers in SQL code. "Double quotes" - Standard SQL (recommended) `Grave accents` - Traditional MySQL quotes [Square brackets] - Traditional MS SQL Server quotes Keywords in &UPPER CASE When set, the SQL keywords are completed in UPPER CASE letters. When set, the SQL code lines that caused errors during the last execution are highlighted and the results frame indicates the error in the background &Extensions 擴充套件(&E) Select extensions to load for every database: 選擇每個資料庫要載入的擴充套件: Add extension 加入擴充套件 Remove extension 刪除擴充套件 <html><head/><body><p>While supporting the REGEXP operator SQLite doesn't implement any regular expression<br/>algorithm but calls back the running application. DB Browser for SQLite implements this<br/>algorithm for you to let you use REGEXP out of the box. However, as there are multiple possible<br/>implementations of this and you might want to use another one, you're free to disable the<br/>application's implementation and load your own by using an extension. Requires restart of the application.</p></body></html> Disable Regular Expression extension <html><head/><body><p>SQLite provides an SQL function for loading extensions from a shared library file. Activate this if you want to use the <span style=" font-style:italic;">load_extension()</span> function from SQL code.</p><p>For security reasons, extension loading is turned off by default and must be enabled through this setting. You can always load extensions through the GUI, even though this option is disabled.</p></body></html> Allow loading extensions from SQL code Remote CA certificates Subject CN Common Name Subject O Organization Valid from Valid to Serial number Your certificates File 檔案 Subject Common Name Issuer CN Issuer Common Name Clone databases into Choose a directory 選擇一個目錄 The language will change after you restart the application. Select extension file 選擇擴充套件檔 Extensions(*.so *.dll);;All files(*) 擴充套件(*.so *.dll);;所有擋檔案(*) Extensions(*.so *.dylib *.dll);;All files(*) Import certificate file No certificates found in this file. Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. QObject Error importing data. Message from database engine: %1 匯入資料庫時出現錯誤。消息來自資料庫引擎: %1 File is not a SQLite 3 database 檔案不是 SQLite 3 資料庫 File could not be read 檔案無法讀取 no error 無錯誤 Do you want to save the changes made to the database file %1? 您是否想儲存對資料庫檔案 %1 做出的修改? Exporting database to SQL file... 正在匯出資料庫到 SQL 檔案... Error importing data from record number %1 . %1 Importing CSV file... Cancel 取消 Executing SQL... 正在執行 SQL... Action cancelled. 操作已取消。 Error in statement #%1: %2. Aborting execution. 錯誤在語句 #%1: %2。 正在放棄執行。 renameColumn: cannot find table %1. renameColumn: 無法查閱資料資料表 %1。 renameColumn: cannot find column %1. renameColumn: 無法查詢列 %1。 renameColumn: creating savepoint failed. DB says: %1 renameColumn: 建立保存點時失敗。DB 說: %1 renameColumn: creating new table failed. DB says: %1 renameColumn: 建立新資料表時失敗。DB 說: %1 renameColumn: copying data to new table failed. DB says: %1 renameColumn: 複製資料到新資料表時失敗。DB 說: %1 renameColumn: deleting old table failed. DB says: %1 renameColumn: 刪除舊資料表失敗。DB 說: %1 Restoring some of the objects associated with this table failed. This is most likely because some column names changed. Here's the SQL statement which you might want to fix and execute manually: 還原某些和這個資料表關聯的物件失敗。這個最可能是因為某些列的名稱修改了。這裡是您可能需要手動修復和執行的 SQL 語句: renameColumn: releasing savepoint failed. DB says: %1 renameColumn: 釋放保存點時失敗。DB 說: %1 Error renaming table '%1' to '%2'.Message from database engine: %3 重命名資料表 '%1' 為 '%2'時失敗。消息來自資料庫引擎: %3 ... <string can not be logged, contains binary data> ... ... <字串無法記錄,包含二進位資料> ... unknown object type %1 未知對象類型 %1 could not get list of db objects: %1, %2 無法取得資料庫物件的列表: %1, %2 could not get types 無法取得類型 Decoding CSV file... 正在解析 CSV 檔... didn't receive any output from pragma %1 無法接受來自雜注 %1 的任何輸出 could not execute pragma command: %1, %2 無法執行雜注命令: %1, %2 Error setting pragma %1 to %2: %3 設定雜注 %1 為 %2 時出現錯誤: %3 File not found. 找不到檔案。 All files (*) SQLite database files (*.db *.sqlite *.sqlite3 *.db3) RemoteDatabase Error when connecting to %1. %2 Error opening remote file at %1. %2 Error: Invalid client certificate specified. Please enter the passphrase for this client certificate in order to authenticate. Cancel 取消 Uploading remote database to %1 Downloading remote database from %1 The remote database has been updated since the last checkout. Do you want to update the local database to the newest version? Note that this discards any changes you have made locally! If you don't want to lose local changes, click No to open the local version. Error: The network is not accessible. Error: Cannot open the file for sending. Error opening local databases list. %1 Error creating local databases list. %1 RemoteDock Remote Identity Connect to the remote server using the currently selected identity. The correct server is taken from the identity as well. Go Push currently opened database to server <html><head/><body><p>In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:</p><ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Login to the dbhub.io website (use your GitHub credentials or whatever you want)</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.</li></ol><p>Now the Remote panel shows your identity and you can add remote databases.</p></body></html> RemoteModel Name 名稱 Version 版本 Last modified Size Commit bytes RemotePushDialog Push database Database na&me to push to Commit message <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Oxygen-Sans'; font-size:10pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> Database licence Public Branch Force push Database will be public. Everyone has read access to it. Database will be private. Only you have access to it. Use with care. This can cause remote commits to be deleted. Unspecified SqlExecutionArea Form 表單 Find previous match [Shift+F3] Find previous match with mapping Shift+F3 Shift+F3 The found pattern must be a whole word Whole Words Text pattern to find considering the checks in this frame Find in editor The found pattern must match in letter case Case Sensitive Find next match [Enter, F3] Find next match with wrapping F3 F3 Interpret search pattern as a regular expression <html><head/><body><p>When checked, the pattern to find is interpreted as a UNIX regular expression. See <a href="https://en.wikibooks.org/wiki/Regular_Expressions">Regular Expression in Wikibooks</a>.</p></body></html> Regular Expression Close Find Bar <html><head/><body><p>Results of the last executed statements.</p><p>You may want to collapse this panel and use the <span style=" font-style:italic;">SQL Log</span> dock with <span style=" font-style:italic;">User</span> selection instead.</p></body></html> Results of the last executed statements 最後執行語句的結果 This field shows the results and status codes of the last executed statements. 這個欄位顯示最後執行的語句的結果和狀態碼。 Export to &CSV 匯出到 &CSV Save as &view 儲存為視圖(&V) Save as view 儲存為視圖 Please specify the view name 請指定視圖名稱 There is already an object with that name. Please choose a different name. 已有相同名稱的對象。請選擇一個不同的名稱。 View successfully created. 成功建立視圖。 Error creating view: %1 建立視圖時出現錯誤: %1 SqlUiLexer (X) The abs(X) function returns the absolute value of the numeric argument X. () The changes() function returns the number of database rows that were changed or inserted or deleted by the most recently completed INSERT, DELETE, or UPDATE statement. (X1,X2,...) The char(X1,X2,...,XN) function returns a string composed of characters having the unicode code point values of integers X1 through XN, respectively. (X,Y,...) The coalesce() function returns a copy of its first non-NULL argument, or NULL if all arguments are NULL (X,Y) The glob(X,Y) function is equivalent to the expression "Y GLOB X". (X,Y) The ifnull() function returns a copy of its first non-NULL argument, or NULL if both arguments are NULL. (X,Y) The instr(X,Y) function finds the first occurrence of string Y within string X and returns the number of prior characters plus 1, or 0 if Y is nowhere found within X. (X) The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. () The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. (X) For a string value X, the length(X) function returns the number of characters (not bytes) in X prior to the first NUL character. (X,Y) The like() function is used to implement the "Y LIKE X" expression. (X,Y,Z) The like() function is used to implement the "Y LIKE X ESCAPE Z" expression. (X) The load_extension(X) function loads SQLite extensions out of the shared library file named X. Use of this function must be authorized from Preferences. (X,Y) The load_extension(X) function loads SQLite extensions out of the shared library file named X using the entry point Y. Use of this function must be authorized from Preferences. (X) The lower(X) function returns a copy of string X with all ASCII characters converted to lower case. (X) ltrim(X) removes spaces from the left side of X. (X,Y) The ltrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the left side of X. (X,Y,...) The multi-argument max() function returns the argument with the maximum value, or return NULL if any argument is NULL. (X,Y,...) The multi-argument min() function returns the argument with the minimum value. (X,Y) The nullif(X,Y) function returns its first argument if the arguments are different and NULL if the arguments are the same. (FORMAT,...) The printf(FORMAT,...) SQL function works like the sqlite3_mprintf() C-language function and the printf() function from the standard C library. (X) The quote(X) function returns the text of an SQL literal which is the value of its argument suitable for inclusion into an SQL statement. () The random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807. (N) The randomblob(N) function return an N-byte blob containing pseudo-random bytes. (X,Y,Z) The replace(X,Y,Z) function returns a string formed by substituting string Z for every occurrence of string Y in string X. (X) The round(X) function returns a floating-point value X rounded to zero digits to the right of the decimal point. (X,Y) The round(X,Y) function returns a floating-point value X rounded to Y digits to the right of the decimal point. (X) rtrim(X) removes spaces from the right side of X. (X,Y) The rtrim(X,Y) function returns a string formed by removing any and all characters that appear in Y from the right side of X. (X) The soundex(X) function returns a string that is the soundex encoding of the string X. (X,Y) substr(X,Y) returns all characters through the end of the string X beginning with the Y-th. (X,Y,Z) The substr(X,Y,Z) function returns a substring of input string X that begins with the Y-th character and which is Z characters long. () The total_changes() function returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the current database connection was opened. (X) trim(X) removes spaces from both ends of X. (X,Y) The trim(X,Y) function returns a string formed by removing any and all characters that appear in Y from both ends of X. (X) The typeof(X) function returns a string that indicates the datatype of the expression X. (X) The unicode(X) function returns the numeric unicode code point corresponding to the first character of the string X. (X) The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent. (N) The zeroblob(N) function returns a BLOB consisting of N bytes of 0x00. (timestring,modifier,modifier,...) (format,timestring,modifier,modifier,...) (X) The avg() function returns the average value of all non-NULL X within a group. (X) The count(X) function returns a count of the number of times that X is not NULL in a group. (X) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. (X,Y) The group_concat() function returns a string which is the concatenation of all non-NULL values of X. If parameter Y is present then it is used as the separator between instances of X. (X) The max() aggregate function returns the maximum value of all values in the group. (X) The min() aggregate function returns the minimum non-NULL value of all values in the group. (X) The sum() and total() aggregate functions return sum of all non-NULL values in the group. () The number of the row within the current partition. Rows are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition, or in arbitrary order otherwise. () The row_number() of the first peer in each group - the rank of the current row with gaps. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () The number of the current row's peer group within its partition - the rank of the current row without gaps. Partitions are numbered starting from 1 in the order defined by the ORDER BY clause in the window definition. If there is no ORDER BY clause, then all rows are considered peers and this function always returns 1. () Despite the name, this function always returns a value between 0.0 and 1.0 equal to (rank - 1)/(partition-rows - 1), where rank is the value returned by built-in window function rank() and partition-rows is the total number of rows in the partition. If the partition contains only one row, this function returns 0.0. () The cumulative distribution. Calculated as row-number/partition-rows, where row-number is the value returned by row_number() for the last peer in the group and partition-rows the number of rows in the partition. (N) Argument N is handled as an integer. This function divides the partition into N groups as evenly as possible and assigns an integer between 1 and N to each group, in the order defined by the ORDER BY clause, or in arbitrary order otherwise. If necessary, larger groups occur first. This function returns the integer value assigned to the group that the current row is a part of. (expr) Returns the result of evaluating expression expr against the previous row in the partition. Or, if there is no previous row (because the current row is the first), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows before the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows before the current row, NULL is returned. (expr,offset,default) If default is also provided, then it is returned instead of NULL if the row identified by offset does not exist. (expr) Returns the result of evaluating expression expr against the next row in the partition. Or, if there is no next row (because the current row is the last), NULL. (expr,offset) If the offset argument is provided, then it must be a non-negative integer. In this case the value returned is the result of evaluating expr against the row offset rows after the current row within the partition. If offset is 0, then expr is evaluated against the current row. If there is no row offset rows after the current row, NULL is returned. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the first row in the window frame for each row. (expr) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the last row in the window frame for each row. (expr,N) This built-in window function calculates the window frame for each row in the same way as an aggregate window function. It returns the value of expr evaluated against the row N of the window frame. Rows are numbered within the window frame starting from 1 in the order defined by the ORDER BY clause if one is present, or in arbitrary order otherwise. If there is no Nth row in the partition, then NULL is returned. SqliteTableModel reading rows loading... References %1(%2) Hold %3Shift and click to jump there Error changing data: %1 修改資料庫時出現錯誤: %1 retrieving list of columns Fetching data... Cancel 取消 VacuumDialog Compact Database 壓縮資料庫 Warning: Compacting the database will commit all of your changes. Please select the databases to co&mpact: Warning: Compacting the database will commit all changes you made. 警告: 壓縮資料庫將會提交您做出的所有修改。 Please select the objects to compact: 請選擇要壓縮的物件: sqlitebrowser-3.11.2/src/translations/translations.qrc000066400000000000000000000014771345112435200232540ustar00rootroot00000000000000 sqlb_ar_SA.qm sqlb_cs.qm sqlb_ru.qm sqlb_de.qm sqlb_fr.qm sqlb_zh.qm sqlb_zh_TW.qm sqlb_pl.qm sqlb_pt_BR.qm sqlb_en_GB.qm sqlb_es_ES.qm sqlb_ko_KR.qm sqlb_tr.qm sqlb_uk_UA.qm sqlb_it.qm sqlitebrowser-3.11.2/src/version.h000066400000000000000000000006261345112435200171340ustar00rootroot00000000000000#ifndef GEN_VERSION_H #define GEN_VERSION_H #define MAJOR_VERSION 3 #define MINOR_VERSION 11 #define PATCH_VERSION 2 #define str(s) #s #define xstr(s) str(s) #define APP_VERSION xstr(MAJOR_VERSION) "." xstr(MINOR_VERSION) "." xstr(PATCH_VERSION) // If it is defined by the compiler, then it is a nightly build, and in the YYYYMMDD format. #ifndef BUILD_VERSION #define BUILD_VERSION 0 #endif #endif sqlitebrowser-3.11.2/src/winapp.rc000066400000000000000000000017741345112435200171270ustar00rootroot00000000000000#include #include "version.h" VS_VERSION_INFO VERSIONINFO FILEVERSION MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION, 0 PRODUCTVERSION MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION, 0 FILEOS VOS_NT_WINDOWS32 FILETYPE VFT_APP BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "000004B0" BEGIN VALUE "FileVersion", APP_VERSION "." xstr(BUILD_VERSION) VALUE "ProductVersion", APP_VERSION "." xstr(BUILD_VERSION) VALUE "FileDescription", "DB Browser for SQLite" VALUE "ProductName", "DB Browser for SQLite" VALUE "InternalName", "DB Browser for SQLite" VALUE "OriginalFilename", "DB Browser for SQLite.exe" VALUE "CompanyName", "DB Browser for SQLite Team" VALUE "LegalCopyright", "Copyright DB Browser for SQLite Team" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0000, 0x04B0 END END IDI_DB4S ICON "iconwin.ico" sqlitebrowser-3.11.2/tests/000077500000000000000000000000001345112435200156455ustar00rootroot00000000000000sqlitebrowser-3.11.2/tests/createtestdb.py000077500000000000000000000015321345112435200206740ustar00rootroot00000000000000#!/usr/bin/python import sys import os import random import string import sqlite3 CREATE = """ CREATE TABLE IF NOT EXISTS hugetable ( id INTEGER PRIMARY KEY AUTOINCREMENT, weirdtext TEXT, crazynumber REAL ); """ def main(): if len(sys.argv) != 2: sys.exit("please specify the db filename") with sqlite3.connect(sys.argv[1]) as c: c.executescript(CREATE) rowcount = 1000000 for i in range(rowcount): text = "".join( [random.choice(string.ascii_letters) for i in range(200)] ) num = random.random() * random.randint(0, 2930) c.execute("INSERT INTO hugetable(weirdtext, crazynumber) VALUES ( :t, :n);", {"t": text, "n": num}) if i % 1000 == 0: print("inserted", i, "of", rowcount) c.commit() if __name__ == "__main__": main()