Commit Graph

58 Commits

Author SHA1 Message Date
Eike Ziller
a353e9fde1 Markdown: Reuse Markdown highlighter from change log viewer
Change-Id: Ief1b0c135a34bfd5e9b5220e9fbf93f281d8e95a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 11:48:15 +00:00
Eike Ziller
b5d7b24733 Add wizard for markdown file
Fixes: QTCREATORBUG-29056
Change-Id: Ia2ba9aef86aab3e156e3c36d8e28c9f37d7da8b3
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-19 09:28:26 +00:00
Thomas Hartmann
b1c48a27c0 QmlDesigner: Move effect wizard to qmldesigner/studio_templates
This is the folder QDS looks for the wizards.

Change-Id: Id69f50f48eeb4668dff2840a36149408e0709a06
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-11-01 19:14:08 +00:00
Tomi Korpipaa
02f7c9c3eb Import QQEM effects via drag or add button
Be able to add effects using file system drag&drop or using the add resource button

Task-number: QTBUG-100626
Change-Id: I33c3ebe29797325a2ed1819bd867e97ae3f8b61c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-11-01 12:55:28 +00:00
Christian Kandeler
07dfd7c0b3 Wizards: Bump QtQuick import version in file wizards
Use 2.15 as default, plus a little heuristic to use the same version as
other files in the project.

Fixes: QTCREATORBUG-27614
Change-Id: Ic84db5da97a9f35a2ad0e57fd47b75fb32a0b7f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-06-16 08:23:14 +00:00
Alessandro Portale
43a9423a9b Wizards: Make wizard icons a bit lighter
Changing the Wizard icons into themed ones turned them quite dark (in
non-dark themes). This change mitigates the issue by making the dark
lines thinner and shaded areas smaller and brighter (vice-versa for dark
themes).

Amends: 05e89384e2

Fixes: QTCREATORBUG-26565
Change-Id: Ie1d251d6443576c4e5db26a2b1485b4f4ab63f82
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-25 17:44:21 +00:00
Alessandro Portale
05e89384e2 Wizards: Turn icons into themed icons
Turn the current un-themed icons into icon masks which now get recolored
according to the current theme.

Change-Id: I435f9a43dae04797ad0b948992f77179d93164a8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-28 11:31:16 +00:00
Christian Stenger
6a1d678db7 Wizards: Fix typo
Amends 829faf7eef.

Change-Id: Id09b5eca3a2c6a4a90d4402383723b8a03a59594
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-05-20 14:37:06 +00:00
David Schulz
398930d3cf ProjectExplorer: Set temporary flag on scratch buffer document
Task-number: QTCREATORBUG-23509
Change-Id: Ieb3922030cb1dd4984b91ac24d0396bb19a4a711
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-24 12:55:44 +00:00
Christian Kandeler
b0779ad5f8 Wizards: Make it more obvious to users that they can create C files
Technically, almost any "new file" wizard could be used to create a C
file, but conceptually, it makes the most sense to turn the "C++"
category into "C/C++".

Fixes: QTCREATORBUG-23621
Change-Id: I002365fa35cc6c9bf7c71039e122f72890f66b1a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-10 13:23:57 +00:00
Christian Kandeler
829faf7eef File wizards: Optionally show the default suffix
In wizards that create a single new file, there's almost always a
default suffix that gets appended if the user provides only the base
name. However, there's currently no visual indication on the page that
such a suffix will be appended. Therefore, we add an optional field to
the FileWizardPage that displays the default suffix if the wizard
provides one.

Change-Id: Ia1c8966e7de14b484d065dbd4a41aa74f484f085
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-10 09:53:53 +00:00
Andy Shaw
e22eea1cf3 Fix the Python templates
This fixes the templates so that they do not produce any warnings
and also includes QQuickItem in the choice of base classes

Change-Id: I58bbd462052f5d2a64bb8c4bea5bbdcd15e66700
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-02-18 16:13:20 +00:00
David Schulz
3213e12ce7 rename PythonEditor plugin to Python
The plugin does not only contain a pure editor, but all kind of support
for a programming language like project and run support.

