forked from qt-creator/qt-creator
		
	Use the same syntax already used in the custom wizard to denote variables that are modified to be lower-/title-/uppercase: $tESt:u$ will become TEST $tESt:c$ will become TESt $tESt:l$ will become test The snippet will be inserted without any name mangling happening. Once the editing is done the name mangling is applied to all fields. Change-Id: I7c1f5a1ad2bb5acf1b88b54de51bb39391c64763 Reviewed-by: David Schulz <david.schulz@digia.com>
		
			
				
	
	
		
			76 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="utf-8"?>
 | |
| <snippets>
 | |
| <snippet group="C++" trigger="main" id="cpp_main">int main(int argc, char *argv[])
 | |
| {
 | |
|     $$
 | |
|     return 0;
 | |
| }
 | |
| </snippet>
 | |
| <snippet group="C++" trigger="class" id="cpp_genericclass">class $name$
 | |
| {
 | |
| public:
 | |
|     $name$() {}
 | |
| };</snippet>
 | |
| <snippet group="C++" trigger="class" id="cpp_qobjectclass" complement="derived from QObject">class $name$ : public QObject
 | |
| {
 | |
|     Q_OBJECT
 | |
| public:
 | |
|     $name$() {}
 | |
|     virtual ~$name$() {}
 | |
| };</snippet>
 | |
| <snippet group="C++" trigger="class" id="cpp_qwidgetclass" complement="derived from QWidget">class $name$ : public QWidget
 | |
| {
 | |
|     Q_OBJECT
 | |
| public:
 | |
|     $name$() {}
 | |
|     virtual ~$name$() {}
 | |
| };</snippet>
 | |
| <snippet group="C++" trigger="class" id="cpp_classtemplate" complement="template">template <typename $T$>
 | |
| class $name$
 | |
| {
 | |
| public:
 | |
|     $name$() {}
 | |
| };</snippet>
 | |
| <snippet group="C++" trigger="do" id="cpp_do">do {
 | |
|     $$
 | |
| } while ($condition$);</snippet>
 | |
| <snippet group="C++" trigger="else" id="cpp_else" >else {
 | |
|     $$
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="else" id="cpp_elsewithif" complement="with if">else if ($condition$) {
 | |
|     $$
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="for" id="cpp_for">for (int $var$ = 0; $var$ < $total$; ++$var$) {
 | |
|     $$
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="foreach" id="cpp_foreach">foreach ($var$, $container$) {
 | |
|     $$
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="if" id="cpp_if">if ($condition$) {
 | |
|     $$
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="if" id="cpp_ifandelse" complement="and else">if ($condition$) {
 | |
|     $$
 | |
| } else {
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="namespace" id="cpp_namespace">namespace $name$ {
 | |
|     $$
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="try" id="cpp_trycatch" complement="and catch">try {
 | |
|     $$
 | |
| } catch (...) {
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="using" id="cpp_usingnamespace" complement="namespace">using namespace $name$;</snippet>
 | |
| <snippet group="C++" trigger="while" id="cpp_while">while ($condition$) {
 | |
|     $$
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="switch" id="cpp_switch">switch ($control$) {
 | |
| case $value$:
 | |
|     $$
 | |
|     break;
 | |
| default:
 | |
|     break;
 | |
| }</snippet>
 | |
| <snippet group="C++" trigger="Q_PROPERTY" id="cpp_q_property">Q_PROPERTY($type$ $name$ READ $name$ WRITE set$name:c$ NOTIFY $name$Changed)</snippet>
 | |
| </snippets>
 |