Changeset View
Changeset View
Standalone View
Standalone View
addons/symbolviewer/fortran_parser.cpp
Show All 38 Lines | |||||
39 | QPixmap subr( ( const char** ) macro_xpm ); | 39 | QPixmap subr( ( const char** ) macro_xpm ); | ||
40 | QPixmap mod( ( const char** ) struct_xpm ); | 40 | QPixmap mod( ( const char** ) struct_xpm ); | ||
41 | 41 | | |||
42 | //It is necessary to change names | 42 | //It is necessary to change names | ||
43 | m_macro->setText(i18n("Show Subroutines")); | 43 | m_macro->setText(i18n("Show Subroutines")); | ||
44 | m_struct->setText(i18n("Show Modules")); | 44 | m_struct->setText(i18n("Show Modules")); | ||
45 | m_func->setText(i18n("Show Functions")); | 45 | m_func->setText(i18n("Show Functions")); | ||
46 | 46 | | |||
47 | if(m_plugin->treeOn) | 47 | if(m_treeOn->isChecked()) | ||
48 | { | 48 | { | ||
49 | funcNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Functions") ) ); | 49 | funcNode = new QTreeWidgetItem(m_symbols, QStringList(i18n("Functions") ) ); | ||
50 | subrNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Subroutines") ) ); | 50 | subrNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Subroutines") ) ); | ||
51 | modNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Modules") ) ); | 51 | modNode = new QTreeWidgetItem(m_symbols, QStringList( i18n("Modules") ) ); | ||
52 | funcNode->setIcon(0, QIcon(func)); | 52 | funcNode->setIcon(0, QIcon(func)); | ||
53 | modNode->setIcon(0, QIcon(mod)); | 53 | modNode->setIcon(0, QIcon(mod)); | ||
54 | subrNode->setIcon(0, QIcon(subr)); | 54 | subrNode->setIcon(0, QIcon(subr)); | ||
55 | 55 | | |||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 125 | if (m_macro->isChecked()) // not really a macro, but a subroutines | |||
145 | 145 | | |||
146 | if((paro==parc || mainprog) && stripped.endsWith(QLatin1Char('&'), Qt::CaseInsensitive)==false) | 146 | if((paro==parc || mainprog) && stripped.endsWith(QLatin1Char('&'), Qt::CaseInsensitive)==false) | ||
147 | { | 147 | { | ||
148 | stripped.remove(QLatin1Char('&')); | 148 | stripped.remove(QLatin1Char('&')); | ||
149 | if(mainprog && stripped.indexOf(QLatin1Char('('))<0 && stripped.indexOf(QLatin1Char(')'))<0) | 149 | if(mainprog && stripped.indexOf(QLatin1Char('('))<0 && stripped.indexOf(QLatin1Char(')'))<0) | ||
150 | stripped.prepend(QLatin1String("Main: ")); | 150 | stripped.prepend(QLatin1String("Main: ")); | ||
151 | if(stripped.indexOf(QLatin1Char('='))==-1) | 151 | if(stripped.indexOf(QLatin1Char('='))==-1) | ||
152 | { | 152 | { | ||
153 | if (m_plugin->treeOn) | 153 | if (m_treeOn->isChecked()) | ||
154 | { | 154 | { | ||
155 | node = new QTreeWidgetItem(subrNode, lastSubrNode); | 155 | node = new QTreeWidgetItem(subrNode, lastSubrNode); | ||
156 | lastSubrNode = node; | 156 | lastSubrNode = node; | ||
157 | } | 157 | } | ||
158 | else | 158 | else | ||
159 | node = new QTreeWidgetItem(m_symbols); | 159 | node = new QTreeWidgetItem(m_symbols); | ||
160 | node->setText(0, stripped); | 160 | node->setText(0, stripped); | ||
161 | node->setIcon(0, QIcon(subr)); | 161 | node->setIcon(0, QIcon(subr)); | ||
Show All 23 Lines | 181 | { | |||
185 | stripped = currline.right(currline.length()-fnd-1); | 185 | stripped = currline.right(currline.length()-fnd-1); | ||
186 | fnd = stripped.indexOf(QLatin1Char('!')); | 186 | fnd = stripped.indexOf(QLatin1Char('!')); | ||
187 | if(fnd>0) | 187 | if(fnd>0) | ||
188 | { | 188 | { | ||
189 | stripped = stripped.left(fnd); | 189 | stripped = stripped.left(fnd); | ||
190 | } | 190 | } | ||
191 | if(stripped.indexOf(QLatin1Char('='))==-1) | 191 | if(stripped.indexOf(QLatin1Char('='))==-1) | ||
192 | { | 192 | { | ||
193 | if (m_plugin->treeOn) | 193 | if (m_treeOn->isChecked()) | ||
194 | { | 194 | { | ||
195 | node = new QTreeWidgetItem(modNode, lastModNode); | 195 | node = new QTreeWidgetItem(modNode, lastModNode); | ||
196 | lastModNode = node; | 196 | lastModNode = node; | ||
197 | } | 197 | } | ||
198 | else | 198 | else | ||
199 | node = new QTreeWidgetItem(m_symbols); | 199 | node = new QTreeWidgetItem(m_symbols); | ||
200 | node->setText(0, stripped); | 200 | node->setText(0, stripped); | ||
201 | node->setIcon(0, QIcon(mod)); | 201 | node->setIcon(0, QIcon(mod)); | ||
Show All 24 Lines | 223 | if(fnd>0) | |||
226 | } | 226 | } | ||
227 | stripped = stripped.trimmed(); | 227 | stripped = stripped.trimmed(); | ||
228 | paro+=currline.count(QLatin1Char(')'), Qt::CaseSensitive); | 228 | paro+=currline.count(QLatin1Char(')'), Qt::CaseSensitive); | ||
229 | parc+=currline.count(QLatin1Char('('), Qt::CaseSensitive); | 229 | parc+=currline.count(QLatin1Char('('), Qt::CaseSensitive); | ||
230 | 230 | | |||
231 | if(paro==parc && stripped.endsWith(QLatin1Char('&'))==false) | 231 | if(paro==parc && stripped.endsWith(QLatin1Char('&'))==false) | ||
232 | { | 232 | { | ||
233 | stripped.remove(QLatin1Char('&')); | 233 | stripped.remove(QLatin1Char('&')); | ||
234 | if (m_plugin->treeOn) | 234 | if (m_treeOn->isChecked()) | ||
235 | { | 235 | { | ||
236 | node = new QTreeWidgetItem(funcNode, lastFuncNode); | 236 | node = new QTreeWidgetItem(funcNode, lastFuncNode); | ||
237 | lastFuncNode = node; | 237 | lastFuncNode = node; | ||
238 | } | 238 | } | ||
239 | else | 239 | else | ||
240 | node = new QTreeWidgetItem(m_symbols); | 240 | node = new QTreeWidgetItem(m_symbols); | ||
241 | node->setText(0, stripped); | 241 | node->setText(0, stripped); | ||
242 | node->setIcon(0, QIcon(func)); | 242 | node->setIcon(0, QIcon(func)); | ||
Show All 13 Lines |