Change-Id: I1251367c8db2e7a54986415ffc5b860cb210de3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-17 06:21:23 +00:00
Christian Stenger
6288e03264 Wizards: Fix regular expressions
Although this is valid JavaScript matching the '.' is
not working as expected.
The directory always gets messed up by replacing the
first character with a dash. Use an alternate regular
expression and also ensure the replacement happens
globally instead of once as we want to replace all
dots by a dash.
As at it fix handling of the file suffixes as well.

Task-number: QTCREATORBUG-22625
Change-Id: Ide189fe50e29994abfb368e503050b9b413aba9f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-27 07:18:19 +00:00
Christian Gagneraud
3b596eef40 JSON wizard: Fix invalid json files
share/qtcreator/templates/wizards/projects/vcs/git/wizard.json:
Invalid \escape: line 16 column 59 (char 574)
Loading share/qtcreator/templates/wizards/files/java/wizard.json:
Invalid \escape: line 12 column 137 (char 466)

Change-Id: I2aeed7d5e167b92a1d118678d112f4a568c59997
Fixes: QTCREATORBUG-22432
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-13 07:40:41 +00:00
Christian Stenger
4f989d6543 Wizards: Fix java file wizard
Avoid ending up with a wrong named class when specifying the
file name instead of the class name.

Change-Id: I5e2ddaae1a16d60aa40fb9303e8d49efa9f51b7e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-10 05:47:17 +00:00
Eike Ziller
e0d38ae414 Export Wizard values to JavaScript macro
Registers a new function "value('name')", available to the wizard json
files, which returns the value of the variable "name" as a JavaScript
object. So, variables with a string value are actual JavaScript strings,
booleans are booleans, lists are lists, and dictionaries are
dictionaries.

The patch also makes it actually possible to assign JSON lists and
dictionaries to values.

This removes some hacks involving creating complex JavaScript objects
through string substitution.

Change-Id: I4ac6da22bc5bccc9fadee97694c2fa14d44c9307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-09 11:19:43 +00:00
Christian Kandeler
c770d3f4a7 Wizards: Allow non-existing base directory for new files
It's a valid use case to put new files into a new directory.

Task-number: QTCREATORBUG-15599
Change-Id: Iea479d7a723302a14ba8cc887c1036ea6a120ced
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-08 09:22:57 +00:00
Christian Kandeler
dfeb024583 C++: Do not apply "Lower-case file names" setting to file wizards
This setting is intended to derive file names from class names. It is
not relevant if the user explicitly provides a file name.

Fixes: QTCREATORBUG-14711
Change-Id: Ic31f8727220d99692286adf9ad0434ce06aa7c62
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-04-25 08:46:51 +00:00
Cristian Maureira-Fredes
f7e1354ae5 Add Qt for Python templates and better support
QtCreator:
* Add new icons
* Add support for `.pyproject` files,
* Set `.pyproject` as default, but keep compatibility with `.pyqtc`
    * `.pyproject` is a JSON file, while `.pyqtc` is a plain-text.

Python class:
* Add option to ask if use PySide2 or PyQt5
* Remove the old import try-except structure
* Remove iconText and add icon option
* Remove shebang
* Add utf-8 support

Python file:
* Remove code
* Remove iconText and add icon option
* Remove shebang
* Add utf-8 support

Qt for Python - Empty
* Add file with basic statements to execute a QApplication

Qt for Python - Window
* Add file with basic statements to execute a QApplication,
  which contains a QMainWindow

Task-number: QTCREATORBUG-21824
Change-Id: I4adb3ab6b179f084c7b674a6d4f643445fe24929
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-04 09:32:30 +00:00
Filip Bucek
aaa8beab88 Wizards: Support using #pragma once instead of include guards
Allow users to choose #pragma once instead of #ifndef include guards in
generated header files.

