aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/texteditor/qml
Commit message (Collapse)AuthorAgeFilesLines
* TextEditor: Add modified handlingFriedemann Kleint2019-08-211-2/+17
| | | | | | | | | | Add a modified property to the document and add handling in onClosing(). Connect the actions to call close() instead of Qt.quit() for it to become active. Change-Id: I0fec75629db64e91508ed8ba45d4fb60be146b1b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-022-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes all Qt Quick Controls 2 imports match the current Qt minor version, which is 12 as of this patch. It also updates all other Qt Quick imports to match. This will also make future version bumps easier as all version numbers in existing code/docs will match. The following commands were used to verify that no old versions remain: for i in `seq 0 11`; do git grep "import QtGraphicalEffects.*1.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick 2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Layouts 1.$i$"; done for i in `seq 0 5`; do git grep "import QtQuick.Controls.*2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Templates 2.$i as T$"; done [ChangeLog] From Qt 5.12 onwards, all import versions in Qt Quick Controls 2 follow the same minor version as Qt's minor version number. For example, the import version for Qt 5.12 is: "import QtQuick.Controls 2.12". Change-Id: I6d87573f20912e041d9c3b7c773cc7bf7b152ec3 Fixes: QTBUG-71095 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-242-4/+24
| | | | | | | | | | Sync with the qtbase/header.XXX. The license headers were matching qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings: Old license being used for foo.qdoc Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Welcome to 2017J-P Nurmi2017-01-092-2/+2
| | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: fix selectedNameFilter usageJ-P Nurmi2016-10-041-2/+2
| | | | | | | | texteditor.qml:165 Invalid property assignment: "selectedNameFilter" is a read-only property Change-Id: I691142ea0d3ed62a4041fb13916c251446ccea0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Platform: add experimental StandardPathsJ-P Nurmi2016-09-131-0/+2
| | | | | | | This complements the File/FolderDialog offering. Change-Id: I44a105724321092a6efc4126c8fb25f7d31b77e2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: add mnemonicsJ-P Nurmi2016-09-121-12/+12
| | | | | Change-Id: Id11f2ab1ec9b11962e5ca3c5c5982709d9b2dac2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: use RoundButtonJ-P Nurmi2016-09-051-16/+1
| | | | | Change-Id: I4cb9b2151698e30deec969868ffdb0100b7d98a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor/touch: highlight the floating editor buttonJ-P Nurmi2016-08-271-2/+1
| | | | | | | A style-independent way to get light foreground color. Change-Id: Idf43020d0724af993723143d74a2b1f8ab467c1e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor/touch: elide the title when it doesn't fitJ-P Nurmi2016-08-261-3/+1
| | | | | Change-Id: Ib1e9de9d23b708e5ddfc131dce8da5570a61d17a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor/touch: simplify the toolbarJ-P Nurmi2016-08-261-72/+66
| | | | | | | A single Row positioner is sufficient. Change-Id: Ib244ddf875e40df341cb99172995d1717cb6439f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: remove outdated todo-commentsJ-P Nurmi2016-08-262-4/+0
| | | | | | | | | | The comments refer to the original code that was setting a declarative source property in the Component.onCompleted signal handler, but this does not really apply anymore now that we have an imperative method to load document contents. Change-Id: I9054cbc6ecec2c66d65251c49a5b1de2ad0623dc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: add touch UIMitch Curtis2016-08-242-14/+302
| | | | | | Task-number: QTBUG-54952 Change-Id: I14fe95608c4393b928edc80fc93ebaa843ce478f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* texteditor: cleanup the commented out universal importJ-P Nurmi2016-08-161-1/+0
| | | | | Change-Id: I99c5b79d80987216be7b680de91ec6c66cf127e0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* FileDialog: add missing selectedNameFilter-propertyJ-P Nurmi2016-08-141-0/+2
| | | | | Change-Id: If31d657e29a9cc3049af5cd3cf39d68979ff2db0 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* FileDialog: replace file(s)Selected() with declarative propertiesJ-P Nurmi2016-08-141-2/+2
| | | | | | | Follow the same convention that ColorDialog, FontDialog and FolderDialog. Change-Id: I960d4fc1ba275ab997f2a079a799d2b90796eca3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* FontDialog: replace fontSelected() with a declarative propertyJ-P Nurmi2016-08-141-1/+1
| | | | | | | This is consistent with the QML FontDialog from QtQuick Dialogs 1. Change-Id: I14a5a313be5ba9a9e0fb1645fe272cf9c2cdd389 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* ColorDialog: replace colorSelected() with a declarative propertyJ-P Nurmi2016-08-141-1/+1
| | | | | | | This is consistent with the QML ColorDialog from QtQuick Dialogs 1. Change-Id: I4068a98156494eb36b2d9ecf4c1af90ad173bb97 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* texteditor: enable persistent selectionJ-P Nurmi2016-08-131-0/+1
| | | | | | | | | | We want to keep the selection even if the editor loses focus when a color or font dialog is opened. The selected color or font should naturally apply to the whole text selection that was there before the dialog was opened. Change-Id: I76e6b95f979a090533b028be76e7b2cf1fd53e99 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* texteditor: use "brush" icon for text color and "A" for fontMitch Curtis2016-08-121-15/+15
| | | | | | | | | | "F" looks a bit silly. Even though most word processing applications seem to use the "A" icon with a bar underneath it for the text color, we want to use it to represent the button that opens the font dialog, since we don't use comboboxes for that. Change-Id: I3cc60ffbe388644cdcbd9e8ec0dcffbc041aa124 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* texteditor: use a wrapping Flow for the toolbarJ-P Nurmi2016-08-121-35/+36
| | | | | | | | | | | | | | A proper toolbar extension would be better, but this is a workaround to make the window scalable/resizable until we have a better solution available. The font button was moved together with the other formatting buttons, because it looked a bit awkward when it was wrapping alone on the second row, and in general it caused things looking somehow mis-aligned when actions were wrapped on multiple rows. Change-Id: I0c1f432e81d5fde6aa763c13ea9efbb8af68ad50 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Platform: add MenuSeparator for convenience and consistencyJ-P Nurmi2016-08-121-3/+1
| | | | | Change-Id: I0c0aae219c81b9248a5a8a0fd0e78521cbe86360 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: replace setFileUrl() with load()J-P Nurmi2016-08-121-3/+5
| | | | | | | | This allows to remove the text property to avoid storing the whole document's initial content for no real purpose. Change-Id: Iad59576b5304be9739c1dfb0a7d4c263323b0edb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: add fileName & fileTypeJ-P Nurmi2016-08-121-2/+2
| | | | | | | | | 'document.fileName' reads better than 'document.documentTitle', and 'document.fileType' can be set as the default suffix for the file save dialog. Change-Id: I935586296c91d3efdd5edea03d81c685e7edcab2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: simplify saveAs() - let FileDialog handle the suffixJ-P Nurmi2016-08-121-2/+2
| | | | | Change-Id: Id1b415ebcbe12a9eeff9b54dcfa2cec67054a8d6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* texteditor: fix the file dialog name filtersJ-P Nurmi2016-08-121-1/+1
| | | | | | | OS X interpreted the suffix literally ".html," Change-Id: Icdf889592e4457db5dd4ffd420501b890cbcfd27 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add Text Editor exampleMitch Curtis2016-08-111-0/+437
A follow up commit will contain the touch UI. Change-Id: I26275fdd31294506821fa3e3e4a4bb63329665b9 Task-number: QTBUG-54952 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>