-rwxr-xr-x | scripts/q_functions | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/q_functions b/scripts/q_functions index cf2c2e1..0705cc2 100755 --- a/scripts/q_functions +++ b/scripts/q_functions | |||
@@ -78,138 +78,138 @@ cat << END | |||
78 | 78 | ||
79 | 79 | ||
80 | $NEW_CLASS_NAME::$NEW_CLASS_NAME( QWidget *parent=0, const char *name=0, WFlags f = 0) : | 80 | $NEW_CLASS_NAME::$NEW_CLASS_NAME( QWidget *parent=0, const char *name=0, WFlags f = 0) : |
81 | QWidget( parent, name, f ) | 81 | QWidget( parent, name, f ) |
82 | { | 82 | { |
83 | } | 83 | } |
84 | 84 | ||
85 | 85 | ||
86 | void $NEW_CLASS_NAME::exampleFunction( ) | 86 | void $NEW_CLASS_NAME::exampleFunction( ) |
87 | { | 87 | { |
88 | } | 88 | } |
89 | END | 89 | END |
90 | } | 90 | } |
91 | 91 | ||
92 | 92 | ||
93 | function print_header_file | 93 | function print_header_file |
94 | { | 94 | { |
95 | print_copyright_header | 95 | print_copyright_header |
96 | cat << END | 96 | cat << END |
97 | #ifndef $NEW_CLASS_HEADER_DEFINE | 97 | #ifndef $NEW_CLASS_HEADER_DEFINE |
98 | #define $NEW_CLASS_HEADER_DEFINE | 98 | #define $NEW_CLASS_HEADER_DEFINE |
99 | 99 | ||
100 | 100 | ||
101 | #include <qwidget.h> | 101 | #include <qwidget.h> |
102 | 102 | ||
103 | 103 | ||
104 | class $NEW_CLASS_NAME : public QWidget | 104 | class $NEW_CLASS_NAME : public QWidget |
105 | { | 105 | { |
106 | Q_OBJECT | 106 | Q_OBJECT |
107 | public: | 107 | public: |
108 | $NEW_CLASS_NAME( QWidget *parent=0, const char *name=0, WFlags f = 0); | 108 | $NEW_CLASS_NAME( QWidget *parent=0, const char *name=0, WFlags f = 0); |
109 | protected: | 109 | protected: |
110 | void exampleFunction( ); | 110 | void exampleFunction( ); |
111 | private: | 111 | private: |
112 | int exampleVariable; | 112 | int exampleVariable; |
113 | }; | 113 | }; |
114 | 114 | ||
115 | 115 | ||
116 | #endif // $NEW_CLASS_HEADER_DEFINE | 116 | #endif // $NEW_CLASS_HEADER_DEFINE |
117 | END | 117 | END |
118 | } | 118 | } |
119 | 119 | ||
120 | 120 | ||
121 | function print_pro_file | 121 | function print_pro_file |
122 | { | 122 | { |
123 | cat << END | 123 | cat << END |
124 | TEMPLATE= app | 124 | TEMPLATE= app |
125 | CONFIG = qt warn_on release | 125 | CONFIG = qt warn_on release |
126 | DESTDIR = ../bin | 126 | DESTDIR = ../bin |
127 | HEADERS = $NEW_CLASS_HEADER_FILE | 127 | HEADERS = $NEW_CLASS_HEADER_FILE |
128 | SOURCES = $NEW_CLASS_SOURCE_FILE $NEW_APP_MAIN_FILE | 128 | SOURCES = $NEW_CLASS_SOURCE_FILE $NEW_APP_MAIN_FILE |
129 | INTERFACES= | 129 | INTERFACES= |
130 | INCLUDEPATH+= ../library | 130 | INCLUDEPATH+= ../library |
131 | DEPENDPATH+= ../library | 131 | DEPENDPATH+= ../library |
132 | LIBS += -lqpe | 132 | LIBS += -lqpe |
133 | TARGET = $NEW_APP_NAME | 133 | TARGET = $NEW_APP_NAME |
134 | END | 134 | END |
135 | } | 135 | } |
136 | 136 | ||
137 | 137 | ||
138 | function print_install_file | 138 | function print_install_file |
139 | { | 139 | { |
140 | cat << END | 140 | cat << END |
141 | #!/bin/sh | 141 | #!/bin/sh |
142 | if [ a\$QPEDIR = a ] | 142 | if [ a\$OPIEDIR = a ] |
143 | then | 143 | then |
144 | echo QPEDIR must be set | 144 | echo OPIEDIR must be set |
145 | exit | 145 | exit |
146 | fi | 146 | fi |
147 | [ -f \$QPEDIR/pics/$NEW_APP_ICON_FILE ] || cp $NEW_APP_ICON_FILE \$QPEDIR/pics/ | 147 | [ -f \$OPIEDIR/pics/$NEW_APP_ICON_FILE ] || cp $NEW_APP_ICON_FILE \$OPIEDIR/pics/ |
148 | [ -f \$QPEDIR/apps/$NEW_APP_DESKTOP_FILE ] || cp $NEW_APP_DESKTOP_FILE \$QPEDIR/apps/ | 148 | [ -f \$OPIEDIR/apps/$NEW_APP_DESKTOP_FILE ] || cp $NEW_APP_DESKTOP_FILE \$OPIEDIR/apps/ |
149 | mv \$QPEDIR/Makefile \$QPEDIR/Makefile.orig | 149 | mv \$OPIEDIR/Makefile \$OPIEDIR/Makefile.orig |
150 | sed "s/APPS=/&$NEW_APP_NAME \\\\\\\\ \\\\ | 150 | sed "s/APPS=/&$NEW_APP_NAME \\\\\\\\ \\\\ |
151 | /" \$QPEDIR/Makefile.orig >> \$QPEDIR/Makefile | 151 | /" \$OPIEDIR/Makefile.orig >> \$OPIEDIR/Makefile |
152 | echo You may wish to move the desktop file in to | 152 | echo You may wish to move the desktop file in to |
153 | echo an appropriate subdirectory of the menus. | 153 | echo an appropriate subdirectory of the menus. |
154 | END | 154 | END |
155 | } | 155 | } |
156 | 156 | ||
157 | 157 | ||
158 | function print_desktop_file | 158 | function print_desktop_file |
159 | { | 159 | { |
160 | cat << END | 160 | cat << END |
161 | [Desktop Entry] | 161 | [Desktop Entry] |
162 | Type=Application | 162 | Type=Application |
163 | Exec=$NEW_APP_NAME | 163 | Exec=$NEW_APP_NAME |
164 | Icon=$NEW_APP_ICON_FILE | 164 | Icon=$NEW_APP_ICON_FILE |
165 | Name=$NEW_APP_MENU_NAME | 165 | Name=$NEW_APP_MENU_NAME |
166 | Comment=$NEW_APP_DESCRIPTION | 166 | Comment=$NEW_APP_DESCRIPTION |
167 | END | 167 | END |
168 | } | 168 | } |
169 | 169 | ||
170 | 170 | ||
171 | function print_icon_file | 171 | function print_icon_file |
172 | { | 172 | { |
173 | XPM_NAME="$NEW_APP_NAME"_xpm | 173 | XPM_NAME="$NEW_APP_NAME"_xpm |
174 | cat << END | 174 | cat << END |
175 | /* XPM */ | 175 | /* XPM */ |
176 | static char *$XPM_NAME[] = { | 176 | static char *$XPM_NAME[] = { |
177 | "14 14 3 1", | 177 | "14 14 3 1", |
178 | " c None", | 178 | " c None", |
179 | ".c #000000", | 179 | ".c #000000", |
180 | "ac #FFFFFF", | 180 | "ac #FFFFFF", |
181 | " ", | 181 | " ", |
182 | " aaaaaaaaaaaa ", | 182 | " aaaaaaaaaaaa ", |
183 | " a..........a ", | 183 | " a..........a ", |
184 | " a..aaaaaa..a ", | 184 | " a..aaaaaa..a ", |
185 | " a.a.aaaa.a.a ", | 185 | " a.a.aaaa.a.a ", |
186 | " a.aa.aa.aa.a ", | 186 | " a.aa.aa.aa.a ", |
187 | " a.aaa..aaa.a ", | 187 | " a.aaa..aaa.a ", |
188 | " a.aaa..aaa.a ", | 188 | " a.aaa..aaa.a ", |
189 | " a.aa.aa.aa.a ", | 189 | " a.aa.aa.aa.a ", |
190 | " a.a.aaaa.a.a ", | 190 | " a.a.aaaa.a.a ", |
191 | " a..aaaaaa..a ", | 191 | " a..aaaaaa..a ", |
192 | " a..........a ", | 192 | " a..........a ", |
193 | " aaaaaaaaaaaa ", | 193 | " aaaaaaaaaaaa ", |
194 | " "}; | 194 | " "}; |
195 | END | 195 | END |
196 | } | 196 | } |
197 | 197 | ||
198 | 198 | ||
199 | function add_class_to_pro_file | 199 | function add_class_to_pro_file |
200 | { | 200 | { |
201 | cat << END | 201 | cat << END |
202 | HEADERS += $NEW_CLASS_HEADER_FILE | 202 | HEADERS += $NEW_CLASS_HEADER_FILE |
203 | SOURCES += $NEW_CLASS_SOURCE_FILE | 203 | SOURCES += $NEW_CLASS_SOURCE_FILE |
204 | END | 204 | END |
205 | } | 205 | } |
206 | 206 | ||
207 | 207 | ||
208 | function get_number_of_lines | 208 | function get_number_of_lines |
209 | { | 209 | { |
210 | # Get the number of lines in the file | 210 | # Get the number of lines in the file |
211 | LINES=`wc -l $ORIGINAL_CLASS_HEADER_FILE | cut -d " " -f 6` | 211 | LINES=`wc -l $ORIGINAL_CLASS_HEADER_FILE | cut -d " " -f 6` |
212 | } | 212 | } |
213 | 213 | ||
214 | 214 | ||
215 | function get_first_line_of_class_definition | 215 | function get_first_line_of_class_definition |