Fixes: QTCREATORBUG-12166
Change-Id: I3ba41c7570beb9c5958e174b5581fcc25855050f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Filip Bucek <fbucek@atlas.cz>
2019-01-23 09:10:42 +00:00
Thomas Hartmann
84b90abb9b ScxmlEditor: Require ScxmlEditor plugin for wizard
Change-Id: If5892f37b9e8d919100a659629e6e2325e25cc83
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-02-05 09:06:14 +00:00
Eike Ziller
97631cfdb8 ModelEditor: Add text to scratch model wizard icon
Like for the non-scratch wizard, separating it from SCXML.

Change-Id: Ia0ce6bad14dae8c3d7522c1d1dcdc4d87f77b77e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-02-01 08:46:09 +00:00
Jochen Becher
58a1648326 ModelEditor: add wizard for scratch models
Change-Id: Idc6841984aa258ab668416f891ecbaf7bd32164e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-01-09 14:23:53 +00:00
Alessandro Portale
9113125a5e Wizards: Add file extension as text overlay to some wizards
Change-Id: Ibfd1144271c4381c7125db80713cbde431a54cf7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-07-24 15:32:24 +00:00
Alessandro Portale
c77e76dd6d Nim: Update the Nim wizard icon
The icon should have the same size and look as the other icons.

Task-number: QTCREATORBUG-18550
Change-Id: I16ee48196a14878858f02cabe0678342b4abb44f
Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-18 08:58:06 +00:00
Jochen Becher
89a6ec4db3 Modeling: Add project management page to wizard
Change-Id: Ia70d397b7e9489eab35264624aa78ee63be99ca8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-05-29 18:59:05 +00:00
Tobias Hunger
76e9100a66 Wizards: Update Qml-related wizards with documented QRC file syntax
Task-number: QTCREATORBUG-18149
Change-Id: Ic63e3c35bb6c52dfa6d3b10c32e0c49077618656
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-05-05 08:50:58 +00:00
Tobias Hunger
565aed03a2 Wizards: Use filename, not baseName for license headers
Task-number: QTCREATORBUG-17343
Change-Id: I23ae4b510bb2dc81bd34253e8129ba148ae92021
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-25 15:20:15 +00:00
Filippo Cucchetto
1a1cf3c12b Nim: Added support for nim script files
Added a new entry inside the "New" menu for creating a new nim script file (*.nims)
Added support for editing them inside the editor

Change-Id: I09a514fdd4e4a0e9a78bb557db3e8c7e97683b8d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-11 09:23:12 +00:00
Tim Jenssen
ffe305527b Wizards: remove default icon
Change-Id: I665ccb887294885758b45b0bd272620e1a796eec
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-10 15:45:09 +00:00
Leena Miettinen
e67cb6d521 SCXML: Fix UI text
Change-Id: Ic8c0c27c12bcd9992cf3518087c283606f5acdeb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-07-26 07:36:21 +00:00
Ulf Hermann
25b9989749 Add wizard and mime type for SCXML
This allows us to easily add scxml files to a qmake project.

Change-Id: I2b5b21683f3e76062e6858fb8d0bceaa699a5569
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-14 11:41:05 +00:00
Thomas Hartmann
9b9a647aed Wizards: Remove Qt Quick 1 file wizard
Change-Id: I4ea4ab66cec327ef7a85a46dedb2c21ad3db8912
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-07-01 07:50:44 +00:00
Filippo Cucchetto
94fdd4d900 Added plugin for supporting the Nim programming language
The plugin support:
- basic syntax highlighting
- indentation
- project management
- run and build configuration
- debugging
- code style

Change-Id: Idfbb02a11ed570c90149a54b726beb956712e2bd
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-07 07:17:55 +00:00
Robert Loehning
c594d27c68 Small string improvements
Change-Id: Iad60750b4c4164b074a3b0203e4121e8586909de
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2016-01-20 13:22:28 +00:00
Tobias Hunger
aa37df645d JsonWizard: Update to use supportedProjectType
Remove "kind" as that is no longer necessary (even though it is still
handled if that is in the wizard).

