summaryrefslogtreecommitdiffstats
path: root/parts/astyle/astyle_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/astyle/astyle_widget.cpp')
-rw-r--r--parts/astyle/astyle_widget.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/parts/astyle/astyle_widget.cpp b/parts/astyle/astyle_widget.cpp
index 0622b91b..0cb26abb 100644
--- a/parts/astyle/astyle_widget.cpp
+++ b/parts/astyle/astyle_widget.cpp
@@ -1,59 +1,59 @@
#include "astyle_part.h"
#include "astyle_widget.h"
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qmultilineedit.h>
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqmultilineedit.h>
+#include <tqbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdevcore.h>
-AStyleWidget::AStyleWidget(AStylePart * part, bool global, QWidget *parent, const char *name)
+AStyleWidget::AStyleWidget(AStylePart * part, bool global, TQWidget *parent, const char *name)
: AStyleConfig(parent, name), m_part(part), isGlobalWidget(global)
{
// which style changed - disable the other pages.
- connect(StyleGroup, SIGNAL(clicked(int)), this, SLOT(styleChanged()));
- connect(ConfigTabs, SIGNAL(currentChanged(QWidget*)), this, SLOT(styleChanged()) );
+ connect(StyleGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(styleChanged()));
+ connect(ConfigTabs, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(styleChanged()) );
- connect(FillingGroup, SIGNAL(clicked(int)), this, SLOT(styleChanged()));
- connect(Fill_ForceTabs, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Fill_TabCount, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
- connect(Fill_SpaceCount, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
+ connect(FillingGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(styleChanged()));
+ connect(Fill_ForceTabs, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Fill_TabCount, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(styleChanged()));
+ connect(Fill_SpaceCount, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(styleChanged()));
- connect(BracketGroup, SIGNAL(clicked(int)), this, SLOT(styleChanged()));
- connect(Brackets_CloseHeaders, SIGNAL(clicked()), this, SLOT(styleChanged()));
+ connect(BracketGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(styleChanged()));
+ connect(Brackets_CloseHeaders, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
- connect(Indent_Switches, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Indent_Cases, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Indent_Classes, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Indent_Brackets, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Indent_Namespaces, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Indent_Labels, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Indent_Blocks, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Indent_Preprocessors, SIGNAL(clicked()), this, SLOT(styleChanged()));
+ connect(Indent_Switches, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Indent_Cases, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Indent_Classes, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Indent_Brackets, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Indent_Namespaces, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Indent_Labels, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Indent_Blocks, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Indent_Preprocessors, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
- connect(Continue_MaxStatement, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
- connect(Continue_MinConditional, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
+ connect(Continue_MaxStatement, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(styleChanged()));
+ connect(Continue_MinConditional, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(styleChanged()));
- connect(Block_Break, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Block_BreakAll, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Block_IfElse, SIGNAL(clicked()), this, SLOT(styleChanged()));
+ connect(Block_Break, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Block_BreakAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Block_IfElse, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
- connect(Pad_ParenthesesIn, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Pad_ParenthesesOut, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Pad_ParenthesesUn, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Pad_Operators, SIGNAL(clicked()), this, SLOT(styleChanged()));
+ connect(Pad_ParenthesesIn, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Pad_ParenthesesOut, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Pad_ParenthesesUn, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Pad_Operators, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
- connect(Keep_Statements, SIGNAL(clicked()), this, SLOT(styleChanged()));
- connect(Keep_Blocks, SIGNAL(clicked()), this, SLOT(styleChanged()));
+ connect(Keep_Statements, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
+ connect(Keep_Blocks, TQT_SIGNAL(clicked()), this, TQT_SLOT(styleChanged()));
- QMap<QString, QVariant> option;
+ TQMap<TQString, TQVariant> option;
if ( isGlobalWidget){
Style_Global->hide();
option = m_part->getGlobalOptions();
@@ -64,7 +64,7 @@ AStyleWidget::AStyleWidget(AStylePart * part, bool global, QWidget *parent, cons
}
// style
- QString s = option["FStyle"].toString();
+ TQString s = option["FStyle"].toString();
// fake the id so we disable the other pages.
int id=0;
if (s == "ANSI") id=1;
@@ -172,7 +172,7 @@ AStyleWidget::~AStyleWidget()
void AStyleWidget::accept()
{
- QMap<QString, QVariant>* m_option;
+ TQMap<TQString, TQVariant>* m_option;
if ( isGlobalWidget){
m_option = &(m_part->getGlobalOptions());
m_part->setExtensions(GeneralExtension->text(),true);
@@ -195,8 +195,8 @@ void AStyleWidget::accept()
else if (Style_JAVA->isChecked())
(*m_option)["FStyle"] = "JAVA";
else if (Style_Global->isChecked()){
- QMap<QString,QVariant>& global = m_part->getGlobalOptions();
- QMap<QString,QVariant>& project = m_part->getProjectOptions();
+ TQMap<TQString,TQVariant>& global = m_part->getGlobalOptions();
+ TQMap<TQString,TQVariant>& project = m_part->getProjectOptions();
project=global;
project["FStyle"]="GLOBAL";
}
@@ -264,7 +264,7 @@ void AStyleWidget::accept()
}
if ( isGlobalWidget){
- QMap<QString, QVariant>& project = m_part->getProjectOptions();
+ TQMap<TQString, TQVariant>& project = m_part->getProjectOptions();
if ( project["FStyle"] == "GLOBAL"){
project = m_part->getGlobalOptions();
project["FStyle"] = "GLOBAL";
@@ -272,7 +272,7 @@ void AStyleWidget::accept()
m_part->saveGlobal();
}
-// for ( QMap<QString, QVariant>::ConstIterator iter = m_option->begin();iter != m_option->end();iter++ )
+// for ( TQMap<TQString, TQVariant>::ConstIterator iter = m_option->begin();iter != m_option->end();iter++ )
// {
// kdDebug ( 9009 ) << "widget: " << iter.key() << "=" << iter.data() << endl;
// }
@@ -296,13 +296,13 @@ void AStyleWidget::styleChanged( )
StyleExample->clear();
- QString bracketSample = "namespace foospace {\n\tint Foo(){\n\tif (isBar)\n{\nbar(); \n\treturn 1; } else \nreturn 0;}}\n\nvoid test(){\n\tif (isFoo){\n\tbar();\n} else\n{\n\tbar();\n}\n}\n";
+ TQString bracketSample = "namespace foospace {\n\tint Foo(){\n\tif (isBar)\n{\nbar(); \n\treturn 1; } else \nreturn 0;}}\n\nvoid test(){\n\tif (isFoo){\n\tbar();\n} else\n{\n\tbar();\n}\n}\n";
- QString indentSample = "#define foobar(A)\\\n{Foo();Bar();}\n#define anotherFoo(B)\\\nreturn Bar()\n\nnamespace Bar\n{\nclass Foo\n{public:\nFoo();\nvirtual ~Foo();\n};\nswitch (foo)\n{\ncase 1:\na+=1;\nbreak;\ncase 2:\n{\na += 2;\n break;\n}\n}\nif (isFoo)\n{\nbar();\n}\nelse\n{\nanotherBar();\n}\nint foo()\n\twhile(isFoo)\n\t\t{\n\t\t\t...\n\t\t\tgoto error;\n\t\t....\n\t\terror:\n\t\t\t...\n\t\t}\n\t}\nfooArray[]={ red,\n\tgreen,\n\tdarkblue};\nfooFunction(barArg1,\n\tbarArg2,\n\tbarArg3);\n";
+ TQString indentSample = "#define foobar(A)\\\n{Foo();Bar();}\n#define anotherFoo(B)\\\nreturn Bar()\n\nnamespace Bar\n{\nclass Foo\n{public:\nFoo();\nvirtual ~Foo();\n};\nswitch (foo)\n{\ncase 1:\na+=1;\nbreak;\ncase 2:\n{\na += 2;\n break;\n}\n}\nif (isFoo)\n{\nbar();\n}\nelse\n{\nanotherBar();\n}\nint foo()\n\twhile(isFoo)\n\t\t{\n\t\t\t...\n\t\t\tgoto error;\n\t\t....\n\t\terror:\n\t\t\t...\n\t\t}\n\t}\nfooArray[]={ red,\n\tgreen,\n\tdarkblue};\nfooFunction(barArg1,\n\tbarArg2,\n\tbarArg3);\n";
- QString formattingSample = "void func(){\n\tif(isFoo(a,b))\n\tbar(a,b);\nif(isFoo)\n\ta=bar((b-c)*a,*d--);\nif( isFoo( a,b ) )\n\tbar(a, b);\nif (isFoo) {isFoo=false;cat << isFoo <<endl;}\nif(isFoo)DoBar();if (isFoo){\n\tbar();\n}\n\telse if(isBar()){\n\tannotherBar();\n}\n}\n";
+ TQString formattingSample = "void func(){\n\tif(isFoo(a,b))\n\tbar(a,b);\nif(isFoo)\n\ta=bar((b-c)*a,*d--);\nif( isFoo( a,b ) )\n\tbar(a, b);\nif (isFoo) {isFoo=false;cat << isFoo <<endl;}\nif(isFoo)DoBar();if (isFoo){\n\tbar();\n}\n\telse if(isBar()){\n\tannotherBar();\n}\n}\n";
- QString styleSample = "\t//Tabs & Brackets\nnamespace foo{\n" + bracketSample + "}\n\t// Indentation\n" + indentSample + "\t// Formatting\n" + formattingSample;
+ TQString styleSample = "\t//Tabs & Brackets\nnamespace foo{\n" + bracketSample + "}\n\t// Indentation\n" + indentSample + "\t// Formatting\n" + formattingSample;
switch(id){
case 1: