File indexing completed on 2025-01-26 05:13:02

0001 using namespace QtQuick;
0002 /*
0003  * Header bla
0004  */
0005 /**
0006  * A very simple item
0007  */
0008 class FunctionArgs : public QtQuick.Item {
0009 public:
0010 /**
0011  * The 'foo' property
0012  */
0013 Q_PROPERTY(int foo READ dummyGetter_foo_ignore)
0014 
0015 Q_SIGNALS: void clicked(int x, int y); public:
0016 
0017 Q_SIGNALS: void activated(); public:
0018 /**
0019  * Do something with arg1 and arg2
0020  * @param arg1 first argument
0021  * @param arg2 second argument
0022  */
0023 void doSomething(string arg1, int arg2);
0024 /**
0025  * A badly documented function. Missing one argument and documenting a
0026  * non-existing document
0027  * @param foo first argument
0028  * @param baz this argument does not exist
0029  */
0030 void badlyDocumented(string foo, bar);
0031 
0032 Q_PROPERTY(string escaped READ dummyGetter_escaped_ignore)
0033 
0034 Q_PROPERTY(string block READ dummyGetter_block_ignore)
0035 /**
0036  * Compute the arg^2
0037  * @return the result
0038  */
0039 int square(arg);
0040 /**
0041  * Function with int default parameter
0042  * @param arg A parameter with a defaultvalue
0043  * @return the result
0044  */
0045 int intDefaultParameter(int arg = 0);
0046 /**
0047  * Function with string default parameter
0048  * @param arg A parameter with a default value
0049  * @return the result
0050  */
0051 string stringDefaultParameter(string arg = "hello");
0052 /**
0053  * Function with property as default parameter
0054  * @param arg A parameter with a default value
0055  * @return the result
0056  */
0057 int propDefaultParameter(int arg = foo);
0058 /**
0059  * Function that takes a pointer type parameter
0060  * @param arg A pointer to an object derived from a QObject type
0061  */
0062 void handleAnObject(QObject* arg);
0063 /// One-line comment
0064 void refresh();
0065 /// Function that takes an empty object as default value for a parameter
0066 void objectDefaultParam(arg = {});
0067 /// Function that has arguments and a spread argument
0068 void argumentsWithSpread(arg1, arg2 = {}, .../*args*/);
0069 /// Function that has only spread arguments
0070 void onlySpread(.../*args*/);
0071 /// Function that takes an empty array as default value for a parameter
0072 void arrayDefaultParam(arg = []);
0073 /// Default values can now be expressions
0074 void complicatedDefaultValue(area = 10.0*20.0);
0075 /// Function with arguments
0076 void typedFunction(int a, var arg, Item item);
0077 
0078 Q_PROPERTY(int weirdProperty READ dummyGetter_weirdProperty_ignore)
0079 /* baz */
0080 /* foo */
0081 };