Change-Id: I3e56d5e0d936b622dae5091950427f9b2db60695
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:20:55 +00:00
Tobias Hunger
293cc57064 Modeleditor: Use a JSON-based wizard
Use a JSON wizard in favor of implementing the same thing in
code.

Change-Id: I5952bf417255fb75378e42e3e80b13c0a0d3d317
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-12-21 08:29:47 +00:00
Tobias Hunger
bd5becfe18 JsonWizard: Update wizards to make use of new features
Change-Id: Id8117ba92db46012b536c2af4e62f364631d949a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-09-22 09:16:57 +00:00
Tobias Hunger
4345b37bf1 Wizards: Rename all qml template files
The QML lint does pick up the QML template files from the wizards
directory and complains about those when opening Qt Creator. So
rename them.

Change-Id: Ifa7a6006c222bf7b30c41097b07167c845bf7a48
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-09-14 09:19:29 +00:00
Tobias Hunger
f68704f8fd JsonWizard: Make checkbox default values true and false
That is closer to what a user expects than the "0" and "1" used
before.

Change-Id: I08b3a7b0361dd54b75ee7b2213b3d120fb016bf5
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-05-28 15:52:54 +00:00
Tobias Hunger
f1f2475d3e JsonWizard: split plugins and features when considering enabled state
Now that we have the infrastructure to handle both separately it makes
no more sense to merge them.

Change-Id: Ia2694eef60c0fe17b025e4d6766c7a8f775513f5
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-05-28 15:50:24 +00:00
Tobias Hunger
34008650df Wizards: Make sure wizard ids are unique
Replace existing wizards with new ones of the same id.

Change-Id: Ia17e6a4df5e7c8b647eccbe3bfb13e1c5b2d09e0
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-05-22 15:54:11 +00:00
Marco Bubke
789f3d6ca2 Change templates for Quick file wizards
A Item is more light weight than a Rectangle and using it against a white
background is useless. Actually Rectangle is not very much used so Item
is a better default. Width and height are dangerous too because people
exchange them with bindings instead of using anchors or layouts.

Change-Id: I4a89ddfc0f96fb3cdb0a9ccad7fcf80b8f28b479
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2015-04-07 11:37:02 +00:00
Eike Ziller
4e53c23b4b Mime types: Fix that some QML files were opened as C++
We registered a mime type "application/x-qml" conflicting with "text/x-
qml" from freedesktop.org.xml. The magic matcher of the C++ mime types
might kick in, in that case.

Task-number: QTCREATORBUG-13994
Change-Id: I5900c233b42681d7b7d3af185d6ff3e1c4166e59
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-24 09:46:04 +00:00
Tobias Hunger
10b53f5724 TextFileWizard: Do not add .txt if no extension is given.
Task-number: QTCREATORBUG-13889
Change-Id: I8a21665ce03a19ea96c09e9a5ccea59af995570d
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-04 16:22:35 +00:00
Tobias Hunger
de34e0e30b FormWizard: Fix newlines being escaped in generated output
Export the form contents as a list of lines and join them when
needed instead of hoping to unescape '\\n' in all places where
it is necessary.

This approach should be a bit saver since it will cause parse
errors in the wizard, which are more visible than broken output
in the generated files.

Task-number: QTCREATORBUG-13456
Change-Id: I434a9227082f92be3c2ce75006f61ac79a2b6fd6
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-11-20 18:11:47 +01:00
Tobias Hunger
d2eb042676 JsonWizard: Remove empty lines
Task-number: QTCREATORBUG-13289
Change-Id: I2c8d1fc4e2cfcb940e76a6988d35e80703548668
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-11-03 15:38:47 +01:00
Tobias Hunger
4612cccb08 JsonWizard: Replace FormWizard with JsonWizard
Change-Id: Id469ee792e148d83b33002ee8295d15b5175ebbd
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-10-16 12:06:26 +02:00
Tobias Hunger
cd0ff57e2f JsonWizard: Replace JsFileWizard with a JsonWizard
Change-Id: I4da3485ed83fda7f17f3fa9a1f3d59bfabb7ea4d
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-10-14 21:38:50 +02:00